Spotlight Social Media Feeds - Version 0.6

Version Description

(2021-03-03) =

Added - New option to duplicate feeds

Fixed - The feed did not load on sites that send CORS preflight requests - Fixed hashtags without spaces between them becoming a single link - Undefined index errors during an import or update

Download this release

Release Info

Developer Mekku
Plugin Icon 128x128 Spotlight Social Media Feeds
Version 0.6
Comparing to
See all releases

Code changes from version 0.5.4 to 0.6

core/Actions/CleanUpMediaAction.php CHANGED
@@ -3,10 +3,12 @@
3
  namespace RebelCode\Spotlight\Instagram\Actions;
4
 
5
  use RebelCode\Spotlight\Instagram\Config\ConfigSet;
 
 
 
6
  use RebelCode\Spotlight\Instagram\PostTypes\MediaPostType;
7
  use RebelCode\Spotlight\Instagram\Utils\Arrays;
8
  use RebelCode\Spotlight\Instagram\Wp\PostType;
9
- use WP_Post;
10
 
11
  /**
12
  * The action that cleans up old media.
@@ -55,19 +57,45 @@ class CleanUpMediaAction
55
  */
56
  public function __invoke()
57
  {
58
- $ageLimit = $this->config->get(static::CFG_AGE_LIMIT)->getValue();
59
- $ageTime = strtotime($ageLimit . ' ago');
 
 
60
 
61
- $oldMedia = $this->cpt->query([
62
- 'meta_query' => [
63
- [
64
- 'key' => MediaPostType::LAST_REQUESTED,
65
- 'compare' => '<=',
66
- 'value' => $ageTime,
 
67
  ],
68
- ],
69
- ]);
70
 
71
- Arrays::each($oldMedia, [MediaPostType::class, 'deleteMedia']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
  }
3
  namespace RebelCode\Spotlight\Instagram\Actions;
4
 
5
  use RebelCode\Spotlight\Instagram\Config\ConfigSet;
6
+ use RebelCode\Spotlight\Instagram\Engine\MediaItem;
7
+ use RebelCode\Spotlight\Instagram\Engine\Sources\StorySource;
8
+ use RebelCode\Spotlight\Instagram\Engine\Stores\WpPostMediaStore;
9
  use RebelCode\Spotlight\Instagram\PostTypes\MediaPostType;
10
  use RebelCode\Spotlight\Instagram\Utils\Arrays;
11
  use RebelCode\Spotlight\Instagram\Wp\PostType;
 
12
 
13
  /**
14
  * The action that cleans up old media.
57
  */
58
  public function __invoke()
59
  {
60
+ // Delete media according to the age limit
61
+ {
62
+ $ageLimit = $this->config->get(static::CFG_AGE_LIMIT)->getValue();
63
+ $ageTime = strtotime($ageLimit . ' ago');
64
 
65
+ $oldMedia = $this->cpt->query([
66
+ 'meta_query' => [
67
+ [
68
+ 'key' => MediaPostType::LAST_REQUESTED,
69
+ 'compare' => '<=',
70
+ 'value' => $ageTime,
71
+ ],
72
  ],
73
+ ]);
 
74
 
75
+ Arrays::each($oldMedia, [MediaPostType::class, 'deleteMedia']);
76
+ }
77
+
78
+ // Delete expired stories
79
+ {
80
+ $stories = $this->cpt->query([
81
+ 'meta_query' => [
82
+ [
83
+ 'key' => MediaPostType::IS_STORY,
84
+ 'compare' => '!=',
85
+ 'value' => '',
86
+ ],
87
+ ],
88
+ ]);
89
+
90
+ foreach ($stories as $story) {
91
+ $item = WpPostMediaStore::wpPostToItem($story, StorySource::create(''));
92
+
93
+ if (MediaItem::isExpiredStory($item)) {
94
+ MediaPostType::deleteMedia($story);
95
+ }
96
+ }
97
+ }
98
+
99
+ // end of __invoke()
100
  }
101
  }
core/Engine/Aggregation/ExpiredStoriesProcessor.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Spotlight\Instagram\Engine\Aggregation;
4
+
5
+ use RebelCode\Iris\Aggregation\ItemFeed;
6
+ use RebelCode\Iris\Aggregation\ItemProcessor;
7
+ use RebelCode\Spotlight\Instagram\Engine\MediaItem;
8
+ use RebelCode\Spotlight\Instagram\Utils\Functions;
9
+
10
+ /**
11
+ * Filters media to remove expired stories.
12
+ *
13
+ * @since 0.6
14
+ */
15
+ class ExpiredStoriesProcessor implements ItemProcessor
16
+ {
17
+ /**
18
+ * @inheritDoc
19
+ *
20
+ * @since 0.6
21
+ */
22
+ public function process(array &$items, ItemFeed $feed)
23
+ {
24
+ $items = array_filter($items, Functions::not([MediaItem::class, 'isExpiredStory']));
25
+ }
26
+ }
core/Engine/MediaItem.php CHANGED
@@ -2,6 +2,12 @@
2
 
3
  namespace RebelCode\Spotlight\Instagram\Engine;
4
 
 
 
 
 
 
 
5
  class MediaItem
6
  {
7
  // FROM INSTAGRAM API
@@ -27,4 +33,29 @@ class MediaItem
27
  const MEDIA_SIZE = 'media_size';
28
  const SOURCE_TYPE = 'source_type';
29
  const SOURCE_NAME = 'source_name';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
2
 
3
  namespace RebelCode\Spotlight\Instagram\Engine;
4
 
5
+ use DateTime;
6
+ use Exception;
7
+ use RebelCode\Iris\Item;
8
+ use RebelCode\Spotlight\Instagram\Engine\Sources\StorySource;
9
+ use RebelCode\Spotlight\Instagram\IgApi\IgMedia;
10
+
11
  class MediaItem
12
  {
13
  // FROM INSTAGRAM API
33
  const MEDIA_SIZE = 'media_size';
34
  const SOURCE_TYPE = 'source_type';
35
  const SOURCE_NAME = 'source_name';
36
+
37
+ /**
38
+ * Checks if a media instance is an expired story.
39
+ *
40
+ * @since 0.6
41
+ *
42
+ * @param Item $media The media to check.
43
+ *
44
+ * @return bool True if the story is expired, false if not. True is also returned in the post has an invalid date.
45
+ */
46
+ public static function isExpiredStory(Item $media): bool
47
+ {
48
+ if ($media->data{static::SOURCE_TYPE} !== StorySource::TYPE) {
49
+ return false;
50
+ }
51
+
52
+ try {
53
+ $datetime = new DateTime($media->data{static::TIMESTAMP});
54
+ $diff = time() - $datetime->getTimestamp();
55
+
56
+ return $diff > IgMedia::STORY_MAX_LIFE;
57
+ } catch (Exception $exception) {
58
+ return true;
59
+ }
60
+ }
61
  }
core/Engine/Stores/WpPostMediaStore.php CHANGED
@@ -107,12 +107,12 @@ class WpPostMediaStore implements ItemStore
107
 
108
  // Update the media URL if it's present in the item
109
  if (!empty($item->data[MediaItem::MEDIA_URL])) {
110
- $postData['meta_input'][MediaPostType::URL] = $item->data[MediaItem::MEDIA_URL];
111
  }
112
 
113
  // Update the like and comment counts
114
- $postData['meta_input'][MediaPostType::LIKES_COUNT] = $item->data[MediaItem::LIKES_COUNT];
115
- $postData['meta_input'][MediaPostType::COMMENTS_COUNT] = $item->data[MediaItem::COMMENTS_COUNT];
116
 
117
  // Update the comments
118
  $postData['meta_input'][MediaPostType::COMMENTS] = $item->data[MediaItem::COMMENTS]['data'] ?? [];
107
 
108
  // Update the media URL if it's present in the item
109
  if (!empty($item->data[MediaItem::MEDIA_URL])) {
110
+ $postData['meta_input'][MediaPostType::URL] = $item->data[MediaItem::MEDIA_URL] ?? '';
111
  }
112
 
113
  // Update the like and comment counts
114
+ $postData['meta_input'][MediaPostType::LIKES_COUNT] = $item->data[MediaItem::LIKES_COUNT] ?? 0;
115
+ $postData['meta_input'][MediaPostType::COMMENTS_COUNT] = $item->data[MediaItem::COMMENTS_COUNT]?? 0;
116
 
117
  // Update the comments
118
  $postData['meta_input'][MediaPostType::COMMENTS] = $item->data[MediaItem::COMMENTS]['data'] ?? [];
core/IgApi/IgMedia.php CHANGED
@@ -11,6 +11,13 @@ use DateTime;
11
  */
12
  class IgMedia
13
  {
 
 
 
 
 
 
 
14
  /**
15
  * @since 0.1
16
  *
11
  */
12
  class IgMedia
13
  {
14
+ /**
15
+ * The maximum lifetime for story media, in seconds.
16
+ *
17
+ * @since 0.6
18
+ */
19
+ const STORY_MAX_LIFE = 86400; // = 24hrs
20
+
21
  /**
22
  * @since 0.1
23
  *
core/RestApi/EndPoint.php CHANGED
@@ -16,7 +16,7 @@ class EndPoint
16
  *
17
  * @var string
18
  */
19
- protected $route;
20
 
21
  /**
22
  * The endpoint's accepted HTTP methods.
@@ -25,7 +25,7 @@ class EndPoint
25
  *
26
  * @var string[]
27
  */
28
- protected $methods;
29
 
30
  /**
31
  * The endpoint's handler.
@@ -34,7 +34,7 @@ class EndPoint
34
  *
35
  * @var callable
36
  */
37
- protected $handler;
38
 
39
  /**
40
  * The endpoint's authorization handler, if any.
@@ -43,7 +43,7 @@ class EndPoint
43
  *
44
  * @var AuthGuardInterface|null
45
  */
46
- protected $authHandler;
47
 
48
  /**
49
  * Constructor.
16
  *
17
  * @var string
18
  */
19
+ public $route;
20
 
21
  /**
22
  * The endpoint's accepted HTTP methods.
25
  *
26
  * @var string[]
27
  */
28
+ public $methods;
29
 
30
  /**
31
  * The endpoint's handler.
34
  *
35
  * @var callable
36
  */
37
+ public $handler;
38
 
39
  /**
40
  * The endpoint's authorization handler, if any.
43
  *
44
  * @var AuthGuardInterface|null
45
  */
46
+ public $authHandler;
47
 
48
  /**
49
  * Constructor.
core/RestApi/EndPoints/Settings/PatchSettingsEndpoint.php CHANGED
@@ -4,7 +4,6 @@ namespace RebelCode\Spotlight\Instagram\RestApi\EndPoints\Settings;
4
 
5
  use RebelCode\Spotlight\Instagram\Config\ConfigSet;
6
  use RebelCode\Spotlight\Instagram\RestApi\EndPoints\AbstractEndpointHandler;
7
- use RebelCode\Spotlight\Instagram\Utils\Strings;
8
  use WP_Error;
9
  use WP_REST_Request;
10
  use WP_REST_Response;
4
 
5
  use RebelCode\Spotlight\Instagram\Config\ConfigSet;
6
  use RebelCode\Spotlight\Instagram\RestApi\EndPoints\AbstractEndpointHandler;
 
7
  use WP_Error;
8
  use WP_REST_Request;
9
  use WP_REST_Response;
core/Utils/Arrays.php CHANGED
@@ -492,4 +492,28 @@ class Arrays
492
 
493
  return $array;
494
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  }
492
 
493
  return $array;
494
  }
495
+
496
+ /**
497
+ * Picks a subset of elements from an array, by keys.
498
+ *
499
+ * @since 0.6
500
+ *
501
+ * @param array $array The array.
502
+ * @param array $keys The keys to pick.
503
+ *
504
+ * @return array An array containing all elements from the original $array whose keys are present in the given
505
+ * $keys param.
506
+ */
507
+ static function pickKeys(array $array, array $keys)
508
+ {
509
+ $result = [];
510
+
511
+ foreach ($keys as $key) {
512
+ if (array_key_exists($key, $array)) {
513
+ $result[$key] = $array[$key];
514
+ }
515
+ }
516
+
517
+ return $result;
518
+ }
519
  }
core/Utils/Functions.php CHANGED
@@ -326,6 +326,22 @@ class Functions
326
  };
327
  }
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  /**
330
  * Creates a function that calls a method on the first argument, while passing any remaining arguments.
331
  *
326
  };
327
  }
328
 
329
+ /**
330
+ * Negates a function's return values.
331
+ *
332
+ * @since 0.6
333
+ *
334
+ * @param callable $fn The function whose return values will be negated.
335
+ *
336
+ * @return callable A function that calls the given $fn and returns the negation of its returned values.
337
+ */
338
+ public static function not(callable $fn): callable
339
+ {
340
+ return function (...$args) use ($fn) {
341
+ return !static::call($fn, $args);
342
+ };
343
+ }
344
+
345
  /**
346
  * Creates a function that calls a method on the first argument, while passing any remaining arguments.
347
  *
core/Wp/Asset.php CHANGED
@@ -27,28 +27,28 @@ class Asset
27
  *
28
  * @var int
29
  */
30
- protected $type;
31
 
32
  /**
33
  * @since 0.1
34
  *
35
  * @var string
36
  */
37
- protected $url;
38
 
39
  /**
40
  * @since 0.1
41
  *
42
  * @var string[]
43
  */
44
- protected $deps;
45
 
46
  /**
47
  * @since 0.1
48
  *
49
  * @var string|null
50
  */
51
- protected $ver;
52
 
53
  /**
54
  * Constructor.
27
  *
28
  * @var int
29
  */
30
+ public $type;
31
 
32
  /**
33
  * @since 0.1
34
  *
35
  * @var string
36
  */
37
+ public $url;
38
 
39
  /**
40
  * @since 0.1
41
  *
42
  * @var string[]
43
  */
44
+ public $deps;
45
 
46
  /**
47
  * @since 0.1
48
  *
49
  * @var string|null
50
  */
51
+ public $ver;
52
 
53
  /**
54
  * Constructor.
engine/Http/ItemResource.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Iris\Http;
4
+
5
+ /**
6
+ * Represents a remote resource from which items can be requested.
7
+ *
8
+ * @since [*next-version*]
9
+ */
10
+ class ItemResource
11
+ {
12
+ /**
13
+ * @since [*next-version*]
14
+ *
15
+ * @var string
16
+ */
17
+ public $uri;
18
+ /**
19
+ * @since [*next-version*]
20
+ *
21
+ * @var array
22
+ */
23
+ public $args;
24
+
25
+ /**
26
+ * Constructor.
27
+ *
28
+ * @since [*next-version*]
29
+ *
30
+ * @param string $uri The URI of the resource.
31
+ * @param array $args Any additional request arguments that are required to obtain the resource from the URI.
32
+ */
33
+ public function __construct(string $uri, array $args = [])
34
+ {
35
+ $this->uri = $uri;
36
+ $this->args = $args;
37
+ }
38
+ }
engine/Source.php CHANGED
@@ -101,7 +101,7 @@ class Source
101
  *
102
  * @return self The created source.
103
  */
104
- public static function auto(string $type, array $data = []) : self
105
  {
106
  ksort($data);
107
  $hashData = compact('type', 'data');
@@ -109,4 +109,40 @@ class Source
109
 
110
  return new static($hash, $type, $data);
111
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
101
  *
102
  * @return self The created source.
103
  */
104
+ public static function auto(string $type, array $data = []): self
105
  {
106
  ksort($data);
107
  $hashData = compact('type', 'data');
109
 
110
  return new static($hash, $type, $data);
111
  }
112
+
113
+ /**
114
+ * Converts a source into an array.
115
+ *
116
+ * @since [*next-version*]
117
+ *
118
+ * @param Source $source The source instance.
119
+ *
120
+ * @return array The array, containing the "type", "key" and "data".
121
+ */
122
+ public static function toArray(Source $source): array
123
+ {
124
+ return [
125
+ 'type' => $source->type,
126
+ 'key' => $source->key,
127
+ 'data' => $source->data,
128
+ ];
129
+ }
130
+
131
+ /**
132
+ * Creates a source from an array.
133
+ *
134
+ * @since [*next-version*]
135
+ *
136
+ * @param array $array The array.
137
+ *
138
+ * @return Source The created source.
139
+ */
140
+ public static function fromArray(array $array): Source
141
+ {
142
+ return new static(
143
+ $array['key'] ?? '',
144
+ $array['type'] ?? '',
145
+ $array['data'] ?? []
146
+ );
147
+ }
148
  }
includes/admin.php ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ use RebelCode\Spotlight\Instagram\Utils\Arrays;
4
+ use RebelCode\Spotlight\Instagram\Wp\Asset;
5
+
6
+ if (!current_user_can('manage_options')) {
7
+ global $wp_query;
8
+ $wp_query->set_404();
9
+ status_header(404);
10
+ get_template_part(404);
11
+
12
+ exit;
13
+ }
14
+
15
+ global $wp_version;
16
+ global $wp_scripts;
17
+ global $wp_styles;
18
+
19
+ $siteUrl = get_site_url();
20
+ $pageUrl = $siteUrl . '/spotlight/';
21
+
22
+ $c = spotlightInsta();
23
+ $renderFn = $c->get('ui/main_page/render_fn');
24
+
25
+ do_action('spotlight/instagram/localize_config');
26
+
27
+ define('WP_ADMIN', true);
28
+
29
+ {
30
+ wp_default_styles($wp_styles);
31
+ wp_default_scripts($wp_scripts);
32
+ wp_enqueue_media();
33
+ wp_enqueue_editor();
34
+
35
+ // WP SCRIPTS
36
+ $scripts = [];
37
+ resolveAssets($wp_scripts, $scripts, [
38
+ 'jquery-core',
39
+ 'jquery-migrate',
40
+ 'utils',
41
+ 'wp-i18n',
42
+ 'common',
43
+ 'admin-bar',
44
+ 'svg-painter',
45
+ 'wp-color-picker',
46
+ 'wp-auth-check',
47
+ 'jquery-ui-draggable',
48
+ 'heartbeat',
49
+ 'jquery-ui-slider',
50
+ 'jquery-touch-punch',
51
+ 'wp-util',
52
+ 'wp-backbone',
53
+ 'media-editor',
54
+ 'wp-media-modals',
55
+ 'wp-mediaelement',
56
+ 'media-audiovideo',
57
+ 'clipboard',
58
+ 'mce-view',
59
+ 'imgareaselect',
60
+ 'image-edit',
61
+ 'wp-dom-ready',
62
+ 'wp-a11y',
63
+ 'sli-admin',
64
+ 'sli-admin-pro',
65
+ ]);
66
+
67
+ $styles = [];
68
+ resolveAssets($wp_styles, $styles, [
69
+ 'dashicons',
70
+ 'common',
71
+ 'forms',
72
+ 'dashboard',
73
+ 'media',
74
+ 'buttons',
75
+ 'wp-color-picker',
76
+ 'media-views',
77
+ 'imgareaselect',
78
+ 'sli-admin',
79
+ 'sli-admin-pro',
80
+ ]);
81
+
82
+ [$headerScripts, $footerScripts] = separateScripts($scripts);
83
+
84
+ $stylesHtml = implode("\n", Arrays::map($styles, 'renderStyleTag'));
85
+ $headerScriptsHtml = implode("\n", Arrays::map($headerScripts, 'renderScriptTag'));
86
+ $footerScriptsHtml = implode("\n", Arrays::map($footerScripts, 'renderScriptTag'));
87
+ }
88
+
89
+ ?>
90
+ <!doctype html>
91
+ <html lang="en">
92
+ <head>
93
+ <title>Spotlight</title>
94
+ <?= $stylesHtml ?>
95
+ <?= $headerScriptsHtml ?>
96
+ <?php do_action('admin_head'); ?>
97
+
98
+ <style type="text/css">
99
+ .spotlight-wrap {
100
+ position: fixed;
101
+ top: 42px;
102
+ bottom: 0;
103
+ left: 0;
104
+ right: 0;
105
+ }
106
+ .wp-submenu {
107
+ position: fixed;
108
+ top: 0;
109
+ left: 0;
110
+ right: 0;
111
+ height: 42px;
112
+ padding: 8px 10px;
113
+ margin: 0 !important;
114
+ box-sizing: border-box;
115
+
116
+ display: flex;
117
+ flex-direction: row;
118
+ justify-content: center;
119
+ align-items: center;
120
+
121
+ background: #fff;
122
+ border-bottom: 1px solid var(--sli-line-color);
123
+ list-style: none;
124
+ z-index: 99999;
125
+ }
126
+
127
+ .wp-submenu li {
128
+ flex: 0;
129
+ display: inline-block;
130
+ white-space: nowrap;
131
+ padding: 5px 8px;
132
+ list-style: none;
133
+ }
134
+
135
+ .wp-submenu li:not(:last-of-type) {
136
+ margin-right: 10px;
137
+ }
138
+ </style>
139
+ </head>
140
+ <body class="wp-admin wp-core-ui js toplevel_page_spotlight-instagram branch-5-6 version-5-6-2 admin-color-fresh locale-en-us customize-support">
141
+ <div class="spotlight-wrap">
142
+ <?= $renderFn() ?>
143
+ <?= $footerScriptsHtml ?>
144
+ <?php do_action('admin_footer'); ?>
145
+ </div>
146
+
147
+ <div id="toplevel_page_spotlight-instagram">
148
+ <ul class="wp-submenu">
149
+ <li><a href="<?= $pageUrl ?>?screen=feeds">Feeds</a></li>
150
+ <li><a href="<?= $pageUrl ?>?screen=new">Add new</a></li>
151
+ <li><a href="<?= $pageUrl ?>?screen=promotions">Promotions</a></li>
152
+ <li><a href="<?= $pageUrl ?>?screen=settings">Settings</a></li>
153
+ </ul>
154
+ </div>
155
+ </body>
156
+ </html>
157
+ <?php
158
+
159
+ /**
160
+ * @since 0.6
161
+ *
162
+ * @param WP_Dependencies $repo
163
+ * @param array $list
164
+ * @param string[] $handles
165
+ */
166
+ function resolveAssets(WP_Dependencies $repo, array &$list, array $handles)
167
+ {
168
+ foreach ($handles as $handle) {
169
+ if (array_key_exists($handle, $repo->registered)) {
170
+ $asset = $repo->registered[$handle];
171
+
172
+ if (count($asset->deps) > 0) {
173
+ resolveAssets($repo, $list, $asset->deps);
174
+ }
175
+
176
+ if (!array_key_exists($handle, $list)) {
177
+ $list[$handle] = $asset;
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ /**
184
+ * @since 0.6
185
+ *
186
+ * @param _WP_Dependency[] $scripts
187
+ *
188
+ * @return array
189
+ */
190
+ function separateScripts(array $scripts): array
191
+ {
192
+ $header = [];
193
+ $footer = [];
194
+
195
+ foreach ($scripts as $handle => $script) {
196
+ $group = $script->extra['group'] ?? 0;
197
+
198
+ if ($group === 1) {
199
+ $footer[] = $script;
200
+ } else {
201
+ $header[] = $script;
202
+ }
203
+ }
204
+
205
+ return [$header, $footer];
206
+ }
207
+
208
+ /**
209
+ * @since 0.6
210
+ *
211
+ * @param _WP_Dependency $asset
212
+ *
213
+ * @return string
214
+ */
215
+ function getAssetUri(_WP_Dependency $asset): string
216
+ {
217
+ if (empty($asset->src)) {
218
+ return '';
219
+ }
220
+
221
+ global $wp_version;
222
+
223
+ $ver = empty($asset->ver)
224
+ ? $wp_version
225
+ : $asset->ver;
226
+
227
+ return $asset->src . '?ver=' . $ver;
228
+ }
229
+
230
+ /**
231
+ * @since 0.6
232
+ *
233
+ * @param string $uri
234
+ * @param int $type
235
+ *
236
+ * @return string
237
+ */
238
+ function resolveRelativeUri(string $uri, int $type): string
239
+ {
240
+ global $wp_scripts;
241
+ global $wp_styles;
242
+
243
+ $repo = ($type === Asset::SCRIPT) ? $wp_scripts : $wp_styles;
244
+
245
+ return (strpos($uri, '/') === 0)
246
+ ? $repo->base_url . $uri
247
+ : $uri;
248
+ }
249
+
250
+ /**
251
+ * @since 0.6
252
+ *
253
+ * @param _WP_Dependency $script
254
+ *
255
+ * @return string
256
+ */
257
+ function renderScriptTag(_WP_Dependency $script): string
258
+ {
259
+ $uri = getAssetUri($script);
260
+ $uri = resolveRelativeUri($uri, Asset::SCRIPT);
261
+
262
+ $html = '';
263
+
264
+ // ADD L10N
265
+ if (!empty($script->extra['data'])) {
266
+ $html .= sprintf(
267
+ '<script id="%s-js-extra">%s</script>',
268
+ $script->handle,
269
+ $script->extra['data']
270
+ );
271
+ }
272
+
273
+ if (!empty($uri)) {
274
+ $html .= sprintf(
275
+ '<script id="%s-js" type="text/javascript" src="%s"></script>',
276
+ $script->handle,
277
+ esc_attr($uri)
278
+ );
279
+ }
280
+
281
+ return $html;
282
+ }
283
+
284
+ /**
285
+ * @since 0.6
286
+ *
287
+ * @param _WP_Dependency $style
288
+ *
289
+ * @return string
290
+ */
291
+ function renderStyleTag(_WP_Dependency $style): string
292
+ {
293
+ $uri = getAssetUri($style);
294
+ $uri = resolveRelativeUri($uri, Asset::STYLE);
295
+
296
+ return empty($uri)
297
+ ? ''
298
+ : sprintf(
299
+ '<link id="%s-css" rel="stylesheet" href="%s" media="%s" />',
300
+ $style->handle,
301
+ esc_attr($uri),
302
+ esc_attr($style->args)
303
+ );
304
+ }
includes/init.php CHANGED
@@ -1,9 +1,29 @@
1
  <?php
2
 
 
 
3
  if (!defined('SL_INSTA_FREE_PLUGIN_BASENAME')) {
4
  define('SL_INSTA_FREE_PLUGIN_BASENAME', 'spotlight-social-photo-feeds/plugin.php');
5
  }
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  if (!class_exists('SlInstaRuntime')) {
8
  /**
9
  * A simple struct that stores runtime information about active copies of the plugin.
1
  <?php
2
 
3
+ use RebelCode\Spotlight\Instagram\Plugin;
4
+
5
  if (!defined('SL_INSTA_FREE_PLUGIN_BASENAME')) {
6
  define('SL_INSTA_FREE_PLUGIN_BASENAME', 'spotlight-social-photo-feeds/plugin.php');
7
  }
8
 
9
+ if (!function_exists('spotlightInsta')) {
10
+ /**
11
+ * Retrieves the plugin instance.
12
+ *
13
+ * @since 0.2
14
+ *
15
+ * @return Plugin
16
+ */
17
+ function spotlightInsta()
18
+ {
19
+ static $instance = null;
20
+
21
+ return ($instance === null)
22
+ ? $instance = new Plugin(__DIR__ . '/../plugin.php')
23
+ : $instance;
24
+ }
25
+ }
26
+
27
  if (!class_exists('SlInstaRuntime')) {
28
  /**
29
  * A simple struct that stores runtime information about active copies of the plugin.
modules/Dev/DevModule.php CHANGED
@@ -119,5 +119,23 @@ class DevModule extends Module
119
  add_action('spotlight/instagram/init', $c->get('delete_media'));
120
  // Listen for log clear requests
121
  add_action('spotlight/instagram/init', $c->get('clear_log'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  }
123
  }
119
  add_action('spotlight/instagram/init', $c->get('delete_media'));
120
  // Listen for log clear requests
121
  add_action('spotlight/instagram/init', $c->get('clear_log'));
122
+
123
+ {
124
+ add_action('init', function () {
125
+ add_rewrite_rule('^spotlight/?\??(.*)', 'index.php?sli-admin=1&$matches[1]', 'top');
126
+ });
127
+
128
+ add_filter('query_vars', function ($vars) {
129
+ $vars[] = 'sli-admin';
130
+
131
+ return $vars;
132
+ });
133
+
134
+ add_filter('template_include', function ($template) use ($c) {
135
+ return get_query_var('sli-admin', false)
136
+ ? $c->get('plugin/dir') . '/includes/admin.php'
137
+ : $template;
138
+ });
139
+ }
140
  }
141
  }
modules/Dev/ServiceTree.php CHANGED
@@ -274,9 +274,8 @@ class ServiceTree
274
  }
275
 
276
  $sProps = $ref->getStaticProperties();
277
- foreach ($sProps as $prop) {
278
- $prop->setAccessible(true);
279
- $results['static ' . $prop->getName()] = self::buildValue($prop->getValue(), $depth - 1);
280
  }
281
 
282
  return $results;
274
  }
275
 
276
  $sProps = $ref->getStaticProperties();
277
+ foreach ($sProps as $key => $val) {
278
+ $results['[static] ' . $key] = self::buildValue($val, $depth - 1);
 
279
  }
280
 
281
  return $results;
modules/EngineModule.php CHANGED
@@ -11,6 +11,7 @@ use RebelCode\Iris\Aggregation\ItemAggregator;
11
  use RebelCode\Iris\Engine;
12
  use RebelCode\Iris\Fetching\DelegateItemProvider;
13
  use RebelCode\Iris\Importing\ItemImporter;
 
14
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaSorterProcessor;
15
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaStorySegregator;
16
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaTransformer;
@@ -118,12 +119,16 @@ class EngineModule extends Module
118
 
119
  // The item processors to use in the aggregator
120
  'aggregator/processors' => new ServiceList([
 
121
  'aggregator/processors/sorter',
122
  ]),
123
 
124
  // The aggregator processor that sorts media according to a feed's options
125
  'aggregator/processors/sorter' => new Constructor(MediaSorterProcessor::class),
126
 
 
 
 
127
  // The item transformer to use in the aggregator
128
  'aggregator/transformer' => new Constructor(MediaTransformer::class),
129
 
11
  use RebelCode\Iris\Engine;
12
  use RebelCode\Iris\Fetching\DelegateItemProvider;
13
  use RebelCode\Iris\Importing\ItemImporter;
14
+ use RebelCode\Spotlight\Instagram\Engine\Aggregation\ExpiredStoriesProcessor;
15
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaSorterProcessor;
16
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaStorySegregator;
17
  use RebelCode\Spotlight\Instagram\Engine\Aggregation\MediaTransformer;
119
 
120
  // The item processors to use in the aggregator
121
  'aggregator/processors' => new ServiceList([
122
+ 'aggregator/processors/expired_media_filter',
123
  'aggregator/processors/sorter',
124
  ]),
125
 
126
  // The aggregator processor that sorts media according to a feed's options
127
  'aggregator/processors/sorter' => new Constructor(MediaSorterProcessor::class),
128
 
129
+ // The aggregator processor that filters out expired media
130
+ 'aggregator/processors/expired_media_filter' => new Constructor(ExpiredStoriesProcessor::class),
131
+
132
  // The item transformer to use in the aggregator
133
  'aggregator/transformer' => new Constructor(MediaTransformer::class),
134
 
modules/RestApiModule.php CHANGED
@@ -430,5 +430,20 @@ class RestApiModule extends Module
430
  $manager = $c->get('manager');
431
  $manager->register();
432
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  }
434
  }
430
  $manager = $c->get('manager');
431
  $manager->register();
432
  });
433
+
434
+ // Whitelist Spotlight's REST API endpoints with the "JWT Auth" plugin
435
+ // https://wordpress.org/plugins/jwt-auth/
436
+ add_filter('jwt_auth_whitelist', function ($whitelist) use ($c) {
437
+ $whitelist[] = '/' . rest_get_url_prefix() . '/' . $c->get('namespace') . '/*';
438
+
439
+ return $whitelist;
440
+ });
441
+
442
+ // Add the public nonce header to the allowed CORS header list
443
+ add_filter('rest_allowed_cors_headers', function ($headers) use ($c) {
444
+ $headers[] = $c->get('auth/public/nonce_header');
445
+
446
+ return $headers;
447
+ });
448
  }
449
  }
modules/UiModule.php CHANGED
@@ -167,8 +167,12 @@ class UiModule extends Module
167
  // The styles
168
  'styles' => new Factory(['styles_url', 'static_url', 'assets_ver'], function ($url, $static, $ver) {
169
  return [
 
 
170
  // Styles for the common bundle
171
- 'sli-common' => Asset::style("{$url}/common.css", $ver),
 
 
172
  // Styles shared by all admin bundles
173
  'sli-admin-common' => Asset::style("{$url}/admin-common.css", $ver, [
174
  'sli-common',
167
  // The styles
168
  'styles' => new Factory(['styles_url', 'static_url', 'assets_ver'], function ($url, $static, $ver) {
169
  return [
170
+ // Styles from vendors
171
+ 'sli-vendors' => Asset::style("{$url}/vendors.css", $ver),
172
  // Styles for the common bundle
173
+ 'sli-common' => Asset::style("{$url}/common.css", $ver, [
174
+ 'sli-vendors'
175
+ ]),
176
  // Styles shared by all admin bundles
177
  'sli-admin-common' => Asset::style("{$url}/admin-common.css", $ver, [
178
  'sli-common',
plugin.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "name": "Spotlight - Social Media Feeds",
3
  "description": "Easily embed beautiful Instagram feeds on your WordPress site.",
4
- "version": "0.5.4",
5
  "url": "https://spotlightwp.com",
6
  "author": "RebelCode",
7
  "authorUrl": "https://rebelcode.com",
1
  {
2
  "name": "Spotlight - Social Media Feeds",
3
  "description": "Easily embed beautiful Instagram feeds on your WordPress site.",
4
+ "version": "0.6",
5
  "url": "https://spotlightwp.com",
6
  "author": "RebelCode",
7
  "authorUrl": "https://rebelcode.com",
plugin.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * Plugin Name: Spotlight - Social Media Feeds
7
  * Description: Easily embed beautiful Instagram feeds on your WordPress site.
8
- * Version: 0.5.4
9
  * Author: RebelCode
10
  * Plugin URI: https://spotlightwp.com
11
  * Author URI: https://rebelcode.com
@@ -14,8 +14,6 @@
14
  *
15
  */
16
 
17
- use RebelCode\Spotlight\Instagram\Plugin;
18
-
19
  // If not running within a WordPress context, or the plugin is already running, stop
20
  if (!defined('ABSPATH')) {
21
  exit;
@@ -57,7 +55,7 @@ slInstaRunPlugin(__FILE__, function (SlInstaRuntime $sli) {
57
  // The plugin name
58
  define('SL_INSTA_NAME', 'Spotlight - Social Media Feeds');
59
  // The plugin version
60
- define('SL_INSTA_VERSION', '0.5.4');
61
  // The path to the plugin's main file
62
  define('SL_INSTA_FILE', __FILE__);
63
  // The dir to the plugin's directory
@@ -134,22 +132,6 @@ slInstaRunPlugin(__FILE__, function (SlInstaRuntime $sli) {
134
  require_once __DIR__ . '/includes/pro.php';
135
  }
136
 
137
- /**
138
- * Retrieves the plugin instance.
139
- *
140
- * @since 0.2
141
- *
142
- * @return Plugin
143
- */
144
- function spotlightInsta()
145
- {
146
- static $instance = null;
147
-
148
- return ($instance === null)
149
- ? $instance = new Plugin(__FILE__)
150
- : $instance;
151
- }
152
-
153
  // Run the plugin's modules
154
  add_action('plugins_loaded', function () {
155
  try {
5
  *
6
  * Plugin Name: Spotlight - Social Media Feeds
7
  * Description: Easily embed beautiful Instagram feeds on your WordPress site.
8
+ * Version: 0.6
9
  * Author: RebelCode
10
  * Plugin URI: https://spotlightwp.com
11
  * Author URI: https://rebelcode.com
14
  *
15
  */
16
 
 
 
17
  // If not running within a WordPress context, or the plugin is already running, stop
18
  if (!defined('ABSPATH')) {
19
  exit;
55
  // The plugin name
56
  define('SL_INSTA_NAME', 'Spotlight - Social Media Feeds');
57
  // The plugin version
58
+ define('SL_INSTA_VERSION', '0.6');
59
  // The path to the plugin's main file
60
  define('SL_INSTA_FILE', __FILE__);
61
  // The dir to the plugin's directory
132
  require_once __DIR__ . '/includes/pro.php';
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  // Run the plugin's modules
136
  add_action('plugins_loaded', function () {
137
  try {
readme.txt CHANGED
@@ -5,73 +5,76 @@ Plugin URI: https://spotlightwp.com
5
  Tags: Instagram, Instagram feed, Instagram feeds, Instagram widget, Instagram embed, social media, social media feed, social media feeds, Instagram posts, Instagram gallery, Instagram stories, hashtag
6
  Requires at least: 5.0
7
  Requires PHP: 7.1
8
- Tested up to: 5.6
9
- Stable tag: 0.5.4
10
  License: GPLv3
11
 
 
 
12
  == Description ==
13
 
14
- **The best no-code Instagram feed solution for your website.** Connect multiple Instagram accounts and create unlimited Instagram feeds to embed across your website. A simple way to share your Instagram content with the world in a beautiful gallery.
15
 
16
- [**Instagram Feed Demos**](https://spotlightwp.com/demo/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topdemos) | [Compare Free vs PRO](https://spotlightwp.com/features/compare-free-vs-pro/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topcomparecta) | [Buy Spotlight PRO](https://spotlightwp.com/pricing/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topbuypro)
17
 
18
- == Embed any Instagram feed in under 2 minutes ==
19
 
20
  Follow **3 simple steps** from start to finish:
21
 
22
- 1. Connect an [Instagram](https://www.instagram.com/) account/s.
23
  2. Design your Instagram feed's look.
24
  3. Add it to any **page, sidebar, footer, post, etc**.
25
 
26
- No coding or complex shortcodes required. Check out the 2-minute video below for a quick overview of how to embed Instagram feeds on any WordPress site.
27
 
28
- https://www.youtube.com/watch?v=tpQFrU5w7G8&feature=emb_title
29
 
30
  == Free Features ==
31
 
32
  - Connect one or **multiple Instagram accounts**.
33
- - Combine multiple Instagram accounts into a single gallery.
34
  - Create **unlimited Instagram feeds** to use across your site.
35
- - **Beautiful grid layout** instantly provided.
36
  - **Customise the design**, including padding and font sizes.
37
- - **Order posts** by date, popularity, or at random.
38
  - Change the **number of columns** in the feed.
39
- - Change the **number of posts** shown in the feed.
40
- - Change the **size of the feed**'s photos or leave it to automatically take up the area it is added to.
41
- - **Free popup lightbox** to show full-size photos and playable videos directly on your website. Keep everyone engaged.
42
- - Add a **stylish feed header** with the Instagram account's profile bio and avatar.
43
  - Add a **custom bio text and profile photo** per account or feed.
44
  - Set custom text and colours for the **“Follow” button**.
45
  - Set custom text and colours for the **“Load More” button**.
46
  - Show or hide the feed header, "Follow" button", and "Load More" button.
47
- - Uses your theme's fonts and styles to blend in automatically.
48
- - The entire feed is **responsive** and customisable per device.
49
- - **Embed on any page, post, footer or sidebar** using our block, widget and shortcode.
50
- - **BONUS: Live interactive preview** to see exactly what you're designing before embedding it anywhere on your site.
 
51
 
52
- **For Agencies and Developers**: Spotlight provides an [Access Token Generator](https://spotlightwp.com/access-token-generator/) so clients won't need to share personal login details with you.
53
 
54
  == Why Instagram Feeds? Top 3 Benefits: ==
55
 
56
  **1. Create Connections and Increase Engagement**
57
- Boost the social engagement on your website and increase your Instagram follower count. Add a "Follow" button to your Instagram gallery to turn site visitors into Instagram followers.
58
 
59
- **2. Add Social Proof With Minimal Effort**
60
- Instagram is a great platform for building relationships. Make the most of it by sharing your existing Instagram photos, videos, likes and comments with website visitors. Instant social proof to last a lifetime.
61
 
62
- **3. Automatically Updated Fresh Content - A Time-Saver!**
63
- As you post new photos and videos to Instagram, Spotlight adds them to your website. Keep your site looking fresh and current without having to create separate content for it.
64
 
65
- **Bonus! Enhance your "Coming soon" and "Maintenance" Pages**
66
  Make your "Coming Soon" and "Maintenance" pages stand out by embedding an Instagram feed. Turn those otherwise lost site visitors into Instagram followers to **generate new leads**.
67
 
68
- == Why Choose Spotlight? ==
69
 
70
  **1. Easy to Use**
71
- From connecting your first Instagram account to having it embedded on your website in under 2 minutes. Even less if you use the default settings.
72
 
73
  **2. Fun to Set Up**
74
- Gone are the days of long settings pages, complex shortcodes and having to embed a feed first before seeing what it looks like. With Spotlight you do all that in a beautiful live preview editor with point-and-click options.
75
 
76
  **3. Fast and Helpful Support**
77
  Spotlight is designed, developed and supported by Mark, Miguel and Gaby. We provide support for both the free and PRO versions of Spotlight and develop new features on a monthly basis. Whenever you have a question, we're here for you.
@@ -110,20 +113,25 @@ Watch a full [Spotlight PRO](https://spotlightwp.com/pricing/?utm_source=readme&
110
 
111
  https://www.youtube.com/watch?v=FaOoCzxHpgw
112
 
113
- == More Recommendations ==
 
 
114
 
115
  **Real User Reviews**
116
 
117
- - "If you're ready to **start nailing the BIG 3 C's of having a website**, that is building credibility, staying current, and having a better connection with your website visitors, check out Spotlight Instagram feeds today."
118
- Adam, WP Crafter Youtube Channel
119
- - "**Out of all of the Instagram integration plugins out there, this is one that I would by far recommend the most.** The plugin itself is easy to use for anyone especially a beginner."
120
- Tim, Spotlight Free User
121
- - "Excellent, Powerful, Smooth - **This is an incredible plugin and the support given is second to none** they will stop at nothing to help you solve your problems. Thank you!"
122
- Forson, Spotlight Free User
123
- - I’ve used other Instagram feed plugins before and this one is the best! **Very happy with this PRO upgrade purchase.** Keep up the great work!!
124
- Rommel, Spotlight PRO customer
 
 
 
125
 
126
- **Featured In Various Publications**:
127
 
128
  - Hubspot: [Top 3 Free Instagram Plugins for WordPress](https://blog.hubspot.com/website/top-free-instagram-plugins-wordpress-site)
129
  - Elementor: [Best Instagram Plugins for WordPress](https://elementor.com/blog/best-instagram-plugins-wordpress/)
@@ -135,6 +143,10 @@ Rommel, Spotlight PRO customer
135
  - aThemes: [Best WordPress Instagram Plugins 2020](https://athemes.com/collections/best-wordpress-instagram-plugins/)
136
  - WPExplorer: [How to Add Instagram Photos to WordPress](https://www.wpexplorer.com/add-instagram-wordpress/)
137
 
 
 
 
 
138
  == Installation ==
139
 
140
  = Installation Method 1 =
@@ -252,11 +264,21 @@ There are a few reasons that this may happen. We have documented the reasons and
252
  3. Connect multiple Instagram accounts - Personal and Business.
253
  4. Design your Instagram feed in our live preview customizer.
254
  5. Fully responsive and customisable per device.
255
- 6. A hashtag feed using the Highlight layout. [Requires PRO]
256
- 7. Sell WooCommerce products through your Instagram feed. [Requires PRO]
257
 
258
  == Changelog ==
259
 
 
 
 
 
 
 
 
 
 
 
260
  = 0.5.4 (2021-02-11) =
261
 
262
  **Changed**
5
  Tags: Instagram, Instagram feed, Instagram feeds, Instagram widget, Instagram embed, social media, social media feed, social media feeds, Instagram posts, Instagram gallery, Instagram stories, hashtag
6
  Requires at least: 5.0
7
  Requires PHP: 7.1
8
+ Tested up to: 5.7
9
+ Stable tag: 0.6
10
  License: GPLv3
11
 
12
+ Instagram feeds for your WordPress site. A simple no-code solution to connect your Instagram account, design responsive feeds, and embed them anywhere you want.
13
+
14
  == Description ==
15
 
16
+ **Embed your [Instagram](https://www.instagram.com/) feed anywhere on your website.** Connect your Instagram account and design unlimited photo and video galleries to embed across your website. A simple no-code solution to sharing your Instagram content with the world in a beautiful gallery.
17
 
18
+ [**Spotlight Instagram Demos**](https://spotlightwp.com/demo/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topdemos) | [Compare Free vs PRO](https://spotlightwp.com/features/compare-free-vs-pro/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topcomparecta) | [Spotlight PRO](https://spotlightwp.com/pricing/?utm_source=readme&utm_medium=readme_desc&utm_campaign=readme_desc_topbuypro)
19
 
20
+ == Embed your Instagram feed in under 2 minutes ==
21
 
22
  Follow **3 simple steps** from start to finish:
23
 
24
+ 1. Connect your [Instagram](https://www.instagram.com/) account.
25
  2. Design your Instagram feed's look.
26
  3. Add it to any **page, sidebar, footer, post, etc**.
27
 
28
+ No coding or complex shortcodes required. Check out the 2-minute video below for a quick overview of how to embed your Instagram feed on any WordPress site.
29
 
30
+ https://www.youtube.com/watch?v=tpQFrU5w7G8
31
 
32
  == Free Features ==
33
 
34
  - Connect one or **multiple Instagram accounts**.
35
+ - Combine multiple Instagram accounts in a single gallery.
36
  - Create **unlimited Instagram feeds** to use across your site.
37
+ - **Grid layout** with various design options.
38
  - **Customise the design**, including padding and font sizes.
39
+ - **Order Instagram posts** by date, popularity, or at random.
40
  - Change the **number of columns** in the feed.
41
+ - Change the **number of Instagram posts** shown in the feed.
42
+ - Change the **size of the Instagram feed** or have it to automatically take up any area it is embedded into.
43
+ - **Popup lightbox** on click to display full-size photos and playable videos directly on your website.
44
+ - **Feed header** with your Instagram account's avatar and bio.
45
  - Add a **custom bio text and profile photo** per account or feed.
46
  - Set custom text and colours for the **“Follow” button**.
47
  - Set custom text and colours for the **“Load More” button**.
48
  - Show or hide the feed header, "Follow" button", and "Load More" button.
49
+ - Applies your theme's fonts and styles to blend in automatically.
50
+ - 100% **responsive** Instagram feed, customisable per device.
51
+ - **Embed Instagram feeds on any page, post, footer or sidebar** using our Instagram block, widget and shortcode.
52
+
53
+ **PLUS: Live interactive preview** to see exactly what you're designing before embedding it anywhere on your site.
54
 
55
+ **Agencies and Developers**: Spotlight provides an [Access Token Generator](https://spotlightwp.com/access-token-generator/) so clients won't need to share Instagram login details.
56
 
57
  == Why Instagram Feeds? Top 3 Benefits: ==
58
 
59
  **1. Create Connections and Increase Engagement**
60
+ Boost social engagement on your website and increase your Instagram follower count. Add a "Follow on Instagram" button to your Instagram feed to turn site visitors into followers.
61
 
62
+ **2. Add Social Proof**
63
+ Instagram is a great platform for building relationships. Make the most of it by sharing your existing Instagram photos, videos, likes and comments with website visitors. Instant social proof in minutes.
64
 
65
+ **3. A Time-Saver!**
66
+ As you post new photos and videos to Instagram, Spotlight displays them on your website. Keep your site content looking fresh and updated by simply posting new content once to Instagram.
67
 
68
+ **BONUS: Enhance your "Coming soon" and "Maintenance" Pages**
69
  Make your "Coming Soon" and "Maintenance" pages stand out by embedding an Instagram feed. Turn those otherwise lost site visitors into Instagram followers to **generate new leads**.
70
 
71
+ == Why Choose Spotlight Instagram Feeds? ==
72
 
73
  **1. Easy to Use**
74
+ From connecting your first Instagram account to displaying an Instagram feed on your website in under 2 minutes.
75
 
76
  **2. Fun to Set Up**
77
+ A simple live preview customiser to see all the changes you make right in your dashboard. Forget setting up Instagram feeds using complex shortcodes or long lists of settings before even seeing the result. Simply point and click.
78
 
79
  **3. Fast and Helpful Support**
80
  Spotlight is designed, developed and supported by Mark, Miguel and Gaby. We provide support for both the free and PRO versions of Spotlight and develop new features on a monthly basis. Whenever you have a question, we're here for you.
113
 
114
  https://www.youtube.com/watch?v=FaOoCzxHpgw
115
 
116
+ == Testimonials - "The Best Instagram Plugin" ==
117
+
118
+ Spotlight helps thousands of WordPress site owners add Instagram feeds to their websites. There's a reason many people are switching from other Instagram feed plugins to Spotlight
119
 
120
  **Real User Reviews**
121
 
122
+ - "You don’t need to mess around, **styling is easy and it looks good with minimal effort**. Excellent work!" - [Jennifer Line](https://wordpress.org/support/topic/excellent-plugin-6797/)
123
+
124
+ - "If you're ready to start nailing the BIG 3 C's of having a website, that is **building credibility, staying current, and having a better connection with your website visitors**, check out Spotlight Instagram feeds today." - [Adam @ WP Crafter](https://wordpress.org/support/topic/the-best-instagram-plugin-3/)
125
+
126
+ - "I used to struggle with all sorts of crappy Instagram plugins until I found this one! **The customization in unparalleled** and when I stumbled into a weird glitch (because of an error I made) their tech-support help me solve it. Love you guys <3 thank you!" - [Rogue Media Group](https://wordpress.org/support/topic/best-instagram-plugin-service/)
127
+
128
+ - "**I loved this so much I upgraded to the Pro version.** It was everything I was wishing for for years! Super easy to set up and the documentation is great. Support is also very responsive." - [Espressivo](https://wordpress.org/support/topic/works-great-7476/)
129
+
130
+ - "This plugin strongly helps me to **increase the interaction on my Instagram account from my website**. I didn’t need to watch 100 tutorials to be able to handle the plugin correctly." - [Michael Kihl](https://wordpress.org/support/topic/the-best-ig-flow/)
131
+
132
+ - "After fiddling with a couple of other plugin options for IG feeds, **I installed Spotlight and had it working in seconds**." - [Dave Von Bieker](https://wordpress.org/support/topic/clean-modern-design-and-great-support/)
133
 
134
+ **Recommended By Top Publications**:
135
 
136
  - Hubspot: [Top 3 Free Instagram Plugins for WordPress](https://blog.hubspot.com/website/top-free-instagram-plugins-wordpress-site)
137
  - Elementor: [Best Instagram Plugins for WordPress](https://elementor.com/blog/best-instagram-plugins-wordpress/)
143
  - aThemes: [Best WordPress Instagram Plugins 2020](https://athemes.com/collections/best-wordpress-instagram-plugins/)
144
  - WPExplorer: [How to Add Instagram Photos to WordPress](https://www.wpexplorer.com/add-instagram-wordpress/)
145
 
146
+ == Disclaimer ==
147
+
148
+ Spotlight Instagram Feeds, also known as Spotlight Social Media Feeds, is a RebelCode product officially verified by Facebook to make use of the official Instagram(tm) API. It is not affiliated with or endorsed by Instagram and/or Facebook.
149
+
150
  == Installation ==
151
 
152
  = Installation Method 1 =
264
  3. Connect multiple Instagram accounts - Personal and Business.
265
  4. Design your Instagram feed in our live preview customizer.
266
  5. Fully responsive and customisable per device.
267
+ 6. A hashtag feed using the Highlight layout. [Requires Spotlight Instagram Feeds PRO]
268
+ 7. Sell WooCommerce products through your Instagram feed. [Requires Spotlight Instagram Feeds PRO]
269
 
270
  == Changelog ==
271
 
272
+ = 0.6 (2021-03-03) =
273
+
274
+ **Added**
275
+ - New option to duplicate feeds
276
+
277
+ **Fixed**
278
+ - The feed did not load on sites that send CORS preflight requests
279
+ - Fixed hashtags without spaces between them becoming a single link
280
+ - Undefined index errors during an import or update
281
+
282
  = 0.5.4 (2021-02-11) =
283
 
284
  **Changed**
ui/dist/admin-app.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[4],{0:function(t,a){t.exports=e},10:function(e,t,a){"use strict";function n(...e){return e.filter(e=>!!e).join(" ")}function o(e){return n(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let a=Object.getOwnPropertyNames(t).map(a=>t[a]?e+a:null);return e+" "+a.filter(e=>!!e).join(" ")}a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"e",(function(){return r})),a.d(t,"d",(function(){return s}));const r={onMouseDown:e=>e.preventDefault()};function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},100:function(e,t,a){e.exports={screen:"PromotionsScreen__screen",navbar:"PromotionsScreen__navbar","navbar-item":"PromotionsScreen__navbar-item",navbarItem:"PromotionsScreen__navbar-item","navbar-fake-pro-item":"PromotionsScreen__navbar-fake-pro-item PromotionsScreen__navbar-item",navbarFakeProItem:"PromotionsScreen__navbar-fake-pro-item PromotionsScreen__navbar-item","navbar-pro-pill":"PromotionsScreen__navbar-pro-pill",navbarProPill:"PromotionsScreen__navbar-pro-pill"}},102:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a(6),o=a(22),i=a(4),r=a(29),s=a(12);class l{constructor(e){this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.config=Object(i.g)(e),void 0===this.config.watch&&(this.config.watch={all:!0})}fetchMedia(e,t){if(this.hasCache(e))return Promise.resolve(this.media);const a=Object.assign({},e.options,{moderation:this.isWatchingField("moderation")?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.isWatchingField("hashtagBlacklist")?e.options.hashtagBlacklist:[],hashtagWhitelist:this.isWatchingField("hashtagWhitelist")?e.options.hashtagWhitelist:[],captionBlacklist:this.isWatchingField("captionBlacklist")?e.options.captionBlacklist:[],captionWhitelist:this.isWatchingField("captionWhitelist")?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.isWatchingField("hashtagBlacklistSettings")&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.isWatchingField("hashtagWhitelistSettings")&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.isWatchingField("captionBlacklistSettings")&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.isWatchingField("captionWhitelistSettings")&&e.options.captionWhitelistSettings});return t&&t(),o.a.getFeedMedia(a).then(t=>(this.prevOptions=new n.a.Options(e.options),this.media=[],this.addMedia(t.data.media),this.media))}addMedia(e){e.forEach(e=>{this.media.some(t=>t.id==e.id)||this.media.push(e)})}hasCache(e){return null!==this.prevOptions&&!this.isCacheInvalid(e)}isWatchingField(e){var t,a,n;let o=null!==(t=this.config.watch.all)&&void 0!==t&&t;return 1===s.a.size(this.config.watch)&&void 0!==this.config.watch.all?o:(l.FILTER_FIELDS.includes(e)&&(o=null!==(a=s.a.get(this.config.watch,"filters"))&&void 0!==a?a:o),null!==(n=s.a.get(this.config.watch,e))&&void 0!==n?n:o)}isCacheInvalid(e){const t=e.options,a=this.prevOptions;if(Object(i.h)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(this.isWatchingField("accounts")&&!Object(i.e)(t.accounts,a.accounts))return!0;if(this.isWatchingField("tagged")&&!Object(i.e)(t.tagged,a.tagged))return!0;if(this.isWatchingField("hashtags")&&!Object(i.e)(t.hashtags,a.hashtags,r.c))return!0;if(this.isWatchingField("moderationMode")&&t.moderationMode!==a.moderationMode)return!0;if(this.isWatchingField("moderation")&&!Object(i.e)(t.moderation,a.moderation))return!0;if(this.isWatchingField("filters")){if(this.isWatchingField("captionWhitelistSettings")&&t.captionWhitelistSettings!==a.captionWhitelistSettings)return!0;if(this.isWatchingField("captionBlacklistSettings")&&t.captionBlacklistSettings!==a.captionBlacklistSettings)return!0;if(this.isWatchingField("hashtagWhitelistSettings")&&t.hashtagWhitelistSettings!==a.hashtagWhitelistSettings)return!0;if(this.isWatchingField("hashtagBlacklistSettings")&&t.hashtagBlacklistSettings!==a.hashtagBlacklistSettings)return!0;if(this.isWatchingField("captionWhitelist")&&!Object(i.e)(t.captionWhitelist,a.captionWhitelist))return!0;if(this.isWatchingField("captionBlacklist")&&!Object(i.e)(t.captionBlacklist,a.captionBlacklist))return!0;if(this.isWatchingField("hashtagWhitelist")&&!Object(i.e)(t.hashtagWhitelist,a.hashtagWhitelist))return!0;if(this.isWatchingField("hashtagBlacklist")&&!Object(i.e)(t.hashtagBlacklist,a.hashtagBlacklist))return!0}return!1}}!function(e){e.FILTER_FIELDS=["hashtagBlacklist","hashtagWhitelist","captionBlacklist","captionWhitelist","hashtagBlacklistSettings","hashtagWhitelistSettings","captionBlacklistSettings","captionWhitelistSettings"]}(l||(l={}));const c=new l({watch:{all:!0,filters:!1}}),u=new l({watch:{all:!0,moderation:!1}})},103:function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),o=a.n(n),i=a(64),r=a(13),s=a.n(r),l=a(7),c=a(3),u=a(592),d=a(412),m=a(80),p=a(133),h=a(127),_=a(47),f=a(9),g=a(35),b=a(19),y=a(73),v=Object(l.b)((function({account:e,onUpdate:t}){const[a,n]=o.a.useState(!1),[i,r]=o.a.useState(""),[l,v]=o.a.useState(!1),E=e.type===c.a.Type.PERSONAL,S=c.b.getBioText(e),x=()=>{e.customBio=i,v(!0),_.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})},w=a=>{e.customProfilePicUrl=a,v(!0),_.a.updateAccount(e).then(()=>{v(!1),t&&t()})};return o.a.createElement("div",{className:s.a.root},o.a.createElement("div",{className:s.a.container},o.a.createElement("div",{className:s.a.infoColumn},o.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:s.a.username},"@",e.username),o.a.createElement("div",{className:s.a.row},o.a.createElement("span",{className:s.a.label},"Spotlight ID:"),e.id),o.a.createElement("div",{className:s.a.row},o.a.createElement("span",{className:s.a.label},"User ID:"),e.userId),o.a.createElement("div",{className:s.a.row},o.a.createElement("span",{className:s.a.label},"Type:"),e.type),!a&&o.a.createElement("div",{className:s.a.row},o.a.createElement("div",null,o.a.createElement("span",{className:s.a.label},"Bio:"),o.a.createElement("a",{className:s.a.editBioLink,onClick:()=>{r(c.b.getBioText(e)),n(!0)}},"Edit bio"),o.a.createElement("pre",{className:s.a.bio},S.length>0?S:"(No bio)"))),a&&o.a.createElement("div",{className:s.a.row},o.a.createElement("textarea",{className:s.a.bioEditor,value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(x(),e.preventDefault(),e.stopPropagation())},rows:4}),o.a.createElement("div",{className:s.a.bioFooter},o.a.createElement("div",{className:s.a.bioEditingControls},l&&o.a.createElement("span",null,"Please wait ...")),o.a.createElement("div",{className:s.a.bioEditingControls},o.a.createElement(f.a,{className:s.a.bioEditingButton,type:f.c.DANGER,disabled:l,onClick:()=>{e.customBio="",v(!0),_.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})}},"Reset"),o.a.createElement(f.a,{className:s.a.bioEditingButton,type:f.c.SECONDARY,disabled:l,onClick:()=>{n(!1)}},"Cancel"),o.a.createElement(f.a,{className:s.a.bioEditingButton,type:f.c.PRIMARY,disabled:l,onClick:x},"Save"))))),o.a.createElement("div",{className:s.a.picColumn},o.a.createElement("div",null,o.a.createElement(y.a,{account:e,className:s.a.profilePic})),o.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),a=h.a.media.attachment(t).attributes.url;w(a)}},({open:e})=>o.a.createElement(f.a,{type:f.c.SECONDARY,className:s.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&o.a.createElement("a",{className:s.a.resetCustomPic,onClick:()=>{w("")}},"Reset profile picture"))),E&&o.a.createElement("div",{className:s.a.personalInfoMessage},o.a.createElement(g.a,{type:g.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",o.a.createElement("a",{href:b.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),o.a.createElement(m.a,{label:"View access token",stealth:!0},o.a.createElement("div",{className:s.a.row},e.accessToken&&o.a.createElement("div",null,o.a.createElement("p",null,o.a.createElement("span",{className:s.a.label},"Expires on:"),o.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),o.a.createElement("pre",{className:s.a.accessToken},e.accessToken.code)))))}));function E({isOpen:e,onClose:t,onUpdate:a,account:n}){return o.a.createElement(i.a,{isOpen:e&&!!n,title:"Account details",icon:"admin-users",onClose:t},o.a.createElement(i.a.Content,null,n&&o.a.createElement(v,{account:n,onUpdate:a})))}},106:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(1),o=a(41),i=a(31),r=a(57),s=a(48),l=a(161),c=a(96),u=a(19),d=a(22),m=a(194),p=function(e,t,a,n){var o,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i<3?o(r):i>3?o(t,a,r):o(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r},h=o.a.SavedFeed;class _{constructor(){this.editorTab="connect",this.isGoingFromNewToEdit=!1,this.isPromptingFeedName=!1,this.feed=new h,this.isDoingOnboarding=u.a.config.doOnboarding}edit(e){this.isGoingFromNewToEdit||(this.editorTab="connect"),this.isGoingFromNewToEdit=!1,this.feed=null,this.feed=new h(e)}saveFeed(e){const t=null===e.id;return this.isDoingOnboarding=!1,new Promise((a,n)=>{o.a.saveFeed(e).then(e=>{s.a.add("feed/save/success",Object(c.a)(l.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,i.a.history.push(i.a.at({screen:r.a.EDIT_FEED,id:e.id.toString()}),{})),a(e)}).catch(e=>{const t=d.a.getErrorReason(e);s.a.add("feed/save/error",Object(c.a)(m.a,{message:"Failed to save the feed: "+t})),n(t)})})}saveEditor(e){const t=null===this.feed.id;if(0!==this.feed.name.length||e)return this.isSavingFeed=!0,this.isDoingOnboarding=!1,o.a.saveFeed(this.feed).then(e=>{this.feed=new h(e),this.isSavingFeed=!1,s.a.add("feed/saved",Object(c.a)(l.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,i.a.history.push(i.a.at({screen:r.a.EDIT_FEED,id:this.feed.id.toString()}),{}))});this.isPromptingFeedName=!0}cancelEditor(){this.isGoingFromNewToEdit||(this.feed=new h,this.isGoingFromNewToEdit=!1)}closeEditor(){this.cancelEditor(),setTimeout(()=>{i.a.history.push(i.a.at({screen:r.a.FEED_LIST}),{})},10)}onEditorChange(e){e&&h.setFromObject(this.feed,e)}}p([n.o],_.prototype,"feed",void 0),p([n.o],_.prototype,"isSavingFeed",void 0),p([n.o],_.prototype,"editorTab",void 0),p([n.o],_.prototype,"isDoingOnboarding",void 0),p([n.o],_.prototype,"isGoingFromNewToEdit",void 0),p([n.o],_.prototype,"isPromptingFeedName",void 0),p([n.f],_.prototype,"edit",null),p([n.f],_.prototype,"saveEditor",null),p([n.f],_.prototype,"cancelEditor",null),p([n.f],_.prototype,"closeEditor",null),p([n.f],_.prototype,"onEditorChange",null);const f=new _},11:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(15),i=a(12),r=a(4);!function(e){function t(e){return e?c(e.type):void 0}function a(e){var a;if("object"!=typeof e)return!1;const n=t(e);return void 0!==n&&n.isValid(null!==(a=e.config)&&void 0!==a?a:{})}function n(t){return t?e.getPromoFromDictionary(t,o.a.config.globalPromotions):void 0}function s(e){const t=l(e);return void 0===t?void 0:t.promotion}function l(t){if(t)for(const a of o.a.config.autoPromotions){const n=e.Automation.getType(a),o=e.Automation.getConfig(a);if(n&&n.matches(t,o))return a}}function c(t){return e.types.find(e=>e.id===t)}let u;e.getConfig=function(e){var t,a;return e&&null!==(a=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==a?a:{}},e.getType=t,e.isValid=a,e.getPromoFromDictionary=function(t,a){const n=i.a.get(a,t.id);if(n)return e.getType(n)?n:void 0},e.getPromo=function(e){return Object(r.j)(a,[()=>n(e),()=>s(e)])},e.getGlobalPromo=n,e.getAutoPromo=s,e.getAutomation=l,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?a(e.type):void 0},e.getConfig=function(e){var t,a;return e&&null!==(a=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==a?a:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function a(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=a,e.clearTypes=function(){t.splice(0,t.length)}}(u=e.Automation||(e.Automation={}))}(n||(n={}))},111:function(e,t,a){e.exports={label:"TabNavbar__label",tab:"TabNavbar__tab",current:"TabNavbar__current TabNavbar__tab",disabled:"TabNavbar__disabled TabNavbar__tab"}},12:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function a(e,t){return(null!=e?e:{})[t.toString()]}function n(e,t,a){return(e=null!=e?e:{})[t.toString()]=a,e}e.has=t,e.get=a,e.set=n,e.ensure=function(a,o,i){return t(a,o)||n(a,o,i),e.get(a,o)},e.withEntry=function(t,a,n){return e.set(Object(o.g)(null!=t?t:{}),a,n)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,a){return e.remove(Object(o.g)(null!=t?t:{}),a)},e.at=function(t,n){return a(t,e.keys(t)[n])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,a){const n={};return e.forEach(t,(e,t)=>n[e]=a(t,e)),n},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(o.l)(e,t)},e.forEach=function(t,a){e.keys(t).forEach(e=>a(e,t[e]))},e.fromArray=function(t){const a={};return t.forEach(([t,n])=>e.set(a,t,n)),a},e.fromMap=function(t){const a={};return t.forEach((t,n)=>e.set(a,n,t)),a}}(n||(n={}))},121:function(e,t,a){e.exports={root:"PopupTextField__root layout__flex-row",container:"PopupTextField__container layout__flex-row","edit-container":"PopupTextField__edit-container PopupTextField__container layout__flex-row",editContainer:"PopupTextField__edit-container PopupTextField__container layout__flex-row","static-container":"PopupTextField__static-container PopupTextField__container layout__flex-row",staticContainer:"PopupTextField__static-container PopupTextField__container layout__flex-row","edit-icon":"PopupTextField__edit-icon dashicons__dashicon-normal",editIcon:"PopupTextField__edit-icon dashicons__dashicon-normal",label:"PopupTextField__label","done-btn":"PopupTextField__done-btn",doneBtn:"PopupTextField__done-btn"}},122:function(e,t,a){e.exports={root:"ProUpgradeBtn__root"}},124:function(e,t,a){"use strict";var n=a(102);t.a=new class{constructor(){this.mediaStore=n.a}}},128:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(0),o=a.n(n),i=a(4);const r=o.a.createContext(null),s={matched:!1};function l({value:e,children:t}){return s.matched=!1,o.a.createElement(r.Provider,{value:e},t.map((t,a)=>o.a.createElement(o.a.Fragment,{key:a},"function"==typeof t?t(e):t)))}function c({value:e,oneOf:t,children:a}){var n;const l=o.a.useContext(r);let c=!1;return void 0!==e&&(c="function"==typeof e?e(l):Object(i.b)(l,e)),void 0!==t&&(c=t.some(e=>Object(i.b)(e,l))),c?(s.matched=!0,"function"==typeof a?null!==(n=a(l))&&void 0!==n?n:null:null!=a?a:null):null}function u({children:e}){var t;if(s.matched)return null;const a=o.a.useContext(r);return"function"==typeof e?null!==(t=e(a))&&void 0!==t?t:null:null!=e?e:null}},13:function(e,t,a){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},130:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),i=a(7),r=a(40),s=a(6),l=a(92);const c=Object(i.b)(({feed:e})=>{var t;const a=r.a.getById(e.options.layout),n=s.a.ComputedOptions.compute(e.options,e.mode);return o.a.createElement(null!==(t=a.component)&&void 0!==t?t:l.a,{feed:e,options:n})})},131:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),o=a.n(n),i=a(81),r=a.n(i),s=a(25),l=a(69),c=a.n(l),u=a(58),d=a.n(u),m=a(7),p=a(4),h=a(123),_=Object(m.b)((function({field:e}){const t="settings-field-"+Object(p.p)(),a=!e.label||e.fullWidth;return o.a.createElement("div",{className:d.a.root},e.label&&o.a.createElement("div",{className:d.a.label},o.a.createElement("label",{htmlFor:t},e.label)),o.a.createElement("div",{className:d.a.container},o.a.createElement("div",{className:a?d.a.controlFullWidth:d.a.controlPartialWidth},o.a.createElement(e.component,{id:t})),e.tooltip&&o.a.createElement("div",{className:d.a.tooltip},o.a.createElement(h.a,null,e.tooltip))))}));function f({group:e}){return o.a.createElement("div",{className:c.a.root},e.title&&e.title.length>0&&o.a.createElement("h1",{className:c.a.title},e.title),e.component&&o.a.createElement("div",{className:c.a.content},o.a.createElement(e.component)),e.fields&&o.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>o.a.createElement(_,{field:e,key:e.id}))))}var g=a(18);function b({page:e}){return Object(g.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(s.c.save(),e.preventDefault(),e.stopPropagation())}),o.a.createElement("article",{className:r.a.root},e.component&&o.a.createElement("div",{className:r.a.content},o.a.createElement(e.component)),e.groups&&o.a.createElement("div",{className:r.a.groupList},e.groups.map(e=>o.a.createElement(f,{key:e.id,group:e}))))}},14:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaPopupBox__container layout__flex-box",horizontal:"MediaPopupBox__horizontal MediaPopupBox__container layout__flex-box",vertical:"MediaPopupBox__vertical MediaPopupBox__container layout__flex-box",layer:"MediaPopupBox__layer layout__flex-box",control:"MediaPopupBox__control","control-label":"MediaPopupBox__control-label",controlLabel:"MediaPopupBox__control-label","control-icon":"MediaPopupBox__control-icon",controlIcon:"MediaPopupBox__control-icon","close-button":"MediaPopupBox__close-button MediaPopupBox__control",closeButton:"MediaPopupBox__close-button MediaPopupBox__control","nav-layer":"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box",navLayer:"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box","nav-boundary":"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box",navBoundary:"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box","nav-aligner":"MediaPopupBox__nav-aligner layout__flex-box",navAligner:"MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-sidebar":"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerSidebar:"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-no-sidebar":"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerNoSidebar:"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-btn":"MediaPopupBox__nav-btn MediaPopupBox__control",navBtn:"MediaPopupBox__nav-btn MediaPopupBox__control","prev-btn":"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control",prevBtn:"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control","next-btn":"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control",nextBtn:"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control","modal-layer":"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box",modalLayer:"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box","modal-aligner":"MediaPopupBox__modal-aligner layout__flex-box",modalAligner:"MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-sidebar":"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerSidebar:"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-no-sidebar":"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerNoSidebar:"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modal:"MediaPopupBox__modal","no-scroll":"MediaPopupBox__no-scroll",noScroll:"MediaPopupBox__no-scroll"}},15:function(e,t,a){"use strict";var n,o=a(11);let i;t.a=i={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(n=SliCommonL10n.globalPromotions)&&void 0!==n?n:{}},image:e=>`${i.config.imagesUrl}/${e}`},o.a.registerType({id:"link",label:"Link",isValid:()=>!1}),o.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),o.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},150:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n),i=a(122),r=a.n(i),s=a(19);function l({url:e,children:t}){return o.a.createElement("a",{className:r.a.root,href:null!=e?e:s.a.resources.pricingUrl,target:"_blank"},null!=t?t:"Free 14-day PRO trial")}},16:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},160:function(e,t,a){"use strict";function n(e,t){return"url"===t.linkType?t.url:t.postUrl}var o;a.d(t,"a",(function(){return o})),t.b={id:"link",label:"Link",getIcon:()=>"admin-links",getPopupLink:function(e,t){return"string"==typeof t.linkText&&t.linkText.length>0?[t.linkText,t.newTab]:[o.getDefaultLinkText(t),t.newTab]},isValid:function(e){return"string"==typeof e.linkType&&e.linkType.length>0&&("url"===e.linkType&&"string"==typeof e.url&&e.url.length>0||!!e.postId&&"string"==typeof e.postUrl&&e.postUrl.length>0)},getMediaUrl:n,onMediaClick:function(e,t){var a;const o=n(0,t),i=null===(a=t.linkDirectly)||void 0===a||a;return!(!o||!i)&&(window.open(o,t.newTab?"_blank":"_self"),!0)}},function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(o||(o={}))},162:function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var n=a(0),o=a.n(n),i=a(218),r=a.n(i),s=a(7),l=a(186),c=a(31),u=a(19),d=a(131),m=a(60),p=a(25),h=a(66),_=a(57),f=a(174),g=a(165),b=a.n(g),y=a(187),v=a(9),E=a(138),S=a(136),x=Object(s.b)((function(){const e=c.a.get("tab");return o.a.createElement(y.a,{chevron:!0,right:w},u.a.settings.pages.map((t,a)=>o.a.createElement(E.a.Link,{key:t.id,linkTo:c.a.with({tab:t.id}),isCurrent:e===t.id||!e&&0===a},t.title)))}));const w=Object(s.b)((function({}){const e=!p.c.isDirty;return o.a.createElement("div",{className:b.a.buttons},o.a.createElement(v.a,{className:b.a.cancelBtn,type:v.c.DANGER_PILL,size:v.b.LARGE,onClick:()=>p.c.restore(),disabled:e},"Cancel"),o.a.createElement(S.a,{className:b.a.saveBtn,onClick:()=>p.c.save(),isSaving:p.c.isSaving,tooltip:"Save the settings (Ctrl+S)",disabled:e}))})),O="You have unsaved changes. If you leave now, your changes will be lost.";function M(e){return Object(h.parse)(e.search).screen===_.a.SETTINGS||O}t.b=Object(s.b)((function(){const e=c.a.get("tab"),t=e?u.a.settings.pages.find(t=>e===t.id):u.a.settings.pages[0];return Object(n.useEffect)(()=>()=>{p.c.isDirty&&c.a.get("screen")!==_.a.SETTINGS&&p.c.restore()},[]),o.a.createElement(o.a.Fragment,null,o.a.createElement(l.a,{navbar:x,className:r.a.root},t&&o.a.createElement(d.a,{page:t})),o.a.createElement(m.a,{when:p.c.isDirty,message:M}),o.a.createElement(f.a,{when:p.c.isDirty,message:O}))}))},164:function(e,t,a){e.exports={"menu-link":"PageMenuNavbar__menu-link",menuLink:"PageMenuNavbar__menu-link","menu-ref":"PageMenuNavbar__menu-ref",menuRef:"PageMenuNavbar__menu-ref","arrow-down":"PageMenuNavbar__arrow-down",arrowDown:"PageMenuNavbar__arrow-down"}},165:function(e,t,a){e.exports={buttons:"SettingsNavbar__buttons layout__flex-row","cancel-btn":"SettingsNavbar__cancel-btn",cancelBtn:"SettingsNavbar__cancel-btn"}},17:function(e,t,a){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},171:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n),i=a(46);function r({breakpoints:e,render:t,children:a}){const[r,s]=o.a.useState(null),l=o.a.useCallback(()=>{const t=Object(i.b)();s(()=>e.reduce((e,a)=>t.width<=a&&a<e?a:e,1/0))},[e]);Object(n.useEffect)(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)),[]);const c=t?t(r):o.a.createElement(a,{breakpoint:r});return null!==r?c:null}},172:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(125),r=a(30),s=a.n(r),l=a(59),c=a(3),u=a(9),d=a(132),m=a(41),p=a(31),h=a(47),_=a(103),f=a(73),g=a(19),b=a(89),y=a(37),v=a(134);function E({accounts:e,showDelete:t,onDeleteError:a}){const n=(e=null!=e?e:[]).filter(e=>e.type===c.a.Type.BUSINESS).length,[i,r]=o.a.useState(!1),[E,S]=o.a.useState(null),[x,w]=o.a.useState(!1),[O,M]=o.a.useState(),[P,k]=o.a.useState(!1),C=e=>()=>{S(e),r(!0)},L=e=>()=>{h.a.openAuthWindow(e.type,0,()=>{g.a.restApi.deleteAccountMedia(e.id)})},N=e=>()=>{M(e),w(!0)},B=()=>{k(!1),M(null),w(!1)},T={cols:{username:s.a.usernameCol,type:s.a.typeCol,usages:s.a.usagesCol,actions:s.a.actionsCol},cells:{username:s.a.usernameCell,type:s.a.typeCell,usages:s.a.usagesCell,actions:s.a.actionsCell}};return o.a.createElement("div",{className:"accounts-list"},o.a.createElement(d.a,{styleMap:T,rows:e,cols:[{id:"username",label:"Username",render:e=>o.a.createElement("div",null,o.a.createElement(f.a,{account:e,className:s.a.profilePic}),o.a.createElement("a",{className:s.a.username,onClick:C(e)},e.username))},{id:"type",label:"Type",render:e=>o.a.createElement("span",{className:s.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>o.a.createElement("span",{className:s.a.usages},e.usages.map((e,t)=>!!m.a.getById(e)&&o.a.createElement(l.a,{key:t,to:p.a.at({screen:"edit",id:e.toString()})},m.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&o.a.createElement(y.f,null,({ref:e,openMenu:t})=>o.a.createElement(u.a,{ref:e,className:s.a.actionsBtn,type:u.c.PILL,size:u.b.NORMAL,onClick:t},o.a.createElement(v.a,null)),o.a.createElement(y.b,null,o.a.createElement(y.c,{onClick:C(e)},"Info"),o.a.createElement(y.c,{onClick:L(e)},"Reconnect"),o.a.createElement(y.d,null),o.a.createElement(y.c,{onClick:N(e)},"Delete")))}]}),o.a.createElement(_.a,{isOpen:i,onClose:()=>r(!1),account:E}),o.a.createElement(b.a,{isOpen:x,title:"Are you sure?",buttons:[P?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:P,cancelDisabled:P,onAccept:()=>{k(!0),h.a.deleteAccount(O.id).then(()=>B()).catch(()=>{a&&a("An error occurred while trying to remove the account."),B()})},onCancel:B},o.a.createElement("p",null,"Are you sure you want to delete"," ",o.a.createElement("span",{style:{fontWeight:"bold"}},O?O.username:""),"?"," ","This will also delete all saved media associated with this account."),O&&O.type===c.a.Type.BUSINESS&&1===n&&o.a.createElement("p",null,o.a.createElement("b",null,"Note:")," ",o.a.createElement("span",null,"Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work."))))}var S=a(35),x=a(7),w=a(135),O=a(99),M=a.n(O);t.a=Object(x.b)((function(){const[,e]=o.a.useState(0),[t,a]=o.a.useState(""),n=o.a.useCallback(()=>e(e=>e++),[]);return c.b.hasAccounts()?o.a.createElement("div",{className:M.a.root},t.length>0&&o.a.createElement(S.a,{type:S.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>a("")},t),o.a.createElement("div",{className:M.a.connectBtn},o.a.createElement(i.a,{onConnect:n})),o.a.createElement(E,{accounts:c.b.list,showDelete:!0,onDeleteError:a})):o.a.createElement(w.a,null)}))},173:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),i=a(111),r=a.n(i),s=a(88),l=a(18);function c({children:{path:e,tabs:t,right:a},current:n,onClickTab:i}){return o.a.createElement(s.b,{pathStyle:"chevron"},{path:e,right:a,left:t.map(e=>{return o.a.createElement(u,{tab:e,key:e.key,isCurrent:e.key===n,onClick:(t=e.key,()=>i&&i(t))});var t})})}function u({tab:e,isCurrent:t,onClick:a}){return o.a.createElement("a",{key:e.key,role:"button",tabIndex:0,className:e.disabled?r.a.disabled:t?r.a.current:r.a.tab,onClick:a,onKeyDown:Object(l.g)(a)},o.a.createElement("span",{className:r.a.label},e.label))}},174:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),i=a(60),r=a(18);function s({when:e,message:t}){return Object(r.l)(t,e),o.a.createElement(i.a,{when:e,message:t})}},18:function(e,t,a){"use strict";a.d(t,"j",(function(){return s})),a.d(t,"f",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"n",(function(){return m})),a.d(t,"h",(function(){return p})),a.d(t,"l",(function(){return h})),a.d(t,"k",(function(){return _})),a.d(t,"e",(function(){return f})),a.d(t,"d",(function(){return g})),a.d(t,"m",(function(){return b})),a.d(t,"g",(function(){return y})),a.d(t,"i",(function(){return v}));var n=a(0),o=a.n(n),i=a(60),r=a(46);function s(e,t){!function(e,t,a){const n=o.a.useRef(!0);e(()=>{n.current=!0;const e=t(()=>new Promise(e=>{n.current&&e()}));return()=>{n.current=!1,e&&e()}},a)}(n.useEffect,e,t)}function l(e){const[t,a]=o.a.useState(e),n=o.a.useRef(t);return[t,()=>n.current,e=>a(n.current=e)]}function c(e,t,a=[]){function o(n){!e.current||e.current.contains(n.target)||a.some(e=>e&&e.current&&e.current.contains(n.target))||t(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",o),document.addEventListener("touchend",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchend",o)}))}function u(e,t){Object(n.useEffect)(()=>{const a=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",a),()=>document.removeEventListener("keyup",a)},e)}function d(e,t,a=100){const[i,r]=o.a.useState(e);return Object(n.useEffect)(()=>{let n=null;return e===t?n=setTimeout(()=>r(t),a):r(!t),()=>{null!==n&&clearTimeout(n)}},[e]),[i,r]}function m(e){const[t,a]=o.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();a(t),e&&e(t)};return Object(n.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){Object(n.useEffect)(()=>{const a=a=>{if(t)return(a||window.event).returnValue=e,e};return window.addEventListener("beforeunload",a),()=>window.removeEventListener("beforeunload",a)},[t])}function _(e,t){const a=o.a.useRef(!1);return Object(n.useEffect)(()=>{a.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),a.current=!1)},[a.current]),()=>a.current=!0}function f(e,t,a,o=[],i=[]){Object(n.useEffect)(()=>(o.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,a),()=>e.removeEventListener(t,a)),i)}function g(e,t,a=[],n=[]){f(document,e,t,a,n)}function b(e,t,a=[],n=[]){f(window,e,t,a,n)}function y(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function v(e){const[t,a]=o.a.useState(e);return[function(e){const t=o.a.useRef(e);return t.current=e,t}(t),a]}a(53)},186:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),o=a.n(n),i=a(10),r=a(47),s=a(19),l=a(1);const c=Object(l.o)({initialized:!1,list:[]}),u=({navbar:e,className:t,fillPage:a,children:l})=>{const u=o.a.useRef(null);Object(n.useEffect)(()=>{u.current&&(function(){if(!c.initialized){const e=Array.from(document.querySelectorAll(".sli-notice")),t=Array.from(document.querySelectorAll(".fs-notice.fs-slug-spotlight-social-photo-feeds"));c.list=e.concat(t),c.initialized=!0}}(),c.list.forEach(e=>{e.remove(),u.current.appendChild(e)}))},[]);const d=r.a.getExpiringTokenAccounts(),m=Object(i.a)("admin-screen",{"--fillPage":a})+(t?" "+t:"");return o.a.createElement("div",{className:m},e&&o.a.createElement("div",{className:"admin-screen__navbar"},o.a.createElement(e)),o.a.createElement("div",{className:"admin-screen__content"},o.a.createElement("div",{className:"admin-screen__notices",ref:u},d.map(e=>o.a.createElement("div",{key:e.id,className:"notice notice-warning"},o.a.createElement("p",null,"The access token for the ",o.a.createElement("b",null,"@",e.username)," account is about to expire."," ",o.a.createElement("a",{className:"admin-screen__reconnect",onClick:t=>function(e,t){r.a.openAuthWindow(t.type,0,()=>{s.a.restApi.deleteAccountMedia(t.id)}),e.preventDefault()}(t,e)},"Re-connect the account")," ","to keep using it in Spotlight.")))),l))}},187:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(7),r=a(138),s=a(150),l=a(57),c=a(15);t.a=Object(i.b)((function({right:e,chevron:t,children:a}){const n=o.a.createElement(r.a.Item,null,l.b.getCurrent().title);return o.a.createElement(r.a,null,o.a.createElement(o.a.Fragment,null,n,t&&o.a.createElement(r.a.Chevron,null),a),e?o.a.createElement(e):!c.a.isPro&&o.a.createElement(s.a,{url:"https://spotlightwp.com/pricing/?utm_source=sl_plugin&utm_medium=sl_plugin_upgrade&utm_campaign=sl_plugin_upgrade_list"}))}))},190:function(e,t,a){e.exports={"arrow-link":"WizardNavbar__arrow-link",arrowLink:"WizardNavbar__arrow-link","prev-link":"WizardNavbar__prev-link WizardNavbar__arrow-link",prevLink:"WizardNavbar__prev-link WizardNavbar__arrow-link","next-link":"WizardNavbar__next-link WizardNavbar__arrow-link",nextLink:"WizardNavbar__next-link WizardNavbar__arrow-link"}},191:function(e,t,a){e.exports={message:"FeedNamePrompt__message",input:"FeedNamePrompt__input"}},2:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(1),i=function(e,t,a,n){var o,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i<3?o(r):i>3?o(t,a,r):o(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};!function(e){class t{constructor(e,t,a){this.prop=e,this.name=t,this.icon=a}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class a{constructor(e,t,a){this.desktop=e,this.tablet=t,this.phone=a}get(e,t){return n(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const n=s(this,t,e);return new a(n.desktop,n.tablet,n.phone)}}function n(e,t,a=!1){if(!e)return;const n=e[t.prop];return a&&null==n?e.desktop:n}function r(e,t,a){return e[a.prop]=t,e}function s(e,t,n){return r(new a(e.desktop,e.tablet,e.phone),t,n)}i([o.o],a.prototype,"desktop",void 0),i([o.o],a.prototype,"tablet",void 0),i([o.o],a.prototype,"phone",void 0),e.Value=a,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(a){const n=e.MODES.findIndex(e=>e===a);return void 0===n?t.DESKTOP:e.MODES[(n+1)%e.MODES.length]},e.get=n,e.set=r,e.withValue=s,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new a(t.all,t.all,t.all):new a(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new a(e.desktop,e.tablet,e.phone):new a(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(n||(n={}))},20:function(e,t,a){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},208:function(e,t,a){e.exports={beacon:"NewsBeacon__beacon",button:"NewsBeacon__button","button-animation":"NewsBeacon__button-animation",buttonAnimation:"NewsBeacon__button-animation",counter:"NewsBeacon__counter","hide-link":"NewsBeacon__hide-link",hideLink:"NewsBeacon__hide-link",menu:"NewsBeacon__menu"}},21:function(e,t,a){e.exports={container:"MediaInfo__container",padded:"MediaInfo__padded",bordered:"MediaInfo__bordered",header:"MediaInfo__header MediaInfo__padded MediaInfo__bordered","source-img":"MediaInfo__source-img",sourceImg:"MediaInfo__source-img","source-img-link":"MediaInfo__source-img-link MediaInfo__source-img",sourceImgLink:"MediaInfo__source-img-link MediaInfo__source-img","source-name":"MediaInfo__source-name",sourceName:"MediaInfo__source-name","comments-scroller":"MediaInfo__comments-scroller",commentsScroller:"MediaInfo__comments-scroller","comments-list":"MediaInfo__comments-list MediaInfo__padded",commentsList:"MediaInfo__comments-list MediaInfo__padded",comment:"MediaInfo__comment",footer:"MediaInfo__footer","footer-info":"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered",footerInfo:"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered","footer-info-line":"MediaInfo__footer-info-line",footerInfoLine:"MediaInfo__footer-info-line","num-likes":"MediaInfo__num-likes MediaInfo__footer-info-line",numLikes:"MediaInfo__num-likes MediaInfo__footer-info-line",date:"MediaInfo__date MediaInfo__footer-info-line","footer-link":"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered",footerLink:"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered","footer-link-icon":"MediaInfo__footer-link-icon",footerLinkIcon:"MediaInfo__footer-link-icon"}},216:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e=[],t=0){this.fns=e,this.delay=null!=t?t:1}add(e){this.fns.push(e)}run(){return this.numLoaded=0,this.isLoading=!0,new Promise((e,t)=>{this.fns.forEach(a=>a().then(()=>{this.numLoaded++,this.numLoaded>=this.fns.length&&setTimeout(()=>{this.isLoading=!1,e()},this.delay)}).catch(t))})}}},217:function(e,t,a){"use strict";a.d(t,"a",(function(){return x}));var n=a(0),o=a.n(n),i=a(100),r=a.n(i),s=a(7),l=a(31),c=a(173),u=a(9),d=a(88),m=a(128),p=a(259),h=a(261),_=a(25),f=a(136),g=a(162),b=a(66),y=a(57),v=a(18),E=a(60),S=a(95);const x=Object(s.b)((function({isFakePro:e}){var t;const a=null!==(t=l.a.get("tab"))&&void 0!==t?t:"automate";Object(v.l)(g.a,_.c.isDirty),Object(v.d)("keydown",e=>{"s"===e.key.toLowerCase()&&e.ctrlKey&&(_.c.isDirty&&!_.c.isSaving&&_.c.save(),e.preventDefault(),e.stopPropagation())},[],[_.c.isDirty,_.c.isSaving]);const n=e?M:_.c.values.autoPromotions,i=e?{}:_.c.values.promotions;return o.a.createElement("div",{className:r.a.screen},o.a.createElement("div",{className:r.a.navbar},o.a.createElement(w,{currTabId:a,isFakePro:e})),o.a.createElement(m.a,{value:a},o.a.createElement(m.c,{value:"automate"},o.a.createElement(p.a,{automations:n,onChange:function(t){e||_.c.update({autoPromotions:t})},isFakePro:e})),o.a.createElement(m.c,{value:"global"},o.a.createElement(h.a,{promotions:i,onChange:function(t){e||_.c.update({promotions:t})},isFakePro:e}))),o.a.createElement(E.a,{when:_.c.isDirty,message:O}))})),w=Object(s.b)((function({currTabId:e,isFakePro:t}){return o.a.createElement(o.a.Fragment,null,o.a.createElement(c.a,{current:e,onClickTab:e=>l.a.goto({tab:e},!0)},{path:[o.a.createElement(d.a,{key:"logo"}),o.a.createElement("span",{key:"screen-title"},"Promotions")],tabs:[{key:"automate",label:o.a.createElement("span",{className:t?r.a.navbarFakeProItem:r.a.navbarItem},t&&o.a.createElement(S.a,{className:r.a.navbarProPill}),o.a.createElement("span",null,"Automate"))},{key:"global",label:o.a.createElement("span",{className:t?r.a.navbarFakeProItem:r.a.navbarItem},t&&o.a.createElement(S.a,{className:r.a.navbarProPill}),o.a.createElement("span",null,"Global Promotions"))}],right:[o.a.createElement(u.a,{key:"cancel",type:u.c.SECONDARY,disabled:!_.c.isDirty,onClick:_.c.restore},"Cancel"),o.a.createElement(f.a,{key:"save",onClick:_.c.save,isSaving:_.c.isSaving,disabled:!_.c.isDirty})]}))}));function O(e){return Object(b.parse)(e.search).screen===y.a.PROMOTIONS||g.a}const M=[{type:"hashtag",config:{hashtags:["product"]},promotion:{type:"link",config:{linkType:"page",postId:1,postTitle:"Product Page",linkText:"Buy this product"}}},{type:"hashtag",config:{hashtags:["myblog"]},promotion:{type:"link",config:{linkType:"post",postId:1,postTitle:"My Latest Blog Post",linkText:""}}},{type:"hashtag",config:{hashtags:["youtube"]},promotion:{type:"link",config:{linkType:"url",url:"",linkText:""}}}]},218:function(e,t,a){},22:function(e,t,a){"use strict";var n=a(51),o=a.n(n),i=a(15),r=a(53);const s=i.a.config.restApi.baseUrl,l={};i.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=o.a.create({baseURL:s,headers:l});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const u={config:Object.assign(Object.assign({},i.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,a=0,n)=>{const i=n?new o.a.CancelToken(n):void 0;return new Promise((n,o)=>{const r=e=>{n(e),document.dispatchEvent(new Event(u.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:a,from:t},{cancelToken:i}).then(n=>{n&&n.data.needImport?u.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:a,from:t},{cancelToken:i}).then(r).catch(o)}).catch(o):r(n)}).catch(o)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,a)=>{document.dispatchEvent(new Event(u.events.onImportStart));const n=e=>{document.dispatchEvent(new Event(u.events.onImportFail)),a(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(u.events.onImportEnd)),t(e)):n(e)}).catch(n)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=u},23:function(e,t,a){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username","date-container":"MediaOverlay__date-container",dateContainer:"MediaOverlay__date-container",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},231:function(e,t,a){e.exports={root:"SpotlightGame__root layout__flex-column","game-text":"SpotlightGame__game-text",gameText:"SpotlightGame__game-text",score:"SpotlightGame__score SpotlightGame__game-text",message:"SpotlightGame__message SpotlightGame__game-text","message-bubble":"SpotlightGame__message-bubble",messageBubble:"SpotlightGame__message-bubble"}},232:function(e,t,a){e.exports={"field-container":"AdvancedSettings__field-container layout__flex-row",fieldContainer:"AdvancedSettings__field-container layout__flex-row","field-element":"AdvancedSettings__field-element",fieldElement:"AdvancedSettings__field-element","field-label":"AdvancedSettings__field-label AdvancedSettings__field-element",fieldLabel:"AdvancedSettings__field-label AdvancedSettings__field-element","field-control":"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column",fieldControl:"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column","field-centered":"AdvancedSettings__field-centered",fieldCentered:"AdvancedSettings__field-centered"}},27:function(e,t,a){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},272:function(e,t,a){e.exports={"contact-us":"FeedsOnboarding__contact-us",contactUs:"FeedsOnboarding__contact-us","call-to-action":"FeedsOnboarding__call-to-action",callToAction:"FeedsOnboarding__call-to-action"}},28:function(e,t,a){e.exports={reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation","flex-box":"layout__flex-box",flexBox:"layout__flex-box",album:"MediaPopupBoxAlbum__album",frame:"MediaPopupBoxAlbum__frame",scroller:"MediaPopupBoxAlbum__scroller",child:"MediaPopupBoxAlbum__child","controls-layer":"MediaPopupBoxAlbum__controls-layer layout__flex-box",controlsLayer:"MediaPopupBoxAlbum__controls-layer layout__flex-box","controls-container":"MediaPopupBoxAlbum__controls-container",controlsContainer:"MediaPopupBoxAlbum__controls-container","nav-button":"MediaPopupBoxAlbum__nav-button",navButton:"MediaPopupBoxAlbum__nav-button","prev-button":"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button",prevButton:"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button","next-button":"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button",nextButton:"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button","indicator-list":"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicatorList:"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicator:"MediaPopupBoxAlbum__indicator","indicator-current":"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator",indicatorCurrent:"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator"}},29:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"b",(function(){return u})),a(5);var n=a(65),o=a(0),i=a.n(o),r=a(4);function s(e,t){const a=t.map(n.b).join("|");return new RegExp(`#(${a})(?:\\b|\\r|#|$)`,"imu").test(e)}function l(e,t,a=0,n=!1){let s=e.trim();n&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=s.split("\n"),c=l.map((e,a)=>{if(e=e.trim(),n&&/^[.*•]$/.test(e))return null;let s,c=[];for(;null!==(s=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],a=i.a.createElement("a",{href:t,target:"_blank",key:Object(r.p)()},s[0]),n=e.substr(0,s.index),o=e.substr(s.index+s[0].length);c.push(n),c.push(a),e=o}return e.length&&c.push(e),t&&(c=t(c,a)),l.length>1&&c.push(i.a.createElement("br",{key:Object(r.p)()})),i.a.createElement(o.Fragment,{key:Object(r.p)()},c)});return a>0?c.slice(0,a):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function u(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(22),i=a(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(n||(n={}));const r=Object(i.o)([]),s="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function u(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===n.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(i.o)(e))),r}function d(e){if("object"==typeof e&&Array.isArray(e.data))return u(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:s,getById:l,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==l(e)),idsToAccounts:e=>e.map(e=>l(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===n.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===n.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:s,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return o.a.getAccounts().then(d).catch(e=>{throw o.a.getErrorReason(e)})},loadFromResponse:d,addAccounts:u}},30:function(e,t,a){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-btn":"AccountsList__actions-btn",actionsBtn:"AccountsList__actions-btn","usages-cell":"AccountsList__usages-cell",usagesCell:"AccountsList__usages-cell","usages-col":"AccountsList__usages-col",usagesCol:"AccountsList__usages-col","type-cell":"AccountsList__type-cell",typeCell:"AccountsList__type-cell","type-col":"AccountsList__type-col",typeCol:"AccountsList__type-col"}},303:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(121),o=a.n(n),i=a(0),r=a.n(i),s=a(9),l=a(8),c=a(37),u=a(10);function d({value:e,defaultValue:t,onDone:a}){const n=r.a.useRef(),[i,d]=r.a.useState(""),[m,p]=r.a.useState(!1),h=()=>{d(e),p(!0)},_=()=>{p(!1),a&&a(i),n.current&&n.current.focus()},f=e=>{switch(e.key){case"Enter":case" ":h()}};return r.a.createElement("div",{className:o.a.root},r.a.createElement(c.a,{isOpen:m,onBlur:()=>p(!1),placement:"bottom"},({ref:a})=>r.a.createElement("div",{ref:Object(u.d)(a,n),className:o.a.staticContainer,onClick:h,onKeyPress:f,tabIndex:0,role:"button"},r.a.createElement("span",{className:o.a.label},e||t),r.a.createElement(l.a,{icon:"edit",className:o.a.editIcon})),r.a.createElement(c.b,null,r.a.createElement(c.e,null,r.a.createElement("div",{className:o.a.editContainer},r.a.createElement("input",{type:"text",value:i,onChange:e=>{d(e.target.value)},onKeyDown:e=>{switch(e.key){case"Enter":_();break;case"Escape":p(!1);break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:!0,placeholder:"Feed name"}),r.a.createElement(s.a,{className:o.a.doneBtn,type:s.c.PRIMARY,size:s.b.NORMAL,onClick:_},r.a.createElement(l.a,{icon:"yes"})))))))}},304:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),o=a.n(n),i=a(190),r=a.n(i),s=a(88),l=a(9),c=a(8);function u({children:e,steps:t,current:a,onChangeStep:n,firstStep:i,lastStep:u}){var d;i=null!=i?i:[],u=null!=u?u:[];const m=null!==(d=t.findIndex(e=>e.key===a))&&void 0!==d?d:0,p=m<=0,h=m>=t.length-1,_=p?null:t[m-1],f=h?null:t[m+1],g=p?i:o.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!p&&n&&n(t[m-1].key),className:r.a.prevLink,disabled:_.disabled},o.a.createElement(c.a,{icon:"arrow-left-alt2"}),o.a.createElement("span",null,_.label)),b=h?u:o.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!h&&n&&n(t[m+1].key),className:r.a.nextLink,disabled:f.disabled},o.a.createElement("span",null,f.label),o.a.createElement(c.a,{icon:"arrow-right-alt2"}));return o.a.createElement(s.b,null,{path:[],left:g,right:b,center:e})}},305:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),i=a(164),r=a.n(i),s=a(88),l=a(9),c=a(8),u=a(37);function d({pages:e,current:t,onChangePage:a,showNavArrows:n,hideMenuArrow:i,children:u}){var d,p;const{path:h,right:_}=u,f=null!==(d=e.findIndex(e=>e.key===t))&&void 0!==d?d:0,g=null!==(p=e[f].label)&&void 0!==p?p:"",b=f<=0,y=f>=e.length-1,v=b?null:e[f-1],E=y?null:e[f+1];let S=[];return n&&S.push(o.a.createElement(l.a,{key:"page-menu-left",type:l.c.PILL,onClick:()=>!b&&a&&a(e[f-1].key),disabled:b||v.disabled},o.a.createElement(c.a,{icon:"arrow-left-alt2"}))),S.push(o.a.createElement(m,{key:"page-menu",pages:e,current:t,onClickPage:e=>a&&a(e)},o.a.createElement("span",null,g),!i&&o.a.createElement(c.a,{icon:"arrow-down-alt2",className:r.a.arrowDown}))),n&&S.push(o.a.createElement(l.a,{key:"page-menu-left",type:l.c.PILL,onClick:()=>!y&&a&&a(e[f+1].key),disabled:y||E.disabled},o.a.createElement(c.a,{icon:"arrow-right-alt2"}))),o.a.createElement(s.b,{pathStyle:h.length>1?"line":"none"},{path:h,right:_,center:S})}function m({pages:e,current:t,onClickPage:a,children:n}){const[i,s]=o.a.useState(!1),l=()=>s(!0),c=()=>s(!1);return o.a.createElement(u.a,{isOpen:i,onBlur:c,placement:"bottom-start",refClassName:r.a.menuRef},({ref:e})=>o.a.createElement("a",{ref:e,className:r.a.menuLink,onClick:l},n),o.a.createElement(u.b,null,e.map(e=>{return o.a.createElement(u.c,{key:e.key,disabled:e.disabled,active:e.key===t,onClick:(n=e.key,()=>{a&&a(n),c()})},e.label);var n})))}},306:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n),i=a(191),r=a.n(i),s=a(89);function l({isOpen:e,onAccept:t,onCancel:a}){const[n,i]=o.a.useState("");function l(){t&&t(n)}return o.a.createElement(s.a,{title:"Feed name",isOpen:e,onCancel:function(){a&&a()},onAccept:l,buttons:["Save","Cancel"]},o.a.createElement("p",{className:r.a.message},"Give this feed a memorable name:"),o.a.createElement("input",{type:"text",className:r.a.input,value:n,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(l(),e.preventDefault(),e.stopPropagation())},autoFocus:!0}))}},31:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(1),o=a(66),i=a(4),r=function(e,t,a,n){var o,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i<3?o(r):i>3?o(t,a,r):o(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(o.parse)(e.search),this.unListen=null,this.listeners=[],Object(n.p)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(o.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=!0){return Object(i.i)(this.parsed[e])}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}goto(e,t=!1){this.history.push(t?this.with(e):this.at(e),{})}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(o.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(a=>{e[a]&&0===e[a].length?delete t[a]:t[a]=e[a]}),t}}r([n.o],s.prototype,"path",void 0),r([n.o],s.prototype,"parsed",void 0),r([n.h],s.prototype,"_path",null);const l=new s},32:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaViewer__container layout__flex-box",horizontal:"MediaViewer__horizontal MediaViewer__container layout__flex-box",vertical:"MediaViewer__vertical MediaViewer__container layout__flex-box",wrapper:"MediaViewer__wrapper layout__flex-box","wrapper-sidebar":"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",wrapperSidebar:"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",sidebar:"MediaViewer__sidebar","media-frame":"MediaViewer__media-frame layout__flex-box",mediaFrame:"MediaViewer__media-frame layout__flex-box","media-container":"MediaViewer__media-container",mediaContainer:"MediaViewer__media-container","media-sizer":"MediaViewer__media-sizer layout__flex-box",mediaSizer:"MediaViewer__media-sizer layout__flex-box",media:"MediaViewer__media"}},321:function(e,t,a){e.exports={"create-new-btn":"FeedsScreen__create-new-btn",createNewBtn:"FeedsScreen__create-new-btn"}},33:function(e,t,a){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},39:function(e,t,a){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},4:function(e,t,a){"use strict";a.d(t,"p",(function(){return r})),a.d(t,"g",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"q",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"l",(function(){return m})),a.d(t,"k",(function(){return p})),a.d(t,"h",(function(){return h})),a.d(t,"e",(function(){return _})),a.d(t,"o",(function(){return f})),a.d(t,"n",(function(){return g})),a.d(t,"m",(function(){return b})),a.d(t,"j",(function(){return y})),a.d(t,"f",(function(){return v})),a.d(t,"c",(function(){return E})),a.d(t,"i",(function(){return S}));var n=a(169),o=a(170);let i=0;function r(){return i++}function s(e){const t={};return Object.keys(e).forEach(a=>{const n=e[a];Array.isArray(n)?t[a]=n.slice():n instanceof Map?t[a]=new Map(n.entries()):t[a]="object"==typeof n?s(n):n}),t}function l(e,t){return Object.keys(t).forEach(a=>{e[a]=t[a]}),e}function c(e,t){return l(s(e),t)}function u(e,t){return Array.isArray(e)&&Array.isArray(t)?d(e,t):e instanceof Map&&t instanceof Map?d(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?m(e,t):e===t}function d(e,t,a){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(a){if(!a(e[n],t[n]))return!1}else if(!u(e[n],t[n]))return!1;return!0}function m(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return u(e,t);const a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;const o=new Set(a.concat(n));for(const a of o)if(!u(e[a],t[a]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function h(e,t,a){return a=null!=a?a:(e,t)=>e===t,e.filter(e=>!t.some(t=>a(e,t)))}function _(e,t,a){return a=null!=a?a:(e,t)=>e===t,e.every(e=>t.some(t=>a(e,t)))&&t.every(t=>e.some(e=>a(t,e)))}function f(e,t){const a=/(\s+)/g;let n,o=0,i=0,r="";for(;null!==(n=a.exec(e))&&o<t;){const t=n.index+n[1].length;r+=e.substr(i,t-i),i=t,o++}return i<e.length&&(r+=" ..."),r}function g(e){return Object(n.a)(Object(o.a)(e),{addSuffix:!0})}function b(e,t){const a=[];return e.forEach((e,n)=>{const o=n%t;Array.isArray(a[o])?a[o].push(e):a[o]=[e]}),a}function y(e,t){for(const a of t){const t=a();if(e(t))return t}}function v(e,t){return Math.max(0,Math.min(t.length-1,e))}function E(e,t,a){const n=e.slice();return n[t]=a,n}function S(e){return Array.isArray(e)?e[0]:e}},40:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{static getById(e){const t=n.list.find(t=>t.id===e);return!t&&n.list.length>0?n.list[0]:t}static getName(e){const t=n.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){n.list.push(e)}}n.list=[]},42:function(e,a){e.exports=t},433:function(e,t,a){},45:function(e,t,a){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,a){"use strict";function n(e,t,a={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(a))}function o(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return i}))},49:function(e,t,a){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},5:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(12),i=a(3);!function(e){let t,a,n;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let a;function n(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!o.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[a.SMALL]:t.thumbnail,[a.MEDIUM]:t.thumbnail,[a.LARGE]:t.thumbnail}}return{[a.SMALL]:t.url,[a.MEDIUM]:t.url,[a.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(a=t.Size||(t.Size={})),t.get=function(e,t){const a=n(e);return o.a.get(a,t)||(r(e)?e.thumbnail:e.url)},t.getMap=n,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!o.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var n;let i=[];o.a.has(e.thumbnails,a.SMALL)&&i.push(o.a.get(e.thumbnails,a.SMALL)+` ${t.s}w`),o.a.has(e.thumbnails,a.MEDIUM)&&i.push(o.a.get(e.thumbnails,a.MEDIUM)+` ${t.m}w`);const r=null!==(n=o.a.get(e.thumbnails,a.LARGE))&&void 0!==n?n:e.url;return i.push(r+` ${t.l}w`),i}}(a=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function a(e){switch(e){case t.PERSONAL_ACCOUNT:return i.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return i.a.Type.BUSINESS;default:return}}function n(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===i.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=a,e.getHashtagSort=n,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const o=[],r=[],s=[],l=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:n(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const u=i.b.getByUsername(e.name),d=u?a(e.type):null;u&&u.type===d?e.type===t.TAGGED_ACCOUNT?r.push(u):e.type===t.USER_STORY?s.push(u):o.push(u):l.push(e)}}),{accounts:o,tagged:r,stories:s,hashtags:c,misc:l}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(n=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let a=[];for(;e.length;)a.push(e.splice(0,t));if(a.length>0){const e=a.length-1;for(;a[e].length<t;)a[e].push({})}return a},e.isFromHashtag=e=>e.source.type===n.Type.POPULAR_HASHTAG||e.source.type===n.Type.RECENT_HASHTAG,e.isNotAChild=r}(n||(n={}))},50:function(e,t,a){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},53:function(e,t,a){"use strict";function n(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function o(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return o}))},54:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),o=a.n(n),i=a(45),r=a.n(i),s=a(104),l=a(5),c=a(72),u=a.n(c);function d(){return o.a.createElement("div",{className:u.a.root})}var m=a(10);function p(e){var{media:t,className:a,size:i,onLoadImage:c,width:u,height:p}=e,h=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["media","className","size","onLoadImage","width","height"]);const _=o.a.useRef(),f=o.a.useRef(),[g,b]=o.a.useState(!l.a.Thumbnails.has(t)),[y,v]=o.a.useState(!0),[E,S]=o.a.useState(!1);function x(){if(_.current){const e=null!=i?i:function(){const e=_.current.getBoundingClientRect();return e.width<=320?l.a.Thumbnails.Size.SMALL:e.width<=600?l.a.Thumbnails.Size.MEDIUM:l.a.Thumbnails.Size.LARGE}(),a=l.a.Thumbnails.get(t,e);_.current.src!==a&&(_.current.src=a)}}function w(){P()}function O(){t.type===l.a.Type.VIDEO?b(!0):_.current.src===t.url?S(!0):_.current.src=t.url,P()}function M(){isNaN(f.current.duration)||f.current.duration===1/0?f.current.currentTime=1:f.current.currentTime=f.current.duration/2,P()}function P(){v(!1),c&&c()}return Object(n.useLayoutEffect)(()=>{let e=new s.a(x);return _.current&&(_.current.onload=w,_.current.onerror=O,x(),e.observe(_.current)),f.current&&(f.current.onloadeddata=M),()=>{_.current&&(_.current.onload=()=>null,_.current.onerror=()=>null),f.current&&(f.current.onloadeddata=()=>null),e.disconnect()}},[t,i]),t.url&&t.url.length>0&&!E?o.a.createElement("div",Object.assign({className:Object(m.b)(r.a.root,a)},h),"VIDEO"===t.type&&g?o.a.createElement("video",{ref:f,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},o.a.createElement("source",{src:t.url}),"Your browser does not support videos"):o.a.createElement("img",Object.assign({ref:_,className:r.a.image,loading:"lazy",width:u,height:p,alt:""},m.e)),y&&o.a.createElement(d,null)):o.a.createElement("div",{className:r.a.notAvailable},o.a.createElement("span",null,"Thumbnail not available"))}},55:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",image:"MediaPopupBoxImage__image MediaPopupBoxObject__reset",loading:"MediaPopupBoxImage__loading MediaPopupBoxImage__image MediaPopupBoxObject__reset MediaPopupBoxObject__loading-animation",error:"MediaPopupBoxImage__error MediaPopupBoxImage__image MediaPopupBoxObject__reset layout__flex-box","fade-in-animation":"MediaPopupBoxImage__fade-in-animation",fadeInAnimation:"MediaPopupBoxImage__fade-in-animation"}},56:function(e,t,a){"use strict";function n(e){return t=>(t.stopPropagation(),e(t))}function o(e,t){let a;return(...n)=>{clearTimeout(a),a=setTimeout(()=>{a=null,e(...n)},t)}}function i(){}a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return i}))},57:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return o}));var n,o,i=a(31),r=a(1);!function(e){e.NEW_FEED="new",e.EDIT_FEED="edit",e.FEED_LIST="feeds",e.SETTINGS="settings",e.PROMOTIONS="promotions"}(n||(n={})),function(e){const t=Object(r.o)([]);e.getList=function(){return t},e.register=function(a){return t.push(a),function(){const e=t.slice().sort((e,t)=>{var a,n;const o=null!==(a=e.position)&&void 0!==a?a:0,i=null!==(n=t.position)&&void 0!==n?n:0;return Math.sign(o-i)});t.replace(e)}(),e},e.getScreen=function(e){return t.find(t=>t.id===e)},e.getCurrent=function(){var e;const a=null!==(e=i.a.get("screen"))&&void 0!==e?e:"";return t.find((e,t)=>a===e.id||!a&&0===t)}}(o||(o={}))},58:function(e,t,a){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},582:function(e,t,a){"use strict";a.r(t),a(278);var n=a(97),o=(a(433),a(380)),i=a(1),r=a(96),s=a(0),l=a.n(s),c=a(60),u=a(381),d=a(31),m=a(57),p=a(7),h=a(15);function _(){const e=new Date,t=3===e.getMonth()&&1===e.getDate()?"spitloght-800w.png":"spotlight-800w.png";return l.a.createElement("div",{className:"admin-loading"},l.a.createElement("div",{className:"admin-loading__perspective"},l.a.createElement("div",{className:"admin-loading__container"},l.a.createElement("img",{src:h.a.image(t),className:"admin-loading__logo",alt:"Spotlight"}))))}var f,g,b=a(6),y=a(19),v=a(401),E=a(208),S=a.n(E),x=a(8),w=a(18),O=a(22);(g=f||(f={})).list=Object(i.o)([]),g.fetch=function(){return y.a.restApi.getNotifications().then(e=>{"object"==typeof e&&Array.isArray(e.data)&&g.list.push(...e.data)}).catch(e=>{})};var M=a(402),P=a(37);const k=Object(p.b)((function(){const[e,t]=l.a.useState(!1),[a,n]=l.a.useState(!1),o=l.a.useCallback(()=>n(!0),[]),i=l.a.useCallback(()=>n(!1),[]),r=Object(w.g)(o);return!e&&f.list.length>0&&l.a.createElement(P.a,{className:S.a.menu,isOpen:a,onBlur:i,placement:"top-end"},({ref:e})=>l.a.createElement("div",{ref:e,className:S.a.beacon},l.a.createElement("button",{className:S.a.button,onClick:o,onKeyPress:r},l.a.createElement(x.a,{icon:"megaphone"}),f.list.length>0&&l.a.createElement("div",{className:S.a.counter},f.list.length))),l.a.createElement(P.b,null,f.list.map(e=>l.a.createElement(M.a,{key:e.id,notification:e})),a&&l.a.createElement("a",{className:S.a.hideLink,onClick:()=>t(!0)},"Hide")))}));var C=a(48),L=a(326);const N=new(a(216).a)([],600);var B=a(194),T=a(403);const A=document.title.replace("Spotlight","%s ‹ Spotlight");function I(){const e=d.a.get("screen"),t=m.b.getScreen(e);t&&(document.title=A.replace("%s",t.title))}d.a.listen(I);const F=Object(p.b)((function(){const[e,t]=Object(s.useState)(!1),[a,n]=Object(s.useState)(!1);Object(s.useLayoutEffect)(()=>{e||a||N.run().then(()=>{t(!0),n(!1),f.fetch()}).catch(e=>{C.a.add("load_error",Object(r.a)(B.a,{message:e.toString()}),0)})},[a,e]);const o=e=>{var t,a;const n=null!==(a=null!==(t=e.detail.message)&&void 0!==t?t:e.detail.response.data.message)&&void 0!==a?a:null;C.a.add("feed/fetch_fail",()=>l.a.createElement("div",null,l.a.createElement("p",null,"An error occurred while retrieving the media for this feed. Details:"),n&&l.a.createElement("code",null,n),l.a.createElement("p",null,"If this error persists, kindly"," ",l.a.createElement("a",{href:y.a.resources.supportUrl,target:"_blank"},"contact customer support"),".")),0)},i=()=>{C.a.add("admin/feed/import_media",C.a.message("Retrieving posts from Instagram. This may take around 30 seconds."),0)},p=()=>{C.a.remove("admin/feed/import_media")},h=()=>{C.a.add("admin/feed/import_media/fail",C.a.message("Failed to import posts from Instagram"))};return Object(s.useEffect)(()=>(I(),document.addEventListener(b.a.Events.FETCH_FAIL,o),document.addEventListener(O.a.events.onImportStart,i),document.addEventListener(O.a.events.onImportEnd,p),document.addEventListener(O.a.events.onImportFail,h),()=>{document.removeEventListener(b.a.Events.FETCH_FAIL,o),document.removeEventListener(O.a.events.onImportStart,i),document.removeEventListener(O.a.events.onImportEnd,p),document.removeEventListener(O.a.events.onImportFail,h)}),[]),e?l.a.createElement(c.b,{history:d.a.history},m.b.getList().map((e,t)=>l.a.createElement(u.a,{key:e.id,when:"screen",is:e.id,isRoot:0===t,render:()=>l.a.createElement(e.component)})),l.a.createElement(k,null),l.a.createElement(T.a,null),l.a.createElement(v.a,null),l.a.createElement(L.a,null)):l.a.createElement(l.a.Fragment,null,l.a.createElement(_,null),l.a.createElement(L.a,null))}));var j=a(25),D=a(231),R=a.n(D),H=a(4),z=a(64),U=a(9);function W({}){const e=l.a.useRef(),t=l.a.useRef([]),[a,n]=l.a.useState(0),[o,i]=l.a.useState(!1),[,r]=l.a.useState(),c=()=>{const a=function(e){const t=.4*e.width,a=t/724,n=707*a,o=22*a,i=35*a;return{bounds:e,origin:{x:(e.width-t)/2+n-i/2,y:.5*e.height+o-i/2},scale:a,particleSize:i}}(e.current.getBoundingClientRect());t.current=t.current.map(e=>{const t=e.didSike?1:Math.max(1,1.3-1.3*Math.min(1,e.life/100));return Object.assign(Object.assign({},e),{pos:{x:e.pos.x+e.vel.x*t,y:e.pos.y+e.vel.y*t},life:e.life+1})}).filter(e=>e.life<500&&e.pos.x>=0&&e.pos.y>=0&&e.pos.x+e.size<=a.bounds.width&&e.pos.y+e.size<=a.bounds.height),t.current.length<30&&10*Math.random()>7&&t.current.push((e=>{const t=Math.max(1,4*Math.random()),a=2*Math.random()*Math.PI,n={x:Math.sin(a)*t,y:Math.cos(a)*t};return{pos:Object.assign({},e.origin),vel:n,size:e.particleSize,life:1}})(a)),r(H.p)};Object(s.useEffect)(()=>{const e=setInterval(c,25);return()=>clearInterval(e)},[]);const u=function(e){let t=null;return G.forEach(([a,n])=>{e>=a&&(t=n)}),t}(a);return l.a.createElement("div",{className:R.a.root},l.a.createElement("h1",{style:{textAlign:"center"}},"Let's play!"),l.a.createElement("p",null,"Click on as many Spotlight dots as you can. We challenge you to ",l.a.createElement("strong",null,"hit ",100),"!"),l.a.createElement("br",null),l.a.createElement("div",{ref:e,style:V.container},a>0&&l.a.createElement("div",{className:R.a.score},l.a.createElement("strong",null,"Score"),": ",l.a.createElement("span",null,a)),u&&l.a.createElement("div",{className:R.a.message},l.a.createElement("span",{className:R.a.messageBubble},u)),t.current.map((e,o)=>l.a.createElement("div",{key:o,onMouseDown:()=>(e=>{const o=t.current[e].didSike?5:1;t.current.splice(e,1),n(a+o)})(o),onMouseEnter:()=>(e=>{const a=t.current[e];if(a.didSike)return;const n=1e3*Math.random();n>100&&n<150&&(a.vel={x:5*Math.sign(-a.vel.x),y:5*Math.sign(-a.vel.y)},a.life=100,a.didSike=!0)})(o),style:Object.assign(Object.assign({},V.particle),{top:e.pos.y,left:e.pos.x,width:e.size,height:e.size,backgroundColor:e.didSike?"#ffaa00":"#"+(14492491+65536*e.life+256*e.life+e.life).toString(16)})},e.didSike&&l.a.createElement("span",{style:V.sike},"x",5)))),l.a.createElement(z.a,{title:"Get 20% off Spotlight PRO",isOpen:a>=100&&!o,onClose:()=>i(!0),allowShadeClose:!1},l.a.createElement(z.a.Content,null,l.a.createElement("div",{style:{textAlign:"center"}},l.a.createElement("p",{style:{display:"inline-block",width:"70%",marginTop:10}},l.a.createElement("strong",{style:{opacity:.7}},"You were just clicking the dot in the logo, weren't you?",l.a.createElement("br",null),"It doesn't matter. You made it a 100!")),l.a.createElement("h1",null,"Get 20% off Spotlight PRO"),l.a.createElement("p",{style:{display:"inline-block",width:"60%"}},"Open up to new opportunities with hashtag feeds, filtering options, visual moderation,"," ","tagged feeds, new layouts, promotions and much more."),l.a.createElement("div",{style:{margin:"10px 0"}},l.a.createElement("a",{href:y.a.resources.upgradeUrl,target:"_blank",style:{width:"100%"}},l.a.createElement(U.a,{type:U.c.PRIMARY,size:U.b.HERO,style:{width:"80%"}},"Get 20% off Spotlight PRO")))))))}const G=[[10,l.a.createElement("span",null,"You're getting the hang of this!")],[50,l.a.createElement("span",null,"Not bad. You're half way to a 100!")],[120,l.a.createElement("span",null,"Just post a 5-star review already. You're clearly in love with us!")],[150,l.a.createElement("span",null,"Hey, we'd be curious if there were more messages too. But sadly, this is the last one. Good-bye!")],[500,l.a.createElement("span",null,"Error: User has become obsessed with clicking games.")],[1e3,l.a.createElement("span",null,"While the term Easter egg has been used to mean a hidden object for some time, in reference to an Easter egg hunt, it has come to be more commonly used to mean a message, image, or feature hidden in a video game, film, or other, usually electronic, medium. The term used in this manner was coined around 1979 by Steve Wright, the then Director of Software Development in the Atari Consumer Division, to describe a hidden message in the Atari video game Adventure. [Wikipedia]")]],V={container:{flex:1,position:"relative",backgroundColor:"#fff",backgroundImage:`url('${h.a.image("spotlight-800w.png")}')`,backgroundPosition:"center 50%",backgroundSize:"40%",backgroundRepeat:"no-repeat",borderRadius:8,marginTop:15,userSelect:"none"},particle:{position:"absolute",backgroundColor:"#dd234b",borderRadius:999,cursor:"pointer",color:"#000",userSelect:"none"},sike:{position:"relative",left:"calc(100% + 5px)",fontSize:"16px",userSelect:"none"}};var Y=a(172),q=a(232),K=a.n(q),$=a(10),X=Object(p.b)((function({}){return l.a.createElement("div",{className:K.a.root})}));Object(p.b)((function({className:e,label:t,children:a}){const n="settings-field-"+Object(H.p)();return l.a.createElement("div",{className:Object($.b)(K.a.fieldContainer,e)},l.a.createElement("div",{className:K.a.fieldLabel},l.a.createElement("label",{htmlFor:n},t)),l.a.createElement("div",{className:K.a.fieldControl},a(n)))}));var J=a(131),Q=a(161);const Z={factories:Object(n.b)({"admin/root/component":()=>F,"admin/settings/tabs/accounts":()=>({id:"accounts",label:"Manage Accounts",component:Y.a}),"admin/settings/tabs/crons":()=>({id:"crons",label:"Crons",component:Object(r.b)(J.a,{page:()=>y.a.settings.pages.find(e=>"crons"===e.id)})}),"admin/settings/tabs/advanced":e=>({id:"advanced",label:"Advanced",component:e.get("admin/settings/show_game")?e.get("admin/settings/game/component"):e.get("admin/settings/advanced/component")}),"admin/settings/show_game":()=>!0,"admin/settings/advanced/component":()=>X,"admin/settings/game/component":()=>W}),extensions:Object(n.b)({"root/children":(e,t)=>[...t,e.get("admin/root/component")],"settings/tabs":(e,t)=>[e.get("admin/settings/tabs/accounts"),e.get("admin/settings/tabs/advanced"),...t]}),run:()=>{document.addEventListener(j.b,()=>{C.a.add("sli/settings/saved",Object(r.a)(Q.a,{message:"Settings saved."}))}),document.addEventListener(j.a,e=>{C.a.add("admin/settings/save/error",C.a.message("Failed to save settings: "+e.detail.error),C.a.NO_TTL)});{const e=document.getElementById("toplevel_page_spotlight-instagram").querySelector("ul.wp-submenu").querySelectorAll("li:not(.wp-submenu-head)"),t=Array.from(e);m.b.getList().forEach((e,a)=>{const n=0===a,o=e.state||{},r=d.a.fullUrl(Object.assign({screen:e.id},o)),s=d.a.at(Object.assign({screen:e.id},o)),l=t.find(e=>e.querySelector("a").href===r);l&&(l.addEventListener("click",e=>{d.a.history.push(s,{}),e.preventDefault(),e.stopPropagation()}),Object(i.g)(()=>{var t;const a=null!==(t=d.a.get("screen"))&&void 0!==t?t:"",o=e.id===a||!a&&n;l.classList.toggle("current",o)}))})}}};var ee=a(41),te=a(3),ae=a(321),ne=a.n(ae),oe=a(186),ie=a(59),re=a(77),se=a.n(re),le=a(132),ce=a(40),ue=a(73),de=a(134),me=a(256),pe=a(103),he=a(29);function _e(){const[e,t]=l.a.useState(null),a={cols:{name:se.a.nameCol,sources:se.a.sourcesCol,usages:se.a.usagesCol,actions:se.a.actionsCol},cells:{name:se.a.nameCell,sources:se.a.sourcesCell,usages:se.a.usagesCell,actions:se.a.actionsCell}};return l.a.createElement("div",{className:"feeds-list"},l.a.createElement(le.a,{styleMap:a,cols:[{id:"name",label:"Name",render:e=>{const t=d.a.at({screen:m.a.EDIT_FEED,id:e.id.toString()});return l.a.createElement("div",null,l.a.createElement(ie.a,{to:t,className:se.a.name},e.name?e.name:"(no name)"),l.a.createElement("div",{className:se.a.metaList},l.a.createElement("span",{className:se.a.id},"ID: ",e.id),l.a.createElement("span",{className:se.a.layout},ce.a.getName(e.options.layout))))}},{id:"sources",label:"Shows posts from",render:e=>l.a.createElement(fe,{feed:e,onClickAccount:t})},{id:"usages",label:"Instances",render:e=>l.a.createElement(ge,{feed:e})},{id:"actions",label:"Actions",render:e=>l.a.createElement("div",{className:se.a.actionsList},l.a.createElement(P.f,null,({ref:e,openMenu:t})=>l.a.createElement(U.a,{ref:e,className:se.a.actionsBtn,type:U.c.PILL,size:U.b.NORMAL,onClick:t},l.a.createElement(de.a,null)),l.a.createElement(P.b,null,l.a.createElement(me.a,{feed:e},l.a.createElement(P.c,null,"Copy shortcode")),l.a.createElement(P.c,{onClick:()=>(e=>{O.a.importMedia(e.options).then(()=>{C.a.add("admin/feeds/import/done",C.a.message(`Finished importing posts for "${e.name}"`))}).catch(()=>{C.a.add("admin/feeds/import/error",C.a.message(`Something went wrong while importing posts for "${e.name}"`))})})(e)},"Update posts"),l.a.createElement(P.d,null),l.a.createElement(P.c,{onClick:()=>(e=>{C.a.add("admin/feeds/clear_cache/wait",C.a.message(`Clearing the cache for "${e.name}". Please wait ...`),C.a.NO_TTL),y.a.restApi.clearFeedCache(e).then(()=>{C.a.remove("admin/feeds/clear_cache/wait"),C.a.add("admin/feeds/clear_cache/done",C.a.message(`Finished clearing the cache for "${e.name}."`))}).catch(()=>{C.a.add("admin/feeds/clear_cache/error",C.a.message(`Something went wrong while clearing the cache for "${e.name}"`))})})(e)},"Clear cache"),l.a.createElement(P.c,{onClick:()=>(e=>{confirm("Are you sure you want to delete this feed? This cannot be undone.")&&ee.a.deleteFeed(e)})(e)},"Delete"))))}],rows:ee.a.list}),l.a.createElement(pe.a,{isOpen:null!==e,account:e,onClose:()=>t(null)}))}function fe({feed:e,onClickAccount:t}){let a=[];const n=b.a.Options.getSources(e.options);return n.accounts.forEach(e=>{e&&a.push(l.a.createElement(be,{account:e,onClick:()=>t(e)}))}),n.tagged.forEach(e=>{e&&a.push(l.a.createElement(be,{account:e,onClick:()=>t(e),isTagged:!0}))}),n.hashtags.forEach(e=>a.push(l.a.createElement(ye,{hashtag:e}))),0===a.length&&a.push(l.a.createElement("div",{className:se.a.noSourcesMsg},l.a.createElement(x.a,{icon:"warning"}),l.a.createElement("span",null,"Feed has no sources"))),l.a.createElement("div",{className:se.a.sourcesList},a.map((e,t)=>e&&l.a.createElement(ve,{key:t},e)))}const ge=({feed:e})=>l.a.createElement("div",{className:se.a.usagesList},e.usages.map((e,t)=>l.a.createElement("div",{key:t,className:se.a.usage},l.a.createElement("a",{className:se.a.usageLink,href:e.link,target:"_blank"},e.name),l.a.createElement("span",{className:se.a.usageType},"(",e.type,")"))));function be({account:e,isTagged:t,onClick:a}){return l.a.createElement("div",{className:se.a.accountSource,onClick:a,role:a?"button":void 0,tabIndex:0},t?l.a.createElement(x.a,{icon:"tag"}):l.a.createElement(ue.a,{className:se.a.tinyAccountPic,account:e}),e.username)}function ye({hashtag:e}){return l.a.createElement("a",{className:se.a.hashtagSource,href:Object(he.b)(e.tag),target:"_blank"},l.a.createElement(x.a,{icon:"admin-site-alt3"}),l.a.createElement("span",null,"#",e.tag))}const ve=({children:e})=>l.a.createElement("div",{className:se.a.source},e);var Ee=a(116),Se=a(272),xe=a.n(Se);const we=d.a.at({screen:m.a.NEW_FEED}),Oe=()=>{const[e,t]=l.a.useState(!1);return l.a.createElement(Ee.a,{className:xe.a.root,isTransitioning:e},l.a.createElement("div",null,l.a.createElement("h1",null,"Start engaging with your audience"),l.a.createElement(Ee.a.Thin,null,l.a.createElement("p",null,"Connect with more people by embedding one or more Instagram feeds on this website."),l.a.createElement("p",null,"It only takes 3 steps! Let’s get going!"),l.a.createElement(Ee.a.StepList,null,l.a.createElement(Ee.a.Step,{num:1,isDone:te.b.list.length>0},l.a.createElement("span",null,"Connect your Instagram Account")),l.a.createElement(Ee.a.Step,{num:2},l.a.createElement("span",null,"Design your feed")),l.a.createElement(Ee.a.Step,{num:3},l.a.createElement("span",null,"Embed it on your site"))))),l.a.createElement("div",{className:xe.a.callToAction},l.a.createElement(Ee.a.HeroButton,{onClick:()=>{t(!0),setTimeout(()=>d.a.history.push(we,{}),Ee.a.TRANSITION_DURATION)}},te.b.list.length>0?"Design your feed":"Connect your Instagram Account"),l.a.createElement(Ee.a.HelpMsg,{className:xe.a.contactUs},"If you need help at any time,"," ",l.a.createElement("a",{href:y.a.resources.supportUrl,target:"_blank",style:{whiteSpace:"nowrap"}},"contact me here"),".",l.a.createElement("br",null),"- Mark Zahra, Spotlight")))};var Me=a(187),Pe=Object(p.b)((function(){return l.a.createElement(oe.a,{navbar:Me.a},l.a.createElement("div",{className:ne.a.root},ee.a.hasFeeds()?l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:ne.a.createNewBtn},l.a.createElement(ie.a,{to:d.a.at({screen:m.a.NEW_FEED}),className:"button button-primary button-large"},"Create a new feed")),l.a.createElement(_e,null)):l.a.createElement(Oe,null)))})),ke=a(106),Ce=a(224),Le=a(120),Ne=a(407);function Be({feed:e,onSave:t}){const a=l.a.useCallback(e=>new Promise(a=>{const n=null===e.id;ke.a.saveFeed(e).then(()=>{t&&t(e),n||a()})}),[]),n=l.a.useCallback(()=>{d.a.goto({screen:m.a.FEED_LIST})},[]),o=l.a.useCallback(e=>ke.a.editorTab=e,[]),i={tabs:Le.a.tabs.slice(),showNameField:!0,showDoneBtn:!0,showCancelBtn:!0,doneBtnText:"Save",cancelBtnText:"Cancel"};return i.tabs.push({id:"embed",label:"Embed",sidebar:e=>l.a.createElement(Ne.a,Object.assign({},e))}),l.a.createElement(Ce.a,{feed:e,firstTab:ke.a.editorTab,requireName:!0,confirmOnCancel:!0,useCtrlS:!0,onSave:a,onCancel:n,onChangeTab:o,config:i})}var Te=ee.a.SavedFeed,Ae=a(35);const Ie=()=>l.a.createElement("div",null,l.a.createElement(Ae.a,{type:Ae.b.ERROR,showIcon:!0},"Feed does not exist.",l.a.createElement(ie.a,{to:d.a.with({screen:"feeds"})},"Go back")));var Fe=a(217),je=a(162);m.b.register({id:"feeds",title:"Feeds",position:0,component:Pe}),m.b.register({id:"new",title:"Add New",position:10,component:function(){return ke.a.edit(new Te),l.a.createElement(Be,{feed:ke.a.feed})}}),m.b.register({id:"edit",title:"Edit",isHidden:!0,component:function(){const e=(()=>{const e=d.a.get("id");return e?parseInt(e):null})(),t=ee.a.getById(e);return e&&t?(ke.a.feed.id!==e&&ke.a.edit(t),Object(s.useEffect)(()=>()=>ke.a.cancelEditor(),[]),l.a.createElement(Be,{feed:ke.a.feed})):l.a.createElement(Ie,null)}}),m.b.register({id:"promotions",title:"Promotions",position:40,component:Object(r.a)(Fe.a,{isFakePro:!0})}),m.b.register({id:"settings",title:"Settings",position:50,component:je.b}),N.add(()=>ee.a.loadFeeds()),N.add(()=>te.b.loadAccounts()),N.add(()=>j.c.load());const De=document.getElementById(y.a.config.rootId);if(De){const e=[o.a,Z].filter(e=>null!==e);De.classList.add("wp-core-ui-override"),new n.a("admin",De,e).run()}},6:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(51),o=a.n(n),i=a(1),r=a(2),s=a(40),l=a(3),c=a(4),u=a(29),d=a(16),m=a(22),p=a(56),h=a(11),_=a(12),f=a(15),g=function(e,t,a,n){var o,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(r=(i<3?o(r):i>3?o(t,a,r):o(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};class b{constructor(e=new b.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new b.Options(e),this.localMedia=i.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(i.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(i.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(i.p)(()=>this._media,e=>this.media=e),Object(i.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(i.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,b.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,a){return this.cancelFetch(),b.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};a&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,n&&n()}).catch(e=>{var t;if(o.a.isCancel(e)||void 0===e.response)return null;const a=new b.Events.FetchFailEvent(b.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(a),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}g([i.o],b.prototype,"media",void 0),g([i.o],b.prototype,"canLoadMore",void 0),g([i.o],b.prototype,"stories",void 0),g([i.o],b.prototype,"numLoadedMore",void 0),g([i.o],b.prototype,"options",void 0),g([i.o],b.prototype,"totalMedia",void 0),g([i.o],b.prototype,"mode",void 0),g([i.o],b.prototype,"isLoaded",void 0),g([i.o],b.prototype,"isLoading",void 0),g([i.f],b.prototype,"reload",void 0),g([i.o],b.prototype,"localMedia",void 0),g([i.o],b.prototype,"numMediaShown",void 0),g([i.o],b.prototype,"numMediaToShow",void 0),g([i.o],b.prototype,"numMediaPerPage",void 0),g([i.h],b.prototype,"_media",null),g([i.h],b.prototype,"_numMediaShown",null),g([i.h],b.prototype,"_numMediaPerPage",null),g([i.h],b.prototype,"_canLoadMore",null),g([i.f],b.prototype,"loadMore",null),g([i.f],b.prototype,"load",null),g([i.f],b.prototype,"loadMedia",null),g([i.f],b.prototype,"addLocalMedia",null),function(e){let t,a,n,o,m,p,b,y,v,E;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class S{constructor(e={}){S.setFromObject(this,e)}static setFromObject(t,a={}){var n,o,i,c,u,d,m,p,h,f,g,b,y,v,E;const S=a.accounts?a.accounts.slice():e.DefaultOptions.accounts;t.accounts=S.filter(e=>!!e).map(e=>parseInt(e.toString()));const x=a.tagged?a.tagged.slice():e.DefaultOptions.tagged;return t.tagged=x.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=a.hashtags?a.hashtags.slice():e.DefaultOptions.hashtags,t.layout=s.a.getById(a.layout).id,t.numColumns=r.a.normalize(a.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(a.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderPostsPerPage=r.a.normalize(a.sliderPostsPerPage,e.DefaultOptions.sliderPostsPerPage),t.sliderNumScrollPosts=r.a.normalize(a.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.mediaType=a.mediaType||e.DefaultOptions.mediaType,t.postOrder=a.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(a.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(a.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(a.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(a.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(a.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(a.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(a.textSize,e.DefaultOptions.textSize),t.bgColor=a.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=a.hoverInfo?a.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=a.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=a.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(a.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(a.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(n=a.headerAccount)&&void 0!==n?n:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===l.b.getById(t.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(a.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(a.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(a.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=a.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=a.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(a.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(o=a.customProfilePic)&&void 0!==o?o:e.DefaultOptions.customProfilePic,t.customBioText=a.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=a.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=a.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(a.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(a.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(c=a.captionRemoveDots)&&void 0!==c?c:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(a.captionSize,e.DefaultOptions.captionSize),t.captionColor=a.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(a.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(a.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(a.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(u=a.likesIconColor)&&void 0!==u?u:e.DefaultOptions.likesIconColor,t.commentsIconColor=a.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(d=a.lightboxShowSidebar)&&void 0!==d?d:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=a.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(a.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=a.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=a.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=a.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=a.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(a.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(p=a.followBtnText)&&void 0!==p?p:e.DefaultOptions.followBtnText,t.followBtnTextColor=a.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=a.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(a.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=a.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=a.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=a.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=a.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(h=a.hashtagWhitelistSettings)&&void 0!==h?h:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(f=a.hashtagBlacklistSettings)&&void 0!==f?f:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(g=a.captionWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=a.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=a.moderation||e.DefaultOptions.moderation,t.moderationMode=a.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(y=a.promotionEnabled)&&void 0!==y?y:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(v=a.autoPromotionsEnabled)&&void 0!==v?v:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(E=a.globalPromotionsEnabled)&&void 0!==E?E:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(a.promotions)?t.promotions=_.a.fromArray(a.promotions):a.promotions&&a.promotions instanceof Map?t.promotions=_.a.fromMap(a.promotions):"object"==typeof a.promotions?t.promotions=a.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=l.b.idsToAccounts(e.accounts),a=l.b.idsToAccounts(e.tagged);return{all:t.concat(a),accounts:t,tagged:a}}static getSources(e){return{accounts:l.b.idsToAccounts(e.accounts),tagged:l.b.idsToAccounts(e.tagged),hashtags:l.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const a=e.Options.getSources(t),n=a.accounts.length>0||a.tagged.length>0,o=a.hashtags.length>0;return n||o}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}g([i.o],S.prototype,"accounts",void 0),g([i.o],S.prototype,"hashtags",void 0),g([i.o],S.prototype,"tagged",void 0),g([i.o],S.prototype,"layout",void 0),g([i.o],S.prototype,"numColumns",void 0),g([i.o],S.prototype,"highlightFreq",void 0),g([i.o],S.prototype,"sliderPostsPerPage",void 0),g([i.o],S.prototype,"sliderNumScrollPosts",void 0),g([i.o],S.prototype,"mediaType",void 0),g([i.o],S.prototype,"postOrder",void 0),g([i.o],S.prototype,"numPosts",void 0),g([i.o],S.prototype,"linkBehavior",void 0),g([i.o],S.prototype,"feedWidth",void 0),g([i.o],S.prototype,"feedHeight",void 0),g([i.o],S.prototype,"feedPadding",void 0),g([i.o],S.prototype,"imgPadding",void 0),g([i.o],S.prototype,"textSize",void 0),g([i.o],S.prototype,"bgColor",void 0),g([i.o],S.prototype,"textColorHover",void 0),g([i.o],S.prototype,"bgColorHover",void 0),g([i.o],S.prototype,"hoverInfo",void 0),g([i.o],S.prototype,"showHeader",void 0),g([i.o],S.prototype,"headerInfo",void 0),g([i.o],S.prototype,"headerAccount",void 0),g([i.o],S.prototype,"headerStyle",void 0),g([i.o],S.prototype,"headerTextSize",void 0),g([i.o],S.prototype,"headerPhotoSize",void 0),g([i.o],S.prototype,"headerTextColor",void 0),g([i.o],S.prototype,"headerBgColor",void 0),g([i.o],S.prototype,"headerPadding",void 0),g([i.o],S.prototype,"customBioText",void 0),g([i.o],S.prototype,"customProfilePic",void 0),g([i.o],S.prototype,"includeStories",void 0),g([i.o],S.prototype,"storiesInterval",void 0),g([i.o],S.prototype,"showCaptions",void 0),g([i.o],S.prototype,"captionMaxLength",void 0),g([i.o],S.prototype,"captionRemoveDots",void 0),g([i.o],S.prototype,"captionSize",void 0),g([i.o],S.prototype,"captionColor",void 0),g([i.o],S.prototype,"showLikes",void 0),g([i.o],S.prototype,"showComments",void 0),g([i.o],S.prototype,"lcIconSize",void 0),g([i.o],S.prototype,"likesIconColor",void 0),g([i.o],S.prototype,"commentsIconColor",void 0),g([i.o],S.prototype,"lightboxShowSidebar",void 0),g([i.o],S.prototype,"numLightboxComments",void 0),g([i.o],S.prototype,"showLoadMoreBtn",void 0),g([i.o],S.prototype,"loadMoreBtnText",void 0),g([i.o],S.prototype,"loadMoreBtnTextColor",void 0),g([i.o],S.prototype,"loadMoreBtnBgColor",void 0),g([i.o],S.prototype,"autoload",void 0),g([i.o],S.prototype,"showFollowBtn",void 0),g([i.o],S.prototype,"followBtnText",void 0),g([i.o],S.prototype,"followBtnTextColor",void 0),g([i.o],S.prototype,"followBtnBgColor",void 0),g([i.o],S.prototype,"followBtnLocation",void 0),g([i.o],S.prototype,"hashtagWhitelist",void 0),g([i.o],S.prototype,"hashtagBlacklist",void 0),g([i.o],S.prototype,"captionWhitelist",void 0),g([i.o],S.prototype,"captionBlacklist",void 0),g([i.o],S.prototype,"hashtagWhitelistSettings",void 0),g([i.o],S.prototype,"hashtagBlacklistSettings",void 0),g([i.o],S.prototype,"captionWhitelistSettings",void 0),g([i.o],S.prototype,"captionBlacklistSettings",void 0),g([i.o],S.prototype,"moderation",void 0),g([i.o],S.prototype,"moderationMode",void 0),e.Options=S;class x{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.d)(Object(c.o)(t,this.captionMaxLength)):t}static compute(t,a=r.a.Mode.DESKTOP){const n=new x({accounts:l.b.filterExisting(t.accounts),tagged:l.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:s.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,a,!0),sliderPostsPerPage:r.a.get(t.sliderPostsPerPage,a,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,a,!0),linkBehavior:r.a.get(t.linkBehavior,a,!0),bgColor:Object(d.a)(t.bgColor),textColorHover:Object(d.a)(t.textColorHover),bgColorHover:Object(d.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,a,!0),headerInfo:r.a.get(t.headerInfo,a,!0),headerStyle:r.a.get(t.headerStyle,a,!0),headerTextColor:Object(d.a)(t.headerTextColor),headerBgColor:Object(d.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,a,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,a,!0),captionMaxLength:r.a.get(t.captionMaxLength,a,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(d.a)(t.captionColor),showLikes:r.a.get(t.showLikes,a,!0),showComments:r.a.get(t.showComments,a,!0),likesIconColor:Object(d.a)(t.likesIconColor),commentsIconColor:Object(d.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,a,!0),loadMoreBtnTextColor:Object(d.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,a,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,a,!0),followBtnTextColor:Object(d.a)(t.followBtnTextColor),followBtnBgColor:Object(d.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=this.getNumCols(t,a),n.numPosts=this.getNumPosts(t,a),n.allAccounts=n.accounts.concat(n.tagged.filter(e=>!n.accounts.includes(e))),n.allAccounts.length>0&&(n.account=t.headerAccount&&n.allAccounts.includes(t.headerAccount)?l.b.getById(t.headerAccount):l.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:l.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showBio=n.headerInfo.some(t=>t===e.HeaderInfo.BIO),n.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==n.account?l.b.getBioText(n.account):"";n.bioText=Object(u.d)(e),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(t.feedWidth,a,"100%"),n.feedHeight=this.normalizeCssSize(t.feedHeight,a,"auto"),n.feedOverflowX=r.a.get(t.feedWidth,a)?"auto":void 0,n.feedOverflowY=r.a.get(t.feedHeight,a)?"auto":void 0,n.feedPadding=this.normalizeCssSize(t.feedPadding,a,"0"),n.imgPadding=this.normalizeCssSize(t.imgPadding,a,"0"),n.textSize=this.normalizeCssSize(t.textSize,a,"inherit",!0),n.headerTextSize=this.normalizeCssSize(t.headerTextSize,a,"inherit"),n.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,a,"50px"),n.captionSize=this.normalizeCssSize(t.captionSize,a,"inherit"),n.lcIconSize=this.normalizeCssSize(t.lcIconSize,a,"inherit"),n.buttonPadding=Math.max(10,r.a.get(t.imgPadding,a))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,a=0){const n=parseInt(r.a.get(e,t)+"");return isNaN(n)?t===r.a.Mode.DESKTOP?a:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,a):n}static normalizeCssSize(e,t,a=null,n=!1){const o=r.a.get(e,t,n);return o?o+"px":a}}function w(e,t){if(f.a.isPro)return Object(c.j)(h.a.isValid,[()=>O(e,t),()=>t.globalPromotionsEnabled&&h.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&h.a.getAutoPromo(e)])}function O(e,t){return e?h.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=x,function(e){e.POPULAR="popular",e.RECENT="recent"}(a=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(n=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(o=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(m=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(p=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(b=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(y=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(v=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(E=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderPostsPerPage:{desktop:5},sliderNumScrollPosts:{desktop:1},mediaType:n.ALL,postOrder:m.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:o.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[y.PROFILE_PIC,y.BIO]},headerAccount:null,headerStyle:{desktop:b.NORMAL,phone:b.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:v.HEADER,phone:v.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:E.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=w,e.getFeedPromo=O,e.executeMediaClick=function(e,t){const a=w(e,t),n=h.a.getConfig(a),o=h.a.getType(a);return!(!o||!o.isValid(n)||"function"!=typeof o.onMediaClick)&&o.onMediaClick(e,n)},e.getLink=function(e,t){var a,n;const o=w(e,t),i=h.a.getConfig(o),r=h.a.getType(o);if(void 0===r||!r.isValid(i))return{text:null,url:null,newTab:!1};const[s,l]=r.getPopupLink?null!==(a=r.getPopupLink(e,i))&&void 0!==a?a:null:[null,!1];return{text:s,url:r.getMediaUrl&&null!==(n=r.getMediaUrl(e,i))&&void 0!==n?n:null,newTab:l,icon:"external"}}}(b||(b={}))},61:function(e,t,a){e.exports={root:"GenericNavbar__root",list:"GenericNavbar__list","left-list":"GenericNavbar__left-list GenericNavbar__list",leftList:"GenericNavbar__left-list GenericNavbar__list",item:"GenericNavbar__item","center-list":"GenericNavbar__center-list GenericNavbar__list",centerList:"GenericNavbar__center-list GenericNavbar__list","right-list":"GenericNavbar__right-list GenericNavbar__list",rightList:"GenericNavbar__right-list GenericNavbar__list","path-list":"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",pathList:"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list","path-segment":"GenericNavbar__path-segment",pathSegment:"GenericNavbar__path-segment",separator:"GenericNavbar__separator GenericNavbar__item"}},62:function(e,t,a){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},65:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return o}));const n=(e,t)=>e.startsWith(t)?e:t+e,o=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},69:function(e,t,a){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}},70:function(e,t,a){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},71:function(e,t,a){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},72:function(e,t,a){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},73:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),i=a(98),r=a.n(i),s=a(3),l=a(10);function c(e){var{account:t,square:a,className:n}=e,i=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["account","square","className"]);const c=s.b.getProfilePicUrl(t),u=Object(l.b)(a?r.a.square:r.a.round,n);return o.a.createElement("img",Object.assign({},i,{className:u,src:s.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}},77:function(e,t,a){e.exports={"name-col":"FeedsList__name-col",nameCol:"FeedsList__name-col","sources-col":"FeedsList__sources-col",sourcesCol:"FeedsList__sources-col","actions-col":"FeedsList__actions-col",actionsCol:"FeedsList__actions-col","actions-cell":"FeedsList__actions-cell",actionsCell:"FeedsList__actions-cell",name:"FeedsList__name layout__text-overflow-ellipsis","meta-list":"FeedsList__meta-list",metaList:"FeedsList__meta-list","meta-info":"FeedsList__meta-info",metaInfo:"FeedsList__meta-info",id:"FeedsList__id FeedsList__meta-info",layout:"FeedsList__layout FeedsList__meta-info","sources-list":"FeedsList__sources-list layout__flex-row",sourcesList:"FeedsList__sources-list layout__flex-row",source:"FeedsList__source layout__text-overflow-ellipsis","account-source":"FeedsList__account-source",accountSource:"FeedsList__account-source","tiny-account-pic":"FeedsList__tiny-account-pic",tinyAccountPic:"FeedsList__tiny-account-pic","hashtag-source":"FeedsList__hashtag-source",hashtagSource:"FeedsList__hashtag-source","no-sources-msg":"FeedsList__no-sources-msg",noSourcesMsg:"FeedsList__no-sources-msg","usages-list":"FeedsList__usages-list layout__flex-column",usagesList:"FeedsList__usages-list layout__flex-column",usage:"FeedsList__usage layout__flex-row layout__text-overflow-ellipsis","usage-link":"FeedsList__usage-link layout__text-overflow-ellipsis",usageLink:"FeedsList__usage-link layout__text-overflow-ellipsis","usage-type":"FeedsList__usage-type",usageType:"FeedsList__usage-type","actions-list":"FeedsList__actions-list",actionsList:"FeedsList__actions-list","actions-btn":"FeedsList__actions-btn",actionsBtn:"FeedsList__actions-btn","sources-cell":"FeedsList__sources-cell",sourcesCell:"FeedsList__sources-cell","usages-cell":"FeedsList__usages-cell",usagesCell:"FeedsList__usages-cell","usages-col":"FeedsList__usages-col",usagesCol:"FeedsList__usages-col"}},78:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(50),r=a.n(i),s=a(7),l=a(6),c=a(20),u=a.n(c),d=a(71),m=a.n(d);const p=Object(s.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,a={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return o.a.createElement("a",{href:t,target:"__blank",className:m.a.link},o.a.createElement("button",{className:m.a.button,style:a},e.followBtnText))});var h=a(17),_=a.n(h),f=a(5),g=a(170),b=a(589),y=a(42),v=a.n(y),E=a(18),S=a(8),x=Object(s.b)((function({stories:e,options:t,onClose:a}){e.sort((e,t)=>{const a=Object(g.a)(e.timestamp).getTime(),n=Object(g.a)(t.timestamp).getTime();return a<n?-1:a==n?0:1});const[i,r]=o.a.useState(0),s=e.length-1,[l,c]=o.a.useState(0),[u,d]=o.a.useState(0);Object(n.useEffect)(()=>{0!==l&&c(0)},[i]);const m=i<s,p=i>0,h=()=>a&&a(),y=()=>i<s?r(i+1):h(),x=()=>r(e=>Math.max(e-1,0)),M=e[i],P="https://instagram.com/"+t.account.username,k=M.type===f.a.Type.VIDEO?u:t.storiesInterval;Object(E.d)("keydown",e=>{switch(e.key){case"Escape":h();break;case"ArrowLeft":x();break;case"ArrowRight":y();break;default:return}e.preventDefault(),e.stopPropagation()});const C=o.a.createElement("div",{className:_.a.root},o.a.createElement("div",{className:_.a.container},o.a.createElement("div",{className:_.a.header},o.a.createElement("a",{href:P,target:"_blank"},o.a.createElement("img",{className:_.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),o.a.createElement("a",{href:P,className:_.a.username,target:"_blank"},t.account.username),o.a.createElement("div",{className:_.a.date},Object(b.a)(Object(g.a)(M.timestamp),{addSuffix:!0}))),o.a.createElement("div",{className:_.a.progress},e.map((e,t)=>o.a.createElement(w,{key:e.id,duration:k,animate:t===i,isDone:t<i}))),o.a.createElement("div",{className:_.a.content},p&&o.a.createElement("div",{className:_.a.prevButton,onClick:x,role:"button"},o.a.createElement(S.a,{icon:"arrow-left-alt2"})),o.a.createElement("div",{className:_.a.media},o.a.createElement(O,{key:M.id,media:M,imgDuration:t.storiesInterval,onGetDuration:d,onEnd:()=>m?y():h()})),m&&o.a.createElement("div",{className:_.a.nextButton,onClick:y,role:"button"},o.a.createElement(S.a,{icon:"arrow-right-alt2"})),o.a.createElement("div",{className:_.a.closeButton,onClick:h,role:"button"},o.a.createElement(S.a,{icon:"no-alt"})))));return v.a.createPortal(C,document.body)}));function w({animate:e,isDone:t,duration:a}){const n=e?_.a.progressOverlayAnimating:t?_.a.progressOverlayDone:_.a.progressOverlay,i={animationDuration:a+"s"};return o.a.createElement("div",{className:_.a.progressSegment},o.a.createElement("div",{className:n,style:i}))}function O({media:e,imgDuration:t,onGetDuration:a,onEnd:n}){return e.type===f.a.Type.VIDEO?o.a.createElement(P,{media:e,onEnd:n,onGetDuration:a}):o.a.createElement(M,{media:e,onEnd:n,duration:t})}function M({media:e,duration:t,onEnd:a}){const[i,r]=o.a.useState(!1);return Object(n.useEffect)(()=>{const e=i?setTimeout(a,1e3*t):null;return()=>clearTimeout(e)},[e,i]),o.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function P({media:e,onEnd:t,onGetDuration:a}){const n=o.a.useRef();return o.a.createElement("video",{ref:n,src:e.url,poster:e.thumbnail,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>a(n.current.duration),onEnded:t},o.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var k=a(3),C=Object(s.b)((function({feed:e,options:t}){const[a,n]=o.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,s=e.stories.filter(e=>e.username===i.username),c=s.length>0,d=t.headerInfo.includes(l.a.HeaderInfo.MEDIA_COUNT),m=t.headerInfo.includes(l.a.HeaderInfo.FOLLOWERS)&&i.type!=k.a.Type.PERSONAL,h=t.headerInfo.includes(l.a.HeaderInfo.PROFILE_PIC),_=t.includeStories&&c,f=t.headerStyle===l.a.HeaderStyle.BOXED,g={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},b=_?"button":void 0,y={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:_?"pointer":"normal"},v=t.showFollowBtn&&(t.followBtnLocation===l.a.FollowBtnLocation.HEADER||t.followBtnLocation===l.a.FollowBtnLocation.BOTH),E={justifyContent:t.showBio&&f?"flex-start":"center"},S=o.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),w=_&&c?u.a.profilePicWithStories:u.a.profilePic;return o.a.createElement("div",{className:L(t.headerStyle),style:g},o.a.createElement("div",{className:u.a.leftContainer},h&&o.a.createElement("div",{className:w,style:y,role:b,onClick:()=>{_&&n(0)}},_?S:o.a.createElement("a",{href:r,target:"_blank"},S)),o.a.createElement("div",{className:u.a.info},o.a.createElement("div",{className:u.a.username},o.a.createElement("a",{href:r,target:"_blank",style:{color:t.headerTextColor}},o.a.createElement("span",null,"@"),o.a.createElement("span",null,i.username))),t.showBio&&o.a.createElement("div",{className:u.a.bio},t.bioText),(d||m)&&o.a.createElement("div",{className:u.a.counterList},d&&o.a.createElement("div",{className:u.a.counter},o.a.createElement("span",null,i.mediaCount)," posts"),m&&o.a.createElement("div",{className:u.a.counter},o.a.createElement("span",null,i.followersCount)," followers")))),o.a.createElement("div",{className:u.a.rightContainer},v&&o.a.createElement("div",{className:u.a.followButton,style:E},o.a.createElement(p,{options:t}))),_&&null!==a&&o.a.createElement(x,{stories:s,options:t,onClose:()=>{n(null)}}))}));function L(e){switch(e){case l.a.HeaderStyle.NORMAL:return u.a.normalStyle;case l.a.HeaderStyle.CENTERED:return u.a.centeredStyle;case l.a.HeaderStyle.BOXED:return u.a.boxedStyle;default:return}}var N=a(93),B=a.n(N);const T=Object(s.b)(({feed:e,options:t})=>{const a=o.a.useRef(),n=Object(E.k)(a,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return o.a.createElement("button",{ref:a,className:B.a.root,style:i,onClick:()=>{n(),e.loadMore()}},e.isLoading?o.a.createElement("span",null,"Loading ..."):o.a.createElement("span",null,e.options.loadMoreBtnText))});var A=a(87);t.a=Object(s.b)((function({children:e,feed:t,options:a}){const[n,i]=o.a.useState(null),s=o.a.useCallback(e=>{const n=t.media.findIndex(t=>t.id===e.id);if(!t.options.promotionEnabled||!l.a.executeMediaClick(e,t.options))switch(a.linkBehavior){case l.a.LinkBehavior.LIGHTBOX:return void i(n);case l.a.LinkBehavior.NEW_TAB:return void window.open(e.permalink,"_blank");case l.a.LinkBehavior.SELF:return void window.open(e.permalink,"_self")}},[t,a.linkBehavior]),c={width:a.feedWidth,height:a.feedHeight,fontSize:a.textSize,overflowX:a.feedOverflowX,overflowY:a.feedOverflowY},u={backgroundColor:a.bgColor,padding:a.feedPadding},d={marginBottom:a.imgPadding},m={marginTop:a.buttonPadding},h=a.showHeader&&o.a.createElement("div",{style:d},o.a.createElement(C,{feed:t,options:a})),_=a.showLoadMoreBtn&&t.canLoadMore&&o.a.createElement("div",{className:r.a.loadMoreBtn,style:m},o.a.createElement(T,{feed:t,options:a})),f=a.showFollowBtn&&(a.followBtnLocation===l.a.FollowBtnLocation.BOTTOM||a.followBtnLocation===l.a.FollowBtnLocation.BOTH)&&o.a.createElement("div",{className:r.a.followBtn,style:m},o.a.createElement(p,{options:a})),g=t.isLoading?new Array(a.numPosts).fill(r.a.fakeMedia):[];return o.a.createElement("div",{className:r.a.root,style:c},o.a.createElement("div",{className:r.a.wrapper,style:u},e({mediaList:t.media,openMedia:s,header:h,loadMoreBtn:_,followBtn:f,loadingMedia:g})),null!==n&&o.a.createElement(A.a,{feed:t,current:n,numComments:a.numLightboxComments,showSidebar:a.lightboxShowSidebar,onRequestClose:()=>i(null)}))}))},79:function(e,t,a){"use strict";var n=a(49),o=a.n(n),i=a(0),r=a.n(i),s=a(5),l=a(7),c=a(23),u=a.n(c),d=a(170),m=a(593),p=a(592),h=a(6),_=a(8),f=a(4),g=a(3),b=Object(l.b)((function({options:e,media:t}){var a;const n=r.a.useRef(),[o,l]=r.a.useState(null);Object(i.useEffect)(()=>{n.current&&l(n.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===h.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==s.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===s.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const b=e.hoverInfo.some(e=>e===h.a.HoverInfo.CAPTION),y=e.hoverInfo.some(e=>e===h.a.HoverInfo.USERNAME),v=e.hoverInfo.some(e=>e===h.a.HoverInfo.DATE),E=e.hoverInfo.some(e=>e===h.a.HoverInfo.INSTA_LINK),S=null!==(a=t.caption)&&void 0!==a?a:"",x=t.timestamp?Object(d.a)(t.timestamp):null,w=t.timestamp?Object(m.a)(x).toString():null,O=t.timestamp?Object(p.a)(x,"HH:mm - do MMM yyyy"):null,M=t.timestamp?Object(f.n)(t.timestamp):null,P={color:e.textColorHover,backgroundColor:e.bgColorHover};let k=null;if(null!==o){const a=Math.sqrt(1.3*(o+30)),n=Math.sqrt(1.7*o+100),i=Math.sqrt(o-36),s=Math.max(a,8)+"px",l=Math.max(n,8)+"px",d=Math.max(i,8)+"px",m={fontSize:s},p={fontSize:s,width:s,height:s},h={color:e.textColorHover,fontSize:l,width:l,height:l},f={fontSize:d};k=r.a.createElement("div",{className:u.a.rows},r.a.createElement("div",{className:u.a.topRow},y&&t.username&&r.a.createElement("div",{className:u.a.username},r.a.createElement("a",{href:g.b.getUsernameUrl(t.username),target:"_blank"},"@",t.username)),b&&t.caption&&r.a.createElement("div",{className:u.a.caption},S)),r.a.createElement("div",{className:u.a.middleRow},c&&r.a.createElement("div",{className:u.a.counterList},r.a.createElement("span",{className:u.a.likesCount,style:m},r.a.createElement(_.a,{icon:"heart",style:p})," ",t.likesCount),r.a.createElement("span",{className:u.a.commentsCount,style:m},r.a.createElement(_.a,{icon:"admin-comments",style:p})," ",t.commentsCount))),r.a.createElement("div",{className:u.a.bottomRow},v&&t.timestamp&&r.a.createElement("div",{className:u.a.dateContainer},r.a.createElement("time",{className:u.a.date,dateTime:w,title:O,style:f},M)),E&&r.a.createElement("a",{className:u.a.igLinkIcon,href:t.permalink,title:S,target:"_blank",style:h,onClick:e=>e.stopPropagation()},r.a.createElement(_.a,{icon:"instagram",style:h}))))}return r.a.createElement("div",{ref:n,className:u.a.root,style:P},k)})),y=a(15),v=a(54);t.a=Object(l.b)((function({media:e,options:t,forceOverlay:a,onClick:n}){const[i,l]=r.a.useState(!1),c=function(e){switch(e.type){case s.a.Type.IMAGE:return o.a.imageTypeIcon;case s.a.Type.VIDEO:return o.a.videoTypeIcon;case s.a.Type.ALBUM:return o.a.albumTypeIcon;default:return}}(e),u={backgroundImage:`url(${y.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:o.a.root,onClick:e=>{n&&n(e)},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1)},r.a.createElement(v.a,{media:e}),r.a.createElement("div",{className:c,style:u}),(i||a)&&r.a.createElement("div",{className:o.a.overlay},r.a.createElement(b,{media:e,options:t}))))}))},8:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n),i=a(10);const r=e=>{var{icon:t,className:a}=e,n=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["icon","className"]);return o.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,a)},n))}},81:function(e,t,a){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},85:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(70),r=a.n(i),s=a(7),l=a(4),c=a(29);t.a=Object(s.b)((function({media:e,options:t,full:a}){if(!t.showCaptions||!e.type)return null;const n={color:t.captionColor,fontSize:t.captionSize},i=a?0:1,s=e.caption?e.caption:"",u=t.captionMaxLength?Object(l.o)(s,t.captionMaxLength):s,d=Object(c.d)(u,void 0,i,t.captionRemoveDots),m=a?r.a.full:r.a.preview;return o.a.createElement("div",{className:m,style:n},d)}))},86:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(62),r=a.n(i),s=a(7),l=a(5),c=a(8);t.a=Object(s.b)((function({media:e,options:t}){if(!e.type||e.source.type===l.a.Source.Type.PERSONAL_ACCOUNT)return null;const a={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},n=Object.assign(Object.assign({},a),{color:t.likesIconColor}),i=Object.assign(Object.assign({},a),{color:t.commentsIconColor}),s={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&o.a.createElement("div",{className:r.a.root},t.showLikes&&o.a.createElement("div",{className:r.a.icon,style:n},o.a.createElement(c.a,{icon:"heart",style:s}),o.a.createElement("span",null,e.likesCount)),t.showComments&&o.a.createElement("div",{className:r.a.icon,style:i},o.a.createElement(c.a,{icon:"admin-comments",style:s}),o.a.createElement("span",null,e.commentsCount)))}))},87:function(e,t,a){"use strict";a.d(t,"a",(function(){return V}));var n=a(0),o=a.n(n),i=a(42),r=a.n(i),s=a(14),l=a.n(s),c=a(18),u=a(32),d=a.n(u),m=a(5),p=a(3),h=a(21),_=a.n(h),f=a(39),g=a.n(f),b=a(4),y=a(29),v=a(10);const E=({comment:e,className:t})=>{const a=e.username?o.a.createElement("a",{key:-1,href:p.b.getUsernameUrl(e.username),target:"_blank",className:g.a.username},e.username):null,n=a?(e,t)=>t>0?e:[a,...e]:void 0,i=Object(y.d)(e.text,n),r=1===e.likeCount?"like":"likes";return o.a.createElement("div",{className:Object(v.b)(g.a.root,t)},o.a.createElement("div",{className:g.a.content},o.a.createElement("div",{key:e.id,className:g.a.text},i)),o.a.createElement("div",{className:g.a.metaList},o.a.createElement("div",{className:g.a.date},Object(b.n)(e.timestamp)),e.likeCount>0&&o.a.createElement("div",{className:g.a.likeCount},`${e.likeCount} ${r}`)))};var S=a(8);function x({source:e,comments:t,showLikes:a,numLikes:n,date:i,link:r}){var s;return t=null!=t?t:[],o.a.createElement("article",{className:_.a.container},e&&o.a.createElement("header",{className:_.a.header},e.img&&o.a.createElement("a",{href:e.url,target:"_blank",className:_.a.sourceImgLink},o.a.createElement("img",{className:_.a.sourceImg,src:e.img,alt:null!==(s=e.name)&&void 0!==s?s:""})),o.a.createElement("div",{className:_.a.sourceName},o.a.createElement("a",{href:e.url,target:"_blank"},e.name))),o.a.createElement("div",{className:_.a.commentsScroller},t.length>0&&o.a.createElement("div",{className:_.a.commentsList},t.map((e,t)=>o.a.createElement(E,{key:t,comment:e,className:_.a.comment})))),o.a.createElement("div",{className:_.a.footer},o.a.createElement("div",{className:_.a.footerInfo},a&&o.a.createElement("div",{className:_.a.numLikes},o.a.createElement("span",null,n)," ",o.a.createElement("span",null,"likes")),i&&o.a.createElement("div",{className:_.a.date},i)),r&&o.a.createElement("div",{className:_.a.footerLink},o.a.createElement("a",{href:r.url,target:r.newTab?"_blank":"_self"},o.a.createElement(S.a,{icon:r.icon,className:_.a.footerLinkIcon}),o.a.createElement("span",null,r.text)))))}function w({media:e,numComments:t,link:a}){a=null!=a?a:{url:e.permalink,text:"View on Instagram",icon:"instagram",newTab:!0};const n=e.comments?e.comments.slice(0,t):[];e.caption&&e.caption.length&&n.splice(0,0,{id:e.id,text:e.caption,timestamp:e.timestamp,username:e.username});const i={name:"",url:"",img:void 0};switch(e.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:i.name="@"+e.username,i.url=p.b.getUsernameUrl(e.username);const t=p.b.getByUsername(e.username);i.img=t?p.b.getProfilePicUrl(t):void 0;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:i.name="#"+e.source.name,i.url="https://instagram.com/explore/tags/"+e.source.name}return o.a.createElement(x,{source:i,comments:n,date:Object(b.n)(e.timestamp),showLikes:e.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT,numLikes:e.likesCount,link:a})}var O=a(94),M=a.n(O),P=a(33),k=a.n(P),C=a(54);function L(e){var{media:t,thumbnailUrl:a,size:i,autoPlay:r,onGetMetaData:s}=e,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["media","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=o.a.useRef(),[u,d]=o.a.useState(!r),[p,h]=o.a.useState(r),_=o.a.useContext(H);Object(n.useEffect)(()=>{r?u&&d(!1):u||d(!0),p&&h(r)},[t.url]),Object(n.useLayoutEffect)(()=>{if(c.current){const e=()=>h(!0),t=()=>h(!1);return c.current.addEventListener("play",e),c.current.addEventListener("pause",t),()=>{c.current.removeEventListener("play",e),c.current.removeEventListener("pause",t)}}},[c.current]);const f={width:i?i.width+"px":"100%",height:i?i.height+"px":"100%"};return o.a.createElement("div",{key:t.url,className:k.a.root,style:f},o.a.createElement("video",Object.assign({ref:c,className:u?k.a.videoHidden:k.a.video,src:t.url,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&c.current.play()},onLoadedMetadata:()=>{_.reportSize({width:c.current.videoWidth,height:c.current.videoHeight})}},l),o.a.createElement("source",{src:t.url}),"Your browser does not support videos"),o.a.createElement("div",{className:u?k.a.thumbnail:k.a.thumbnailHidden},o.a.createElement(C.a,{media:t,size:m.a.Thumbnails.Size.LARGE,width:i?i.width:void 0,height:i?i.height:void 0})),o.a.createElement("div",{className:p?k.a.controlPlaying:k.a.controlPaused,onClick:()=>{c.current&&(u?(d(!1),c.current.currentTime=0,c.current.play()):c.current.paused?c.current.play():c.current.pause())}},o.a.createElement(S.a,{className:k.a.playButton,icon:"controls-play"})))}var N=a(55),B=a.n(N),T=m.a.Thumbnails.Size;const A={s:320,m:480,l:600};function I({media:e}){const t=o.a.useRef(),a=o.a.useContext(H),[i,r]=Object(n.useState)(!0),[s,l]=Object(n.useState)(!1);Object(n.useLayoutEffect)(()=>{i&&t.current&&t.current.complete&&c()},[]);const c=()=>{if(r(!1),t.current&&!e.size){const e={width:t.current.naturalWidth,height:t.current.naturalHeight};a.reportSize(e)}};if(s)return o.a.createElement("div",{className:B.a.error},o.a.createElement("span",null,"Image is not available"));const u=m.a.Thumbnails.get(e,T.LARGE),d=m.a.Thumbnails.getSrcSet(e,A).join(",");return s?o.a.createElement("div",{className:B.a.error},o.a.createElement("span",null,"Image is not available")):o.a.createElement("img",{ref:t,className:i?B.a.loading:B.a.image,onLoad:c,onError:()=>{l(!0),r(!1)},src:u,srcSet:d,sizes:"600px",alt:"",loading:"eager"})}var F=a(28),j=a.n(F);function D({media:e,autoplayVideos:t}){const[a,i]=Object(n.useState)(0),r=e.children,s=r.length-1,l={transform:`translateX(${100*-a}%)`};return o.a.createElement("div",{className:j.a.album},o.a.createElement("div",{className:j.a.frame},o.a.createElement("ul",{className:j.a.scroller,style:l},r.map(e=>o.a.createElement("li",{key:e.id,className:j.a.child},o.a.createElement(R,{media:e,autoplayVideos:t}))))),o.a.createElement("div",{className:j.a.controlsLayer},o.a.createElement("div",{className:j.a.controlsContainer},o.a.createElement("div",null,a>0&&o.a.createElement("div",{className:j.a.prevButton,onClick:()=>i(e=>Math.max(e-1,0)),role:"button"},o.a.createElement(S.a,{icon:"arrow-left-alt2"}))),o.a.createElement("div",null,a<s&&o.a.createElement("div",{className:j.a.nextButton,onClick:()=>i(e=>Math.min(e+1,s)),role:"button"},o.a.createElement(S.a,{icon:"arrow-right-alt2"}))))),o.a.createElement("div",{className:j.a.indicatorList},r.map((e,t)=>o.a.createElement("div",{key:t,className:t===a?j.a.indicatorCurrent:j.a.indicator}))))}function R({media:e,autoplayVideos:t}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return o.a.createElement(I,{media:e});case m.a.Type.VIDEO:return o.a.createElement(L,{media:e,autoPlay:t});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return o.a.createElement(D,{media:e,autoplayVideos:t})}return o.a.createElement("div",{className:M.a.notAvailable},o.a.createElement("span",null,"Media is not available"))}const H=o.a.createContext({});function z({media:e,showSidebar:t,numComments:a,link:n,vertical:i}){var r,s;t=null==t||t,a=null!=a?a:30;const[l,c]=o.a.useState(),u=null!==(s=null!==(r=e.size)&&void 0!==r?r:l)&&void 0!==s?s:{width:600,height:600},m=u&&u.height>0?u.width/u.height:null,p={paddingBottom:i?void 0:(m?100/m:100)+"%"};return o.a.createElement(H.Provider,{value:{reportSize:c}},o.a.createElement("div",{className:i?d.a.vertical:d.a.horizontal},o.a.createElement("div",{className:t?d.a.wrapperSidebar:d.a.wrapper},o.a.createElement("div",{className:d.a.mediaContainer},o.a.createElement("div",{className:d.a.mediaSizer,style:p},o.a.createElement("div",{className:d.a.media},o.a.createElement(R,{key:e.id,media:e}))))),t&&o.a.createElement("div",{className:d.a.sidebar},o.a.createElement(w,{media:e,numComments:a,link:n}))))}var U=a(6);function W(e,t){return t&&(null!=e?e:document.body).getBoundingClientRect().width<876}function G(e,t){t?e.classList.remove(l.a.noScroll):e.classList.add(l.a.noScroll)}function V({feed:e,current:t,showSidebar:a,numComments:i,onRequestClose:s}){var u;const d=o.a.useRef(),[m,p]=o.a.useState(W(null,a)),[h,_]=o.a.useState(t),f=o.a.useContext(V.Context),g=null!==(u=f.target&&f.target.current)&&void 0!==u?u:document.body;Object(n.useEffect)(()=>_(t),[t]);const b=()=>p(W(d.current,a));Object(n.useEffect)(()=>(b(),G(g,!1),()=>G(g,!0)),[g]),Object(c.m)("resize",()=>b(),[],[a]);const y=e=>{s&&s(),e.preventDefault(),e.stopPropagation()},v=e=>{_(e=>Math.max(e-1,0)),e.preventDefault(),e.stopPropagation()},E=t=>{_(t=>Math.min(t+1,e.media.length-1)),t.preventDefault(),t.stopPropagation()};Object(c.e)(document.body,"keydown",e=>{switch(e.key){case"ArrowRight":E(e);break;case"ArrowLeft":v(e);break;case"Escape":y(e);break;default:return}},[],[]);const x=U.a.getLink(e.media[h],e.options),w=null!==x.text&&null!==x.url,O={position:g===document.body?"fixed":"absolute"},M=o.a.createElement("div",{className:m?l.a.vertical:l.a.horizontal,style:O,onClick:y},o.a.createElement("div",{className:l.a.navLayer},o.a.createElement("div",{className:l.a.navBoundary},o.a.createElement("div",{className:a?l.a.navAlignerSidebar:l.a.modalAlignerNoSidebar},h>0&&o.a.createElement("a",{className:l.a.prevBtn,onClick:v,role:"button",tabIndex:0},o.a.createElement(S.a,{icon:"arrow-left-alt2",className:l.a.controlIcon}),o.a.createElement("span",{className:l.a.controlLabel},"Previous")),h<e.media.length-1&&o.a.createElement("a",{className:l.a.nextBtn,onClick:E,role:"button",tabIndex:0},o.a.createElement(S.a,{icon:"arrow-right-alt2",className:l.a.controlIcon}),o.a.createElement("span",{className:l.a.controlLabel},"Next"))))),o.a.createElement("div",{ref:d,className:l.a.modalLayer,role:"dialog",onClick:e=>{e.stopPropagation()}},o.a.createElement("div",{className:a?l.a.modalAlignerSidebar:l.a.modalAlignerNoSidebar},e.media[h]&&o.a.createElement(z,{media:e.media[h],vertical:m,numComments:i,showSidebar:a,link:w?x:void 0}))),o.a.createElement("a",{className:l.a.closeButton,onClick:y,role:"button",tabIndex:0},o.a.createElement(S.a,{icon:"no-alt",className:l.a.controlIcon}),o.a.createElement("span",{className:l.a.controlLabel},"Close")));return r.a.createPortal(M,g)}(V||(V={})).Context=o.a.createContext({target:{current:document.body}})},88:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),i=a(61),r=a.n(i),s=a(175);function l({children:e,pathStyle:t}){let{path:a,left:n,right:i,center:s}=e;return a=null!=a?a:[],n=null!=n?n:[],i=null!=i?i:[],s=null!=s?s:[],o.a.createElement("div",{className:r.a.root},o.a.createElement("div",{className:r.a.leftList},o.a.createElement("div",{className:r.a.pathList},a.map((e,a)=>o.a.createElement(m,{key:a,style:t},o.a.createElement("div",{className:r.a.item},e)))),o.a.createElement("div",{className:r.a.leftList},o.a.createElement(u,null,n))),o.a.createElement("div",{className:r.a.centerList},o.a.createElement(u,null,s)),o.a.createElement("div",{className:r.a.rightList},o.a.createElement(u,null,i)))}function c(){return o.a.createElement(s.a,null)}function u({children:e}){const t=Array.isArray(e)?e:[e];return o.a.createElement(o.a.Fragment,null,t.map((e,t)=>o.a.createElement(d,{key:t},e)))}function d({children:e}){return o.a.createElement("div",{className:r.a.item},e)}function m({children:e,style:t}){return o.a.createElement("div",{className:r.a.pathSegment},e,o.a.createElement(p,{style:t}))}function p({style:e}){if("none"===e)return null;const t="chevron"===e?"M0 0 L100 50 L0 100":"M50 0 L50 100";return o.a.createElement("div",{className:r.a.separator},o.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},o.a.createElement("path",{d:t,fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}},92:function(e,t,a){"use strict";var n=a(0),o=a.n(n),i=a(27),r=a.n(i),s=a(7),l=a(79),c=a(85),u=a(86),d=a(78),m=a(10),p=a(4);t.a=Object(s.b)((function({feed:e,options:t,cellClassName:a}){const i=o.a.useRef(),[s,l]=o.a.useState(0);Object(n.useLayoutEffect)(()=>{if(i.current&&i.current.children.length>0){const e=i.current.querySelector("."+r.a.mediaMeta);e&&l(e.getBoundingClientRect().height)}},[t]),a=null!=a?a:()=>{};const c={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`},u={paddingBottom:`calc(100% + ${s}px)`};return o.a.createElement(d.a,{feed:e,options:t},({mediaList:n,openMedia:s,header:l,loadMoreBtn:d,followBtn:_,loadingMedia:f})=>o.a.createElement("div",{className:r.a.root},l,(!e.isLoading||e.isLoadingMore)&&o.a.createElement("div",{className:r.a.grid,style:c,ref:i},e.media.length?n.map((e,n)=>o.a.createElement(h,{key:`${n}-${e.id}`,className:a(e,n),style:u,media:e,options:t,openMedia:s})):null,e.isLoadingMore&&f.map((e,t)=>o.a.createElement("div",{key:"fake-media-"+Object(p.p)(),className:Object(m.b)(r.a.loadingCell,e,a(null,t))}))),e.isLoading&&!e.isLoadingMore&&o.a.createElement("div",{className:r.a.grid,style:c},f.map((e,t)=>o.a.createElement("div",{key:"fake-media-"+Object(p.p)(),className:Object(m.b)(r.a.loadingCell,e,a(null,t))}))),o.a.createElement("div",{className:r.a.buttonList},d,_)))}));const h=o.a.memo((function({className:e,style:t,media:a,options:n,openMedia:i}){const s=o.a.useCallback(()=>i(a),[a]);return o.a.createElement("div",{className:Object(m.b)(r.a.cell,e),style:t},o.a.createElement("div",{className:r.a.cellContent},o.a.createElement("div",{className:r.a.mediaContainer},o.a.createElement(l.a,{media:a,onClick:s,options:n})),o.a.createElement("div",{className:r.a.mediaMeta},o.a.createElement(c.a,{options:n,media:a}),o.a.createElement(u.a,{options:n,media:a}))))}),(e,t)=>e.media.id===t.media.id&&e.options===t.options)},93:function(e,t,a){e.exports={root:"LoadMoreButton__root feed__feed-button"}},94:function(e,t,a){e.exports={reset:"MediaPopupBoxObject__reset","not-available":"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset",notAvailable:"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",loading:"MediaPopupBoxObject__loading"}},96:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return s}));var n=a(0),o=a.n(n),i=a(7);function r(e,t){return Object(i.b)(a=>o.a.createElement(e,Object.assign(Object.assign({},t),a)))}function s(e,t){return Object(i.b)(a=>{const n={};return Object.keys(t).forEach(e=>n[e]=t[e](a)),o.a.createElement(e,Object.assign({},n,a))})}},97:function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return d}));var n=a(0),o=a.n(n),i=a(42),r=a.n(i),s=a(7);class l{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let a=this.cache.get(e);if(void 0===a){a=t(this);let n=this.extensions.get(e);n&&n.forEach(e=>a=e(this,a)),this.cache.set(e,a)}return a}has(e){return this.factories.has(e)}}class c{constructor(e,t,a){this.key=e,this.mount=t,this.modules=a,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){if(null!==this.container)return;let e=!1;const t=()=>{e||"interactive"!==document.readyState&&"complete"!==document.readyState||(this.actualRun(),e=!0)};t(),e||document.addEventListener("readystatechange",t)}actualRun(){!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=d({root:()=>null,"root/children":()=>[]});this.container=new l(e,this.modules);const t=this.container.get("root/children").map((e,t)=>o.a.createElement(e,{key:t})),a=o.a.createElement(s.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),r.a.render(a,this.mount)}}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function d(e){return new Map(Object.entries(e))}},98:function(e,t,a){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},99:function(e,t,a){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}}},[[582,0,1,2,3]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[4],{0:function(t,a){t.exports=e},10:function(e,t,a){"use strict";function o(...e){return e.filter(e=>!!e).join(" ")}function n(e){return o(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let a=Object.getOwnPropertyNames(t).map(a=>t[a]?e+a:null);return e+" "+a.filter(e=>!!e).join(" ")}a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return i})),a.d(t,"e",(function(){return r})),a.d(t,"d",(function(){return s}));const r={onMouseDown:e=>e.preventDefault()};function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},100:function(e,t,a){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},101:function(e,t,a){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}},102:function(e,t,a){e.exports={screen:"PromotionsScreen__screen",navbar:"PromotionsScreen__navbar","navbar-item":"PromotionsScreen__navbar-item",navbarItem:"PromotionsScreen__navbar-item","navbar-fake-pro-item":"PromotionsScreen__navbar-fake-pro-item PromotionsScreen__navbar-item",navbarFakeProItem:"PromotionsScreen__navbar-fake-pro-item PromotionsScreen__navbar-item","navbar-pro-pill":"PromotionsScreen__navbar-pro-pill",navbarProPill:"PromotionsScreen__navbar-pro-pill"}},103:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return u}));var o=a(6),n=a(22),i=a(4),r=a(29),s=a(11);class l{constructor(e){this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.config=Object(i.h)(e),void 0===this.config.watch&&(this.config.watch={all:!0})}fetchMedia(e,t){if(this.hasCache(e))return Promise.resolve(this.media);const a=Object.assign({},e.options,{moderation:this.isWatchingField("moderation")?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.isWatchingField("hashtagBlacklist")?e.options.hashtagBlacklist:[],hashtagWhitelist:this.isWatchingField("hashtagWhitelist")?e.options.hashtagWhitelist:[],captionBlacklist:this.isWatchingField("captionBlacklist")?e.options.captionBlacklist:[],captionWhitelist:this.isWatchingField("captionWhitelist")?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.isWatchingField("hashtagBlacklistSettings")&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.isWatchingField("hashtagWhitelistSettings")&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.isWatchingField("captionBlacklistSettings")&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.isWatchingField("captionWhitelistSettings")&&e.options.captionWhitelistSettings});return t&&t(),n.a.getFeedMedia(a).then(t=>(this.prevOptions=new o.a.Options(e.options),this.media=[],this.addMedia(t.data.media),this.media))}addMedia(e){e.forEach(e=>{this.media.some(t=>t.id==e.id)||this.media.push(e)})}hasCache(e){return null!==this.prevOptions&&!this.isCacheInvalid(e)}isWatchingField(e){var t,a,o;let n=null!==(t=this.config.watch.all)&&void 0!==t&&t;return 1===s.a.size(this.config.watch)&&void 0!==this.config.watch.all?n:(l.FILTER_FIELDS.includes(e)&&(n=null!==(a=s.a.get(this.config.watch,"filters"))&&void 0!==a?a:n),null!==(o=s.a.get(this.config.watch,e))&&void 0!==o?o:n)}isCacheInvalid(e){const t=e.options,a=this.prevOptions;if(Object(i.i)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(this.isWatchingField("accounts")&&!Object(i.e)(t.accounts,a.accounts))return!0;if(this.isWatchingField("tagged")&&!Object(i.e)(t.tagged,a.tagged))return!0;if(this.isWatchingField("hashtags")&&!Object(i.e)(t.hashtags,a.hashtags,r.c))return!0;if(this.isWatchingField("moderationMode")&&t.moderationMode!==a.moderationMode)return!0;if(this.isWatchingField("moderation")&&!Object(i.e)(t.moderation,a.moderation))return!0;if(this.isWatchingField("filters")){if(this.isWatchingField("captionWhitelistSettings")&&t.captionWhitelistSettings!==a.captionWhitelistSettings)return!0;if(this.isWatchingField("captionBlacklistSettings")&&t.captionBlacklistSettings!==a.captionBlacklistSettings)return!0;if(this.isWatchingField("hashtagWhitelistSettings")&&t.hashtagWhitelistSettings!==a.hashtagWhitelistSettings)return!0;if(this.isWatchingField("hashtagBlacklistSettings")&&t.hashtagBlacklistSettings!==a.hashtagBlacklistSettings)return!0;if(this.isWatchingField("captionWhitelist")&&!Object(i.e)(t.captionWhitelist,a.captionWhitelist))return!0;if(this.isWatchingField("captionBlacklist")&&!Object(i.e)(t.captionBlacklist,a.captionBlacklist))return!0;if(this.isWatchingField("hashtagWhitelist")&&!Object(i.e)(t.hashtagWhitelist,a.hashtagWhitelist))return!0;if(this.isWatchingField("hashtagBlacklist")&&!Object(i.e)(t.hashtagBlacklist,a.hashtagBlacklist))return!0}return!1}}!function(e){e.FILTER_FIELDS=["hashtagBlacklist","hashtagWhitelist","captionBlacklist","captionWhitelist","hashtagBlacklistSettings","hashtagWhitelistSettings","captionBlacklistSettings","captionWhitelistSettings"]}(l||(l={}));const c=new l({watch:{all:!0,filters:!1}}),u=new l({watch:{all:!0,moderation:!1}})},104:function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var o=a(0),n=a.n(o),i=a(63),r=a(13),s=a.n(r),l=a(7),c=a(3),u=a(642),d=a(427),m=a(81),p=a(135),h=a(130),f=a(47),_=a(9),g=a(33),b=a(19),y=a(74),v=Object(l.b)((function({account:e,onUpdate:t}){const[a,o]=n.a.useState(!1),[i,r]=n.a.useState(""),[l,v]=n.a.useState(!1),E=e.type===c.a.Type.PERSONAL,S=c.b.getBioText(e),w=()=>{e.customBio=i,v(!0),f.a.updateAccount(e).then(()=>{o(!1),v(!1),t&&t()})},x=a=>{e.customProfilePicUrl=a,v(!0),f.a.updateAccount(e).then(()=>{v(!1),t&&t()})};return n.a.createElement("div",{className:s.a.root},n.a.createElement("div",{className:s.a.container},n.a.createElement("div",{className:s.a.infoColumn},n.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:s.a.username},"@",e.username),n.a.createElement("div",{className:s.a.row},n.a.createElement("span",{className:s.a.label},"Spotlight ID:"),e.id),n.a.createElement("div",{className:s.a.row},n.a.createElement("span",{className:s.a.label},"User ID:"),e.userId),n.a.createElement("div",{className:s.a.row},n.a.createElement("span",{className:s.a.label},"Type:"),e.type),!a&&n.a.createElement("div",{className:s.a.row},n.a.createElement("div",null,n.a.createElement("span",{className:s.a.label},"Bio:"),n.a.createElement("a",{className:s.a.editBioLink,onClick:()=>{r(c.b.getBioText(e)),o(!0)}},"Edit bio"),n.a.createElement("pre",{className:s.a.bio},S.length>0?S:"(No bio)"))),a&&n.a.createElement("div",{className:s.a.row},n.a.createElement("textarea",{className:s.a.bioEditor,value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(w(),e.preventDefault(),e.stopPropagation())},rows:4}),n.a.createElement("div",{className:s.a.bioFooter},n.a.createElement("div",{className:s.a.bioEditingControls},l&&n.a.createElement("span",null,"Please wait ...")),n.a.createElement("div",{className:s.a.bioEditingControls},n.a.createElement(_.a,{className:s.a.bioEditingButton,type:_.c.DANGER,disabled:l,onClick:()=>{e.customBio="",v(!0),f.a.updateAccount(e).then(()=>{o(!1),v(!1),t&&t()})}},"Reset"),n.a.createElement(_.a,{className:s.a.bioEditingButton,type:_.c.SECONDARY,disabled:l,onClick:()=>{o(!1)}},"Cancel"),n.a.createElement(_.a,{className:s.a.bioEditingButton,type:_.c.PRIMARY,disabled:l,onClick:w},"Save"))))),n.a.createElement("div",{className:s.a.picColumn},n.a.createElement("div",null,n.a.createElement(y.a,{account:e,className:s.a.profilePic})),n.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),a=h.a.media.attachment(t).attributes.url;x(a)}},({open:e})=>n.a.createElement(_.a,{type:_.c.SECONDARY,className:s.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&n.a.createElement("a",{className:s.a.resetCustomPic,onClick:()=>{x("")}},"Reset profile picture"))),E&&n.a.createElement("div",{className:s.a.personalInfoMessage},n.a.createElement(g.a,{type:g.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",n.a.createElement("a",{href:b.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),n.a.createElement(m.a,{label:"View access token",stealth:!0},n.a.createElement("div",{className:s.a.row},e.accessToken&&n.a.createElement("div",null,n.a.createElement("p",null,n.a.createElement("span",{className:s.a.label},"Expires on:"),n.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),n.a.createElement("pre",{className:s.a.accessToken},e.accessToken.code)))))}));function E({isOpen:e,onClose:t,onUpdate:a,account:o}){return n.a.createElement(i.a,{isOpen:e&&!!o,title:"Account details",icon:"admin-users",onClose:t},n.a.createElement(i.a.Content,null,o&&n.a.createElement(v,{account:o,onUpdate:a})))}},107:function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var o=a(1),n=a(40),i=a(30),r=a(55),s=a(51),l=a(228),c=a(115),u=a(19),d=a(22),m=a(97),p=function(e,t,a,o){var n,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r},h=n.a.SavedFeed;class f{constructor(){this.editorTab="connect",this.isGoingFromNewToEdit=!1,this.isPromptingFeedName=!1,this.feed=new h,this.isDoingOnboarding=u.a.config.doOnboarding}edit(e){this.isGoingFromNewToEdit||(this.editorTab="connect"),this.isGoingFromNewToEdit=!1,this.feed=null,this.feed=new h(e)}saveFeed(e){const t=null===e.id;return this.isDoingOnboarding=!1,new Promise((a,o)=>{n.a.saveFeed(e).then(e=>{s.a.add("feed/save/success",Object(c.a)(l.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,i.a.history.push(i.a.at({screen:r.a.EDIT_FEED,id:e.id.toString()}),{})),a(e)}).catch(e=>{const t=d.a.getErrorReason(e);m.a.trigger({type:"feed/save/error",message:t}),o(t)})})}saveEditor(e){const t=null===this.feed.id;if(0!==this.feed.name.length||e)return this.isSavingFeed=!0,this.isDoingOnboarding=!1,n.a.saveFeed(this.feed).then(e=>{this.feed=new h(e),this.isSavingFeed=!1,s.a.add("feed/saved",Object(c.a)(l.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,i.a.history.push(i.a.at({screen:r.a.EDIT_FEED,id:this.feed.id.toString()}),{}))});this.isPromptingFeedName=!0}cancelEditor(){this.isGoingFromNewToEdit||(this.feed=new h,this.isGoingFromNewToEdit=!1)}closeEditor(){this.cancelEditor(),setTimeout(()=>{i.a.history.push(i.a.at({screen:r.a.FEED_LIST}),{})},10)}onEditorChange(e){e&&h.setFromObject(this.feed,e)}}p([o.o],f.prototype,"feed",void 0),p([o.o],f.prototype,"isSavingFeed",void 0),p([o.o],f.prototype,"editorTab",void 0),p([o.o],f.prototype,"isDoingOnboarding",void 0),p([o.o],f.prototype,"isGoingFromNewToEdit",void 0),p([o.o],f.prototype,"isPromptingFeedName",void 0),p([o.f],f.prototype,"edit",null),p([o.f],f.prototype,"saveEditor",null),p([o.f],f.prototype,"cancelEditor",null),p([o.f],f.prototype,"closeEditor",null),p([o.f],f.prototype,"onEditorChange",null);const _=new f},11:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function a(e,t){return(null!=e?e:{})[t.toString()]}function o(e,t,a){return(e=null!=e?e:{})[t.toString()]=a,e}e.has=t,e.get=a,e.set=o,e.ensure=function(a,n,i){return t(a,n)||o(a,n,i),e.get(a,n)},e.withEntry=function(t,a,o){return e.set(Object(n.h)(null!=t?t:{}),a,o)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,a){return e.remove(Object(n.h)(null!=t?t:{}),a)},e.at=function(t,o){return a(t,e.keys(t)[o])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,a){const o={};return e.forEach(t,(e,t)=>o[e]=a(t,e)),o},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(n.m)(e,t)},e.forEach=function(t,a){e.keys(t).forEach(e=>a(e,t[e]))},e.fromArray=function(t){const a={};return t.forEach(([t,o])=>e.set(a,t,o)),a},e.fromMap=function(t){const a={};return t.forEach((t,o)=>e.set(a,o,t)),a}}(o||(o={}))},113:function(e,t,a){e.exports={label:"TabNavbar__label",tab:"TabNavbar__tab",current:"TabNavbar__current TabNavbar__tab",disabled:"TabNavbar__disabled TabNavbar__tab"}},115:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return s}));var o=a(0),n=a.n(o),i=a(7);function r(e,t){return Object(i.b)(a=>n.a.createElement(e,Object.assign(Object.assign({},t),a)))}function s(e,t){return Object(i.b)(a=>{const o={};return Object.keys(t).forEach(e=>o[e]=t[e](a)),n.a.createElement(e,Object.assign({},o,a))})}},12:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(15),i=a(11),r=a(4);!function(e){function t(e){return e?c(e.type):void 0}function a(e){var a;if("object"!=typeof e)return!1;const o=t(e);return void 0!==o&&o.isValid(null!==(a=e.config)&&void 0!==a?a:{})}function o(t){return t?e.getPromoFromDictionary(t,n.a.config.globalPromotions):void 0}function s(e){const t=l(e);return void 0===t?void 0:t.promotion}function l(t){if(t)for(const a of n.a.config.autoPromotions){const o=e.Automation.getType(a),n=e.Automation.getConfig(a);if(o&&o.matches(t,n))return a}}function c(t){return e.types.find(e=>e.id===t)}let u;e.getConfig=function(e){var t,a;return e&&null!==(a=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==a?a:{}},e.getType=t,e.isValid=a,e.getPromoFromDictionary=function(t,a){const o=i.a.get(a,t.id);if(o)return e.getType(o)?o:void 0},e.getPromo=function(e){return Object(r.k)(a,[()=>o(e),()=>s(e)])},e.getGlobalPromo=o,e.getAutoPromo=s,e.getAutomation=l,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?a(e.type):void 0},e.getConfig=function(e){var t,a;return e&&null!==(a=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==a?a:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function a(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=a,e.clearTypes=function(){t.splice(0,t.length)}}(u=e.Automation||(e.Automation={}))}(o||(o={}))},121:function(e,t,a){"use strict";var o=a(103);t.a=new class{constructor(){this.mediaStore=o.a}}},124:function(e,t,a){e.exports={root:"PopupTextField__root layout__flex-row",container:"PopupTextField__container layout__flex-row","edit-container":"PopupTextField__edit-container PopupTextField__container layout__flex-row",editContainer:"PopupTextField__edit-container PopupTextField__container layout__flex-row","static-container":"PopupTextField__static-container PopupTextField__container layout__flex-row",staticContainer:"PopupTextField__static-container PopupTextField__container layout__flex-row","edit-icon":"PopupTextField__edit-icon dashicons__dashicon-normal",editIcon:"PopupTextField__edit-icon dashicons__dashicon-normal",label:"PopupTextField__label","done-btn":"PopupTextField__done-btn",doneBtn:"PopupTextField__done-btn"}},125:function(e,t,a){e.exports={root:"ProUpgradeBtn__root"}},129:function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var o=a(0),n=a.n(o),i=a(7),r=a(41),s=a(6),l=a(93);const c=Object(i.b)(({feed:e})=>{var t;const a=r.a.getById(e.options.layout),o=s.a.ComputedOptions.compute(e.options,e.mode);return n.a.createElement(null!==(t=a.component)&&void 0!==t?t:l.a,{feed:e,options:o})}),u=n.a.createContext(!1)},13:function(e,t,a){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},131:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"b",(function(){return u}));var o=a(0),n=a.n(o),i=a(4);const r=n.a.createContext(null),s={matched:!1};function l({value:e,children:t}){return s.matched=!1,n.a.createElement(r.Provider,{value:e},t.map((t,a)=>n.a.createElement(n.a.Fragment,{key:a},"function"==typeof t?t(e):t)))}function c({value:e,oneOf:t,children:a}){var o;const l=n.a.useContext(r);let c=!1;return void 0!==e&&(c="function"==typeof e?e(l):Object(i.b)(l,e)),void 0!==t&&(c=t.some(e=>Object(i.b)(e,l))),c?(s.matched=!0,"function"==typeof a?null!==(o=a(l))&&void 0!==o?o:null:null!=a?a:null):null}function u({children:e}){var t;if(s.matched)return null;const a=n.a.useContext(r);return"function"==typeof e?null!==(t=e(a))&&void 0!==t?t:null:null!=e?e:null}},133:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var o=a(0),n=a.n(o),i=a(82),r=a.n(i),s=a(25),l=a(69),c=a.n(l),u=a(57),d=a.n(u),m=a(7),p=a(4),h=a(126),f=Object(m.b)((function({field:e}){const t="settings-field-"+Object(p.q)(),a=!e.label||e.fullWidth;return n.a.createElement("div",{className:d.a.root},e.label&&n.a.createElement("div",{className:d.a.label},n.a.createElement("label",{htmlFor:t},e.label)),n.a.createElement("div",{className:d.a.container},n.a.createElement("div",{className:a?d.a.controlFullWidth:d.a.controlPartialWidth},n.a.createElement(e.component,{id:t})),e.tooltip&&n.a.createElement("div",{className:d.a.tooltip},n.a.createElement(h.a,null,e.tooltip))))}));function _({group:e}){return n.a.createElement("div",{className:c.a.root},e.title&&e.title.length>0&&n.a.createElement("h1",{className:c.a.title},e.title),e.component&&n.a.createElement("div",{className:c.a.content},n.a.createElement(e.component)),e.fields&&n.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>n.a.createElement(f,{field:e,key:e.id}))))}var g=a(18);function b({page:e}){return Object(g.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(s.c.save(),e.preventDefault(),e.stopPropagation())}),n.a.createElement("article",{className:r.a.root},e.component&&n.a.createElement("div",{className:r.a.content},n.a.createElement(e.component)),e.groups&&n.a.createElement("div",{className:r.a.groupList},e.groups.map(e=>n.a.createElement(_,{key:e.id,group:e}))))}},14:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaPopupBox__container layout__flex-box",horizontal:"MediaPopupBox__horizontal MediaPopupBox__container layout__flex-box",vertical:"MediaPopupBox__vertical MediaPopupBox__container layout__flex-box",layer:"MediaPopupBox__layer layout__flex-box",control:"MediaPopupBox__control","control-label":"MediaPopupBox__control-label",controlLabel:"MediaPopupBox__control-label","control-icon":"MediaPopupBox__control-icon",controlIcon:"MediaPopupBox__control-icon","close-button":"MediaPopupBox__close-button MediaPopupBox__control",closeButton:"MediaPopupBox__close-button MediaPopupBox__control","nav-layer":"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box",navLayer:"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box","nav-boundary":"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box",navBoundary:"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box","nav-aligner":"MediaPopupBox__nav-aligner layout__flex-box",navAligner:"MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-sidebar":"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerSidebar:"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-no-sidebar":"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerNoSidebar:"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-btn":"MediaPopupBox__nav-btn MediaPopupBox__control",navBtn:"MediaPopupBox__nav-btn MediaPopupBox__control","prev-btn":"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control",prevBtn:"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control","next-btn":"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control",nextBtn:"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control","modal-layer":"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box",modalLayer:"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box","modal-aligner":"MediaPopupBox__modal-aligner layout__flex-box",modalAligner:"MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-sidebar":"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerSidebar:"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-no-sidebar":"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerNoSidebar:"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modal:"MediaPopupBox__modal","no-scroll":"MediaPopupBox__no-scroll",noScroll:"MediaPopupBox__no-scroll"}},15:function(e,t,a){"use strict";var o,n=a(12);let i;t.a=i={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(o=SliCommonL10n.globalPromotions)&&void 0!==o?o:{}},image:e=>`${i.config.imagesUrl}/${e}`},n.a.registerType({id:"link",label:"Link",isValid:()=>!1}),n.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),n.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},151:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),i=a(125),r=a.n(i),s=a(19);function l({url:e,children:t}){return n.a.createElement("a",{className:r.a.root,href:null!=e?e:s.a.resources.pricingUrl,target:"_blank"},null!=t?t:"Free 14-day PRO trial")}},16:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},162:function(e,t,a){"use strict";function o(e,t){return"url"===t.linkType?t.url:t.postUrl}var n;a.d(t,"a",(function(){return n})),t.b={id:"link",label:"Link",getIcon:()=>"admin-links",getPopupLink:function(e,t){return"string"==typeof t.linkText&&t.linkText.length>0?[t.linkText,t.newTab]:[n.getDefaultLinkText(t),t.newTab]},isValid:function(e){return"string"==typeof e.linkType&&e.linkType.length>0&&("url"===e.linkType&&"string"==typeof e.url&&e.url.length>0||!!e.postId&&"string"==typeof e.postUrl&&e.postUrl.length>0)},getMediaUrl:o,onMediaClick:function(e,t){var a;const n=o(0,t),i=null===(a=t.linkDirectly)||void 0===a||a;return!(!n||!i)&&(window.open(n,t.newTab?"_blank":"_self"),!0)}},function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(n||(n={}))},163:function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var o=a(0),n=a.n(o),i=a(223),r=a.n(i),s=a(7),l=a(191),c=a(30),u=a(19),d=a(133),m=a(59),p=a(25),h=a(66),f=a(55),_=a(177),g=a(166),b=a.n(g),y=a(192),v=a(9),E=a(140),S=a(138),w=Object(s.b)((function(){const e=c.a.get("tab");return n.a.createElement(y.a,{chevron:!0,right:x},u.a.settings.pages.map((t,a)=>n.a.createElement(E.a.Link,{key:t.id,linkTo:c.a.with({tab:t.id}),isCurrent:e===t.id||!e&&0===a},t.title)))}));const x=Object(s.b)((function({}){const e=!p.c.isDirty;return n.a.createElement("div",{className:b.a.buttons},n.a.createElement(v.a,{className:b.a.cancelBtn,type:v.c.DANGER_PILL,size:v.b.LARGE,onClick:()=>p.c.restore(),disabled:e},"Cancel"),n.a.createElement(S.a,{className:b.a.saveBtn,onClick:()=>p.c.save(),isSaving:p.c.isSaving,tooltip:"Save the settings (Ctrl+S)",disabled:e}))})),O="You have unsaved changes. If you leave now, your changes will be lost.";function M(e){return Object(h.parse)(e.search).screen===f.a.SETTINGS||O}t.b=Object(s.b)((function(){const e=c.a.get("tab"),t=e?u.a.settings.pages.find(t=>e===t.id):u.a.settings.pages[0];return Object(o.useEffect)(()=>()=>{p.c.isDirty&&c.a.get("screen")!==f.a.SETTINGS&&p.c.restore()},[]),n.a.createElement(n.a.Fragment,null,n.a.createElement(l.a,{navbar:w,className:r.a.root},t&&n.a.createElement(d.a,{page:t})),n.a.createElement(m.a,{when:p.c.isDirty,message:M}),n.a.createElement(_.a,{when:p.c.isDirty,message:O}))}))},165:function(e,t,a){e.exports={"menu-link":"PageMenuNavbar__menu-link",menuLink:"PageMenuNavbar__menu-link","menu-ref":"PageMenuNavbar__menu-ref",menuRef:"PageMenuNavbar__menu-ref","arrow-down":"PageMenuNavbar__arrow-down",arrowDown:"PageMenuNavbar__arrow-down"}},166:function(e,t,a){e.exports={buttons:"SettingsNavbar__buttons layout__flex-row","cancel-btn":"SettingsNavbar__cancel-btn",cancelBtn:"SettingsNavbar__cancel-btn"}},17:function(e,t,a){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},174:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var o=a(0),n=a.n(o),i=a(46);function r({breakpoints:e,render:t,children:a}){const[r,s]=n.a.useState(null),l=n.a.useCallback(()=>{const t=Object(i.b)();s(()=>e.reduce((e,a)=>t.width<=a&&a<e?a:e,1/0))},[e]);Object(o.useEffect)(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)),[]);const c=t?t(r):n.a.createElement(a,{breakpoint:r});return null!==r?c:null}},175:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(127),r=a(31),s=a.n(r),l=a(58),c=a(3),u=a(9),d=a(134),m=a(40),p=a(30),h=a(47),f=a(104),_=a(74),g=a(19),b=a(89),y=a(36),v=a(136);function E({accounts:e,showDelete:t,onDeleteError:a}){const o=(e=null!=e?e:[]).filter(e=>e.type===c.a.Type.BUSINESS).length,[i,r]=n.a.useState(!1),[E,S]=n.a.useState(null),[w,x]=n.a.useState(!1),[O,M]=n.a.useState(),[P,k]=n.a.useState(!1),C=e=>()=>{S(e),r(!0)},L=e=>()=>{h.a.openAuthWindow(e.type,0,()=>{g.a.restApi.deleteAccountMedia(e.id)})},N=e=>()=>{M(e),x(!0)},B=()=>{k(!1),M(null),x(!1)},T={cols:{username:s.a.usernameCol,type:s.a.typeCol,usages:s.a.usagesCol,actions:s.a.actionsCol},cells:{username:s.a.usernameCell,type:s.a.typeCell,usages:s.a.usagesCell,actions:s.a.actionsCell}};return n.a.createElement("div",{className:"accounts-list"},n.a.createElement(d.a,{styleMap:T,rows:e,cols:[{id:"username",label:"Username",render:e=>n.a.createElement("div",null,n.a.createElement(_.a,{account:e,className:s.a.profilePic}),n.a.createElement("a",{className:s.a.username,onClick:C(e)},e.username))},{id:"type",label:"Type",render:e=>n.a.createElement("span",{className:s.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>n.a.createElement("span",{className:s.a.usages},e.usages.map((e,t)=>!!m.a.getById(e)&&n.a.createElement(l.a,{key:t,to:p.a.at({screen:"edit",id:e.toString()})},m.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&n.a.createElement(y.f,null,({ref:e,openMenu:t})=>n.a.createElement(u.a,{ref:e,className:s.a.actionsBtn,type:u.c.PILL,size:u.b.NORMAL,onClick:t},n.a.createElement(v.a,null)),n.a.createElement(y.b,null,n.a.createElement(y.c,{onClick:C(e)},"Info"),n.a.createElement(y.c,{onClick:L(e)},"Reconnect"),n.a.createElement(y.d,null),n.a.createElement(y.c,{onClick:N(e)},"Delete")))}]}),n.a.createElement(f.a,{isOpen:i,onClose:()=>r(!1),account:E}),n.a.createElement(b.a,{isOpen:w,title:"Are you sure?",buttons:[P?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:P,cancelDisabled:P,onAccept:()=>{k(!0),h.a.deleteAccount(O.id).then(()=>B()).catch(()=>{a&&a("An error occurred while trying to remove the account."),B()})},onCancel:B},n.a.createElement("p",null,"Are you sure you want to delete"," ",n.a.createElement("span",{style:{fontWeight:"bold"}},O?O.username:""),"?"," ","This will also delete all saved media associated with this account."),O&&O.type===c.a.Type.BUSINESS&&1===o&&n.a.createElement("p",null,n.a.createElement("b",null,"Note:")," ",n.a.createElement("span",null,"Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work."))))}var S=a(33),w=a(7),x=a(137),O=a(101),M=a.n(O);t.a=Object(w.b)((function(){const[,e]=n.a.useState(0),[t,a]=n.a.useState(""),o=n.a.useCallback(()=>e(e=>e++),[]);return c.b.hasAccounts()?n.a.createElement("div",{className:M.a.root},t.length>0&&n.a.createElement(S.a,{type:S.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>a("")},t),n.a.createElement("div",{className:M.a.connectBtn},n.a.createElement(i.a,{onConnect:o})),n.a.createElement(E,{accounts:c.b.list,showDelete:!0,onDeleteError:a})):n.a.createElement(x.a,null)}))},176:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var o=a(0),n=a.n(o),i=a(113),r=a.n(i),s=a(88),l=a(18);function c({children:{path:e,tabs:t,right:a},current:o,onClickTab:i}){return n.a.createElement(s.b,{pathStyle:"chevron"},{path:e,right:a,left:t.map(e=>{return n.a.createElement(u,{tab:e,key:e.key,isCurrent:e.key===o,onClick:(t=e.key,()=>i&&i(t))});var t})})}function u({tab:e,isCurrent:t,onClick:a}){return n.a.createElement("a",{key:e.key,role:"button",tabIndex:0,className:e.disabled?r.a.disabled:t?r.a.current:r.a.tab,onClick:a,onKeyDown:Object(l.g)(a)},n.a.createElement("span",{className:r.a.label},e.label))}},177:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o=a(0),n=a.n(o),i=a(59),r=a(18);function s({when:e,message:t}){return Object(r.l)(t,e),n.a.createElement(i.a,{when:e,message:t})}},18:function(e,t,a){"use strict";a.d(t,"j",(function(){return s})),a.d(t,"f",(function(){return l})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"a",(function(){return d})),a.d(t,"n",(function(){return m})),a.d(t,"h",(function(){return p})),a.d(t,"l",(function(){return h})),a.d(t,"k",(function(){return f})),a.d(t,"e",(function(){return _})),a.d(t,"d",(function(){return g})),a.d(t,"m",(function(){return b})),a.d(t,"g",(function(){return y})),a.d(t,"i",(function(){return v}));var o=a(0),n=a.n(o),i=a(59),r=a(46);function s(e,t){!function(e,t,a){const o=n.a.useRef(!0);e(()=>{o.current=!0;const e=t(()=>new Promise(e=>{o.current&&e()}));return()=>{o.current=!1,e&&e()}},a)}(o.useEffect,e,t)}function l(e){const[t,a]=n.a.useState(e),o=n.a.useRef(t);return[t,()=>o.current,e=>a(o.current=e)]}function c(e,t,a=[]){function n(o){!e.current||e.current.contains(o.target)||a.some(e=>e&&e.current&&e.current.contains(o.target))||t(o)}Object(o.useEffect)(()=>(document.addEventListener("mousedown",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchend",n)}))}function u(e,t){Object(o.useEffect)(()=>{const a=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",a),()=>document.removeEventListener("keyup",a)},e)}function d(e,t,a=100){const[i,r]=n.a.useState(e);return Object(o.useEffect)(()=>{let o=null;return e===t?o=setTimeout(()=>r(t),a):r(!t),()=>{null!==o&&clearTimeout(o)}},[e]),[i,r]}function m(e){const[t,a]=n.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();a(t),e&&e(t)};return Object(o.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){Object(o.useEffect)(()=>{const a=a=>{if(t)return(a||window.event).returnValue=e,e};return window.addEventListener("beforeunload",a),()=>window.removeEventListener("beforeunload",a)},[t])}function f(e,t){const a=n.a.useRef(!1);return Object(o.useEffect)(()=>{a.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),a.current=!1)},[a.current]),()=>a.current=!0}function _(e,t,a,n=[],i=[]){Object(o.useEffect)(()=>(n.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,a),()=>e.removeEventListener(t,a)),i)}function g(e,t,a=[],o=[]){_(document,e,t,a,o)}function b(e,t,a=[],o=[]){_(window,e,t,a,o)}function y(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function v(e){const[t,a]=n.a.useState(e);return[function(e){const t=n.a.useRef(e);return t.current=e,t}(t),a]}a(53)},191:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var o=a(0),n=a.n(o),i=a(10),r=a(47),s=a(19),l=a(1);const c=Object(l.o)({initialized:!1,list:[]}),u=({navbar:e,className:t,fillPage:a,children:l})=>{const u=n.a.useRef(null);Object(o.useEffect)(()=>{u.current&&(function(){if(!c.initialized){const e=Array.from(document.querySelectorAll(".sli-notice")),t=Array.from(document.querySelectorAll(".fs-notice.fs-slug-spotlight-social-photo-feeds"));c.list=e.concat(t),c.initialized=!0}}(),c.list.forEach(e=>{e.remove(),u.current.appendChild(e)}))},[]);const d=r.a.getExpiringTokenAccounts(),m=Object(i.a)("admin-screen",{"--fillPage":a})+(t?" "+t:"");return n.a.createElement("div",{className:m},e&&n.a.createElement("div",{className:"admin-screen__navbar"},n.a.createElement(e)),n.a.createElement("div",{className:"admin-screen__content"},n.a.createElement("div",{className:"admin-screen__notices",ref:u},d.map(e=>n.a.createElement("div",{key:e.id,className:"notice notice-warning"},n.a.createElement("p",null,"The access token for the ",n.a.createElement("b",null,"@",e.username)," account is about to expire."," ",n.a.createElement("a",{className:"admin-screen__reconnect",onClick:t=>function(e,t){r.a.openAuthWindow(t.type,0,()=>{s.a.restApi.deleteAccountMedia(t.id)}),e.preventDefault()}(t,e)},"Re-connect the account")," ","to keep using it in Spotlight.")))),l))}},192:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(7),r=a(140),s=a(151),l=a(55),c=a(15);t.a=Object(i.b)((function({right:e,chevron:t,children:a}){const o=n.a.createElement(r.a.Item,null,l.b.getCurrent().title);return n.a.createElement(r.a,null,n.a.createElement(n.a.Fragment,null,o,t&&n.a.createElement(r.a.Chevron,null),a),e?n.a.createElement(e):!c.a.isPro&&n.a.createElement(s.a,{url:"https://spotlightwp.com/pricing/?utm_source=sl_plugin&utm_medium=sl_plugin_upgrade&utm_campaign=sl_plugin_upgrade_list"}))}))},195:function(e,t,a){e.exports={"arrow-link":"WizardNavbar__arrow-link",arrowLink:"WizardNavbar__arrow-link","prev-link":"WizardNavbar__prev-link WizardNavbar__arrow-link",prevLink:"WizardNavbar__prev-link WizardNavbar__arrow-link","next-link":"WizardNavbar__next-link WizardNavbar__arrow-link",nextLink:"WizardNavbar__next-link WizardNavbar__arrow-link"}},196:function(e,t,a){e.exports={message:"FeedNamePrompt__message",input:"FeedNamePrompt__input"}},198:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(1),i=a(19);a(22),function(e){e.list=Object(n.o)([]),e.fetch=function(){return i.a.restApi.getNotifications().then(t=>{"object"==typeof t&&Array.isArray(t.data)&&e.list.push(...t.data)}).catch(e=>{})}}(o||(o={}))},2:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(1),i=function(e,t,a,o){var n,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};!function(e){class t{constructor(e,t,a){this.prop=e,this.name=t,this.icon=a}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class a{constructor(e,t,a){this.desktop=e,this.tablet=t,this.phone=a}get(e,t){return o(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const o=s(this,t,e);return new a(o.desktop,o.tablet,o.phone)}}function o(e,t,a=!1){if(!e)return;const o=e[t.prop];return a&&null==o?e.desktop:o}function r(e,t,a){return e[a.prop]=t,e}function s(e,t,o){return r(new a(e.desktop,e.tablet,e.phone),t,o)}i([n.o],a.prototype,"desktop",void 0),i([n.o],a.prototype,"tablet",void 0),i([n.o],a.prototype,"phone",void 0),e.Value=a,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(a){const o=e.MODES.findIndex(e=>e===a);return void 0===o?t.DESKTOP:e.MODES[(o+1)%e.MODES.length]},e.get=o,e.set=r,e.withValue=s,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new a(t.all,t.all,t.all):new a(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new a(e.desktop,e.tablet,e.phone):new a(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(o||(o={}))},20:function(e,t,a){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},207:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));const o=new(a(221).a)([],600)},21:function(e,t,a){e.exports={container:"MediaInfo__container",padded:"MediaInfo__padded",bordered:"MediaInfo__bordered",header:"MediaInfo__header MediaInfo__padded MediaInfo__bordered","source-img":"MediaInfo__source-img",sourceImg:"MediaInfo__source-img","source-img-link":"MediaInfo__source-img-link MediaInfo__source-img",sourceImgLink:"MediaInfo__source-img-link MediaInfo__source-img","source-name":"MediaInfo__source-name",sourceName:"MediaInfo__source-name","comments-scroller":"MediaInfo__comments-scroller",commentsScroller:"MediaInfo__comments-scroller","comments-list":"MediaInfo__comments-list MediaInfo__padded",commentsList:"MediaInfo__comments-list MediaInfo__padded",comment:"MediaInfo__comment",footer:"MediaInfo__footer","footer-info":"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered",footerInfo:"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered","footer-info-line":"MediaInfo__footer-info-line",footerInfoLine:"MediaInfo__footer-info-line","num-likes":"MediaInfo__num-likes MediaInfo__footer-info-line",numLikes:"MediaInfo__num-likes MediaInfo__footer-info-line",date:"MediaInfo__date MediaInfo__footer-info-line","footer-link":"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered",footerLink:"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered","footer-link-icon":"MediaInfo__footer-link-icon",footerLinkIcon:"MediaInfo__footer-link-icon"}},213:function(e,t,a){e.exports={beacon:"NewsBeacon__beacon",button:"NewsBeacon__button","button-animation":"NewsBeacon__button-animation",buttonAnimation:"NewsBeacon__button-animation",counter:"NewsBeacon__counter","hide-link":"NewsBeacon__hide-link",hideLink:"NewsBeacon__hide-link",menu:"NewsBeacon__menu"}},22:function(e,t,a){"use strict";var o=a(50),n=a.n(o),i=a(15),r=a(53);const s=i.a.config.restApi.baseUrl,l={};i.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=n.a.create({baseURL:s,headers:l});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const u={config:Object.assign(Object.assign({},i.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,a=0,o)=>{const i=o?new n.a.CancelToken(o):void 0;return new Promise((o,n)=>{const r=e=>{o(e),document.dispatchEvent(new Event(u.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:a,from:t},{cancelToken:i}).then(o=>{o&&o.data.needImport?u.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:a,from:t},{cancelToken:i}).then(r).catch(n)}).catch(n):r(o)}).catch(n)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,a)=>{document.dispatchEvent(new Event(u.events.onImportStart));const o=e=>{const t=u.getErrorReason(e);document.dispatchEvent(new ErrorEvent(u.events.onImportFail,{message:t})),a(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(u.events.onImportEnd)),t(e)):o(u.getErrorReason(e))}).catch(o)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=u},221:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));class o{constructor(e=[],t=0){this.fns=e,this.delay=null!=t?t:1}add(e){this.fns.push(e)}run(){return this.numLoaded=0,this.isLoading=!0,new Promise((e,t)=>{this.fns.forEach(a=>a().then(()=>{this.numLoaded++,this.numLoaded>=this.fns.length&&setTimeout(()=>{this.isLoading=!1,e()},this.delay)}).catch(t))})}}},222:function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var o=a(0),n=a.n(o),i=a(102),r=a.n(i),s=a(7),l=a(30),c=a(176),u=a(9),d=a(88),m=a(131),p=a(268),h=a(269),f=a(25),_=a(138),g=a(163),b=a(66),y=a(55),v=a(18),E=a(59),S=a(98);const w=Object(s.b)((function({isFakePro:e}){var t;const a=null!==(t=l.a.get("tab"))&&void 0!==t?t:"automate";Object(v.l)(g.a,f.c.isDirty),Object(v.d)("keydown",e=>{"s"===e.key.toLowerCase()&&e.ctrlKey&&(f.c.isDirty&&!f.c.isSaving&&f.c.save(),e.preventDefault(),e.stopPropagation())},[],[f.c.isDirty,f.c.isSaving]);const o=e?M:f.c.values.autoPromotions,i=e?{}:f.c.values.promotions;return n.a.createElement("div",{className:r.a.screen},n.a.createElement("div",{className:r.a.navbar},n.a.createElement(x,{currTabId:a,isFakePro:e})),n.a.createElement(m.a,{value:a},n.a.createElement(m.c,{value:"automate"},n.a.createElement(p.a,{automations:o,onChange:function(t){e||f.c.update({autoPromotions:t})},isFakePro:e})),n.a.createElement(m.c,{value:"global"},n.a.createElement(h.a,{promotions:i,onChange:function(t){e||f.c.update({promotions:t})},isFakePro:e}))),n.a.createElement(E.a,{when:f.c.isDirty,message:O}))})),x=Object(s.b)((function({currTabId:e,isFakePro:t}){return n.a.createElement(n.a.Fragment,null,n.a.createElement(c.a,{current:e,onClickTab:e=>l.a.goto({tab:e},!0)},{path:[n.a.createElement(d.a,{key:"logo"}),n.a.createElement("span",{key:"screen-title"},"Promotions")],tabs:[{key:"automate",label:n.a.createElement("span",{className:t?r.a.navbarFakeProItem:r.a.navbarItem},t&&n.a.createElement(S.a,{className:r.a.navbarProPill}),n.a.createElement("span",null,"Automate"))},{key:"global",label:n.a.createElement("span",{className:t?r.a.navbarFakeProItem:r.a.navbarItem},t&&n.a.createElement(S.a,{className:r.a.navbarProPill}),n.a.createElement("span",null,"Global Promotions"))}],right:[n.a.createElement(u.a,{key:"cancel",type:u.c.SECONDARY,disabled:!f.c.isDirty,onClick:f.c.restore},"Cancel"),n.a.createElement(_.a,{key:"save",onClick:f.c.save,isSaving:f.c.isSaving,disabled:!f.c.isDirty})]}))}));function O(e){return Object(b.parse)(e.search).screen===y.a.PROMOTIONS||g.a}const M=[{type:"hashtag",config:{hashtags:["product"]},promotion:{type:"link",config:{linkType:"page",postId:1,postTitle:"Product Page",linkText:"Buy this product"}}},{type:"hashtag",config:{hashtags:["myblog"]},promotion:{type:"link",config:{linkType:"post",postId:1,postTitle:"My Latest Blog Post",linkText:""}}},{type:"hashtag",config:{hashtags:["youtube"]},promotion:{type:"link",config:{linkType:"url",url:"",linkText:""}}}]},223:function(e,t,a){},23:function(e,t,a){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username","date-container":"MediaOverlay__date-container",dateContainer:"MediaOverlay__date-container",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},238:function(e,t,a){e.exports={root:"SpotlightGame__root layout__flex-column","game-text":"SpotlightGame__game-text",gameText:"SpotlightGame__game-text",score:"SpotlightGame__score SpotlightGame__game-text",message:"SpotlightGame__message SpotlightGame__game-text","message-bubble":"SpotlightGame__message-bubble",messageBubble:"SpotlightGame__message-bubble"}},239:function(e,t,a){e.exports={"field-container":"AdvancedSettings__field-container layout__flex-row",fieldContainer:"AdvancedSettings__field-container layout__flex-row","field-element":"AdvancedSettings__field-element",fieldElement:"AdvancedSettings__field-element","field-label":"AdvancedSettings__field-label AdvancedSettings__field-element",fieldLabel:"AdvancedSettings__field-label AdvancedSettings__field-element","field-control":"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column",fieldControl:"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column","field-centered":"AdvancedSettings__field-centered",fieldCentered:"AdvancedSettings__field-centered"}},27:function(e,t,a){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},28:function(e,t,a){e.exports={reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation","flex-box":"layout__flex-box",flexBox:"layout__flex-box",album:"MediaPopupBoxAlbum__album",frame:"MediaPopupBoxAlbum__frame",scroller:"MediaPopupBoxAlbum__scroller",child:"MediaPopupBoxAlbum__child","controls-layer":"MediaPopupBoxAlbum__controls-layer layout__flex-box",controlsLayer:"MediaPopupBoxAlbum__controls-layer layout__flex-box","controls-container":"MediaPopupBoxAlbum__controls-container",controlsContainer:"MediaPopupBoxAlbum__controls-container","nav-button":"MediaPopupBoxAlbum__nav-button",navButton:"MediaPopupBoxAlbum__nav-button","prev-button":"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button",prevButton:"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button","next-button":"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button",nextButton:"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button","indicator-list":"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicatorList:"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicator:"MediaPopupBoxAlbum__indicator","indicator-current":"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator",indicatorCurrent:"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator"}},281:function(e,t,a){e.exports={"contact-us":"FeedsOnboarding__contact-us",contactUs:"FeedsOnboarding__contact-us","call-to-action":"FeedsOnboarding__call-to-action",callToAction:"FeedsOnboarding__call-to-action"}},29:function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"b",(function(){return u})),a(5);var o=a(64),n=a(0),i=a.n(n),r=a(4);function s(e,t){const a=t.map(o.b).join("|");return new RegExp(`#(${a})(?:\\b|\\r|#|$)`,"imu").test(e)}function l(e,t,a=0,o=!1){let s=e.trim();o&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=s.split("\n"),c=l.map((e,a)=>{if(e=e.trim(),o&&/^[.*•]$/.test(e))return null;let s,c=[];for(;null!==(s=/#(\w+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],a=i.a.createElement("a",{href:t,target:"_blank",key:Object(r.q)()},s[0]),o=e.substr(0,s.index),n=e.substr(s.index+s[0].length);c.push(o),c.push(a),e=n}return e.length&&c.push(e),t&&(c=t(c,a)),l.length>1&&c.push(i.a.createElement("br",{key:Object(r.q)()})),i.a.createElement(n.Fragment,{key:Object(r.q)()},c)});return a>0?c.slice(0,a):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function u(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(22),i=a(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(o||(o={}));const r=Object(i.o)([]),s="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function u(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===o.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(i.o)(e))),r}function d(e){if("object"==typeof e&&Array.isArray(e.data))return u(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:s,getById:l,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==l(e)),idsToAccounts:e=>e.map(e=>l(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===o.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===o.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:s,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return n.a.getAccounts().then(d).catch(e=>{throw n.a.getErrorReason(e)})},loadFromResponse:d,addAccounts:u}},30:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(1),n=a(66),i=a(4),r=function(e,t,a,o){var n,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(n.parse)(e.search),this.unListen=null,this.listeners=[],Object(o.p)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(n.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=!0){return Object(i.j)(this.parsed[e])}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}goto(e,t=!1){this.history.push(t?this.with(e):this.at(e),{})}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(n.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(a=>{e[a]&&0===e[a].length?delete t[a]:t[a]=e[a]}),t}}r([o.o],s.prototype,"path",void 0),r([o.o],s.prototype,"parsed",void 0),r([o.h],s.prototype,"_path",null);const l=new s},31:function(e,t,a){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-btn":"AccountsList__actions-btn",actionsBtn:"AccountsList__actions-btn","usages-cell":"AccountsList__usages-cell",usagesCell:"AccountsList__usages-cell","usages-col":"AccountsList__usages-col",usagesCol:"AccountsList__usages-col","type-cell":"AccountsList__type-cell",typeCell:"AccountsList__type-cell","type-col":"AccountsList__type-col",typeCol:"AccountsList__type-col"}},312:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var o=a(124),n=a.n(o),i=a(0),r=a.n(i),s=a(9),l=a(8),c=a(36),u=a(10);function d({value:e,defaultValue:t,onDone:a}){const o=r.a.useRef(),[i,d]=r.a.useState(""),[m,p]=r.a.useState(!1),h=()=>{d(e),p(!0)},f=()=>{p(!1),a&&a(i),o.current&&o.current.focus()},_=e=>{switch(e.key){case"Enter":case" ":h()}};return r.a.createElement("div",{className:n.a.root},r.a.createElement(c.a,{isOpen:m,onBlur:()=>p(!1),placement:"bottom"},({ref:a})=>r.a.createElement("div",{ref:Object(u.d)(a,o),className:n.a.staticContainer,onClick:h,onKeyPress:_,tabIndex:0,role:"button"},r.a.createElement("span",{className:n.a.label},e||t),r.a.createElement(l.a,{icon:"edit",className:n.a.editIcon})),r.a.createElement(c.b,null,r.a.createElement(c.e,null,r.a.createElement("div",{className:n.a.editContainer},r.a.createElement("input",{type:"text",value:i,onChange:e=>{d(e.target.value)},onKeyDown:e=>{switch(e.key){case"Enter":f();break;case"Escape":p(!1);break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:!0,placeholder:"Feed name"}),r.a.createElement(s.a,{className:n.a.doneBtn,type:s.c.PRIMARY,size:s.b.NORMAL,onClick:f},r.a.createElement(l.a,{icon:"yes"})))))))}},313:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var o=a(0),n=a.n(o),i=a(195),r=a.n(i),s=a(88),l=a(9),c=a(8);function u({children:e,steps:t,current:a,onChangeStep:o,firstStep:i,lastStep:u}){var d;i=null!=i?i:[],u=null!=u?u:[];const m=null!==(d=t.findIndex(e=>e.key===a))&&void 0!==d?d:0,p=m<=0,h=m>=t.length-1,f=p?null:t[m-1],_=h?null:t[m+1],g=p?i:n.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!p&&o&&o(t[m-1].key),className:r.a.prevLink,disabled:f.disabled},n.a.createElement(c.a,{icon:"arrow-left-alt2"}),n.a.createElement("span",null,f.label)),b=h?u:n.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!h&&o&&o(t[m+1].key),className:r.a.nextLink,disabled:_.disabled},n.a.createElement("span",null,_.label),n.a.createElement(c.a,{icon:"arrow-right-alt2"}));return n.a.createElement(s.b,null,{path:[],left:g,right:b,center:e})}},314:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var o=a(0),n=a.n(o),i=a(165),r=a.n(i),s=a(88),l=a(9),c=a(8),u=a(36);function d({pages:e,current:t,onChangePage:a,showNavArrows:o,hideMenuArrow:i,children:u}){var d,p;const{path:h,right:f}=u,_=null!==(d=e.findIndex(e=>e.key===t))&&void 0!==d?d:0,g=null!==(p=e[_].label)&&void 0!==p?p:"",b=_<=0,y=_>=e.length-1,v=b?null:e[_-1],E=y?null:e[_+1];let S=[];return o&&S.push(n.a.createElement(l.a,{key:"page-menu-left",type:l.c.PILL,onClick:()=>!b&&a&&a(e[_-1].key),disabled:b||v.disabled},n.a.createElement(c.a,{icon:"arrow-left-alt2"}))),S.push(n.a.createElement(m,{key:"page-menu",pages:e,current:t,onClickPage:e=>a&&a(e)},n.a.createElement("span",null,g),!i&&n.a.createElement(c.a,{icon:"arrow-down-alt2",className:r.a.arrowDown}))),o&&S.push(n.a.createElement(l.a,{key:"page-menu-left",type:l.c.PILL,onClick:()=>!y&&a&&a(e[_+1].key),disabled:y||E.disabled},n.a.createElement(c.a,{icon:"arrow-right-alt2"}))),n.a.createElement(s.b,{pathStyle:h.length>1?"line":"none"},{path:h,right:f,center:S})}function m({pages:e,current:t,onClickPage:a,children:o}){const[i,s]=n.a.useState(!1),l=()=>s(!0),c=()=>s(!1);return n.a.createElement(u.a,{isOpen:i,onBlur:c,placement:"bottom-start",refClassName:r.a.menuRef},({ref:e})=>n.a.createElement("a",{ref:e,className:r.a.menuLink,onClick:l},o),n.a.createElement(u.b,null,e.map(e=>{return n.a.createElement(u.c,{key:e.key,disabled:e.disabled,active:e.key===t,onClick:(o=e.key,()=>{a&&a(o),c()})},e.label);var o})))}},315:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),i=a(196),r=a.n(i),s=a(89);function l({isOpen:e,onAccept:t,onCancel:a}){const[o,i]=n.a.useState("");function l(){t&&t(o)}return n.a.createElement(s.a,{title:"Feed name",isOpen:e,onCancel:function(){a&&a()},onAccept:l,buttons:["Save","Cancel"]},n.a.createElement("p",{className:r.a.message},"Give this feed a memorable name:"),n.a.createElement("input",{type:"text",className:r.a.input,value:o,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(l(),e.preventDefault(),e.stopPropagation())},autoFocus:!0}))}},330:function(e,t,a){e.exports={"create-new-btn":"FeedsScreen__create-new-btn",createNewBtn:"FeedsScreen__create-new-btn"}},34:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaViewer__container layout__flex-box",horizontal:"MediaViewer__horizontal MediaViewer__container layout__flex-box",vertical:"MediaViewer__vertical MediaViewer__container layout__flex-box",wrapper:"MediaViewer__wrapper layout__flex-box","wrapper-sidebar":"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",wrapperSidebar:"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",sidebar:"MediaViewer__sidebar","media-frame":"MediaViewer__media-frame layout__flex-box",mediaFrame:"MediaViewer__media-frame layout__flex-box","media-container":"MediaViewer__media-container",mediaContainer:"MediaViewer__media-container","media-sizer":"MediaViewer__media-sizer layout__flex-box",mediaSizer:"MediaViewer__media-sizer layout__flex-box",media:"MediaViewer__media"}},35:function(e,t,a){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},39:function(e,t,a){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},391:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return x}));var o=a(311),n=a(0),i=a.n(n),r=a(59),s=a(392),l=a(30),c=a(55),u=a(7),d=a(393),m=a(6),p=a(394),h=a(413),f=a(51),_=a(335),g=a(198),b=a(207),y=a(415),v=a(22),E=a(97);const S=document.title.replace("Spotlight","%s ‹ Spotlight");function w(){const e=l.a.get("screen"),t=c.b.getScreen(e);t&&(document.title=S.replace("%s",t.title))}l.a.listen(w);const x=Object(o.hot)(e)(Object(u.b)((function(){const[e,t]=Object(n.useState)(!1),[a,o]=Object(n.useState)(!1);Object(n.useLayoutEffect)(()=>{e||a||b.a.run().then(()=>{t(!0),o(!1),g.a.fetch()}).catch(e=>{E.a.trigger({type:"load/error",message:e.toString()})})},[a,e]);const u=e=>{var t,a;const o=null!==(a=null!==(t=e.detail.message)&&void 0!==t?t:e.detail.response.data.message)&&void 0!==a?a:null;E.a.trigger({type:"feed/fetch_media/error",message:o})},S=()=>{f.a.add("admin/feed/import_media",f.a.message("Retrieving posts from Instagram. This may take around 30 seconds."),0)},x=()=>{f.a.remove("admin/feed/import_media")},O=e=>{f.a.remove("admin/feed/import_media"),E.a.trigger({type:"feed/import_media/error",message:e.message})};return Object(n.useEffect)(()=>(w(),document.addEventListener(m.a.Events.FETCH_FAIL,u),document.addEventListener(v.a.events.onImportStart,S),document.addEventListener(v.a.events.onImportEnd,x),document.addEventListener(v.a.events.onImportFail,O),()=>{document.removeEventListener(m.a.Events.FETCH_FAIL,u),document.removeEventListener(v.a.events.onImportStart,S),document.removeEventListener(v.a.events.onImportEnd,x),document.removeEventListener(v.a.events.onImportFail,O)}),[]),e?i.a.createElement(r.b,{history:l.a.history},c.b.getList().map((e,t)=>i.a.createElement(s.a,{key:e.id,when:"screen",is:e.id,isRoot:0===t,render:()=>i.a.createElement(e.component)})),i.a.createElement(h.a,null),i.a.createElement(y.a,null),i.a.createElement(p.a,null),i.a.createElement(_.a,null)):i.a.createElement(i.a.Fragment,null,i.a.createElement(d.a,null),i.a.createElement(_.a,null))})))}).call(this,a(241)(e))},393:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var o=a(0),n=a.n(o),i=a(15);function r(){const e=new Date,t=3===e.getMonth()&&1===e.getDate()?"spitloght-800w.png":"spotlight-800w.png";return n.a.createElement("div",{className:"admin-loading"},n.a.createElement("div",{className:"admin-loading__perspective"},n.a.createElement("div",{className:"admin-loading__container"},n.a.createElement("img",{src:i.a.image(t),className:"admin-loading__logo",alt:"Spotlight"}))))}},4:function(e,t,a){"use strict";a.d(t,"q",(function(){return r})),a.d(t,"h",(function(){return s})),a.d(t,"a",(function(){return l})),a.d(t,"r",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"m",(function(){return m})),a.d(t,"l",(function(){return p})),a.d(t,"i",(function(){return h})),a.d(t,"e",(function(){return f})),a.d(t,"p",(function(){return _})),a.d(t,"o",(function(){return g})),a.d(t,"n",(function(){return b})),a.d(t,"k",(function(){return y})),a.d(t,"g",(function(){return v})),a.d(t,"f",(function(){return E})),a.d(t,"c",(function(){return S})),a.d(t,"j",(function(){return w}));var o=a(171),n=a(172);let i=0;function r(){return i++}function s(e){const t={};return Object.keys(e).forEach(a=>{const o=e[a];Array.isArray(o)?t[a]=o.slice():o instanceof Map?t[a]=new Map(o.entries()):t[a]="object"==typeof o?s(o):o}),t}function l(e,t){return Object.keys(t).forEach(a=>{e[a]=t[a]}),e}function c(e,t){return l(s(e),t)}function u(e,t){return Array.isArray(e)&&Array.isArray(t)?d(e,t):e instanceof Map&&t instanceof Map?d(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?m(e,t):e===t}function d(e,t,a){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(a){if(!a(e[o],t[o]))return!1}else if(!u(e[o],t[o]))return!1;return!0}function m(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return u(e,t);const a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;const n=new Set(a.concat(o));for(const a of n)if(!u(e[a],t[a]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function h(e,t,a){return a=null!=a?a:(e,t)=>e===t,e.filter(e=>!t.some(t=>a(e,t)))}function f(e,t,a){return a=null!=a?a:(e,t)=>e===t,e.every(e=>t.some(t=>a(e,t)))&&t.every(t=>e.some(e=>a(t,e)))}function _(e,t){const a=/(\s+)/g;let o,n=0,i=0,r="";for(;null!==(o=a.exec(e))&&n<t;){const t=o.index+o[1].length;r+=e.substr(i,t-i),i=t,n++}return i<e.length&&(r+=" ..."),r}function g(e){return Object(o.a)(Object(n.a)(e),{addSuffix:!0})}function b(e,t){const a=[];return e.forEach((e,o)=>{const n=o%t;Array.isArray(a[n])?a[n].push(e):a[n]=[e]}),a}function y(e,t){for(const a of t){const t=a();if(e(t))return t}}function v(e,t,a){return Math.max(t,Math.min(a,e))}function E(e,t){return v(e,0,t.length-1)}function S(e,t,a){const o=e.slice();return o[t]=a,o}function w(e){return Array.isArray(e)?e[0]:e}},41:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));class o{static getById(e){const t=o.list.find(t=>t.id===e);return!t&&o.list.length>0?o.list[0]:t}static getName(e){const t=o.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){o.list.push(e)}}o.list=[]},413:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var o=a(0),n=a.n(o),i=a(213),r=a.n(i),s=a(7),l=a(8),c=a(18),u=a(198),d=a(414),m=a(36);const p=Object(s.b)((function(){const[e,t]=n.a.useState(!1),[a,o]=n.a.useState(!1),i=n.a.useCallback(()=>o(!0),[]),s=n.a.useCallback(()=>o(!1),[]),p=Object(c.g)(i);return!e&&u.a.list.length>0&&n.a.createElement(m.a,{className:r.a.menu,isOpen:a,onBlur:s,placement:"top-end"},({ref:e})=>n.a.createElement("div",{ref:e,className:r.a.beacon},n.a.createElement("button",{className:r.a.button,onClick:i,onKeyPress:p},n.a.createElement(l.a,{icon:"megaphone"}),u.a.list.length>0&&n.a.createElement("div",{className:r.a.counter},u.a.list.length))),n.a.createElement(m.b,null,u.a.list.map(e=>n.a.createElement(d.a,{key:e.id,notification:e})),a&&n.a.createElement("a",{className:r.a.hideLink,onClick:()=>t(!0)},"Hide")))}))},42:function(e,a){e.exports=t},448:function(e,t,a){},45:function(e,t,a){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,a){"use strict";function o(e,t,a={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(a))}function n(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i}))},48:function(e,t,a){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},49:function(e,t,a){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},5:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var o,n=a(11),i=a(3);!function(e){let t,a,o;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let a;function o(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!n.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[a.SMALL]:t.thumbnail,[a.MEDIUM]:t.thumbnail,[a.LARGE]:t.thumbnail}}return{[a.SMALL]:t.url,[a.MEDIUM]:t.url,[a.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(a=t.Size||(t.Size={})),t.get=function(e,t){const a=o(e);return n.a.get(a,t)||(r(e)?e.thumbnail:e.url)},t.getMap=o,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!n.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var o;let i=[];n.a.has(e.thumbnails,a.SMALL)&&i.push(n.a.get(e.thumbnails,a.SMALL)+` ${t.s}w`),n.a.has(e.thumbnails,a.MEDIUM)&&i.push(n.a.get(e.thumbnails,a.MEDIUM)+` ${t.m}w`);const r=null!==(o=n.a.get(e.thumbnails,a.LARGE))&&void 0!==o?o:e.url;return i.push(r+` ${t.l}w`),i}}(a=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function a(e){switch(e){case t.PERSONAL_ACCOUNT:return i.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return i.a.Type.BUSINESS;default:return}}function o(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===i.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=a,e.getHashtagSort=o,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const n=[],r=[],s=[],l=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:o(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const u=i.b.getByUsername(e.name),d=u?a(e.type):null;u&&u.type===d?e.type===t.TAGGED_ACCOUNT?r.push(u):e.type===t.USER_STORY?s.push(u):n.push(u):l.push(e)}}),{accounts:n,tagged:r,stories:s,hashtags:c,misc:l}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(o=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let a=[];for(;e.length;)a.push(e.splice(0,t));if(a.length>0){const e=a.length-1;for(;a[e].length<t;)a[e].push({})}return a},e.isFromHashtag=e=>e.source.type===o.Type.POPULAR_HASHTAG||e.source.type===o.Type.RECENT_HASHTAG,e.isNotAChild=r}(o||(o={}))},53:function(e,t,a){"use strict";function o(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function n(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return n}))},54:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var o=a(0),n=a.n(o),i=a(45),r=a.n(i),s=a(105),l=a(5),c=a(73),u=a.n(c);function d(){return n.a.createElement("div",{className:u.a.root})}var m=a(10);function p(e){var{media:t,className:a,size:i,onLoadImage:c,width:u,height:p}=e,h=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["media","className","size","onLoadImage","width","height"]);const f=n.a.useRef(),_=n.a.useRef(),[g,b]=n.a.useState(!l.a.Thumbnails.has(t)),[y,v]=n.a.useState(!0),[E,S]=n.a.useState(!1);function w(){if(f.current){const e=null!=i?i:function(){const e=f.current.getBoundingClientRect();return e.width<=320?l.a.Thumbnails.Size.SMALL:e.width<=600?l.a.Thumbnails.Size.MEDIUM:l.a.Thumbnails.Size.LARGE}(),a=l.a.Thumbnails.get(t,e);f.current.src!==a&&(f.current.src=a)}}function x(){P()}function O(){t.type===l.a.Type.VIDEO?b(!0):f.current.src===t.url?S(!0):f.current.src=t.url,P()}function M(){isNaN(_.current.duration)||_.current.duration===1/0?_.current.currentTime=1:_.current.currentTime=_.current.duration/2,P()}function P(){v(!1),c&&c()}return Object(o.useLayoutEffect)(()=>{let e=new s.a(w);return f.current&&(f.current.onload=x,f.current.onerror=O,w(),e.observe(f.current)),_.current&&(_.current.onloadeddata=M),()=>{f.current&&(f.current.onload=()=>null,f.current.onerror=()=>null),_.current&&(_.current.onloadeddata=()=>null),e.disconnect()}},[t,i]),t.url&&t.url.length>0&&!E?n.a.createElement("div",Object.assign({className:Object(m.b)(r.a.root,a)},h),"VIDEO"===t.type&&g?n.a.createElement("video",{ref:_,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},n.a.createElement("source",{src:t.url}),"Your browser does not support videos"):n.a.createElement("img",Object.assign({ref:f,className:r.a.image,loading:"lazy",width:u,height:p,alt:""},m.e)),y&&n.a.createElement(d,null)):n.a.createElement("div",{className:r.a.notAvailable},n.a.createElement("span",null,"Thumbnail not available"))}},55:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return n}));var o,n,i=a(30),r=a(1);!function(e){e.NEW_FEED="new",e.EDIT_FEED="edit",e.FEED_LIST="feeds",e.SETTINGS="settings",e.PROMOTIONS="promotions"}(o||(o={})),function(e){const t=Object(r.o)([]);e.getList=function(){return t},e.register=function(a){return t.push(a),function(){const e=t.slice().sort((e,t)=>{var a,o;const n=null!==(a=e.position)&&void 0!==a?a:0,i=null!==(o=t.position)&&void 0!==o?o:0;return Math.sign(n-i)});t.replace(e)}(),e},e.getScreen=function(e){return t.find(t=>t.id===e)},e.getCurrent=function(){var e;const a=null!==(e=i.a.get("screen"))&&void 0!==e?e:"";return t.find((e,t)=>a===e.id||!a&&0===t)}}(n||(n={}))},56:function(e,t,a){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",image:"MediaPopupBoxImage__image MediaPopupBoxObject__reset",loading:"MediaPopupBoxImage__loading MediaPopupBoxImage__image MediaPopupBoxObject__reset MediaPopupBoxObject__loading-animation",error:"MediaPopupBoxImage__error MediaPopupBoxImage__image MediaPopupBoxObject__reset layout__flex-box","fade-in-animation":"MediaPopupBoxImage__fade-in-animation",fadeInAnimation:"MediaPopupBoxImage__fade-in-animation"}},57:function(e,t,a){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},6:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var o=a(50),n=a.n(o),i=a(1),r=a(2),s=a(41),l=a(3),c=a(4),u=a(29),d=a(16),m=a(22),p=a(68),h=a(12),f=a(11),_=a(15),g=function(e,t,a,o){var n,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(r=(i<3?n(r):i>3?n(t,a,r):n(t,a))||r);return i>3&&r&&Object.defineProperty(t,a,r),r};class b{constructor(e=new b.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new b.Options(e),this.localMedia=i.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(i.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(i.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(i.p)(()=>this._media,e=>this.media=e),Object(i.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(i.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,b.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,a){return this.cancelFetch(),b.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((o,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};a&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,o&&o()}).catch(e=>{var t;if(n.a.isCancel(e)||void 0===e.response)return null;const a=new b.Events.FetchFailEvent(b.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(a),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}g([i.o],b.prototype,"media",void 0),g([i.o],b.prototype,"canLoadMore",void 0),g([i.o],b.prototype,"stories",void 0),g([i.o],b.prototype,"numLoadedMore",void 0),g([i.o],b.prototype,"options",void 0),g([i.o],b.prototype,"totalMedia",void 0),g([i.o],b.prototype,"mode",void 0),g([i.o],b.prototype,"isLoaded",void 0),g([i.o],b.prototype,"isLoading",void 0),g([i.f],b.prototype,"reload",void 0),g([i.o],b.prototype,"localMedia",void 0),g([i.o],b.prototype,"numMediaShown",void 0),g([i.o],b.prototype,"numMediaToShow",void 0),g([i.o],b.prototype,"numMediaPerPage",void 0),g([i.h],b.prototype,"_media",null),g([i.h],b.prototype,"_numMediaShown",null),g([i.h],b.prototype,"_numMediaPerPage",null),g([i.h],b.prototype,"_canLoadMore",null),g([i.f],b.prototype,"loadMore",null),g([i.f],b.prototype,"load",null),g([i.f],b.prototype,"loadMedia",null),g([i.f],b.prototype,"addLocalMedia",null),function(e){let t,a,o,n,m,p,b,y,v,E,S,w;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class x{constructor(e={}){x.setFromObject(this,e)}static setFromObject(t,a={}){var o,n,i,c,u,d,m,p,h,_,g,b,y,v,E,S,w;const x=a.accounts?a.accounts.slice():e.DefaultOptions.accounts;t.accounts=x.filter(e=>!!e).map(e=>parseInt(e.toString()));const O=a.tagged?a.tagged.slice():e.DefaultOptions.tagged;return t.tagged=O.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=a.hashtags?a.hashtags.slice():e.DefaultOptions.hashtags,t.layout=s.a.getById(a.layout).id,t.numColumns=r.a.normalize(a.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(a.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderNumScrollPosts=r.a.normalize(a.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.sliderInfinite=null!==(o=a.sliderInfinite)&&void 0!==o?o:e.DefaultOptions.sliderInfinite,t.sliderLoop=null!==(n=a.sliderLoop)&&void 0!==n?n:e.DefaultOptions.sliderLoop,t.sliderArrowPos=r.a.normalize(a.sliderArrowPos,e.DefaultOptions.sliderArrowPos),t.sliderArrowSize=a.sliderArrowSize||e.DefaultOptions.sliderArrowSize,t.sliderArrowColor=a.sliderArrowColor||e.DefaultOptions.sliderArrowColor,t.sliderArrowBgColor=a.sliderArrowBgColor||e.DefaultOptions.sliderArrowBgColor,t.mediaType=a.mediaType||e.DefaultOptions.mediaType,t.postOrder=a.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(a.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(a.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(a.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(a.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(a.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(a.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(a.textSize,e.DefaultOptions.textSize),t.bgColor=a.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=a.hoverInfo?a.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=a.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=a.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(a.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(a.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(i=a.headerAccount)&&void 0!==i?i:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===l.b.getById(t.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(a.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(a.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(a.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=a.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=a.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(a.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(c=a.customProfilePic)&&void 0!==c?c:e.DefaultOptions.customProfilePic,t.customBioText=a.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(u=a.includeStories)&&void 0!==u?u:e.DefaultOptions.includeStories,t.storiesInterval=a.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(a.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(a.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(d=a.captionRemoveDots)&&void 0!==d?d:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(a.captionSize,e.DefaultOptions.captionSize),t.captionColor=a.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(a.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(a.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(a.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(m=a.likesIconColor)&&void 0!==m?m:e.DefaultOptions.likesIconColor,t.commentsIconColor=a.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(p=a.lightboxShowSidebar)&&void 0!==p?p:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=a.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(a.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=a.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=a.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=a.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(h=a.autoload)&&void 0!==h?h:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(a.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(_=a.followBtnText)&&void 0!==_?_:e.DefaultOptions.followBtnText,t.followBtnTextColor=a.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=a.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(a.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=a.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=a.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=a.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=a.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(g=a.hashtagWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(b=a.hashtagBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(y=a.captionWhitelistSettings)&&void 0!==y?y:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(v=a.captionBlacklistSettings)&&void 0!==v?v:e.DefaultOptions.captionBlacklistSettings,t.moderation=a.moderation||e.DefaultOptions.moderation,t.moderationMode=a.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(E=a.promotionEnabled)&&void 0!==E?E:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(S=a.autoPromotionsEnabled)&&void 0!==S?S:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(w=a.globalPromotionsEnabled)&&void 0!==w?w:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(a.promotions)?t.promotions=f.a.fromArray(a.promotions):a.promotions&&a.promotions instanceof Map?t.promotions=f.a.fromMap(a.promotions):"object"==typeof a.promotions?t.promotions=a.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=l.b.idsToAccounts(e.accounts),a=l.b.idsToAccounts(e.tagged);return{all:t.concat(a),accounts:t,tagged:a}}static getSources(e){return{accounts:l.b.idsToAccounts(e.accounts),tagged:l.b.idsToAccounts(e.tagged),hashtags:l.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const a=e.Options.getSources(t),o=a.accounts.length>0||a.tagged.length>0,n=a.hashtags.length>0;return o||n}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}g([i.o],x.prototype,"accounts",void 0),g([i.o],x.prototype,"hashtags",void 0),g([i.o],x.prototype,"tagged",void 0),g([i.o],x.prototype,"layout",void 0),g([i.o],x.prototype,"numColumns",void 0),g([i.o],x.prototype,"highlightFreq",void 0),g([i.o],x.prototype,"sliderNumScrollPosts",void 0),g([i.o],x.prototype,"sliderInfinite",void 0),g([i.o],x.prototype,"sliderLoop",void 0),g([i.o],x.prototype,"sliderArrowPos",void 0),g([i.o],x.prototype,"sliderArrowSize",void 0),g([i.o],x.prototype,"sliderArrowColor",void 0),g([i.o],x.prototype,"sliderArrowBgColor",void 0),g([i.o],x.prototype,"mediaType",void 0),g([i.o],x.prototype,"postOrder",void 0),g([i.o],x.prototype,"numPosts",void 0),g([i.o],x.prototype,"linkBehavior",void 0),g([i.o],x.prototype,"feedWidth",void 0),g([i.o],x.prototype,"feedHeight",void 0),g([i.o],x.prototype,"feedPadding",void 0),g([i.o],x.prototype,"imgPadding",void 0),g([i.o],x.prototype,"textSize",void 0),g([i.o],x.prototype,"bgColor",void 0),g([i.o],x.prototype,"textColorHover",void 0),g([i.o],x.prototype,"bgColorHover",void 0),g([i.o],x.prototype,"hoverInfo",void 0),g([i.o],x.prototype,"showHeader",void 0),g([i.o],x.prototype,"headerInfo",void 0),g([i.o],x.prototype,"headerAccount",void 0),g([i.o],x.prototype,"headerStyle",void 0),g([i.o],x.prototype,"headerTextSize",void 0),g([i.o],x.prototype,"headerPhotoSize",void 0),g([i.o],x.prototype,"headerTextColor",void 0),g([i.o],x.prototype,"headerBgColor",void 0),g([i.o],x.prototype,"headerPadding",void 0),g([i.o],x.prototype,"customBioText",void 0),g([i.o],x.prototype,"customProfilePic",void 0),g([i.o],x.prototype,"includeStories",void 0),g([i.o],x.prototype,"storiesInterval",void 0),g([i.o],x.prototype,"showCaptions",void 0),g([i.o],x.prototype,"captionMaxLength",void 0),g([i.o],x.prototype,"captionRemoveDots",void 0),g([i.o],x.prototype,"captionSize",void 0),g([i.o],x.prototype,"captionColor",void 0),g([i.o],x.prototype,"showLikes",void 0),g([i.o],x.prototype,"showComments",void 0),g([i.o],x.prototype,"lcIconSize",void 0),g([i.o],x.prototype,"likesIconColor",void 0),g([i.o],x.prototype,"commentsIconColor",void 0),g([i.o],x.prototype,"lightboxShowSidebar",void 0),g([i.o],x.prototype,"numLightboxComments",void 0),g([i.o],x.prototype,"showLoadMoreBtn",void 0),g([i.o],x.prototype,"loadMoreBtnText",void 0),g([i.o],x.prototype,"loadMoreBtnTextColor",void 0),g([i.o],x.prototype,"loadMoreBtnBgColor",void 0),g([i.o],x.prototype,"autoload",void 0),g([i.o],x.prototype,"showFollowBtn",void 0),g([i.o],x.prototype,"followBtnText",void 0),g([i.o],x.prototype,"followBtnTextColor",void 0),g([i.o],x.prototype,"followBtnBgColor",void 0),g([i.o],x.prototype,"followBtnLocation",void 0),g([i.o],x.prototype,"hashtagWhitelist",void 0),g([i.o],x.prototype,"hashtagBlacklist",void 0),g([i.o],x.prototype,"captionWhitelist",void 0),g([i.o],x.prototype,"captionBlacklist",void 0),g([i.o],x.prototype,"hashtagWhitelistSettings",void 0),g([i.o],x.prototype,"hashtagBlacklistSettings",void 0),g([i.o],x.prototype,"captionWhitelistSettings",void 0),g([i.o],x.prototype,"captionBlacklistSettings",void 0),g([i.o],x.prototype,"moderation",void 0),g([i.o],x.prototype,"moderationMode",void 0),e.Options=x;class O{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.d)(Object(c.p)(t,this.captionMaxLength)):t}static compute(t,a=r.a.Mode.DESKTOP){const o=new O({accounts:l.b.filterExisting(t.accounts),tagged:l.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:s.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,a,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,a,!0),sliderInfinite:t.sliderInfinite,sliderLoop:t.sliderLoop,sliderArrowPos:r.a.get(t.sliderArrowPos,a,!0),sliderArrowSize:r.a.get(t.sliderArrowSize,a,!0),sliderArrowColor:Object(d.a)(t.sliderArrowColor),sliderArrowBgColor:Object(d.a)(t.sliderArrowBgColor),linkBehavior:r.a.get(t.linkBehavior,a,!0),bgColor:Object(d.a)(t.bgColor),textColorHover:Object(d.a)(t.textColorHover),bgColorHover:Object(d.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,a,!0),headerInfo:r.a.get(t.headerInfo,a,!0),headerStyle:r.a.get(t.headerStyle,a,!0),headerTextColor:Object(d.a)(t.headerTextColor),headerBgColor:Object(d.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,a,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,a,!0),captionMaxLength:r.a.get(t.captionMaxLength,a,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(d.a)(t.captionColor),showLikes:r.a.get(t.showLikes,a,!0),showComments:r.a.get(t.showComments,a,!0),likesIconColor:Object(d.a)(t.likesIconColor),commentsIconColor:Object(d.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,a,!0),loadMoreBtnTextColor:Object(d.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,a,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,a,!0),followBtnTextColor:Object(d.a)(t.followBtnTextColor),followBtnBgColor:Object(d.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(o.numColumns=this.getNumCols(t,a),o.numPosts=this.getNumPosts(t,a),o.allAccounts=o.accounts.concat(o.tagged.filter(e=>!o.accounts.includes(e))),o.allAccounts.length>0&&(o.account=t.headerAccount&&o.allAccounts.includes(t.headerAccount)?l.b.getById(t.headerAccount):l.b.getById(o.allAccounts[0])),o.showHeader=o.showHeader&&null!==o.account,o.showHeader&&(o.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:l.b.getProfilePicUrl(o.account)),o.showFollowBtn=o.showFollowBtn&&null!==o.account,o.showBio=o.headerInfo.some(t=>t===e.HeaderInfo.BIO),o.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==o.account?l.b.getBioText(o.account):"";o.bioText=Object(u.d)(e),o.showBio=o.bioText.length>0}return o.feedWidth=this.normalizeCssSize(t.feedWidth,a,"100%"),o.feedHeight=this.normalizeCssSize(t.feedHeight,a,"auto"),o.feedOverflowX=r.a.get(t.feedWidth,a)?"auto":void 0,o.feedOverflowY=r.a.get(t.feedHeight,a)?"auto":void 0,o.feedPadding=this.normalizeCssSize(t.feedPadding,a,"0"),o.imgPadding=this.normalizeCssSize(t.imgPadding,a,"0"),o.textSize=this.normalizeCssSize(t.textSize,a,"inherit",!0),o.headerTextSize=this.normalizeCssSize(t.headerTextSize,a,"inherit"),o.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,a,"50px"),o.captionSize=this.normalizeCssSize(t.captionSize,a,"inherit"),o.lcIconSize=this.normalizeCssSize(t.lcIconSize,a,"inherit"),o.buttonPadding=Math.max(10,r.a.get(t.imgPadding,a))+"px",o.showLcIcons=o.showLikes||o.showComments,o}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,a=0){const o=parseInt(r.a.get(e,t)+"");return isNaN(o)?t===r.a.Mode.DESKTOP?a:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,a):o}static normalizeCssSize(e,t,a=null,o=!1){const n=r.a.get(e,t,o);return n?n+"px":a}}function M(e,t){if(_.a.isPro)return Object(c.k)(h.a.isValid,[()=>P(e,t),()=>t.globalPromotionsEnabled&&h.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&h.a.getAutoPromo(e)])}function P(e,t){return e?h.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=O,function(e){e.NONE="none",e.LOOP="loop",e.INFINITE="infinite"}(a=e.SliderLoopMode||(e.SliderLoopMode={})),function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(o=e.SliderArrowPosition||(e.SliderArrowPosition={})),function(e){e.POPULAR="popular",e.RECENT="recent"}(n=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(m=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(p=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(b=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(y=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(v=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(E=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(S=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(w=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderNumScrollPosts:{desktop:1},sliderInfinite:!0,sliderLoop:!1,sliderArrowPos:{desktop:o.INSIDE},sliderArrowSize:{desktop:20},sliderArrowColor:{r:255,b:255,g:255,a:1},sliderArrowBgColor:{r:0,b:0,g:0,a:.8},mediaType:m.ALL,postOrder:b.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:p.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[y.LIKES_COMMENTS,y.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[E.PROFILE_PIC,E.BIO]},headerAccount:null,headerStyle:{desktop:v.NORMAL,phone:v.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:S.HEADER,phone:S.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:w.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=M,e.getFeedPromo=P,e.executeMediaClick=function(e,t){const a=M(e,t),o=h.a.getConfig(a),n=h.a.getType(a);return!(!n||!n.isValid(o)||"function"!=typeof n.onMediaClick)&&n.onMediaClick(e,o)},e.getLink=function(e,t){var a,o;const n=M(e,t),i=h.a.getConfig(n),r=h.a.getType(n);if(void 0===r||!r.isValid(i))return{text:null,url:null,newTab:!1};const[s,l]=r.getPopupLink?null!==(a=r.getPopupLink(e,i))&&void 0!==a?a:null:[null,!1];return{text:s,url:r.getMediaUrl&&null!==(o=r.getMediaUrl(e,i))&&void 0!==o?o:null,newTab:l,icon:"external"}}}(b||(b={}))},60:function(e,t,a){e.exports={root:"GenericNavbar__root",list:"GenericNavbar__list","left-list":"GenericNavbar__left-list GenericNavbar__list",leftList:"GenericNavbar__left-list GenericNavbar__list",item:"GenericNavbar__item","center-list":"GenericNavbar__center-list GenericNavbar__list",centerList:"GenericNavbar__center-list GenericNavbar__list","right-list":"GenericNavbar__right-list GenericNavbar__list",rightList:"GenericNavbar__right-list GenericNavbar__list","path-list":"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",pathList:"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list","path-segment":"GenericNavbar__path-segment",pathSegment:"GenericNavbar__path-segment",separator:"GenericNavbar__separator GenericNavbar__item"}},61:function(e,t,a){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},631:function(e,t,a){"use strict";a.r(t),a(287);var o=a(99),n=(a(448),a(390)),i=a(1),r=a(115),s=a(391),l=a(55),c=a(51),u=a(25),d=a(238),m=a.n(d),p=a(0),h=a.n(p),f=a(4),_=a(63),g=a(9),b=a(19),y=a(15);function v({}){const e=h.a.useRef(),t=h.a.useRef([]),[a,o]=h.a.useState(0),[n,i]=h.a.useState(!1),[,r]=h.a.useState(),s=()=>{const a=function(e){const t=.4*e.width,a=t/724,o=707*a,n=22*a,i=35*a;return{bounds:e,origin:{x:(e.width-t)/2+o-i/2,y:.5*e.height+n-i/2},scale:a,particleSize:i}}(e.current.getBoundingClientRect());t.current=t.current.map(e=>{const t=e.didSike?1:Math.max(1,1.3-1.3*Math.min(1,e.life/100));return Object.assign(Object.assign({},e),{pos:{x:e.pos.x+e.vel.x*t,y:e.pos.y+e.vel.y*t},life:e.life+1})}).filter(e=>e.life<500&&e.pos.x>=0&&e.pos.y>=0&&e.pos.x+e.size<=a.bounds.width&&e.pos.y+e.size<=a.bounds.height),t.current.length<30&&10*Math.random()>7&&t.current.push((e=>{const t=Math.max(1,4*Math.random()),a=2*Math.random()*Math.PI,o={x:Math.sin(a)*t,y:Math.cos(a)*t};return{pos:Object.assign({},e.origin),vel:o,size:e.particleSize,life:1}})(a)),r(f.q)};Object(p.useEffect)(()=>{const e=setInterval(s,25);return()=>clearInterval(e)},[]);const l=function(e){let t=null;return E.forEach(([a,o])=>{e>=a&&(t=o)}),t}(a);return h.a.createElement("div",{className:m.a.root},h.a.createElement("h1",{style:{textAlign:"center"}},"Let's play!"),h.a.createElement("p",null,"Click on as many Spotlight dots as you can. We challenge you to ",h.a.createElement("strong",null,"hit ",100),"!"),h.a.createElement("br",null),h.a.createElement("div",{ref:e,style:S.container},a>0&&h.a.createElement("div",{className:m.a.score},h.a.createElement("strong",null,"Score"),": ",h.a.createElement("span",null,a)),l&&h.a.createElement("div",{className:m.a.message},h.a.createElement("span",{className:m.a.messageBubble},l)),t.current.map((e,n)=>h.a.createElement("div",{key:n,onMouseDown:()=>(e=>{const n=t.current[e].didSike?5:1;t.current.splice(e,1),o(a+n)})(n),onMouseEnter:()=>(e=>{const a=t.current[e];if(a.didSike)return;const o=1e3*Math.random();o>100&&o<150&&(a.vel={x:5*Math.sign(-a.vel.x),y:5*Math.sign(-a.vel.y)},a.life=100,a.didSike=!0)})(n),style:Object.assign(Object.assign({},S.particle),{top:e.pos.y,left:e.pos.x,width:e.size,height:e.size,backgroundColor:e.didSike?"#ffaa00":"#"+(14492491+65536*e.life+256*e.life+e.life).toString(16)})},e.didSike&&h.a.createElement("span",{style:S.sike},"x",5)))),h.a.createElement(_.a,{title:"Get 20% off Spotlight PRO",isOpen:a>=100&&!n,onClose:()=>i(!0),allowShadeClose:!1},h.a.createElement(_.a.Content,null,h.a.createElement("div",{style:{textAlign:"center"}},h.a.createElement("p",{style:{display:"inline-block",width:"70%",marginTop:10}},h.a.createElement("strong",{style:{opacity:.7}},"You were just clicking the dot in the logo, weren't you?",h.a.createElement("br",null),"It doesn't matter. You made it a 100!")),h.a.createElement("h1",null,"Get 20% off Spotlight PRO"),h.a.createElement("p",{style:{display:"inline-block",width:"60%"}},"Open up to new opportunities with hashtag feeds, filtering options, visual moderation,"," ","tagged feeds, new layouts, promotions and much more."),h.a.createElement("div",{style:{margin:"10px 0"}},h.a.createElement("a",{href:b.a.resources.upgradeUrl,target:"_blank",style:{width:"100%"}},h.a.createElement(g.a,{type:g.c.PRIMARY,size:g.b.HERO,style:{width:"80%"}},"Get 20% off Spotlight PRO")))))))}const E=[[10,h.a.createElement("span",null,"You're getting the hang of this!")],[50,h.a.createElement("span",null,"Not bad. You're half way to a 100!")],[120,h.a.createElement("span",null,"Just post a 5-star review already. You're clearly in love with us!")],[150,h.a.createElement("span",null,"Hey, we'd be curious if there were more messages too. But sadly, this is the last one. Good-bye!")],[500,h.a.createElement("span",null,"Error: User has become obsessed with clicking games.")],[1e3,h.a.createElement("span",null,"While the term Easter egg has been used to mean a hidden object for some time, in reference to an Easter egg hunt, it has come to be more commonly used to mean a message, image, or feature hidden in a video game, film, or other, usually electronic, medium. The term used in this manner was coined around 1979 by Steve Wright, the then Director of Software Development in the Atari Consumer Division, to describe a hidden message in the Atari video game Adventure. [Wikipedia]")]],S={container:{flex:1,position:"relative",backgroundColor:"#fff",backgroundImage:`url('${y.a.image("spotlight-800w.png")}')`,backgroundPosition:"center 50%",backgroundSize:"40%",backgroundRepeat:"no-repeat",borderRadius:8,marginTop:15,userSelect:"none"},particle:{position:"absolute",backgroundColor:"#dd234b",borderRadius:999,cursor:"pointer",color:"#000",userSelect:"none"},sike:{position:"relative",left:"calc(100% + 5px)",fontSize:"16px",userSelect:"none"}};var w=a(175),x=a(239),O=a.n(x),M=a(7),P=a(10),k=Object(M.b)((function({}){return h.a.createElement("div",{className:O.a.root})}));Object(M.b)((function({className:e,label:t,children:a}){const o="settings-field-"+Object(f.q)();return h.a.createElement("div",{className:Object(P.b)(O.a.fieldContainer,e)},h.a.createElement("div",{className:O.a.fieldLabel},h.a.createElement("label",{htmlFor:o},t)),h.a.createElement("div",{className:O.a.fieldControl},a(o)))}));var C=a(133),L=a(30),N=a(97);const B={factories:Object(o.b)({"admin/root/component":()=>s.a,"admin/settings/tabs/accounts":()=>({id:"accounts",label:"Manage Accounts",component:w.a}),"admin/settings/tabs/crons":()=>({id:"crons",label:"Crons",component:Object(r.b)(C.a,{page:()=>b.a.settings.pages.find(e=>"crons"===e.id)})}),"admin/settings/tabs/advanced":e=>({id:"advanced",label:"Advanced",component:e.get("admin/settings/show_game")?e.get("admin/settings/game/component"):e.get("admin/settings/advanced/component")}),"admin/settings/show_game":()=>!0,"admin/settings/advanced/component":()=>k,"admin/settings/game/component":()=>v}),extensions:Object(o.b)({"root/children":(e,t)=>[...t,e.get("admin/root/component")],"settings/tabs":(e,t)=>[e.get("admin/settings/tabs/accounts"),e.get("admin/settings/tabs/advanced"),...t]}),run:()=>{document.addEventListener(u.b,()=>{c.a.add("admin/settings/saved",c.a.message("Settings saved."))}),document.addEventListener(u.a,e=>{N.a.trigger({type:"settings/save/error",message:e.detail.error})});{const e=document.getElementById("toplevel_page_spotlight-instagram");if(e){const t=e.querySelector("ul.wp-submenu").querySelectorAll("li:not(.wp-submenu-head)"),a=Array.from(t);l.b.getList().forEach((e,t)=>{const o=0===t,n=e.state||{},r=L.a.fullUrl(Object.assign({screen:e.id},n)),s=L.a.at(Object.assign({screen:e.id},n)),l=a.find(e=>e.querySelector("a").href===r);l&&(l.addEventListener("click",e=>{L.a.history.push(s,{}),e.preventDefault(),e.stopPropagation()}),Object(i.g)(()=>{var t;const a=null!==(t=L.a.get("screen"))&&void 0!==t?t:"",n=e.id===a||!a&&o;l.classList.toggle("current",n)}))})}}}};var T=a(207),A=a(40),I=a(3),F=a(330),j=a.n(F),D=a(191),R=a(58),z=a(78),H=a.n(z),U=a(8),W=a(134),G=a(41),V=a(6),q=a(22),Y=a(74),K=a(36),$=a(136),X=a(265),J=a(104),Q=a(29);function Z(){const[e,t]=h.a.useState(null),a=e=>{L.a.goto({screen:l.a.EDIT_FEED,id:e.id.toString()})},o={cols:{name:H.a.nameCol,sources:H.a.sourcesCol,usages:H.a.usagesCol,actions:H.a.actionsCol},cells:{name:H.a.nameCell,sources:H.a.sourcesCell,usages:H.a.usagesCell,actions:H.a.actionsCell}};return h.a.createElement("div",{className:"feeds-list"},h.a.createElement(W.a,{styleMap:o,cols:[{id:"name",label:"Name",render:e=>{const t=L.a.at({screen:l.a.EDIT_FEED,id:e.id.toString()});return h.a.createElement("div",null,h.a.createElement(R.a,{to:t,className:H.a.name},e.name?e.name:"(no name)"),h.a.createElement("div",{className:H.a.metaList},h.a.createElement("span",{className:H.a.id},"ID: ",e.id),h.a.createElement("span",{className:H.a.layout},G.a.getName(e.options.layout))))}},{id:"sources",label:"Shows posts from",render:e=>h.a.createElement(ee,{feed:e,onClickAccount:t})},{id:"usages",label:"Instances",render:e=>h.a.createElement(te,{feed:e})},{id:"actions",label:"Actions",render:e=>h.a.createElement("div",{className:H.a.actionsList},h.a.createElement(K.f,null,({ref:e,openMenu:t})=>h.a.createElement(g.a,{ref:e,className:H.a.actionsBtn,type:g.c.PILL,size:g.b.NORMAL,onClick:t},h.a.createElement($.a,null)),h.a.createElement(K.b,null,h.a.createElement(K.c,{onClick:()=>a(e)},"Edit feed"),h.a.createElement(K.c,{onClick:()=>(e=>{c.a.add("admin/feeds/duplicate/wait",c.a.message("Duplicating feed. Please wait ...")),A.a.duplicate(e).then(a).finally(()=>{c.a.remove("admin/feeds/duplicate/wait")})})(e)},"Duplicate feed"),h.a.createElement(X.a,{feed:e},h.a.createElement(K.c,null,"Copy shortcode")),h.a.createElement(K.d,null),h.a.createElement(K.c,{onClick:()=>(e=>{q.a.importMedia(e.options).then(()=>{c.a.add("admin/feeds/import/done",c.a.message(`Finished importing posts for "${e.name}"`))})})(e)},"Update posts"),h.a.createElement(K.c,{onClick:()=>(e=>{c.a.add("admin/feeds/clear_cache/wait",c.a.message(`Clearing the cache for "${e.name}". Please wait ...`),c.a.NO_TTL),b.a.restApi.clearFeedCache(e).then(()=>{c.a.add("admin/feeds/clear_cache/done",c.a.message(`Finished clearing the cache for "${e.name}."`))}).catch(e=>{const t=q.a.getErrorReason(e);N.a.trigger({type:"feeds/clear_cache/error",message:t})}).finally(()=>{c.a.remove("admin/feeds/clear_cache/wait")})})(e)},"Clear cache"),h.a.createElement(K.d,null),h.a.createElement(K.c,{onClick:()=>(e=>{confirm("Are you sure you want to delete this feed? This cannot be undone.")&&A.a.deleteFeed(e)})(e)},"Delete feed"))))}],rows:A.a.list}),h.a.createElement(J.a,{isOpen:null!==e,account:e,onClose:()=>t(null)}))}function ee({feed:e,onClickAccount:t}){let a=[];const o=V.a.Options.getSources(e.options);return o.accounts.forEach(e=>{e&&a.push(h.a.createElement(ae,{account:e,onClick:()=>t(e)}))}),o.tagged.forEach(e=>{e&&a.push(h.a.createElement(ae,{account:e,onClick:()=>t(e),isTagged:!0}))}),o.hashtags.forEach(e=>a.push(h.a.createElement(oe,{hashtag:e}))),0===a.length&&a.push(h.a.createElement("div",{className:H.a.noSourcesMsg},h.a.createElement(U.a,{icon:"warning"}),h.a.createElement("span",null,"Feed has no sources"))),h.a.createElement("div",{className:H.a.sourcesList},a.map((e,t)=>e&&h.a.createElement(ne,{key:t},e)))}const te=({feed:e})=>h.a.createElement("div",{className:H.a.usagesList},e.usages.map((e,t)=>h.a.createElement("div",{key:t,className:H.a.usage},h.a.createElement("a",{className:H.a.usageLink,href:e.link,target:"_blank"},e.name),h.a.createElement("span",{className:H.a.usageType},"(",e.type,")"))));function ae({account:e,isTagged:t,onClick:a}){return h.a.createElement("div",{className:H.a.accountSource,onClick:a,role:a?"button":void 0,tabIndex:0},t?h.a.createElement(U.a,{icon:"tag"}):h.a.createElement(Y.a,{className:H.a.tinyAccountPic,account:e}),e.username)}function oe({hashtag:e}){return h.a.createElement("a",{className:H.a.hashtagSource,href:Object(Q.b)(e.tag),target:"_blank"},h.a.createElement(U.a,{icon:"admin-site-alt3"}),h.a.createElement("span",null,"#",e.tag))}const ne=({children:e})=>h.a.createElement("div",{className:H.a.source},e);var ie=a(119),re=a(281),se=a.n(re);const le=L.a.at({screen:l.a.NEW_FEED}),ce=()=>{const[e,t]=h.a.useState(!1);return h.a.createElement(ie.a,{className:se.a.root,isTransitioning:e},h.a.createElement("div",null,h.a.createElement("h1",null,"Start engaging with your audience"),h.a.createElement(ie.a.Thin,null,h.a.createElement("p",null,"Connect with more people by embedding one or more Instagram feeds on this website."),h.a.createElement("p",null,"It only takes 3 steps! Let’s get going!"),h.a.createElement(ie.a.StepList,null,h.a.createElement(ie.a.Step,{num:1,isDone:I.b.list.length>0},h.a.createElement("span",null,"Connect your Instagram Account")),h.a.createElement(ie.a.Step,{num:2},h.a.createElement("span",null,"Design your feed")),h.a.createElement(ie.a.Step,{num:3},h.a.createElement("span",null,"Embed it on your site"))))),h.a.createElement("div",{className:se.a.callToAction},h.a.createElement(ie.a.HeroButton,{onClick:()=>{t(!0),setTimeout(()=>L.a.history.push(le,{}),ie.a.TRANSITION_DURATION)}},I.b.list.length>0?"Design your feed":"Connect your Instagram Account"),h.a.createElement(ie.a.HelpMsg,{className:se.a.contactUs},"If you need help at any time,"," ",h.a.createElement("a",{href:b.a.resources.supportUrl,target:"_blank",style:{whiteSpace:"nowrap"}},"contact me here"),".",h.a.createElement("br",null),"- Mark Zahra, Spotlight")))};var ue=a(192),de=Object(M.b)((function(){return h.a.createElement(D.a,{navbar:ue.a},h.a.createElement("div",{className:j.a.root},A.a.hasFeeds()?h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{className:j.a.createNewBtn},h.a.createElement(R.a,{to:L.a.at({screen:l.a.NEW_FEED}),className:"button button-primary button-large"},"Create a new feed")),h.a.createElement(Z,null)):h.a.createElement(ce,null)))})),me=a(107),pe=a(230),he=a(111),fe=a(419);function _e({feed:e,onSave:t}){const a=h.a.useCallback(e=>new Promise(a=>{const o=null===e.id;me.a.saveFeed(e).then(()=>{t&&t(e),o||a()})}),[]),o=h.a.useCallback(()=>{L.a.goto({screen:l.a.FEED_LIST})},[]),n=h.a.useCallback(e=>me.a.editorTab=e,[]),i={tabs:he.a.tabs.slice(),showNameField:!0,showDoneBtn:!0,showCancelBtn:!0,doneBtnText:"Save",cancelBtnText:"Cancel"};return i.tabs.push({id:"embed",label:"Embed",sidebar:e=>h.a.createElement(fe.a,Object.assign({},e))}),h.a.createElement(pe.a,{feed:e,firstTab:me.a.editorTab,requireName:!0,confirmOnCancel:!0,useCtrlS:!0,onSave:a,onCancel:o,onChangeTab:n,config:i})}var ge=A.a.SavedFeed,be=a(33);const ye=()=>h.a.createElement("div",null,h.a.createElement(be.a,{type:be.b.ERROR,showIcon:!0},"Feed does not exist.",h.a.createElement(R.a,{to:L.a.with({screen:"feeds"})},"Go back")));var ve=a(222),Ee=a(163);N.a.addHandler(e=>{var t;const a=null!==(t=e.type)&&void 0!==t?t:"generic";c.a.add("admin/"+a,c.a.error(e.message,e.details),c.a.NO_TTL)}),l.b.register({id:"feeds",title:"Feeds",position:0,component:de}),l.b.register({id:"new",title:"Add New",position:10,component:function(){return me.a.edit(new ge),h.a.createElement(_e,{feed:me.a.feed})}}),l.b.register({id:"edit",title:"Edit",isHidden:!0,component:function(){const e=(()=>{const e=L.a.get("id");return e?parseInt(e):null})(),t=A.a.getById(e);return e&&t?(me.a.feed.id!==e&&me.a.edit(t),Object(p.useEffect)(()=>()=>me.a.cancelEditor(),[]),h.a.createElement(_e,{feed:me.a.feed})):h.a.createElement(ye,null)}}),l.b.register({id:"promotions",title:"Promotions",position:40,component:Object(r.a)(ve.a,{isFakePro:!0})}),l.b.register({id:"settings",title:"Settings",position:50,component:Ee.b}),T.a.add(()=>A.a.loadFeeds()),T.a.add(()=>I.b.loadAccounts()),T.a.add(()=>u.c.load());const Se=document.getElementById(b.a.config.rootId);if(Se){const e=[n.a,B].filter(e=>null!==e);Se.classList.add("wp-core-ui-override"),new o.a("admin",Se,e).run()}},64:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return n}));const o=(e,t)=>e.startsWith(t)?e:t+e,n=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},68:function(e,t,a){"use strict";function o(e){return t=>(t.stopPropagation(),e(t))}function n(e,t){let a;return(...o)=>{clearTimeout(a),a=setTimeout(()=>{a=null,e(...o)},t)}}a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return n}))},69:function(e,t,a){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}},70:function(e,t,a){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},71:function(e,t,a){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},73:function(e,t,a){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},74:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var o=a(0),n=a.n(o),i=a(100),r=a.n(i),s=a(3),l=a(10);function c(e){var{account:t,square:a,className:o}=e,i=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["account","square","className"]);const c=s.b.getProfilePicUrl(t),u=Object(l.b)(a?r.a.square:r.a.round,o);return n.a.createElement("img",Object.assign({},i,{className:u,src:s.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}},78:function(e,t,a){e.exports={"name-col":"FeedsList__name-col",nameCol:"FeedsList__name-col","sources-col":"FeedsList__sources-col",sourcesCol:"FeedsList__sources-col","actions-col":"FeedsList__actions-col",actionsCol:"FeedsList__actions-col","actions-cell":"FeedsList__actions-cell",actionsCell:"FeedsList__actions-cell",name:"FeedsList__name layout__text-overflow-ellipsis","meta-list":"FeedsList__meta-list",metaList:"FeedsList__meta-list","meta-info":"FeedsList__meta-info",metaInfo:"FeedsList__meta-info",id:"FeedsList__id FeedsList__meta-info",layout:"FeedsList__layout FeedsList__meta-info","sources-list":"FeedsList__sources-list layout__flex-row",sourcesList:"FeedsList__sources-list layout__flex-row",source:"FeedsList__source layout__text-overflow-ellipsis","account-source":"FeedsList__account-source",accountSource:"FeedsList__account-source","tiny-account-pic":"FeedsList__tiny-account-pic",tinyAccountPic:"FeedsList__tiny-account-pic","hashtag-source":"FeedsList__hashtag-source",hashtagSource:"FeedsList__hashtag-source","no-sources-msg":"FeedsList__no-sources-msg",noSourcesMsg:"FeedsList__no-sources-msg","usages-list":"FeedsList__usages-list layout__flex-column",usagesList:"FeedsList__usages-list layout__flex-column",usage:"FeedsList__usage layout__flex-row layout__text-overflow-ellipsis","usage-link":"FeedsList__usage-link layout__text-overflow-ellipsis",usageLink:"FeedsList__usage-link layout__text-overflow-ellipsis","usage-type":"FeedsList__usage-type",usageType:"FeedsList__usage-type","actions-list":"FeedsList__actions-list",actionsList:"FeedsList__actions-list","actions-btn":"FeedsList__actions-btn",actionsBtn:"FeedsList__actions-btn","sources-cell":"FeedsList__sources-cell",sourcesCell:"FeedsList__sources-cell","usages-cell":"FeedsList__usages-cell",usagesCell:"FeedsList__usages-cell","usages-col":"FeedsList__usages-col",usagesCol:"FeedsList__usages-col"}},79:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(49),r=a.n(i),s=a(7),l=a(6),c=a(20),u=a.n(c),d=a(71),m=a.n(d);const p=Object(s.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,a={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return n.a.createElement("a",{href:t,target:"__blank",className:m.a.link},n.a.createElement("button",{className:m.a.button,style:a},e.followBtnText))});var h=a(17),f=a.n(h),_=a(5),g=a(172),b=a(639),y=a(42),v=a.n(y),E=a(18),S=a(8),w=Object(s.b)((function({stories:e,options:t,onClose:a}){e.sort((e,t)=>{const a=Object(g.a)(e.timestamp).getTime(),o=Object(g.a)(t.timestamp).getTime();return a<o?-1:a==o?0:1});const[i,r]=n.a.useState(0),s=e.length-1,[l,c]=n.a.useState(0),[u,d]=n.a.useState(0);Object(o.useEffect)(()=>{0!==l&&c(0)},[i]);const m=i<s,p=i>0,h=()=>a&&a(),y=()=>i<s?r(i+1):h(),w=()=>r(e=>Math.max(e-1,0)),M=e[i],P="https://instagram.com/"+t.account.username,k=M.type===_.a.Type.VIDEO?u:t.storiesInterval;Object(E.d)("keydown",e=>{switch(e.key){case"Escape":h();break;case"ArrowLeft":w();break;case"ArrowRight":y();break;default:return}e.preventDefault(),e.stopPropagation()});const C=n.a.createElement("div",{className:f.a.root},n.a.createElement("div",{className:f.a.container},n.a.createElement("div",{className:f.a.header},n.a.createElement("a",{href:P,target:"_blank"},n.a.createElement("img",{className:f.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),n.a.createElement("a",{href:P,className:f.a.username,target:"_blank"},t.account.username),n.a.createElement("div",{className:f.a.date},Object(b.a)(Object(g.a)(M.timestamp),{addSuffix:!0}))),n.a.createElement("div",{className:f.a.progress},e.map((e,t)=>n.a.createElement(x,{key:e.id,duration:k,animate:t===i,isDone:t<i}))),n.a.createElement("div",{className:f.a.content},p&&n.a.createElement("div",{className:f.a.prevButton,onClick:w,role:"button"},n.a.createElement(S.a,{icon:"arrow-left-alt2"})),n.a.createElement("div",{className:f.a.media},n.a.createElement(O,{key:M.id,media:M,imgDuration:t.storiesInterval,onGetDuration:d,onEnd:()=>m?y():h()})),m&&n.a.createElement("div",{className:f.a.nextButton,onClick:y,role:"button"},n.a.createElement(S.a,{icon:"arrow-right-alt2"})),n.a.createElement("div",{className:f.a.closeButton,onClick:h,role:"button"},n.a.createElement(S.a,{icon:"no-alt"})))));return v.a.createPortal(C,document.body)}));function x({animate:e,isDone:t,duration:a}){const o=e?f.a.progressOverlayAnimating:t?f.a.progressOverlayDone:f.a.progressOverlay,i={animationDuration:a+"s"};return n.a.createElement("div",{className:f.a.progressSegment},n.a.createElement("div",{className:o,style:i}))}function O({media:e,imgDuration:t,onGetDuration:a,onEnd:o}){return e.type===_.a.Type.VIDEO?n.a.createElement(P,{media:e,onEnd:o,onGetDuration:a}):n.a.createElement(M,{media:e,onEnd:o,duration:t})}function M({media:e,duration:t,onEnd:a}){const[i,r]=n.a.useState(!1);return Object(o.useEffect)(()=>{const e=i?setTimeout(a,1e3*t):null;return()=>clearTimeout(e)},[e,i]),n.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function P({media:e,onEnd:t,onGetDuration:a}){const o=n.a.useRef();return n.a.createElement("video",{ref:o,src:e.url,poster:e.thumbnail,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>a(o.current.duration),onEnded:t},n.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var k=a(3),C=Object(s.b)((function({feed:e,options:t}){const[a,o]=n.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,s=e.stories.filter(e=>e.username===i.username),c=s.length>0,d=t.headerInfo.includes(l.a.HeaderInfo.MEDIA_COUNT),m=t.headerInfo.includes(l.a.HeaderInfo.FOLLOWERS)&&i.type!=k.a.Type.PERSONAL,h=t.headerInfo.includes(l.a.HeaderInfo.PROFILE_PIC),f=t.includeStories&&c,_=t.headerStyle===l.a.HeaderStyle.BOXED,g={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},b=f?"button":void 0,y={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:f?"pointer":"normal"},v=t.showFollowBtn&&(t.followBtnLocation===l.a.FollowBtnLocation.HEADER||t.followBtnLocation===l.a.FollowBtnLocation.BOTH),E={justifyContent:t.showBio&&_?"flex-start":"center"},S=n.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),x=f&&c?u.a.profilePicWithStories:u.a.profilePic;return n.a.createElement("div",{className:L(t.headerStyle),style:g},n.a.createElement("div",{className:u.a.leftContainer},h&&n.a.createElement("div",{className:x,style:y,role:b,onClick:()=>{f&&o(0)}},f?S:n.a.createElement("a",{href:r,target:"_blank"},S)),n.a.createElement("div",{className:u.a.info},n.a.createElement("div",{className:u.a.username},n.a.createElement("a",{href:r,target:"_blank",style:{color:t.headerTextColor}},n.a.createElement("span",null,"@"),n.a.createElement("span",null,i.username))),t.showBio&&n.a.createElement("div",{className:u.a.bio},t.bioText),(d||m)&&n.a.createElement("div",{className:u.a.counterList},d&&n.a.createElement("div",{className:u.a.counter},n.a.createElement("span",null,i.mediaCount)," posts"),m&&n.a.createElement("div",{className:u.a.counter},n.a.createElement("span",null,i.followersCount)," followers")))),n.a.createElement("div",{className:u.a.rightContainer},v&&n.a.createElement("div",{className:u.a.followButton,style:E},n.a.createElement(p,{options:t}))),f&&null!==a&&n.a.createElement(w,{stories:s,options:t,onClose:()=>{o(null)}}))}));function L(e){switch(e){case l.a.HeaderStyle.NORMAL:return u.a.normalStyle;case l.a.HeaderStyle.CENTERED:return u.a.centeredStyle;case l.a.HeaderStyle.BOXED:return u.a.boxedStyle;default:return}}var N=a(94),B=a.n(N);const T=Object(s.b)(({feed:e,options:t})=>{const a=n.a.useRef(),o=Object(E.k)(a,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return n.a.createElement("button",{ref:a,className:B.a.root,style:i,onClick:()=>{o(),e.loadMore()}},e.isLoading?n.a.createElement("span",null,"Loading ..."):n.a.createElement("span",null,e.options.loadMoreBtnText))});var A=a(87);t.a=Object(s.b)((function({children:e,feed:t,options:a}){const[o,i]=n.a.useState(null),s=n.a.useCallback(e=>{const o=t.media.findIndex(t=>t.id===e.id);if(!t.options.promotionEnabled||!l.a.executeMediaClick(e,t.options))switch(a.linkBehavior){case l.a.LinkBehavior.LIGHTBOX:return void i(o);case l.a.LinkBehavior.NEW_TAB:return void window.open(e.permalink,"_blank");case l.a.LinkBehavior.SELF:return void window.open(e.permalink,"_self")}},[t,a.linkBehavior]),c={width:a.feedWidth,height:a.feedHeight,fontSize:a.textSize,overflowX:a.feedOverflowX,overflowY:a.feedOverflowY},u={backgroundColor:a.bgColor,padding:a.feedPadding},d={marginBottom:a.imgPadding},m={marginTop:a.buttonPadding},h=a.showHeader&&n.a.createElement("div",{style:d},n.a.createElement(C,{feed:t,options:a})),f=a.showLoadMoreBtn&&t.canLoadMore&&n.a.createElement("div",{className:r.a.loadMoreBtn,style:m},n.a.createElement(T,{feed:t,options:a})),_=a.showFollowBtn&&(a.followBtnLocation===l.a.FollowBtnLocation.BOTTOM||a.followBtnLocation===l.a.FollowBtnLocation.BOTH)&&n.a.createElement("div",{className:r.a.followBtn,style:m},n.a.createElement(p,{options:a})),g=t.isLoading?new Array(a.numPosts).fill(r.a.fakeMedia):[];return n.a.createElement("div",{className:r.a.root,style:c},n.a.createElement("div",{className:r.a.wrapper,style:u},e({mediaList:t.media,openMedia:s,header:h,loadMoreBtn:f,followBtn:_,loadingMedia:g})),null!==o&&n.a.createElement(A.a,{feed:t,current:o,numComments:a.numLightboxComments,showSidebar:a.lightboxShowSidebar,onRequestClose:()=>i(null)}))}))},8:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var o=a(0),n=a.n(o),i=a(10);const r=e=>{var{icon:t,className:a}=e,o=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["icon","className"]);return n.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,a)},o))}},80:function(e,t,a){"use strict";var o=a(48),n=a.n(o),i=a(0),r=a.n(i),s=a(5),l=a(7),c=a(23),u=a.n(c),d=a(172),m=a(643),p=a(642),h=a(6),f=a(8),_=a(4),g=a(3),b=Object(l.b)((function({options:e,media:t}){var a;const o=r.a.useRef(),[n,l]=r.a.useState(null);Object(i.useEffect)(()=>{o.current&&l(o.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===h.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==s.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===s.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const b=e.hoverInfo.some(e=>e===h.a.HoverInfo.CAPTION),y=e.hoverInfo.some(e=>e===h.a.HoverInfo.USERNAME),v=e.hoverInfo.some(e=>e===h.a.HoverInfo.DATE),E=e.hoverInfo.some(e=>e===h.a.HoverInfo.INSTA_LINK),S=null!==(a=t.caption)&&void 0!==a?a:"",w=t.timestamp?Object(d.a)(t.timestamp):null,x=t.timestamp?Object(m.a)(w).toString():null,O=t.timestamp?Object(p.a)(w,"HH:mm - do MMM yyyy"):null,M=t.timestamp?Object(_.o)(t.timestamp):null,P={color:e.textColorHover,backgroundColor:e.bgColorHover};let k=null;if(null!==n){const a=Math.sqrt(1.3*(n+30)),o=Math.sqrt(1.7*n+100),i=Math.sqrt(n-36),s=Math.max(a,8)+"px",l=Math.max(o,8)+"px",d=Math.max(i,8)+"px",m={fontSize:s},p={fontSize:s,width:s,height:s},h={color:e.textColorHover,fontSize:l,width:l,height:l},_={fontSize:d};k=r.a.createElement("div",{className:u.a.rows},r.a.createElement("div",{className:u.a.topRow},y&&t.username&&r.a.createElement("div",{className:u.a.username},r.a.createElement("a",{href:g.b.getUsernameUrl(t.username),target:"_blank"},"@",t.username)),b&&t.caption&&r.a.createElement("div",{className:u.a.caption},S)),r.a.createElement("div",{className:u.a.middleRow},c&&r.a.createElement("div",{className:u.a.counterList},r.a.createElement("span",{className:u.a.likesCount,style:m},r.a.createElement(f.a,{icon:"heart",style:p})," ",t.likesCount),r.a.createElement("span",{className:u.a.commentsCount,style:m},r.a.createElement(f.a,{icon:"admin-comments",style:p})," ",t.commentsCount))),r.a.createElement("div",{className:u.a.bottomRow},v&&t.timestamp&&r.a.createElement("div",{className:u.a.dateContainer},r.a.createElement("time",{className:u.a.date,dateTime:x,title:O,style:_},M)),E&&r.a.createElement("a",{className:u.a.igLinkIcon,href:t.permalink,title:S,target:"_blank",style:h,onClick:e=>e.stopPropagation()},r.a.createElement(f.a,{icon:"instagram",style:h}))))}return r.a.createElement("div",{ref:o,className:u.a.root,style:P},k)})),y=a(15),v=a(54);t.a=Object(l.b)((function({media:e,options:t,forceOverlay:a,onClick:o}){const[i,l]=r.a.useState(!1),c=function(e){switch(e.type){case s.a.Type.IMAGE:return n.a.imageTypeIcon;case s.a.Type.VIDEO:return n.a.videoTypeIcon;case s.a.Type.ALBUM:return n.a.albumTypeIcon;default:return}}(e),u={backgroundImage:`url(${y.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:n.a.root,onClick:e=>{o&&o(e)},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1)},r.a.createElement(v.a,{media:e}),r.a.createElement("div",{className:c,style:u}),(i||a)&&r.a.createElement("div",{className:n.a.overlay},r.a.createElement(b,{media:e,options:t}))))}))},82:function(e,t,a){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},85:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(70),r=a.n(i),s=a(7),l=a(4),c=a(29);t.a=Object(s.b)((function({media:e,options:t,full:a}){if(!t.showCaptions||!e.type)return null;const o={color:t.captionColor,fontSize:t.captionSize},i=a?0:1,s=e.caption?e.caption:"",u=t.captionMaxLength?Object(l.p)(s,t.captionMaxLength):s,d=Object(c.d)(u,void 0,i,t.captionRemoveDots),m=a?r.a.full:r.a.preview;return n.a.createElement("div",{className:m,style:o},d)}))},86:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(61),r=a.n(i),s=a(7),l=a(5),c=a(8);t.a=Object(s.b)((function({media:e,options:t}){if(!e.type||e.source.type===l.a.Source.Type.PERSONAL_ACCOUNT)return null;const a={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},o=Object.assign(Object.assign({},a),{color:t.likesIconColor}),i=Object.assign(Object.assign({},a),{color:t.commentsIconColor}),s={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&n.a.createElement("div",{className:r.a.root},t.showLikes&&n.a.createElement("div",{className:r.a.icon,style:o},n.a.createElement(c.a,{icon:"heart",style:s}),n.a.createElement("span",null,e.likesCount)),t.showComments&&n.a.createElement("div",{className:r.a.icon,style:i},n.a.createElement(c.a,{icon:"admin-comments",style:s}),n.a.createElement("span",null,e.commentsCount)))}))},87:function(e,t,a){"use strict";a.d(t,"a",(function(){return V}));var o=a(0),n=a.n(o),i=a(42),r=a.n(i),s=a(14),l=a.n(s),c=a(18),u=a(34),d=a.n(u),m=a(5),p=a(3),h=a(21),f=a.n(h),_=a(39),g=a.n(_),b=a(4),y=a(29),v=a(10);const E=({comment:e,className:t})=>{const a=e.username?n.a.createElement("a",{key:-1,href:p.b.getUsernameUrl(e.username),target:"_blank",className:g.a.username},e.username):null,o=a?(e,t)=>t>0?e:[a,...e]:void 0,i=Object(y.d)(e.text,o),r=1===e.likeCount?"like":"likes";return n.a.createElement("div",{className:Object(v.b)(g.a.root,t)},n.a.createElement("div",{className:g.a.content},n.a.createElement("div",{key:e.id,className:g.a.text},i)),n.a.createElement("div",{className:g.a.metaList},n.a.createElement("div",{className:g.a.date},Object(b.o)(e.timestamp)),e.likeCount>0&&n.a.createElement("div",{className:g.a.likeCount},`${e.likeCount} ${r}`)))};var S=a(8);function w({source:e,comments:t,showLikes:a,numLikes:o,date:i,link:r}){var s;return t=null!=t?t:[],n.a.createElement("article",{className:f.a.container},e&&n.a.createElement("header",{className:f.a.header},e.img&&n.a.createElement("a",{href:e.url,target:"_blank",className:f.a.sourceImgLink},n.a.createElement("img",{className:f.a.sourceImg,src:e.img,alt:null!==(s=e.name)&&void 0!==s?s:""})),n.a.createElement("div",{className:f.a.sourceName},n.a.createElement("a",{href:e.url,target:"_blank"},e.name))),n.a.createElement("div",{className:f.a.commentsScroller},t.length>0&&n.a.createElement("div",{className:f.a.commentsList},t.map((e,t)=>n.a.createElement(E,{key:t,comment:e,className:f.a.comment})))),n.a.createElement("div",{className:f.a.footer},n.a.createElement("div",{className:f.a.footerInfo},a&&n.a.createElement("div",{className:f.a.numLikes},n.a.createElement("span",null,o)," ",n.a.createElement("span",null,"likes")),i&&n.a.createElement("div",{className:f.a.date},i)),r&&n.a.createElement("div",{className:f.a.footerLink},n.a.createElement("a",{href:r.url,target:r.newTab?"_blank":"_self"},n.a.createElement(S.a,{icon:r.icon,className:f.a.footerLinkIcon}),n.a.createElement("span",null,r.text)))))}function x({media:e,numComments:t,link:a}){a=null!=a?a:{url:e.permalink,text:"View on Instagram",icon:"instagram",newTab:!0};const o=e.comments?e.comments.slice(0,t):[];e.caption&&e.caption.length&&o.splice(0,0,{id:e.id,text:e.caption,timestamp:e.timestamp,username:e.username});const i={name:"",url:"",img:void 0};switch(e.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:i.name="@"+e.username,i.url=p.b.getUsernameUrl(e.username);const t=p.b.getByUsername(e.username);i.img=t?p.b.getProfilePicUrl(t):void 0;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:i.name="#"+e.source.name,i.url="https://instagram.com/explore/tags/"+e.source.name}return n.a.createElement(w,{source:i,comments:o,date:Object(b.o)(e.timestamp),showLikes:e.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT,numLikes:e.likesCount,link:a})}var O=a(95),M=a.n(O),P=a(35),k=a.n(P),C=a(54);function L(e){var{media:t,thumbnailUrl:a,size:i,autoPlay:r,onGetMetaData:s}=e,l=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["media","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=n.a.useRef(),[u,d]=n.a.useState(!r),[p,h]=n.a.useState(r),f=n.a.useContext(z);Object(o.useEffect)(()=>{r?u&&d(!1):u||d(!0),p&&h(r)},[t.url]),Object(o.useLayoutEffect)(()=>{if(c.current){const e=()=>h(!0),t=()=>h(!1);return c.current.addEventListener("play",e),c.current.addEventListener("pause",t),()=>{c.current.removeEventListener("play",e),c.current.removeEventListener("pause",t)}}},[c.current]);const _={width:i?i.width+"px":"100%",height:i?i.height+"px":"100%"};return n.a.createElement("div",{key:t.url,className:k.a.root,style:_},n.a.createElement("video",Object.assign({ref:c,className:u?k.a.videoHidden:k.a.video,src:t.url,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&c.current.play()},onLoadedMetadata:()=>{f.reportSize({width:c.current.videoWidth,height:c.current.videoHeight})}},l),n.a.createElement("source",{src:t.url}),"Your browser does not support videos"),n.a.createElement("div",{className:u?k.a.thumbnail:k.a.thumbnailHidden},n.a.createElement(C.a,{media:t,size:m.a.Thumbnails.Size.LARGE,width:i?i.width:void 0,height:i?i.height:void 0})),n.a.createElement("div",{className:p?k.a.controlPlaying:k.a.controlPaused,onClick:()=>{c.current&&(u?(d(!1),c.current.currentTime=0,c.current.play()):c.current.paused?c.current.play():c.current.pause())}},n.a.createElement(S.a,{className:k.a.playButton,icon:"controls-play"})))}var N=a(56),B=a.n(N),T=m.a.Thumbnails.Size;const A={s:320,m:480,l:600};function I({media:e}){const t=n.a.useRef(),a=n.a.useContext(z),[i,r]=Object(o.useState)(!0),[s,l]=Object(o.useState)(!1);Object(o.useLayoutEffect)(()=>{i&&t.current&&t.current.complete&&c()},[]);const c=()=>{if(r(!1),t.current&&!e.size){const e={width:t.current.naturalWidth,height:t.current.naturalHeight};a.reportSize(e)}};if(s)return n.a.createElement("div",{className:B.a.error},n.a.createElement("span",null,"Image is not available"));const u=m.a.Thumbnails.get(e,T.LARGE),d=m.a.Thumbnails.getSrcSet(e,A).join(",");return s?n.a.createElement("div",{className:B.a.error},n.a.createElement("span",null,"Image is not available")):n.a.createElement("img",{ref:t,className:i?B.a.loading:B.a.image,onLoad:c,onError:()=>{l(!0),r(!1)},src:u,srcSet:d,sizes:"600px",alt:"",loading:"eager"})}var F=a(28),j=a.n(F);function D({media:e,autoplayVideos:t}){const[a,i]=Object(o.useState)(0),r=e.children,s=r.length-1,l={transform:`translateX(${100*-a}%)`};return n.a.createElement("div",{className:j.a.album},n.a.createElement("div",{className:j.a.frame},n.a.createElement("ul",{className:j.a.scroller,style:l},r.map(e=>n.a.createElement("li",{key:e.id,className:j.a.child},n.a.createElement(R,{media:e,autoplayVideos:t}))))),n.a.createElement("div",{className:j.a.controlsLayer},n.a.createElement("div",{className:j.a.controlsContainer},n.a.createElement("div",null,a>0&&n.a.createElement("div",{className:j.a.prevButton,onClick:()=>i(e=>Math.max(e-1,0)),role:"button"},n.a.createElement(S.a,{icon:"arrow-left-alt2"}))),n.a.createElement("div",null,a<s&&n.a.createElement("div",{className:j.a.nextButton,onClick:()=>i(e=>Math.min(e+1,s)),role:"button"},n.a.createElement(S.a,{icon:"arrow-right-alt2"}))))),n.a.createElement("div",{className:j.a.indicatorList},r.map((e,t)=>n.a.createElement("div",{key:t,className:t===a?j.a.indicatorCurrent:j.a.indicator}))))}function R({media:e,autoplayVideos:t}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return n.a.createElement(I,{media:e});case m.a.Type.VIDEO:return n.a.createElement(L,{media:e,autoPlay:t});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return n.a.createElement(D,{media:e,autoplayVideos:t})}return n.a.createElement("div",{className:M.a.notAvailable},n.a.createElement("span",null,"Media is not available"))}const z=n.a.createContext({});function H({media:e,showSidebar:t,numComments:a,link:o,vertical:i}){var r,s;t=null==t||t,a=null!=a?a:30;const[l,c]=n.a.useState(),u=null!==(s=null!==(r=e.size)&&void 0!==r?r:l)&&void 0!==s?s:{width:600,height:600},m=u&&u.height>0?u.width/u.height:null,p={paddingBottom:i?void 0:(m?100/m:100)+"%"};return n.a.createElement(z.Provider,{value:{reportSize:c}},n.a.createElement("div",{className:i?d.a.vertical:d.a.horizontal},n.a.createElement("div",{className:t?d.a.wrapperSidebar:d.a.wrapper},n.a.createElement("div",{className:d.a.mediaContainer},n.a.createElement("div",{className:d.a.mediaSizer,style:p},n.a.createElement("div",{className:d.a.media},n.a.createElement(R,{key:e.id,media:e}))))),t&&n.a.createElement("div",{className:d.a.sidebar},n.a.createElement(x,{media:e,numComments:a,link:o}))))}var U=a(6);function W(e,t){return t&&(null!=e?e:document.body).getBoundingClientRect().width<876}function G(e,t){t?e.classList.remove(l.a.noScroll):e.classList.add(l.a.noScroll)}function V({feed:e,current:t,showSidebar:a,numComments:i,onRequestClose:s}){var u;const d=n.a.useRef(),[m,p]=n.a.useState(W(null,a)),[h,f]=n.a.useState(t),_=n.a.useContext(V.Context),g=null!==(u=_.target&&_.target.current)&&void 0!==u?u:document.body;Object(o.useEffect)(()=>f(t),[t]);const b=()=>p(W(d.current,a));Object(o.useEffect)(()=>(b(),G(g,!1),()=>G(g,!0)),[g]),Object(c.m)("resize",()=>b(),[],[a]);const y=e=>{s&&s(),e.preventDefault(),e.stopPropagation()},v=e=>{f(e=>Math.max(e-1,0)),e.preventDefault(),e.stopPropagation()},E=t=>{f(t=>Math.min(t+1,e.media.length-1)),t.preventDefault(),t.stopPropagation()};Object(c.e)(document.body,"keydown",e=>{switch(e.key){case"ArrowRight":E(e);break;case"ArrowLeft":v(e);break;case"Escape":y(e);break;default:return}},[],[]);const w=U.a.getLink(e.media[h],e.options),x=null!==w.text&&null!==w.url,O={position:g===document.body?"fixed":"absolute"},M=n.a.createElement("div",{className:m?l.a.vertical:l.a.horizontal,style:O,onClick:y},n.a.createElement("div",{className:l.a.navLayer},n.a.createElement("div",{className:l.a.navBoundary},n.a.createElement("div",{className:a?l.a.navAlignerSidebar:l.a.modalAlignerNoSidebar},h>0&&n.a.createElement("a",{className:l.a.prevBtn,onClick:v,role:"button",tabIndex:0},n.a.createElement(S.a,{icon:"arrow-left-alt2",className:l.a.controlIcon}),n.a.createElement("span",{className:l.a.controlLabel},"Previous")),h<e.media.length-1&&n.a.createElement("a",{className:l.a.nextBtn,onClick:E,role:"button",tabIndex:0},n.a.createElement(S.a,{icon:"arrow-right-alt2",className:l.a.controlIcon}),n.a.createElement("span",{className:l.a.controlLabel},"Next"))))),n.a.createElement("div",{ref:d,className:l.a.modalLayer,role:"dialog",onClick:e=>{e.stopPropagation()}},n.a.createElement("div",{className:a?l.a.modalAlignerSidebar:l.a.modalAlignerNoSidebar},e.media[h]&&n.a.createElement(H,{media:e.media[h],vertical:m,numComments:i,showSidebar:a,link:x?w:void 0}))),n.a.createElement("a",{className:l.a.closeButton,onClick:y,role:"button",tabIndex:0},n.a.createElement(S.a,{icon:"no-alt",className:l.a.controlIcon}),n.a.createElement("span",{className:l.a.controlLabel},"Close")));return r.a.createPortal(M,g)}(V||(V={})).Context=n.a.createContext({target:{current:document.body}})},88:function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var o=a(0),n=a.n(o),i=a(60),r=a.n(i),s=a(178);function l({children:e,pathStyle:t}){let{path:a,left:o,right:i,center:s}=e;return a=null!=a?a:[],o=null!=o?o:[],i=null!=i?i:[],s=null!=s?s:[],n.a.createElement("div",{className:r.a.root},n.a.createElement("div",{className:r.a.leftList},n.a.createElement("div",{className:r.a.pathList},a.map((e,a)=>n.a.createElement(m,{key:a,style:t},n.a.createElement("div",{className:r.a.item},e)))),n.a.createElement("div",{className:r.a.leftList},n.a.createElement(u,null,o))),n.a.createElement("div",{className:r.a.centerList},n.a.createElement(u,null,s)),n.a.createElement("div",{className:r.a.rightList},n.a.createElement(u,null,i)))}function c(){return n.a.createElement(s.a,null)}function u({children:e}){const t=Array.isArray(e)?e:[e];return n.a.createElement(n.a.Fragment,null,t.map((e,t)=>n.a.createElement(d,{key:t},e)))}function d({children:e}){return n.a.createElement("div",{className:r.a.item},e)}function m({children:e,style:t}){return n.a.createElement("div",{className:r.a.pathSegment},e,n.a.createElement(p,{style:t}))}function p({style:e}){if("none"===e)return null;const t="chevron"===e?"M0 0 L100 50 L0 100":"M50 0 L50 100";return n.a.createElement("div",{className:r.a.separator},n.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},n.a.createElement("path",{d:t,fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}},93:function(e,t,a){"use strict";var o=a(0),n=a.n(o),i=a(27),r=a.n(i),s=a(7),l=a(80),c=a(85),u=a(86),d=a(79),m=a(10),p=a(4);t.a=Object(s.b)((function({feed:e,options:t,cellClassName:a}){const i=n.a.useRef(),[s,l]=n.a.useState(0);Object(o.useLayoutEffect)(()=>{if(i.current&&i.current.children.length>0){const e=i.current.querySelector("."+r.a.mediaMeta);e&&l(e.getBoundingClientRect().height)}},[t]),a=null!=a?a:()=>{};const c={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`},u={paddingBottom:`calc(100% + ${s}px)`};return n.a.createElement(d.a,{feed:e,options:t},({mediaList:o,openMedia:s,header:l,loadMoreBtn:d,followBtn:f,loadingMedia:_})=>n.a.createElement("div",{className:r.a.root},l,(!e.isLoading||e.isLoadingMore)&&n.a.createElement("div",{className:r.a.grid,style:c,ref:i},e.media.length?o.map((e,o)=>n.a.createElement(h,{key:`${o}-${e.id}`,className:a(e,o),style:u,media:e,options:t,openMedia:s})):null,e.isLoadingMore&&_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(p.q)(),className:Object(m.b)(r.a.loadingCell,e,a(null,t))}))),e.isLoading&&!e.isLoadingMore&&n.a.createElement("div",{className:r.a.grid,style:c},_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(p.q)(),className:Object(m.b)(r.a.loadingCell,e,a(null,t))}))),n.a.createElement("div",{className:r.a.buttonList},d,f)))}));const h=n.a.memo((function({className:e,style:t,media:a,options:o,openMedia:i}){const s=n.a.useCallback(()=>i(a),[a]);return n.a.createElement("div",{className:Object(m.b)(r.a.cell,e),style:t},n.a.createElement("div",{className:r.a.cellContent},n.a.createElement("div",{className:r.a.mediaContainer},n.a.createElement(l.a,{media:a,onClick:s,options:o})),n.a.createElement("div",{className:r.a.mediaMeta},n.a.createElement(c.a,{options:o,media:a}),n.a.createElement(u.a,{options:o,media:a}))))}),(e,t)=>e.media.id===t.media.id&&e.options===t.options)},94:function(e,t,a){e.exports={root:"LoadMoreButton__root feed__feed-button"}},95:function(e,t,a){e.exports={reset:"MediaPopupBoxObject__reset","not-available":"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset",notAvailable:"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",loading:"MediaPopupBoxObject__loading"}},96:function(e,t,a){"use strict";var o;a.d(t,"a",(function(){return o})),function(e){e.returnTrue=()=>!0,e.returnFalse=()=>!0,e.noop=()=>{},e.provide=function(e){return()=>e}}(o||(o={}))},97:function(e,t,a){"use strict";var o;a.d(t,"a",(function(){return o})),function(e){const t=[];e.trigger=function(e){if(0===t.length)throw e;t.forEach(t=>t(e))},e.addHandler=function(e){t.push(e)}}(o||(o={}))},99:function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return d}));var o=a(0),n=a.n(o),i=a(42),r=a.n(i),s=a(7);class l{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let a=this.cache.get(e);if(void 0===a){a=t(this);let o=this.extensions.get(e);o&&o.forEach(e=>a=e(this,a)),this.cache.set(e,a)}return a}has(e){return this.factories.has(e)}}class c{constructor(e,t,a){this.key=e,this.mount=t,this.modules=a,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){if(null!==this.container)return;let e=!1;const t=()=>{e||"interactive"!==document.readyState&&"complete"!==document.readyState||(this.actualRun(),e=!0)};t(),e||document.addEventListener("readystatechange",t)}actualRun(){!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=d({root:()=>null,"root/children":()=>[]});this.container=new l(e,this.modules);const t=this.container.get("root/children").map((e,t)=>n.a.createElement(e,{key:t})),a=n.a.createElement(s.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),r.a.render(a,this.mount)}}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function d(e){return new Map(Object.entries(e))}}},[[631,0,1,2,3]]])}));
ui/dist/admin-common.js CHANGED
@@ -1 +1 @@
1
- (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[2],{101:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var a=n(0),o=n.n(a),r=n(266),l=n.n(r),i=n(410),c=n(18),s=n(16),u=n(192),m=n(327),d=n(328),p=n(10),b=n(19);function _({id:e,value:t,disableAlpha:n,onChange:r}){t=null!=t?t:"#fff";const[_,g]=o.a.useState(t),[f,h]=o.a.useState(!1),v=o.a.useRef(),E=o.a.useRef(),y=o.a.useCallback(()=>h(!1),[]),O=o.a.useCallback(()=>h(e=>!e),[]),C=o.a.useCallback(e=>{g(e.rgb),r&&r(e)},[r]),N=o.a.useCallback(e=>{"Escape"===e.key&&f&&(y(),e.preventDefault(),e.stopPropagation())},[f]);Object(a.useEffect)(()=>g(t),[t]),Object(c.b)(v,y,[E]),Object(c.c)([v,E],y),Object(c.d)("keydown",N,[f]);const w={preventOverflow:{boundariesElement:document.getElementById(b.a.config.rootId),padding:5}};return o.a.createElement(u.c,null,o.a.createElement(m.a,null,({ref:t})=>o.a.createElement("button",{ref:Object(p.d)(v,t),id:e,className:l.a.button,onClick:O},o.a.createElement("span",{className:l.a.colorPreview,style:{backgroundColor:Object(s.a)(_)}}))),o.a.createElement(d.a,{placement:"bottom-end",positionFixed:!0,modifiers:w},({ref:e,style:t})=>f&&o.a.createElement("div",{className:l.a.popper,ref:Object(p.d)(E,e),style:t},o.a.createElement(i.a,{color:_,onChange:C,disableAlpha:n}))))}},112:function(e,t,n){e.exports={list:"AutoPromotionsList__list","fake-pro-list":"AutoPromotionsList__fake-pro-list AutoPromotionsList__list",fakeProList:"AutoPromotionsList__fake-pro-list AutoPromotionsList__list",row:"AutoPromotionsList__row","row-selected":"AutoPromotionsList__row-selected AutoPromotionsList__row",rowSelected:"AutoPromotionsList__row-selected AutoPromotionsList__row","row-box":"AutoPromotionsList__row-box theme__panel",rowBox:"AutoPromotionsList__row-box theme__panel","row-hashtags":"AutoPromotionsList__row-hashtags",rowHashtags:"AutoPromotionsList__row-hashtags","row-summary":"AutoPromotionsList__row-summary",rowSummary:"AutoPromotionsList__row-summary","row-drag-handle":"AutoPromotionsList__row-drag-handle",rowDragHandle:"AutoPromotionsList__row-drag-handle","row-actions":"AutoPromotionsList__row-actions",rowActions:"AutoPromotionsList__row-actions","add-button-row":"AutoPromotionsList__add-button-row",addButtonRow:"AutoPromotionsList__add-button-row","no-hashtags-message":"AutoPromotionsList__no-hashtags-message",noHashtagsMessage:"AutoPromotionsList__no-hashtags-message","row-faded-text":"AutoPromotionsList__row-faded-text",rowFadedText:"AutoPromotionsList__row-faded-text","no-promo-message":"AutoPromotionsList__no-promo-message AutoPromotionsList__row-faded-text",noPromoMessage:"AutoPromotionsList__no-promo-message AutoPromotionsList__row-faded-text","summary-italics":"AutoPromotionsList__summary-italics",summaryItalics:"AutoPromotionsList__summary-italics","summary-bold":"AutoPromotionsList__summary-bold",summaryBold:"AutoPromotionsList__summary-bold"}},114:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var a=n(0),o=n.n(a),r=n(181),l=n.n(r),i=n(8),c=n(171),s=n(270),u=n.n(s),m=n(150),d=n(252),p=n(83);function b(){return o.a.createElement("div",{className:u.a.proUpsell},o.a.createElement(d.a.Consumer,null,e=>e&&o.a.createElement("label",{className:u.a.toggle},o.a.createElement("span",{className:u.a.toggleLabel},"Show PRO features"),o.a.createElement(p.a,{value:e.showFakeOptions,onChange:e.onToggleFakeOptions}))),o.a.createElement(m.a,{url:"https://spotlightwp.com/pricing/?utm_source=sl_plugin&utm_medium=sl_plugin_upgrade&utm_campaign=sl_plugin_upgrade_editor"}))}var _,g=n(15);function f({content:e,sidebar:t,primary:n,current:r,useDefaults:i}){const[s,u]=Object(a.useState)(n),m=()=>u(p?"content":"sidebar"),d=()=>u(p?"sidebar":"content"),p="content"===(n=null!=n?n:"content"),_="sidebar"===n,h="content"===(r=i?s:r),v="sidebar"===r,E=p?l.a.layoutPrimaryContent:l.a.layoutPrimarySidebar;return o.a.createElement(c.a,{breakpoints:[f.BREAKPOINT],render:n=>{const a=n<=f.BREAKPOINT;return o.a.createElement("div",{className:E},e&&(h||!a)&&o.a.createElement("div",{className:l.a.content},i&&o.a.createElement(f.Navigation,{align:p?"right":"left",text:!p&&o.a.createElement("span",null,"Go back"),icon:p?"admin-generic":"arrow-left",onClick:p?d:m}),"function"==typeof e?e(a):null!=e?e:null),t&&(v||!a)&&o.a.createElement("div",{className:l.a.sidebar},i&&o.a.createElement(f.Navigation,{align:_?"right":"left",text:!_&&o.a.createElement("span",null,"Go back"),icon:_?"admin-generic":"arrow-left",onClick:_?d:m}),!g.a.isPro&&o.a.createElement(b,null),"function"==typeof t?t(a):null!=t?t:null))}})}(_=f||(f={})).BREAKPOINT=968,_.Navigation=function({icon:e,text:t,align:n,onClick:a}){return t=null!=t?t:"Go back",e=null!=e?e:"arrow-left-alt",n=null!=n?n:"left",o.a.createElement("div",{className:"right"===n?l.a.navigationRight:l.a.navigationLeft},o.a.createElement("a",{className:l.a.navLink,onClick:a},e&&o.a.createElement(i.a,{icon:e}),o.a.createElement("span",null,null!=t?t:"")))}},116:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(10),l=n(9),i=(n(456),n(8)),c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};function s(e){var{className:t,children:n,isTransitioning:a}=e,l=c(e,["className","children","isTransitioning"]);const i=Object(r.a)("onboarding",{"--transitioning":a});return o.a.createElement("div",Object.assign({className:Object(r.b)(i,t)},l),Array.isArray(n)?n.map((e,t)=>o.a.createElement("div",{key:t},e)):n)}!function(e){e.TRANSITION_DURATION=200,e.Thin=e=>{var{className:t,children:n}=e,a=c(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__thin",t)},a),n)},e.HelpMsg=e=>{var{className:t,children:n}=e,a=c(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__help-msg",t)},a),n)},e.ProTip=({children:t})=>o.a.createElement(e.HelpMsg,null,o.a.createElement("div",{className:"onboarding__pro-tip"},o.a.createElement("span",null,o.a.createElement(i.a,{icon:"lightbulb"}),o.a.createElement("strong",null,"Pro tip!")),t)),e.StepList=e=>{var{className:t,children:n}=e,a=c(e,["className","children"]);return o.a.createElement("ul",Object.assign({className:Object(r.b)("onboarding__steps",t)},a),n)},e.Step=e=>{var{isDone:t,num:n,className:a,children:l}=e,i=c(e,["isDone","num","className","children"]);return o.a.createElement("li",Object.assign({className:Object(r.b)(t?"onboarding__done":null,a)},i),o.a.createElement("strong",null,"Step ",n,":")," ",l)},e.HeroButton=e=>{var t,{className:n,children:a}=e,i=c(e,["className","children"]);return o.a.createElement(l.a,Object.assign({type:null!==(t=i.type)&&void 0!==t?t:l.c.PRIMARY,size:l.b.HERO,className:Object(r.b)("onboarding__hero-button",n)},i),a)}}(s||(s={}))},118:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(206),l=n.n(r);function i({children:e,padded:t,disabled:n}){return o.a.createElement("div",{className:n?l.a.disabled:l.a.sidebar},o.a.createElement("div",{className:t?l.a.paddedContent:l.a.content},null!=e?e:null))}!function(e){e.padded=l.a.padded}(i||(i={}))},123:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(227),l=n.n(r),i=n(8),c=n(242);function s({maxWidth:e,children:t}){e=null!=e?e:300;const[n,a]=o.a.useState(!1),r=()=>a(!0),s=()=>a(!1),u={content:l.a.tooltipContent,container:l.a.tooltipContainer};return o.a.createElement("div",{className:l.a.root},o.a.createElement(c.a,{visible:n,theme:u},({ref:e})=>o.a.createElement("span",{ref:e,className:l.a.icon,style:{opacity:n?1:.7},onMouseEnter:r,onMouseLeave:s},o.a.createElement(i.a,{icon:"info"})),o.a.createElement("div",{style:{maxWidth:e+"px"}},t)))}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(382),l=n.n(r),i=n(9),c=n(8),s=n(263),u=n(64);function m({isOpen:e,onClose:t,onConnect:n,beforeConnect:a}){return o.a.createElement(u.a,{title:"Connect an Instagram account",isOpen:e,width:650,onClose:t},o.a.createElement(u.a.Content,null,o.a.createElement(s.a,{onConnect:n,beforeConnect:e=>{a&&a(e),t()}})))}function d({children:e,onConnect:t,beforeConnect:n}){const[a,r]=o.a.useState(!1);return o.a.createElement(o.a.Fragment,null,o.a.createElement(i.a,{className:l.a.root,size:i.b.HERO,type:i.c.SECONDARY,onClick:()=>r(!0)},o.a.createElement(c.a,{icon:"instagram"}),null!=e?e:o.a.createElement("span",null,"Connect more Instagram accounts")),o.a.createElement(m,{isOpen:a,onClose:()=>{r(!1)},onConnect:t,beforeConnect:n}))}},127:function(e,t,n){"use strict";t.a=wp},129:function(e,t,n){e.exports={base:"ConnectAccount__base",horizontal:"ConnectAccount__horizontal ConnectAccount__base","prompt-msg":"ConnectAccount__prompt-msg",promptMsg:"ConnectAccount__prompt-msg",types:"ConnectAccount__types",vertical:"ConnectAccount__vertical ConnectAccount__base",type:"ConnectAccount__type",capabilities:"ConnectAccount__capabilities",capability:"ConnectAccount__capability","business-learn-more":"ConnectAccount__business-learn-more",businessLearnMore:"ConnectAccount__business-learn-more","connect-access-token":"ConnectAccount__connect-access-token",connectAccessToken:"ConnectAccount__connect-access-token","types-rows":"ConnectAccount__types-rows",typesRows:"ConnectAccount__types-rows"}},132:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(10),l=n(154),i=n.n(l);function c({cols:e,rows:t,footerCols:n,styleMap:a}){return a=null!=a?a:{cols:{},cells:{}},o.a.createElement("table",{className:i.a.table},o.a.createElement("thead",{className:i.a.header},o.a.createElement(u,{cols:e,styleMap:a})),o.a.createElement("tbody",null,t.map((t,n)=>o.a.createElement(s,{key:n,idx:n,row:t,cols:e,styleMap:a}))),n&&o.a.createElement("tfoot",{className:i.a.footer},o.a.createElement(u,{cols:e,styleMap:a})))}function s({idx:e,row:t,cols:n,styleMap:a}){return o.a.createElement("tr",{className:i.a.row},n.map(n=>o.a.createElement("td",{key:n.id,className:Object(r.b)(i.a.cell,m(n),a.cells[n.id])},n.render(t,e))))}function u({cols:e,styleMap:t}){return o.a.createElement("tr",null,e.map(e=>{const n=Object(r.b)(i.a.colHeading,m(e),t.cols[e.id]);return o.a.createElement("th",{key:e.id,className:n},e.label)}))}function m(e){return"center"===e.align?i.a.alignCenter:"right"===e.align?i.a.alignRight:i.a.alignLeft}},133:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(127),l=n(4);const i=({id:e,value:t,title:n,button:a,mediaType:i,multiple:c,children:s,onOpen:u,onClose:m,onSelect:d})=>{e=null!=e?e:"wp-media-"+Object(l.p)(),i=null!=i?i:"image",a=null!=a?a:"Select";const p=o.a.useRef();p.current||(p.current=r.a.media({id:e,title:n,library:{type:i},button:{text:a},multiple:c}));const b=()=>{const e=p.current.state().get("selection").first();d&&d(e)};return m&&p.current.on("close",m),p.current.on("open",()=>{if(t){const e="object"==typeof t?t:r.a.media.attachment(t);e.fetch(),p.current.state().get("selection").add(e?[e]:[])}u&&u()}),p.current.on("insert",b),p.current.on("select",b),s({open:()=>p.current.open()})}},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);const r=()=>o.a.createElement("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-ellipsis",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},o.a.createElement("path",{d:"M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))},136:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(315),o=n.n(a),r=n(0),l=n.n(r),i=n(9),c=n(10);function s({className:e,content:t,tooltip:n,onClick:a,disabled:r,isSaving:s}){return t=null!=t?t:e=>e?"Saving ...":"Save",n=null!=n?n:"Save",l.a.createElement(i.a,{className:Object(c.b)(o.a.root,e),type:i.c.PRIMARY,size:i.b.LARGE,tooltip:n,onClick:()=>a&&a(),disabled:r},s&&l.a.createElement("div",{className:o.a.savingOverlay}),t(s))}},138:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(156),l=n.n(r),i=n(59),c=n(10),s=n(95),u=n(175);function m({children:e}){return o.a.createElement("div",{className:l.a.root},o.a.createElement(m.Item,null,o.a.createElement(u.a,null)),o.a.createElement(m.Chevron,null),o.a.createElement("div",{className:l.a.leftContainer},e[0]),e[1]&&o.a.createElement("div",{className:l.a.rightContainer},e[1]))}!function(e){e.Item=({children:e})=>o.a.createElement("div",{className:l.a.item},e),e.Link=({linkTo:t,onClick:n,isCurrent:a,isDisabled:r,children:s})=>{const u=Object(c.c)({[l.a.link]:!0,[l.a.current]:a,[l.a.disabled]:r}),m=e=>{"Enter"!==e.key&&" "!==e.key||e.currentTarget.click()},d=r?-1:0;return o.a.createElement(e.Item,null,t?o.a.createElement(i.a,{to:t,className:u,role:"button",onKeyPress:m,tabIndex:d},s):o.a.createElement("div",{className:u,role:"button",onClick:()=>!r&&n&&n(),onKeyPress:m,tabIndex:d},s))},e.ProPill=()=>o.a.createElement("div",{className:l.a.proPill},o.a.createElement(s.a,null)),e.Chevron=()=>o.a.createElement("div",{className:l.a.chevron},o.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},o.a.createElement("path",{d:"M0 0 L100 50 L0 100",fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}(m||(m={}))},139:function(e,t,n){e.exports={modal:"Modal__modal layout__z-higher",shade:"Modal__shade layout__fill-parent",container:"Modal__container",opening:"Modal__opening","modal-open-animation":"Modal__modal-open-animation",modalOpenAnimation:"Modal__modal-open-animation",closing:"Modal__closing","modal-close-animation":"Modal__modal-close-animation",modalCloseAnimation:"Modal__modal-close-animation",content:"Modal__content",header:"Modal__header",icon:"Modal__icon","close-btn":"Modal__close-btn",closeBtn:"Modal__close-btn",scroller:"Modal__scroller",footer:"Modal__footer"}},140:function(e,t,n){e.exports={content:"GlobalPromotionsTab__content","mobile-instructions":"GlobalPromotionsTab__mobile-instructions",mobileInstructions:"GlobalPromotionsTab__mobile-instructions",tutorial:"GlobalPromotionsTab__tutorial","tutorial-box":"GlobalPromotionsTab__tutorial-box",tutorialBox:"GlobalPromotionsTab__tutorial-box","tutorial-text":"GlobalPromotionsTab__tutorial-text",tutorialText:"GlobalPromotionsTab__tutorial-text","account-list":"GlobalPromotionsTab__account-list",accountList:"GlobalPromotionsTab__account-list","account-scroller":"GlobalPromotionsTab__account-scroller",accountScroller:"GlobalPromotionsTab__account-scroller","account-button":"GlobalPromotionsTab__account-button",accountButton:"GlobalPromotionsTab__account-button","account-selected":"GlobalPromotionsTab__account-selected GlobalPromotionsTab__account-button",accountSelected:"GlobalPromotionsTab__account-selected GlobalPromotionsTab__account-button","profile-pic":"GlobalPromotionsTab__profile-pic",profilePic:"GlobalPromotionsTab__profile-pic",username:"GlobalPromotionsTab__username","fake-pro":"GlobalPromotionsTab__fake-pro",fakePro:"GlobalPromotionsTab__fake-pro"}},145:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(146),l=n(65);const i=e=>{var t;const n="string"==typeof e.value?[e.value]:null!==(t=e.value)&&void 0!==t?t:[],a=Object.assign(Object.assign({},e),{value:n.map(e=>Object(l.a)(e,"#")),sanitize:l.b});return o.a.createElement(r.a,Object.assign({},a))}},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(243),l=n(35),i=n(74);const c={DropdownIndicator:null},s=e=>({label:e,value:e}),u=({id:e,value:t,onChange:n,sanitize:u,autoFocus:m,message:d})=>{const[p,b]=o.a.useState(""),[_,g]=o.a.useState(-1),[f,h]=o.a.useState();Object(a.useEffect)(()=>{h(d)},[d]);const v=(t=Array.isArray(t)?t:[]).map(e=>s(e)),E=()=>{p.length&&(b(""),y([...v,s(p)]))},y=e=>{if(!n)return;let t=-1;e=e?e.map(e=>e&&u?u(e.value):e.value).filter((e,n,a)=>{const o=a.indexOf(e);return o!==n?(t=o,!1):!!e}):[],g(t),-1===t&&n(e)},O=Object(i.b)();return o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{inputId:e,className:"react-select",classNamePrefix:"react-select",components:c,inputValue:p,isClearable:!1,isMulti:!0,menuIsOpen:!1,onChange:y,onInputChange:e=>{b(e)},onKeyDown:e=>{if(p)switch(e.key){case",":case"Enter":case"Tab":E(),e.preventDefault()}},onBlur:E,placeholder:"Type something and press enter...",value:v,autoFocus:m,styles:O}),_<0||0===v.length?null:o.a.createElement(l.a,{type:l.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},o.a.createElement("code",null,v[_].label)," is already in the list"),f?o.a.createElement(l.a,{type:l.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},f):null)};var m=n(7);const d=Object(m.b)(e=>{const[t,n]=o.a.useState("");e.exclude&&0===e.exclude.length&&t.length>0&&n("");let a=void 0;if(t.length>0){const n="%s",r=e.excludeMsg.indexOf("%s"),l=e.excludeMsg.substring(0,r),i=e.excludeMsg.substring(r+n.length);a=o.a.createElement(o.a.Fragment,null,l,o.a.createElement("code",null,t),i)}const r=Object.assign(Object.assign({},e),{message:a,onChange:t=>{const a=e.exclude?t.findIndex(t=>e.exclude.includes(t)):-1;a>-1?n(t[a]):e.onChange(t)}});return o.a.createElement(u,Object.assign({},r))})},147:function(e,t,n){e.exports={root:"ConnectAccessToken__root",prompt:"ConnectAccessToken__prompt",row:"ConnectAccessToken__row ConnectAccessToken__root",content:"ConnectAccessToken__content",label:"ConnectAccessToken__label",bottom:"ConnectAccessToken__bottom","button-container":"ConnectAccessToken__button-container",buttonContainer:"ConnectAccessToken__button-container",button:"ConnectAccessToken__button","help-message":"ConnectAccessToken__help-message",helpMessage:"ConnectAccessToken__help-message",column:"ConnectAccessToken__column ConnectAccessToken__root"}},154:function(e,t,n){e.exports={table:"Table__table theme__subtle-drop-shadow theme__slightly-rounded",header:"Table__header",footer:"Table__footer",cell:"Table__cell","col-heading":"Table__col-heading Table__cell",colHeading:"Table__col-heading Table__cell",row:"Table__row","align-left":"Table__align-left",alignLeft:"Table__align-left","align-right":"Table__align-right",alignRight:"Table__align-right","align-center":"Table__align-center",alignCenter:"Table__align-center"}},156:function(e,t,n){e.exports={root:"Navbar__root layout__flex-row",container:"Navbar__container layout__flex-row","left-container":"Navbar__left-container Navbar__container layout__flex-row",leftContainer:"Navbar__left-container Navbar__container layout__flex-row","right-container":"Navbar__right-container Navbar__container layout__flex-row",rightContainer:"Navbar__right-container Navbar__container layout__flex-row",child:"Navbar__child",item:"Navbar__item Navbar__child",disabled:"Navbar__disabled",chevron:"Navbar__chevron Navbar__child",link:"Navbar__link","pro-pill":"Navbar__pro-pill",proPill:"Navbar__pro-pill",current:"Navbar__current","button-container":"Navbar__button-container layout__flex-row",buttonContainer:"Navbar__button-container layout__flex-row"}},161:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);function r(e){return o.a.createElement("p",null,e.message)}},167:function(e,t,n){e.exports={root:"UnitField__root layout__flex-row",input:"UnitField__input","unit-container":"UnitField__unit-container layout__flex-column",unitContainer:"UnitField__unit-container layout__flex-column","unit-bubble":"UnitField__unit-bubble",unitBubble:"UnitField__unit-bubble","unit-static":"UnitField__unit-static UnitField__unit-bubble layout__flex-column",unitStatic:"UnitField__unit-static UnitField__unit-bubble layout__flex-column","unit-selector":"UnitField__unit-selector UnitField__unit-bubble layout__flex-row",unitSelector:"UnitField__unit-selector UnitField__unit-bubble layout__flex-row","current-unit":"UnitField__current-unit",currentUnit:"UnitField__current-unit","menu-chevron":"UnitField__menu-chevron",menuChevron:"UnitField__menu-chevron","menu-chevron-open":"UnitField__menu-chevron-open UnitField__menu-chevron",menuChevronOpen:"UnitField__menu-chevron-open UnitField__menu-chevron","unit-list":"UnitField__unit-list layout__flex-column layout__z-highest",unitList:"UnitField__unit-list layout__flex-column layout__z-highest","unit-option":"UnitField__unit-option",unitOption:"UnitField__unit-option","unit-selected":"UnitField__unit-selected UnitField__unit-option",unitSelected:"UnitField__unit-selected UnitField__unit-option"}},175:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(322),l=n.n(r),i=n(15),c=n(10);function s(){return o.a.createElement("div",{className:l.a.logo},o.a.createElement("img",Object.assign({className:l.a.logoImage,src:i.a.image("spotlight-favicon.png"),alt:"Spotlight"},c.e)))}},181:function(e,t,n){e.exports={layout:"SidebarLayout__layout","layout-primary-content":"SidebarLayout__layout-primary-content SidebarLayout__layout",layoutPrimaryContent:"SidebarLayout__layout-primary-content SidebarLayout__layout","layout-primary-sidebar":"SidebarLayout__layout-primary-sidebar SidebarLayout__layout",layoutPrimarySidebar:"SidebarLayout__layout-primary-sidebar SidebarLayout__layout",container:"SidebarLayout__container",content:"SidebarLayout__content SidebarLayout__container",sidebar:"SidebarLayout__sidebar SidebarLayout__container",navigation:"SidebarLayout__navigation","navigation-left":"SidebarLayout__navigation-left SidebarLayout__navigation",navigationLeft:"SidebarLayout__navigation-left SidebarLayout__navigation","navigation-right":"SidebarLayout__navigation-right SidebarLayout__navigation",navigationRight:"SidebarLayout__navigation-right SidebarLayout__navigation","nav-link":"SidebarLayout__nav-link",navLink:"SidebarLayout__nav-link"}},19:function(e,t,n){"use strict";n(437);var a=n(22),o=n(0),r=n.n(o),l=n(25),i=n(172),c=n(7),s=n(74),u=n(167),m=n.n(u),d=n(37),p=n(8);function b(e){var{type:t,unit:n,units:a,value:o,onChange:l}=e,i=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["type","unit","units","value","onChange"]);const[c,s]=r.a.useState(!1),u=Array.isArray(a)&&a.length,b=()=>s(e=>!e),_=e=>{switch(e.key){case" ":case"Enter":b();break;default:return}e.preventDefault(),e.stopPropagation()};return(null==o||isNaN(o))&&(o=""),r.a.createElement("div",{className:m.a.root},r.a.createElement("input",Object.assign({},i,{className:m.a.input,type:null!=t?t:"text",value:o,onChange:e=>l&&l(e.currentTarget.value,n)})),r.a.createElement("div",{className:m.a.unitContainer},u&&r.a.createElement(d.a,{isOpen:c,onBlur:()=>s(!1)},({ref:e})=>r.a.createElement("div",{ref:e,className:m.a.unitSelector,role:"button",onClick:b,onKeyDown:_,tabIndex:0},r.a.createElement("span",{className:m.a.currentUnit},n),r.a.createElement(p.a,{icon:"arrow-down-alt2",className:c?m.a.menuChevronOpen:m.a.menuChevron})),a.map(e=>r.a.createElement(d.c,{key:e,onClick:()=>(l&&l(o,e),void s(!1))},e))),!u&&r.a.createElement("div",{className:m.a.unitStatic},r.a.createElement("span",null,n))))}var _=n(80),g=n(311),f=n.n(g),h=n(9),v=n(18),E=n(48),y=[{id:"accounts",title:"Accounts",component:i.a},{id:"config",title:"Configuration",groups:[{id:"importing",title:"Import options",fields:[{id:"importerInterval",label:"Check for new posts",component:Object(c.b)(({id:e})=>r.a.createElement(s.a,{id:e,width:250,value:l.c.values.importerInterval,options:N.config.cronScheduleOptions,onChange:e=>l.c.values.importerInterval=e.value}))}]},{id:"cleaner",title:"Optimization",component:()=>r.a.createElement("div",null,r.a.createElement(_.a,{label:"What is this?",stealth:!0},r.a.createElement("div",null,r.a.createElement("p",null,"Spotlight imports all Instagram posts that can be displayed in your feed, even "," ",'those hidden behind a "Load more" button. The posts furthest down the list may'," ","therefore rarely be seen."),r.a.createElement("p",null,"To improve your site’s performance, you can choose to delete these unseen posts"," ","after a set period of time. Once a site visitor requests those posts, they will"," ","be re-imported.")))),fields:[{id:"cleanerAgeLimit",label:"Delete unseen posts after",component:Object(c.b)(({id:e})=>{const t=l.c.values.cleanerAgeLimit.split(" "),n=parseInt(t[0]),a=t[1];return r.a.createElement(b,{id:e,units:["days","hours","minutes"],value:n,unit:a,type:"number",onChange:(e,t)=>l.c.values.cleanerAgeLimit=e+" "+t})})},{id:"cleanerInterval",label:"Run optimization",component:Object(c.b)(({id:e})=>r.a.createElement(s.a,{id:e,width:250,value:l.c.values.cleanerInterval,options:N.config.cronScheduleOptions,onChange:e=>l.c.values.cleanerInterval=e.value}))}]}]},{id:"tools",title:"Tools",groups:[{id:"cache",title:"Cache",fields:[{id:"clearCache",label:"If you are experiencing issues, clearing the plugin's cache may help.",component:function({}){const[e,t]=r.a.useState(!1);return Object(v.j)(n=>{n&&e&&(E.a.remove("admin/clear_cache/done"),E.a.add("admin/clear_cache/please_wait",E.a.message("Clearing the cache ..."),E.a.NO_TTL),N.restApi.clearCache().finally(()=>{E.a.remove("admin/clear_cache/please_wait"),E.a.add("admin/clear_cache/done",E.a.message("Cleared cache successfully!")),n&&t(!1)}))},[e]),r.a.createElement("div",{className:f.a.root},r.a.createElement(h.a,{disabled:e,onClick:()=>{t(!0)}},"Clear the cache"),r.a.createElement("a",{href:N.resources.cacheDocsUrl,target:"_blank",className:f.a.docLink},"What's this?"))}}]}]}],O=n(120);a.a.driver.interceptors.request.use(e=>(e.headers["X-WP-Nonce"]=SliAdminCommonL10n.restApi.wpNonce,e),e=>Promise.reject(e));const C={config:{rootId:"spotlight-instagram-admin",adminUrl:SliAdminCommonL10n.adminUrl,restApi:SliAdminCommonL10n.restApi,doOnboarding:"1"==SliAdminCommonL10n.doOnboarding,cronSchedules:SliAdminCommonL10n.cronSchedules,cronScheduleOptions:SliAdminCommonL10n.cronSchedules.map(e=>({value:e.key,label:e.display})),postTypes:SliAdminCommonL10n.postTypes,hasElementor:SliAdminCommonL10n.hasElementor},resources:{upgradeUrl:"https://spotlightwp.com/pricing/",upgradeLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing",pricingUrl:"https://spotlightwp.com/pricing/",trialLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing&billing_cycle=annual&trial=true",proComingSoonUrl:"https://spotlightwp.com/pro-coming-soon/",supportUrl:"https://spotlightwp.com/support/",customPersonalInfoUrl:"https://docs.spotlightwp.com/article/624-custom-profile-photo-and-bio-text",businessAccounts:"https://docs.spotlightwp.com/article/555-how-to-switch-to-a-business-account",cacheDocsUrl:"https://docs.spotlightwp.com/article/639-cache",promoTypesSurvey:"https://spotlightwp.com/survey-promote/",accessTokenDocUrl:"https://docs.spotlightwp.com/article/731-connecting-an-instagram-account-using-an-access-token",tokenGenerator:"https://spotlightwp.com/access-token-generator"},editor:{config:Object.assign({},O.a)},restApi:{config:SliAdminCommonL10n.restApi,saveFeed:e=>a.a.driver.post("/feeds"+(e.id?"/"+e.id:""),{feed:e}),deleteFeed:e=>a.a.driver.delete("/feeds/"+e),getMediaSources:()=>a.a.driver.get("/media/sources"),getMediaBySource:(e,t=30,n=0)=>a.a.driver.get(`/media?source=${e.name}&type=${e.type}&num=${t}&from=${n}`),connectPersonal:e=>a.a.driver.post("/connect",{accessToken:e}),connectBusiness:(e,t)=>a.a.driver.post("/connect",{accessToken:e,userId:t}),updateAccount:e=>a.a.driver.post("/accounts",e),deleteAccount:e=>a.a.driver.delete("/accounts/"+e),deleteAccountMedia:e=>a.a.driver.delete("/account_media/"+e),searchPosts:(e,t)=>a.a.driver.get(`/search_posts?search=${e}&type=${t}`),getSettings:()=>a.a.driver.get("/settings"),saveSettings:e=>a.a.driver.patch("/settings",{settings:e}),getNotifications:()=>a.a.driver.get("/notifications"),clearCache:()=>a.a.driver.post("/clear_cache"),clearFeedCache:e=>a.a.driver.post("/clear_cache/feed",{options:e.options})},settings:{pages:y,showGame:!0}};var N=t.a=C;a.a.config.forceImports=!0},194:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(384),l=n.n(r);function i({message:e}){return o.a.createElement("pre",{className:l.a.content},e)}},204:function(e,t,n){e.exports={message:"Message__message",shaking:"Message__shaking","shake-animation":"Message__shake-animation",shakeAnimation:"Message__shake-animation",icon:"Message__icon",content:"Message__content","dismiss-btn":"Message__dismiss-btn",dismissBtn:"Message__dismiss-btn",success:"Message__success Message__message",info:"Message__info Message__message",warning:"Message__warning Message__message","pro-tip":"Message__pro-tip Message__message",proTip:"Message__pro-tip Message__message",error:"Message__error Message__message",grey:"Message__grey Message__message"}},205:function(e,t,n){e.exports={primaryColor:"#007cba",secondaryColor:"#d04186",tertiaryColor:"#d82442",lightColor:"#f5f5f5",lightColor2:"#e6e7e8",lightColor3:"#e1e2e3",shadowColor:"rgba(20,25,60,.32)",washedColor:"#eaf0f4"}},206:function(e,t,n){e.exports={content:"Sidebar__content",sidebar:"Sidebar__sidebar",padded:"Sidebar__padded","padded-content":"Sidebar__padded-content Sidebar__content Sidebar__padded",paddedContent:"Sidebar__padded-content Sidebar__content Sidebar__padded",disabled:"Sidebar__disabled Sidebar__sidebar"}},209:function(e,t,n){e.exports={root:"Toast__root","fade-in-animation":"Toast__fade-in-animation",fadeInAnimation:"Toast__fade-in-animation","root-fading-out":"Toast__root-fading-out Toast__root",rootFadingOut:"Toast__root-fading-out Toast__root","fade-out-animation":"Toast__fade-out-animation",fadeOutAnimation:"Toast__fade-out-animation",content:"Toast__content","dismiss-icon":"Toast__dismiss-icon",dismissIcon:"Toast__dismiss-icon","dismiss-btn":"Toast__dismiss-btn Toast__dismiss-icon",dismissBtn:"Toast__dismiss-btn Toast__dismiss-icon"}},210:function(e,t,n){e.exports={content:"AutomatePromotionsTab__content","content-heading":"AutomatePromotionsTab__content-heading",contentHeading:"AutomatePromotionsTab__content-heading",tutorial:"AutomatePromotionsTab__tutorial","tutorial-box":"AutomatePromotionsTab__tutorial-box",tutorialBox:"AutomatePromotionsTab__tutorial-box","tutorial-text":"AutomatePromotionsTab__tutorial-text",tutorialText:"AutomatePromotionsTab__tutorial-text","tutorial-video":"AutomatePromotionsTab__tutorial-video",tutorialVideo:"AutomatePromotionsTab__tutorial-video","mobile-instructions":"AutomatePromotionsTab__mobile-instructions",mobileInstructions:"AutomatePromotionsTab__mobile-instructions"}},224:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return f}));var a=n(0),o=n.n(a),r=n(18),l=n(6),i=n(2),c=n(41),s=n(323),u=n(4),m=n(411),d=n(306),p=n(174),b=n(120),_=c.a.SavedFeed;const g="You have unsaved changes. If you leave now, your changes will be lost.";function f({feed:e,config:t,requireName:n,confirmOnCancel:c,firstTab:f,useCtrlS:h,onChange:v,onSave:E,onCancel:y,onRename:O,onChangeTab:C,onDirtyChange:N}){const w=Object(u.q)(b.a,null!=t?t:{});f=null!=f?f:w.tabs[0].id;const A=Object(s.a)(),[k,T]=Object(r.i)(null),[S,P]=Object(r.i)(e.name),[j,L]=o.a.useState(A.showFakeOptions),[x,I]=o.a.useState(f),[R,M]=o.a.useState(i.a.Mode.DESKTOP),[F,D]=Object(r.i)(!1),[B,U]=o.a.useState(!1),[G,H]=Object(r.i)(!1),[z,Y]=o.a.useState(!1),W=e=>{D(e),N&&N(e)};null===k.current&&(k.current=new l.a.Options(e.options));const K=o.a.useCallback(e=>{I(e),C&&C(e)},[C]),$=o.a.useCallback(e=>{const t=new l.a.Options(k.current);Object(u.a)(t,e),T(t),W(!0),v&&v(e,t)},[v]),V=o.a.useCallback(e=>{P(e),W(!0),O&&O(e)},[O]),q=o.a.useCallback(t=>{if(F.current)if(n&&void 0===t&&!G.current&&0===S.current.length)H(!0);else{t=null!=t?t:S.current,P(t),H(!1),Y(!0);const n=new _({id:e.id,name:t,options:k.current});E&&E(n).finally(()=>{Y(!1),W(!1)})}},[e,E]),J=o.a.useCallback(()=>{F.current&&!confirm(g)||(W(!1),U(!0))},[y]);return Object(r.d)("keydown",e=>{h&&e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(q(),e.preventDefault(),e.stopPropagation())},[],[F]),Object(a.useLayoutEffect)(()=>{B&&y&&y()},[B]),o.a.createElement(o.a.Fragment,null,o.a.createElement(m.a,Object.assign({value:k.current,name:S.current,tabId:x,previewDevice:R,showFakeOptions:j,onChange:$,onRename:V,onChangeTab:K,onToggleFakeOptions:e=>{L(e),Object(s.b)({showFakeOptions:e})},onChangeDevice:M,onSave:q,onCancel:J,isSaving:z},w,{isDoneBtnEnabled:F.current,isCancelBtnEnabled:F.current})),o.a.createElement(d.a,{isOpen:G.current,onAccept:e=>{q(e)},onCancel:()=>{H(!1)}}),c&&o.a.createElement(p.a,{message:g,when:F.current&&!z&&!B}))}},225:function(e,t,n){e.exports={root:"Tooltip__root layout__z-highest",container:"Tooltip__container","container-top":"Tooltip__container-top Tooltip__container",containerTop:"Tooltip__container-top Tooltip__container","container-bottom":"Tooltip__container-bottom Tooltip__container",containerBottom:"Tooltip__container-bottom Tooltip__container","container-left":"Tooltip__container-left Tooltip__container",containerLeft:"Tooltip__container-left Tooltip__container","container-right":"Tooltip__container-right Tooltip__container",containerRight:"Tooltip__container-right Tooltip__container",content:"Tooltip__content",arrow:"Tooltip__arrow","arrow-top":"Tooltip__arrow-top Tooltip__arrow",arrowTop:"Tooltip__arrow-top Tooltip__arrow","arrow-bottom":"Tooltip__arrow-bottom Tooltip__arrow",arrowBottom:"Tooltip__arrow-bottom Tooltip__arrow","arrow-left":"Tooltip__arrow-left Tooltip__arrow",arrowLeft:"Tooltip__arrow-left Tooltip__arrow","arrow-right":"Tooltip__arrow-right Tooltip__arrow",arrowRight:"Tooltip__arrow-right Tooltip__arrow"}},227:function(e,t,n){e.exports={root:"HelpTooltip__root",tooltip:"HelpTooltip__tooltip layout__z-high","tooltip-container":"HelpTooltip__tooltip-container",tooltipContainer:"HelpTooltip__tooltip-container","tooltip-content":"HelpTooltip__tooltip-content",tooltipContent:"HelpTooltip__tooltip-content",icon:"HelpTooltip__icon"}},230:function(e,t,n){e.exports={root:"Notification__root",text:"Notification__text",title:"Notification__title Notification__text",content:"Notification__content Notification__text",date:"Notification__date"}},242:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(225),l=n.n(r),i=n(192),c=n(327),s=n(328),u=n(19),m=n(10);function d({visible:e,delay:t,placement:n,theme:r,children:d}){r=null!=r?r:{},n=n||"bottom";const[b,_]=o.a.useState(!1),g={preventOverflow:{boundariesElement:document.getElementById(u.a.config.rootId),padding:5}};Object(a.useEffect)(()=>{const n=setTimeout(()=>_(e),e?t:1);return()=>clearTimeout(n)},[e]);const f=p("container",n),h=p("arrow",n),v=Object(m.b)(l.a[f],r.container,r[f]),E=Object(m.b)(l.a[h],r.arrow,r[h]);return o.a.createElement(i.c,null,o.a.createElement(c.a,null,e=>d[0](e)),o.a.createElement(s.a,{placement:n,modifiers:g,positionFixed:!0},({ref:e,style:t,placement:n,arrowProps:a})=>b?o.a.createElement("div",{ref:e,className:Object(m.b)(l.a.root,r.root),style:t,tabIndex:-1},o.a.createElement("div",{className:v,"data-placement":n},o.a.createElement("div",{className:Object(m.b)(l.a.content,r.content)},d[1]),o.a.createElement("div",{className:E,ref:a.ref,style:a.style,"data-placement":n}))):null))}function p(e,t){switch(t){case"top":case"top-start":case"top-end":return e+"Top";case"bottom":case"bottom-start":case"bottom-end":return e+"Bottom";case"left":case"left-start":case"left-end":return e+"Left";case"right":case"right-start":case"right-end":return e+"Right";default:return e}}},246:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(388),l=n.n(r),i=n(95);function c({children:e}){return o.a.createElement("div",null,o.a.createElement("div",{className:l.a.proPill},o.a.createElement(i.a,null)),o.a.createElement("span",null,e))}},25:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var a=n(1),o=n(19),r=n(4),l=n(22),i=n(15);let c;t.c=c=Object(a.o)({values:{},original:{},isDirty:!1,isSaving:!1,update(e){Object(r.a)(c.values,e)},save(){if(!c.isDirty)return;c.isSaving=!0;const e={importerInterval:c.values.importerInterval,cleanerAgeLimit:c.values.cleanerAgeLimit,cleanerInterval:c.values.cleanerInterval,hashtagWhitelist:c.values.hashtagWhitelist,hashtagBlacklist:c.values.hashtagBlacklist,captionWhitelist:c.values.captionWhitelist,captionBlacklist:c.values.captionBlacklist,autoPromotions:c.values.autoPromotions,promotions:c.values.promotions};return o.a.restApi.saveSettings(e).then(e=>{c.fromResponse(e),document.dispatchEvent(new m(s))}).catch(e=>{const t=l.a.getErrorReason(e);throw document.dispatchEvent(new m(u,{detail:{error:t}})),t}).finally(()=>c.isSaving=!1)},load:()=>o.a.restApi.getSettings().then(e=>c.fromResponse(e)).catch(e=>{throw l.a.getErrorReason(e)}),restore(){c.values=Object(r.g)(c.original),c.isDirty=!1},fromResponse(e){var t,n,a,o,r,l,i,s,u;if("object"!=typeof e||void 0===e.data)throw"Spotlight encountered a problem while trying to load your settings. Kindly contact customer support for assistance.";c.original={importerInterval:null!==(t=e.data.importerInterval)&&void 0!==t?t:"",cleanerAgeLimit:null!==(n=e.data.cleanerAgeLimit)&&void 0!==n?n:"",cleanerInterval:null!==(a=e.data.cleanerInterval)&&void 0!==a?a:"",hashtagWhitelist:null!==(o=e.data.hashtagWhitelist)&&void 0!==o?o:[],hashtagBlacklist:null!==(r=e.data.hashtagBlacklist)&&void 0!==r?r:[],captionWhitelist:null!==(l=e.data.captionWhitelist)&&void 0!==l?l:[],captionBlacklist:null!==(i=e.data.captionBlacklist)&&void 0!==i?i:[],autoPromotions:null!==(s=e.data.autoPromotions)&&void 0!==s?s:[],promotions:null!==(u=e.data.promotions)&&void 0!==u?u:{}},Array.isArray(c.original.promotions)&&0===c.original.promotions.length&&(c.original.promotions={}),c.restore()}},{values:a.o,update:a.f,save:a.f,load:a.f,restore:a.f}),Object(a.g)(()=>{c.isDirty=!Object(r.l)(c.original,c.values),i.a.config.globalPromotions=c.values.promotions,i.a.config.autoPromotions=c.values.autoPromotions});const s="sli/settings/save/success",u="sli/settings/save/error";class m extends CustomEvent{constructor(e,t={}){super(e,t)}}},256:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(405),l=n.n(r),i=n(48),c=n(161);const s=({feed:e,onCopy:t,children:n})=>o.a.createElement(l.a,{text:`[instagram feed="${e.id}"]`,onCopy:()=>{i.a.add("feeds/shortcode/copied",()=>o.a.createElement(c.a,{message:"Copied shortcode to clipboard."})),t&&t()}},n)},259:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var a=n(0),o=n.n(a),r=n(210),l=n.n(r),i=n(114),c=n(112),s=n.n(c),u=n(4),m=n(260),d=n(9),p=n(8),b=n(11),_=n(56),g=n(128),f=n(19),h=n(89);function v({automations:e,selected:t,isFakePro:n,onChange:r,onSelect:l,onClick:i}){!n&&r||(r=_.b);const[c,p]=o.a.useState(null);function g(e){l&&l(e)}const f=Object(a.useCallback)(()=>{r(e.concat({type:"hashtag",config:{},promotion:{type:"link",config:{}}}),e.length)},[e]),v=Object(a.useCallback)(t=>()=>{const n=e[t],a=Object(u.g)(n),o=e.slice();o.splice(t+1,0,a),r(o,t+1)},[e]);function y(){p(null)}const O=Object(a.useCallback)(t=>{const n=e.slice();n.splice(t,1),r(n,0),y()},[e]),C=Object(a.useCallback)(n=>{const a=e[t],o=n.map(e=>({type:e.type,config:b.a.Automation.getConfig(e),promotion:b.a.Automation.getPromotion(e)})),l=o.findIndex(e=>e.promotion===a.promotion);r(o,l)},[e]);function N(e){return()=>{g(e),i&&i(e)}}const w=e.map(e=>Object.assign(Object.assign({},e),{id:Object(u.p)()}));return o.a.createElement("div",{className:n?s.a.fakeProList:s.a.list},o.a.createElement("div",{className:s.a.addButtonRow},o.a.createElement(d.a,{type:d.c.SECONDARY,size:d.b.LARGE,onClick:f},"Add automation")),o.a.createElement(m.a,{list:w,handle:"."+s.a.rowDragHandle,setList:C,onStart:function(e){g(e.oldIndex)},animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},e.map((e,n)=>o.a.createElement(E,{key:n,automation:e,selected:t===n,onClick:N(n),onDuplicate:v(n),onRemove:()=>function(e){p(e)}(n)}))),o.a.createElement(h.a,{isOpen:null!==c,title:"Are you sure?",buttons:["Yes, remove it","No, keep it"],onAccept:()=>O(c),onCancel:y},o.a.createElement("p",null,"Are you sure you want to remove this automation? This ",o.a.createElement("strong",null,"cannot")," be undone!")))}function E({automation:e,selected:t,onClick:n,onDuplicate:a,onRemove:r}){const l=b.a.Automation.getConfig(e),i=b.a.Automation.getPromotion(e),c=b.a.getConfig(i),u=f.a.config.postTypes.find(e=>e.slug===c.linkType);return o.a.createElement("div",{className:t?s.a.rowSelected:s.a.row,onClick:n},o.a.createElement("div",{className:s.a.rowDragHandle},o.a.createElement(p.a,{icon:"menu"})),o.a.createElement("div",{className:s.a.rowBox},o.a.createElement("div",{className:s.a.rowHashtags},l.hashtags&&Array.isArray(l.hashtags)?l.hashtags.map(e=>"#"+e).join(", "):o.a.createElement("span",{className:s.a.noHashtagsMessage},"No hashtags")),o.a.createElement("div",{className:s.a.rowSummary},o.a.createElement(g.a,{value:c.linkType},o.a.createElement(g.c,{value:"url"},o.a.createElement("span",{className:s.a.summaryItalics},"Custom URL")),o.a.createElement(g.b,null,()=>u?o.a.createElement("span",null,o.a.createElement("span",{className:s.a.summaryBold},c.postTitle)," ",o.a.createElement("span",{className:s.a.summaryItalics},"(",u.labels.singularName,")")):o.a.createElement("span",{className:s.a.noPromoMessage},"No promotion")))),o.a.createElement("div",{className:s.a.rowActions},o.a.createElement(d.a,{type:d.c.PILL,size:d.b.SMALL,onClick:Object(_.c)(a),tooltip:"Duplicate automation"},o.a.createElement(p.a,{icon:"admin-page"})),o.a.createElement(d.a,{type:d.c.DANGER_PILL,size:d.b.SMALL,onClick:Object(_.c)(r),tooltip:"Remove automation"},o.a.createElement(p.a,{icon:"trash"})))))}var y=n(324),O=n.n(y),C=n(118),N=n(74),w=n(105),A=n(145),k=n(198),T=n(10);let S;function P({automation:e,isFakePro:t,onChange:n}){var a;!t&&n||(n=_.b),void 0===S&&(S=b.a.getTypes().filter(e=>"-more-"!==e.id).map(e=>({value:e.id,label:e.label})));const r=b.a.Automation.getPromotion(e),l=b.a.getType(r),i=b.a.getConfig(r),c=null!==(a=b.a.Automation.getConfig(e).hashtags)&&void 0!==a?a:[];return o.a.createElement(C.a,null,e&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:Object(T.b)(C.a.padded,t?O.a.fakePro:null)},o.a.createElement(w.a,{id:"sli-auto-promo-hashtags",label:"Promote posts with any of these hashtags",wide:!0},o.a.createElement(A.a,{id:"sli-auto-promo-hashtags",value:c,onChange:function(t){n(Object.assign(Object.assign({},e),{config:{hashtags:t}}))},autoFocus:!t})),o.a.createElement(w.a,{id:"auto-promo-type",label:"Promotion type",wide:!0},o.a.createElement(N.a,{id:"sli-auto-promo-type",value:e.promotion.type,onChange:function(t){n(Object.assign(Object.assign({},e),{type:t.value}))},options:S,isSearchable:!1,isCreatable:!1,isClearable:!1}))),o.a.createElement("div",{className:t?O.a.fakePro:null},o.a.createElement(k.a,{type:l,config:i,onChange:function(t){n(Object.assign(Object.assign({},e),{promotion:Object.assign(Object.assign({},e.promotion),{config:t})}))},hideRemove:!0}))),!e&&o.a.createElement("div",{className:C.a.padded},o.a.createElement("p",null,"Automatically link Instagram posts from any source that contain specific hashtags to posts,"," ","pages, products, custom links, and more."," ",o.a.createElement("a",{href:"#"},"Learn more")),o.a.createElement("p",null,"To get started, create an automation or select an existing one.")))}function j({automations:e,isFakePro:t,onChange:n}){e=null!=e?e:[],n=null!=n?n:_.b;const[r,c]=o.a.useState(0),[s,m]=o.a.useState("content"),d=Object(u.f)(r,e),p=e.length>0,b=()=>m("content"),g=()=>m("sidebar"),f=Object(a.useCallback)(()=>e[d],[e,d]);function h(e){c(e)}function E(e){h(e),g()}const y=Object(a.useCallback)((e,t)=>{n(e),void 0!==t&&c(t)},[n]),O=Object(a.useCallback)(t=>{n(Object(u.c)(e,d,t))},[d,n]),C=Object(a.useCallback)(()=>{n(e.concat({type:"hashtag",config:{},promotion:{type:"link",config:{}}})),c(0),g()},[e]);return o.a.createElement(i.a,{primary:"content",current:s,sidebar:p&&(e=>o.a.createElement(o.a.Fragment,null,e&&o.a.createElement(i.a.Navigation,{icon:"arrow-left-alt",text:"Automations",onClick:b}),o.a.createElement(P,{automation:f(),onChange:O,isFakePro:t}))),content:n=>o.a.createElement("div",{className:l.a.content},!p&&o.a.createElement(L,{onCreate:C}),p&&o.a.createElement(o.a.Fragment,null,n&&o.a.createElement("div",{className:l.a.mobileInstructions},o.a.createElement("p",null,"Click or tap on an automation to change its settings")),o.a.createElement(v,{automations:e,selected:d,isFakePro:t,onChange:y,onSelect:h,onClick:E})))})}function L({onCreate:e}){return o.a.createElement("div",{className:l.a.tutorial},o.a.createElement("div",{className:l.a.tutorialBox},o.a.createElement("div",{className:l.a.tutorialText},o.a.createElement("h1",null,"Automatically drive more conversions with Instagram"),o.a.createElement("p",null,"Link Instagram posts to your products, blog posts, landing pages, and more."),o.a.createElement("p",null,o.a.createElement("b",null,"Promotions help you drive traffic and increase conversions through social proof.")),o.a.createElement("p",null,"For example, create an ",o.a.createElement("b",null,"Instagram hashtag"),", let’s call it ",o.a.createElement("b",null,"#mymaxidress"),"."," "," Display photos from Instagram that use this hashtag and feature your dress,"," "," then have them ",o.a.createElement("b",null,"link directly to your product page"),", whether it’s on the"," "," same website or not."),o.a.createElement("p",null,"Every new Instagram photo that Spotlight finds with this hashtag will then",o.a.createElement("br",null),o.a.createElement("b",null,"automatically link to the product page"),"."),o.a.createElement("p",null,o.a.createElement("b",null,"Simple. Powerful. Effective."))),o.a.createElement(d.a,{type:d.c.SECONDARY,size:d.b.HERO,onClick:e},"Create your first automation")))}},261:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var a=n(0),o=n.n(a),r=n(140),l=n.n(r),i=n(3),c=n(6),s=n(11),u=n(102),m=n(12),d=n(114),p=n(118),b=n(105),_=n(74),g=n(198);function f({media:e,promo:t,isLastPost:n,isFakePro:r,onChange:l,onNextPost:i}){let c,u,m;e&&(c=t?t.type:s.a.getTypes()[0].id,u=s.a.getTypeById(c),m=s.a.getConfig(t));const d=Object(a.useCallback)(e=>{const t={type:u.id,config:e};l(t)},[e,u]),f=Object(a.useCallback)(e=>{const t={type:e.value,config:m};l(t)},[e,m]);if(!e)return o.a.createElement(p.a,{disabled:r},o.a.createElement("div",{className:p.a.padded},o.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."),o.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),o.a.createElement("ol",{style:{marginTop:0}},o.a.createElement("li",null,"Select a post from the preview on the left."),o.a.createElement("li",null,"Choose what the post should link to.")),o.a.createElement("p",null,"That’s it!")));const h=void 0!==s.a.getAutoPromo(e);return o.a.createElement(p.a,{disabled:r},o.a.createElement("div",{className:p.a.padded},o.a.createElement(b.a,{label:"Promotion type",wide:!0},o.a.createElement(_.a,{value:c,onChange:f,options:s.a.getTypes().map(e=>({value:e.id,label:e.label}))}))),o.a.createElement(g.a,{key:e?e.id:void 0,type:u,config:m,onChange:d,hasAuto:h,showNextBtn:!0,isNextBtnDisabled:n,onNext:i}))}var h=n(196),v=n(254),E=n(10),y=n(255),O=n(56),C=n(125);const N={};function w(){return new u.b({watch:{all:!0,moderation:!1,filters:!1}})}function A({promotions:e,isFakePro:t,onChange:n}){!t&&n||(n=O.b);const[a,r]=o.a.useState("content"),[u,p]=o.a.useState(i.b.list.length>0?i.b.list[0].id:null),[b,_]=o.a.useState(),g=o.a.useRef(new c.a);A();const E=()=>r("content");function A(){g.current=new c.a(new c.a.Options({accounts:[u]}))}const T=o.a.useCallback(e=>{p(e.id),A()},[p]),S=o.a.useCallback((e,t)=>{_(t)},[_]),P=e=>e&&r("sidebar"),j=o.a.useCallback(()=>{_(e=>e+1)},[_]),L=u?m.a.ensure(N,u,w()):w(),x=L.media[b],I=x?s.a.getPromoFromDictionary(x,e):void 0,R=o.a.useCallback(t=>{n(m.a.withEntry(e,x.id,t))},[x,e,n]);return o.a.createElement(o.a.Fragment,null,0===i.b.list.length&&o.a.createElement("div",{className:l.a.tutorial},o.a.createElement("div",{className:l.a.tutorialBox},o.a.createElement("div",{className:l.a.tutorialText},o.a.createElement("h1",null,"Set up global promotions across all feeds"),o.a.createElement("p",null,"Link Instagram posts to your products, blog posts, landing pages, and more."),o.a.createElement("p",null,o.a.createElement("b",null,"Promotions help you drive traffic and increase conversions through social proof.")),o.a.createElement("p",null,"Set up global promotions for each account that will apply across all feeds."," ","You may then choose to enable or disable promotions on a per-feed basis."),o.a.createElement("p",null,"Connect your first Instagram account to set up global promotions."),o.a.createElement("p",null,o.a.createElement("b",null,"Simple. Powerful. Effective."))),o.a.createElement(C.a,{onConnect:p},"Connect your Instagram account"))),i.b.list.length>0&&o.a.createElement(d.a,{primary:"content",current:a,sidebar:e=>o.a.createElement(o.a.Fragment,null,e&&o.a.createElement(o.a.Fragment,null,o.a.createElement(d.a.Navigation,{icon:"arrow-left-alt",text:"Back",onClick:E}),o.a.createElement(y.a,{media:x})),o.a.createElement(f,{media:x,promo:I,isLastPost:b>=L.media.length-1,onChange:R,onNextPost:j,isFakePro:t})),content:e=>o.a.createElement(o.a.Fragment,null,i.b.list.length>1&&o.a.createElement(k,{selected:u,onSelect:T}),o.a.createElement("div",{className:l.a.content},e&&o.a.createElement("div",{className:l.a.mobileInstructions},o.a.createElement("p",null,"Click or tap a post to set up a promotion for it")),o.a.createElement(h.a,{key:g.current.options.accounts.join("-"),feed:g.current,store:L,selected:b,onSelectMedia:S,onClickMedia:P,autoFocusFirst:!0,disabled:t},(e,n)=>{const a=t?void 0:s.a.getPromo(e);return o.a.createElement(v.a,{media:e,promo:a,selected:n===b})})))}))}function k({selected:e,onSelect:t}){return o.a.createElement("div",{className:l.a.accountList},o.a.createElement("div",{className:l.a.accountScroller},i.b.list.map(n=>{const a="global-promo-account-"+n.id;return o.a.createElement("div",{key:n.id,className:e===n.id?l.a.accountSelected:l.a.accountButton,onClick:()=>t(n),role:"button","aria-labelledby":a},o.a.createElement("div",{className:l.a.profilePic},o.a.createElement("img",Object.assign({src:i.b.getProfilePicUrl(n),alt:n.username},E.e))),o.a.createElement("div",{id:a,className:l.a.username},o.a.createElement("span",null,"@"+n.username)))})))}},263:function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var a=n(0),o=n.n(a),r=n(129),l=n.n(r),i=n(47),c=n(3),s=n(64),u=n(9),m=n(8),d=n(147),p=n.n(d),b=n(19),_=n(35);const g=/^(User ID: ([0-9]+)\s*)?Access Token: ([a-zA-Z0-9]+)$/im;function f({isColumn:e,showPrompt:t,onConnectPersonal:n,onConnectBusiness:a}){const r=o.a.useRef(!1),[l,i]=o.a.useState(""),[c,s]=o.a.useState(""),m=l.length>145&&l.trimLeft().startsWith("EA"),d=o.a.useCallback(()=>{m?a(l,c):n(l)},[l,c,m]),f=o.a.createElement("div",{className:p.a.buttonContainer},o.a.createElement(u.a,{className:p.a.button,onClick:d,type:u.c.PRIMARY,disabled:0===l.length&&(0===c.length||!m)},"Connect"));return o.a.createElement("div",{className:e?p.a.column:p.a.row},t&&o.a.createElement("p",{className:p.a.prompt},"Or connect without a login (access token):"),o.a.createElement("div",{className:p.a.content},o.a.createElement("div",{className:p.a.bottom},o.a.createElement("input",{id:"manual-connect-access-token",type:"text",value:l,onChange:e=>{const t=e.target.value;if(r.current){r.current=!1;const e=g.exec(t);if(e)switch(e.length){case 2:return void i(e[1]);case 4:return s(e[2]),void i(e[3])}}i(t)},onPaste:e=>{r.current=!0,e.persist()},placeholder:"Instagram/Facebook access token"}),!m&&f)),m&&o.a.createElement("div",{className:p.a.content},o.a.createElement("label",{className:p.a.label,htmlFor:"manual-connect-user-id"},o.a.createElement("div",null,"This access token is for a ",o.a.createElement("strong",null,"Business")," account."," ","Please also enter the user ID:")),o.a.createElement("div",{className:p.a.bottom},o.a.createElement("input",{id:"manual-connect-user-id",type:"text",value:c,onChange:e=>{s(e.target.value)},placeholder:"Enter the user ID"}),m&&f)),o.a.createElement(_.a,{type:_.b.GREY,showIcon:!0},"Connecting a client's account? Avoid sharing passwords and use our"," ",o.a.createElement("a",{href:b.a.resources.tokenGenerator,target:"_blank"},"access token generator"),"."))}var h=n(22),v=n(48),E=n(194),y=n(56);function O({onConnect:e,beforeConnect:t,useColumns:n,showPrompt:a}){a=null==a||a,e=null!=e?e:y.b;const r=e=>{const t=h.a.getErrorReason(e);v.a.add("admin/connect/fail",()=>o.a.createElement(E.a,{message:t}))},d=e=>{i.a.State.connectSuccess&&t&&t(e)};return o.a.createElement("div",{className:n?l.a.vertical:l.a.horizontal},a&&o.a.createElement("p",{className:l.a.promptMsg},"Choose the type of account to connect:"),o.a.createElement("div",{className:l.a.types},o.a.createElement("div",{className:l.a.type},o.a.createElement(u.a,{type:u.c.PRIMARY,size:u.b.HERO,onClick:()=>i.a.openAuthWindow(c.a.Type.PERSONAL,s.a.ANIMATION_DELAY,d).then(e).catch(()=>{})},"Connect your Personal account"),o.a.createElement("div",{className:l.a.capabilities},o.a.createElement(C,null,"Connects directly through Instagram"),o.a.createElement(C,null,"Show posts from your account"))),o.a.createElement("div",{className:l.a.type},o.a.createElement(u.a,{type:u.c.SECONDARY,size:u.b.HERO,onClick:()=>i.a.openAuthWindow(c.a.Type.BUSINESS,s.a.ANIMATION_DELAY,d).then(e).catch(()=>{})},"Connect your Business account"),o.a.createElement("div",{className:l.a.capabilities},o.a.createElement(C,null,"Connects through your Facebook page"),o.a.createElement(C,null,"Show posts from your account"),o.a.createElement(C,null,"Show posts where you are tagged"),o.a.createElement(C,null,"Show posts with a specific hashtag from all across Instagram"),o.a.createElement("div",{className:l.a.businessLearnMore},o.a.createElement(m.a,{icon:"editor-help"}),o.a.createElement("a",{href:b.a.resources.businessAccounts,target:"_blank"},"Learn more about Business accounts"))))),o.a.createElement("div",{className:a?l.a.connectAccessToken:null},n&&o.a.createElement("p",{className:l.a.promptMsg},"Or connect without a login:"),o.a.createElement(f,{isColumn:n,showPrompt:a,onConnectPersonal:t=>i.a.manualConnectPersonal(t,s.a.ANIMATION_DELAY,d).then(e).catch(r),onConnectBusiness:(t,n)=>i.a.manualConnectBusiness(t,n,s.a.ANIMATION_DELAY,d).then(e).catch(r)})))}const C=e=>{var{children:t}=e,n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children"]);return o.a.createElement("div",Object.assign({className:l.a.capability},n),o.a.createElement(m.a,{icon:"yes"}),o.a.createElement("div",null,t))}},265:function(e,t,n){e.exports={root:"ModalPrompt__root",button:"ModalPrompt__button"}},266:function(e,t,n){e.exports={button:"ColorPicker__button","color-preview":"ColorPicker__color-preview",colorPreview:"ColorPicker__color-preview",popper:"ColorPicker__popper"}},270:function(e,t,n){e.exports={"pro-upsell":"SidebarUpsell__pro-upsell",proUpsell:"SidebarUpsell__pro-upsell",toggle:"SidebarUpsell__toggle","toggle-label":"SidebarUpsell__toggle-label",toggleLabel:"SidebarUpsell__toggle-label"}},275:function(e,t,n){"use strict";t.a={Sizes:{WIDE:1200,LARGE:1180,MEDIUM:960,SMALL:782,NARROW:600,ALL:[1200,1180,960,782,600]}}},311:function(e,t,n){e.exports={root:"ClearCacheButton__root layout__flex-row","doc-link":"ClearCacheButton__doc-link",docLink:"ClearCacheButton__doc-link"}},315:function(e,t,n){e.exports={root:"SaveButton__root","saving-overlay":"SaveButton__saving-overlay layout__fill-parent",savingOverlay:"SaveButton__saving-overlay layout__fill-parent","saving-animation":"SaveButton__saving-animation",savingAnimation:"SaveButton__saving-animation"}},320:function(e,t,n){e.exports={root:"Toaster__root layout__z-highest",container:"Toaster__container"}},322:function(e,t,n){e.exports={logo:"SpotlightLogo__logo","logo-image":"SpotlightLogo__logo-image",logoImage:"SpotlightLogo__logo-image"}},324:function(e,t,n){e.exports={"fake-pro":"AutoPromotionsSidebar__fake-pro",fakePro:"AutoPromotionsSidebar__fake-pro"}},326:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(320),l=n.n(r),i=n(48),c=n(209),s=n.n(c),u=n(8);function m({children:e,ttl:t,onExpired:n}){t=null!=t?t:i.a.NO_TTL;const[r,l]=o.a.useState(!1);let c=o.a.useRef(),m=o.a.useRef();const d=()=>{t!==i.a.NO_TTL&&(c.current=setTimeout(b,t))},p=()=>{clearTimeout(c.current)},b=()=>{l(!0),m.current=setTimeout(_,200)},_=()=>{n&&n()};Object(a.useEffect)(()=>(d(),()=>{p(),clearTimeout(m.current)}),[]);const g=r?s.a.rootFadingOut:s.a.root;return o.a.createElement("div",{className:g,onMouseOver:p,onMouseOut:d},o.a.createElement("div",{className:s.a.content},e),o.a.createElement("button",{className:s.a.dismissBtn,onClick:()=>{p(),b()}},o.a.createElement(u.a,{icon:"no-alt",className:s.a.dismissIcon})))}var d=n(7);t.a=Object(d.b)((function(){return o.a.createElement("div",{className:l.a.root},o.a.createElement("div",{className:l.a.container},i.a.getAll().map(e=>{var t,n;return o.a.createElement(m,{key:e.key,ttl:null!==(t=e.ttl)&&void 0!==t?t:i.a.DEFAULT_TTL,onExpired:(n=e.key,()=>{i.a.remove(n)})},o.a.createElement(e.component,null))})))}))},348:function(e,t,n){},35:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u}));var a,o=n(0),r=n.n(o),l=n(204),i=n.n(l),c=n(10),s=n(8);!function(e){e.SUCCESS="success",e.INFO="info",e.PRO_TIP="pro-tip",e.WARNING="warning",e.ERROR="error",e.GREY="grey"}(a||(a={}));const u=({children:e,type:t,showIcon:n,shake:a,isDismissible:o,onDismiss:l})=>{const[u,d]=r.a.useState(!1),p=Object(c.b)(i.a[t],a?i.a.shaking:null);return u?null:r.a.createElement("div",{className:p},n?r.a.createElement("div",null,r.a.createElement(s.a,{className:i.a.icon,icon:m(t)})):null,r.a.createElement("div",{className:i.a.content},e),o?r.a.createElement("button",{className:i.a.dismissBtn,onClick:()=>{o&&(d(!0),l&&l())}},r.a.createElement(s.a,{icon:"no"})):null)};function m(e){switch(e){case a.SUCCESS:return"yes-alt";case a.PRO_TIP:return"lightbulb";case a.ERROR:case a.WARNING:return"warning";case a.INFO:default:return"info"}}},37:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"f",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return f}));var a=n(0),o=n.n(a),r=n(192),l=n(327),i=n(328),c=n(18),s=n(19),u=(n(455),n(10));const m=({children:e,className:t,refClassName:n,isOpen:a,onBlur:m,placement:d,modifiers:b,useVisibility:_})=>{d=null!=d?d:"bottom-end",_=null!=_&&_;const g=o.a.useRef(),f=a||_,h=!a&&_,v=Object.assign({preventOverflow:{boundariesElement:document.getElementById(s.a.config.rootId),padding:5}},b),E=()=>{m()},y=e=>{switch(e.key){case"ArrowDown":break;case"Escape":E();break;default:return}e.preventDefault(),e.stopPropagation()};return Object(c.b)(g,E,[g]),Object(c.c)([g],E),o.a.createElement("div",{ref:g,className:Object(u.b)("menu__ref",n)},o.a.createElement(r.c,null,o.a.createElement(l.a,null,t=>e[0](t)),o.a.createElement(i.a,{placement:d,positionFixed:!0,modifiers:v},({ref:n,style:a,placement:r})=>f?o.a.createElement("div",{ref:n,className:"menu",style:p(a,h),"data-placement":r,onKeyDown:y},o.a.createElement("div",{className:"menu__container"+(t?" "+t:"")},e[1])):null)))};function d(e){var{children:t}=e,n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children"]);const[r,l]=Object(a.useState)(!1),i=()=>l(!0),c=()=>l(!1),s={openMenu:i,closeMenu:c};return o.a.createElement(d.Context.Provider,{value:s},o.a.createElement(m,Object.assign({isOpen:r,onBlur:c},n),({ref:e})=>t[0]({ref:e,openMenu:i}),t[1]))}function p(e,t){return Object.assign(Object.assign({},e),{opacity:1,pointerEvents:"all",visibility:t?"hidden":"visible"})}!function(e){e.Context=o.a.createContext({openMenu:null,closeMenu:null})}(d||(d={}));const b=({children:e,onClick:t,disabled:n,active:a})=>{const r=Object(u.a)("menu__item",{"--disabled":n,"--active":a});return o.a.createElement(d.Context.Consumer,null,({closeMenu:l})=>o.a.createElement("div",{className:r},o.a.createElement("button",{onClick:()=>{l&&l(),!a&&!n&&t&&t()}},e)))},_=({children:e})=>e,g=()=>o.a.createElement("div",{className:"menu__separator"}),f=({children:e})=>o.a.createElement("div",{className:"menu__static"},e)},378:function(e,t,n){},380:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(97),o=n(117),r=n(31);const l={factories:Object(a.b)({"router/history":()=>Object(o.a)(),"router/store":e=>r.a.useHistory(e.get("router/history"))}),run:e=>{e.get("router/store")}}},381:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(18);function o({when:e,is:t,isRoot:n,render:o}){const r=Object(a.h)().get(e);return r===t||!t&&!r||n&&!r?o():null}},382:function(e,t,n){e.exports={root:"ConnectAccountButton__root"}},384:function(e,t,n){e.exports={content:"ErrorToast__content"}},388:function(e,t,n){e.exports={"pro-pill":"SpoilerProLabel__pro-pill",proPill:"SpoilerProLabel__pro-pill"}},389:function(e,t,n){e.exports={pill:"ProPill__pill"}},391:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(348);const r=({children:e})=>o.a.createElement("div",{className:"button-group"},e)},393:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(10),l=(n(464),function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n});const i=e=>{var{className:t,unit:n}=e,a=l(e,["className","unit"]);const i=Object(r.b)("unit-input__field",t);return o.a.createElement("div",{className:"unit-input"},o.a.createElement("input",Object.assign({},a,{className:i})),o.a.createElement("div",{className:"unit-input__unit"},o.a.createElement("span",null,n)))}},398:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(64),l=n(136),i=n(25),c=n(131),s=n(19),u=n(7);t.a=Object(u.b)((function({isOpen:e,onClose:t,onSave:n}){return o.a.createElement(r.a,{title:"Global filters",isOpen:e,onClose:()=>{i.c.isDirty&&!confirm("You have unsaved changes. If you close the window now, your settings will not be saved. Click OK to close anyway.")||t()}},o.a.createElement(r.a.Content,null,o.a.createElement(c.a,{page:s.a.settings.pages.find(e=>"filters"===e.id)})),o.a.createElement(r.a.Footer,null,o.a.createElement(l.a,{disabled:!i.c.isDirty,isSaving:i.c.isSaving,onClick:()=>{i.c.save().then(()=>{n&&n()})}})))}))},399:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(10);n(573);const l=({name:e,className:t,disabled:n,value:a,onChange:l,options:i})=>{const c=e=>{!n&&e.target.checked&&l&&l(e.target.value)},s=Object(r.b)(Object(r.a)("radio-group",{"--disabled":n}),t);return o.a.createElement("div",{className:s},i.map((t,n)=>o.a.createElement("label",{className:"radio-group__option",key:n},o.a.createElement("input",{type:"radio",name:e,value:t.value,checked:a===t.value,onChange:c}),o.a.createElement("span",null,t.label))))}},400:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(574);const r=({size:e})=>{const t=(e=null!=e?e:24)+"px",n={width:t,height:t,boxShadow:`${.25*e+"px"} 0 0 ${.375*e+"px"} #999 inset`};return o.a.createElement("span",{className:"loading-spinner",style:n})}},401:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(3),l=n(89),i=n(103),c=n(47),s=n(7),u=n(19);t.a=Object(s.b)((function({}){Object(a.useEffect)(()=>{const e=e=>{const a=e.detail.account;n||m||a.type!==r.a.Type.PERSONAL||a.customBio.length||a.customProfilePicUrl.length||(t(a),s(!0))};return document.addEventListener(c.a.ACCOUNT_CONNECTED_EVENT,e),()=>document.removeEventListener(c.a.ACCOUNT_CONNECTED_EVENT,e)},[]);const[e,t]=o.a.useState(null),[n,s]=o.a.useState(!1),[m,d]=o.a.useState(!1),p=()=>{c.a.State.connectedId=null};return o.a.createElement(o.a.Fragment,null,o.a.createElement(l.a,{title:"You've successfully connected your account!",buttons:["Yes","No, maybe later"],isOpen:n,onAccept:()=>{s(!1),d(!0)},onCancel:()=>{s(!1),p()}},o.a.createElement("p",null,"One more thing ..."),o.a.createElement("p",null,"Instagram doesn't provide the profile photo and bio text for Personal accounts."," ","Would you like to set a custom photo and a custom bio in Spotlight to match your Instagram profile?"),o.a.createElement("p",null,o.a.createElement("a",{href:u.a.resources.customPersonalInfoUrl,target:"_blank"},"What's this about?"))),o.a.createElement(i.a,{isOpen:m,onClose:()=>{d(!1),p()},account:e}))}))},402:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(230),l=n.n(r),i=n(589),c=n(412),s=n(31),u=n(66);function m({notification:e}){const t=o.a.useRef();return Object(a.useEffect)(()=>{if(!t.current)return;const e=t.current.getElementsByTagName("a");for(let t=0;t<e.length;++t){const n=e.item(t);if("true"===n.getAttribute("data-sli-link"))continue;const a=n.getAttribute("href");if("string"!=typeof a||!a.startsWith("app://"))continue;const o=Object(u.parse)(a.substr("app://".length)),r=s.a.at(o),l=s.a.fullUrl(o);n.setAttribute("href",l),n.setAttribute("data-sli-link","true"),n.addEventListener("click",e=>{s.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()})}},[t.current]),o.a.createElement("article",{className:l.a.root},e.title&&e.title.length&&o.a.createElement("header",{className:l.a.title},e.title),o.a.createElement("main",{ref:t,className:l.a.content,dangerouslySetInnerHTML:{__html:e.content}}),e.date&&o.a.createElement("footer",{className:l.a.date},Object(i.a)(Object(c.a)(e.date),{addSuffix:!0})))}},403:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(404),l=n.n(r),i=n(10);function c(){return o.a.createElement("div",{className:Object(i.b)(l.a.modalLayer,"spotlight-modal-target")})}},404:function(e,t,n){e.exports={"modal-layer":"ModalLayer__modal-layer",modalLayer:"ModalLayer__modal-layer"}},41:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(1),r=n(6),l=n(22),i=n(19),c=function(e,t,n,a){var o,r=arguments.length,l=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,a);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(l=(r<3?o(l):r>3?o(t,n,l):o(t,n))||l);return r>3&&l&&Object.defineProperty(t,n,l),l};!function(e){class t{constructor(e={}){t.setFromObject(this,null!=e?e:{})}static setFromObject(e,t={}){var n,a,o,l,i;e.id=null!==(n=t.id)&&void 0!==n?n:null,e.name=null!==(a=t.name)&&void 0!==a?a:"",e.usages=null!==(o=t.usages)&&void 0!==o?o:[],e.options=new r.a.Options(null!==(l=e.options)&&void 0!==l?l:{}),r.a.Options.setFromObject(e.options,null!==(i=t.options)&&void 0!==i?i:{})}get label(){return t.getLabel(this.name)}static getLabel(e){return e.length>0?e:this.getDefaultName()}static getDefaultName(){return"(no name)"}}function n(n){if("object"!=typeof n||!Array.isArray(n.data))throw"Spotlight encountered a problem trying to load your feeds. Kindly contact customer support for assistance.";e.list.replace(n.data.map(e=>new t(e)))}c([o.o],t.prototype,"id",void 0),c([o.o],t.prototype,"name",void 0),c([o.o],t.prototype,"usages",void 0),c([o.o],t.prototype,"options",void 0),c([o.h],t.prototype,"label",null),e.SavedFeed=t,e.list=Object(o.o)([]),e.loadFeeds=()=>l.a.getFeeds().then(n).catch(e=>{throw l.a.getErrorReason(e)}),e.getById=t=>(t="string"==typeof t?parseInt(t):t)?e.list.find(e=>e.id==t):void 0,e.hasFeeds=()=>e.list.length>0,e.create=function(n,a){const o=new t({id:null,name:s(n),options:new r.a.Options(a)});return e.list.push(o),o},e.saveFeed=function(n){return i.a.restApi.saveFeed(n).then(a=>{const o=new t(a.data.feed);if(null===n.id)e.list.push(o);else{const t=e.list.findIndex(e=>e.id===n.id);e.list[t]=o}return o})},e.deleteFeed=function(t){const n=null!==t.id?e.list.findIndex(e=>e.id===t.id):e.list.findIndex(e=>e===t);return n>=0&&e.list.splice(n,1),null!==t.id?i.a.restApi.deleteFeed(t.id).catch(e=>{}):new Promise(e=>e())};const a=new RegExp("([\\w\\s]+)\\s?\\((\\d+)\\)?");function s(t){const n=u(t)[0],a=e.list.map(e=>u(e.name)).filter(e=>e[0]===n),o=a.reduce((e,t)=>Math.max(e,t[1]),1);return a.length>0?`${n} (${o+1})`:t.trim()}function u(e){e=e.trim();const t=a.exec(e);return t?[t[1].trim(),parseInt(t[2])]:[e,0]}}(a||(a={}))},437:function(e,t,n){},454:function(e,t,n){},455:function(e,t,n){},456:function(e,t,n){},464:function(e,t,n){},47:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(3),r=n(46),l=n(19),i=n(1),c=n(590),s=n(588),u=n(412);!function(e){let t=null,n=null;e.State=window.SliAccountManagerState=Object(i.o)({accessToken:null,connectSuccess:!1,connectedId:null});const a=Object(c.a)(new Date,{days:7});function m(t,n,a){a&&a(e.State.connectedId),setTimeout(()=>o.b.loadAccounts().then(()=>{const t=o.b.getById(e.State.connectedId),a=new p(e.ACCOUNT_CONNECTED_EVENT,t);document.dispatchEvent(a),n(e.State.connectedId)}),t)}function d(e){return e.type===o.a.Type.BUSINESS&&e.accessToken&&e.accessToken.expiry&&Object(s.a)(a,Object(u.a)(e.accessToken.expiry))}e.manualConnectPersonal=function(t,n=0,a){return new Promise((o,r)=>{e.State.connectSuccess=!1,l.a.restApi.connectPersonal(t).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(n,o,a)}).catch(r)})},e.manualConnectBusiness=function(t,n,a=0,o){return new Promise((r,i)=>{e.State.connectSuccess=!1,l.a.restApi.connectBusiness(t,n).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(a,r,o)}).catch(i)})},e.openAuthWindow=function(a,i=0,c){return new Promise((s,u)=>{if(e.State.connectedId=null,null==t||t.closed){const e=Object(r.a)(700,800),n=a===o.a.Type.PERSONAL?l.a.restApi.config.personalAuthUrl:l.a.restApi.config.businessAuthUrl;t=Object(r.c)(n,"_blank",Object.assign({dependent:"yes",resizable:"yes",toolbar:"no",location:"no",scrollbars:"no"},e))}else t.focus();null==t||t.closed||(n=setInterval(()=>{t&&!t.closed||(clearInterval(n),null===e.State.connectedId?u&&u():m(i,s,c))},500))})},e.updateAccount=function(e){return l.a.restApi.updateAccount(e)},e.deleteAccount=function(e){return l.a.restApi.deleteAccount(e).then(o.b.loadFromResponse)},e.getExpiringTokenAccounts=function(){return o.b.list.filter(d)},e.isTokenExpiring=d,e.ACCOUNT_CONNECTED_EVENT="sli/account/connected";class p extends CustomEvent{constructor(e,t){super(e,{detail:{account:t}})}}e.AccountConnectedEvent=p}(a||(a={}))},48:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(1),r=n(96),l=n(161);!function(e){const t=o.o.array([]);e.DEFAULT_TTL=5e3,e.NO_TTL=0,e.getAll=()=>t,e.add=Object(o.f)((n,a,o)=>{e.remove(n),o=Math.max(null!=o?o:e.DEFAULT_TTL,e.NO_TTL),t.push({key:n,component:a,ttl:o})}),e.remove=Object(o.f)(e=>{t.replace(t.filter(t=>t.key!==e))}),e.message=function(e){return Object(r.a)(l.a,{message:e})}}(a||(a={}))},571:function(e,t,n){},573:function(e,t,n){},574:function(e,t,n){},64:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(42),l=n.n(r),i=n(139),c=n.n(i),s=n(10),u=n(18),m=n(9),d=n(8);function p({children:e,className:t,isOpen:n,icon:r,title:i,width:m,height:d,onClose:b,allowShadeClose:_,focusChild:g,portalTo:f}){const h=o.a.useRef(),[v]=Object(u.a)(n,!1,p.ANIMATION_DELAY);if(Object(u.d)("keydown",e=>{"Escape"===e.key&&(b&&b(),e.preventDefault(),e.stopPropagation())},[],[b]),Object(a.useEffect)(()=>{h&&h.current&&n&&(null!=g?g:h).current.focus()},[]),!v)return null;const E={width:m=null!=m?m:600,height:d},y=Object(s.b)(c.a.modal,n?c.a.opening:c.a.closing,t,"wp-core-ui-override");_=null==_||_;const O=o.a.createElement("div",{className:y},o.a.createElement("div",{className:c.a.shade,tabIndex:-1,onClick:()=>{_&&b&&b()}}),o.a.createElement("div",{ref:h,className:c.a.container,style:E,tabIndex:-1},i?o.a.createElement(p.Header,null,o.a.createElement("h1",null,o.a.createElement(p.Icon,{icon:r}),i),o.a.createElement(p.CloseBtn,{onClick:b})):null,e));let C=f;if(void 0===C){const e=document.getElementsByClassName("spotlight-modal-target");C=0===e.length?document.body:e.item(0)}return l.a.createPortal(O,C)}!function(e){e.ANIMATION_DELAY=120,e.CloseBtn=({onClick:e})=>o.a.createElement(m.a,{className:c.a.closeBtn,type:m.c.NONE,onClick:e,tooltip:"Close"},o.a.createElement(d.a,{icon:"no-alt"})),e.Icon=({icon:e})=>e?o.a.createElement(d.a,{icon:e,className:c.a.icon}):null,e.Header=({children:e})=>o.a.createElement("div",{className:c.a.header},e),e.Content=({children:e})=>o.a.createElement("div",{className:c.a.scroller},o.a.createElement("div",{className:c.a.content},e)),e.Footer=({children:e})=>o.a.createElement("div",{className:c.a.footer},e)}(p||(p={}))},74:function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(386),l=n(243),i=n(385),c=n(205),s=n.n(c),u=n(10);const m=(e={})=>({option:(e,t)=>Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"24px"}),menu:(e,t)=>Object.assign(Object.assign({},e),{margin:"6px 0",boxShadow:"0 2px 8px "+s.a.shadowColor,overflow:"hidden"}),menuList:(e,t)=>({padding:"0px"}),control:(e,t)=>{let n=Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"2",minHeight:"40px"});return t.isFocused&&(n.borderColor=s.a.primaryColor,n.boxShadow="0 0 0 1px "+s.a.primaryColor),n},valueContainer:(e,t)=>Object.assign(Object.assign({},e),{paddingTop:0,paddingBottom:0,paddingRight:0}),container:(t,n)=>Object.assign(Object.assign({},t),{width:e.width||"100%"}),multiValue:(e,t)=>Object.assign(Object.assign({},e),{padding:"0 6px"}),input:(e,t)=>Object.assign(Object.assign({},e),{outline:"0 transparent !important",border:"0 transparent !important",boxShadow:"0 0 0 transparent !important"}),indicatorSeparator:(e,t)=>Object.assign(Object.assign({},e),{margin:"0",backgroundColor:"transparent"})}),d=o.a.forwardRef((e,t)=>{var n;const a=(null!==(n=e.options)&&void 0!==n?n:[]).find(t=>t.value===e.value);e=Object.assign(Object.assign({},e),{id:void 0,className:Object(u.b)("react-select",e.className),classNamePrefix:"react-select",inputId:e.id,menuPosition:"fixed"});const c=m(e),d=e.isCreatable?l.a:e.async?i.a:r.a;return o.a.createElement(d,Object.assign({},e,{ref:t,isSearchable:e.isCreatable,value:a,styles:c,theme:e=>Object.assign(Object.assign({},e),{borderRadius:3,colors:Object.assign(Object.assign({},e.colors),{primary:s.a.primaryColor,primary25:s.a.washedColor})}),menuPlacement:"auto",menuShouldScrollIntoView:!0}))})},80:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(10),l=(n(454),n(8)),i=n(18);const c=o.a.forwardRef((function({label:e,className:t,isOpen:n,defaultOpen:a,showIcon:c,disabled:s,stealth:u,fitted:m,scrollIntoView:d,hideOnly:p,onClick:b,children:_},g){p=null!=p&&p,c=null==c||c,s=null!=s&&s,d=null!=d&&d;const[f,h]=o.a.useState(!!a),v=void 0!==n;v||(n=f);const E=o.a.useRef(),y=Object(i.k)(E),O=()=>{s||(!n&&d&&y(),v||h(!n),b&&b())},C=n&&void 0===b&&!c,N=C?void 0:0,w=C?void 0:"button",A=Object(r.a)("spoiler",{"--open":n,"--disabled":s,"--fitted":m,"--stealth":u,"--static":C}),k=Object(r.b)(A,t),T=n?"arrow-up-alt2":"arrow-down-alt2",S=Array.isArray(e)?e.map((e,t)=>o.a.createElement(o.a.Fragment,{key:t},e)):"string"==typeof e?o.a.createElement("span",null,e):e;return o.a.createElement("div",{ref:Object(r.d)(E,g),className:k},o.a.createElement("div",{className:"spoiler__header",onClick:O,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||O()},role:w,tabIndex:N},o.a.createElement("div",{className:"spoiler__label"},S),c&&o.a.createElement(l.a,{icon:T,className:"spoiler__icon"})),(n||p)&&o.a.createElement("div",{className:"spoiler__content"},_))}))},89:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(265),l=n.n(r),i=n(64),c=n(9);function s({children:e,title:t,buttons:n,onAccept:a,onCancel:r,isOpen:s,okDisabled:u,cancelDisabled:m}){n=null!=n?n:["OK","Cancel"];const d=()=>r&&r();return o.a.createElement(i.a,{isOpen:s,title:t,onClose:d,className:l.a.root},o.a.createElement(i.a.Content,null,"string"==typeof e?o.a.createElement("p",null,e):e),o.a.createElement(i.a.Footer,null,o.a.createElement(c.a,{className:l.a.button,type:c.c.SECONDARY,onClick:d,disabled:m},n[1]),o.a.createElement(c.a,{className:l.a.button,type:c.c.PRIMARY,onClick:()=>a&&a(),disabled:u},n[0])))}},9:function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return u}));var a,o,r=n(0),l=n.n(r),i=n(10),c=n(242),s=(n(348),n(4));!function(e){e[e.PRIMARY=0]="PRIMARY",e[e.SECONDARY=1]="SECONDARY",e[e.TOGGLE=2]="TOGGLE",e[e.LINK=3]="LINK",e[e.PILL=4]="PILL",e[e.DANGER=5]="DANGER",e[e.DANGER_LINK=6]="DANGER_LINK",e[e.DANGER_PILL=7]="DANGER_PILL",e[e.NONE=8]="NONE"}(a||(a={})),function(e){e[e.SMALL=0]="SMALL",e[e.NORMAL=1]="NORMAL",e[e.LARGE=2]="LARGE",e[e.HERO=3]="HERO"}(o||(o={}));const u=l.a.forwardRef((e,t)=>{let{children:n,className:r,type:u,size:m,active:d,tooltip:p,tooltipPlacement:b,onClick:_,linkTo:g}=e,f=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children","className","type","size","active","tooltip","tooltipPlacement","onClick","linkTo"]);u=null!=u?u:a.SECONDARY,m=null!=m?m:o.NORMAL,b=null!=b?b:"bottom";const[h,v]=l.a.useState(!1),E=()=>v(!0),y=()=>v(!1),O=Object(i.b)(r,u!==a.NONE?"button":null,u===a.PRIMARY?"button-primary":null,u===a.SECONDARY?"button-secondary":null,u===a.LINK?"button-secondary button-tertiary":null,u===a.PILL?"button-secondary button-tertiary button-pill":null,u===a.TOGGLE?"button-toggle":null,u===a.TOGGLE&&d?"button-primary button-active":null,u!==a.TOGGLE||d?null:"button-secondary",u===a.DANGER?"button-secondary button-danger":null,u===a.DANGER_LINK?"button-tertiary button-danger":null,u===a.DANGER_PILL?"button-tertiary button-danger button-danger-pill":null,m===o.SMALL?"button-small":null,m===o.LARGE?"button-large":null,m===o.HERO?"button-hero":null),C=e=>{_&&_(e)};let N="button";if("string"==typeof g?(N="a",f.href=g):f.type="button",f.tabIndex=0,!p)return l.a.createElement(N,Object.assign({ref:t,className:O,onClick:C},f),n);const w="string"==typeof p,A="btn-tooltip-"+Object(s.p)(),k=w?p:l.a.createElement(p,{id:A});return l.a.createElement(c.a,{visible:h&&!e.disabled,placement:b,delay:300},({ref:e})=>l.a.createElement(N,Object.assign({ref:t?Object(i.d)(e,t):e,className:O,onClick:C,onMouseEnter:E,onMouseLeave:y},f),n),k)})},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(389),l=n.n(r),i=n(19),c=n(10);const s=({className:e,children:t})=>{const n=o.a.useCallback(()=>{window.open(i.a.resources.pricingUrl,"_blank")},[]);return o.a.createElement("span",{className:Object(c.b)(l.a.pill,e),onClick:n,tabIndex:-1},"PRO",t)}}}]);
1
+ (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[2],{114:function(e,t,a){e.exports={list:"AutoPromotionsList__list","fake-pro-list":"AutoPromotionsList__fake-pro-list AutoPromotionsList__list",fakeProList:"AutoPromotionsList__fake-pro-list AutoPromotionsList__list",row:"AutoPromotionsList__row","row-selected":"AutoPromotionsList__row-selected AutoPromotionsList__row",rowSelected:"AutoPromotionsList__row-selected AutoPromotionsList__row","row-box":"AutoPromotionsList__row-box theme__panel",rowBox:"AutoPromotionsList__row-box theme__panel","row-hashtags":"AutoPromotionsList__row-hashtags",rowHashtags:"AutoPromotionsList__row-hashtags","row-summary":"AutoPromotionsList__row-summary",rowSummary:"AutoPromotionsList__row-summary","row-drag-handle":"AutoPromotionsList__row-drag-handle",rowDragHandle:"AutoPromotionsList__row-drag-handle","row-actions":"AutoPromotionsList__row-actions",rowActions:"AutoPromotionsList__row-actions","add-button-row":"AutoPromotionsList__add-button-row",addButtonRow:"AutoPromotionsList__add-button-row","no-hashtags-message":"AutoPromotionsList__no-hashtags-message",noHashtagsMessage:"AutoPromotionsList__no-hashtags-message","row-faded-text":"AutoPromotionsList__row-faded-text",rowFadedText:"AutoPromotionsList__row-faded-text","no-promo-message":"AutoPromotionsList__no-promo-message AutoPromotionsList__row-faded-text",noPromoMessage:"AutoPromotionsList__no-promo-message AutoPromotionsList__row-faded-text","summary-italics":"AutoPromotionsList__summary-italics",summaryItalics:"AutoPromotionsList__summary-italics","summary-bold":"AutoPromotionsList__summary-bold",summaryBold:"AutoPromotionsList__summary-bold"}},117:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),o=a.n(n),r=a(185),l=a.n(r),i=a(8),c=a(174),s=a(279),u=a.n(s),m=a(151),d=a(261),p=a(77);function b(){return o.a.createElement("div",{className:u.a.proUpsell},o.a.createElement(d.a.Consumer,null,e=>e&&o.a.createElement("label",{className:u.a.toggle},o.a.createElement("span",{className:u.a.toggleLabel},"Show PRO features"),o.a.createElement(p.a,{value:e.showFakeOptions,onChange:e.onToggleFakeOptions}))),o.a.createElement(m.a,{url:"https://spotlightwp.com/pricing/?utm_source=sl_plugin&utm_medium=sl_plugin_upgrade&utm_campaign=sl_plugin_upgrade_editor"}))}var _,g=a(15);function f({content:e,sidebar:t,primary:a,current:r,useDefaults:i}){const[s,u]=Object(n.useState)(a),m=()=>u(p?"content":"sidebar"),d=()=>u(p?"sidebar":"content"),p="content"===(a=null!=a?a:"content"),_="sidebar"===a,h="content"===(r=i?s:r),v="sidebar"===r,E=p?l.a.layoutPrimaryContent:l.a.layoutPrimarySidebar;return o.a.createElement(c.a,{breakpoints:[f.BREAKPOINT],render:a=>{const n=a<=f.BREAKPOINT;return o.a.createElement("div",{className:E},e&&(h||!n)&&o.a.createElement("div",{className:l.a.content},i&&o.a.createElement(f.Navigation,{align:p?"right":"left",text:!p&&o.a.createElement("span",null,"Go back"),icon:p?"admin-generic":"arrow-left",onClick:p?d:m}),"function"==typeof e?e(n):null!=e?e:null),t&&(v||!n)&&o.a.createElement("div",{className:l.a.sidebar},i&&o.a.createElement(f.Navigation,{align:_?"right":"left",text:!_&&o.a.createElement("span",null,"Go back"),icon:_?"admin-generic":"arrow-left",onClick:_?d:m}),!g.a.isPro&&o.a.createElement(b,null),"function"==typeof t?t(n):null!=t?t:null))}})}(_=f||(f={})).BREAKPOINT=968,_.Navigation=function({icon:e,text:t,align:a,onClick:n}){return t=null!=t?t:"Go back",e=null!=e?e:"arrow-left-alt",a=null!=a?a:"left",o.a.createElement("div",{className:"right"===a?l.a.navigationRight:l.a.navigationLeft},o.a.createElement("a",{className:l.a.navLink,onClick:n},e&&o.a.createElement(i.a,{icon:e}),o.a.createElement("span",null,null!=t?t:"")))}},119:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),r=a(10),l=a(9),i=(a(471),a(8)),c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a};function s(e){var{className:t,children:a,isTransitioning:n}=e,l=c(e,["className","children","isTransitioning"]);const i=Object(r.a)("onboarding",{"--transitioning":n});return o.a.createElement("div",Object.assign({className:Object(r.b)(i,t)},l),Array.isArray(a)?a.map((e,t)=>o.a.createElement("div",{key:t},e)):a)}!function(e){e.TRANSITION_DURATION=200,e.Thin=e=>{var{className:t,children:a}=e,n=c(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__thin",t)},n),a)},e.HelpMsg=e=>{var{className:t,children:a}=e,n=c(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__help-msg",t)},n),a)},e.ProTip=({children:t})=>o.a.createElement(e.HelpMsg,null,o.a.createElement("div",{className:"onboarding__pro-tip"},o.a.createElement("span",null,o.a.createElement(i.a,{icon:"lightbulb"}),o.a.createElement("strong",null,"Pro tip!")),t)),e.StepList=e=>{var{className:t,children:a}=e,n=c(e,["className","children"]);return o.a.createElement("ul",Object.assign({className:Object(r.b)("onboarding__steps",t)},n),a)},e.Step=e=>{var{isDone:t,num:a,className:n,children:l}=e,i=c(e,["isDone","num","className","children"]);return o.a.createElement("li",Object.assign({className:Object(r.b)(t?"onboarding__done":null,n)},i),o.a.createElement("strong",null,"Step ",a,":")," ",l)},e.HeroButton=e=>{var t,{className:a,children:n}=e,i=c(e,["className","children"]);return o.a.createElement(l.a,Object.assign({type:null!==(t=i.type)&&void 0!==t?t:l.c.PRIMARY,size:l.b.HERO,className:Object(r.b)("onboarding__hero-button",a)},i),n)}}(s||(s={}))},122:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),r=a(211),l=a.n(r);function i({children:e,padded:t,disabled:a}){return o.a.createElement("div",{className:a?l.a.disabled:l.a.sidebar},o.a.createElement("div",{className:t?l.a.paddedContent:l.a.content},null!=e?e:null))}!function(e){e.padded=l.a.padded}(i||(i={}))},126:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),r=a(234),l=a.n(r),i=a(8),c=a(251);function s({maxWidth:e,children:t}){e=null!=e?e:300;const[a,n]=o.a.useState(!1),r=()=>n(!0),s=()=>n(!1),u={content:l.a.tooltipContent,container:l.a.tooltipContainer};return o.a.createElement("div",{className:l.a.root},o.a.createElement(c.a,{visible:a,theme:u},({ref:e})=>o.a.createElement("span",{ref:e,className:l.a.icon,style:{opacity:a?1:.7},onMouseEnter:r,onMouseLeave:s},o.a.createElement(i.a,{icon:"info"})),o.a.createElement("div",{style:{maxWidth:e+"px"}},t)))}},127:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),r=a(395),l=a.n(r),i=a(9),c=a(8),s=a(272),u=a(63);function m({isOpen:e,onClose:t,onConnect:a,beforeConnect:n}){return o.a.createElement(u.a,{title:"Connect an Instagram account",isOpen:e,width:650,onClose:t},o.a.createElement(u.a.Content,null,o.a.createElement(s.a,{onConnect:a,beforeConnect:e=>{n&&n(e),t()}})))}function d({children:e,onConnect:t,beforeConnect:a}){const[n,r]=o.a.useState(!1);return o.a.createElement(o.a.Fragment,null,o.a.createElement(i.a,{className:l.a.root,size:i.b.HERO,type:i.c.SECONDARY,onClick:()=>r(!0)},o.a.createElement(c.a,{icon:"instagram"}),null!=e?e:o.a.createElement("span",null,"Connect more Instagram accounts")),o.a.createElement(m,{isOpen:n,onClose:()=>{r(!1)},onConnect:t,beforeConnect:a}))}},130:function(e,t,a){"use strict";t.a=wp},132:function(e,t,a){e.exports={base:"ConnectAccount__base",horizontal:"ConnectAccount__horizontal ConnectAccount__base","prompt-msg":"ConnectAccount__prompt-msg",promptMsg:"ConnectAccount__prompt-msg",types:"ConnectAccount__types",vertical:"ConnectAccount__vertical ConnectAccount__base",type:"ConnectAccount__type",capabilities:"ConnectAccount__capabilities",capability:"ConnectAccount__capability","business-learn-more":"ConnectAccount__business-learn-more",businessLearnMore:"ConnectAccount__business-learn-more","connect-access-token":"ConnectAccount__connect-access-token",connectAccessToken:"ConnectAccount__connect-access-token","types-rows":"ConnectAccount__types-rows",typesRows:"ConnectAccount__types-rows"}},134:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),r=a(10),l=a(155),i=a.n(l);function c({cols:e,rows:t,footerCols:a,styleMap:n}){return n=null!=n?n:{cols:{},cells:{}},o.a.createElement("table",{className:i.a.table},o.a.createElement("thead",{className:i.a.header},o.a.createElement(u,{cols:e,styleMap:n})),o.a.createElement("tbody",null,t.map((t,a)=>o.a.createElement(s,{key:a,idx:a,row:t,cols:e,styleMap:n}))),a&&o.a.createElement("tfoot",{className:i.a.footer},o.a.createElement(u,{cols:e,styleMap:n})))}function s({idx:e,row:t,cols:a,styleMap:n}){return o.a.createElement("tr",{className:i.a.row},a.map(a=>o.a.createElement("td",{key:a.id,className:Object(r.b)(i.a.cell,m(a),n.cells[a.id])},a.render(t,e))))}function u({cols:e,styleMap:t}){return o.a.createElement("tr",null,e.map(e=>{const a=Object(r.b)(i.a.colHeading,m(e),t.cols[e.id]);return o.a.createElement("th",{key:e.id,className:a},e.label)}))}function m(e){return"center"===e.align?i.a.alignCenter:"right"===e.align?i.a.alignRight:i.a.alignLeft}},135:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),r=a(130),l=a(4);const i=({id:e,value:t,title:a,button:n,mediaType:i,multiple:c,children:s,onOpen:u,onClose:m,onSelect:d})=>{e=null!=e?e:"wp-media-"+Object(l.q)(),i=null!=i?i:"image",n=null!=n?n:"Select";const p=o.a.useRef();p.current||(p.current=r.a.media({id:e,title:a,library:{type:i},button:{text:n},multiple:c}));const b=()=>{const e=p.current.state().get("selection").first();d&&d(e)};return m&&p.current.on("close",m),p.current.on("open",()=>{if(t){const e="object"==typeof t?t:r.a.media.attachment(t);e.fetch(),p.current.state().get("selection").add(e?[e]:[])}u&&u()}),p.current.on("insert",b),p.current.on("select",b),s({open:()=>p.current.open()})}},136:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n);const r=()=>o.a.createElement("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-ellipsis",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},o.a.createElement("path",{d:"M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))},138:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(324),o=a.n(n),r=a(0),l=a.n(r),i=a(9),c=a(10);function s({className:e,content:t,tooltip:a,onClick:n,disabled:r,isSaving:s}){return t=null!=t?t:e=>e?"Saving ...":"Save",a=null!=a?a:"Save",l.a.createElement(i.a,{className:Object(c.b)(o.a.root,e),type:i.c.PRIMARY,size:i.b.LARGE,tooltip:a,onClick:()=>n&&n(),disabled:r},s&&l.a.createElement("div",{className:o.a.savingOverlay}),t(s))}},140:function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),o=a.n(n),r=a(157),l=a.n(r),i=a(58),c=a(10),s=a(98),u=a(178);function m({children:e}){return o.a.createElement("div",{className:l.a.root},o.a.createElement(m.Item,null,o.a.createElement(u.a,null)),o.a.createElement(m.Chevron,null),o.a.createElement("div",{className:l.a.leftContainer},e[0]),e[1]&&o.a.createElement("div",{className:l.a.rightContainer},e[1]))}!function(e){e.Item=({children:e})=>o.a.createElement("div",{className:l.a.item},e),e.Link=({linkTo:t,onClick:a,isCurrent:n,isDisabled:r,children:s})=>{const u=Object(c.c)({[l.a.link]:!0,[l.a.current]:n,[l.a.disabled]:r}),m=e=>{"Enter"!==e.key&&" "!==e.key||e.currentTarget.click()},d=r?-1:0;return o.a.createElement(e.Item,null,t?o.a.createElement(i.a,{to:t,className:u,role:"button",onKeyPress:m,tabIndex:d},s):o.a.createElement("div",{className:u,role:"button",onClick:()=>!r&&a&&a(),onKeyPress:m,tabIndex:d},s))},e.ProPill=()=>o.a.createElement("div",{className:l.a.proPill},o.a.createElement(s.a,null)),e.Chevron=()=>o.a.createElement("div",{className:l.a.chevron},o.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},o.a.createElement("path",{d:"M0 0 L100 50 L0 100",fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}(m||(m={}))},141:function(e,t,a){e.exports={modal:"Modal__modal layout__z-higher",shade:"Modal__shade layout__fill-parent",container:"Modal__container",opening:"Modal__opening","modal-open-animation":"Modal__modal-open-animation",modalOpenAnimation:"Modal__modal-open-animation",closing:"Modal__closing","modal-close-animation":"Modal__modal-close-animation",modalCloseAnimation:"Modal__modal-close-animation",content:"Modal__content",header:"Modal__header",icon:"Modal__icon","close-btn":"Modal__close-btn",closeBtn:"Modal__close-btn",scroller:"Modal__scroller",footer:"Modal__footer"}},142:function(e,t,a){e.exports={content:"GlobalPromotionsTab__content","mobile-instructions":"GlobalPromotionsTab__mobile-instructions",mobileInstructions:"GlobalPromotionsTab__mobile-instructions",tutorial:"GlobalPromotionsTab__tutorial","tutorial-box":"GlobalPromotionsTab__tutorial-box",tutorialBox:"GlobalPromotionsTab__tutorial-box","tutorial-text":"GlobalPromotionsTab__tutorial-text",tutorialText:"GlobalPromotionsTab__tutorial-text","account-list":"GlobalPromotionsTab__account-list",accountList:"GlobalPromotionsTab__account-list","account-scroller":"GlobalPromotionsTab__account-scroller",accountScroller:"GlobalPromotionsTab__account-scroller","account-button":"GlobalPromotionsTab__account-button",accountButton:"GlobalPromotionsTab__account-button","account-selected":"GlobalPromotionsTab__account-selected GlobalPromotionsTab__account-button",accountSelected:"GlobalPromotionsTab__account-selected GlobalPromotionsTab__account-button","profile-pic":"GlobalPromotionsTab__profile-pic",profilePic:"GlobalPromotionsTab__profile-pic",username:"GlobalPromotionsTab__username","fake-pro":"GlobalPromotionsTab__fake-pro",fakePro:"GlobalPromotionsTab__fake-pro"}},147:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),r=a(148),l=a(64);const i=e=>{var t;const a="string"==typeof e.value?[e.value]:null!==(t=e.value)&&void 0!==t?t:[],n=Object.assign(Object.assign({},e),{value:a.map(e=>Object(l.a)(e,"#")),sanitize:l.b});return o.a.createElement(r.a,Object.assign({},n))}},148:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),r=a(252),l=a(33),i=a(72);const c={DropdownIndicator:null},s=e=>({label:e,value:e}),u=({id:e,value:t,onChange:a,sanitize:u,autoFocus:m,message:d})=>{const[p,b]=o.a.useState(""),[_,g]=o.a.useState(-1),[f,h]=o.a.useState();Object(n.useEffect)(()=>{h(d)},[d]);const v=(t=Array.isArray(t)?t:[]).map(e=>s(e)),E=()=>{p.length&&(b(""),y([...v,s(p)]))},y=e=>{if(!a)return;let t=-1;e=e?e.map(e=>e&&u?u(e.value):e.value).filter((e,a,n)=>{const o=n.indexOf(e);return o!==a?(t=o,!1):!!e}):[],g(t),-1===t&&a(e)},O=Object(i.b)();return o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{inputId:e,className:"react-select",classNamePrefix:"react-select",components:c,inputValue:p,isClearable:!1,isMulti:!0,menuIsOpen:!1,onChange:y,onInputChange:e=>{b(e)},onKeyDown:e=>{if(p)switch(e.key){case",":case"Enter":case"Tab":E(),e.preventDefault()}},onBlur:E,placeholder:"Type something and press enter...",value:v,autoFocus:m,styles:O}),_<0||0===v.length?null:o.a.createElement(l.a,{type:l.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},o.a.createElement("code",null,v[_].label)," is already in the list"),f?o.a.createElement(l.a,{type:l.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},f):null)};var m=a(7);const d=Object(m.b)(e=>{const[t,a]=o.a.useState("");e.exclude&&0===e.exclude.length&&t.length>0&&a("");let n=void 0;if(t.length>0){const a="%s",r=e.excludeMsg.indexOf("%s"),l=e.excludeMsg.substring(0,r),i=e.excludeMsg.substring(r+a.length);n=o.a.createElement(o.a.Fragment,null,l,o.a.createElement("code",null,t),i)}const r=Object.assign(Object.assign({},e),{message:n,onChange:t=>{const n=e.exclude?t.findIndex(t=>e.exclude.includes(t)):-1;n>-1?a(t[n]):e.onChange(t)}});return o.a.createElement(u,Object.assign({},r))})},149:function(e,t,a){e.exports={root:"ConnectAccessToken__root",prompt:"ConnectAccessToken__prompt",row:"ConnectAccessToken__row ConnectAccessToken__root",content:"ConnectAccessToken__content",label:"ConnectAccessToken__label",bottom:"ConnectAccessToken__bottom","button-container":"ConnectAccessToken__button-container",buttonContainer:"ConnectAccessToken__button-container",button:"ConnectAccessToken__button","help-message":"ConnectAccessToken__help-message",helpMessage:"ConnectAccessToken__help-message",column:"ConnectAccessToken__column ConnectAccessToken__root"}},155:function(e,t,a){e.exports={table:"Table__table theme__subtle-drop-shadow theme__slightly-rounded",header:"Table__header",footer:"Table__footer",cell:"Table__cell","col-heading":"Table__col-heading Table__cell",colHeading:"Table__col-heading Table__cell",row:"Table__row","align-left":"Table__align-left",alignLeft:"Table__align-left","align-right":"Table__align-right",alignRight:"Table__align-right","align-center":"Table__align-center",alignCenter:"Table__align-center"}},157:function(e,t,a){e.exports={root:"Navbar__root layout__flex-row",container:"Navbar__container layout__flex-row","left-container":"Navbar__left-container Navbar__container layout__flex-row",leftContainer:"Navbar__left-container Navbar__container layout__flex-row","right-container":"Navbar__right-container Navbar__container layout__flex-row",rightContainer:"Navbar__right-container Navbar__container layout__flex-row",child:"Navbar__child",item:"Navbar__item Navbar__child",disabled:"Navbar__disabled",chevron:"Navbar__chevron Navbar__child",link:"Navbar__link","pro-pill":"Navbar__pro-pill",proPill:"Navbar__pro-pill",current:"Navbar__current","button-container":"Navbar__button-container layout__flex-row",buttonContainer:"Navbar__button-container layout__flex-row"}},168:function(e,t,a){e.exports={root:"UnitField__root layout__flex-row",input:"UnitField__input","unit-container":"UnitField__unit-container layout__flex-column",unitContainer:"UnitField__unit-container layout__flex-column","unit-bubble":"UnitField__unit-bubble",unitBubble:"UnitField__unit-bubble","unit-static":"UnitField__unit-static UnitField__unit-bubble layout__flex-column",unitStatic:"UnitField__unit-static UnitField__unit-bubble layout__flex-column","unit-selector":"UnitField__unit-selector UnitField__unit-bubble layout__flex-row",unitSelector:"UnitField__unit-selector UnitField__unit-bubble layout__flex-row","current-unit":"UnitField__current-unit",currentUnit:"UnitField__current-unit","menu-chevron":"UnitField__menu-chevron",menuChevron:"UnitField__menu-chevron","menu-chevron-open":"UnitField__menu-chevron-open UnitField__menu-chevron",menuChevronOpen:"UnitField__menu-chevron-open UnitField__menu-chevron","unit-list":"UnitField__unit-list layout__flex-column layout__z-highest",unitList:"UnitField__unit-list layout__flex-column layout__z-highest","unit-option":"UnitField__unit-option",unitOption:"UnitField__unit-option","unit-selected":"UnitField__unit-selected UnitField__unit-option",unitSelected:"UnitField__unit-selected UnitField__unit-option"}},178:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),r=a(331),l=a.n(r),i=a(15),c=a(10);function s(){return o.a.createElement("div",{className:l.a.logo},o.a.createElement("img",Object.assign({className:l.a.logoImage,src:i.a.image("spotlight-favicon.png"),alt:"Spotlight"},c.e)))}},185:function(e,t,a){e.exports={layout:"SidebarLayout__layout","layout-primary-content":"SidebarLayout__layout-primary-content SidebarLayout__layout",layoutPrimaryContent:"SidebarLayout__layout-primary-content SidebarLayout__layout","layout-primary-sidebar":"SidebarLayout__layout-primary-sidebar SidebarLayout__layout",layoutPrimarySidebar:"SidebarLayout__layout-primary-sidebar SidebarLayout__layout",container:"SidebarLayout__container",content:"SidebarLayout__content SidebarLayout__container",sidebar:"SidebarLayout__sidebar SidebarLayout__container",navigation:"SidebarLayout__navigation","navigation-left":"SidebarLayout__navigation-left SidebarLayout__navigation",navigationLeft:"SidebarLayout__navigation-left SidebarLayout__navigation","navigation-right":"SidebarLayout__navigation-right SidebarLayout__navigation",navigationRight:"SidebarLayout__navigation-right SidebarLayout__navigation","nav-link":"SidebarLayout__nav-link",navLink:"SidebarLayout__nav-link"}},19:function(e,t,a){"use strict";a(452);var n=a(22),o=a(0),r=a.n(o),l=a(25),i=a(175),c=a(7),s=a(72),u=a(168),m=a.n(u),d=a(36),p=a(8),b=a(11);function _(e){var{type:t,unit:a,units:n,value:o,onChange:l}=e,i=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["type","unit","units","value","onChange"]);const[c,s]=r.a.useState(!1),u="object"==typeof n&&!b.a.isEmpty(n),_=()=>s(e=>!e),f=e=>{switch(e.key){case" ":case"Enter":_();break;default:return}e.preventDefault(),e.stopPropagation()};return(null==o||isNaN(o))&&(o=""),r.a.createElement("div",{className:m.a.root},r.a.createElement("input",Object.assign({},i,{className:m.a.input,type:null!=t?t:"text",value:o,onChange:e=>l&&l(e.currentTarget.value,a)})),r.a.createElement("div",{className:m.a.unitContainer},u&&r.a.createElement(d.a,{isOpen:c,onBlur:()=>s(!1)},({ref:e})=>r.a.createElement("div",{ref:e,className:m.a.unitSelector,role:"button",onClick:_,onKeyDown:f,tabIndex:0},r.a.createElement("span",{className:m.a.currentUnit},g(o,b.a.get(n,a))),r.a.createElement(p.a,{icon:"arrow-down-alt2",className:c?m.a.menuChevronOpen:m.a.menuChevron})),b.a.keys(n).map(e=>{const t=b.a.get(n,e),a=g(o,t);return r.a.createElement(d.c,{key:a,onClick:()=>(l&&l(o,e),void s(!1))},a)})),!u&&r.a.createElement("div",{className:m.a.unitStatic},r.a.createElement("span",null,a))))}function g(e,t){return 1===parseInt(e.toString())?t[0]:t[1]}var f=a(81),h=a(320),v=a.n(h),E=a(9),y=a(18),O=a(51),C=a(97),N=[{id:"accounts",title:"Accounts",component:i.a},{id:"config",title:"Configuration",groups:[{id:"importing",title:"Import options",fields:[{id:"importerInterval",label:"Check for new posts",component:Object(c.b)(({id:e})=>r.a.createElement(s.a,{id:e,width:250,value:l.c.values.importerInterval,options:k.config.cronScheduleOptions,onChange:e=>l.c.values.importerInterval=e.value}))}]},{id:"cleaner",title:"Optimization",component:()=>r.a.createElement("div",null,r.a.createElement(f.a,{label:"What is this?",stealth:!0},r.a.createElement("div",null,r.a.createElement("p",null,"Spotlight imports all Instagram posts that can be displayed in your feed, even "," ",'those hidden behind a "Load more" button. The posts furthest down the list may'," ","therefore rarely be seen."),r.a.createElement("p",null,"To improve your site’s performance, you can choose to delete these unseen posts"," ","after a set period of time. Once a site visitor requests those posts, they will"," ","be re-imported.")))),fields:[{id:"cleanerAgeLimit",label:"Delete unseen posts after",component:Object(c.b)(({id:e})=>{const t=l.c.values.cleanerAgeLimit.split(" "),a=parseInt(t[0]),n=t[1];return r.a.createElement(_,{id:e,units:{days:["day","days"],hours:["hour","hours"],minutes:["minute","minutes"]},value:a,unit:n,type:"number",onChange:(e,t)=>l.c.values.cleanerAgeLimit=e+" "+t})})},{id:"cleanerInterval",label:"Run optimization",component:Object(c.b)(({id:e})=>r.a.createElement(s.a,{id:e,width:250,value:l.c.values.cleanerInterval,options:k.config.cronScheduleOptions,onChange:e=>l.c.values.cleanerInterval=e.value}))}]}]},{id:"tools",title:"Tools",groups:[{id:"cache",title:"Cache",fields:[{id:"clearCache",label:"If you are experiencing issues, clearing the plugin's cache may help.",component:function({}){const[e,t]=r.a.useState(!1);return Object(y.j)(a=>{a&&e&&(O.a.remove("admin/clear_cache/done"),O.a.add("admin/clear_cache/please_wait",O.a.message("Clearing the cache ..."),O.a.NO_TTL),k.restApi.clearCache().then(()=>{O.a.add("admin/clear_cache/done",O.a.message("Cleared cache successfully!"))}).catch(e=>{C.a.trigger({type:"clear_cache/error",message:n.a.getErrorReason(e)})}).finally(()=>{O.a.remove("admin/clear_cache/please_wait"),a&&t(!1)}))},[e]),r.a.createElement("div",{className:v.a.root},r.a.createElement(E.a,{disabled:e,onClick:()=>{t(!0)}},"Clear the cache"),r.a.createElement("a",{href:k.resources.cacheDocsUrl,target:"_blank",className:v.a.docLink},"What's this?"))}}]}]}],w=a(111);n.a.driver.interceptors.request.use(e=>(e.headers["X-WP-Nonce"]=SliAdminCommonL10n.restApi.wpNonce,e),e=>Promise.reject(e));const A={config:{rootId:"spotlight-instagram-admin",adminUrl:SliAdminCommonL10n.adminUrl,restApi:SliAdminCommonL10n.restApi,doOnboarding:"1"==SliAdminCommonL10n.doOnboarding,cronSchedules:SliAdminCommonL10n.cronSchedules,cronScheduleOptions:SliAdminCommonL10n.cronSchedules.map(e=>({value:e.key,label:e.display})),postTypes:SliAdminCommonL10n.postTypes,hasElementor:SliAdminCommonL10n.hasElementor},resources:{upgradeUrl:"https://spotlightwp.com/pricing/",upgradeLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing",pricingUrl:"https://spotlightwp.com/pricing/",trialLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing&billing_cycle=annual&trial=true",proComingSoonUrl:"https://spotlightwp.com/pro-coming-soon/",supportUrl:"https://spotlightwp.com/support/",customPersonalInfoUrl:"https://docs.spotlightwp.com/article/624-custom-profile-photo-and-bio-text",businessAccounts:"https://docs.spotlightwp.com/article/555-how-to-switch-to-a-business-account",cacheDocsUrl:"https://docs.spotlightwp.com/article/639-cache",promoTypesSurvey:"https://spotlightwp.com/survey-promote/",accessTokenDocUrl:"https://docs.spotlightwp.com/article/731-connecting-an-instagram-account-using-an-access-token",tokenGenerator:"https://spotlightwp.com/access-token-generator"},editor:{config:Object.assign({},w.a)},restApi:{config:SliAdminCommonL10n.restApi,saveFeed:e=>n.a.driver.post("/feeds"+(e.id?"/"+e.id:""),{feed:e}),deleteFeed:e=>n.a.driver.delete("/feeds/"+e),getMediaSources:()=>n.a.driver.get("/media/sources"),getMediaBySource:(e,t=30,a=0)=>n.a.driver.get(`/media?source=${e.name}&type=${e.type}&num=${t}&from=${a}`),connectPersonal:e=>n.a.driver.post("/connect",{accessToken:e}),connectBusiness:(e,t)=>n.a.driver.post("/connect",{accessToken:e,userId:t}),updateAccount:e=>n.a.driver.post("/accounts",e),deleteAccount:e=>n.a.driver.delete("/accounts/"+e),deleteAccountMedia:e=>n.a.driver.delete("/account_media/"+e),searchPosts:(e,t)=>n.a.driver.get(`/search_posts?search=${e}&type=${t}`),getSettings:()=>n.a.driver.get("/settings"),saveSettings:e=>n.a.driver.patch("/settings",{settings:e}),getNotifications:()=>n.a.driver.get("/notifications"),clearCache:()=>n.a.driver.post("/clear_cache"),clearFeedCache:e=>n.a.driver.post("/clear_cache/feed",{options:e.options})},settings:{pages:N,showGame:!0}};var k=t.a=A;n.a.config.forceImports=!0},209:function(e,t,a){e.exports={message:"Message__message",shaking:"Message__shaking","shake-animation":"Message__shake-animation",shakeAnimation:"Message__shake-animation",icon:"Message__icon",content:"Message__content","dismiss-btn":"Message__dismiss-btn",dismissBtn:"Message__dismiss-btn",success:"Message__success Message__message",info:"Message__info Message__message",warning:"Message__warning Message__message","pro-tip":"Message__pro-tip Message__message",proTip:"Message__pro-tip Message__message",error:"Message__error Message__message",grey:"Message__grey Message__message"}},210:function(e,t,a){e.exports={primaryColor:"#007cba",secondaryColor:"#d04186",tertiaryColor:"#d82442",lightColor:"#f5f5f5",lightColor2:"#e6e7e8",lightColor3:"#e1e2e3",shadowColor:"rgba(20,25,60,.32)",washedColor:"#eaf0f4"}},211:function(e,t,a){e.exports={content:"Sidebar__content",sidebar:"Sidebar__sidebar",padded:"Sidebar__padded","padded-content":"Sidebar__padded-content Sidebar__content Sidebar__padded",paddedContent:"Sidebar__padded-content Sidebar__content Sidebar__padded",disabled:"Sidebar__disabled Sidebar__sidebar"}},214:function(e,t,a){e.exports={root:"Toast__root","fade-in-animation":"Toast__fade-in-animation",fadeInAnimation:"Toast__fade-in-animation","root-fading-out":"Toast__root-fading-out Toast__root",rootFadingOut:"Toast__root-fading-out Toast__root","fade-out-animation":"Toast__fade-out-animation",fadeOutAnimation:"Toast__fade-out-animation",content:"Toast__content","dismiss-icon":"Toast__dismiss-icon",dismissIcon:"Toast__dismiss-icon","dismiss-btn":"Toast__dismiss-btn Toast__dismiss-icon",dismissBtn:"Toast__dismiss-btn Toast__dismiss-icon"}},215:function(e,t,a){e.exports={content:"AutomatePromotionsTab__content","content-heading":"AutomatePromotionsTab__content-heading",contentHeading:"AutomatePromotionsTab__content-heading",tutorial:"AutomatePromotionsTab__tutorial","tutorial-box":"AutomatePromotionsTab__tutorial-box",tutorialBox:"AutomatePromotionsTab__tutorial-box","tutorial-text":"AutomatePromotionsTab__tutorial-text",tutorialText:"AutomatePromotionsTab__tutorial-text","tutorial-video":"AutomatePromotionsTab__tutorial-video",tutorialVideo:"AutomatePromotionsTab__tutorial-video","mobile-instructions":"AutomatePromotionsTab__mobile-instructions",mobileInstructions:"AutomatePromotionsTab__mobile-instructions"}},228:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n);function r(e){return o.a.createElement("p",null,e.message)}},230:function(e,t,a){"use strict";a.d(t,"b",(function(){return g})),a.d(t,"a",(function(){return f}));var n=a(0),o=a.n(n),r=a(18),l=a(6),i=a(2),c=a(40),s=a(332),u=a(4),m=a(426),d=a(315),p=a(177),b=a(111),_=c.a.SavedFeed;const g="You have unsaved changes. If you leave now, your changes will be lost.";function f({feed:e,config:t,requireName:a,confirmOnCancel:c,firstTab:f,useCtrlS:h,onChange:v,onSave:E,onCancel:y,onRename:O,onChangeTab:C,onDirtyChange:N}){const w=Object(u.r)(b.a,null!=t?t:{});f=null!=f?f:w.tabs[0].id;const A=Object(s.a)(),[k,T]=Object(r.i)(null),[S,P]=Object(r.i)(e.name),[j,L]=o.a.useState(A.showFakeOptions),[x,I]=o.a.useState(f),[R,M]=o.a.useState(i.a.Mode.DESKTOP),[F,D]=Object(r.i)(!1),[B,U]=o.a.useState(!1),[G,H]=Object(r.i)(!1),[z,Y]=o.a.useState(!1),W=e=>{D(e),N&&N(e)};null===k.current&&(k.current=new l.a.Options(e.options));const K=o.a.useCallback(e=>{I(e),C&&C(e)},[C]),$=o.a.useCallback(e=>{const t=new l.a.Options(k.current);Object(u.a)(t,e),T(t),W(!0),v&&v(e,t)},[v]),V=o.a.useCallback(e=>{P(e),W(!0),O&&O(e)},[O]),q=o.a.useCallback(t=>{if(F.current)if(a&&void 0===t&&!G.current&&0===S.current.length)H(!0);else{t=null!=t?t:S.current,P(t),H(!1),Y(!0);const a=new _({id:e.id,name:t,options:k.current});E&&E(a).finally(()=>{Y(!1),W(!1)})}},[e,E]),J=o.a.useCallback(()=>{F.current&&!confirm(g)||(W(!1),U(!0))},[y]);return Object(r.d)("keydown",e=>{h&&e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(q(),e.preventDefault(),e.stopPropagation())},[],[F]),Object(n.useLayoutEffect)(()=>{B&&y&&y()},[B]),o.a.createElement(o.a.Fragment,null,o.a.createElement(m.a,Object.assign({value:k.current,name:S.current,tabId:x,previewDevice:R,showFakeOptions:j,onChange:$,onRename:V,onChangeTab:K,onToggleFakeOptions:e=>{L(e),Object(s.b)({showFakeOptions:e})},onChangeDevice:M,onSave:q,onCancel:J,isSaving:z},w,{isDoneBtnEnabled:F.current,isCancelBtnEnabled:F.current})),o.a.createElement(d.a,{isOpen:G.current,onAccept:e=>{q(e)},onCancel:()=>{H(!1)}}),c&&o.a.createElement(p.a,{message:g,when:F.current&&!z&&!B}))}},231:function(e,t,a){e.exports={root:"Tooltip__root layout__z-highest",container:"Tooltip__container","container-top":"Tooltip__container-top Tooltip__container",containerTop:"Tooltip__container-top Tooltip__container","container-bottom":"Tooltip__container-bottom Tooltip__container",containerBottom:"Tooltip__container-bottom Tooltip__container","container-left":"Tooltip__container-left Tooltip__container",containerLeft:"Tooltip__container-left Tooltip__container","container-right":"Tooltip__container-right Tooltip__container",containerRight:"Tooltip__container-right Tooltip__container",content:"Tooltip__content",arrow:"Tooltip__arrow","arrow-top":"Tooltip__arrow-top Tooltip__arrow",arrowTop:"Tooltip__arrow-top Tooltip__arrow","arrow-bottom":"Tooltip__arrow-bottom Tooltip__arrow",arrowBottom:"Tooltip__arrow-bottom Tooltip__arrow","arrow-left":"Tooltip__arrow-left Tooltip__arrow",arrowLeft:"Tooltip__arrow-left Tooltip__arrow","arrow-right":"Tooltip__arrow-right Tooltip__arrow",arrowRight:"Tooltip__arrow-right Tooltip__arrow"}},232:function(e,t,a){e.exports={heading:"ErrorToast__heading",message:"ErrorToast__message",footer:"ErrorToast__footer",details:"ErrorToast__details"}},234:function(e,t,a){e.exports={root:"HelpTooltip__root",tooltip:"HelpTooltip__tooltip layout__z-high","tooltip-container":"HelpTooltip__tooltip-container",tooltipContainer:"HelpTooltip__tooltip-container","tooltip-content":"HelpTooltip__tooltip-content",tooltipContent:"HelpTooltip__tooltip-content",icon:"HelpTooltip__icon"}},237:function(e,t,a){e.exports={root:"Notification__root",text:"Notification__text",title:"Notification__title Notification__text",content:"Notification__content Notification__text",date:"Notification__date"}},25:function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return u}));var n=a(1),o=a(19),r=a(4),l=a(22),i=a(15);let c;t.c=c=Object(n.o)({values:{},original:{},isDirty:!1,isSaving:!1,update(e){Object(r.a)(c.values,e)},save(){if(!c.isDirty)return;c.isSaving=!0;const e={importerInterval:c.values.importerInterval,cleanerAgeLimit:c.values.cleanerAgeLimit,cleanerInterval:c.values.cleanerInterval,hashtagWhitelist:c.values.hashtagWhitelist,hashtagBlacklist:c.values.hashtagBlacklist,captionWhitelist:c.values.captionWhitelist,captionBlacklist:c.values.captionBlacklist,autoPromotions:c.values.autoPromotions,promotions:c.values.promotions};return o.a.restApi.saveSettings(e).then(e=>{c.fromResponse(e),document.dispatchEvent(new m(s))}).catch(e=>{const t=l.a.getErrorReason(e);throw document.dispatchEvent(new m(u,{detail:{error:t}})),t}).finally(()=>c.isSaving=!1)},load:()=>o.a.restApi.getSettings().then(e=>c.fromResponse(e)).catch(e=>{throw l.a.getErrorReason(e)}),restore(){c.values=Object(r.h)(c.original),c.isDirty=!1},fromResponse(e){var t,a,n,o,r,l,i,s,u;if("object"!=typeof e||void 0===e.data)throw"Spotlight encountered a problem while trying to load your settings. Kindly contact customer support for assistance.";c.original={importerInterval:null!==(t=e.data.importerInterval)&&void 0!==t?t:"",cleanerAgeLimit:null!==(a=e.data.cleanerAgeLimit)&&void 0!==a?a:"",cleanerInterval:null!==(n=e.data.cleanerInterval)&&void 0!==n?n:"",hashtagWhitelist:null!==(o=e.data.hashtagWhitelist)&&void 0!==o?o:[],hashtagBlacklist:null!==(r=e.data.hashtagBlacklist)&&void 0!==r?r:[],captionWhitelist:null!==(l=e.data.captionWhitelist)&&void 0!==l?l:[],captionBlacklist:null!==(i=e.data.captionBlacklist)&&void 0!==i?i:[],autoPromotions:null!==(s=e.data.autoPromotions)&&void 0!==s?s:[],promotions:null!==(u=e.data.promotions)&&void 0!==u?u:{}},Array.isArray(c.original.promotions)&&0===c.original.promotions.length&&(c.original.promotions={}),c.restore()}},{values:n.o,update:n.f,save:n.f,load:n.f,restore:n.f}),Object(n.g)(()=>{c.isDirty=!Object(r.m)(c.original,c.values),i.a.config.globalPromotions=c.values.promotions,i.a.config.autoPromotions=c.values.autoPromotions});const s="sli/settings/save/success",u="sli/settings/save/error";class m extends CustomEvent{constructor(e,t={}){super(e,t)}}},251:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),r=a(231),l=a.n(r),i=a(197),c=a(336),s=a(337),u=a(19),m=a(10);function d({visible:e,delay:t,placement:a,theme:r,children:d}){r=null!=r?r:{},a=a||"bottom";const[b,_]=o.a.useState(!1),g={preventOverflow:{boundariesElement:document.getElementById(u.a.config.rootId),padding:5}};Object(n.useEffect)(()=>{const a=setTimeout(()=>_(e),e?t:1);return()=>clearTimeout(a)},[e]);const f=p("container",a),h=p("arrow",a),v=Object(m.b)(l.a[f],r.container,r[f]),E=Object(m.b)(l.a[h],r.arrow,r[h]);return o.a.createElement(i.c,null,o.a.createElement(c.a,null,e=>d[0](e)),o.a.createElement(s.a,{placement:a,modifiers:g,positionFixed:!0},({ref:e,style:t,placement:a,arrowProps:n})=>b?o.a.createElement("div",{ref:e,className:Object(m.b)(l.a.root,r.root),style:t,tabIndex:-1},o.a.createElement("div",{className:v,"data-placement":a},o.a.createElement("div",{className:Object(m.b)(l.a.content,r.content)},d[1]),o.a.createElement("div",{className:E,ref:n.ref,style:n.style,"data-placement":a}))):null))}function p(e,t){switch(t){case"top":case"top-start":case"top-end":return e+"Top";case"bottom":case"bottom-start":case"bottom-end":return e+"Bottom";case"left":case"left-start":case"left-end":return e+"Left";case"right":case"right-start":case"right-end":return e+"Right";default:return e}}},255:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),r=a(400),l=a.n(r),i=a(98);function c({children:e}){return o.a.createElement("div",null,o.a.createElement("div",{className:l.a.proPill},o.a.createElement(i.a,null)),o.a.createElement("span",null,e))}},265:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),r=a(417),l=a.n(r),i=a(51);const c=({feed:e,onCopy:t,children:a})=>o.a.createElement(l.a,{text:`[instagram feed="${e.id}"]`,onCopy:()=>{i.a.add("feeds/shortcode/copied",i.a.message("Copied shortcode to clipboard.")),t&&t()}},a)},268:function(e,t,a){"use strict";a.d(t,"a",(function(){return L}));var n=a(0),o=a.n(n),r=a(215),l=a.n(r),i=a(117),c=a(114),s=a.n(c),u=a(4),m=a(270),d=a(9),p=a(8),b=a(12),_=a(68),g=a(131),f=a(19),h=a(89),v=a(96);function E({automations:e,selected:t,isFakePro:a,onChange:r,onSelect:l,onClick:i}){!a&&r||(r=v.a.noop);const[c,p]=o.a.useState(null);function _(e){l&&l(e)}const g=Object(n.useCallback)(()=>{r(e.concat({type:"hashtag",config:{},promotion:{type:"link",config:{}}}),e.length)},[e]),f=Object(n.useCallback)(t=>()=>{const a=e[t],n=Object(u.h)(a),o=e.slice();o.splice(t+1,0,n),r(o,t+1)},[e]);function E(){p(null)}const O=Object(n.useCallback)(t=>{const a=e.slice();a.splice(t,1),r(a,0),E()},[e]),C=Object(n.useCallback)(a=>{const n=e[t],o=a.map(e=>({type:e.type,config:b.a.Automation.getConfig(e),promotion:b.a.Automation.getPromotion(e)})),l=o.findIndex(e=>e.promotion===n.promotion);r(o,l)},[e]);function N(e){return()=>{_(e),i&&i(e)}}const w=e.map(e=>Object.assign(Object.assign({},e),{id:Object(u.q)()}));return o.a.createElement("div",{className:a?s.a.fakeProList:s.a.list},o.a.createElement("div",{className:s.a.addButtonRow},o.a.createElement(d.a,{type:d.c.SECONDARY,size:d.b.LARGE,onClick:g},"Add automation")),o.a.createElement(m.a,{list:w,handle:"."+s.a.rowDragHandle,setList:C,onStart:function(e){_(e.oldIndex)},animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},e.map((e,a)=>o.a.createElement(y,{key:a,automation:e,selected:t===a,onClick:N(a),onDuplicate:f(a),onRemove:()=>function(e){p(e)}(a)}))),o.a.createElement(h.a,{isOpen:null!==c,title:"Are you sure?",buttons:["Yes, remove it","No, keep it"],onAccept:()=>O(c),onCancel:E},o.a.createElement("p",null,"Are you sure you want to remove this automation? This ",o.a.createElement("strong",null,"cannot")," be undone!")))}function y({automation:e,selected:t,onClick:a,onDuplicate:n,onRemove:r}){const l=b.a.Automation.getConfig(e),i=b.a.Automation.getPromotion(e),c=b.a.getConfig(i),u=f.a.config.postTypes.find(e=>e.slug===c.linkType);return o.a.createElement("div",{className:t?s.a.rowSelected:s.a.row,onClick:a},o.a.createElement("div",{className:s.a.rowDragHandle},o.a.createElement(p.a,{icon:"menu"})),o.a.createElement("div",{className:s.a.rowBox},o.a.createElement("div",{className:s.a.rowHashtags},l.hashtags&&Array.isArray(l.hashtags)?l.hashtags.map(e=>"#"+e).join(", "):o.a.createElement("span",{className:s.a.noHashtagsMessage},"No hashtags")),o.a.createElement("div",{className:s.a.rowSummary},o.a.createElement(g.a,{value:c.linkType},o.a.createElement(g.c,{value:"url"},o.a.createElement("span",{className:s.a.summaryItalics},"Custom URL")),o.a.createElement(g.b,null,()=>u?o.a.createElement("span",null,o.a.createElement("span",{className:s.a.summaryBold},c.postTitle)," ",o.a.createElement("span",{className:s.a.summaryItalics},"(",u.labels.singularName,")")):o.a.createElement("span",{className:s.a.noPromoMessage},"No promotion")))),o.a.createElement("div",{className:s.a.rowActions},o.a.createElement(d.a,{type:d.c.PILL,size:d.b.SMALL,onClick:Object(_.b)(n),tooltip:"Duplicate automation"},o.a.createElement(p.a,{icon:"admin-page"})),o.a.createElement(d.a,{type:d.c.DANGER_PILL,size:d.b.SMALL,onClick:Object(_.b)(r),tooltip:"Remove automation"},o.a.createElement(p.a,{icon:"trash"})))))}var O=a(333),C=a.n(O),N=a(122),w=a(72),A=a(106),k=a(147),T=a(203),S=a(10);let P;function j({automation:e,isFakePro:t,onChange:a}){var n;!t&&a||(a=v.a.noop),void 0===P&&(P=b.a.getTypes().filter(e=>"-more-"!==e.id).map(e=>({value:e.id,label:e.label})));const r=b.a.Automation.getPromotion(e),l=b.a.getType(r),i=b.a.getConfig(r),c=null!==(n=b.a.Automation.getConfig(e).hashtags)&&void 0!==n?n:[];return o.a.createElement(N.a,null,e&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:Object(S.b)(N.a.padded,t?C.a.fakePro:null)},o.a.createElement(A.a,{id:"sli-auto-promo-hashtags",label:"Promote posts with any of these hashtags",wide:!0},o.a.createElement(k.a,{id:"sli-auto-promo-hashtags",value:c,onChange:function(t){a(Object.assign(Object.assign({},e),{config:{hashtags:t}}))},autoFocus:!t})),o.a.createElement(A.a,{id:"auto-promo-type",label:"Promotion type",wide:!0},o.a.createElement(w.a,{id:"sli-auto-promo-type",value:e.promotion.type,onChange:function(t){a(Object.assign(Object.assign({},e),{type:t.value}))},options:P,isSearchable:!1,isCreatable:!1,isClearable:!1}))),o.a.createElement("div",{className:t?C.a.fakePro:null},o.a.createElement(T.a,{type:l,config:i,onChange:function(t){a(Object.assign(Object.assign({},e),{promotion:Object.assign(Object.assign({},e.promotion),{config:t})}))},onRemove:function(){a(Object.assign(Object.assign({},e),{promotion:Object.assign(Object.assign({},e.promotion),{config:{}})}))},hideRemove:!0}))),!e&&o.a.createElement("div",{className:N.a.padded},o.a.createElement("p",null,"Automatically link Instagram posts from any source that contain specific hashtags to posts,"," ","pages, products, custom links, and more."," ",o.a.createElement("a",{href:"#"},"Learn more")),o.a.createElement("p",null,"To get started, create an automation or select an existing one.")))}function L({automations:e,isFakePro:t,onChange:a}){e=null!=e?e:[],a=null!=a?a:v.a.noop;const[r,c]=o.a.useState(0),[s,m]=o.a.useState("content"),d=Object(u.f)(r,e),p=e.length>0,b=()=>m("content"),_=()=>m("sidebar"),g=Object(n.useCallback)(()=>e[d],[e,d]);function f(e){c(e)}function h(e){f(e),_()}const y=Object(n.useCallback)((e,t)=>{a(e),void 0!==t&&c(t)},[a]),O=Object(n.useCallback)(t=>{a(Object(u.c)(e,d,t))},[d,a]),C=Object(n.useCallback)(()=>{a(e.concat({type:"hashtag",config:{},promotion:{type:"link",config:{}}})),c(0),_()},[e]);return o.a.createElement(i.a,{primary:"content",current:s,sidebar:p&&(e=>o.a.createElement(o.a.Fragment,null,e&&o.a.createElement(i.a.Navigation,{icon:"arrow-left-alt",text:"Automations",onClick:b}),o.a.createElement(j,{automation:g(),onChange:O,isFakePro:t}))),content:a=>o.a.createElement("div",{className:l.a.content},!p&&o.a.createElement(x,{onCreate:C}),p&&o.a.createElement(o.a.Fragment,null,a&&o.a.createElement("div",{className:l.a.mobileInstructions},o.a.createElement("p",null,"Click or tap on an automation to change its settings")),o.a.createElement(E,{automations:e,selected:d,isFakePro:t,onChange:y,onSelect:f,onClick:h})))})}function x({onCreate:e}){return o.a.createElement("div",{className:l.a.tutorial},o.a.createElement("div",{className:l.a.tutorialBox},o.a.createElement("div",{className:l.a.tutorialText},o.a.createElement("h1",null,"Automatically drive more conversions with Instagram"),o.a.createElement("p",null,"Link Instagram posts to your products, blog posts, landing pages, and more."),o.a.createElement("p",null,o.a.createElement("b",null,"Promotions help you drive traffic and increase conversions through social proof.")),o.a.createElement("p",null,"For example, create an ",o.a.createElement("b",null,"Instagram hashtag"),", let’s call it ",o.a.createElement("b",null,"#mymaxidress"),"."," "," Display photos from Instagram that use this hashtag and feature your dress,"," "," then have them ",o.a.createElement("b",null,"link directly to your product page"),", whether it’s on the"," "," same website or not."),o.a.createElement("p",null,"Every new Instagram photo that Spotlight finds with this hashtag will then",o.a.createElement("br",null),o.a.createElement("b",null,"automatically link to the product page"),"."),o.a.createElement("p",null,o.a.createElement("b",null,"Simple. Powerful. Effective."))),o.a.createElement(d.a,{type:d.c.SECONDARY,size:d.b.HERO,onClick:e},"Create your first automation")))}},269:function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),o=a.n(n),r=a(142),l=a.n(r),i=a(3),c=a(6),s=a(12),u=a(103),m=a(11),d=a(117),p=a(122),b=a(106),_=a(72),g=a(203);function f({media:e,promo:t,isLastPost:a,isFakePro:r,onChange:l,onRemove:i,onNextPost:c}){let u,m,d;e&&(u=t?t.type:s.a.getTypes()[0].id,m=s.a.getTypeById(u),d=s.a.getConfig(t));const f=Object(n.useCallback)(e=>{const t={type:m.id,config:e};l(t)},[e,m]),h=Object(n.useCallback)(e=>{const t={type:e.value,config:d};l(t)},[e,d]);if(!e)return o.a.createElement(p.a,{disabled:r},o.a.createElement("div",{className:p.a.padded},o.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."),o.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),o.a.createElement("ol",{style:{marginTop:0}},o.a.createElement("li",null,"Select a post from the preview on the left."),o.a.createElement("li",null,"Choose what the post should link to.")),o.a.createElement("p",null,"That’s it!")));const v=void 0!==s.a.getAutoPromo(e);return o.a.createElement(p.a,{disabled:r},o.a.createElement("div",{className:p.a.padded},o.a.createElement(b.a,{label:"Promotion type",wide:!0},o.a.createElement(_.a,{value:u,onChange:h,options:s.a.getTypes().map(e=>({value:e.id,label:e.label}))}))),o.a.createElement(g.a,{key:e?e.id:void 0,type:m,config:d,onChange:f,onRemove:i,hasAuto:v,showNextBtn:!0,isNextBtnDisabled:a,onNext:c}))}var h=a(201),v=a(263),E=a(10),y=a(264),O=a(127),C=a(96);const N={};function w(){return new u.b({watch:{all:!0,moderation:!1,filters:!1}})}function A({promotions:e,isFakePro:t,onChange:a}){!t&&a||(a=C.a.noop);const[n,r]=o.a.useState("content"),[u,p]=o.a.useState(i.b.list.length>0?i.b.list[0].id:null),[b,_]=o.a.useState(),g=o.a.useRef(new c.a);A();const E=()=>r("content");function A(){g.current=new c.a(new c.a.Options({accounts:[u]}))}const T=o.a.useCallback(e=>{p(e.id),A()},[p]),S=o.a.useCallback((e,t)=>{_(t)},[_]),P=e=>e&&r("sidebar"),j=o.a.useCallback(()=>{_(e=>e+1)},[_]),L=u?m.a.ensure(N,u,w()):w(),x=L.media[b],I=x?s.a.getPromoFromDictionary(x,e):void 0,R=o.a.useCallback(t=>{a(m.a.withEntry(e,x.id,t))},[x,e,a]),M=o.a.useCallback(()=>{a(m.a.without(e,x.id))},[x,e,a]);return o.a.createElement(o.a.Fragment,null,0===i.b.list.length&&o.a.createElement("div",{className:l.a.tutorial},o.a.createElement("div",{className:l.a.tutorialBox},o.a.createElement("div",{className:l.a.tutorialText},o.a.createElement("h1",null,"Set up global promotions across all feeds"),o.a.createElement("p",null,"Link Instagram posts to your products, blog posts, landing pages, and more."),o.a.createElement("p",null,o.a.createElement("b",null,"Promotions help you drive traffic and increase conversions through social proof.")),o.a.createElement("p",null,"Set up global promotions for each account that will apply across all feeds."," ","You may then choose to enable or disable promotions on a per-feed basis."),o.a.createElement("p",null,"Connect your first Instagram account to set up global promotions."),o.a.createElement("p",null,o.a.createElement("b",null,"Simple. Powerful. Effective."))),o.a.createElement(O.a,{onConnect:p},"Connect your Instagram account"))),i.b.list.length>0&&o.a.createElement(d.a,{primary:"content",current:n,sidebar:e=>o.a.createElement(o.a.Fragment,null,e&&o.a.createElement(o.a.Fragment,null,o.a.createElement(d.a.Navigation,{icon:"arrow-left-alt",text:"Back",onClick:E}),o.a.createElement(y.a,{media:x})),o.a.createElement(f,{media:x,promo:I,isLastPost:b>=L.media.length-1,onChange:R,onRemove:M,onNextPost:j,isFakePro:t})),content:e=>o.a.createElement(o.a.Fragment,null,i.b.list.length>1&&o.a.createElement(k,{selected:u,onSelect:T}),o.a.createElement("div",{className:l.a.content},e&&o.a.createElement("div",{className:l.a.mobileInstructions},o.a.createElement("p",null,"Click or tap a post to set up a promotion for it")),o.a.createElement(h.a,{key:g.current.options.accounts.join("-"),feed:g.current,store:L,selected:b,onSelectMedia:S,onClickMedia:P,autoFocusFirst:!0,disabled:t},(e,a)=>{const n=t?void 0:s.a.getPromo(e);return o.a.createElement(v.a,{media:e,promo:n,selected:a===b})})))}))}function k({selected:e,onSelect:t}){return o.a.createElement("div",{className:l.a.accountList},o.a.createElement("div",{className:l.a.accountScroller},i.b.list.map(a=>{const n="global-promo-account-"+a.id;return o.a.createElement("div",{key:a.id,className:e===a.id?l.a.accountSelected:l.a.accountButton,onClick:()=>t(a),role:"button","aria-labelledby":n},o.a.createElement("div",{className:l.a.profilePic},o.a.createElement("img",Object.assign({src:i.b.getProfilePicUrl(a),alt:a.username},E.e))),o.a.createElement("div",{id:n,className:l.a.username},o.a.createElement("span",null,"@"+a.username)))})))}},272:function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),o=a.n(n),r=a(132),l=a.n(r),i=a(47),c=a(3),s=a(63),u=a(9),m=a(8),d=a(149),p=a.n(d),b=a(19),_=a(33);const g=/^(User ID: ([0-9]+)\s*)?Access Token: ([a-zA-Z0-9]+)$/im;function f({isColumn:e,showPrompt:t,onConnectPersonal:a,onConnectBusiness:n}){const r=o.a.useRef(!1),[l,i]=o.a.useState(""),[c,s]=o.a.useState(""),m=l.length>145&&l.trimLeft().startsWith("EA"),d=o.a.useCallback(()=>{m?n(l,c):a(l)},[l,c,m]),f=o.a.createElement("div",{className:p.a.buttonContainer},o.a.createElement(u.a,{className:p.a.button,onClick:d,type:u.c.PRIMARY,disabled:0===l.length&&(0===c.length||!m)},"Connect"));return o.a.createElement("div",{className:e?p.a.column:p.a.row},t&&o.a.createElement("p",{className:p.a.prompt},"Or connect without a login (access token):"),o.a.createElement("div",{className:p.a.content},o.a.createElement("div",{className:p.a.bottom},o.a.createElement("input",{id:"manual-connect-access-token",type:"text",value:l,onChange:e=>{const t=e.target.value;if(r.current){r.current=!1;const e=g.exec(t);if(e)switch(e.length){case 2:return void i(e[1]);case 4:return s(e[2]),void i(e[3])}}i(t)},onPaste:e=>{r.current=!0,e.persist()},placeholder:"Instagram/Facebook access token"}),!m&&f)),m&&o.a.createElement("div",{className:p.a.content},o.a.createElement("label",{className:p.a.label,htmlFor:"manual-connect-user-id"},o.a.createElement("div",null,"This access token is for a ",o.a.createElement("strong",null,"Business")," account."," ","Please also enter the user ID:")),o.a.createElement("div",{className:p.a.bottom},o.a.createElement("input",{id:"manual-connect-user-id",type:"text",value:c,onChange:e=>{s(e.target.value)},placeholder:"Enter the user ID"}),m&&f)),o.a.createElement(_.a,{type:_.b.GREY,showIcon:!0},"Connecting a client's account? Avoid sharing passwords and use our"," ",o.a.createElement("a",{href:b.a.resources.tokenGenerator,target:"_blank"},"access token generator"),"."))}var h=a(22),v=a(96),E=a(97);function y({onConnect:e,beforeConnect:t,useColumns:a,showPrompt:n}){n=null==n||n,e=null!=e?e:v.a.noop;const r=e=>{const t=h.a.getErrorReason(e);E.a.trigger({type:"account/connect/fail",message:t})},d=e=>{i.a.State.connectSuccess&&t&&t(e)};return o.a.createElement("div",{className:a?l.a.vertical:l.a.horizontal},n&&o.a.createElement("p",{className:l.a.promptMsg},"Choose the type of account to connect:"),o.a.createElement("div",{className:l.a.types},o.a.createElement("div",{className:l.a.type},o.a.createElement(u.a,{type:u.c.PRIMARY,size:u.b.HERO,onClick:()=>i.a.openAuthWindow(c.a.Type.PERSONAL,s.a.ANIMATION_DELAY,d).then(e).catch(()=>{})},"Connect your Personal account"),o.a.createElement("div",{className:l.a.capabilities},o.a.createElement(O,null,"Connects directly through Instagram"),o.a.createElement(O,null,"Show posts from your account"))),o.a.createElement("div",{className:l.a.type},o.a.createElement(u.a,{type:u.c.SECONDARY,size:u.b.HERO,onClick:()=>i.a.openAuthWindow(c.a.Type.BUSINESS,s.a.ANIMATION_DELAY,d).then(e).catch(()=>{})},"Connect your Business account"),o.a.createElement("div",{className:l.a.capabilities},o.a.createElement(O,null,"Connects through your Facebook page"),o.a.createElement(O,null,"Show posts from your account"),o.a.createElement(O,null,"Show posts where you are tagged"),o.a.createElement(O,null,"Show posts with a specific hashtag from all across Instagram"),o.a.createElement("div",{className:l.a.businessLearnMore},o.a.createElement(m.a,{icon:"editor-help"}),o.a.createElement("a",{href:b.a.resources.businessAccounts,target:"_blank"},"Learn more about Business accounts"))))),o.a.createElement("div",{className:n?l.a.connectAccessToken:null},a&&o.a.createElement("p",{className:l.a.promptMsg},"Or connect without a login:"),o.a.createElement(f,{isColumn:a,showPrompt:n,onConnectPersonal:t=>i.a.manualConnectPersonal(t,s.a.ANIMATION_DELAY,d).then(e).catch(r),onConnectBusiness:(t,a)=>i.a.manualConnectBusiness(t,a,s.a.ANIMATION_DELAY,d).then(e).catch(r)})))}const O=e=>{var{children:t}=e,a=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children"]);return o.a.createElement("div",Object.assign({className:l.a.capability},a),o.a.createElement(m.a,{icon:"yes"}),o.a.createElement("div",null,t))}},274:function(e,t,a){e.exports={root:"ModalPrompt__root",button:"ModalPrompt__button"}},275:function(e,t,a){e.exports={button:"ColorPicker__button","color-preview":"ColorPicker__color-preview",colorPreview:"ColorPicker__color-preview",popper:"ColorPicker__popper"}},279:function(e,t,a){e.exports={"pro-upsell":"SidebarUpsell__pro-upsell",proUpsell:"SidebarUpsell__pro-upsell",toggle:"SidebarUpsell__toggle","toggle-label":"SidebarUpsell__toggle-label",toggleLabel:"SidebarUpsell__toggle-label"}},284:function(e,t,a){"use strict";t.a={Sizes:{WIDE:1200,LARGE:1180,MEDIUM:960,SMALL:782,NARROW:600,ALL:[1200,1180,960,782,600]}}},320:function(e,t,a){e.exports={root:"ClearCacheButton__root layout__flex-row","doc-link":"ClearCacheButton__doc-link",docLink:"ClearCacheButton__doc-link"}},324:function(e,t,a){e.exports={root:"SaveButton__root","saving-overlay":"SaveButton__saving-overlay layout__fill-parent",savingOverlay:"SaveButton__saving-overlay layout__fill-parent","saving-animation":"SaveButton__saving-animation",savingAnimation:"SaveButton__saving-animation"}},329:function(e,t,a){e.exports={root:"Toaster__root layout__z-highest",container:"Toaster__container"}},33:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return u}));var n,o=a(0),r=a.n(o),l=a(209),i=a.n(l),c=a(10),s=a(8);!function(e){e.SUCCESS="success",e.INFO="info",e.PRO_TIP="pro-tip",e.WARNING="warning",e.ERROR="error",e.GREY="grey"}(n||(n={}));const u=({children:e,type:t,showIcon:a,shake:n,isDismissible:o,onDismiss:l})=>{const[u,d]=r.a.useState(!1),p=Object(c.b)(i.a[t],n?i.a.shaking:null);return u?null:r.a.createElement("div",{className:p},a?r.a.createElement("div",null,r.a.createElement(s.a,{className:i.a.icon,icon:m(t)})):null,r.a.createElement("div",{className:i.a.content},e),o?r.a.createElement("button",{className:i.a.dismissBtn,onClick:()=>{o&&(d(!0),l&&l())}},r.a.createElement(s.a,{icon:"no"})):null)};function m(e){switch(e){case n.SUCCESS:return"yes-alt";case n.PRO_TIP:return"lightbulb";case n.ERROR:case n.WARNING:return"warning";case n.INFO:default:return"info"}}},331:function(e,t,a){e.exports={logo:"SpotlightLogo__logo","logo-image":"SpotlightLogo__logo-image",logoImage:"SpotlightLogo__logo-image"}},333:function(e,t,a){e.exports={"fake-pro":"AutoPromotionsSidebar__fake-pro",fakePro:"AutoPromotionsSidebar__fake-pro"}},335:function(e,t,a){"use strict";var n=a(0),o=a.n(n),r=a(329),l=a.n(r),i=a(51),c=a(214),s=a.n(c),u=a(8);function m({children:e,ttl:t,onExpired:a}){t=null!=t?t:i.a.NO_TTL;const[r,l]=o.a.useState(!1);let c=o.a.useRef(),m=o.a.useRef();const d=()=>{t!==i.a.NO_TTL&&(c.current=setTimeout(b,t))},p=()=>{clearTimeout(c.current)},b=()=>{l(!0),m.current=setTimeout(_,200)},_=()=>{a&&a()};Object(n.useEffect)(()=>(d(),()=>{p(),clearTimeout(m.current)}),[]);const g=r?s.a.rootFadingOut:s.a.root;return o.a.createElement("div",{className:g,onMouseOver:p,onMouseOut:d},o.a.createElement("div",{className:s.a.content},e),o.a.createElement("button",{className:s.a.dismissBtn,onClick:()=>{p(),b()}},o.a.createElement(u.a,{icon:"no-alt",className:s.a.dismissIcon})))}var d=a(7);t.a=Object(d.b)((function(){return o.a.createElement("div",{className:l.a.root},o.a.createElement("div",{className:l.a.container},i.a.getAll().map(e=>{var t,a;return o.a.createElement(m,{key:e.key,ttl:null!==(t=e.ttl)&&void 0!==t?t:i.a.DEFAULT_TTL,onExpired:(a=e.key,()=>{i.a.remove(a)})},o.a.createElement(e.component,null))})))}))},36:function(e,t,a){"use strict";a.d(t,"a",(function(){return m})),a.d(t,"f",(function(){return d})),a.d(t,"c",(function(){return b})),a.d(t,"b",(function(){return _})),a.d(t,"d",(function(){return g})),a.d(t,"e",(function(){return f}));var n=a(0),o=a.n(n),r=a(197),l=a(336),i=a(337),c=a(18),s=a(19),u=(a(454),a(10));const m=({children:e,className:t,refClassName:a,isOpen:n,onBlur:m,placement:d,modifiers:b,useVisibility:_})=>{d=null!=d?d:"bottom-end",_=null!=_&&_;const g=o.a.useRef(),f=n||_,h=!n&&_,v=Object.assign({preventOverflow:{boundariesElement:document.getElementById(s.a.config.rootId),padding:5}},b),E=()=>{m()},y=e=>{switch(e.key){case"ArrowDown":break;case"Escape":E();break;default:return}e.preventDefault(),e.stopPropagation()};return Object(c.b)(g,E,[g]),Object(c.c)([g],E),o.a.createElement("div",{ref:g,className:Object(u.b)("menu__ref",a)},o.a.createElement(r.c,null,o.a.createElement(l.a,null,t=>e[0](t)),o.a.createElement(i.a,{placement:d,positionFixed:!0,modifiers:v},({ref:a,style:n,placement:r})=>f?o.a.createElement("div",{ref:a,className:"menu",style:p(n,h),"data-placement":r,onKeyDown:y},o.a.createElement("div",{className:"menu__container"+(t?" "+t:"")},e[1])):null)))};function d(e){var{children:t}=e,a=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children"]);const[r,l]=Object(n.useState)(!1),i=()=>l(!0),c=()=>l(!1),s={openMenu:i,closeMenu:c};return o.a.createElement(d.Context.Provider,{value:s},o.a.createElement(m,Object.assign({isOpen:r,onBlur:c},a),({ref:e})=>t[0]({ref:e,openMenu:i}),t[1]))}function p(e,t){return Object.assign(Object.assign({},e),{opacity:1,pointerEvents:"all",visibility:t?"hidden":"visible"})}!function(e){e.Context=o.a.createContext({openMenu:null,closeMenu:null})}(d||(d={}));const b=({children:e,onClick:t,disabled:a,active:n})=>{const r=Object(u.a)("menu__item",{"--disabled":a,"--active":n});return o.a.createElement(d.Context.Consumer,null,({closeMenu:l})=>o.a.createElement("div",{className:r},o.a.createElement("button",{onClick:()=>{l&&l(),!n&&!a&&t&&t()}},e)))},_=({children:e})=>e,g=()=>o.a.createElement("div",{className:"menu__separator"}),f=({children:e})=>o.a.createElement("div",{className:"menu__static"},e)},361:function(e,t,a){},387:function(e,t,a){},390:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(99),o=a(120),r=a(30);const l={factories:Object(n.b)({"router/history":()=>Object(o.a)(),"router/store":e=>r.a.useHistory(e.get("router/history"))}),run:e=>{e.get("router/store")}}},392:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(18);function o({when:e,is:t,isRoot:a,render:o}){const r=Object(n.h)().get(e);return r===t||!t&&!r||a&&!r?o():null}},394:function(e,t,a){"use strict";var n=a(0),o=a.n(n),r=a(3),l=a(89),i=a(104),c=a(47),s=a(7),u=a(19);t.a=Object(s.b)((function({}){Object(n.useEffect)(()=>{const e=e=>{const n=e.detail.account;a||m||n.type!==r.a.Type.PERSONAL||n.customBio.length||n.customProfilePicUrl.length||(t(n),s(!0))};return document.addEventListener(c.a.ACCOUNT_CONNECTED_EVENT,e),()=>document.removeEventListener(c.a.ACCOUNT_CONNECTED_EVENT,e)},[]);const[e,t]=o.a.useState(null),[a,s]=o.a.useState(!1),[m,d]=o.a.useState(!1),p=()=>{c.a.State.connectedId=null};return o.a.createElement(o.a.Fragment,null,o.a.createElement(l.a,{title:"You've successfully connected your account!",buttons:["Yes","No, maybe later"],isOpen:a,onAccept:()=>{s(!1),d(!0)},onCancel:()=>{s(!1),p()}},o.a.createElement("p",null,"One more thing ..."),o.a.createElement("p",null,"Instagram doesn't provide the profile photo and bio text for Personal accounts."," ","Would you like to set a custom photo and a custom bio in Spotlight to match your Instagram profile?"),o.a.createElement("p",null,o.a.createElement("a",{href:u.a.resources.customPersonalInfoUrl,target:"_blank"},"What's this about?"))),o.a.createElement(i.a,{isOpen:m,onClose:()=>{d(!1),p()},account:e}))}))},395:function(e,t,a){e.exports={root:"ConnectAccountButton__root"}},40:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(1),r=a(6),l=a(22),i=a(19),c=function(e,t,a,n){var o,r=arguments.length,l=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,a,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(l=(r<3?o(l):r>3?o(t,a,l):o(t,a))||l);return r>3&&l&&Object.defineProperty(t,a,l),l};!function(e){class t{constructor(e={}){t.setFromObject(this,null!=e?e:{})}static setFromObject(e,t={}){var a,n,o,l,i;e.id=null!==(a=t.id)&&void 0!==a?a:null,e.name=null!==(n=t.name)&&void 0!==n?n:"",e.usages=null!==(o=t.usages)&&void 0!==o?o:[],e.options=new r.a.Options(null!==(l=e.options)&&void 0!==l?l:{}),r.a.Options.setFromObject(e.options,null!==(i=t.options)&&void 0!==i?i:{})}get label(){return t.getLabel(this.name)}static getLabel(e){return e.length>0?e:this.getDefaultName()}static getDefaultName(){return"(no name)"}}function a(a){if("object"!=typeof a||!Array.isArray(a.data))throw"Spotlight encountered a problem trying to load your feeds. Kindly contact customer support for assistance.";e.list.replace(a.data.map(e=>new t(e)))}c([o.o],t.prototype,"id",void 0),c([o.o],t.prototype,"name",void 0),c([o.o],t.prototype,"usages",void 0),c([o.o],t.prototype,"options",void 0),c([o.h],t.prototype,"label",null),e.SavedFeed=t,e.list=Object(o.o)([]),e.loadFeeds=()=>l.a.getFeeds().then(a).catch(e=>{throw l.a.getErrorReason(e)}),e.getById=t=>(t="string"==typeof t?parseInt(t):t)?e.list.find(e=>e.id==t):void 0,e.hasFeeds=()=>e.list.length>0,e.create=function(a,n){const o=new t({id:null,name:s(a),options:new r.a.Options(n)});return e.list.push(o),o},e.duplicate=function(a){const n=new t({id:null,name:"Copy of "+a.name,usages:[],options:a.options});return i.a.restApi.saveFeed(n).then(a=>{const n=new t(a.data.feed);return e.list.push(n),n})},e.saveFeed=function(a){return i.a.restApi.saveFeed(a).then(n=>{const o=new t(n.data.feed);if(null===a.id)e.list.push(o);else{const t=e.list.findIndex(e=>e.id===a.id);e.list[t]=o}return o})},e.deleteFeed=function(t){const a=null!==t.id?e.list.findIndex(e=>e.id===t.id):e.list.findIndex(e=>e===t);return a>=0&&e.list.splice(a,1),null!==t.id?i.a.restApi.deleteFeed(t.id).catch(e=>{}):new Promise(e=>e())};const n=new RegExp("([\\w\\s]+)\\s?\\((\\d+)\\)?");function s(t){const a=u(t)[0],n=e.list.map(e=>u(e.name)).filter(e=>e[0]===a),o=n.reduce((e,t)=>Math.max(e,t[1]),1);return n.length>0?`${a} (${o+1})`:t.trim()}function u(e){e=e.trim();const t=n.exec(e);return t?[t[1].trim(),parseInt(t[2])]:[e,0]}}(n||(n={}))},400:function(e,t,a){e.exports={"pro-pill":"SpoilerProLabel__pro-pill",proPill:"SpoilerProLabel__pro-pill"}},401:function(e,t,a){e.exports={pill:"ProPill__pill"}},403:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n);a(361);const r=({children:e})=>o.a.createElement("div",{className:"button-group"},e)},405:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),r=a(10),l=(a(479),function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a});const i=e=>{var{className:t,unit:a}=e,n=l(e,["className","unit"]);const i=Object(r.b)("unit-input__field",t);return o.a.createElement("div",{className:"unit-input"},o.a.createElement("input",Object.assign({},n,{className:i})),o.a.createElement("div",{className:"unit-input__unit"},o.a.createElement("span",null,a)))}},410:function(e,t,a){"use strict";var n=a(0),o=a.n(n),r=a(63),l=a(138),i=a(25),c=a(133),s=a(19),u=a(7);t.a=Object(u.b)((function({isOpen:e,onClose:t,onSave:a}){return o.a.createElement(r.a,{title:"Global filters",isOpen:e,onClose:()=>{i.c.isDirty&&!confirm("You have unsaved changes. If you close the window now, your settings will not be saved. Click OK to close anyway.")||t()}},o.a.createElement(r.a.Content,null,o.a.createElement(c.a,{page:s.a.settings.pages.find(e=>"filters"===e.id)})),o.a.createElement(r.a.Footer,null,o.a.createElement(l.a,{disabled:!i.c.isDirty,isSaving:i.c.isSaving,onClick:()=>{i.c.save().then(()=>{a&&a()})}})))}))},411:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n),r=a(10);a(588);const l=({name:e,className:t,disabled:a,value:n,onChange:l,options:i})=>{const c=e=>{!a&&e.target.checked&&l&&l(e.target.value)},s=Object(r.b)(Object(r.a)("radio-group",{"--disabled":a}),t);return o.a.createElement("div",{className:s},i.map((t,a)=>o.a.createElement("label",{className:"radio-group__option",key:a},o.a.createElement("input",{type:"radio",name:e,value:t.value,checked:n===t.value,onChange:c}),o.a.createElement("span",null,t.label))))}},412:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n);a(589);const r=({size:e})=>{const t=(e=null!=e?e:24)+"px",a={width:t,height:t,boxShadow:`${.25*e+"px"} 0 0 ${.375*e+"px"} #999 inset`};return o.a.createElement("span",{className:"loading-spinner",style:a})}},414:function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),o=a.n(n),r=a(237),l=a.n(r),i=a(639),c=a(427),s=a(30),u=a(66);function m({notification:e}){const t=o.a.useRef();return Object(n.useEffect)(()=>{if(!t.current)return;const e=t.current.getElementsByTagName("a");for(let t=0;t<e.length;++t){const a=e.item(t);if("true"===a.getAttribute("data-sli-link"))continue;const n=a.getAttribute("href");if("string"!=typeof n||!n.startsWith("app://"))continue;const o=Object(u.parse)(n.substr("app://".length)),r=s.a.at(o),l=s.a.fullUrl(o);a.setAttribute("href",l),a.setAttribute("data-sli-link","true"),a.addEventListener("click",e=>{s.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()})}},[t.current]),o.a.createElement("article",{className:l.a.root},e.title&&e.title.length&&o.a.createElement("header",{className:l.a.title},e.title),o.a.createElement("main",{ref:t,className:l.a.content,dangerouslySetInnerHTML:{__html:e.content}}),e.date&&o.a.createElement("footer",{className:l.a.date},Object(i.a)(Object(c.a)(e.date),{addSuffix:!0})))}},415:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),r=a(416),l=a.n(r),i=a(10);function c(){return o.a.createElement("div",{className:Object(i.b)(l.a.modalLayer,"spotlight-modal-target")})}},416:function(e,t,a){e.exports={"modal-layer":"ModalLayer__modal-layer",modalLayer:"ModalLayer__modal-layer"}},452:function(e,t,a){},453:function(e,t,a){},454:function(e,t,a){},47:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(3),r=a(46),l=a(19),i=a(1),c=a(640),s=a(638),u=a(427);!function(e){let t=null,a=null;e.State=window.SliAccountManagerState=Object(i.o)({accessToken:null,connectSuccess:!1,connectedId:null});const n=Object(c.a)(new Date,{days:7});function m(t,a,n){n&&n(e.State.connectedId),setTimeout(()=>o.b.loadAccounts().then(()=>{const t=o.b.getById(e.State.connectedId),n=new p(e.ACCOUNT_CONNECTED_EVENT,t);document.dispatchEvent(n),a(e.State.connectedId)}),t)}function d(e){return e.type===o.a.Type.BUSINESS&&e.accessToken&&e.accessToken.expiry&&Object(s.a)(n,Object(u.a)(e.accessToken.expiry))}e.manualConnectPersonal=function(t,a=0,n){return new Promise((o,r)=>{e.State.connectSuccess=!1,l.a.restApi.connectPersonal(t).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(a,o,n)}).catch(r)})},e.manualConnectBusiness=function(t,a,n=0,o){return new Promise((r,i)=>{e.State.connectSuccess=!1,l.a.restApi.connectBusiness(t,a).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(n,r,o)}).catch(i)})},e.openAuthWindow=function(n,i=0,c){return new Promise((s,u)=>{if(e.State.connectedId=null,null==t||t.closed){const e=Object(r.a)(700,800),a=n===o.a.Type.PERSONAL?l.a.restApi.config.personalAuthUrl:l.a.restApi.config.businessAuthUrl;t=Object(r.c)(a,"_blank",Object.assign({dependent:"yes",resizable:"yes",toolbar:"no",location:"no",scrollbars:"no"},e))}else t.focus();null==t||t.closed||(a=setInterval(()=>{t&&!t.closed||(clearInterval(a),null===e.State.connectedId?u&&u():m(i,s,c))},500))})},e.updateAccount=function(e){return l.a.restApi.updateAccount(e)},e.deleteAccount=function(e){return l.a.restApi.deleteAccount(e).then(o.b.loadFromResponse)},e.getExpiringTokenAccounts=function(){return o.b.list.filter(d)},e.isTokenExpiring=d,e.ACCOUNT_CONNECTED_EVENT="sli/account/connected";class p extends CustomEvent{constructor(e,t){super(e,{detail:{account:t}})}}e.AccountConnectedEvent=p}(n||(n={}))},471:function(e,t,a){},479:function(e,t,a){},51:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n,o=a(1),r=a(115),l=a(228),i=a(0),c=a.n(i),s=a(232),u=a.n(s),m=a(19);function d({message:e,children:t}){return c.a.createElement("div",null,c.a.createElement("p",{className:u.a.heading},"Spotlight has encountered an error:"),c.a.createElement("p",{className:u.a.message},e),t&&c.a.createElement("pre",{className:u.a.details},t),c.a.createElement("p",{className:u.a.footer},"If this error persists, kindly"," ",c.a.createElement("a",{href:m.a.resources.supportUrl,target:"_blank"},"contact customer support"),"."))}!function(e){const t=o.o.array([]);e.DEFAULT_TTL=5e3,e.NO_TTL=0,e.getAll=()=>t,e.add=Object(o.f)((a,n,o)=>{e.remove(a),o=Math.max(null!=o?o:e.DEFAULT_TTL,e.NO_TTL),t.push({key:a,component:n,ttl:o})}),e.remove=Object(o.f)(e=>{t.replace(t.filter(t=>t.key!==e))}),e.message=function(e){return Object(r.a)(l.a,{message:e})},e.error=function(e,t){return Object(r.a)(d,{message:e,children:t})}}(n||(n={}))},586:function(e,t,a){},588:function(e,t,a){},589:function(e,t,a){},63:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),o=a.n(n),r=a(42),l=a.n(r),i=a(141),c=a.n(i),s=a(10),u=a(18),m=a(9),d=a(8);function p({children:e,className:t,isOpen:a,icon:r,title:i,width:m,height:d,onClose:b,allowShadeClose:_,focusChild:g,portalTo:f}){const h=o.a.useRef(),[v]=Object(u.a)(a,!1,p.ANIMATION_DELAY);if(Object(u.d)("keydown",e=>{"Escape"===e.key&&(b&&b(),e.preventDefault(),e.stopPropagation())},[],[b]),Object(n.useEffect)(()=>{h&&h.current&&a&&(null!=g?g:h).current.focus()},[]),!v)return null;const E={width:m=null!=m?m:600,height:d},y=Object(s.b)(c.a.modal,a?c.a.opening:c.a.closing,t,"wp-core-ui-override");_=null==_||_;const O=o.a.createElement("div",{className:y},o.a.createElement("div",{className:c.a.shade,tabIndex:-1,onClick:()=>{_&&b&&b()}}),o.a.createElement("div",{ref:h,className:c.a.container,style:E,tabIndex:-1},i?o.a.createElement(p.Header,null,o.a.createElement("h1",null,o.a.createElement(p.Icon,{icon:r}),i),o.a.createElement(p.CloseBtn,{onClick:b})):null,e));let C=f;if(void 0===C){const e=document.getElementsByClassName("spotlight-modal-target");C=0===e.length?document.body:e.item(0)}return l.a.createPortal(O,C)}!function(e){e.ANIMATION_DELAY=120,e.CloseBtn=({onClick:e})=>o.a.createElement(m.a,{className:c.a.closeBtn,type:m.c.NONE,onClick:e,tooltip:"Close"},o.a.createElement(d.a,{icon:"no-alt"})),e.Icon=({icon:e})=>e?o.a.createElement(d.a,{icon:e,className:c.a.icon}):null,e.Header=({children:e})=>o.a.createElement("div",{className:c.a.header},e),e.Content=({children:e})=>o.a.createElement("div",{className:c.a.scroller},o.a.createElement("div",{className:c.a.content},e)),e.Footer=({children:e})=>o.a.createElement("div",{className:c.a.footer},e)}(p||(p={}))},72:function(e,t,a){"use strict";a.d(t,"b",(function(){return m})),a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),r=a(398),l=a(252),i=a(397),c=a(210),s=a.n(c),u=a(10);const m=(e={})=>({option:(e,t)=>Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"24px"}),menu:(e,t)=>Object.assign(Object.assign({},e),{margin:"6px 0",boxShadow:"0 2px 8px "+s.a.shadowColor,overflow:"hidden"}),menuList:(e,t)=>({padding:"0px"}),control:(e,t)=>{let a=Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"2",minHeight:"40px"});return t.isFocused&&(a.borderColor=s.a.primaryColor,a.boxShadow="0 0 0 1px "+s.a.primaryColor),a},valueContainer:(e,t)=>Object.assign(Object.assign({},e),{paddingTop:0,paddingBottom:0,paddingRight:0}),container:(t,a)=>Object.assign(Object.assign({},t),{width:e.width||"100%"}),multiValue:(e,t)=>Object.assign(Object.assign({},e),{padding:"0 6px"}),input:(e,t)=>Object.assign(Object.assign({},e),{outline:"0 transparent !important",border:"0 transparent !important",boxShadow:"0 0 0 transparent !important"}),indicatorSeparator:(e,t)=>Object.assign(Object.assign({},e),{margin:"0",backgroundColor:"transparent"})}),d=o.a.forwardRef((e,t)=>{var a;const n=(null!==(a=e.options)&&void 0!==a?a:[]).find(t=>t.value===e.value);e=Object.assign(Object.assign({},e),{id:void 0,className:Object(u.b)("react-select",e.className),classNamePrefix:"react-select",inputId:e.id,menuPosition:"fixed"});const c=m(e),d=e.isCreatable?l.a:e.async?i.a:r.a;return o.a.createElement(d,Object.assign({},e,{ref:t,isSearchable:e.isCreatable,value:n,styles:c,theme:e=>Object.assign(Object.assign({},e),{borderRadius:3,colors:Object.assign(Object.assign({},e.colors),{primary:s.a.primaryColor,primary25:s.a.washedColor})}),menuPlacement:"auto",menuShouldScrollIntoView:!0}))})},81:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),r=a(10),l=(a(453),a(8)),i=a(18);const c=o.a.forwardRef((function({label:e,className:t,isOpen:a,defaultOpen:n,showIcon:c,disabled:s,stealth:u,fitted:m,scrollIntoView:d,hideOnly:p,onClick:b,children:_},g){p=null!=p&&p,c=null==c||c,s=null!=s&&s,d=null!=d&&d;const[f,h]=o.a.useState(!!n),v=void 0!==a;v||(a=f);const E=o.a.useRef(),y=Object(i.k)(E),O=()=>{s||(!a&&d&&y(),v||h(!a),b&&b())},C=a&&void 0===b&&!c,N=C?void 0:0,w=C?void 0:"button",A=Object(r.a)("spoiler",{"--open":a,"--disabled":s,"--fitted":m,"--stealth":u,"--static":C}),k=Object(r.b)(A,t),T=a?"arrow-up-alt2":"arrow-down-alt2",S=Array.isArray(e)?e.map((e,t)=>o.a.createElement(o.a.Fragment,{key:t},e)):"string"==typeof e?o.a.createElement("span",null,e):e;return o.a.createElement("div",{ref:Object(r.d)(E,g),className:k},o.a.createElement("div",{className:"spoiler__header",onClick:O,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||O()},role:w,tabIndex:N},o.a.createElement("div",{className:"spoiler__label"},S),c&&o.a.createElement(l.a,{icon:T,className:"spoiler__icon"})),(a||p)&&o.a.createElement("div",{className:"spoiler__content"},_))}))},89:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),r=a(274),l=a.n(r),i=a(63),c=a(9);function s({children:e,title:t,buttons:a,onAccept:n,onCancel:r,isOpen:s,okDisabled:u,cancelDisabled:m}){a=null!=a?a:["OK","Cancel"];const d=()=>r&&r();return o.a.createElement(i.a,{isOpen:s,title:t,onClose:d,className:l.a.root},o.a.createElement(i.a.Content,null,"string"==typeof e?o.a.createElement("p",null,e):e),o.a.createElement(i.a.Footer,null,o.a.createElement(c.a,{className:l.a.button,type:c.c.SECONDARY,onClick:d,disabled:m},a[1]),o.a.createElement(c.a,{className:l.a.button,type:c.c.PRIMARY,onClick:()=>n&&n(),disabled:u},a[0])))}},9:function(e,t,a){"use strict";a.d(t,"c",(function(){return n})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return u}));var n,o,r=a(0),l=a.n(r),i=a(10),c=a(251),s=(a(361),a(4));!function(e){e[e.PRIMARY=0]="PRIMARY",e[e.SECONDARY=1]="SECONDARY",e[e.TOGGLE=2]="TOGGLE",e[e.LINK=3]="LINK",e[e.PILL=4]="PILL",e[e.DANGER=5]="DANGER",e[e.DANGER_LINK=6]="DANGER_LINK",e[e.DANGER_PILL=7]="DANGER_PILL",e[e.NONE=8]="NONE"}(n||(n={})),function(e){e[e.SMALL=0]="SMALL",e[e.NORMAL=1]="NORMAL",e[e.LARGE=2]="LARGE",e[e.HERO=3]="HERO"}(o||(o={}));const u=l.a.forwardRef((e,t)=>{let{children:a,className:r,type:u,size:m,active:d,tooltip:p,tooltipPlacement:b,onClick:_,linkTo:g}=e,f=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children","className","type","size","active","tooltip","tooltipPlacement","onClick","linkTo"]);u=null!=u?u:n.SECONDARY,m=null!=m?m:o.NORMAL,b=null!=b?b:"bottom";const[h,v]=l.a.useState(!1),E=()=>v(!0),y=()=>v(!1),O=Object(i.b)(r,u!==n.NONE?"button":null,u===n.PRIMARY?"button-primary":null,u===n.SECONDARY?"button-secondary":null,u===n.LINK?"button-secondary button-tertiary":null,u===n.PILL?"button-secondary button-tertiary button-pill":null,u===n.TOGGLE?"button-toggle":null,u===n.TOGGLE&&d?"button-primary button-active":null,u!==n.TOGGLE||d?null:"button-secondary",u===n.DANGER?"button-secondary button-danger":null,u===n.DANGER_LINK?"button-tertiary button-danger":null,u===n.DANGER_PILL?"button-tertiary button-danger button-danger-pill":null,m===o.SMALL?"button-small":null,m===o.LARGE?"button-large":null,m===o.HERO?"button-hero":null),C=e=>{_&&_(e)};let N="button";if("string"==typeof g?(N="a",f.href=g):f.type="button",f.tabIndex=0,!p)return l.a.createElement(N,Object.assign({ref:t,className:O,onClick:C},f),a);const w="string"==typeof p,A="btn-tooltip-"+Object(s.q)(),k=w?p:l.a.createElement(p,{id:A});return l.a.createElement(c.a,{visible:h&&!e.disabled,placement:b,delay:300},({ref:e})=>l.a.createElement(N,Object.assign({ref:t?Object(i.d)(e,t):e,className:O,onClick:C,onMouseEnter:E,onMouseLeave:y},f),a),k)})},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),o=a.n(n),r=a(275),l=a.n(r),i=a(425),c=a(18),s=a(16),u=a(197),m=a(336),d=a(337),p=a(10),b=a(19);function _({id:e,value:t,disableAlpha:a,onChange:r}){t=null!=t?t:"#fff";const[_,g]=o.a.useState(t),[f,h]=o.a.useState(!1),v=o.a.useRef(),E=o.a.useRef(),y=o.a.useCallback(()=>h(!1),[]),O=o.a.useCallback(()=>h(e=>!e),[]),C=o.a.useCallback(e=>{g(e.rgb),r&&r(e)},[r]),N=o.a.useCallback(e=>{"Escape"===e.key&&f&&(y(),e.preventDefault(),e.stopPropagation())},[f]);Object(n.useEffect)(()=>g(t),[t]),Object(c.b)(v,y,[E]),Object(c.c)([v,E],y),Object(c.d)("keydown",N,[f]);const w={preventOverflow:{boundariesElement:document.getElementById(b.a.config.rootId),padding:5}};return o.a.createElement(u.c,null,o.a.createElement(m.a,null,({ref:t})=>o.a.createElement("button",{ref:Object(p.d)(v,t),id:e,className:l.a.button,onClick:O},o.a.createElement("span",{className:l.a.colorPreview,style:{backgroundColor:Object(s.a)(_)}}))),o.a.createElement(d.a,{placement:"bottom-end",positionFixed:!0,modifiers:w},({ref:e,style:t})=>f&&o.a.createElement("div",{className:l.a.popper,ref:Object(p.d)(E,e),style:t},o.a.createElement(i.a,{color:_,onChange:C,disableAlpha:a}))))}},98:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),r=a(401),l=a.n(r),i=a(19),c=a(10);const s=({className:e,children:t})=>{const a=o.a.useCallback(()=>{window.open(i.a.resources.pricingUrl,"_blank")},[]);return o.a.createElement("span",{className:Object(c.b)(l.a.pill,e),onClick:a,tabIndex:-1},"PRO",t)}}}]);
ui/dist/common.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[6],{0:function(t,o){t.exports=e},10:function(e,t,o){"use strict";function a(...e){return e.filter(e=>!!e).join(" ")}function n(e){return a(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return i})),o.d(t,"e",(function(){return r})),o.d(t,"d",(function(){return l}));const r={onMouseDown:e=>e.preventDefault()};function l(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},11:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(15),i=o(12),r=o(4);!function(e){function t(e){return e?c(e.type):void 0}function o(e){var o;if("object"!=typeof e)return!1;const a=t(e);return void 0!==a&&a.isValid(null!==(o=e.config)&&void 0!==o?o:{})}function a(t){return t?e.getPromoFromDictionary(t,n.a.config.globalPromotions):void 0}function l(e){const t=s(e);return void 0===t?void 0:t.promotion}function s(t){if(t)for(const o of n.a.config.autoPromotions){const a=e.Automation.getType(o),n=e.Automation.getConfig(o);if(a&&a.matches(t,n))return o}}function c(t){return e.types.find(e=>e.id===t)}let d;e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getType=t,e.isValid=o,e.getPromoFromDictionary=function(t,o){const a=i.a.get(o,t.id);if(a)return e.getType(a)?a:void 0},e.getPromo=function(e){return Object(r.j)(o,[()=>a(e),()=>l(e)])},e.getGlobalPromo=a,e.getAutoPromo=l,e.getAutomation=s,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?o(e.type):void 0},e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function o(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=o,e.clearTypes=function(){t.splice(0,t.length)}}(d=e.Automation||(e.Automation={}))}(a||(a={}))},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function o(e,t){return(null!=e?e:{})[t.toString()]}function a(e,t,o){return(e=null!=e?e:{})[t.toString()]=o,e}e.has=t,e.get=o,e.set=a,e.ensure=function(o,n,i){return t(o,n)||a(o,n,i),e.get(o,n)},e.withEntry=function(t,o,a){return e.set(Object(n.g)(null!=t?t:{}),o,a)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,o){return e.remove(Object(n.g)(null!=t?t:{}),o)},e.at=function(t,a){return o(t,e.keys(t)[a])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,o){const a={};return e.forEach(t,(e,t)=>a[e]=o(t,e)),a},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(n.l)(e,t)},e.forEach=function(t,o){e.keys(t).forEach(e=>o(e,t[e]))},e.fromArray=function(t){const o={};return t.forEach(([t,a])=>e.set(o,t,a)),o},e.fromMap=function(t){const o={};return t.forEach((t,a)=>e.set(o,a,t)),o}}(a||(a={}))},14:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaPopupBox__container layout__flex-box",horizontal:"MediaPopupBox__horizontal MediaPopupBox__container layout__flex-box",vertical:"MediaPopupBox__vertical MediaPopupBox__container layout__flex-box",layer:"MediaPopupBox__layer layout__flex-box",control:"MediaPopupBox__control","control-label":"MediaPopupBox__control-label",controlLabel:"MediaPopupBox__control-label","control-icon":"MediaPopupBox__control-icon",controlIcon:"MediaPopupBox__control-icon","close-button":"MediaPopupBox__close-button MediaPopupBox__control",closeButton:"MediaPopupBox__close-button MediaPopupBox__control","nav-layer":"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box",navLayer:"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box","nav-boundary":"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box",navBoundary:"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box","nav-aligner":"MediaPopupBox__nav-aligner layout__flex-box",navAligner:"MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-sidebar":"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerSidebar:"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-no-sidebar":"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerNoSidebar:"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-btn":"MediaPopupBox__nav-btn MediaPopupBox__control",navBtn:"MediaPopupBox__nav-btn MediaPopupBox__control","prev-btn":"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control",prevBtn:"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control","next-btn":"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control",nextBtn:"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control","modal-layer":"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box",modalLayer:"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box","modal-aligner":"MediaPopupBox__modal-aligner layout__flex-box",modalAligner:"MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-sidebar":"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerSidebar:"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-no-sidebar":"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerNoSidebar:"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modal:"MediaPopupBox__modal","no-scroll":"MediaPopupBox__no-scroll",noScroll:"MediaPopupBox__no-scroll"}},15:function(e,t,o){"use strict";var a,n=o(11);let i;t.a=i={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(a=SliCommonL10n.globalPromotions)&&void 0!==a?a:{}},image:e=>`${i.config.imagesUrl}/${e}`},n.a.registerType({id:"link",label:"Link",isValid:()=>!1}),n.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),n.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},16:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));const a=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},17:function(e,t,o){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},18:function(e,t,o){"use strict";o.d(t,"j",(function(){return l})),o.d(t,"f",(function(){return s})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return d})),o.d(t,"a",(function(){return u})),o.d(t,"n",(function(){return m})),o.d(t,"h",(function(){return p})),o.d(t,"l",(function(){return h})),o.d(t,"k",(function(){return _})),o.d(t,"e",(function(){return f})),o.d(t,"d",(function(){return g})),o.d(t,"m",(function(){return y})),o.d(t,"g",(function(){return b})),o.d(t,"i",(function(){return v}));var a=o(0),n=o.n(a),i=o(60),r=o(46);function l(e,t){!function(e,t,o){const a=n.a.useRef(!0);e(()=>{a.current=!0;const e=t(()=>new Promise(e=>{a.current&&e()}));return()=>{a.current=!1,e&&e()}},o)}(a.useEffect,e,t)}function s(e){const[t,o]=n.a.useState(e),a=n.a.useRef(t);return[t,()=>a.current,e=>o(a.current=e)]}function c(e,t,o=[]){function n(a){!e.current||e.current.contains(a.target)||o.some(e=>e&&e.current&&e.current.contains(a.target))||t(a)}Object(a.useEffect)(()=>(document.addEventListener("mousedown",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchend",n)}))}function d(e,t){Object(a.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function u(e,t,o=100){const[i,r]=n.a.useState(e);return Object(a.useEffect)(()=>{let a=null;return e===t?a=setTimeout(()=>r(t),o):r(!t),()=>{null!==a&&clearTimeout(a)}},[e]),[i,r]}function m(e){const[t,o]=n.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(a.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){Object(a.useEffect)(()=>{const o=o=>{if(t)return(o||window.event).returnValue=e,e};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[t])}function _(e,t){const o=n.a.useRef(!1);return Object(a.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(e,t,o,n=[],i=[]){Object(a.useEffect)(()=>(n.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function g(e,t,o=[],a=[]){f(document,e,t,o,a)}function y(e,t,o=[],a=[]){f(window,e,t,o,a)}function b(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function v(e){const[t,o]=n.a.useState(e);return[function(e){const t=n.a.useRef(e);return t.current=e,t}(t),o]}o(53)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(1),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return a(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const a=l(this,t,e);return new o(a.desktop,a.tablet,a.phone)}}function a(e,t,o=!1){if(!e)return;const a=e[t.prop];return o&&null==a?e.desktop:a}function r(e,t,o){return e[o.prop]=t,e}function l(e,t,a){return r(new o(e.desktop,e.tablet,e.phone),t,a)}i([n.o],o.prototype,"desktop",void 0),i([n.o],o.prototype,"tablet",void 0),i([n.o],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const a=e.MODES.findIndex(e=>e===o);return void 0===a?t.DESKTOP:e.MODES[(a+1)%e.MODES.length]},e.get=a,e.set=r,e.withValue=l,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(a||(a={}))},20:function(e,t,o){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},21:function(e,t,o){e.exports={container:"MediaInfo__container",padded:"MediaInfo__padded",bordered:"MediaInfo__bordered",header:"MediaInfo__header MediaInfo__padded MediaInfo__bordered","source-img":"MediaInfo__source-img",sourceImg:"MediaInfo__source-img","source-img-link":"MediaInfo__source-img-link MediaInfo__source-img",sourceImgLink:"MediaInfo__source-img-link MediaInfo__source-img","source-name":"MediaInfo__source-name",sourceName:"MediaInfo__source-name","comments-scroller":"MediaInfo__comments-scroller",commentsScroller:"MediaInfo__comments-scroller","comments-list":"MediaInfo__comments-list MediaInfo__padded",commentsList:"MediaInfo__comments-list MediaInfo__padded",comment:"MediaInfo__comment",footer:"MediaInfo__footer","footer-info":"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered",footerInfo:"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered","footer-info-line":"MediaInfo__footer-info-line",footerInfoLine:"MediaInfo__footer-info-line","num-likes":"MediaInfo__num-likes MediaInfo__footer-info-line",numLikes:"MediaInfo__num-likes MediaInfo__footer-info-line",date:"MediaInfo__date MediaInfo__footer-info-line","footer-link":"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered",footerLink:"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered","footer-link-icon":"MediaInfo__footer-link-icon",footerLinkIcon:"MediaInfo__footer-link-icon"}},22:function(e,t,o){"use strict";var a=o(51),n=o.n(a),i=o(15),r=o(53);const l=i.a.config.restApi.baseUrl,s={};i.a.config.restApi.authToken&&(s["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=n.a.create({baseURL:l,headers:s});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const d={config:Object.assign(Object.assign({},i.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,a)=>{const i=a?new n.a.CancelToken(a):void 0;return new Promise((a,n)=>{const r=e=>{a(e),document.dispatchEvent(new Event(d.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(a=>{a&&a.data.needImport?d.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(r).catch(n)}).catch(n):r(a)}).catch(n)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,o)=>{document.dispatchEvent(new Event(d.events.onImportStart));const a=e=>{document.dispatchEvent(new Event(d.events.onImportFail)),o(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(d.events.onImportEnd)),t(e)):a(e)}).catch(a)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=d},23:function(e,t,o){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username","date-container":"MediaOverlay__date-container",dateContainer:"MediaOverlay__date-container",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},27:function(e,t,o){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},28:function(e,t,o){e.exports={reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation","flex-box":"layout__flex-box",flexBox:"layout__flex-box",album:"MediaPopupBoxAlbum__album",frame:"MediaPopupBoxAlbum__frame",scroller:"MediaPopupBoxAlbum__scroller",child:"MediaPopupBoxAlbum__child","controls-layer":"MediaPopupBoxAlbum__controls-layer layout__flex-box",controlsLayer:"MediaPopupBoxAlbum__controls-layer layout__flex-box","controls-container":"MediaPopupBoxAlbum__controls-container",controlsContainer:"MediaPopupBoxAlbum__controls-container","nav-button":"MediaPopupBoxAlbum__nav-button",navButton:"MediaPopupBoxAlbum__nav-button","prev-button":"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button",prevButton:"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button","next-button":"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button",nextButton:"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button","indicator-list":"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicatorList:"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicator:"MediaPopupBoxAlbum__indicator","indicator-current":"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator",indicatorCurrent:"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator"}},29:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"d",(function(){return s})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return d})),o(5);var a=o(65),n=o(0),i=o.n(n),r=o(4);function l(e,t){const o=t.map(a.b).join("|");return new RegExp(`#(${o})(?:\\b|\\r|#|$)`,"imu").test(e)}function s(e,t,o=0,a=!1){let l=e.trim();a&&(l=l.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const s=l.split("\n"),c=s.map((e,o)=>{if(e=e.trim(),a&&/^[.*•]$/.test(e))return null;let l,c=[];for(;null!==(l=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+l[1],o=i.a.createElement("a",{href:t,target:"_blank",key:Object(r.p)()},l[0]),a=e.substr(0,l.index),n=e.substr(l.index+l[0].length);c.push(a),c.push(o),e=n}return e.length&&c.push(e),t&&(c=t(c,o)),s.length>1&&c.push(i.a.createElement("br",{key:Object(r.p)()})),i.a.createElement(n.Fragment,{key:Object(r.p)()},c)});return o>0?c.slice(0,o):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function d(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(22),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(a||(a={}));const r=Object(i.o)([]),l="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",s=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===a.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(i.o)(e))),r}function u(e){if("object"==typeof e&&Array.isArray(e.data))return d(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:l,getById:s,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==s(e)),idsToAccounts:e=>e.map(e=>s(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===a.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===a.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:l,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return n.a.getAccounts().then(u).catch(e=>{throw n.a.getErrorReason(e)})},loadFromResponse:u,addAccounts:d}},32:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaViewer__container layout__flex-box",horizontal:"MediaViewer__horizontal MediaViewer__container layout__flex-box",vertical:"MediaViewer__vertical MediaViewer__container layout__flex-box",wrapper:"MediaViewer__wrapper layout__flex-box","wrapper-sidebar":"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",wrapperSidebar:"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",sidebar:"MediaViewer__sidebar","media-frame":"MediaViewer__media-frame layout__flex-box",mediaFrame:"MediaViewer__media-frame layout__flex-box","media-container":"MediaViewer__media-container",mediaContainer:"MediaViewer__media-container","media-sizer":"MediaViewer__media-sizer layout__flex-box",mediaSizer:"MediaViewer__media-sizer layout__flex-box",media:"MediaViewer__media"}},33:function(e,t,o){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},39:function(e,t,o){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},4:function(e,t,o){"use strict";o.d(t,"p",(function(){return r})),o.d(t,"g",(function(){return l})),o.d(t,"a",(function(){return s})),o.d(t,"q",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"d",(function(){return u})),o.d(t,"l",(function(){return m})),o.d(t,"k",(function(){return p})),o.d(t,"h",(function(){return h})),o.d(t,"e",(function(){return _})),o.d(t,"o",(function(){return f})),o.d(t,"n",(function(){return g})),o.d(t,"m",(function(){return y})),o.d(t,"j",(function(){return b})),o.d(t,"f",(function(){return v})),o.d(t,"c",(function(){return x})),o.d(t,"i",(function(){return M}));var a=o(169),n=o(170);let i=0;function r(){return i++}function l(e){const t={};return Object.keys(e).forEach(o=>{const a=e[o];Array.isArray(a)?t[o]=a.slice():a instanceof Map?t[o]=new Map(a.entries()):t[o]="object"==typeof a?l(a):a}),t}function s(e,t){return Object.keys(t).forEach(o=>{e[o]=t[o]}),e}function c(e,t){return s(l(e),t)}function d(e,t){return Array.isArray(e)&&Array.isArray(t)?u(e,t):e instanceof Map&&t instanceof Map?u(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?m(e,t):e===t}function u(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;++a)if(o){if(!o(e[a],t[a]))return!1}else if(!d(e[a],t[a]))return!1;return!0}function m(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return d(e,t);const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const n=new Set(o.concat(a));for(const o of n)if(!d(e[o],t[o]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function _(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function f(e,t){const o=/(\s+)/g;let a,n=0,i=0,r="";for(;null!==(a=o.exec(e))&&n<t;){const t=a.index+a[1].length;r+=e.substr(i,t-i),i=t,n++}return i<e.length&&(r+=" ..."),r}function g(e){return Object(a.a)(Object(n.a)(e),{addSuffix:!0})}function y(e,t){const o=[];return e.forEach((e,a)=>{const n=a%t;Array.isArray(o[n])?o[n].push(e):o[n]=[e]}),o}function b(e,t){for(const o of t){const t=o();if(e(t))return t}}function v(e,t){return Math.max(0,Math.min(t.length-1,e))}function x(e,t,o){const a=e.slice();return a[t]=o,a}function M(e){return Array.isArray(e)?e[0]:e}},40:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));class a{static getById(e){const t=a.list.find(t=>t.id===e);return!t&&a.list.length>0?a.list[0]:t}static getName(e){const t=a.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){a.list.push(e)}}a.list=[]},42:function(e,o){e.exports=t},45:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,o){"use strict";function a(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function n(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},49:function(e,t,o){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},5:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(12),i=o(3);!function(e){let t,o,a;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let o;function a(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!n.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[o.SMALL]:t.thumbnail,[o.MEDIUM]:t.thumbnail,[o.LARGE]:t.thumbnail}}return{[o.SMALL]:t.url,[o.MEDIUM]:t.url,[o.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(o=t.Size||(t.Size={})),t.get=function(e,t){const o=a(e);return n.a.get(o,t)||(r(e)?e.thumbnail:e.url)},t.getMap=a,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!n.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var a;let i=[];n.a.has(e.thumbnails,o.SMALL)&&i.push(n.a.get(e.thumbnails,o.SMALL)+` ${t.s}w`),n.a.has(e.thumbnails,o.MEDIUM)&&i.push(n.a.get(e.thumbnails,o.MEDIUM)+` ${t.m}w`);const r=null!==(a=n.a.get(e.thumbnails,o.LARGE))&&void 0!==a?a:e.url;return i.push(r+` ${t.l}w`),i}}(o=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function o(e){switch(e){case t.PERSONAL_ACCOUNT:return i.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return i.a.Type.BUSINESS;default:return}}function a(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===i.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=o,e.getHashtagSort=a,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const n=[],r=[],l=[],s=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:a(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const d=i.b.getByUsername(e.name),u=d?o(e.type):null;d&&d.type===u?e.type===t.TAGGED_ACCOUNT?r.push(d):e.type===t.USER_STORY?l.push(d):n.push(d):s.push(e)}}),{accounts:n,tagged:r,stories:l,hashtags:c,misc:s}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(a=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===a.Type.POPULAR_HASHTAG||e.source.type===a.Type.RECENT_HASHTAG,e.isNotAChild=r}(a||(a={}))},50:function(e,t,o){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},53:function(e,t,o){"use strict";function a(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function n(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}))},54:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var a=o(0),n=o.n(a),i=o(45),r=o.n(i),l=o(104),s=o(5),c=o(72),d=o.n(c);function u(){return n.a.createElement("div",{className:d.a.root})}var m=o(10);function p(e){var{media:t,className:o,size:i,onLoadImage:c,width:d,height:p}=e,h=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["media","className","size","onLoadImage","width","height"]);const _=n.a.useRef(),f=n.a.useRef(),[g,y]=n.a.useState(!s.a.Thumbnails.has(t)),[b,v]=n.a.useState(!0),[x,M]=n.a.useState(!1);function E(){if(_.current){const e=null!=i?i:function(){const e=_.current.getBoundingClientRect();return e.width<=320?s.a.Thumbnails.Size.SMALL:e.width<=600?s.a.Thumbnails.Size.MEDIUM:s.a.Thumbnails.Size.LARGE}(),o=s.a.Thumbnails.get(t,e);_.current.src!==o&&(_.current.src=o)}}function S(){P()}function O(){t.type===s.a.Type.VIDEO?y(!0):_.current.src===t.url?M(!0):_.current.src=t.url,P()}function w(){isNaN(f.current.duration)||f.current.duration===1/0?f.current.currentTime=1:f.current.currentTime=f.current.duration/2,P()}function P(){v(!1),c&&c()}return Object(a.useLayoutEffect)(()=>{let e=new l.a(E);return _.current&&(_.current.onload=S,_.current.onerror=O,E(),e.observe(_.current)),f.current&&(f.current.onloadeddata=w),()=>{_.current&&(_.current.onload=()=>null,_.current.onerror=()=>null),f.current&&(f.current.onloadeddata=()=>null),e.disconnect()}},[t,i]),t.url&&t.url.length>0&&!x?n.a.createElement("div",Object.assign({className:Object(m.b)(r.a.root,o)},h),"VIDEO"===t.type&&g?n.a.createElement("video",{ref:f,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},n.a.createElement("source",{src:t.url}),"Your browser does not support videos"):n.a.createElement("img",Object.assign({ref:_,className:r.a.image,loading:"lazy",width:d,height:p,alt:""},m.e)),b&&n.a.createElement(u,null)):n.a.createElement("div",{className:r.a.notAvailable},n.a.createElement("span",null,"Thumbnail not available"))}},55:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",image:"MediaPopupBoxImage__image MediaPopupBoxObject__reset",loading:"MediaPopupBoxImage__loading MediaPopupBoxImage__image MediaPopupBoxObject__reset MediaPopupBoxObject__loading-animation",error:"MediaPopupBoxImage__error MediaPopupBoxImage__image MediaPopupBoxObject__reset layout__flex-box","fade-in-animation":"MediaPopupBoxImage__fade-in-animation",fadeInAnimation:"MediaPopupBoxImage__fade-in-animation"}},56:function(e,t,o){"use strict";function a(e){return t=>(t.stopPropagation(),e(t))}function n(e,t){let o;return(...a)=>{clearTimeout(o),o=setTimeout(()=>{o=null,e(...a)},t)}}function i(){}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},583:function(e,t,o){"use strict";o.r(t);var a=o(40),n=o(92),i=o(0),r=o.n(i);const l={id:"grid",name:"Grid",component:n.a,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))}},s={id:"highlight",name:"Highlight",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:197,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))},isPro:!0},c={id:"masonry",name:"Masonry",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:103,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))},isPro:!0},d={id:"slider",name:"Slider",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:43,y:43,width:214,height:214,rx:2,ry:2}),r.a.createElement("path",{d:"M 25,142 l -16,16 l 16,16"}),r.a.createElement("path",{d:"M 275,142 l 16,16 l -16,16"}))},isPro:!0,isComingSoon:!0};a.a.addLayout(l),a.a.addLayout(s),a.a.addLayout(c),a.a.addLayout(d)},6:function(e,t,o){"use strict";o.d(t,"a",(function(){return y}));var a=o(51),n=o.n(a),i=o(1),r=o(2),l=o(40),s=o(3),c=o(4),d=o(29),u=o(16),m=o(22),p=o(56),h=o(11),_=o(12),f=o(15),g=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class y{constructor(e=new y.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new y.Options(e),this.localMedia=i.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(i.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(i.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(i.p)(()=>this._media,e=>this.media=e),Object(i.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(i.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,y.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),y.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((a,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,a&&a()}).catch(e=>{var t;if(n.a.isCancel(e)||void 0===e.response)return null;const o=new y.Events.FetchFailEvent(y.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}g([i.o],y.prototype,"media",void 0),g([i.o],y.prototype,"canLoadMore",void 0),g([i.o],y.prototype,"stories",void 0),g([i.o],y.prototype,"numLoadedMore",void 0),g([i.o],y.prototype,"options",void 0),g([i.o],y.prototype,"totalMedia",void 0),g([i.o],y.prototype,"mode",void 0),g([i.o],y.prototype,"isLoaded",void 0),g([i.o],y.prototype,"isLoading",void 0),g([i.f],y.prototype,"reload",void 0),g([i.o],y.prototype,"localMedia",void 0),g([i.o],y.prototype,"numMediaShown",void 0),g([i.o],y.prototype,"numMediaToShow",void 0),g([i.o],y.prototype,"numMediaPerPage",void 0),g([i.h],y.prototype,"_media",null),g([i.h],y.prototype,"_numMediaShown",null),g([i.h],y.prototype,"_numMediaPerPage",null),g([i.h],y.prototype,"_canLoadMore",null),g([i.f],y.prototype,"loadMore",null),g([i.f],y.prototype,"load",null),g([i.f],y.prototype,"loadMedia",null),g([i.f],y.prototype,"addLocalMedia",null),function(e){let t,o,a,n,m,p,y,b,v,x;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class M{constructor(e={}){M.setFromObject(this,e)}static setFromObject(t,o={}){var a,n,i,c,d,u,m,p,h,f,g,y,b,v,x;const M=o.accounts?o.accounts.slice():e.DefaultOptions.accounts;t.accounts=M.filter(e=>!!e).map(e=>parseInt(e.toString()));const E=o.tagged?o.tagged.slice():e.DefaultOptions.tagged;return t.tagged=E.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.layout=l.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderPostsPerPage=r.a.normalize(o.sliderPostsPerPage,e.DefaultOptions.sliderPostsPerPage),t.sliderNumScrollPosts=r.a.normalize(o.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(a=o.headerAccount)&&void 0!==a?a:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===s.b.getById(t.headerAccount)?s.b.list.length>0?s.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(n=o.customProfilePic)&&void 0!==n?n:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(c=o.captionRemoveDots)&&void 0!==c?c:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(d=o.likesIconColor)&&void 0!==d?d:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(u=o.lightboxShowSidebar)&&void 0!==u?u:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=o.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(p=o.followBtnText)&&void 0!==p?p:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(h=o.hashtagWhitelistSettings)&&void 0!==h?h:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(g=o.captionWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(y=o.captionBlacklistSettings)&&void 0!==y?y:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(b=o.promotionEnabled)&&void 0!==b?b:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(v=o.autoPromotionsEnabled)&&void 0!==v?v:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(x=o.globalPromotionsEnabled)&&void 0!==x?x:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(o.promotions)?t.promotions=_.a.fromArray(o.promotions):o.promotions&&o.promotions instanceof Map?t.promotions=_.a.fromMap(o.promotions):"object"==typeof o.promotions?t.promotions=o.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=s.b.idsToAccounts(e.accounts),o=s.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:s.b.idsToAccounts(e.accounts),tagged:s.b.idsToAccounts(e.tagged),hashtags:s.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const o=e.Options.getSources(t),a=o.accounts.length>0||o.tagged.length>0,n=o.hashtags.length>0;return a||n}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}g([i.o],M.prototype,"accounts",void 0),g([i.o],M.prototype,"hashtags",void 0),g([i.o],M.prototype,"tagged",void 0),g([i.o],M.prototype,"layout",void 0),g([i.o],M.prototype,"numColumns",void 0),g([i.o],M.prototype,"highlightFreq",void 0),g([i.o],M.prototype,"sliderPostsPerPage",void 0),g([i.o],M.prototype,"sliderNumScrollPosts",void 0),g([i.o],M.prototype,"mediaType",void 0),g([i.o],M.prototype,"postOrder",void 0),g([i.o],M.prototype,"numPosts",void 0),g([i.o],M.prototype,"linkBehavior",void 0),g([i.o],M.prototype,"feedWidth",void 0),g([i.o],M.prototype,"feedHeight",void 0),g([i.o],M.prototype,"feedPadding",void 0),g([i.o],M.prototype,"imgPadding",void 0),g([i.o],M.prototype,"textSize",void 0),g([i.o],M.prototype,"bgColor",void 0),g([i.o],M.prototype,"textColorHover",void 0),g([i.o],M.prototype,"bgColorHover",void 0),g([i.o],M.prototype,"hoverInfo",void 0),g([i.o],M.prototype,"showHeader",void 0),g([i.o],M.prototype,"headerInfo",void 0),g([i.o],M.prototype,"headerAccount",void 0),g([i.o],M.prototype,"headerStyle",void 0),g([i.o],M.prototype,"headerTextSize",void 0),g([i.o],M.prototype,"headerPhotoSize",void 0),g([i.o],M.prototype,"headerTextColor",void 0),g([i.o],M.prototype,"headerBgColor",void 0),g([i.o],M.prototype,"headerPadding",void 0),g([i.o],M.prototype,"customBioText",void 0),g([i.o],M.prototype,"customProfilePic",void 0),g([i.o],M.prototype,"includeStories",void 0),g([i.o],M.prototype,"storiesInterval",void 0),g([i.o],M.prototype,"showCaptions",void 0),g([i.o],M.prototype,"captionMaxLength",void 0),g([i.o],M.prototype,"captionRemoveDots",void 0),g([i.o],M.prototype,"captionSize",void 0),g([i.o],M.prototype,"captionColor",void 0),g([i.o],M.prototype,"showLikes",void 0),g([i.o],M.prototype,"showComments",void 0),g([i.o],M.prototype,"lcIconSize",void 0),g([i.o],M.prototype,"likesIconColor",void 0),g([i.o],M.prototype,"commentsIconColor",void 0),g([i.o],M.prototype,"lightboxShowSidebar",void 0),g([i.o],M.prototype,"numLightboxComments",void 0),g([i.o],M.prototype,"showLoadMoreBtn",void 0),g([i.o],M.prototype,"loadMoreBtnText",void 0),g([i.o],M.prototype,"loadMoreBtnTextColor",void 0),g([i.o],M.prototype,"loadMoreBtnBgColor",void 0),g([i.o],M.prototype,"autoload",void 0),g([i.o],M.prototype,"showFollowBtn",void 0),g([i.o],M.prototype,"followBtnText",void 0),g([i.o],M.prototype,"followBtnTextColor",void 0),g([i.o],M.prototype,"followBtnBgColor",void 0),g([i.o],M.prototype,"followBtnLocation",void 0),g([i.o],M.prototype,"hashtagWhitelist",void 0),g([i.o],M.prototype,"hashtagBlacklist",void 0),g([i.o],M.prototype,"captionWhitelist",void 0),g([i.o],M.prototype,"captionBlacklist",void 0),g([i.o],M.prototype,"hashtagWhitelistSettings",void 0),g([i.o],M.prototype,"hashtagBlacklistSettings",void 0),g([i.o],M.prototype,"captionWhitelistSettings",void 0),g([i.o],M.prototype,"captionBlacklistSettings",void 0),g([i.o],M.prototype,"moderation",void 0),g([i.o],M.prototype,"moderationMode",void 0),e.Options=M;class E{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.d)(Object(c.o)(t,this.captionMaxLength)):t}static compute(t,o=r.a.Mode.DESKTOP){const a=new E({accounts:s.b.filterExisting(t.accounts),tagged:s.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:l.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,o,!0),sliderPostsPerPage:r.a.get(t.sliderPostsPerPage,o,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,o,!0),linkBehavior:r.a.get(t.linkBehavior,o,!0),bgColor:Object(u.a)(t.bgColor),textColorHover:Object(u.a)(t.textColorHover),bgColorHover:Object(u.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,o,!0),headerInfo:r.a.get(t.headerInfo,o,!0),headerStyle:r.a.get(t.headerStyle,o,!0),headerTextColor:Object(u.a)(t.headerTextColor),headerBgColor:Object(u.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,o,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,o,!0),captionMaxLength:r.a.get(t.captionMaxLength,o,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(u.a)(t.captionColor),showLikes:r.a.get(t.showLikes,o,!0),showComments:r.a.get(t.showComments,o,!0),likesIconColor:Object(u.a)(t.likesIconColor),commentsIconColor:Object(u.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(u.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,o,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,o,!0),followBtnTextColor:Object(u.a)(t.followBtnTextColor),followBtnBgColor:Object(u.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:s.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=this.getNumCols(t,o),a.numPosts=this.getNumPosts(t,o),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=t.headerAccount&&a.allAccounts.includes(t.headerAccount)?s.b.getById(t.headerAccount):s.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:s.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==a.account?s.b.getBioText(a.account):"";a.bioText=Object(d.d)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(t.feedWidth,o,"100%"),a.feedHeight=this.normalizeCssSize(t.feedHeight,o,"auto"),a.feedOverflowX=r.a.get(t.feedWidth,o)?"auto":void 0,a.feedOverflowY=r.a.get(t.feedHeight,o)?"auto":void 0,a.feedPadding=this.normalizeCssSize(t.feedPadding,o,"0"),a.imgPadding=this.normalizeCssSize(t.imgPadding,o,"0"),a.textSize=this.normalizeCssSize(t.textSize,o,"inherit",!0),a.headerTextSize=this.normalizeCssSize(t.headerTextSize,o,"inherit"),a.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,o,"50px"),a.captionSize=this.normalizeCssSize(t.captionSize,o,"inherit"),a.lcIconSize=this.normalizeCssSize(t.lcIconSize,o,"inherit"),a.buttonPadding=Math.max(10,r.a.get(t.imgPadding,o))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,o=0){const a=parseInt(r.a.get(e,t)+"");return isNaN(a)?t===r.a.Mode.DESKTOP?o:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,o):a}static normalizeCssSize(e,t,o=null,a=!1){const n=r.a.get(e,t,a);return n?n+"px":o}}function S(e,t){if(f.a.isPro)return Object(c.j)(h.a.isValid,[()=>O(e,t),()=>t.globalPromotionsEnabled&&h.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&h.a.getAutoPromo(e)])}function O(e,t){return e?h.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=E,function(e){e.POPULAR="popular",e.RECENT="recent"}(o=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(a=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(n=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(m=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(p=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(y=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(b=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(v=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(x=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderPostsPerPage:{desktop:5},sliderNumScrollPosts:{desktop:1},mediaType:a.ALL,postOrder:m.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[b.PROFILE_PIC,b.BIO]},headerAccount:null,headerStyle:{desktop:y.NORMAL,phone:y.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:v.HEADER,phone:v.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:x.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=S,e.getFeedPromo=O,e.executeMediaClick=function(e,t){const o=S(e,t),a=h.a.getConfig(o),n=h.a.getType(o);return!(!n||!n.isValid(a)||"function"!=typeof n.onMediaClick)&&n.onMediaClick(e,a)},e.getLink=function(e,t){var o,a;const n=S(e,t),i=h.a.getConfig(n),r=h.a.getType(n);if(void 0===r||!r.isValid(i))return{text:null,url:null,newTab:!1};const[l,s]=r.getPopupLink?null!==(o=r.getPopupLink(e,i))&&void 0!==o?o:null:[null,!1];return{text:l,url:r.getMediaUrl&&null!==(a=r.getMediaUrl(e,i))&&void 0!==a?a:null,newTab:s,icon:"external"}}}(y||(y={}))},62:function(e,t,o){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},65:function(e,t,o){"use strict";o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}));const a=(e,t)=>e.startsWith(t)?e:t+e,n=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},70:function(e,t,o){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},71:function(e,t,o){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},72:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},78:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(50),r=o.n(i),l=o(7),s=o(6),c=o(20),d=o.n(c),u=o(71),m=o.n(u);const p=Object(l.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,o={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return n.a.createElement("a",{href:t,target:"__blank",className:m.a.link},n.a.createElement("button",{className:m.a.button,style:o},e.followBtnText))});var h=o(17),_=o.n(h),f=o(5),g=o(170),y=o(589),b=o(42),v=o.n(b),x=o(18),M=o(8),E=Object(l.b)((function({stories:e,options:t,onClose:o}){e.sort((e,t)=>{const o=Object(g.a)(e.timestamp).getTime(),a=Object(g.a)(t.timestamp).getTime();return o<a?-1:o==a?0:1});const[i,r]=n.a.useState(0),l=e.length-1,[s,c]=n.a.useState(0),[d,u]=n.a.useState(0);Object(a.useEffect)(()=>{0!==s&&c(0)},[i]);const m=i<l,p=i>0,h=()=>o&&o(),b=()=>i<l?r(i+1):h(),E=()=>r(e=>Math.max(e-1,0)),w=e[i],P="https://instagram.com/"+t.account.username,B=w.type===f.a.Type.VIDEO?d:t.storiesInterval;Object(x.d)("keydown",e=>{switch(e.key){case"Escape":h();break;case"ArrowLeft":E();break;case"ArrowRight":b();break;default:return}e.preventDefault(),e.stopPropagation()});const C=n.a.createElement("div",{className:_.a.root},n.a.createElement("div",{className:_.a.container},n.a.createElement("div",{className:_.a.header},n.a.createElement("a",{href:P,target:"_blank"},n.a.createElement("img",{className:_.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),n.a.createElement("a",{href:P,className:_.a.username,target:"_blank"},t.account.username),n.a.createElement("div",{className:_.a.date},Object(y.a)(Object(g.a)(w.timestamp),{addSuffix:!0}))),n.a.createElement("div",{className:_.a.progress},e.map((e,t)=>n.a.createElement(S,{key:e.id,duration:B,animate:t===i,isDone:t<i}))),n.a.createElement("div",{className:_.a.content},p&&n.a.createElement("div",{className:_.a.prevButton,onClick:E,role:"button"},n.a.createElement(M.a,{icon:"arrow-left-alt2"})),n.a.createElement("div",{className:_.a.media},n.a.createElement(O,{key:w.id,media:w,imgDuration:t.storiesInterval,onGetDuration:u,onEnd:()=>m?b():h()})),m&&n.a.createElement("div",{className:_.a.nextButton,onClick:b,role:"button"},n.a.createElement(M.a,{icon:"arrow-right-alt2"})),n.a.createElement("div",{className:_.a.closeButton,onClick:h,role:"button"},n.a.createElement(M.a,{icon:"no-alt"})))));return v.a.createPortal(C,document.body)}));function S({animate:e,isDone:t,duration:o}){const a=e?_.a.progressOverlayAnimating:t?_.a.progressOverlayDone:_.a.progressOverlay,i={animationDuration:o+"s"};return n.a.createElement("div",{className:_.a.progressSegment},n.a.createElement("div",{className:a,style:i}))}function O({media:e,imgDuration:t,onGetDuration:o,onEnd:a}){return e.type===f.a.Type.VIDEO?n.a.createElement(P,{media:e,onEnd:a,onGetDuration:o}):n.a.createElement(w,{media:e,onEnd:a,duration:t})}function w({media:e,duration:t,onEnd:o}){const[i,r]=n.a.useState(!1);return Object(a.useEffect)(()=>{const e=i?setTimeout(o,1e3*t):null;return()=>clearTimeout(e)},[e,i]),n.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function P({media:e,onEnd:t,onGetDuration:o}){const a=n.a.useRef();return n.a.createElement("video",{ref:a,src:e.url,poster:e.thumbnail,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>o(a.current.duration),onEnded:t},n.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var B=o(3),C=Object(l.b)((function({feed:e,options:t}){const[o,a]=n.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,l=e.stories.filter(e=>e.username===i.username),c=l.length>0,u=t.headerInfo.includes(s.a.HeaderInfo.MEDIA_COUNT),m=t.headerInfo.includes(s.a.HeaderInfo.FOLLOWERS)&&i.type!=B.a.Type.PERSONAL,h=t.headerInfo.includes(s.a.HeaderInfo.PROFILE_PIC),_=t.includeStories&&c,f=t.headerStyle===s.a.HeaderStyle.BOXED,g={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},y=_?"button":void 0,b={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:_?"pointer":"normal"},v=t.showFollowBtn&&(t.followBtnLocation===s.a.FollowBtnLocation.HEADER||t.followBtnLocation===s.a.FollowBtnLocation.BOTH),x={justifyContent:t.showBio&&f?"flex-start":"center"},M=n.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),S=_&&c?d.a.profilePicWithStories:d.a.profilePic;return n.a.createElement("div",{className:L(t.headerStyle),style:g},n.a.createElement("div",{className:d.a.leftContainer},h&&n.a.createElement("div",{className:S,style:b,role:y,onClick:()=>{_&&a(0)}},_?M:n.a.createElement("a",{href:r,target:"_blank"},M)),n.a.createElement("div",{className:d.a.info},n.a.createElement("div",{className:d.a.username},n.a.createElement("a",{href:r,target:"_blank",style:{color:t.headerTextColor}},n.a.createElement("span",null,"@"),n.a.createElement("span",null,i.username))),t.showBio&&n.a.createElement("div",{className:d.a.bio},t.bioText),(u||m)&&n.a.createElement("div",{className:d.a.counterList},u&&n.a.createElement("div",{className:d.a.counter},n.a.createElement("span",null,i.mediaCount)," posts"),m&&n.a.createElement("div",{className:d.a.counter},n.a.createElement("span",null,i.followersCount)," followers")))),n.a.createElement("div",{className:d.a.rightContainer},v&&n.a.createElement("div",{className:d.a.followButton,style:x},n.a.createElement(p,{options:t}))),_&&null!==o&&n.a.createElement(E,{stories:l,options:t,onClose:()=>{a(null)}}))}));function L(e){switch(e){case s.a.HeaderStyle.NORMAL:return d.a.normalStyle;case s.a.HeaderStyle.CENTERED:return d.a.centeredStyle;case s.a.HeaderStyle.BOXED:return d.a.boxedStyle;default:return}}var T=o(93),I=o.n(T);const A=Object(l.b)(({feed:e,options:t})=>{const o=n.a.useRef(),a=Object(x.k)(o,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return n.a.createElement("button",{ref:o,className:I.a.root,style:i,onClick:()=>{a(),e.loadMore()}},e.isLoading?n.a.createElement("span",null,"Loading ..."):n.a.createElement("span",null,e.options.loadMoreBtnText))});var k=o(87);t.a=Object(l.b)((function({children:e,feed:t,options:o}){const[a,i]=n.a.useState(null),l=n.a.useCallback(e=>{const a=t.media.findIndex(t=>t.id===e.id);if(!t.options.promotionEnabled||!s.a.executeMediaClick(e,t.options))switch(o.linkBehavior){case s.a.LinkBehavior.LIGHTBOX:return void i(a);case s.a.LinkBehavior.NEW_TAB:return void window.open(e.permalink,"_blank");case s.a.LinkBehavior.SELF:return void window.open(e.permalink,"_self")}},[t,o.linkBehavior]),c={width:o.feedWidth,height:o.feedHeight,fontSize:o.textSize,overflowX:o.feedOverflowX,overflowY:o.feedOverflowY},d={backgroundColor:o.bgColor,padding:o.feedPadding},u={marginBottom:o.imgPadding},m={marginTop:o.buttonPadding},h=o.showHeader&&n.a.createElement("div",{style:u},n.a.createElement(C,{feed:t,options:o})),_=o.showLoadMoreBtn&&t.canLoadMore&&n.a.createElement("div",{className:r.a.loadMoreBtn,style:m},n.a.createElement(A,{feed:t,options:o})),f=o.showFollowBtn&&(o.followBtnLocation===s.a.FollowBtnLocation.BOTTOM||o.followBtnLocation===s.a.FollowBtnLocation.BOTH)&&n.a.createElement("div",{className:r.a.followBtn,style:m},n.a.createElement(p,{options:o})),g=t.isLoading?new Array(o.numPosts).fill(r.a.fakeMedia):[];return n.a.createElement("div",{className:r.a.root,style:c},n.a.createElement("div",{className:r.a.wrapper,style:d},e({mediaList:t.media,openMedia:l,header:h,loadMoreBtn:_,followBtn:f,loadingMedia:g})),null!==a&&n.a.createElement(k.a,{feed:t,current:a,numComments:o.numLightboxComments,showSidebar:o.lightboxShowSidebar,onRequestClose:()=>i(null)}))}))},79:function(e,t,o){"use strict";var a=o(49),n=o.n(a),i=o(0),r=o.n(i),l=o(5),s=o(7),c=o(23),d=o.n(c),u=o(170),m=o(593),p=o(592),h=o(6),_=o(8),f=o(4),g=o(3),y=Object(s.b)((function({options:e,media:t}){var o;const a=r.a.useRef(),[n,s]=r.a.useState(null);Object(i.useEffect)(()=>{a.current&&s(a.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===h.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==l.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===l.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const y=e.hoverInfo.some(e=>e===h.a.HoverInfo.CAPTION),b=e.hoverInfo.some(e=>e===h.a.HoverInfo.USERNAME),v=e.hoverInfo.some(e=>e===h.a.HoverInfo.DATE),x=e.hoverInfo.some(e=>e===h.a.HoverInfo.INSTA_LINK),M=null!==(o=t.caption)&&void 0!==o?o:"",E=t.timestamp?Object(u.a)(t.timestamp):null,S=t.timestamp?Object(m.a)(E).toString():null,O=t.timestamp?Object(p.a)(E,"HH:mm - do MMM yyyy"):null,w=t.timestamp?Object(f.n)(t.timestamp):null,P={color:e.textColorHover,backgroundColor:e.bgColorHover};let B=null;if(null!==n){const o=Math.sqrt(1.3*(n+30)),a=Math.sqrt(1.7*n+100),i=Math.sqrt(n-36),l=Math.max(o,8)+"px",s=Math.max(a,8)+"px",u=Math.max(i,8)+"px",m={fontSize:l},p={fontSize:l,width:l,height:l},h={color:e.textColorHover,fontSize:s,width:s,height:s},f={fontSize:u};B=r.a.createElement("div",{className:d.a.rows},r.a.createElement("div",{className:d.a.topRow},b&&t.username&&r.a.createElement("div",{className:d.a.username},r.a.createElement("a",{href:g.b.getUsernameUrl(t.username),target:"_blank"},"@",t.username)),y&&t.caption&&r.a.createElement("div",{className:d.a.caption},M)),r.a.createElement("div",{className:d.a.middleRow},c&&r.a.createElement("div",{className:d.a.counterList},r.a.createElement("span",{className:d.a.likesCount,style:m},r.a.createElement(_.a,{icon:"heart",style:p})," ",t.likesCount),r.a.createElement("span",{className:d.a.commentsCount,style:m},r.a.createElement(_.a,{icon:"admin-comments",style:p})," ",t.commentsCount))),r.a.createElement("div",{className:d.a.bottomRow},v&&t.timestamp&&r.a.createElement("div",{className:d.a.dateContainer},r.a.createElement("time",{className:d.a.date,dateTime:S,title:O,style:f},w)),x&&r.a.createElement("a",{className:d.a.igLinkIcon,href:t.permalink,title:M,target:"_blank",style:h,onClick:e=>e.stopPropagation()},r.a.createElement(_.a,{icon:"instagram",style:h}))))}return r.a.createElement("div",{ref:a,className:d.a.root,style:P},B)})),b=o(15),v=o(54);t.a=Object(s.b)((function({media:e,options:t,forceOverlay:o,onClick:a}){const[i,s]=r.a.useState(!1),c=function(e){switch(e.type){case l.a.Type.IMAGE:return n.a.imageTypeIcon;case l.a.Type.VIDEO:return n.a.videoTypeIcon;case l.a.Type.ALBUM:return n.a.albumTypeIcon;default:return}}(e),d={backgroundImage:`url(${b.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:n.a.root,onClick:e=>{a&&a(e)},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},r.a.createElement(v.a,{media:e}),r.a.createElement("div",{className:c,style:d}),(i||o)&&r.a.createElement("div",{className:n.a.overlay},r.a.createElement(y,{media:e,options:t}))))}))},8:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var a=o(0),n=o.n(a),i=o(10);const r=e=>{var{icon:t,className:o}=e,a=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["icon","className"]);return n.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},a))}},85:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(70),r=o.n(i),l=o(7),s=o(4),c=o(29);t.a=Object(l.b)((function({media:e,options:t,full:o}){if(!t.showCaptions||!e.type)return null;const a={color:t.captionColor,fontSize:t.captionSize},i=o?0:1,l=e.caption?e.caption:"",d=t.captionMaxLength?Object(s.o)(l,t.captionMaxLength):l,u=Object(c.d)(d,void 0,i,t.captionRemoveDots),m=o?r.a.full:r.a.preview;return n.a.createElement("div",{className:m,style:a},u)}))},86:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(62),r=o.n(i),l=o(7),s=o(5),c=o(8);t.a=Object(l.b)((function({media:e,options:t}){if(!e.type||e.source.type===s.a.Source.Type.PERSONAL_ACCOUNT)return null;const o={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},a=Object.assign(Object.assign({},o),{color:t.likesIconColor}),i=Object.assign(Object.assign({},o),{color:t.commentsIconColor}),l={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&n.a.createElement("div",{className:r.a.root},t.showLikes&&n.a.createElement("div",{className:r.a.icon,style:a},n.a.createElement(c.a,{icon:"heart",style:l}),n.a.createElement("span",null,e.likesCount)),t.showComments&&n.a.createElement("div",{className:r.a.icon,style:i},n.a.createElement(c.a,{icon:"admin-comments",style:l}),n.a.createElement("span",null,e.commentsCount)))}))},87:function(e,t,o){"use strict";o.d(t,"a",(function(){return W}));var a=o(0),n=o.n(a),i=o(42),r=o.n(i),l=o(14),s=o.n(l),c=o(18),d=o(32),u=o.n(d),m=o(5),p=o(3),h=o(21),_=o.n(h),f=o(39),g=o.n(f),y=o(4),b=o(29),v=o(10);const x=({comment:e,className:t})=>{const o=e.username?n.a.createElement("a",{key:-1,href:p.b.getUsernameUrl(e.username),target:"_blank",className:g.a.username},e.username):null,a=o?(e,t)=>t>0?e:[o,...e]:void 0,i=Object(b.d)(e.text,a),r=1===e.likeCount?"like":"likes";return n.a.createElement("div",{className:Object(v.b)(g.a.root,t)},n.a.createElement("div",{className:g.a.content},n.a.createElement("div",{key:e.id,className:g.a.text},i)),n.a.createElement("div",{className:g.a.metaList},n.a.createElement("div",{className:g.a.date},Object(y.n)(e.timestamp)),e.likeCount>0&&n.a.createElement("div",{className:g.a.likeCount},`${e.likeCount} ${r}`)))};var M=o(8);function E({source:e,comments:t,showLikes:o,numLikes:a,date:i,link:r}){var l;return t=null!=t?t:[],n.a.createElement("article",{className:_.a.container},e&&n.a.createElement("header",{className:_.a.header},e.img&&n.a.createElement("a",{href:e.url,target:"_blank",className:_.a.sourceImgLink},n.a.createElement("img",{className:_.a.sourceImg,src:e.img,alt:null!==(l=e.name)&&void 0!==l?l:""})),n.a.createElement("div",{className:_.a.sourceName},n.a.createElement("a",{href:e.url,target:"_blank"},e.name))),n.a.createElement("div",{className:_.a.commentsScroller},t.length>0&&n.a.createElement("div",{className:_.a.commentsList},t.map((e,t)=>n.a.createElement(x,{key:t,comment:e,className:_.a.comment})))),n.a.createElement("div",{className:_.a.footer},n.a.createElement("div",{className:_.a.footerInfo},o&&n.a.createElement("div",{className:_.a.numLikes},n.a.createElement("span",null,a)," ",n.a.createElement("span",null,"likes")),i&&n.a.createElement("div",{className:_.a.date},i)),r&&n.a.createElement("div",{className:_.a.footerLink},n.a.createElement("a",{href:r.url,target:r.newTab?"_blank":"_self"},n.a.createElement(M.a,{icon:r.icon,className:_.a.footerLinkIcon}),n.a.createElement("span",null,r.text)))))}function S({media:e,numComments:t,link:o}){o=null!=o?o:{url:e.permalink,text:"View on Instagram",icon:"instagram",newTab:!0};const a=e.comments?e.comments.slice(0,t):[];e.caption&&e.caption.length&&a.splice(0,0,{id:e.id,text:e.caption,timestamp:e.timestamp,username:e.username});const i={name:"",url:"",img:void 0};switch(e.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:i.name="@"+e.username,i.url=p.b.getUsernameUrl(e.username);const t=p.b.getByUsername(e.username);i.img=t?p.b.getProfilePicUrl(t):void 0;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:i.name="#"+e.source.name,i.url="https://instagram.com/explore/tags/"+e.source.name}return n.a.createElement(E,{source:i,comments:a,date:Object(y.n)(e.timestamp),showLikes:e.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT,numLikes:e.likesCount,link:o})}var O=o(94),w=o.n(O),P=o(33),B=o.n(P),C=o(54);function L(e){var{media:t,thumbnailUrl:o,size:i,autoPlay:r,onGetMetaData:l}=e,s=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["media","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=n.a.useRef(),[d,u]=n.a.useState(!r),[p,h]=n.a.useState(r),_=n.a.useContext(R);Object(a.useEffect)(()=>{r?d&&u(!1):d||u(!0),p&&h(r)},[t.url]),Object(a.useLayoutEffect)(()=>{if(c.current){const e=()=>h(!0),t=()=>h(!1);return c.current.addEventListener("play",e),c.current.addEventListener("pause",t),()=>{c.current.removeEventListener("play",e),c.current.removeEventListener("pause",t)}}},[c.current]);const f={width:i?i.width+"px":"100%",height:i?i.height+"px":"100%"};return n.a.createElement("div",{key:t.url,className:B.a.root,style:f},n.a.createElement("video",Object.assign({ref:c,className:d?B.a.videoHidden:B.a.video,src:t.url,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&c.current.play()},onLoadedMetadata:()=>{_.reportSize({width:c.current.videoWidth,height:c.current.videoHeight})}},s),n.a.createElement("source",{src:t.url}),"Your browser does not support videos"),n.a.createElement("div",{className:d?B.a.thumbnail:B.a.thumbnailHidden},n.a.createElement(C.a,{media:t,size:m.a.Thumbnails.Size.LARGE,width:i?i.width:void 0,height:i?i.height:void 0})),n.a.createElement("div",{className:p?B.a.controlPlaying:B.a.controlPaused,onClick:()=>{c.current&&(d?(u(!1),c.current.currentTime=0,c.current.play()):c.current.paused?c.current.play():c.current.pause())}},n.a.createElement(M.a,{className:B.a.playButton,icon:"controls-play"})))}var T=o(55),I=o.n(T),A=m.a.Thumbnails.Size;const k={s:320,m:480,l:600};function N({media:e}){const t=n.a.useRef(),o=n.a.useContext(R),[i,r]=Object(a.useState)(!0),[l,s]=Object(a.useState)(!1);Object(a.useLayoutEffect)(()=>{i&&t.current&&t.current.complete&&c()},[]);const c=()=>{if(r(!1),t.current&&!e.size){const e={width:t.current.naturalWidth,height:t.current.naturalHeight};o.reportSize(e)}};if(l)return n.a.createElement("div",{className:I.a.error},n.a.createElement("span",null,"Image is not available"));const d=m.a.Thumbnails.get(e,A.LARGE),u=m.a.Thumbnails.getSrcSet(e,k).join(",");return l?n.a.createElement("div",{className:I.a.error},n.a.createElement("span",null,"Image is not available")):n.a.createElement("img",{ref:t,className:i?I.a.loading:I.a.image,onLoad:c,onError:()=>{s(!0),r(!1)},src:d,srcSet:u,sizes:"600px",alt:"",loading:"eager"})}var j=o(28),H=o.n(j);function D({media:e,autoplayVideos:t}){const[o,i]=Object(a.useState)(0),r=e.children,l=r.length-1,s={transform:`translateX(${100*-o}%)`};return n.a.createElement("div",{className:H.a.album},n.a.createElement("div",{className:H.a.frame},n.a.createElement("ul",{className:H.a.scroller,style:s},r.map(e=>n.a.createElement("li",{key:e.id,className:H.a.child},n.a.createElement(z,{media:e,autoplayVideos:t}))))),n.a.createElement("div",{className:H.a.controlsLayer},n.a.createElement("div",{className:H.a.controlsContainer},n.a.createElement("div",null,o>0&&n.a.createElement("div",{className:H.a.prevButton,onClick:()=>i(e=>Math.max(e-1,0)),role:"button"},n.a.createElement(M.a,{icon:"arrow-left-alt2"}))),n.a.createElement("div",null,o<l&&n.a.createElement("div",{className:H.a.nextButton,onClick:()=>i(e=>Math.min(e+1,l)),role:"button"},n.a.createElement(M.a,{icon:"arrow-right-alt2"}))))),n.a.createElement("div",{className:H.a.indicatorList},r.map((e,t)=>n.a.createElement("div",{key:t,className:t===o?H.a.indicatorCurrent:H.a.indicator}))))}function z({media:e,autoplayVideos:t}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return n.a.createElement(N,{media:e});case m.a.Type.VIDEO:return n.a.createElement(L,{media:e,autoPlay:t});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return n.a.createElement(D,{media:e,autoplayVideos:t})}return n.a.createElement("div",{className:w.a.notAvailable},n.a.createElement("span",null,"Media is not available"))}const R=n.a.createContext({});function F({media:e,showSidebar:t,numComments:o,link:a,vertical:i}){var r,l;t=null==t||t,o=null!=o?o:30;const[s,c]=n.a.useState(),d=null!==(l=null!==(r=e.size)&&void 0!==r?r:s)&&void 0!==l?l:{width:600,height:600},m=d&&d.height>0?d.width/d.height:null,p={paddingBottom:i?void 0:(m?100/m:100)+"%"};return n.a.createElement(R.Provider,{value:{reportSize:c}},n.a.createElement("div",{className:i?u.a.vertical:u.a.horizontal},n.a.createElement("div",{className:t?u.a.wrapperSidebar:u.a.wrapper},n.a.createElement("div",{className:u.a.mediaContainer},n.a.createElement("div",{className:u.a.mediaSizer,style:p},n.a.createElement("div",{className:u.a.media},n.a.createElement(z,{key:e.id,media:e}))))),t&&n.a.createElement("div",{className:u.a.sidebar},n.a.createElement(S,{media:e,numComments:o,link:a}))))}var U=o(6);function G(e,t){return t&&(null!=e?e:document.body).getBoundingClientRect().width<876}function V(e,t){t?e.classList.remove(s.a.noScroll):e.classList.add(s.a.noScroll)}function W({feed:e,current:t,showSidebar:o,numComments:i,onRequestClose:l}){var d;const u=n.a.useRef(),[m,p]=n.a.useState(G(null,o)),[h,_]=n.a.useState(t),f=n.a.useContext(W.Context),g=null!==(d=f.target&&f.target.current)&&void 0!==d?d:document.body;Object(a.useEffect)(()=>_(t),[t]);const y=()=>p(G(u.current,o));Object(a.useEffect)(()=>(y(),V(g,!1),()=>V(g,!0)),[g]),Object(c.m)("resize",()=>y(),[],[o]);const b=e=>{l&&l(),e.preventDefault(),e.stopPropagation()},v=e=>{_(e=>Math.max(e-1,0)),e.preventDefault(),e.stopPropagation()},x=t=>{_(t=>Math.min(t+1,e.media.length-1)),t.preventDefault(),t.stopPropagation()};Object(c.e)(document.body,"keydown",e=>{switch(e.key){case"ArrowRight":x(e);break;case"ArrowLeft":v(e);break;case"Escape":b(e);break;default:return}},[],[]);const E=U.a.getLink(e.media[h],e.options),S=null!==E.text&&null!==E.url,O={position:g===document.body?"fixed":"absolute"},w=n.a.createElement("div",{className:m?s.a.vertical:s.a.horizontal,style:O,onClick:b},n.a.createElement("div",{className:s.a.navLayer},n.a.createElement("div",{className:s.a.navBoundary},n.a.createElement("div",{className:o?s.a.navAlignerSidebar:s.a.modalAlignerNoSidebar},h>0&&n.a.createElement("a",{className:s.a.prevBtn,onClick:v,role:"button",tabIndex:0},n.a.createElement(M.a,{icon:"arrow-left-alt2",className:s.a.controlIcon}),n.a.createElement("span",{className:s.a.controlLabel},"Previous")),h<e.media.length-1&&n.a.createElement("a",{className:s.a.nextBtn,onClick:x,role:"button",tabIndex:0},n.a.createElement(M.a,{icon:"arrow-right-alt2",className:s.a.controlIcon}),n.a.createElement("span",{className:s.a.controlLabel},"Next"))))),n.a.createElement("div",{ref:u,className:s.a.modalLayer,role:"dialog",onClick:e=>{e.stopPropagation()}},n.a.createElement("div",{className:o?s.a.modalAlignerSidebar:s.a.modalAlignerNoSidebar},e.media[h]&&n.a.createElement(F,{media:e.media[h],vertical:m,numComments:i,showSidebar:o,link:S?E:void 0}))),n.a.createElement("a",{className:s.a.closeButton,onClick:b,role:"button",tabIndex:0},n.a.createElement(M.a,{icon:"no-alt",className:s.a.controlIcon}),n.a.createElement("span",{className:s.a.controlLabel},"Close")));return r.a.createPortal(w,g)}(W||(W={})).Context=n.a.createContext({target:{current:document.body}})},92:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(27),r=o.n(i),l=o(7),s=o(79),c=o(85),d=o(86),u=o(78),m=o(10),p=o(4);t.a=Object(l.b)((function({feed:e,options:t,cellClassName:o}){const i=n.a.useRef(),[l,s]=n.a.useState(0);Object(a.useLayoutEffect)(()=>{if(i.current&&i.current.children.length>0){const e=i.current.querySelector("."+r.a.mediaMeta);e&&s(e.getBoundingClientRect().height)}},[t]),o=null!=o?o:()=>{};const c={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`},d={paddingBottom:`calc(100% + ${l}px)`};return n.a.createElement(u.a,{feed:e,options:t},({mediaList:a,openMedia:l,header:s,loadMoreBtn:u,followBtn:_,loadingMedia:f})=>n.a.createElement("div",{className:r.a.root},s,(!e.isLoading||e.isLoadingMore)&&n.a.createElement("div",{className:r.a.grid,style:c,ref:i},e.media.length?a.map((e,a)=>n.a.createElement(h,{key:`${a}-${e.id}`,className:o(e,a),style:d,media:e,options:t,openMedia:l})):null,e.isLoadingMore&&f.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(p.p)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),e.isLoading&&!e.isLoadingMore&&n.a.createElement("div",{className:r.a.grid,style:c},f.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(p.p)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),n.a.createElement("div",{className:r.a.buttonList},u,_)))}));const h=n.a.memo((function({className:e,style:t,media:o,options:a,openMedia:i}){const l=n.a.useCallback(()=>i(o),[o]);return n.a.createElement("div",{className:Object(m.b)(r.a.cell,e),style:t},n.a.createElement("div",{className:r.a.cellContent},n.a.createElement("div",{className:r.a.mediaContainer},n.a.createElement(s.a,{media:o,onClick:l,options:a})),n.a.createElement("div",{className:r.a.mediaMeta},n.a.createElement(c.a,{options:a,media:o}),n.a.createElement(d.a,{options:a,media:o}))))}),(e,t)=>e.media.id===t.media.id&&e.options===t.options)},93:function(e,t,o){e.exports={root:"LoadMoreButton__root feed__feed-button"}},94:function(e,t,o){e.exports={reset:"MediaPopupBoxObject__reset","not-available":"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset",notAvailable:"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",loading:"MediaPopupBoxObject__loading"}}},[[583,0,1]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[6],{0:function(t,o){t.exports=e},10:function(e,t,o){"use strict";function n(...e){return e.filter(e=>!!e).join(" ")}function a(e){return n(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i})),o.d(t,"e",(function(){return r})),o.d(t,"d",(function(){return l}));const r={onMouseDown:e=>e.preventDefault()};function l(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},11:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function o(e,t){return(null!=e?e:{})[t.toString()]}function n(e,t,o){return(e=null!=e?e:{})[t.toString()]=o,e}e.has=t,e.get=o,e.set=n,e.ensure=function(o,a,i){return t(o,a)||n(o,a,i),e.get(o,a)},e.withEntry=function(t,o,n){return e.set(Object(a.h)(null!=t?t:{}),o,n)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,o){return e.remove(Object(a.h)(null!=t?t:{}),o)},e.at=function(t,n){return o(t,e.keys(t)[n])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,o){const n={};return e.forEach(t,(e,t)=>n[e]=o(t,e)),n},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(a.m)(e,t)},e.forEach=function(t,o){e.keys(t).forEach(e=>o(e,t[e]))},e.fromArray=function(t){const o={};return t.forEach(([t,n])=>e.set(o,t,n)),o},e.fromMap=function(t){const o={};return t.forEach((t,n)=>e.set(o,n,t)),o}}(n||(n={}))},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(15),i=o(11),r=o(4);!function(e){function t(e){return e?c(e.type):void 0}function o(e){var o;if("object"!=typeof e)return!1;const n=t(e);return void 0!==n&&n.isValid(null!==(o=e.config)&&void 0!==o?o:{})}function n(t){return t?e.getPromoFromDictionary(t,a.a.config.globalPromotions):void 0}function l(e){const t=s(e);return void 0===t?void 0:t.promotion}function s(t){if(t)for(const o of a.a.config.autoPromotions){const n=e.Automation.getType(o),a=e.Automation.getConfig(o);if(n&&n.matches(t,a))return o}}function c(t){return e.types.find(e=>e.id===t)}let d;e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getType=t,e.isValid=o,e.getPromoFromDictionary=function(t,o){const n=i.a.get(o,t.id);if(n)return e.getType(n)?n:void 0},e.getPromo=function(e){return Object(r.k)(o,[()=>n(e),()=>l(e)])},e.getGlobalPromo=n,e.getAutoPromo=l,e.getAutomation=s,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?o(e.type):void 0},e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function o(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=o,e.clearTypes=function(){t.splice(0,t.length)}}(d=e.Automation||(e.Automation={}))}(n||(n={}))},14:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaPopupBox__container layout__flex-box",horizontal:"MediaPopupBox__horizontal MediaPopupBox__container layout__flex-box",vertical:"MediaPopupBox__vertical MediaPopupBox__container layout__flex-box",layer:"MediaPopupBox__layer layout__flex-box",control:"MediaPopupBox__control","control-label":"MediaPopupBox__control-label",controlLabel:"MediaPopupBox__control-label","control-icon":"MediaPopupBox__control-icon",controlIcon:"MediaPopupBox__control-icon","close-button":"MediaPopupBox__close-button MediaPopupBox__control",closeButton:"MediaPopupBox__close-button MediaPopupBox__control","nav-layer":"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box",navLayer:"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box","nav-boundary":"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box",navBoundary:"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box","nav-aligner":"MediaPopupBox__nav-aligner layout__flex-box",navAligner:"MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-sidebar":"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerSidebar:"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-no-sidebar":"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerNoSidebar:"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-btn":"MediaPopupBox__nav-btn MediaPopupBox__control",navBtn:"MediaPopupBox__nav-btn MediaPopupBox__control","prev-btn":"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control",prevBtn:"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control","next-btn":"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control",nextBtn:"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control","modal-layer":"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box",modalLayer:"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box","modal-aligner":"MediaPopupBox__modal-aligner layout__flex-box",modalAligner:"MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-sidebar":"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerSidebar:"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-no-sidebar":"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerNoSidebar:"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modal:"MediaPopupBox__modal","no-scroll":"MediaPopupBox__no-scroll",noScroll:"MediaPopupBox__no-scroll"}},15:function(e,t,o){"use strict";var n,a=o(12);let i;t.a=i={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(n=SliCommonL10n.globalPromotions)&&void 0!==n?n:{}},image:e=>`${i.config.imagesUrl}/${e}`},a.a.registerType({id:"link",label:"Link",isValid:()=>!1}),a.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),a.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},16:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},17:function(e,t,o){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},18:function(e,t,o){"use strict";o.d(t,"j",(function(){return l})),o.d(t,"f",(function(){return s})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return d})),o.d(t,"a",(function(){return u})),o.d(t,"n",(function(){return m})),o.d(t,"h",(function(){return p})),o.d(t,"l",(function(){return h})),o.d(t,"k",(function(){return f})),o.d(t,"e",(function(){return _})),o.d(t,"d",(function(){return g})),o.d(t,"m",(function(){return y})),o.d(t,"g",(function(){return b})),o.d(t,"i",(function(){return v}));var n=o(0),a=o.n(n),i=o(59),r=o(46);function l(e,t){!function(e,t,o){const n=a.a.useRef(!0);e(()=>{n.current=!0;const e=t(()=>new Promise(e=>{n.current&&e()}));return()=>{n.current=!1,e&&e()}},o)}(n.useEffect,e,t)}function s(e){const[t,o]=a.a.useState(e),n=a.a.useRef(t);return[t,()=>n.current,e=>o(n.current=e)]}function c(e,t,o=[]){function a(n){!e.current||e.current.contains(n.target)||o.some(e=>e&&e.current&&e.current.contains(n.target))||t(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",a),document.addEventListener("touchend",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchend",a)}))}function d(e,t){Object(n.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function u(e,t,o=100){const[i,r]=a.a.useState(e);return Object(n.useEffect)(()=>{let n=null;return e===t?n=setTimeout(()=>r(t),o):r(!t),()=>{null!==n&&clearTimeout(n)}},[e]),[i,r]}function m(e){const[t,o]=a.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(n.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){Object(n.useEffect)(()=>{const o=o=>{if(t)return(o||window.event).returnValue=e,e};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[t])}function f(e,t){const o=a.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function _(e,t,o,a=[],i=[]){Object(n.useEffect)(()=>(a.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function g(e,t,o=[],n=[]){_(document,e,t,o,n)}function y(e,t,o=[],n=[]){_(window,e,t,o,n)}function b(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function v(e){const[t,o]=a.a.useState(e);return[function(e){const t=a.a.useRef(e);return t.current=e,t}(t),o]}o(53)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(1),i=function(e,t,o,n){var a,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(i<3?a(r):i>3?a(t,o,r):a(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return n(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const n=l(this,t,e);return new o(n.desktop,n.tablet,n.phone)}}function n(e,t,o=!1){if(!e)return;const n=e[t.prop];return o&&null==n?e.desktop:n}function r(e,t,o){return e[o.prop]=t,e}function l(e,t,n){return r(new o(e.desktop,e.tablet,e.phone),t,n)}i([a.o],o.prototype,"desktop",void 0),i([a.o],o.prototype,"tablet",void 0),i([a.o],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const n=e.MODES.findIndex(e=>e===o);return void 0===n?t.DESKTOP:e.MODES[(n+1)%e.MODES.length]},e.get=n,e.set=r,e.withValue=l,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(n||(n={}))},20:function(e,t,o){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},21:function(e,t,o){e.exports={container:"MediaInfo__container",padded:"MediaInfo__padded",bordered:"MediaInfo__bordered",header:"MediaInfo__header MediaInfo__padded MediaInfo__bordered","source-img":"MediaInfo__source-img",sourceImg:"MediaInfo__source-img","source-img-link":"MediaInfo__source-img-link MediaInfo__source-img",sourceImgLink:"MediaInfo__source-img-link MediaInfo__source-img","source-name":"MediaInfo__source-name",sourceName:"MediaInfo__source-name","comments-scroller":"MediaInfo__comments-scroller",commentsScroller:"MediaInfo__comments-scroller","comments-list":"MediaInfo__comments-list MediaInfo__padded",commentsList:"MediaInfo__comments-list MediaInfo__padded",comment:"MediaInfo__comment",footer:"MediaInfo__footer","footer-info":"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered",footerInfo:"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered","footer-info-line":"MediaInfo__footer-info-line",footerInfoLine:"MediaInfo__footer-info-line","num-likes":"MediaInfo__num-likes MediaInfo__footer-info-line",numLikes:"MediaInfo__num-likes MediaInfo__footer-info-line",date:"MediaInfo__date MediaInfo__footer-info-line","footer-link":"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered",footerLink:"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered","footer-link-icon":"MediaInfo__footer-link-icon",footerLinkIcon:"MediaInfo__footer-link-icon"}},22:function(e,t,o){"use strict";var n=o(50),a=o.n(n),i=o(15),r=o(53);const l=i.a.config.restApi.baseUrl,s={};i.a.config.restApi.authToken&&(s["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=a.a.create({baseURL:l,headers:s});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const d={config:Object.assign(Object.assign({},i.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,n)=>{const i=n?new a.a.CancelToken(n):void 0;return new Promise((n,a)=>{const r=e=>{n(e),document.dispatchEvent(new Event(d.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(n=>{n&&n.data.needImport?d.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(r).catch(a)}).catch(a):r(n)}).catch(a)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,o)=>{document.dispatchEvent(new Event(d.events.onImportStart));const n=e=>{const t=d.getErrorReason(e);document.dispatchEvent(new ErrorEvent(d.events.onImportFail,{message:t})),o(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(d.events.onImportEnd)),t(e)):n(d.getErrorReason(e))}).catch(n)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=d},23:function(e,t,o){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username","date-container":"MediaOverlay__date-container",dateContainer:"MediaOverlay__date-container",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},27:function(e,t,o){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},28:function(e,t,o){e.exports={reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation","flex-box":"layout__flex-box",flexBox:"layout__flex-box",album:"MediaPopupBoxAlbum__album",frame:"MediaPopupBoxAlbum__frame",scroller:"MediaPopupBoxAlbum__scroller",child:"MediaPopupBoxAlbum__child","controls-layer":"MediaPopupBoxAlbum__controls-layer layout__flex-box",controlsLayer:"MediaPopupBoxAlbum__controls-layer layout__flex-box","controls-container":"MediaPopupBoxAlbum__controls-container",controlsContainer:"MediaPopupBoxAlbum__controls-container","nav-button":"MediaPopupBoxAlbum__nav-button",navButton:"MediaPopupBoxAlbum__nav-button","prev-button":"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button",prevButton:"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button","next-button":"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button",nextButton:"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button","indicator-list":"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicatorList:"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicator:"MediaPopupBoxAlbum__indicator","indicator-current":"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator",indicatorCurrent:"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator"}},29:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"d",(function(){return s})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return d})),o(5);var n=o(64),a=o(0),i=o.n(a),r=o(4);function l(e,t){const o=t.map(n.b).join("|");return new RegExp(`#(${o})(?:\\b|\\r|#|$)`,"imu").test(e)}function s(e,t,o=0,n=!1){let l=e.trim();n&&(l=l.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const s=l.split("\n"),c=s.map((e,o)=>{if(e=e.trim(),n&&/^[.*•]$/.test(e))return null;let l,c=[];for(;null!==(l=/#(\w+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+l[1],o=i.a.createElement("a",{href:t,target:"_blank",key:Object(r.q)()},l[0]),n=e.substr(0,l.index),a=e.substr(l.index+l[0].length);c.push(n),c.push(o),e=a}return e.length&&c.push(e),t&&(c=t(c,o)),s.length>1&&c.push(i.a.createElement("br",{key:Object(r.q)()})),i.a.createElement(a.Fragment,{key:Object(r.q)()},c)});return o>0?c.slice(0,o):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function d(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(22),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(n||(n={}));const r=Object(i.o)([]),l="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",s=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===n.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(i.o)(e))),r}function u(e){if("object"==typeof e&&Array.isArray(e.data))return d(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:l,getById:s,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==s(e)),idsToAccounts:e=>e.map(e=>s(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===n.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===n.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:l,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return a.a.getAccounts().then(u).catch(e=>{throw a.a.getErrorReason(e)})},loadFromResponse:u,addAccounts:d}},34:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaViewer__container layout__flex-box",horizontal:"MediaViewer__horizontal MediaViewer__container layout__flex-box",vertical:"MediaViewer__vertical MediaViewer__container layout__flex-box",wrapper:"MediaViewer__wrapper layout__flex-box","wrapper-sidebar":"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",wrapperSidebar:"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",sidebar:"MediaViewer__sidebar","media-frame":"MediaViewer__media-frame layout__flex-box",mediaFrame:"MediaViewer__media-frame layout__flex-box","media-container":"MediaViewer__media-container",mediaContainer:"MediaViewer__media-container","media-sizer":"MediaViewer__media-sizer layout__flex-box",mediaSizer:"MediaViewer__media-sizer layout__flex-box",media:"MediaViewer__media"}},35:function(e,t,o){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},39:function(e,t,o){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},4:function(e,t,o){"use strict";o.d(t,"q",(function(){return r})),o.d(t,"h",(function(){return l})),o.d(t,"a",(function(){return s})),o.d(t,"r",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"d",(function(){return u})),o.d(t,"m",(function(){return m})),o.d(t,"l",(function(){return p})),o.d(t,"i",(function(){return h})),o.d(t,"e",(function(){return f})),o.d(t,"p",(function(){return _})),o.d(t,"o",(function(){return g})),o.d(t,"n",(function(){return y})),o.d(t,"k",(function(){return b})),o.d(t,"g",(function(){return v})),o.d(t,"f",(function(){return x})),o.d(t,"c",(function(){return M})),o.d(t,"j",(function(){return E}));var n=o(171),a=o(172);let i=0;function r(){return i++}function l(e){const t={};return Object.keys(e).forEach(o=>{const n=e[o];Array.isArray(n)?t[o]=n.slice():n instanceof Map?t[o]=new Map(n.entries()):t[o]="object"==typeof n?l(n):n}),t}function s(e,t){return Object.keys(t).forEach(o=>{e[o]=t[o]}),e}function c(e,t){return s(l(e),t)}function d(e,t){return Array.isArray(e)&&Array.isArray(t)?u(e,t):e instanceof Map&&t instanceof Map?u(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?m(e,t):e===t}function u(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(o){if(!o(e[n],t[n]))return!1}else if(!d(e[n],t[n]))return!1;return!0}function m(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return d(e,t);const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;const a=new Set(o.concat(n));for(const o of a)if(!d(e[o],t[o]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function f(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function _(e,t){const o=/(\s+)/g;let n,a=0,i=0,r="";for(;null!==(n=o.exec(e))&&a<t;){const t=n.index+n[1].length;r+=e.substr(i,t-i),i=t,a++}return i<e.length&&(r+=" ..."),r}function g(e){return Object(n.a)(Object(a.a)(e),{addSuffix:!0})}function y(e,t){const o=[];return e.forEach((e,n)=>{const a=n%t;Array.isArray(o[a])?o[a].push(e):o[a]=[e]}),o}function b(e,t){for(const o of t){const t=o();if(e(t))return t}}function v(e,t,o){return Math.max(t,Math.min(o,e))}function x(e,t){return v(e,0,t.length-1)}function M(e,t,o){const n=e.slice();return n[t]=o,n}function E(e){return Array.isArray(e)?e[0]:e}},41:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));class n{static getById(e){const t=n.list.find(t=>t.id===e);return!t&&n.list.length>0?n.list[0]:t}static getName(e){const t=n.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){n.list.push(e)}}n.list=[]},42:function(e,o){e.exports=t},45:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,o){"use strict";function n(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function a(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return i}))},48:function(e,t,o){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},49:function(e,t,o){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},5:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(11),i=o(3);!function(e){let t,o,n;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let o;function n(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!a.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[o.SMALL]:t.thumbnail,[o.MEDIUM]:t.thumbnail,[o.LARGE]:t.thumbnail}}return{[o.SMALL]:t.url,[o.MEDIUM]:t.url,[o.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(o=t.Size||(t.Size={})),t.get=function(e,t){const o=n(e);return a.a.get(o,t)||(r(e)?e.thumbnail:e.url)},t.getMap=n,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!a.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var n;let i=[];a.a.has(e.thumbnails,o.SMALL)&&i.push(a.a.get(e.thumbnails,o.SMALL)+` ${t.s}w`),a.a.has(e.thumbnails,o.MEDIUM)&&i.push(a.a.get(e.thumbnails,o.MEDIUM)+` ${t.m}w`);const r=null!==(n=a.a.get(e.thumbnails,o.LARGE))&&void 0!==n?n:e.url;return i.push(r+` ${t.l}w`),i}}(o=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function o(e){switch(e){case t.PERSONAL_ACCOUNT:return i.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return i.a.Type.BUSINESS;default:return}}function n(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===i.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=o,e.getHashtagSort=n,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const a=[],r=[],l=[],s=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:n(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const d=i.b.getByUsername(e.name),u=d?o(e.type):null;d&&d.type===u?e.type===t.TAGGED_ACCOUNT?r.push(d):e.type===t.USER_STORY?l.push(d):a.push(d):s.push(e)}}),{accounts:a,tagged:r,stories:l,hashtags:c,misc:s}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(n=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===n.Type.POPULAR_HASHTAG||e.source.type===n.Type.RECENT_HASHTAG,e.isNotAChild=r}(n||(n={}))},53:function(e,t,o){"use strict";function n(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return a}))},54:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var n=o(0),a=o.n(n),i=o(45),r=o.n(i),l=o(105),s=o(5),c=o(73),d=o.n(c);function u(){return a.a.createElement("div",{className:d.a.root})}var m=o(10);function p(e){var{media:t,className:o,size:i,onLoadImage:c,width:d,height:p}=e,h=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["media","className","size","onLoadImage","width","height"]);const f=a.a.useRef(),_=a.a.useRef(),[g,y]=a.a.useState(!s.a.Thumbnails.has(t)),[b,v]=a.a.useState(!0),[x,M]=a.a.useState(!1);function E(){if(f.current){const e=null!=i?i:function(){const e=f.current.getBoundingClientRect();return e.width<=320?s.a.Thumbnails.Size.SMALL:e.width<=600?s.a.Thumbnails.Size.MEDIUM:s.a.Thumbnails.Size.LARGE}(),o=s.a.Thumbnails.get(t,e);f.current.src!==o&&(f.current.src=o)}}function S(){P()}function w(){t.type===s.a.Type.VIDEO?y(!0):f.current.src===t.url?M(!0):f.current.src=t.url,P()}function O(){isNaN(_.current.duration)||_.current.duration===1/0?_.current.currentTime=1:_.current.currentTime=_.current.duration/2,P()}function P(){v(!1),c&&c()}return Object(n.useLayoutEffect)(()=>{let e=new l.a(E);return f.current&&(f.current.onload=S,f.current.onerror=w,E(),e.observe(f.current)),_.current&&(_.current.onloadeddata=O),()=>{f.current&&(f.current.onload=()=>null,f.current.onerror=()=>null),_.current&&(_.current.onloadeddata=()=>null),e.disconnect()}},[t,i]),t.url&&t.url.length>0&&!x?a.a.createElement("div",Object.assign({className:Object(m.b)(r.a.root,o)},h),"VIDEO"===t.type&&g?a.a.createElement("video",{ref:_,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},a.a.createElement("source",{src:t.url}),"Your browser does not support videos"):a.a.createElement("img",Object.assign({ref:f,className:r.a.image,loading:"lazy",width:d,height:p,alt:""},m.e)),b&&a.a.createElement(u,null)):a.a.createElement("div",{className:r.a.notAvailable},a.a.createElement("span",null,"Thumbnail not available"))}},56:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",image:"MediaPopupBoxImage__image MediaPopupBoxObject__reset",loading:"MediaPopupBoxImage__loading MediaPopupBoxImage__image MediaPopupBoxObject__reset MediaPopupBoxObject__loading-animation",error:"MediaPopupBoxImage__error MediaPopupBoxImage__image MediaPopupBoxObject__reset layout__flex-box","fade-in-animation":"MediaPopupBoxImage__fade-in-animation",fadeInAnimation:"MediaPopupBoxImage__fade-in-animation"}},6:function(e,t,o){"use strict";o.d(t,"a",(function(){return y}));var n=o(50),a=o.n(n),i=o(1),r=o(2),l=o(41),s=o(3),c=o(4),d=o(29),u=o(16),m=o(22),p=o(68),h=o(12),f=o(11),_=o(15),g=function(e,t,o,n){var a,i=arguments.length,r=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(i<3?a(r):i>3?a(t,o,r):a(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class y{constructor(e=new y.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new y.Options(e),this.localMedia=i.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(i.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(i.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(i.p)(()=>this._media,e=>this.media=e),Object(i.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(i.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,y.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),y.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,n&&n()}).catch(e=>{var t;if(a.a.isCancel(e)||void 0===e.response)return null;const o=new y.Events.FetchFailEvent(y.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}g([i.o],y.prototype,"media",void 0),g([i.o],y.prototype,"canLoadMore",void 0),g([i.o],y.prototype,"stories",void 0),g([i.o],y.prototype,"numLoadedMore",void 0),g([i.o],y.prototype,"options",void 0),g([i.o],y.prototype,"totalMedia",void 0),g([i.o],y.prototype,"mode",void 0),g([i.o],y.prototype,"isLoaded",void 0),g([i.o],y.prototype,"isLoading",void 0),g([i.f],y.prototype,"reload",void 0),g([i.o],y.prototype,"localMedia",void 0),g([i.o],y.prototype,"numMediaShown",void 0),g([i.o],y.prototype,"numMediaToShow",void 0),g([i.o],y.prototype,"numMediaPerPage",void 0),g([i.h],y.prototype,"_media",null),g([i.h],y.prototype,"_numMediaShown",null),g([i.h],y.prototype,"_numMediaPerPage",null),g([i.h],y.prototype,"_canLoadMore",null),g([i.f],y.prototype,"loadMore",null),g([i.f],y.prototype,"load",null),g([i.f],y.prototype,"loadMedia",null),g([i.f],y.prototype,"addLocalMedia",null),function(e){let t,o,n,a,m,p,y,b,v,x,M,E;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class S{constructor(e={}){S.setFromObject(this,e)}static setFromObject(t,o={}){var n,a,i,c,d,u,m,p,h,_,g,y,b,v,x,M,E;const S=o.accounts?o.accounts.slice():e.DefaultOptions.accounts;t.accounts=S.filter(e=>!!e).map(e=>parseInt(e.toString()));const w=o.tagged?o.tagged.slice():e.DefaultOptions.tagged;return t.tagged=w.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.layout=l.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderNumScrollPosts=r.a.normalize(o.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.sliderInfinite=null!==(n=o.sliderInfinite)&&void 0!==n?n:e.DefaultOptions.sliderInfinite,t.sliderLoop=null!==(a=o.sliderLoop)&&void 0!==a?a:e.DefaultOptions.sliderLoop,t.sliderArrowPos=r.a.normalize(o.sliderArrowPos,e.DefaultOptions.sliderArrowPos),t.sliderArrowSize=o.sliderArrowSize||e.DefaultOptions.sliderArrowSize,t.sliderArrowColor=o.sliderArrowColor||e.DefaultOptions.sliderArrowColor,t.sliderArrowBgColor=o.sliderArrowBgColor||e.DefaultOptions.sliderArrowBgColor,t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(i=o.headerAccount)&&void 0!==i?i:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===s.b.getById(t.headerAccount)?s.b.list.length>0?s.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(c=o.customProfilePic)&&void 0!==c?c:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(d=o.includeStories)&&void 0!==d?d:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(u=o.captionRemoveDots)&&void 0!==u?u:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(m=o.likesIconColor)&&void 0!==m?m:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(p=o.lightboxShowSidebar)&&void 0!==p?p:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(h=o.autoload)&&void 0!==h?h:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(_=o.followBtnText)&&void 0!==_?_:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(g=o.hashtagWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(y=o.hashtagBlacklistSettings)&&void 0!==y?y:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(b=o.captionWhitelistSettings)&&void 0!==b?b:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(v=o.captionBlacklistSettings)&&void 0!==v?v:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(x=o.promotionEnabled)&&void 0!==x?x:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(M=o.autoPromotionsEnabled)&&void 0!==M?M:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(E=o.globalPromotionsEnabled)&&void 0!==E?E:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(o.promotions)?t.promotions=f.a.fromArray(o.promotions):o.promotions&&o.promotions instanceof Map?t.promotions=f.a.fromMap(o.promotions):"object"==typeof o.promotions?t.promotions=o.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=s.b.idsToAccounts(e.accounts),o=s.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:s.b.idsToAccounts(e.accounts),tagged:s.b.idsToAccounts(e.tagged),hashtags:s.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const o=e.Options.getSources(t),n=o.accounts.length>0||o.tagged.length>0,a=o.hashtags.length>0;return n||a}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}g([i.o],S.prototype,"accounts",void 0),g([i.o],S.prototype,"hashtags",void 0),g([i.o],S.prototype,"tagged",void 0),g([i.o],S.prototype,"layout",void 0),g([i.o],S.prototype,"numColumns",void 0),g([i.o],S.prototype,"highlightFreq",void 0),g([i.o],S.prototype,"sliderNumScrollPosts",void 0),g([i.o],S.prototype,"sliderInfinite",void 0),g([i.o],S.prototype,"sliderLoop",void 0),g([i.o],S.prototype,"sliderArrowPos",void 0),g([i.o],S.prototype,"sliderArrowSize",void 0),g([i.o],S.prototype,"sliderArrowColor",void 0),g([i.o],S.prototype,"sliderArrowBgColor",void 0),g([i.o],S.prototype,"mediaType",void 0),g([i.o],S.prototype,"postOrder",void 0),g([i.o],S.prototype,"numPosts",void 0),g([i.o],S.prototype,"linkBehavior",void 0),g([i.o],S.prototype,"feedWidth",void 0),g([i.o],S.prototype,"feedHeight",void 0),g([i.o],S.prototype,"feedPadding",void 0),g([i.o],S.prototype,"imgPadding",void 0),g([i.o],S.prototype,"textSize",void 0),g([i.o],S.prototype,"bgColor",void 0),g([i.o],S.prototype,"textColorHover",void 0),g([i.o],S.prototype,"bgColorHover",void 0),g([i.o],S.prototype,"hoverInfo",void 0),g([i.o],S.prototype,"showHeader",void 0),g([i.o],S.prototype,"headerInfo",void 0),g([i.o],S.prototype,"headerAccount",void 0),g([i.o],S.prototype,"headerStyle",void 0),g([i.o],S.prototype,"headerTextSize",void 0),g([i.o],S.prototype,"headerPhotoSize",void 0),g([i.o],S.prototype,"headerTextColor",void 0),g([i.o],S.prototype,"headerBgColor",void 0),g([i.o],S.prototype,"headerPadding",void 0),g([i.o],S.prototype,"customBioText",void 0),g([i.o],S.prototype,"customProfilePic",void 0),g([i.o],S.prototype,"includeStories",void 0),g([i.o],S.prototype,"storiesInterval",void 0),g([i.o],S.prototype,"showCaptions",void 0),g([i.o],S.prototype,"captionMaxLength",void 0),g([i.o],S.prototype,"captionRemoveDots",void 0),g([i.o],S.prototype,"captionSize",void 0),g([i.o],S.prototype,"captionColor",void 0),g([i.o],S.prototype,"showLikes",void 0),g([i.o],S.prototype,"showComments",void 0),g([i.o],S.prototype,"lcIconSize",void 0),g([i.o],S.prototype,"likesIconColor",void 0),g([i.o],S.prototype,"commentsIconColor",void 0),g([i.o],S.prototype,"lightboxShowSidebar",void 0),g([i.o],S.prototype,"numLightboxComments",void 0),g([i.o],S.prototype,"showLoadMoreBtn",void 0),g([i.o],S.prototype,"loadMoreBtnText",void 0),g([i.o],S.prototype,"loadMoreBtnTextColor",void 0),g([i.o],S.prototype,"loadMoreBtnBgColor",void 0),g([i.o],S.prototype,"autoload",void 0),g([i.o],S.prototype,"showFollowBtn",void 0),g([i.o],S.prototype,"followBtnText",void 0),g([i.o],S.prototype,"followBtnTextColor",void 0),g([i.o],S.prototype,"followBtnBgColor",void 0),g([i.o],S.prototype,"followBtnLocation",void 0),g([i.o],S.prototype,"hashtagWhitelist",void 0),g([i.o],S.prototype,"hashtagBlacklist",void 0),g([i.o],S.prototype,"captionWhitelist",void 0),g([i.o],S.prototype,"captionBlacklist",void 0),g([i.o],S.prototype,"hashtagWhitelistSettings",void 0),g([i.o],S.prototype,"hashtagBlacklistSettings",void 0),g([i.o],S.prototype,"captionWhitelistSettings",void 0),g([i.o],S.prototype,"captionBlacklistSettings",void 0),g([i.o],S.prototype,"moderation",void 0),g([i.o],S.prototype,"moderationMode",void 0),e.Options=S;class w{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.d)(Object(c.p)(t,this.captionMaxLength)):t}static compute(t,o=r.a.Mode.DESKTOP){const n=new w({accounts:s.b.filterExisting(t.accounts),tagged:s.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:l.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,o,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,o,!0),sliderInfinite:t.sliderInfinite,sliderLoop:t.sliderLoop,sliderArrowPos:r.a.get(t.sliderArrowPos,o,!0),sliderArrowSize:r.a.get(t.sliderArrowSize,o,!0),sliderArrowColor:Object(u.a)(t.sliderArrowColor),sliderArrowBgColor:Object(u.a)(t.sliderArrowBgColor),linkBehavior:r.a.get(t.linkBehavior,o,!0),bgColor:Object(u.a)(t.bgColor),textColorHover:Object(u.a)(t.textColorHover),bgColorHover:Object(u.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,o,!0),headerInfo:r.a.get(t.headerInfo,o,!0),headerStyle:r.a.get(t.headerStyle,o,!0),headerTextColor:Object(u.a)(t.headerTextColor),headerBgColor:Object(u.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,o,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,o,!0),captionMaxLength:r.a.get(t.captionMaxLength,o,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(u.a)(t.captionColor),showLikes:r.a.get(t.showLikes,o,!0),showComments:r.a.get(t.showComments,o,!0),likesIconColor:Object(u.a)(t.likesIconColor),commentsIconColor:Object(u.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(u.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,o,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,o,!0),followBtnTextColor:Object(u.a)(t.followBtnTextColor),followBtnBgColor:Object(u.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:s.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=this.getNumCols(t,o),n.numPosts=this.getNumPosts(t,o),n.allAccounts=n.accounts.concat(n.tagged.filter(e=>!n.accounts.includes(e))),n.allAccounts.length>0&&(n.account=t.headerAccount&&n.allAccounts.includes(t.headerAccount)?s.b.getById(t.headerAccount):s.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:s.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showBio=n.headerInfo.some(t=>t===e.HeaderInfo.BIO),n.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==n.account?s.b.getBioText(n.account):"";n.bioText=Object(d.d)(e),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(t.feedWidth,o,"100%"),n.feedHeight=this.normalizeCssSize(t.feedHeight,o,"auto"),n.feedOverflowX=r.a.get(t.feedWidth,o)?"auto":void 0,n.feedOverflowY=r.a.get(t.feedHeight,o)?"auto":void 0,n.feedPadding=this.normalizeCssSize(t.feedPadding,o,"0"),n.imgPadding=this.normalizeCssSize(t.imgPadding,o,"0"),n.textSize=this.normalizeCssSize(t.textSize,o,"inherit",!0),n.headerTextSize=this.normalizeCssSize(t.headerTextSize,o,"inherit"),n.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,o,"50px"),n.captionSize=this.normalizeCssSize(t.captionSize,o,"inherit"),n.lcIconSize=this.normalizeCssSize(t.lcIconSize,o,"inherit"),n.buttonPadding=Math.max(10,r.a.get(t.imgPadding,o))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,o=0){const n=parseInt(r.a.get(e,t)+"");return isNaN(n)?t===r.a.Mode.DESKTOP?o:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,o):n}static normalizeCssSize(e,t,o=null,n=!1){const a=r.a.get(e,t,n);return a?a+"px":o}}function O(e,t){if(_.a.isPro)return Object(c.k)(h.a.isValid,[()=>P(e,t),()=>t.globalPromotionsEnabled&&h.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&h.a.getAutoPromo(e)])}function P(e,t){return e?h.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=w,function(e){e.NONE="none",e.LOOP="loop",e.INFINITE="infinite"}(o=e.SliderLoopMode||(e.SliderLoopMode={})),function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(n=e.SliderArrowPosition||(e.SliderArrowPosition={})),function(e){e.POPULAR="popular",e.RECENT="recent"}(a=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(m=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(p=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(y=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(b=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(v=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(x=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(M=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(E=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderNumScrollPosts:{desktop:1},sliderInfinite:!0,sliderLoop:!1,sliderArrowPos:{desktop:n.INSIDE},sliderArrowSize:{desktop:20},sliderArrowColor:{r:255,b:255,g:255,a:1},sliderArrowBgColor:{r:0,b:0,g:0,a:.8},mediaType:m.ALL,postOrder:y.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:p.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[b.LIKES_COMMENTS,b.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[x.PROFILE_PIC,x.BIO]},headerAccount:null,headerStyle:{desktop:v.NORMAL,phone:v.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:M.HEADER,phone:M.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:E.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=O,e.getFeedPromo=P,e.executeMediaClick=function(e,t){const o=O(e,t),n=h.a.getConfig(o),a=h.a.getType(o);return!(!a||!a.isValid(n)||"function"!=typeof a.onMediaClick)&&a.onMediaClick(e,n)},e.getLink=function(e,t){var o,n;const a=O(e,t),i=h.a.getConfig(a),r=h.a.getType(a);if(void 0===r||!r.isValid(i))return{text:null,url:null,newTab:!1};const[l,s]=r.getPopupLink?null!==(o=r.getPopupLink(e,i))&&void 0!==o?o:null:[null,!1];return{text:l,url:r.getMediaUrl&&null!==(n=r.getMediaUrl(e,i))&&void 0!==n?n:null,newTab:s,icon:"external"}}}(y||(y={}))},61:function(e,t,o){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},632:function(e,t,o){"use strict";o.r(t);var n=o(41),a=o(93),i=o(0),r=o.n(i);const l={id:"grid",name:"Grid",component:a.a,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))}},s={id:"highlight",name:"Highlight",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:197,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:103,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))},isPro:!0},c={id:"masonry",name:"Masonry",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:0,y:0,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:0,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:0,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:0,y:206,width:94,height:94,rx:2,ry:2}),r.a.createElement("rect",{x:103,y:103,width:94,height:197,rx:2,ry:2}),r.a.createElement("rect",{x:206,y:206,width:94,height:94,rx:2,ry:2}))},isPro:!0},d={id:"slider",name:"Slider",component:null,iconComponent:function(){return r.a.createElement("svg",{viewBox:"0 0 300 300"},r.a.createElement("rect",{x:43,y:43,width:214,height:214,rx:2,ry:2}),r.a.createElement("path",{d:"M 25,142 l -16,16 l 16,16"}),r.a.createElement("path",{d:"M 275,142 l 16,16 l -16,16"}))},isPro:!0,isComingSoon:!1};n.a.addLayout(l),n.a.addLayout(s),n.a.addLayout(c),n.a.addLayout(d)},64:function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return a}));const n=(e,t)=>e.startsWith(t)?e:t+e,a=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},68:function(e,t,o){"use strict";function n(e){return t=>(t.stopPropagation(),e(t))}function a(e,t){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{o=null,e(...n)},t)}}o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return a}))},70:function(e,t,o){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},71:function(e,t,o){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},73:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},79:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(49),r=o.n(i),l=o(7),s=o(6),c=o(20),d=o.n(c),u=o(71),m=o.n(u);const p=Object(l.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,o={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return a.a.createElement("a",{href:t,target:"__blank",className:m.a.link},a.a.createElement("button",{className:m.a.button,style:o},e.followBtnText))});var h=o(17),f=o.n(h),_=o(5),g=o(172),y=o(639),b=o(42),v=o.n(b),x=o(18),M=o(8),E=Object(l.b)((function({stories:e,options:t,onClose:o}){e.sort((e,t)=>{const o=Object(g.a)(e.timestamp).getTime(),n=Object(g.a)(t.timestamp).getTime();return o<n?-1:o==n?0:1});const[i,r]=a.a.useState(0),l=e.length-1,[s,c]=a.a.useState(0),[d,u]=a.a.useState(0);Object(n.useEffect)(()=>{0!==s&&c(0)},[i]);const m=i<l,p=i>0,h=()=>o&&o(),b=()=>i<l?r(i+1):h(),E=()=>r(e=>Math.max(e-1,0)),O=e[i],P="https://instagram.com/"+t.account.username,B=O.type===_.a.Type.VIDEO?d:t.storiesInterval;Object(x.d)("keydown",e=>{switch(e.key){case"Escape":h();break;case"ArrowLeft":E();break;case"ArrowRight":b();break;default:return}e.preventDefault(),e.stopPropagation()});const C=a.a.createElement("div",{className:f.a.root},a.a.createElement("div",{className:f.a.container},a.a.createElement("div",{className:f.a.header},a.a.createElement("a",{href:P,target:"_blank"},a.a.createElement("img",{className:f.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),a.a.createElement("a",{href:P,className:f.a.username,target:"_blank"},t.account.username),a.a.createElement("div",{className:f.a.date},Object(y.a)(Object(g.a)(O.timestamp),{addSuffix:!0}))),a.a.createElement("div",{className:f.a.progress},e.map((e,t)=>a.a.createElement(S,{key:e.id,duration:B,animate:t===i,isDone:t<i}))),a.a.createElement("div",{className:f.a.content},p&&a.a.createElement("div",{className:f.a.prevButton,onClick:E,role:"button"},a.a.createElement(M.a,{icon:"arrow-left-alt2"})),a.a.createElement("div",{className:f.a.media},a.a.createElement(w,{key:O.id,media:O,imgDuration:t.storiesInterval,onGetDuration:u,onEnd:()=>m?b():h()})),m&&a.a.createElement("div",{className:f.a.nextButton,onClick:b,role:"button"},a.a.createElement(M.a,{icon:"arrow-right-alt2"})),a.a.createElement("div",{className:f.a.closeButton,onClick:h,role:"button"},a.a.createElement(M.a,{icon:"no-alt"})))));return v.a.createPortal(C,document.body)}));function S({animate:e,isDone:t,duration:o}){const n=e?f.a.progressOverlayAnimating:t?f.a.progressOverlayDone:f.a.progressOverlay,i={animationDuration:o+"s"};return a.a.createElement("div",{className:f.a.progressSegment},a.a.createElement("div",{className:n,style:i}))}function w({media:e,imgDuration:t,onGetDuration:o,onEnd:n}){return e.type===_.a.Type.VIDEO?a.a.createElement(P,{media:e,onEnd:n,onGetDuration:o}):a.a.createElement(O,{media:e,onEnd:n,duration:t})}function O({media:e,duration:t,onEnd:o}){const[i,r]=a.a.useState(!1);return Object(n.useEffect)(()=>{const e=i?setTimeout(o,1e3*t):null;return()=>clearTimeout(e)},[e,i]),a.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function P({media:e,onEnd:t,onGetDuration:o}){const n=a.a.useRef();return a.a.createElement("video",{ref:n,src:e.url,poster:e.thumbnail,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>o(n.current.duration),onEnded:t},a.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var B=o(3),C=Object(l.b)((function({feed:e,options:t}){const[o,n]=a.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,l=e.stories.filter(e=>e.username===i.username),c=l.length>0,u=t.headerInfo.includes(s.a.HeaderInfo.MEDIA_COUNT),m=t.headerInfo.includes(s.a.HeaderInfo.FOLLOWERS)&&i.type!=B.a.Type.PERSONAL,h=t.headerInfo.includes(s.a.HeaderInfo.PROFILE_PIC),f=t.includeStories&&c,_=t.headerStyle===s.a.HeaderStyle.BOXED,g={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},y=f?"button":void 0,b={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:f?"pointer":"normal"},v=t.showFollowBtn&&(t.followBtnLocation===s.a.FollowBtnLocation.HEADER||t.followBtnLocation===s.a.FollowBtnLocation.BOTH),x={justifyContent:t.showBio&&_?"flex-start":"center"},M=a.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),S=f&&c?d.a.profilePicWithStories:d.a.profilePic;return a.a.createElement("div",{className:L(t.headerStyle),style:g},a.a.createElement("div",{className:d.a.leftContainer},h&&a.a.createElement("div",{className:S,style:b,role:y,onClick:()=>{f&&n(0)}},f?M:a.a.createElement("a",{href:r,target:"_blank"},M)),a.a.createElement("div",{className:d.a.info},a.a.createElement("div",{className:d.a.username},a.a.createElement("a",{href:r,target:"_blank",style:{color:t.headerTextColor}},a.a.createElement("span",null,"@"),a.a.createElement("span",null,i.username))),t.showBio&&a.a.createElement("div",{className:d.a.bio},t.bioText),(u||m)&&a.a.createElement("div",{className:d.a.counterList},u&&a.a.createElement("div",{className:d.a.counter},a.a.createElement("span",null,i.mediaCount)," posts"),m&&a.a.createElement("div",{className:d.a.counter},a.a.createElement("span",null,i.followersCount)," followers")))),a.a.createElement("div",{className:d.a.rightContainer},v&&a.a.createElement("div",{className:d.a.followButton,style:x},a.a.createElement(p,{options:t}))),f&&null!==o&&a.a.createElement(E,{stories:l,options:t,onClose:()=>{n(null)}}))}));function L(e){switch(e){case s.a.HeaderStyle.NORMAL:return d.a.normalStyle;case s.a.HeaderStyle.CENTERED:return d.a.centeredStyle;case s.a.HeaderStyle.BOXED:return d.a.boxedStyle;default:return}}var T=o(94),A=o.n(T);const I=Object(l.b)(({feed:e,options:t})=>{const o=a.a.useRef(),n=Object(x.k)(o,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return a.a.createElement("button",{ref:o,className:A.a.root,style:i,onClick:()=>{n(),e.loadMore()}},e.isLoading?a.a.createElement("span",null,"Loading ..."):a.a.createElement("span",null,e.options.loadMoreBtnText))});var k=o(87);t.a=Object(l.b)((function({children:e,feed:t,options:o}){const[n,i]=a.a.useState(null),l=a.a.useCallback(e=>{const n=t.media.findIndex(t=>t.id===e.id);if(!t.options.promotionEnabled||!s.a.executeMediaClick(e,t.options))switch(o.linkBehavior){case s.a.LinkBehavior.LIGHTBOX:return void i(n);case s.a.LinkBehavior.NEW_TAB:return void window.open(e.permalink,"_blank");case s.a.LinkBehavior.SELF:return void window.open(e.permalink,"_self")}},[t,o.linkBehavior]),c={width:o.feedWidth,height:o.feedHeight,fontSize:o.textSize,overflowX:o.feedOverflowX,overflowY:o.feedOverflowY},d={backgroundColor:o.bgColor,padding:o.feedPadding},u={marginBottom:o.imgPadding},m={marginTop:o.buttonPadding},h=o.showHeader&&a.a.createElement("div",{style:u},a.a.createElement(C,{feed:t,options:o})),f=o.showLoadMoreBtn&&t.canLoadMore&&a.a.createElement("div",{className:r.a.loadMoreBtn,style:m},a.a.createElement(I,{feed:t,options:o})),_=o.showFollowBtn&&(o.followBtnLocation===s.a.FollowBtnLocation.BOTTOM||o.followBtnLocation===s.a.FollowBtnLocation.BOTH)&&a.a.createElement("div",{className:r.a.followBtn,style:m},a.a.createElement(p,{options:o})),g=t.isLoading?new Array(o.numPosts).fill(r.a.fakeMedia):[];return a.a.createElement("div",{className:r.a.root,style:c},a.a.createElement("div",{className:r.a.wrapper,style:d},e({mediaList:t.media,openMedia:l,header:h,loadMoreBtn:f,followBtn:_,loadingMedia:g})),null!==n&&a.a.createElement(k.a,{feed:t,current:n,numComments:o.numLightboxComments,showSidebar:o.lightboxShowSidebar,onRequestClose:()=>i(null)}))}))},8:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(0),a=o.n(n),i=o(10);const r=e=>{var{icon:t,className:o}=e,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["icon","className"]);return a.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},n))}},80:function(e,t,o){"use strict";var n=o(48),a=o.n(n),i=o(0),r=o.n(i),l=o(5),s=o(7),c=o(23),d=o.n(c),u=o(172),m=o(643),p=o(642),h=o(6),f=o(8),_=o(4),g=o(3),y=Object(s.b)((function({options:e,media:t}){var o;const n=r.a.useRef(),[a,s]=r.a.useState(null);Object(i.useEffect)(()=>{n.current&&s(n.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===h.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==l.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===l.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const y=e.hoverInfo.some(e=>e===h.a.HoverInfo.CAPTION),b=e.hoverInfo.some(e=>e===h.a.HoverInfo.USERNAME),v=e.hoverInfo.some(e=>e===h.a.HoverInfo.DATE),x=e.hoverInfo.some(e=>e===h.a.HoverInfo.INSTA_LINK),M=null!==(o=t.caption)&&void 0!==o?o:"",E=t.timestamp?Object(u.a)(t.timestamp):null,S=t.timestamp?Object(m.a)(E).toString():null,w=t.timestamp?Object(p.a)(E,"HH:mm - do MMM yyyy"):null,O=t.timestamp?Object(_.o)(t.timestamp):null,P={color:e.textColorHover,backgroundColor:e.bgColorHover};let B=null;if(null!==a){const o=Math.sqrt(1.3*(a+30)),n=Math.sqrt(1.7*a+100),i=Math.sqrt(a-36),l=Math.max(o,8)+"px",s=Math.max(n,8)+"px",u=Math.max(i,8)+"px",m={fontSize:l},p={fontSize:l,width:l,height:l},h={color:e.textColorHover,fontSize:s,width:s,height:s},_={fontSize:u};B=r.a.createElement("div",{className:d.a.rows},r.a.createElement("div",{className:d.a.topRow},b&&t.username&&r.a.createElement("div",{className:d.a.username},r.a.createElement("a",{href:g.b.getUsernameUrl(t.username),target:"_blank"},"@",t.username)),y&&t.caption&&r.a.createElement("div",{className:d.a.caption},M)),r.a.createElement("div",{className:d.a.middleRow},c&&r.a.createElement("div",{className:d.a.counterList},r.a.createElement("span",{className:d.a.likesCount,style:m},r.a.createElement(f.a,{icon:"heart",style:p})," ",t.likesCount),r.a.createElement("span",{className:d.a.commentsCount,style:m},r.a.createElement(f.a,{icon:"admin-comments",style:p})," ",t.commentsCount))),r.a.createElement("div",{className:d.a.bottomRow},v&&t.timestamp&&r.a.createElement("div",{className:d.a.dateContainer},r.a.createElement("time",{className:d.a.date,dateTime:S,title:w,style:_},O)),x&&r.a.createElement("a",{className:d.a.igLinkIcon,href:t.permalink,title:M,target:"_blank",style:h,onClick:e=>e.stopPropagation()},r.a.createElement(f.a,{icon:"instagram",style:h}))))}return r.a.createElement("div",{ref:n,className:d.a.root,style:P},B)})),b=o(15),v=o(54);t.a=Object(s.b)((function({media:e,options:t,forceOverlay:o,onClick:n}){const[i,s]=r.a.useState(!1),c=function(e){switch(e.type){case l.a.Type.IMAGE:return a.a.imageTypeIcon;case l.a.Type.VIDEO:return a.a.videoTypeIcon;case l.a.Type.ALBUM:return a.a.albumTypeIcon;default:return}}(e),d={backgroundImage:`url(${b.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:a.a.root,onClick:e=>{n&&n(e)},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},r.a.createElement(v.a,{media:e}),r.a.createElement("div",{className:c,style:d}),(i||o)&&r.a.createElement("div",{className:a.a.overlay},r.a.createElement(y,{media:e,options:t}))))}))},85:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(70),r=o.n(i),l=o(7),s=o(4),c=o(29);t.a=Object(l.b)((function({media:e,options:t,full:o}){if(!t.showCaptions||!e.type)return null;const n={color:t.captionColor,fontSize:t.captionSize},i=o?0:1,l=e.caption?e.caption:"",d=t.captionMaxLength?Object(s.p)(l,t.captionMaxLength):l,u=Object(c.d)(d,void 0,i,t.captionRemoveDots),m=o?r.a.full:r.a.preview;return a.a.createElement("div",{className:m,style:n},u)}))},86:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(61),r=o.n(i),l=o(7),s=o(5),c=o(8);t.a=Object(l.b)((function({media:e,options:t}){if(!e.type||e.source.type===s.a.Source.Type.PERSONAL_ACCOUNT)return null;const o={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},n=Object.assign(Object.assign({},o),{color:t.likesIconColor}),i=Object.assign(Object.assign({},o),{color:t.commentsIconColor}),l={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&a.a.createElement("div",{className:r.a.root},t.showLikes&&a.a.createElement("div",{className:r.a.icon,style:n},a.a.createElement(c.a,{icon:"heart",style:l}),a.a.createElement("span",null,e.likesCount)),t.showComments&&a.a.createElement("div",{className:r.a.icon,style:i},a.a.createElement(c.a,{icon:"admin-comments",style:l}),a.a.createElement("span",null,e.commentsCount)))}))},87:function(e,t,o){"use strict";o.d(t,"a",(function(){return W}));var n=o(0),a=o.n(n),i=o(42),r=o.n(i),l=o(14),s=o.n(l),c=o(18),d=o(34),u=o.n(d),m=o(5),p=o(3),h=o(21),f=o.n(h),_=o(39),g=o.n(_),y=o(4),b=o(29),v=o(10);const x=({comment:e,className:t})=>{const o=e.username?a.a.createElement("a",{key:-1,href:p.b.getUsernameUrl(e.username),target:"_blank",className:g.a.username},e.username):null,n=o?(e,t)=>t>0?e:[o,...e]:void 0,i=Object(b.d)(e.text,n),r=1===e.likeCount?"like":"likes";return a.a.createElement("div",{className:Object(v.b)(g.a.root,t)},a.a.createElement("div",{className:g.a.content},a.a.createElement("div",{key:e.id,className:g.a.text},i)),a.a.createElement("div",{className:g.a.metaList},a.a.createElement("div",{className:g.a.date},Object(y.o)(e.timestamp)),e.likeCount>0&&a.a.createElement("div",{className:g.a.likeCount},`${e.likeCount} ${r}`)))};var M=o(8);function E({source:e,comments:t,showLikes:o,numLikes:n,date:i,link:r}){var l;return t=null!=t?t:[],a.a.createElement("article",{className:f.a.container},e&&a.a.createElement("header",{className:f.a.header},e.img&&a.a.createElement("a",{href:e.url,target:"_blank",className:f.a.sourceImgLink},a.a.createElement("img",{className:f.a.sourceImg,src:e.img,alt:null!==(l=e.name)&&void 0!==l?l:""})),a.a.createElement("div",{className:f.a.sourceName},a.a.createElement("a",{href:e.url,target:"_blank"},e.name))),a.a.createElement("div",{className:f.a.commentsScroller},t.length>0&&a.a.createElement("div",{className:f.a.commentsList},t.map((e,t)=>a.a.createElement(x,{key:t,comment:e,className:f.a.comment})))),a.a.createElement("div",{className:f.a.footer},a.a.createElement("div",{className:f.a.footerInfo},o&&a.a.createElement("div",{className:f.a.numLikes},a.a.createElement("span",null,n)," ",a.a.createElement("span",null,"likes")),i&&a.a.createElement("div",{className:f.a.date},i)),r&&a.a.createElement("div",{className:f.a.footerLink},a.a.createElement("a",{href:r.url,target:r.newTab?"_blank":"_self"},a.a.createElement(M.a,{icon:r.icon,className:f.a.footerLinkIcon}),a.a.createElement("span",null,r.text)))))}function S({media:e,numComments:t,link:o}){o=null!=o?o:{url:e.permalink,text:"View on Instagram",icon:"instagram",newTab:!0};const n=e.comments?e.comments.slice(0,t):[];e.caption&&e.caption.length&&n.splice(0,0,{id:e.id,text:e.caption,timestamp:e.timestamp,username:e.username});const i={name:"",url:"",img:void 0};switch(e.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:i.name="@"+e.username,i.url=p.b.getUsernameUrl(e.username);const t=p.b.getByUsername(e.username);i.img=t?p.b.getProfilePicUrl(t):void 0;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:i.name="#"+e.source.name,i.url="https://instagram.com/explore/tags/"+e.source.name}return a.a.createElement(E,{source:i,comments:n,date:Object(y.o)(e.timestamp),showLikes:e.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT,numLikes:e.likesCount,link:o})}var w=o(95),O=o.n(w),P=o(35),B=o.n(P),C=o(54);function L(e){var{media:t,thumbnailUrl:o,size:i,autoPlay:r,onGetMetaData:l}=e,s=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["media","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=a.a.useRef(),[d,u]=a.a.useState(!r),[p,h]=a.a.useState(r),f=a.a.useContext(R);Object(n.useEffect)(()=>{r?d&&u(!1):d||u(!0),p&&h(r)},[t.url]),Object(n.useLayoutEffect)(()=>{if(c.current){const e=()=>h(!0),t=()=>h(!1);return c.current.addEventListener("play",e),c.current.addEventListener("pause",t),()=>{c.current.removeEventListener("play",e),c.current.removeEventListener("pause",t)}}},[c.current]);const _={width:i?i.width+"px":"100%",height:i?i.height+"px":"100%"};return a.a.createElement("div",{key:t.url,className:B.a.root,style:_},a.a.createElement("video",Object.assign({ref:c,className:d?B.a.videoHidden:B.a.video,src:t.url,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&c.current.play()},onLoadedMetadata:()=>{f.reportSize({width:c.current.videoWidth,height:c.current.videoHeight})}},s),a.a.createElement("source",{src:t.url}),"Your browser does not support videos"),a.a.createElement("div",{className:d?B.a.thumbnail:B.a.thumbnailHidden},a.a.createElement(C.a,{media:t,size:m.a.Thumbnails.Size.LARGE,width:i?i.width:void 0,height:i?i.height:void 0})),a.a.createElement("div",{className:p?B.a.controlPlaying:B.a.controlPaused,onClick:()=>{c.current&&(d?(u(!1),c.current.currentTime=0,c.current.play()):c.current.paused?c.current.play():c.current.pause())}},a.a.createElement(M.a,{className:B.a.playButton,icon:"controls-play"})))}var T=o(56),A=o.n(T),I=m.a.Thumbnails.Size;const k={s:320,m:480,l:600};function N({media:e}){const t=a.a.useRef(),o=a.a.useContext(R),[i,r]=Object(n.useState)(!0),[l,s]=Object(n.useState)(!1);Object(n.useLayoutEffect)(()=>{i&&t.current&&t.current.complete&&c()},[]);const c=()=>{if(r(!1),t.current&&!e.size){const e={width:t.current.naturalWidth,height:t.current.naturalHeight};o.reportSize(e)}};if(l)return a.a.createElement("div",{className:A.a.error},a.a.createElement("span",null,"Image is not available"));const d=m.a.Thumbnails.get(e,I.LARGE),u=m.a.Thumbnails.getSrcSet(e,k).join(",");return l?a.a.createElement("div",{className:A.a.error},a.a.createElement("span",null,"Image is not available")):a.a.createElement("img",{ref:t,className:i?A.a.loading:A.a.image,onLoad:c,onError:()=>{s(!0),r(!1)},src:d,srcSet:u,sizes:"600px",alt:"",loading:"eager"})}var j=o(28),D=o.n(j);function H({media:e,autoplayVideos:t}){const[o,i]=Object(n.useState)(0),r=e.children,l=r.length-1,s={transform:`translateX(${100*-o}%)`};return a.a.createElement("div",{className:D.a.album},a.a.createElement("div",{className:D.a.frame},a.a.createElement("ul",{className:D.a.scroller,style:s},r.map(e=>a.a.createElement("li",{key:e.id,className:D.a.child},a.a.createElement(z,{media:e,autoplayVideos:t}))))),a.a.createElement("div",{className:D.a.controlsLayer},a.a.createElement("div",{className:D.a.controlsContainer},a.a.createElement("div",null,o>0&&a.a.createElement("div",{className:D.a.prevButton,onClick:()=>i(e=>Math.max(e-1,0)),role:"button"},a.a.createElement(M.a,{icon:"arrow-left-alt2"}))),a.a.createElement("div",null,o<l&&a.a.createElement("div",{className:D.a.nextButton,onClick:()=>i(e=>Math.min(e+1,l)),role:"button"},a.a.createElement(M.a,{icon:"arrow-right-alt2"}))))),a.a.createElement("div",{className:D.a.indicatorList},r.map((e,t)=>a.a.createElement("div",{key:t,className:t===o?D.a.indicatorCurrent:D.a.indicator}))))}function z({media:e,autoplayVideos:t}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return a.a.createElement(N,{media:e});case m.a.Type.VIDEO:return a.a.createElement(L,{media:e,autoPlay:t});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return a.a.createElement(H,{media:e,autoplayVideos:t})}return a.a.createElement("div",{className:O.a.notAvailable},a.a.createElement("span",null,"Media is not available"))}const R=a.a.createContext({});function F({media:e,showSidebar:t,numComments:o,link:n,vertical:i}){var r,l;t=null==t||t,o=null!=o?o:30;const[s,c]=a.a.useState(),d=null!==(l=null!==(r=e.size)&&void 0!==r?r:s)&&void 0!==l?l:{width:600,height:600},m=d&&d.height>0?d.width/d.height:null,p={paddingBottom:i?void 0:(m?100/m:100)+"%"};return a.a.createElement(R.Provider,{value:{reportSize:c}},a.a.createElement("div",{className:i?u.a.vertical:u.a.horizontal},a.a.createElement("div",{className:t?u.a.wrapperSidebar:u.a.wrapper},a.a.createElement("div",{className:u.a.mediaContainer},a.a.createElement("div",{className:u.a.mediaSizer,style:p},a.a.createElement("div",{className:u.a.media},a.a.createElement(z,{key:e.id,media:e}))))),t&&a.a.createElement("div",{className:u.a.sidebar},a.a.createElement(S,{media:e,numComments:o,link:n}))))}var U=o(6);function G(e,t){return t&&(null!=e?e:document.body).getBoundingClientRect().width<876}function V(e,t){t?e.classList.remove(s.a.noScroll):e.classList.add(s.a.noScroll)}function W({feed:e,current:t,showSidebar:o,numComments:i,onRequestClose:l}){var d;const u=a.a.useRef(),[m,p]=a.a.useState(G(null,o)),[h,f]=a.a.useState(t),_=a.a.useContext(W.Context),g=null!==(d=_.target&&_.target.current)&&void 0!==d?d:document.body;Object(n.useEffect)(()=>f(t),[t]);const y=()=>p(G(u.current,o));Object(n.useEffect)(()=>(y(),V(g,!1),()=>V(g,!0)),[g]),Object(c.m)("resize",()=>y(),[],[o]);const b=e=>{l&&l(),e.preventDefault(),e.stopPropagation()},v=e=>{f(e=>Math.max(e-1,0)),e.preventDefault(),e.stopPropagation()},x=t=>{f(t=>Math.min(t+1,e.media.length-1)),t.preventDefault(),t.stopPropagation()};Object(c.e)(document.body,"keydown",e=>{switch(e.key){case"ArrowRight":x(e);break;case"ArrowLeft":v(e);break;case"Escape":b(e);break;default:return}},[],[]);const E=U.a.getLink(e.media[h],e.options),S=null!==E.text&&null!==E.url,w={position:g===document.body?"fixed":"absolute"},O=a.a.createElement("div",{className:m?s.a.vertical:s.a.horizontal,style:w,onClick:b},a.a.createElement("div",{className:s.a.navLayer},a.a.createElement("div",{className:s.a.navBoundary},a.a.createElement("div",{className:o?s.a.navAlignerSidebar:s.a.modalAlignerNoSidebar},h>0&&a.a.createElement("a",{className:s.a.prevBtn,onClick:v,role:"button",tabIndex:0},a.a.createElement(M.a,{icon:"arrow-left-alt2",className:s.a.controlIcon}),a.a.createElement("span",{className:s.a.controlLabel},"Previous")),h<e.media.length-1&&a.a.createElement("a",{className:s.a.nextBtn,onClick:x,role:"button",tabIndex:0},a.a.createElement(M.a,{icon:"arrow-right-alt2",className:s.a.controlIcon}),a.a.createElement("span",{className:s.a.controlLabel},"Next"))))),a.a.createElement("div",{ref:u,className:s.a.modalLayer,role:"dialog",onClick:e=>{e.stopPropagation()}},a.a.createElement("div",{className:o?s.a.modalAlignerSidebar:s.a.modalAlignerNoSidebar},e.media[h]&&a.a.createElement(F,{media:e.media[h],vertical:m,numComments:i,showSidebar:o,link:S?E:void 0}))),a.a.createElement("a",{className:s.a.closeButton,onClick:b,role:"button",tabIndex:0},a.a.createElement(M.a,{icon:"no-alt",className:s.a.controlIcon}),a.a.createElement("span",{className:s.a.controlLabel},"Close")));return r.a.createPortal(O,g)}(W||(W={})).Context=a.a.createContext({target:{current:document.body}})},93:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(27),r=o.n(i),l=o(7),s=o(80),c=o(85),d=o(86),u=o(79),m=o(10),p=o(4);t.a=Object(l.b)((function({feed:e,options:t,cellClassName:o}){const i=a.a.useRef(),[l,s]=a.a.useState(0);Object(n.useLayoutEffect)(()=>{if(i.current&&i.current.children.length>0){const e=i.current.querySelector("."+r.a.mediaMeta);e&&s(e.getBoundingClientRect().height)}},[t]),o=null!=o?o:()=>{};const c={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`},d={paddingBottom:`calc(100% + ${l}px)`};return a.a.createElement(u.a,{feed:e,options:t},({mediaList:n,openMedia:l,header:s,loadMoreBtn:u,followBtn:f,loadingMedia:_})=>a.a.createElement("div",{className:r.a.root},s,(!e.isLoading||e.isLoadingMore)&&a.a.createElement("div",{className:r.a.grid,style:c,ref:i},e.media.length?n.map((e,n)=>a.a.createElement(h,{key:`${n}-${e.id}`,className:o(e,n),style:d,media:e,options:t,openMedia:l})):null,e.isLoadingMore&&_.map((e,t)=>a.a.createElement("div",{key:"fake-media-"+Object(p.q)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),e.isLoading&&!e.isLoadingMore&&a.a.createElement("div",{className:r.a.grid,style:c},_.map((e,t)=>a.a.createElement("div",{key:"fake-media-"+Object(p.q)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),a.a.createElement("div",{className:r.a.buttonList},u,f)))}));const h=a.a.memo((function({className:e,style:t,media:o,options:n,openMedia:i}){const l=a.a.useCallback(()=>i(o),[o]);return a.a.createElement("div",{className:Object(m.b)(r.a.cell,e),style:t},a.a.createElement("div",{className:r.a.cellContent},a.a.createElement("div",{className:r.a.mediaContainer},a.a.createElement(s.a,{media:o,onClick:l,options:n})),a.a.createElement("div",{className:r.a.mediaMeta},a.a.createElement(c.a,{options:n,media:o}),a.a.createElement(d.a,{options:n,media:o}))))}),(e,t)=>e.media.id===t.media.id&&e.options===t.options)},94:function(e,t,o){e.exports={root:"LoadMoreButton__root feed__feed-button"}},95:function(e,t,o){e.exports={reset:"MediaPopupBoxObject__reset","not-available":"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset",notAvailable:"MediaPopupBoxObject__not-available MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",loading:"MediaPopupBoxObject__loading"}}},[[632,0,1]]])}));
ui/dist/editor-pro.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],e):"object"==typeof exports?exports.spotlight=e(require("React"),require("ReactDOM")):t.spotlight=e(t.React,t.ReactDOM)}(window,(function(t,e){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[8],{0:function(e,o){e.exports=t},10:function(t,e,o){"use strict";function n(...t){return t.filter(t=>!!t).join(" ")}function i(t){return n(...Object.getOwnPropertyNames(t).map(e=>t[e]?e:null))}function a(t,e={}){let o=Object.getOwnPropertyNames(e).map(o=>e[o]?t+o:null);return t+" "+o.filter(t=>!!t).join(" ")}o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return i})),o.d(e,"a",(function(){return a})),o.d(e,"e",(function(){return s})),o.d(e,"d",(function(){return r}));const s={onMouseDown:t=>t.preventDefault()};function r(...t){return e=>{t.forEach(t=>t&&function(t,e){"function"==typeof t?t(e):t.current=e}(t,e))}}},102:function(t,e,o){"use strict";o.d(e,"b",(function(){return l})),o.d(e,"a",(function(){return c})),o.d(e,"c",(function(){return u}));var n=o(6),i=o(22),a=o(4),s=o(29),r=o(12);class l{constructor(t){this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.config=Object(a.g)(t),void 0===this.config.watch&&(this.config.watch={all:!0})}fetchMedia(t,e){if(this.hasCache(t))return Promise.resolve(this.media);const o=Object.assign({},t.options,{moderation:this.isWatchingField("moderation")?t.options.moderation:[],moderationMode:t.options.moderationMode,hashtagBlacklist:this.isWatchingField("hashtagBlacklist")?t.options.hashtagBlacklist:[],hashtagWhitelist:this.isWatchingField("hashtagWhitelist")?t.options.hashtagWhitelist:[],captionBlacklist:this.isWatchingField("captionBlacklist")?t.options.captionBlacklist:[],captionWhitelist:this.isWatchingField("captionWhitelist")?t.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.isWatchingField("hashtagBlacklistSettings")&&t.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.isWatchingField("hashtagWhitelistSettings")&&t.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.isWatchingField("captionBlacklistSettings")&&t.options.captionBlacklistSettings,captionWhitelistSettings:!!this.isWatchingField("captionWhitelistSettings")&&t.options.captionWhitelistSettings});return e&&e(),i.a.getFeedMedia(o).then(e=>(this.prevOptions=new n.a.Options(t.options),this.media=[],this.addMedia(e.data.media),this.media))}addMedia(t){t.forEach(t=>{this.media.some(e=>e.id==t.id)||this.media.push(t)})}hasCache(t){return null!==this.prevOptions&&!this.isCacheInvalid(t)}isWatchingField(t){var e,o,n;let i=null!==(e=this.config.watch.all)&&void 0!==e&&e;return 1===r.a.size(this.config.watch)&&void 0!==this.config.watch.all?i:(l.FILTER_FIELDS.includes(t)&&(i=null!==(o=r.a.get(this.config.watch,"filters"))&&void 0!==o?o:i),null!==(n=r.a.get(this.config.watch,t))&&void 0!==n?n:i)}isCacheInvalid(t){const e=t.options,o=this.prevOptions;if(Object(a.h)(t.media,this.media,(t,e)=>t.id===e.id).length>0)return!0;if(this.isWatchingField("accounts")&&!Object(a.e)(e.accounts,o.accounts))return!0;if(this.isWatchingField("tagged")&&!Object(a.e)(e.tagged,o.tagged))return!0;if(this.isWatchingField("hashtags")&&!Object(a.e)(e.hashtags,o.hashtags,s.c))return!0;if(this.isWatchingField("moderationMode")&&e.moderationMode!==o.moderationMode)return!0;if(this.isWatchingField("moderation")&&!Object(a.e)(e.moderation,o.moderation))return!0;if(this.isWatchingField("filters")){if(this.isWatchingField("captionWhitelistSettings")&&e.captionWhitelistSettings!==o.captionWhitelistSettings)return!0;if(this.isWatchingField("captionBlacklistSettings")&&e.captionBlacklistSettings!==o.captionBlacklistSettings)return!0;if(this.isWatchingField("hashtagWhitelistSettings")&&e.hashtagWhitelistSettings!==o.hashtagWhitelistSettings)return!0;if(this.isWatchingField("hashtagBlacklistSettings")&&e.hashtagBlacklistSettings!==o.hashtagBlacklistSettings)return!0;if(this.isWatchingField("captionWhitelist")&&!Object(a.e)(e.captionWhitelist,o.captionWhitelist))return!0;if(this.isWatchingField("captionBlacklist")&&!Object(a.e)(e.captionBlacklist,o.captionBlacklist))return!0;if(this.isWatchingField("hashtagWhitelist")&&!Object(a.e)(e.hashtagWhitelist,o.hashtagWhitelist))return!0;if(this.isWatchingField("hashtagBlacklist")&&!Object(a.e)(e.hashtagBlacklist,o.hashtagBlacklist))return!0}return!1}}!function(t){t.FILTER_FIELDS=["hashtagBlacklist","hashtagWhitelist","captionBlacklist","captionWhitelist","hashtagBlacklistSettings","hashtagWhitelistSettings","captionBlacklistSettings","captionWhitelistSettings"]}(l||(l={}));const c=new l({watch:{all:!0,filters:!1}}),u=new l({watch:{all:!0,moderation:!1}})},103:function(t,e,o){"use strict";o.d(e,"a",(function(){return S}));var n=o(0),i=o.n(n),a=o(64),s=o(13),r=o.n(s),l=o(7),c=o(3),u=o(592),d=o(412),h=o(80),p=o(133),m=o(127),g=o(47),f=o(9),b=o(35),y=o(19),v=o(73),O=Object(l.b)((function({account:t,onUpdate:e}){const[o,n]=i.a.useState(!1),[a,s]=i.a.useState(""),[l,O]=i.a.useState(!1),S=t.type===c.a.Type.PERSONAL,E=c.b.getBioText(t),w=()=>{t.customBio=a,O(!0),g.a.updateAccount(t).then(()=>{n(!1),O(!1),e&&e()})},_=o=>{t.customProfilePicUrl=o,O(!0),g.a.updateAccount(t).then(()=>{O(!1),e&&e()})};return i.a.createElement("div",{className:r.a.root},i.a.createElement("div",{className:r.a.container},i.a.createElement("div",{className:r.a.infoColumn},i.a.createElement("a",{href:c.b.getProfileUrl(t),target:"_blank",className:r.a.username},"@",t.username),i.a.createElement("div",{className:r.a.row},i.a.createElement("span",{className:r.a.label},"Spotlight ID:"),t.id),i.a.createElement("div",{className:r.a.row},i.a.createElement("span",{className:r.a.label},"User ID:"),t.userId),i.a.createElement("div",{className:r.a.row},i.a.createElement("span",{className:r.a.label},"Type:"),t.type),!o&&i.a.createElement("div",{className:r.a.row},i.a.createElement("div",null,i.a.createElement("span",{className:r.a.label},"Bio:"),i.a.createElement("a",{className:r.a.editBioLink,onClick:()=>{s(c.b.getBioText(t)),n(!0)}},"Edit bio"),i.a.createElement("pre",{className:r.a.bio},E.length>0?E:"(No bio)"))),o&&i.a.createElement("div",{className:r.a.row},i.a.createElement("textarea",{className:r.a.bioEditor,value:a,onChange:t=>{s(t.target.value)},onKeyDown:t=>{"Enter"===t.key&&t.ctrlKey&&(w(),t.preventDefault(),t.stopPropagation())},rows:4}),i.a.createElement("div",{className:r.a.bioFooter},i.a.createElement("div",{className:r.a.bioEditingControls},l&&i.a.createElement("span",null,"Please wait ...")),i.a.createElement("div",{className:r.a.bioEditingControls},i.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.DANGER,disabled:l,onClick:()=>{t.customBio="",O(!0),g.a.updateAccount(t).then(()=>{n(!1),O(!1),e&&e()})}},"Reset"),i.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.SECONDARY,disabled:l,onClick:()=>{n(!1)}},"Cancel"),i.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.PRIMARY,disabled:l,onClick:w},"Save"))))),i.a.createElement("div",{className:r.a.picColumn},i.a.createElement("div",null,i.a.createElement(v.a,{account:t,className:r.a.profilePic})),i.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:t=>{const e=parseInt(t.attributes.id),o=m.a.media.attachment(e).attributes.url;_(o)}},({open:t})=>i.a.createElement(f.a,{type:f.c.SECONDARY,className:r.a.setCustomPic,onClick:t},"Change profile picture")),t.customProfilePicUrl.length>0&&i.a.createElement("a",{className:r.a.resetCustomPic,onClick:()=>{_("")}},"Reset profile picture"))),S&&i.a.createElement("div",{className:r.a.personalInfoMessage},i.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",i.a.createElement("a",{href:y.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),i.a.createElement(h.a,{label:"View access token",stealth:!0},i.a.createElement("div",{className:r.a.row},t.accessToken&&i.a.createElement("div",null,i.a.createElement("p",null,i.a.createElement("span",{className:r.a.label},"Expires on:"),i.a.createElement("span",null,t.accessToken.expiry?Object(u.a)(Object(d.a)(t.accessToken.expiry),"PPPP"):"Unknown")),i.a.createElement("pre",{className:r.a.accessToken},t.accessToken.code)))))}));function S({isOpen:t,onClose:e,onUpdate:o,account:n}){return i.a.createElement(a.a,{isOpen:t&&!!n,title:"Account details",icon:"admin-users",onClose:e},i.a.createElement(a.a.Content,null,n&&i.a.createElement(O,{account:n,onUpdate:o})))}},11:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(15),a=o(12),s=o(4);!function(t){function e(t){return t?c(t.type):void 0}function o(t){var o;if("object"!=typeof t)return!1;const n=e(t);return void 0!==n&&n.isValid(null!==(o=t.config)&&void 0!==o?o:{})}function n(e){return e?t.getPromoFromDictionary(e,i.a.config.globalPromotions):void 0}function r(t){const e=l(t);return void 0===e?void 0:e.promotion}function l(e){if(e)for(const o of i.a.config.autoPromotions){const n=t.Automation.getType(o),i=t.Automation.getConfig(o);if(n&&n.matches(e,i))return o}}function c(e){return t.types.find(t=>t.id===e)}let u;t.getConfig=function(t){var e,o;return t&&null!==(o=null!==(e=t.config)&&void 0!==e?e:t.data)&&void 0!==o?o:{}},t.getType=e,t.isValid=o,t.getPromoFromDictionary=function(e,o){const n=a.a.get(o,e.id);if(n)return t.getType(n)?n:void 0},t.getPromo=function(t){return Object(s.j)(o,[()=>n(t),()=>r(t)])},t.getGlobalPromo=n,t.getAutoPromo=r,t.getAutomation=l,t.types=[],t.getTypes=function(){return t.types},t.registerType=function(e){t.types.push(e)},t.getTypeById=c,t.clearTypes=function(){t.types.splice(0,t.types.length)},function(t){t.getType=function(t){return t?o(t.type):void 0},t.getConfig=function(t){var e,o;return t&&null!==(o=null!==(e=t.config)&&void 0!==e?e:t.data)&&void 0!==o?o:{}},t.getPromotion=function(t){return t?t.promotion:void 0};const e=[];function o(t){return e.find(e=>e.id===t)}t.getTypes=function(){return e},t.registerType=function(t){e.push(t)},t.getTypeById=o,t.clearTypes=function(){e.splice(0,e.length)}}(u=t.Automation||(t.Automation={}))}(n||(n={}))},12:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(4);!function(t){function e(t,e){return(null!=t?t:{}).hasOwnProperty(e.toString())}function o(t,e){return(null!=t?t:{})[e.toString()]}function n(t,e,o){return(t=null!=t?t:{})[e.toString()]=o,t}t.has=e,t.get=o,t.set=n,t.ensure=function(o,i,a){return e(o,i)||n(o,i,a),t.get(o,i)},t.withEntry=function(e,o,n){return t.set(Object(i.g)(null!=e?e:{}),o,n)},t.remove=function(t,e){return delete(t=null!=t?t:{})[e.toString()],t},t.without=function(e,o){return t.remove(Object(i.g)(null!=e?e:{}),o)},t.at=function(e,n){return o(e,t.keys(e)[n])},t.keys=function(t){return Object.keys(null!=t?t:{})},t.values=function(t){return Object.values(null!=t?t:{})},t.entries=function(e){return t.keys(e).map(t=>[t,e[t]])},t.map=function(e,o){const n={};return t.forEach(e,(t,e)=>n[t]=o(e,t)),n},t.size=function(e){return t.keys(null!=e?e:{}).length},t.isEmpty=function(e){return 0===t.size(null!=e?e:{})},t.equals=function(t,e){return Object(i.l)(t,e)},t.forEach=function(e,o){t.keys(e).forEach(t=>o(t,e[t]))},t.fromArray=function(e){const o={};return e.forEach(([e,n])=>t.set(o,e,n)),o},t.fromMap=function(e){const o={};return e.forEach((e,n)=>t.set(o,n,e)),o}}(n||(n={}))},122:function(t,e,o){t.exports={root:"ProUpgradeBtn__root"}},124:function(t,e,o){"use strict";var n=o(102);e.a=new class{constructor(){this.mediaStore=n.a}}},13:function(t,e,o){t.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},131:function(t,e,o){"use strict";o.d(e,"a",(function(){return y}));var n=o(0),i=o.n(n),a=o(81),s=o.n(a),r=o(25),l=o(69),c=o.n(l),u=o(58),d=o.n(u),h=o(7),p=o(4),m=o(123),g=Object(h.b)((function({field:t}){const e="settings-field-"+Object(p.p)(),o=!t.label||t.fullWidth;return i.a.createElement("div",{className:d.a.root},t.label&&i.a.createElement("div",{className:d.a.label},i.a.createElement("label",{htmlFor:e},t.label)),i.a.createElement("div",{className:d.a.container},i.a.createElement("div",{className:o?d.a.controlFullWidth:d.a.controlPartialWidth},i.a.createElement(t.component,{id:e})),t.tooltip&&i.a.createElement("div",{className:d.a.tooltip},i.a.createElement(m.a,null,t.tooltip))))}));function f({group:t}){return i.a.createElement("div",{className:c.a.root},t.title&&t.title.length>0&&i.a.createElement("h1",{className:c.a.title},t.title),t.component&&i.a.createElement("div",{className:c.a.content},i.a.createElement(t.component)),t.fields&&i.a.createElement("div",{className:c.a.fieldList},t.fields.map(t=>i.a.createElement(g,{field:t,key:t.id}))))}var b=o(18);function y({page:t}){return Object(b.d)("keydown",t=>{t.key&&"s"===t.key.toLowerCase()&&t.ctrlKey&&(r.c.save(),t.preventDefault(),t.stopPropagation())}),i.a.createElement("article",{className:s.a.root},t.component&&i.a.createElement("div",{className:s.a.content},i.a.createElement(t.component)),t.groups&&i.a.createElement("div",{className:s.a.groupList},t.groups.map(t=>i.a.createElement(f,{key:t.id,group:t}))))}},15:function(t,e,o){"use strict";var n,i=o(11);let a;e.a=a={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(n=SliCommonL10n.globalPromotions)&&void 0!==n?n:{}},image:t=>`${a.config.imagesUrl}/${t}`},i.a.registerType({id:"link",label:"Link",isValid:()=>!1}),i.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),i.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},150:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(0),i=o.n(n),a=o(122),s=o.n(a),r=o(19);function l({url:t,children:e}){return i.a.createElement("a",{className:s.a.root,href:null!=t?t:r.a.resources.pricingUrl,target:"_blank"},null!=e?e:"Free 14-day PRO trial")}},16:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));const n=t=>"string"==typeof t?t:"r"in t?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":"h"in t?"hsla("+t.h+","+t.s+","+t.l+","+t.a+")":"#fff"},160:function(t,e,o){"use strict";function n(t,e){return"url"===e.linkType?e.url:e.postUrl}var i;o.d(e,"a",(function(){return i})),e.b={id:"link",label:"Link",getIcon:()=>"admin-links",getPopupLink:function(t,e){return"string"==typeof e.linkText&&e.linkText.length>0?[e.linkText,e.newTab]:[i.getDefaultLinkText(e),e.newTab]},isValid:function(t){return"string"==typeof t.linkType&&t.linkType.length>0&&("url"===t.linkType&&"string"==typeof t.url&&t.url.length>0||!!t.postId&&"string"==typeof t.postUrl&&t.postUrl.length>0)},getMediaUrl:n,onMediaClick:function(t,e){var o;const i=n(0,e),a=null===(o=e.linkDirectly)||void 0===o||o;return!(!i||!a)&&(window.open(i,e.newTab?"_blank":"_self"),!0)}},function(t){t.getDefaultLinkText=function(t){switch(t.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(i||(i={}))},171:function(t,e,o){"use strict";o.d(e,"a",(function(){return s}));var n=o(0),i=o.n(n),a=o(46);function s({breakpoints:t,render:e,children:o}){const[s,r]=i.a.useState(null),l=i.a.useCallback(()=>{const e=Object(a.b)();r(()=>t.reduce((t,o)=>e.width<=o&&o<t?o:t,1/0))},[t]);Object(n.useEffect)(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)),[]);const c=e?e(s):i.a.createElement(o,{breakpoint:s});return null!==s?c:null}},172:function(t,e,o){"use strict";var n=o(0),i=o.n(n),a=o(125),s=o(30),r=o.n(s),l=o(59),c=o(3),u=o(9),d=o(132),h=o(41),p=o(31),m=o(47),g=o(103),f=o(73),b=o(19),y=o(89),v=o(37),O=o(134);function S({accounts:t,showDelete:e,onDeleteError:o}){const n=(t=null!=t?t:[]).filter(t=>t.type===c.a.Type.BUSINESS).length,[a,s]=i.a.useState(!1),[S,E]=i.a.useState(null),[w,_]=i.a.useState(!1),[C,P]=i.a.useState(),[T,A]=i.a.useState(!1),k=t=>()=>{E(t),s(!0)},B=t=>()=>{m.a.openAuthWindow(t.type,0,()=>{b.a.restApi.deleteAccountMedia(t.id)})},M=t=>()=>{P(t),_(!0)},L=()=>{A(!1),P(null),_(!1)},I={cols:{username:r.a.usernameCol,type:r.a.typeCol,usages:r.a.usagesCol,actions:r.a.actionsCol},cells:{username:r.a.usernameCell,type:r.a.typeCell,usages:r.a.usagesCell,actions:r.a.actionsCell}};return i.a.createElement("div",{className:"accounts-list"},i.a.createElement(d.a,{styleMap:I,rows:t,cols:[{id:"username",label:"Username",render:t=>i.a.createElement("div",null,i.a.createElement(f.a,{account:t,className:r.a.profilePic}),i.a.createElement("a",{className:r.a.username,onClick:k(t)},t.username))},{id:"type",label:"Type",render:t=>i.a.createElement("span",{className:r.a.accountType},t.type)},{id:"usages",label:"Feeds",render:t=>i.a.createElement("span",{className:r.a.usages},t.usages.map((t,e)=>!!h.a.getById(t)&&i.a.createElement(l.a,{key:e,to:p.a.at({screen:"edit",id:t.toString()})},h.a.getById(t).name)))},{id:"actions",label:"Actions",render:t=>e&&i.a.createElement(v.f,null,({ref:t,openMenu:e})=>i.a.createElement(u.a,{ref:t,className:r.a.actionsBtn,type:u.c.PILL,size:u.b.NORMAL,onClick:e},i.a.createElement(O.a,null)),i.a.createElement(v.b,null,i.a.createElement(v.c,{onClick:k(t)},"Info"),i.a.createElement(v.c,{onClick:B(t)},"Reconnect"),i.a.createElement(v.d,null),i.a.createElement(v.c,{onClick:M(t)},"Delete")))}]}),i.a.createElement(g.a,{isOpen:a,onClose:()=>s(!1),account:S}),i.a.createElement(y.a,{isOpen:w,title:"Are you sure?",buttons:[T?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:T,cancelDisabled:T,onAccept:()=>{A(!0),m.a.deleteAccount(C.id).then(()=>L()).catch(()=>{o&&o("An error occurred while trying to remove the account."),L()})},onCancel:L},i.a.createElement("p",null,"Are you sure you want to delete"," ",i.a.createElement("span",{style:{fontWeight:"bold"}},C?C.username:""),"?"," ","This will also delete all saved media associated with this account."),C&&C.type===c.a.Type.BUSINESS&&1===n&&i.a.createElement("p",null,i.a.createElement("b",null,"Note:")," ",i.a.createElement("span",null,"Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work."))))}var E=o(35),w=o(7),_=o(135),C=o(99),P=o.n(C);e.a=Object(w.b)((function(){const[,t]=i.a.useState(0),[e,o]=i.a.useState(""),n=i.a.useCallback(()=>t(t=>t++),[]);return c.b.hasAccounts()?i.a.createElement("div",{className:P.a.root},e.length>0&&i.a.createElement(E.a,{type:E.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>o("")},e),i.a.createElement("div",{className:P.a.connectBtn},i.a.createElement(a.a,{onConnect:n})),i.a.createElement(S,{accounts:c.b.list,showDelete:!0,onDeleteError:o})):i.a.createElement(_.a,null)}))},18:function(t,e,o){"use strict";o.d(e,"j",(function(){return r})),o.d(e,"f",(function(){return l})),o.d(e,"b",(function(){return c})),o.d(e,"c",(function(){return u})),o.d(e,"a",(function(){return d})),o.d(e,"n",(function(){return h})),o.d(e,"h",(function(){return p})),o.d(e,"l",(function(){return m})),o.d(e,"k",(function(){return g})),o.d(e,"e",(function(){return f})),o.d(e,"d",(function(){return b})),o.d(e,"m",(function(){return y})),o.d(e,"g",(function(){return v})),o.d(e,"i",(function(){return O}));var n=o(0),i=o.n(n),a=o(60),s=o(46);function r(t,e){!function(t,e,o){const n=i.a.useRef(!0);t(()=>{n.current=!0;const t=e(()=>new Promise(t=>{n.current&&t()}));return()=>{n.current=!1,t&&t()}},o)}(n.useEffect,t,e)}function l(t){const[e,o]=i.a.useState(t),n=i.a.useRef(e);return[e,()=>n.current,t=>o(n.current=t)]}function c(t,e,o=[]){function i(n){!t.current||t.current.contains(n.target)||o.some(t=>t&&t.current&&t.current.contains(n.target))||e(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",i),document.addEventListener("touchend",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchend",i)}))}function u(t,e){Object(n.useEffect)(()=>{const o=()=>{0===t.filter(t=>!t.current||document.activeElement===t.current||t.current.contains(document.activeElement)).length&&e()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},t)}function d(t,e,o=100){const[a,s]=i.a.useState(t);return Object(n.useEffect)(()=>{let n=null;return t===e?n=setTimeout(()=>s(e),o):s(!e),()=>{null!==n&&clearTimeout(n)}},[t]),[a,s]}function h(t){const[e,o]=i.a.useState(Object(s.b)()),a=()=>{const e=Object(s.b)();o(e),t&&t(e)};return Object(n.useEffect)(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[]),e}function p(){return new URLSearchParams(Object(a.e)().search)}function m(t,e){Object(n.useEffect)(()=>{const o=o=>{if(e)return(o||window.event).returnValue=t,t};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[e])}function g(t,e){const o=i.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==t.current&&(t.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=e?e:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(t,e,o,i=[],a=[]){Object(n.useEffect)(()=>(i.reduce((t,e)=>t&&e,!0)&&t.addEventListener(e,o),()=>t.removeEventListener(e,o)),a)}function b(t,e,o=[],n=[]){f(document,t,e,o,n)}function y(t,e,o=[],n=[]){f(window,t,e,o,n)}function v(t){return e=>{" "!==e.key&&"Enter"!==e.key||(t(),e.preventDefault(),e.stopPropagation())}}function O(t){const[e,o]=i.a.useState(t);return[function(t){const e=i.a.useRef(t);return e.current=t,e}(e),o]}o(53)},2:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(1),a=function(t,e,o,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(i=t[r])&&(s=(a<3?i(s):a>3?i(e,o,s):i(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};!function(t){class e{constructor(t,e,o){this.prop=t,this.name=e,this.icon=o}}e.DESKTOP=new e("desktop","Desktop","desktop"),e.TABLET=new e("tablet","Tablet","tablet"),e.PHONE=new e("phone","Phone","smartphone"),t.Mode=e,t.MODES=[e.DESKTOP,e.TABLET,e.PHONE];class o{constructor(t,e,o){this.desktop=t,this.tablet=e,this.phone=o}get(t,e){return n(this,t,e)}set(t,e){s(this,e,t)}with(t,e){const n=r(this,e,t);return new o(n.desktop,n.tablet,n.phone)}}function n(t,e,o=!1){if(!t)return;const n=t[e.prop];return o&&null==n?t.desktop:n}function s(t,e,o){return t[o.prop]=e,t}function r(t,e,n){return s(new o(t.desktop,t.tablet,t.phone),e,n)}a([i.o],o.prototype,"desktop",void 0),a([i.o],o.prototype,"tablet",void 0),a([i.o],o.prototype,"phone",void 0),t.Value=o,t.getName=function(t){return t.name},t.getIcon=function(t){return t.icon},t.cycle=function(o){const n=t.MODES.findIndex(t=>t===o);return void 0===n?e.DESKTOP:t.MODES[(n+1)%t.MODES.length]},t.get=n,t.set=s,t.withValue=r,t.normalize=function(t,e){return null==t?e.hasOwnProperty("all")?new o(e.all,e.all,e.all):new o(e.desktop,e.tablet,e.phone):"object"==typeof t&&t.hasOwnProperty("desktop")?new o(t.desktop,t.tablet,t.phone):new o(t,t,t)},t.getModeForWindowSize=function(t){return t.width<=768?e.PHONE:t.width<=935?e.TABLET:e.DESKTOP},t.isValid=function(t){return"object"==typeof t&&t.hasOwnProperty("desktop")}}(n||(n={}))},22:function(t,e,o){"use strict";var n=o(51),i=o.n(n),a=o(15),s=o(53);const r=a.a.config.restApi.baseUrl,l={};a.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=a.a.config.restApi.authToken);const c=i.a.create({baseURL:r,headers:l});c.interceptors.response.use(t=>t,t=>{if(void 0!==t.response){if(403===t.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw t}});const u={config:Object.assign(Object.assign({},a.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(t,e=0,o=0,n)=>{const a=n?new i.a.CancelToken(n):void 0;return new Promise((n,i)=>{const s=t=>{n(t),document.dispatchEvent(new Event(u.events.onGetFeedMedia))};c.post("/media/feed",{options:t,num:o,from:e},{cancelToken:a}).then(n=>{n&&n.data.needImport?u.importMedia(t).then(()=>{c.post("/media/feed",{options:t,num:o,from:e},{cancelToken:a}).then(s).catch(i)}).catch(i):s(n)}).catch(i)})},getMedia:(t=0,e=0)=>c.get(`/media?num=${t}&offset=${e}`),importMedia:t=>new Promise((e,o)=>{document.dispatchEvent(new Event(u.events.onImportStart));const n=t=>{document.dispatchEvent(new Event(u.events.onImportFail)),o(t)};c.post("/media/import",{options:t}).then(t=>{t.data.success?(document.dispatchEvent(new Event(u.events.onImportEnd)),e(t)):n(t)}).catch(n)}),getErrorReason:t=>{let e;return"object"==typeof t.response&&(t=t.response.data),e="string"==typeof t.message?t.message:"string"==typeof t.error?t.error:t.toString(),Object(s.b)(e)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};e.a=u},29:function(t,e,o){"use strict";o.d(e,"a",(function(){return r})),o.d(e,"d",(function(){return l})),o.d(e,"c",(function(){return c})),o.d(e,"b",(function(){return u})),o(5);var n=o(65),i=o(0),a=o.n(i),s=o(4);function r(t,e){const o=e.map(n.b).join("|");return new RegExp(`#(${o})(?:\\b|\\r|#|$)`,"imu").test(t)}function l(t,e,o=0,n=!1){let r=t.trim();n&&(r=r.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=r.split("\n"),c=l.map((t,o)=>{if(t=t.trim(),n&&/^[.*•]$/.test(t))return null;let r,c=[];for(;null!==(r=/#([^\s]+)/g.exec(t));){const e="https://instagram.com/explore/tags/"+r[1],o=a.a.createElement("a",{href:e,target:"_blank",key:Object(s.p)()},r[0]),n=t.substr(0,r.index),i=t.substr(r.index+r[0].length);c.push(n),c.push(o),t=i}return t.length&&c.push(t),e&&(c=e(c,o)),l.length>1&&c.push(a.a.createElement("br",{key:Object(s.p)()})),a.a.createElement(i.Fragment,{key:Object(s.p)()},c)});return o>0?c.slice(0,o):c}function c(t,e){return 0===t.tag.localeCompare(e.tag)&&t.sort===e.sort}function u(t){return"https://instagram.com/explore/tags/"+t}},3:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(22),a=o(1);!function(t){let e;!function(t){t.PERSONAL="PERSONAL",t.BUSINESS="BUSINESS"}(e=t.Type||(t.Type={}))}(n||(n={}));const s=Object(a.o)([]),r="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=t=>s.find(e=>e.id===t),c=t=>"https://instagram.com/"+t;function u(t){return t.slice().sort((t,e)=>t.type===e.type?0:t.type===n.Type.PERSONAL?-1:1),s.splice(0,s.length),t.forEach(t=>s.push(Object(a.o)(t))),s}function d(t){if("object"==typeof t&&Array.isArray(t.data))return u(t.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}e.b={list:s,DEFAULT_PROFILE_PIC:r,getById:l,getByUsername:t=>s.find(e=>e.username===t),hasAccounts:()=>s.length>0,filterExisting:t=>t.filter(t=>void 0!==l(t)),idsToAccounts:t=>t.map(t=>l(t)).filter(t=>void 0!==t),getPersonalAccounts:()=>s.filter(t=>t.type===n.Type.PERSONAL),getBusinessAccounts:()=>s.filter(t=>t.type===n.Type.BUSINESS),getProfilePicUrl:t=>t.customProfilePicUrl?t.customProfilePicUrl:t.profilePicUrl?t.profilePicUrl:r,getBioText:t=>t.customBio.length?t.customBio:t.bio,getProfileUrl:t=>c(t.username),getUsernameUrl:c,loadAccounts:function(){return i.a.getAccounts().then(d).catch(t=>{throw i.a.getErrorReason(t)})},loadFromResponse:d,addAccounts:u}},30:function(t,e,o){t.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-btn":"AccountsList__actions-btn",actionsBtn:"AccountsList__actions-btn","usages-cell":"AccountsList__usages-cell",usagesCell:"AccountsList__usages-cell","usages-col":"AccountsList__usages-col",usagesCol:"AccountsList__usages-col","type-cell":"AccountsList__type-cell",typeCell:"AccountsList__type-cell","type-col":"AccountsList__type-col",typeCol:"AccountsList__type-col"}},31:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(1),i=o(66),a=o(4),s=function(t,e,o,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(i=t[r])&&(s=(a<3?i(s):a>3?i(e,o,s):i(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class r{constructor(){const t=window.location;this._pathName=t.pathname,this._baseUrl=t.protocol+"//"+t.host,this.parsed=Object(i.parse)(t.search),this.unListen=null,this.listeners=[],Object(n.p)(()=>this._path,t=>this.path=t)}createPath(t){return this._pathName+"?"+Object(i.stringify)(t)}get _path(){return this.createPath(this.parsed)}get(t,e=!0){return Object(a.i)(this.parsed[t])}at(t){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(t)))}fullUrl(t){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(t)))}with(t){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(t)))}without(t){const e=Object.assign({},this.parsed);return delete e[t],this.createPath(e)}goto(t,e=!1){this.history.push(e?this.with(t):this.at(t),{})}useHistory(t){return this.unListen&&this.unListen(),this.history=t,this.unListen=this.history.listen(t=>{this.parsed=Object(i.parse)(t.search),this.listeners.forEach(t=>t())}),this}listen(t){this.listeners.push(t)}unlisten(t){this.listeners=this.listeners.filter(e=>e===t)}processQuery(t){const e=Object.assign({},t);return Object.getOwnPropertyNames(t).forEach(o=>{t[o]&&0===t[o].length?delete e[o]:e[o]=t[o]}),e}}s([n.o],r.prototype,"path",void 0),s([n.o],r.prototype,"parsed",void 0),s([n.h],r.prototype,"_path",null);const l=new r},4:function(t,e,o){"use strict";o.d(e,"p",(function(){return s})),o.d(e,"g",(function(){return r})),o.d(e,"a",(function(){return l})),o.d(e,"q",(function(){return c})),o.d(e,"b",(function(){return u})),o.d(e,"d",(function(){return d})),o.d(e,"l",(function(){return h})),o.d(e,"k",(function(){return p})),o.d(e,"h",(function(){return m})),o.d(e,"e",(function(){return g})),o.d(e,"o",(function(){return f})),o.d(e,"n",(function(){return b})),o.d(e,"m",(function(){return y})),o.d(e,"j",(function(){return v})),o.d(e,"f",(function(){return O})),o.d(e,"c",(function(){return S})),o.d(e,"i",(function(){return E}));var n=o(169),i=o(170);let a=0;function s(){return a++}function r(t){const e={};return Object.keys(t).forEach(o=>{const n=t[o];Array.isArray(n)?e[o]=n.slice():n instanceof Map?e[o]=new Map(n.entries()):e[o]="object"==typeof n?r(n):n}),e}function l(t,e){return Object.keys(e).forEach(o=>{t[o]=e[o]}),t}function c(t,e){return l(r(t),e)}function u(t,e){return Array.isArray(t)&&Array.isArray(e)?d(t,e):t instanceof Map&&e instanceof Map?d(Array.from(t.entries()),Array.from(e.entries())):"object"==typeof t&&"object"==typeof e?h(t,e):t===e}function d(t,e,o){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(o){if(!o(t[n],e[n]))return!1}else if(!u(t[n],e[n]))return!1;return!0}function h(t,e){if(!t||!e||"object"!=typeof t||"object"!=typeof e)return u(t,e);const o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;const i=new Set(o.concat(n));for(const o of i)if(!u(t[o],e[o]))return!1;return!0}function p(t){return 0===Object.keys(null!=t?t:{}).length}function m(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.filter(t=>!e.some(e=>o(t,e)))}function g(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.every(t=>e.some(e=>o(t,e)))&&e.every(e=>t.some(t=>o(e,t)))}function f(t,e){const o=/(\s+)/g;let n,i=0,a=0,s="";for(;null!==(n=o.exec(t))&&i<e;){const e=n.index+n[1].length;s+=t.substr(a,e-a),a=e,i++}return a<t.length&&(s+=" ..."),s}function b(t){return Object(n.a)(Object(i.a)(t),{addSuffix:!0})}function y(t,e){const o=[];return t.forEach((t,n)=>{const i=n%e;Array.isArray(o[i])?o[i].push(t):o[i]=[t]}),o}function v(t,e){for(const o of e){const e=o();if(t(e))return e}}function O(t,e){return Math.max(0,Math.min(e.length-1,t))}function S(t,e,o){const n=t.slice();return n[e]=o,n}function E(t){return Array.isArray(t)?t[0]:t}},40:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));class n{static getById(t){const e=n.list.find(e=>e.id===t);return!e&&n.list.length>0?n.list[0]:e}static getName(t){const e=n.getById(t);return e?e.name:"(Missing layout)"}static addLayout(t){n.list.push(t)}}n.list=[]},42:function(t,o){t.exports=e},45:function(t,e,o){t.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(t,e,o){"use strict";function n(t,e,o={}){return window.open(t,e,function(t={}){return Object.getOwnPropertyNames(t).map(e=>`${e}=${t[e]}`).join(",")}(o))}function i(t,e){return{top:window.top.outerHeight/2+window.top.screenY-e/2,left:window.top.outerWidth/2+window.top.screenX-t/2,width:t,height:e}}function a(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return i})),o.d(e,"b",(function(){return a}))},5:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(12),a=o(3);!function(t){let e,o,n;function s(t){return t.hasOwnProperty("children")}!function(t){t.IMAGE="IMAGE",t.VIDEO="VIDEO",t.ALBUM="CAROUSEL_ALBUM"}(e=t.Type||(t.Type={})),function(e){let o;function n(e){if(s(e)&&t.Source.isOwnMedia(e.source)){if("object"==typeof e.thumbnails&&!i.a.isEmpty(e.thumbnails))return e.thumbnails;if("string"==typeof e.thumbnail&&e.thumbnail.length>0)return{[o.SMALL]:e.thumbnail,[o.MEDIUM]:e.thumbnail,[o.LARGE]:e.thumbnail}}return{[o.SMALL]:e.url,[o.MEDIUM]:e.url,[o.LARGE]:e.url}}!function(t){t.SMALL="s",t.MEDIUM="m",t.LARGE="l"}(o=e.Size||(e.Size={})),e.get=function(t,e){const o=n(t);return i.a.get(o,e)||(s(t)?t.thumbnail:t.url)},e.getMap=n,e.has=function(e){return!!s(e)&&!!t.Source.isOwnMedia(e.source)&&("string"==typeof e.thumbnail&&e.thumbnail.length>0||!i.a.isEmpty(e.thumbnails))},e.getSrcSet=function(t,e){var n;let a=[];i.a.has(t.thumbnails,o.SMALL)&&a.push(i.a.get(t.thumbnails,o.SMALL)+` ${e.s}w`),i.a.has(t.thumbnails,o.MEDIUM)&&a.push(i.a.get(t.thumbnails,o.MEDIUM)+` ${e.m}w`);const s=null!==(n=i.a.get(t.thumbnails,o.LARGE))&&void 0!==n?n:t.url;return a.push(s+` ${e.l}w`),a}}(o=t.Thumbnails||(t.Thumbnails={})),function(t){let e;function o(t){switch(t){case e.PERSONAL_ACCOUNT:return a.a.Type.PERSONAL;case e.BUSINESS_ACCOUNT:case e.TAGGED_ACCOUNT:case e.USER_STORY:return a.a.Type.BUSINESS;default:return}}function n(t){switch(t){case e.RECENT_HASHTAG:return"recent";case e.POPULAR_HASHTAG:return"popular";default:return}}!function(t){t.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",t.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",t.TAGGED_ACCOUNT="TAGGED_ACCOUNT",t.RECENT_HASHTAG="RECENT_HASHTAG",t.POPULAR_HASHTAG="POPULAR_HASHTAG",t.USER_STORY="USER_STORY"}(e=t.Type||(t.Type={})),t.createForAccount=function(t){return{name:t.username,type:t.type===a.a.Type.PERSONAL?e.PERSONAL_ACCOUNT:e.BUSINESS_ACCOUNT}},t.createForTaggedAccount=function(t){return{name:t.username,type:e.TAGGED_ACCOUNT}},t.createForHashtag=function(t){return{name:t.tag,type:"popular"===t.sort?e.POPULAR_HASHTAG:e.RECENT_HASHTAG}},t.getAccountType=o,t.getHashtagSort=n,t.getTypeLabel=function(t){switch(t){case e.PERSONAL_ACCOUNT:return"PERSONAL";case e.BUSINESS_ACCOUNT:return"BUSINESS";case e.TAGGED_ACCOUNT:return"TAGGED";case e.RECENT_HASHTAG:return"RECENT";case e.POPULAR_HASHTAG:return"POPULAR";case e.USER_STORY:return"STORY";default:return"UNKNOWN"}},t.processSources=function(t){const i=[],s=[],r=[],l=[],c=[];return t.forEach(t=>{switch(t.type){case e.RECENT_HASHTAG:case e.POPULAR_HASHTAG:c.push({tag:t.name,sort:n(t.type)});break;case e.PERSONAL_ACCOUNT:case e.BUSINESS_ACCOUNT:case e.TAGGED_ACCOUNT:case e.USER_STORY:const u=a.b.getByUsername(t.name),d=u?o(t.type):null;u&&u.type===d?t.type===e.TAGGED_ACCOUNT?s.push(u):t.type===e.USER_STORY?r.push(u):i.push(u):l.push(t)}}),{accounts:i,tagged:s,stories:r,hashtags:c,misc:l}},t.isOwnMedia=function(t){return t.type===e.PERSONAL_ACCOUNT||t.type===e.BUSINESS_ACCOUNT||t.type===e.USER_STORY}}(n=t.Source||(t.Source={})),t.getAsRows=(t,e)=>{t=t.slice(),e=e>0?e:1;let o=[];for(;t.length;)o.push(t.splice(0,e));if(o.length>0){const t=o.length-1;for(;o[t].length<e;)o[t].push({})}return o},t.isFromHashtag=t=>t.source.type===n.Type.POPULAR_HASHTAG||t.source.type===n.Type.RECENT_HASHTAG,t.isNotAChild=s}(n||(n={}))},53:function(t,e,o){"use strict";function n(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function i(t){const e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""}o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return i}))},54:function(t,e,o){"use strict";o.d(e,"a",(function(){return p}));var n=o(0),i=o.n(n),a=o(45),s=o.n(a),r=o(104),l=o(5),c=o(72),u=o.n(c);function d(){return i.a.createElement("div",{className:u.a.root})}var h=o(10);function p(t){var{media:e,className:o,size:a,onLoadImage:c,width:u,height:p}=t,m=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]])}return o}(t,["media","className","size","onLoadImage","width","height"]);const g=i.a.useRef(),f=i.a.useRef(),[b,y]=i.a.useState(!l.a.Thumbnails.has(e)),[v,O]=i.a.useState(!0),[S,E]=i.a.useState(!1);function w(){if(g.current){const t=null!=a?a:function(){const t=g.current.getBoundingClientRect();return t.width<=320?l.a.Thumbnails.Size.SMALL:t.width<=600?l.a.Thumbnails.Size.MEDIUM:l.a.Thumbnails.Size.LARGE}(),o=l.a.Thumbnails.get(e,t);g.current.src!==o&&(g.current.src=o)}}function _(){T()}function C(){e.type===l.a.Type.VIDEO?y(!0):g.current.src===e.url?E(!0):g.current.src=e.url,T()}function P(){isNaN(f.current.duration)||f.current.duration===1/0?f.current.currentTime=1:f.current.currentTime=f.current.duration/2,T()}function T(){O(!1),c&&c()}return Object(n.useLayoutEffect)(()=>{let t=new r.a(w);return g.current&&(g.current.onload=_,g.current.onerror=C,w(),t.observe(g.current)),f.current&&(f.current.onloadeddata=P),()=>{g.current&&(g.current.onload=()=>null,g.current.onerror=()=>null),f.current&&(f.current.onloadeddata=()=>null),t.disconnect()}},[e,a]),e.url&&e.url.length>0&&!S?i.a.createElement("div",Object.assign({className:Object(h.b)(s.a.root,o)},m),"VIDEO"===e.type&&b?i.a.createElement("video",{ref:f,className:s.a.video,src:e.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},i.a.createElement("source",{src:e.url}),"Your browser does not support videos"):i.a.createElement("img",Object.assign({ref:g,className:s.a.image,loading:"lazy",width:u,height:p,alt:""},h.e)),v&&i.a.createElement(d,null)):i.a.createElement("div",{className:s.a.notAvailable},i.a.createElement("span",null,"Thumbnail not available"))}},56:function(t,e,o){"use strict";function n(t){return e=>(e.stopPropagation(),t(e))}function i(t,e){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{o=null,t(...n)},e)}}function a(){}o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return i})),o.d(e,"b",(function(){return a}))},58:function(t,e,o){t.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},580:function(t,e,o){"use strict";o.r(e);var n=o(0),i=o.n(n),a=o(120),s=o(6),r=o(67),l=o(202),c=o(248),u=o(249),d=o(34),h=o(84),p=o(74),m=o(101),g=o(83),f=o(251),b=o(152),y=o(146),v=o(25),O=o(153),S=o(145),E=o(257),w=o(258),_=s.a.LinkBehavior;a.a.tabs=a.a.tabs.filter(t=>!t.isFakePro),a.a.openGroups.push("caption-filters","hashtag-filters");const C=a.a.tabs.find(t=>"connect"===t.id);C.groups=C.groups.filter(t=>!t.isFakePro),C.groups.push({id:"tagged",label:"Show posts where these accounts are tagged",fields:[{id:"tagged",component:Object(r.a)(({value:t,onChange:e})=>i.a.createElement(c.a,{value:t.tagged,onChange:t=>e({tagged:t})}),["accounts","tagged"])}]},{id:"hashtags",label:"Show posts with these hashtags",fields:[{id:"hashtags",component:Object(r.a)(({value:t,onChange:e})=>i.a.createElement(u.a,{value:t.hashtags,onChange:t=>e({hashtags:t})}),["accounts","hashtags"])}]});const P=a.a.tabs.find(t=>"design"===t.id);{P.groups=P.groups.filter(t=>!t.isFakePro),P.groups.find(t=>"layouts"===t.id).fields.push({id:"highlight-freq",component:Object(d.a)({label:"Highlight every",option:"highlightFreq",deps:["layout"],when:t=>"highlight"===t.value.layout,render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:1,unit:"posts",placeholder:"1"})})});const t=P.groups.find(t=>"feed"===t.id);t.fields=t.fields.filter(t=>!t.isFakePro),t.fields.splice(3,0,{id:"media-type",component:Object(d.a)({label:"Types of posts",option:"mediaType",render:(t,e,o)=>i.a.createElement(p.a,{id:t.field.id,value:e,onChange:t=>o(t.value),options:[{value:s.a.MediaType.ALL,label:"All posts"},{value:s.a.MediaType.PHOTOS,label:"Photos Only"},{value:s.a.MediaType.VIDEOS,label:"Videos Only"}]})})});const e=P.groups.find(t=>"appearance"===t.id);{e.fields=e.fields.filter(t=>!t.isFakePro),e.fields.push({id:"hover-text-color",component:Object(d.a)({label:"Hover text color",option:"textColorHover",render:(t,e,o)=>i.a.createElement(m.a,{id:t.field.id,value:e,onChange:t=>o(t.rgb)})})},{id:"hover-bg-color",component:Object(d.a)({label:"Hover background color",option:"bgColorHover",render:(t,e,o)=>i.a.createElement(m.a,{id:t.field.id,value:e,onChange:t=>o(t.rgb)})})});const t=e.fields.find(t=>"hover-info"===t.id);t&&(t.data.options=t.data.options.map(t=>Object.assign(Object.assign({},t),{isFakePro:!1})))}const o=P.groups.find(t=>"header"===t.id);{o.fields=o.fields.filter(t=>!t.isFakePro),o.fields.splice(2,0,{id:"header-style",component:Object(d.a)({label:"Header style",option:"headerStyle",deps:["showHeader"],disabled:t=>Object(l.b)(t),render:(t,e,o)=>i.a.createElement(p.a,{id:t.field.id,value:e,onChange:t=>o(t.value),options:[{value:s.a.HeaderStyle.NORMAL,label:"Normal"},{value:s.a.HeaderStyle.CENTERED,label:"Centered"}]})})}),o.fields.push({id:"include-stories",component:Object(d.a)({label:"Include stories",option:"includeStories",deps:["showHeader"],disabled:t=>Object(l.b)(t),render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o}),tooltip:()=>i.a.createElement("span",null,"Re-shared stories are not available due to a restriction by Instagram.")})},{id:"stories-interval",component:Object(d.a)({label:"Stories interval time",option:"storiesInterval",deps:["includeStories","showHeader"],disabled:t=>function(t){return Object(l.b)(t)||!t.value.includeStories}(t),render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:1,unit:"sec"})})});const t=o.fields.find(t=>"header-info"===t.id);t&&(t.data.options=t.data.options.map(t=>Object.assign(Object.assign({},t),{isFakePro:!1})))}const n={id:"lightbox",label:"Popup box",fields:[{id:"show-lightbox-sidebar",component:Object(d.a)({label:"Show sidebar",option:"lightboxShowSidebar",deps:["linkBehavior"],disabled:({computed:t})=>t.linkBehavior!==_.LIGHTBOX,render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o})})},{id:"num-lightbox-comments",label:"Number of comments",component:Object(d.a)({label:"Number of comments",option:"numLightboxComments",deps:["lightboxShowSidebar","linkBehavior"],disabled:({computed:t,value:e})=>t.linkBehavior!==_.LIGHTBOX||!e.lightboxShowSidebar,render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:0,placeholder:"No comments"}),tooltip:()=>i.a.createElement("span",null,"Comments are only available for posts from a ",i.a.createElement("strong",null,"Business")," account")})}]},a={id:"captions",label:"Captions",fields:[{id:"show-captions",component:Object(d.a)({label:"Show captions",option:"showCaptions",render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o})})},{id:"caption-max-length",component:Object(d.a)({label:"Caption max length",option:"captionMaxLength",deps:["showCaptions"],disabled:t=>M(t),render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:0,unit:"words",placeholder:"No limit"})})},{id:"caption-size",component:Object(d.a)({label:"Caption text size",option:"captionSize",deps:["showCaptions"],disabled:t=>M(t),render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:0,unit:"px",placeholder:"Theme default"})})},{id:"caption-color",component:Object(d.a)({label:"Caption text color",option:"captionColor",deps:["showCaptions"],disabled:t=>M(t),render:(t,e,o)=>i.a.createElement(m.a,{id:t.field.id,value:e,onChange:t=>o(t.rgb)})})},{id:"caption-remove-dots",component:Object(d.a)({label:"Remove dot lines",option:"captionRemoveDots",deps:["showCaptions"],disabled:t=>M(t),render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o}),tooltip:()=>i.a.createElement("span",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",i.a.createElement("code",null,"."),", ",i.a.createElement("code",null,"•"),", ",i.a.createElement("code",null,"*"),", etc.")})}]},r={id:"likes-comments",label:"Likes & Comments",fields:[{id:"show-likes",component:Object(d.a)({label:"Show likes icon",option:"showLikes",render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o}),tooltip:()=>i.a.createElement("span",null,"Likes are not available for Personal accounts, due to restrictions set by Instagram.")})},{id:"likes-icon-color",component:Object(d.a)({label:"Likes icon color",option:"likesIconColor",deps:["showLikes"],disabled:t=>!t.computed.showLikes,render:(t,e,o)=>i.a.createElement(m.a,{id:t.field.id,value:e,onChange:t=>o(t.rgb)})})},{id:"show-comments",component:Object(d.a)({label:"Show comments icon",option:"showComments",render:(t,e,o)=>i.a.createElement(g.a,{id:t.field.id,value:e,onChange:o}),tooltip:()=>i.a.createElement("span",null,"Comments are not available for Personal accounts, due to restrictions set by Instagram.")})},{id:"comments-icon-color",component:Object(d.a)({label:"Comments icon color",option:"commentsIconColor",deps:["showComments"],disabled:t=>!t.computed.showComments,render:(t,e,o)=>i.a.createElement(m.a,{id:t.field.id,value:e,onChange:t=>o(t.rgb)})})},{id:"lcIconSize",component:Object(d.a)({label:"Icon size",option:"lcIconSize",deps:["showLikes","showComments"],disabled:t=>!t.computed.showLikes&&!t.computed.showComments,render:(t,e,o)=>i.a.createElement(h.a,{id:t.field.id,value:e,onChange:o,min:0,unit:"px"})})}]};P.groups.splice(4,0,n,a,r)}const T={id:"filters",label:"Filter",sidebar:f.a,groups:[{id:"caption-filters",label:"Caption filtering",fields:[{id:"caption-whitelist",component:Object(r.a)(({value:t,onChange:e,field:o})=>i.a.createElement(b.a,{label:"Only show posts with these words or phrases"},i.a.createElement(y.a,{id:o.id,value:t.captionWhitelist,onChange:t=>e({captionWhitelist:t}),exclude:v.c.values.captionBlacklist.concat(t.captionBlacklist),excludeMsg:"%s is already being used in the below option or your global filters"})),["captionWhitelist"])},{id:"caption-whitelist-settings",component:Object(r.a)(({value:t,onChange:e,feed:o})=>i.a.createElement(O.a,{value:t.captionWhitelistSettings,onChange:t=>e({captionWhitelistSettings:t}),feed:o}),["captionWhitelistSettings"])},{id:"caption-blacklist",component:Object(r.a)(({value:t,onChange:e,field:o})=>i.a.createElement(b.a,{label:"Hide posts with these words or phrases",bordered:!0},i.a.createElement(y.a,{id:o.id,value:t.captionBlacklist,onChange:t=>e({captionBlacklist:t}),exclude:v.c.values.captionWhitelist.concat(t.captionWhitelist),excludeMsg:"%s is already being used in the above option or your global filters"})),["captionBlacklist"])},{id:"caption-blacklist-settings",component:Object(r.a)(({value:t,onChange:e,feed:o})=>i.a.createElement(O.a,{value:t.captionBlacklistSettings,onChange:t=>e({captionBlacklistSettings:t}),feed:o}),["captionBlacklistSettings"])}]},{id:"hashtag-filters",label:"Hashtag filtering",fields:[{id:"hashtag-whitelist",component:Object(r.a)(({value:t,onChange:e,field:o})=>i.a.createElement(b.a,{label:"Only show posts with these hashtags"},i.a.createElement(S.a,{id:o.id,value:t.hashtagWhitelist,onChange:t=>e({hashtagWhitelist:t}),exclude:v.c.values.hashtagBlacklist.concat(t.hashtagBlacklist),excludeMsg:"The %s hashtag is already being used in the below option or your global filters"})),["hashtagWhitelist"])},{id:"hashtag-whitelist-settings",component:Object(r.a)(({value:t,onChange:e,feed:o})=>i.a.createElement(O.a,{value:t.hashtagWhitelistSettings,onChange:t=>e({hashtagWhitelistSettings:t}),feed:o}),["hashtagWhitelistSettings"])},{id:"hashtag-blacklist",component:Object(r.a)(({value:t,onChange:e,field:o})=>i.a.createElement(b.a,{label:"Hide posts with these hashtags",bordered:!0},i.a.createElement(S.a,{id:o.id,value:t.hashtagBlacklist,onChange:t=>e({hashtagBlacklist:t}),exclude:v.c.values.hashtagWhitelist.concat(t.hashtagWhitelist),excludeMsg:"The %s hashtag is already being used by the above option or your global filters"})),["hashtagBlacklist"])},{id:"hashtag-blacklist-settings",component:Object(r.a)(({value:t,onChange:e,feed:o})=>i.a.createElement(O.a,{value:t.hashtagBlacklistSettings,onChange:t=>e({hashtagBlacklistSettings:t}),feed:o}),["hashtagBlacklistSettings"])}]}]},A={id:"moderate",label:"Moderate",component:E.a},k={id:"promote",label:"Promote",component:w.a},B=a.a.tabs.findIndex(t=>"embed"===t.id);function M(t){return!t.computed.showCaptions}B<0?a.a.tabs.push(T,A,k):a.a.tabs.splice(B,0,T,A,k)},6:function(t,e,o){"use strict";o.d(e,"a",(function(){return y}));var n=o(51),i=o.n(n),a=o(1),s=o(2),r=o(40),l=o(3),c=o(4),u=o(29),d=o(16),h=o(22),p=o(56),m=o(11),g=o(12),f=o(15),b=function(t,e,o,n){var i,a=arguments.length,s=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var r=t.length-1;r>=0;r--)(i=t[r])&&(s=(a<3?i(s):a>3?i(e,o,s):i(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};class y{constructor(t=new y.Options,e=s.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=s.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new y.Options(t),this.localMedia=a.o.array([]),this.mode=e,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(a.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(a.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(a.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:t})=>{this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,t)}),Object(a.p)(()=>this._media,t=>this.media=t),Object(a.p)(()=>this._numMediaShown,t=>this.numMediaShown=t),Object(a.p)(()=>this._numMediaPerPage,t=>this.numMediaPerPage=t),Object(a.p)(()=>this._canLoadMore,t=>this.canLoadMore=t)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,y.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const t=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,t>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(t=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,t()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(t,e,o){return this.cancelFetch(),y.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,a)=>{h.a.getFeedMedia(this.options,t,e,t=>this.cancelFetch=t).then(t=>{var e;if("object"!=typeof t||"object"!=typeof t.data||!Array.isArray(t.data.media))throw{message:"The media response is malformed or corrupt",response:t};o&&this.localMedia.replace([]),this.addLocalMedia(t.data.media),this.stories=null!==(e=t.data.stories)&&void 0!==e?e:[],this.totalMedia=t.data.total,n&&n()}).catch(t=>{var e;if(i.a.isCancel(t)||void 0===t.response)return null;const o=new y.Events.FetchFailEvent(y.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(e=t.response?t.response.data.message:void 0)&&void 0!==e?e:t.message,response:t.response}});return document.dispatchEvent(o),a&&a(t),t}).finally(()=>this.isLoading=!1)})):new Promise(t=>{this.localMedia.replace([]),this.totalMedia=0,t&&t()})}addLocalMedia(t){t.forEach(t=>{this.localMedia.some(e=>e.id==t.id)||this.localMedia.push(t)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}b([a.o],y.prototype,"media",void 0),b([a.o],y.prototype,"canLoadMore",void 0),b([a.o],y.prototype,"stories",void 0),b([a.o],y.prototype,"numLoadedMore",void 0),b([a.o],y.prototype,"options",void 0),b([a.o],y.prototype,"totalMedia",void 0),b([a.o],y.prototype,"mode",void 0),b([a.o],y.prototype,"isLoaded",void 0),b([a.o],y.prototype,"isLoading",void 0),b([a.f],y.prototype,"reload",void 0),b([a.o],y.prototype,"localMedia",void 0),b([a.o],y.prototype,"numMediaShown",void 0),b([a.o],y.prototype,"numMediaToShow",void 0),b([a.o],y.prototype,"numMediaPerPage",void 0),b([a.h],y.prototype,"_media",null),b([a.h],y.prototype,"_numMediaShown",null),b([a.h],y.prototype,"_numMediaPerPage",null),b([a.h],y.prototype,"_canLoadMore",null),b([a.f],y.prototype,"loadMore",null),b([a.f],y.prototype,"load",null),b([a.f],y.prototype,"loadMedia",null),b([a.f],y.prototype,"addLocalMedia",null),function(t){let e,o,n,i,h,p,y,v,O,S;!function(t){t.FETCH_FAIL="sli/feed/fetch_fail";class e extends CustomEvent{constructor(t,e){super(t,e)}}t.FetchFailEvent=e}(e=t.Events||(t.Events={}));class E{constructor(t={}){E.setFromObject(this,t)}static setFromObject(e,o={}){var n,i,a,c,u,d,h,p,m,f,b,y,v,O,S;const E=o.accounts?o.accounts.slice():t.DefaultOptions.accounts;e.accounts=E.filter(t=>!!t).map(t=>parseInt(t.toString()));const w=o.tagged?o.tagged.slice():t.DefaultOptions.tagged;return e.tagged=w.filter(t=>!!t).map(t=>parseInt(t.toString())),e.hashtags=o.hashtags?o.hashtags.slice():t.DefaultOptions.hashtags,e.layout=r.a.getById(o.layout).id,e.numColumns=s.a.normalize(o.numColumns,t.DefaultOptions.numColumns),e.highlightFreq=s.a.normalize(o.highlightFreq,t.DefaultOptions.highlightFreq),e.sliderPostsPerPage=s.a.normalize(o.sliderPostsPerPage,t.DefaultOptions.sliderPostsPerPage),e.sliderNumScrollPosts=s.a.normalize(o.sliderNumScrollPosts,t.DefaultOptions.sliderNumScrollPosts),e.mediaType=o.mediaType||t.DefaultOptions.mediaType,e.postOrder=o.postOrder||t.DefaultOptions.postOrder,e.numPosts=s.a.normalize(o.numPosts,t.DefaultOptions.numPosts),e.linkBehavior=s.a.normalize(o.linkBehavior,t.DefaultOptions.linkBehavior),e.feedWidth=s.a.normalize(o.feedWidth,t.DefaultOptions.feedWidth),e.feedHeight=s.a.normalize(o.feedHeight,t.DefaultOptions.feedHeight),e.feedPadding=s.a.normalize(o.feedPadding,t.DefaultOptions.feedPadding),e.imgPadding=s.a.normalize(o.imgPadding,t.DefaultOptions.imgPadding),e.textSize=s.a.normalize(o.textSize,t.DefaultOptions.textSize),e.bgColor=o.bgColor||t.DefaultOptions.bgColor,e.hoverInfo=o.hoverInfo?o.hoverInfo.slice():t.DefaultOptions.hoverInfo,e.textColorHover=o.textColorHover||t.DefaultOptions.textColorHover,e.bgColorHover=o.bgColorHover||t.DefaultOptions.bgColorHover,e.showHeader=s.a.normalize(o.showHeader,t.DefaultOptions.showHeader),e.headerInfo=s.a.normalize(o.headerInfo,t.DefaultOptions.headerInfo),e.headerAccount=null!==(n=o.headerAccount)&&void 0!==n?n:t.DefaultOptions.headerAccount,e.headerAccount=null===e.headerAccount||void 0===l.b.getById(e.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:e.headerAccount,e.headerStyle=s.a.normalize(o.headerStyle,t.DefaultOptions.headerStyle),e.headerTextSize=s.a.normalize(o.headerTextSize,t.DefaultOptions.headerTextSize),e.headerPhotoSize=s.a.normalize(o.headerPhotoSize,t.DefaultOptions.headerPhotoSize),e.headerTextColor=o.headerTextColor||t.DefaultOptions.headerTextColor,e.headerBgColor=o.headerBgColor||t.DefaultOptions.bgColor,e.headerPadding=s.a.normalize(o.headerPadding,t.DefaultOptions.headerPadding),e.customProfilePic=null!==(i=o.customProfilePic)&&void 0!==i?i:t.DefaultOptions.customProfilePic,e.customBioText=o.customBioText||t.DefaultOptions.customBioText,e.includeStories=null!==(a=o.includeStories)&&void 0!==a?a:t.DefaultOptions.includeStories,e.storiesInterval=o.storiesInterval||t.DefaultOptions.storiesInterval,e.showCaptions=s.a.normalize(o.showCaptions,t.DefaultOptions.showCaptions),e.captionMaxLength=s.a.normalize(o.captionMaxLength,t.DefaultOptions.captionMaxLength),e.captionRemoveDots=null!==(c=o.captionRemoveDots)&&void 0!==c?c:t.DefaultOptions.captionRemoveDots,e.captionSize=s.a.normalize(o.captionSize,t.DefaultOptions.captionSize),e.captionColor=o.captionColor||t.DefaultOptions.captionColor,e.showLikes=s.a.normalize(o.showLikes,t.DefaultOptions.showLikes),e.showComments=s.a.normalize(o.showComments,t.DefaultOptions.showCaptions),e.lcIconSize=s.a.normalize(o.lcIconSize,t.DefaultOptions.lcIconSize),e.likesIconColor=null!==(u=o.likesIconColor)&&void 0!==u?u:t.DefaultOptions.likesIconColor,e.commentsIconColor=o.commentsIconColor||t.DefaultOptions.commentsIconColor,e.lightboxShowSidebar=null!==(d=o.lightboxShowSidebar)&&void 0!==d?d:t.DefaultOptions.lightboxShowSidebar,e.numLightboxComments=o.numLightboxComments||t.DefaultOptions.numLightboxComments,e.showLoadMoreBtn=s.a.normalize(o.showLoadMoreBtn,t.DefaultOptions.showLoadMoreBtn),e.loadMoreBtnTextColor=o.loadMoreBtnTextColor||t.DefaultOptions.loadMoreBtnTextColor,e.loadMoreBtnBgColor=o.loadMoreBtnBgColor||t.DefaultOptions.loadMoreBtnBgColor,e.loadMoreBtnText=o.loadMoreBtnText||t.DefaultOptions.loadMoreBtnText,e.autoload=null!==(h=o.autoload)&&void 0!==h?h:t.DefaultOptions.autoload,e.showFollowBtn=s.a.normalize(o.showFollowBtn,t.DefaultOptions.showFollowBtn),e.followBtnText=null!==(p=o.followBtnText)&&void 0!==p?p:t.DefaultOptions.followBtnText,e.followBtnTextColor=o.followBtnTextColor||t.DefaultOptions.followBtnTextColor,e.followBtnBgColor=o.followBtnBgColor||t.DefaultOptions.followBtnBgColor,e.followBtnLocation=s.a.normalize(o.followBtnLocation,t.DefaultOptions.followBtnLocation),e.hashtagWhitelist=o.hashtagWhitelist||t.DefaultOptions.hashtagWhitelist,e.hashtagBlacklist=o.hashtagBlacklist||t.DefaultOptions.hashtagBlacklist,e.captionWhitelist=o.captionWhitelist||t.DefaultOptions.captionWhitelist,e.captionBlacklist=o.captionBlacklist||t.DefaultOptions.captionBlacklist,e.hashtagWhitelistSettings=null!==(m=o.hashtagWhitelistSettings)&&void 0!==m?m:t.DefaultOptions.hashtagWhitelistSettings,e.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:t.DefaultOptions.hashtagBlacklistSettings,e.captionWhitelistSettings=null!==(b=o.captionWhitelistSettings)&&void 0!==b?b:t.DefaultOptions.captionWhitelistSettings,e.captionBlacklistSettings=null!==(y=o.captionBlacklistSettings)&&void 0!==y?y:t.DefaultOptions.captionBlacklistSettings,e.moderation=o.moderation||t.DefaultOptions.moderation,e.moderationMode=o.moderationMode||t.DefaultOptions.moderationMode,e.promotionEnabled=null!==(v=o.promotionEnabled)&&void 0!==v?v:t.DefaultOptions.promotionEnabled,e.autoPromotionsEnabled=null!==(O=o.autoPromotionsEnabled)&&void 0!==O?O:t.DefaultOptions.autoPromotionsEnabled,e.globalPromotionsEnabled=null!==(S=o.globalPromotionsEnabled)&&void 0!==S?S:t.DefaultOptions.globalPromotionsEnabled,Array.isArray(o.promotions)?e.promotions=g.a.fromArray(o.promotions):o.promotions&&o.promotions instanceof Map?e.promotions=g.a.fromMap(o.promotions):"object"==typeof o.promotions?e.promotions=o.promotions:e.promotions=t.DefaultOptions.promotions,e}static getAllAccounts(t){const e=l.b.idsToAccounts(t.accounts),o=l.b.idsToAccounts(t.tagged);return{all:e.concat(o),accounts:e,tagged:o}}static getSources(t){return{accounts:l.b.idsToAccounts(t.accounts),tagged:l.b.idsToAccounts(t.tagged),hashtags:l.b.getBusinessAccounts().length>0?t.hashtags.filter(t=>t.tag.length>0):[]}}static hasSources(e){const o=t.Options.getSources(e),n=o.accounts.length>0||o.tagged.length>0,i=o.hashtags.length>0;return n||i}static isLimitingPosts(t){return t.moderation.length>0||t.hashtagBlacklist.length>0||t.hashtagWhitelist.length>0||t.captionBlacklist.length>0||t.captionWhitelist.length>0}}b([a.o],E.prototype,"accounts",void 0),b([a.o],E.prototype,"hashtags",void 0),b([a.o],E.prototype,"tagged",void 0),b([a.o],E.prototype,"layout",void 0),b([a.o],E.prototype,"numColumns",void 0),b([a.o],E.prototype,"highlightFreq",void 0),b([a.o],E.prototype,"sliderPostsPerPage",void 0),b([a.o],E.prototype,"sliderNumScrollPosts",void 0),b([a.o],E.prototype,"mediaType",void 0),b([a.o],E.prototype,"postOrder",void 0),b([a.o],E.prototype,"numPosts",void 0),b([a.o],E.prototype,"linkBehavior",void 0),b([a.o],E.prototype,"feedWidth",void 0),b([a.o],E.prototype,"feedHeight",void 0),b([a.o],E.prototype,"feedPadding",void 0),b([a.o],E.prototype,"imgPadding",void 0),b([a.o],E.prototype,"textSize",void 0),b([a.o],E.prototype,"bgColor",void 0),b([a.o],E.prototype,"textColorHover",void 0),b([a.o],E.prototype,"bgColorHover",void 0),b([a.o],E.prototype,"hoverInfo",void 0),b([a.o],E.prototype,"showHeader",void 0),b([a.o],E.prototype,"headerInfo",void 0),b([a.o],E.prototype,"headerAccount",void 0),b([a.o],E.prototype,"headerStyle",void 0),b([a.o],E.prototype,"headerTextSize",void 0),b([a.o],E.prototype,"headerPhotoSize",void 0),b([a.o],E.prototype,"headerTextColor",void 0),b([a.o],E.prototype,"headerBgColor",void 0),b([a.o],E.prototype,"headerPadding",void 0),b([a.o],E.prototype,"customBioText",void 0),b([a.o],E.prototype,"customProfilePic",void 0),b([a.o],E.prototype,"includeStories",void 0),b([a.o],E.prototype,"storiesInterval",void 0),b([a.o],E.prototype,"showCaptions",void 0),b([a.o],E.prototype,"captionMaxLength",void 0),b([a.o],E.prototype,"captionRemoveDots",void 0),b([a.o],E.prototype,"captionSize",void 0),b([a.o],E.prototype,"captionColor",void 0),b([a.o],E.prototype,"showLikes",void 0),b([a.o],E.prototype,"showComments",void 0),b([a.o],E.prototype,"lcIconSize",void 0),b([a.o],E.prototype,"likesIconColor",void 0),b([a.o],E.prototype,"commentsIconColor",void 0),b([a.o],E.prototype,"lightboxShowSidebar",void 0),b([a.o],E.prototype,"numLightboxComments",void 0),b([a.o],E.prototype,"showLoadMoreBtn",void 0),b([a.o],E.prototype,"loadMoreBtnText",void 0),b([a.o],E.prototype,"loadMoreBtnTextColor",void 0),b([a.o],E.prototype,"loadMoreBtnBgColor",void 0),b([a.o],E.prototype,"autoload",void 0),b([a.o],E.prototype,"showFollowBtn",void 0),b([a.o],E.prototype,"followBtnText",void 0),b([a.o],E.prototype,"followBtnTextColor",void 0),b([a.o],E.prototype,"followBtnBgColor",void 0),b([a.o],E.prototype,"followBtnLocation",void 0),b([a.o],E.prototype,"hashtagWhitelist",void 0),b([a.o],E.prototype,"hashtagBlacklist",void 0),b([a.o],E.prototype,"captionWhitelist",void 0),b([a.o],E.prototype,"captionBlacklist",void 0),b([a.o],E.prototype,"hashtagWhitelistSettings",void 0),b([a.o],E.prototype,"hashtagBlacklistSettings",void 0),b([a.o],E.prototype,"captionWhitelistSettings",void 0),b([a.o],E.prototype,"captionBlacklistSettings",void 0),b([a.o],E.prototype,"moderation",void 0),b([a.o],E.prototype,"moderationMode",void 0),t.Options=E;class w{constructor(t){Object.getOwnPropertyNames(t).map(e=>{this[e]=t[e]})}getCaption(t){const e=t.caption?t.caption:"";return this.captionMaxLength&&e.length?Object(u.d)(Object(c.o)(e,this.captionMaxLength)):e}static compute(e,o=s.a.Mode.DESKTOP){const n=new w({accounts:l.b.filterExisting(e.accounts),tagged:l.b.filterExisting(e.tagged),hashtags:e.hashtags.filter(t=>t.tag.length>0),layout:r.a.getById(e.layout),highlightFreq:s.a.get(e.highlightFreq,o,!0),sliderPostsPerPage:s.a.get(e.sliderPostsPerPage,o,!0),sliderNumScrollPosts:s.a.get(e.sliderNumScrollPosts,o,!0),linkBehavior:s.a.get(e.linkBehavior,o,!0),bgColor:Object(d.a)(e.bgColor),textColorHover:Object(d.a)(e.textColorHover),bgColorHover:Object(d.a)(e.bgColorHover),hoverInfo:e.hoverInfo,showHeader:s.a.get(e.showHeader,o,!0),headerInfo:s.a.get(e.headerInfo,o,!0),headerStyle:s.a.get(e.headerStyle,o,!0),headerTextColor:Object(d.a)(e.headerTextColor),headerBgColor:Object(d.a)(e.headerBgColor),headerPadding:s.a.get(e.headerPadding,o,!0),includeStories:e.includeStories,storiesInterval:e.storiesInterval,showCaptions:s.a.get(e.showCaptions,o,!0),captionMaxLength:s.a.get(e.captionMaxLength,o,!0),captionRemoveDots:e.captionRemoveDots,captionColor:Object(d.a)(e.captionColor),showLikes:s.a.get(e.showLikes,o,!0),showComments:s.a.get(e.showComments,o,!0),likesIconColor:Object(d.a)(e.likesIconColor),commentsIconColor:Object(d.a)(e.commentsIconColor),lightboxShowSidebar:e.lightboxShowSidebar,numLightboxComments:e.numLightboxComments,showLoadMoreBtn:s.a.get(e.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(d.a)(e.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(e.loadMoreBtnBgColor),loadMoreBtnText:e.loadMoreBtnText,showFollowBtn:s.a.get(e.showFollowBtn,o,!0),autoload:e.autoload,followBtnLocation:s.a.get(e.followBtnLocation,o,!0),followBtnTextColor:Object(d.a)(e.followBtnTextColor),followBtnBgColor:Object(d.a)(e.followBtnBgColor),followBtnText:e.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=this.getNumCols(e,o),n.numPosts=this.getNumPosts(e,o),n.allAccounts=n.accounts.concat(n.tagged.filter(t=>!n.accounts.includes(t))),n.allAccounts.length>0&&(n.account=e.headerAccount&&n.allAccounts.includes(e.headerAccount)?l.b.getById(e.headerAccount):l.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=e.customProfilePic.length?e.customProfilePic:l.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showBio=n.headerInfo.some(e=>e===t.HeaderInfo.BIO),n.showBio){const t=e.customBioText.trim().length>0?e.customBioText:null!==n.account?l.b.getBioText(n.account):"";n.bioText=Object(u.d)(t),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(e.feedWidth,o,"100%"),n.feedHeight=this.normalizeCssSize(e.feedHeight,o,"auto"),n.feedOverflowX=s.a.get(e.feedWidth,o)?"auto":void 0,n.feedOverflowY=s.a.get(e.feedHeight,o)?"auto":void 0,n.feedPadding=this.normalizeCssSize(e.feedPadding,o,"0"),n.imgPadding=this.normalizeCssSize(e.imgPadding,o,"0"),n.textSize=this.normalizeCssSize(e.textSize,o,"inherit",!0),n.headerTextSize=this.normalizeCssSize(e.headerTextSize,o,"inherit"),n.headerPhotoSize=this.normalizeCssSize(e.headerPhotoSize,o,"50px"),n.captionSize=this.normalizeCssSize(e.captionSize,o,"inherit"),n.lcIconSize=this.normalizeCssSize(e.lcIconSize,o,"inherit"),n.buttonPadding=Math.max(10,s.a.get(e.imgPadding,o))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static getNumCols(t,e){return Math.max(1,this.normalizeMultiInt(t.numColumns,e,1))}static getNumPosts(t,e){return Math.max(1,this.normalizeMultiInt(t.numPosts,e,1))}static normalizeMultiInt(t,e,o=0){const n=parseInt(s.a.get(t,e)+"");return isNaN(n)?e===s.a.Mode.DESKTOP?o:this.normalizeMultiInt(t,s.a.Mode.DESKTOP,o):n}static normalizeCssSize(t,e,o=null,n=!1){const i=s.a.get(t,e,n);return i?i+"px":o}}function _(t,e){if(f.a.isPro)return Object(c.j)(m.a.isValid,[()=>C(t,e),()=>e.globalPromotionsEnabled&&m.a.getGlobalPromo(t),()=>e.autoPromotionsEnabled&&m.a.getAutoPromo(t)])}function C(t,e){return t?m.a.getPromoFromDictionary(t,e.promotions):void 0}t.ComputedOptions=w,function(t){t.POPULAR="popular",t.RECENT="recent"}(o=t.HashtagSort||(t.HashtagSort={})),function(t){t.ALL="all",t.PHOTOS="photos",t.VIDEOS="videos"}(n=t.MediaType||(t.MediaType={})),function(t){t.NOTHING="nothing",t.SELF="self",t.NEW_TAB="new_tab",t.LIGHTBOX="lightbox"}(i=t.LinkBehavior||(t.LinkBehavior={})),function(t){t.DATE_ASC="date_asc",t.DATE_DESC="date_desc",t.POPULARITY_ASC="popularity_asc",t.POPULARITY_DESC="popularity_desc",t.RANDOM="random"}(h=t.PostOrder||(t.PostOrder={})),function(t){t.USERNAME="username",t.DATE="date",t.CAPTION="caption",t.LIKES_COMMENTS="likes_comments",t.INSTA_LINK="insta_link"}(p=t.HoverInfo||(t.HoverInfo={})),function(t){t.NORMAL="normal",t.BOXED="boxed",t.CENTERED="centered"}(y=t.HeaderStyle||(t.HeaderStyle={})),function(t){t.BIO="bio",t.PROFILE_PIC="profile_pic",t.FOLLOWERS="followers",t.MEDIA_COUNT="media_count"}(v=t.HeaderInfo||(t.HeaderInfo={})),function(t){t.HEADER="header",t.BOTTOM="bottom",t.BOTH="both"}(O=t.FollowBtnLocation||(t.FollowBtnLocation={})),function(t){t.WHITELIST="whitelist",t.BLACKLIST="blacklist"}(S=t.ModerationMode||(t.ModerationMode={})),t.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderPostsPerPage:{desktop:5},sliderNumScrollPosts:{desktop:1},mediaType:n.ALL,postOrder:h.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:i.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[v.PROFILE_PIC,v.BIO]},headerAccount:null,headerStyle:{desktop:y.NORMAL,phone:y.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:O.HEADER,phone:O.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:S.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},t.getPromo=_,t.getFeedPromo=C,t.executeMediaClick=function(t,e){const o=_(t,e),n=m.a.getConfig(o),i=m.a.getType(o);return!(!i||!i.isValid(n)||"function"!=typeof i.onMediaClick)&&i.onMediaClick(t,n)},t.getLink=function(t,e){var o,n;const i=_(t,e),a=m.a.getConfig(i),s=m.a.getType(i);if(void 0===s||!s.isValid(a))return{text:null,url:null,newTab:!1};const[r,l]=s.getPopupLink?null!==(o=s.getPopupLink(t,a))&&void 0!==o?o:null:[null,!1];return{text:r,url:s.getMediaUrl&&null!==(n=s.getMediaUrl(t,a))&&void 0!==n?n:null,newTab:l,icon:"external"}}}(y||(y={}))},65:function(t,e,o){"use strict";o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return i}));const n=(t,e)=>t.startsWith(e)?t:e+t,i=t=>{return(e=t,"#",e.startsWith("#")?e.substr("#".length):e).split(/\s/).map((t,e)=>e>0?t[0].toUpperCase()+t.substr(1):t).join("").replace(/\W/gi,"");var e}},69:function(t,e,o){t.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}},72:function(t,e,o){t.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},73:function(t,e,o){"use strict";o.d(e,"a",(function(){return c}));var n=o(0),i=o.n(n),a=o(98),s=o.n(a),r=o(3),l=o(10);function c(t){var{account:e,square:o,className:n}=t,a=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]])}return o}(t,["account","square","className"]);const c=r.b.getProfilePicUrl(e),u=Object(l.b)(o?s.a.square:s.a.round,n);return i.a.createElement("img",Object.assign({},a,{className:u,src:r.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:e.username+" profile picture"}))}},8:function(t,e,o){"use strict";o.d(e,"a",(function(){return s}));var n=o(0),i=o.n(n),a=o(10);const s=t=>{var{icon:e,className:o}=t,n=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]])}return o}(t,["icon","className"]);return i.a.createElement("span",Object.assign({className:Object(a.b)("dashicons","dashicons-"+e,o)},n))}},81:function(t,e,o){t.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},96:function(t,e,o){"use strict";o.d(e,"a",(function(){return s})),o.d(e,"b",(function(){return r}));var n=o(0),i=o.n(n),a=o(7);function s(t,e){return Object(a.b)(o=>i.a.createElement(t,Object.assign(Object.assign({},e),o)))}function r(t,e){return Object(a.b)(o=>{const n={};return Object.keys(e).forEach(t=>n[t]=e[t](o)),i.a.createElement(t,Object.assign({},n,o))})}},98:function(t,e,o){t.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},99:function(t,e,o){t.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}}},[[580,0,1,2,3]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[8],{0:function(t,o){t.exports=e},10:function(e,t,o){"use strict";function n(...e){return e.filter(e=>!!e).join(" ")}function i(e){return n(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function a(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return i})),o.d(t,"a",(function(){return a})),o.d(t,"e",(function(){return r})),o.d(t,"d",(function(){return s}));const r={onMouseDown:e=>e.preventDefault()};function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},100:function(e,t,o){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},101:function(e,t,o){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}},103:function(e,t,o){"use strict";o.d(t,"b",(function(){return l})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return u}));var n=o(6),i=o(22),a=o(4),r=o(29),s=o(11);class l{constructor(e){this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.config=Object(a.h)(e),void 0===this.config.watch&&(this.config.watch={all:!0})}fetchMedia(e,t){if(this.hasCache(e))return Promise.resolve(this.media);const o=Object.assign({},e.options,{moderation:this.isWatchingField("moderation")?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.isWatchingField("hashtagBlacklist")?e.options.hashtagBlacklist:[],hashtagWhitelist:this.isWatchingField("hashtagWhitelist")?e.options.hashtagWhitelist:[],captionBlacklist:this.isWatchingField("captionBlacklist")?e.options.captionBlacklist:[],captionWhitelist:this.isWatchingField("captionWhitelist")?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.isWatchingField("hashtagBlacklistSettings")&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.isWatchingField("hashtagWhitelistSettings")&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.isWatchingField("captionBlacklistSettings")&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.isWatchingField("captionWhitelistSettings")&&e.options.captionWhitelistSettings});return t&&t(),i.a.getFeedMedia(o).then(t=>(this.prevOptions=new n.a.Options(e.options),this.media=[],this.addMedia(t.data.media),this.media))}addMedia(e){e.forEach(e=>{this.media.some(t=>t.id==e.id)||this.media.push(e)})}hasCache(e){return null!==this.prevOptions&&!this.isCacheInvalid(e)}isWatchingField(e){var t,o,n;let i=null!==(t=this.config.watch.all)&&void 0!==t&&t;return 1===s.a.size(this.config.watch)&&void 0!==this.config.watch.all?i:(l.FILTER_FIELDS.includes(e)&&(i=null!==(o=s.a.get(this.config.watch,"filters"))&&void 0!==o?o:i),null!==(n=s.a.get(this.config.watch,e))&&void 0!==n?n:i)}isCacheInvalid(e){const t=e.options,o=this.prevOptions;if(Object(a.i)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(this.isWatchingField("accounts")&&!Object(a.e)(t.accounts,o.accounts))return!0;if(this.isWatchingField("tagged")&&!Object(a.e)(t.tagged,o.tagged))return!0;if(this.isWatchingField("hashtags")&&!Object(a.e)(t.hashtags,o.hashtags,r.c))return!0;if(this.isWatchingField("moderationMode")&&t.moderationMode!==o.moderationMode)return!0;if(this.isWatchingField("moderation")&&!Object(a.e)(t.moderation,o.moderation))return!0;if(this.isWatchingField("filters")){if(this.isWatchingField("captionWhitelistSettings")&&t.captionWhitelistSettings!==o.captionWhitelistSettings)return!0;if(this.isWatchingField("captionBlacklistSettings")&&t.captionBlacklistSettings!==o.captionBlacklistSettings)return!0;if(this.isWatchingField("hashtagWhitelistSettings")&&t.hashtagWhitelistSettings!==o.hashtagWhitelistSettings)return!0;if(this.isWatchingField("hashtagBlacklistSettings")&&t.hashtagBlacklistSettings!==o.hashtagBlacklistSettings)return!0;if(this.isWatchingField("captionWhitelist")&&!Object(a.e)(t.captionWhitelist,o.captionWhitelist))return!0;if(this.isWatchingField("captionBlacklist")&&!Object(a.e)(t.captionBlacklist,o.captionBlacklist))return!0;if(this.isWatchingField("hashtagWhitelist")&&!Object(a.e)(t.hashtagWhitelist,o.hashtagWhitelist))return!0;if(this.isWatchingField("hashtagBlacklist")&&!Object(a.e)(t.hashtagBlacklist,o.hashtagBlacklist))return!0}return!1}}!function(e){e.FILTER_FIELDS=["hashtagBlacklist","hashtagWhitelist","captionBlacklist","captionWhitelist","hashtagBlacklistSettings","hashtagWhitelistSettings","captionBlacklistSettings","captionWhitelistSettings"]}(l||(l={}));const c=new l({watch:{all:!0,filters:!1}}),u=new l({watch:{all:!0,moderation:!1}})},104:function(e,t,o){"use strict";o.d(t,"a",(function(){return S}));var n=o(0),i=o.n(n),a=o(63),r=o(13),s=o.n(r),l=o(7),c=o(3),u=o(642),d=o(427),h=o(81),p=o(135),m=o(130),f=o(47),g=o(9),b=o(33),y=o(19),v=o(74),O=Object(l.b)((function({account:e,onUpdate:t}){const[o,n]=i.a.useState(!1),[a,r]=i.a.useState(""),[l,O]=i.a.useState(!1),S=e.type===c.a.Type.PERSONAL,w=c.b.getBioText(e),E=()=>{e.customBio=a,O(!0),f.a.updateAccount(e).then(()=>{n(!1),O(!1),t&&t()})},C=o=>{e.customProfilePicUrl=o,O(!0),f.a.updateAccount(e).then(()=>{O(!1),t&&t()})};return i.a.createElement("div",{className:s.a.root},i.a.createElement("div",{className:s.a.container},i.a.createElement("div",{className:s.a.infoColumn},i.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:s.a.username},"@",e.username),i.a.createElement("div",{className:s.a.row},i.a.createElement("span",{className:s.a.label},"Spotlight ID:"),e.id),i.a.createElement("div",{className:s.a.row},i.a.createElement("span",{className:s.a.label},"User ID:"),e.userId),i.a.createElement("div",{className:s.a.row},i.a.createElement("span",{className:s.a.label},"Type:"),e.type),!o&&i.a.createElement("div",{className:s.a.row},i.a.createElement("div",null,i.a.createElement("span",{className:s.a.label},"Bio:"),i.a.createElement("a",{className:s.a.editBioLink,onClick:()=>{r(c.b.getBioText(e)),n(!0)}},"Edit bio"),i.a.createElement("pre",{className:s.a.bio},w.length>0?w:"(No bio)"))),o&&i.a.createElement("div",{className:s.a.row},i.a.createElement("textarea",{className:s.a.bioEditor,value:a,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(E(),e.preventDefault(),e.stopPropagation())},rows:4}),i.a.createElement("div",{className:s.a.bioFooter},i.a.createElement("div",{className:s.a.bioEditingControls},l&&i.a.createElement("span",null,"Please wait ...")),i.a.createElement("div",{className:s.a.bioEditingControls},i.a.createElement(g.a,{className:s.a.bioEditingButton,type:g.c.DANGER,disabled:l,onClick:()=>{e.customBio="",O(!0),f.a.updateAccount(e).then(()=>{n(!1),O(!1),t&&t()})}},"Reset"),i.a.createElement(g.a,{className:s.a.bioEditingButton,type:g.c.SECONDARY,disabled:l,onClick:()=>{n(!1)}},"Cancel"),i.a.createElement(g.a,{className:s.a.bioEditingButton,type:g.c.PRIMARY,disabled:l,onClick:E},"Save"))))),i.a.createElement("div",{className:s.a.picColumn},i.a.createElement("div",null,i.a.createElement(v.a,{account:e,className:s.a.profilePic})),i.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),o=m.a.media.attachment(t).attributes.url;C(o)}},({open:e})=>i.a.createElement(g.a,{type:g.c.SECONDARY,className:s.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&i.a.createElement("a",{className:s.a.resetCustomPic,onClick:()=>{C("")}},"Reset profile picture"))),S&&i.a.createElement("div",{className:s.a.personalInfoMessage},i.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",i.a.createElement("a",{href:y.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),i.a.createElement(h.a,{label:"View access token",stealth:!0},i.a.createElement("div",{className:s.a.row},e.accessToken&&i.a.createElement("div",null,i.a.createElement("p",null,i.a.createElement("span",{className:s.a.label},"Expires on:"),i.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),i.a.createElement("pre",{className:s.a.accessToken},e.accessToken.code)))))}));function S({isOpen:e,onClose:t,onUpdate:o,account:n}){return i.a.createElement(a.a,{isOpen:e&&!!n,title:"Account details",icon:"admin-users",onClose:t},i.a.createElement(a.a.Content,null,n&&i.a.createElement(O,{account:n,onUpdate:o})))}},11:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function o(e,t){return(null!=e?e:{})[t.toString()]}function n(e,t,o){return(e=null!=e?e:{})[t.toString()]=o,e}e.has=t,e.get=o,e.set=n,e.ensure=function(o,i,a){return t(o,i)||n(o,i,a),e.get(o,i)},e.withEntry=function(t,o,n){return e.set(Object(i.h)(null!=t?t:{}),o,n)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,o){return e.remove(Object(i.h)(null!=t?t:{}),o)},e.at=function(t,n){return o(t,e.keys(t)[n])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,o){const n={};return e.forEach(t,(e,t)=>n[e]=o(t,e)),n},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(i.m)(e,t)},e.forEach=function(t,o){e.keys(t).forEach(e=>o(e,t[e]))},e.fromArray=function(t){const o={};return t.forEach(([t,n])=>e.set(o,t,n)),o},e.fromMap=function(t){const o={};return t.forEach((t,n)=>e.set(o,n,t)),o}}(n||(n={}))},115:function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(0),i=o.n(n),a=o(7);function r(e,t){return Object(a.b)(o=>i.a.createElement(e,Object.assign(Object.assign({},t),o)))}function s(e,t){return Object(a.b)(o=>{const n={};return Object.keys(t).forEach(e=>n[e]=t[e](o)),i.a.createElement(e,Object.assign({},n,o))})}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(15),a=o(11),r=o(4);!function(e){function t(e){return e?c(e.type):void 0}function o(e){var o;if("object"!=typeof e)return!1;const n=t(e);return void 0!==n&&n.isValid(null!==(o=e.config)&&void 0!==o?o:{})}function n(t){return t?e.getPromoFromDictionary(t,i.a.config.globalPromotions):void 0}function s(e){const t=l(e);return void 0===t?void 0:t.promotion}function l(t){if(t)for(const o of i.a.config.autoPromotions){const n=e.Automation.getType(o),i=e.Automation.getConfig(o);if(n&&n.matches(t,i))return o}}function c(t){return e.types.find(e=>e.id===t)}let u;e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getType=t,e.isValid=o,e.getPromoFromDictionary=function(t,o){const n=a.a.get(o,t.id);if(n)return e.getType(n)?n:void 0},e.getPromo=function(e){return Object(r.k)(o,[()=>n(e),()=>s(e)])},e.getGlobalPromo=n,e.getAutoPromo=s,e.getAutomation=l,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?o(e.type):void 0},e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function o(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=o,e.clearTypes=function(){t.splice(0,t.length)}}(u=e.Automation||(e.Automation={}))}(n||(n={}))},121:function(e,t,o){"use strict";var n=o(103);t.a=new class{constructor(){this.mediaStore=n.a}}},125:function(e,t,o){e.exports={root:"ProUpgradeBtn__root"}},13:function(e,t,o){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},133:function(e,t,o){"use strict";o.d(t,"a",(function(){return y}));var n=o(0),i=o.n(n),a=o(82),r=o.n(a),s=o(25),l=o(69),c=o.n(l),u=o(57),d=o.n(u),h=o(7),p=o(4),m=o(126),f=Object(h.b)((function({field:e}){const t="settings-field-"+Object(p.q)(),o=!e.label||e.fullWidth;return i.a.createElement("div",{className:d.a.root},e.label&&i.a.createElement("div",{className:d.a.label},i.a.createElement("label",{htmlFor:t},e.label)),i.a.createElement("div",{className:d.a.container},i.a.createElement("div",{className:o?d.a.controlFullWidth:d.a.controlPartialWidth},i.a.createElement(e.component,{id:t})),e.tooltip&&i.a.createElement("div",{className:d.a.tooltip},i.a.createElement(m.a,null,e.tooltip))))}));function g({group:e}){return i.a.createElement("div",{className:c.a.root},e.title&&e.title.length>0&&i.a.createElement("h1",{className:c.a.title},e.title),e.component&&i.a.createElement("div",{className:c.a.content},i.a.createElement(e.component)),e.fields&&i.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>i.a.createElement(f,{field:e,key:e.id}))))}var b=o(18);function y({page:e}){return Object(b.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(s.c.save(),e.preventDefault(),e.stopPropagation())}),i.a.createElement("article",{className:r.a.root},e.component&&i.a.createElement("div",{className:r.a.content},i.a.createElement(e.component)),e.groups&&i.a.createElement("div",{className:r.a.groupList},e.groups.map(e=>i.a.createElement(g,{key:e.id,group:e}))))}},15:function(e,t,o){"use strict";var n,i=o(12);let a;t.a=a={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(n=SliCommonL10n.globalPromotions)&&void 0!==n?n:{}},image:e=>`${a.config.imagesUrl}/${e}`},i.a.registerType({id:"link",label:"Link",isValid:()=>!1}),i.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),i.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},151:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(0),i=o.n(n),a=o(125),r=o.n(a),s=o(19);function l({url:e,children:t}){return i.a.createElement("a",{className:r.a.root,href:null!=e?e:s.a.resources.pricingUrl,target:"_blank"},null!=t?t:"Free 14-day PRO trial")}},16:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},162:function(e,t,o){"use strict";function n(e,t){return"url"===t.linkType?t.url:t.postUrl}var i;o.d(t,"a",(function(){return i})),t.b={id:"link",label:"Link",getIcon:()=>"admin-links",getPopupLink:function(e,t){return"string"==typeof t.linkText&&t.linkText.length>0?[t.linkText,t.newTab]:[i.getDefaultLinkText(t),t.newTab]},isValid:function(e){return"string"==typeof e.linkType&&e.linkType.length>0&&("url"===e.linkType&&"string"==typeof e.url&&e.url.length>0||!!e.postId&&"string"==typeof e.postUrl&&e.postUrl.length>0)},getMediaUrl:n,onMediaClick:function(e,t){var o;const i=n(0,t),a=null===(o=t.linkDirectly)||void 0===o||o;return!(!i||!a)&&(window.open(i,t.newTab?"_blank":"_self"),!0)}},function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(i||(i={}))},174:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(0),i=o.n(n),a=o(46);function r({breakpoints:e,render:t,children:o}){const[r,s]=i.a.useState(null),l=i.a.useCallback(()=>{const t=Object(a.b)();s(()=>e.reduce((e,o)=>t.width<=o&&o<e?o:e,1/0))},[e]);Object(n.useEffect)(()=>(l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)),[]);const c=t?t(r):i.a.createElement(o,{breakpoint:r});return null!==r?c:null}},175:function(e,t,o){"use strict";var n=o(0),i=o.n(n),a=o(127),r=o(31),s=o.n(r),l=o(58),c=o(3),u=o(9),d=o(134),h=o(40),p=o(30),m=o(47),f=o(104),g=o(74),b=o(19),y=o(89),v=o(36),O=o(136);function S({accounts:e,showDelete:t,onDeleteError:o}){const n=(e=null!=e?e:[]).filter(e=>e.type===c.a.Type.BUSINESS).length,[a,r]=i.a.useState(!1),[S,w]=i.a.useState(null),[E,C]=i.a.useState(!1),[_,A]=i.a.useState(),[P,T]=i.a.useState(!1),k=e=>()=>{w(e),r(!0)},B=e=>()=>{m.a.openAuthWindow(e.type,0,()=>{b.a.restApi.deleteAccountMedia(e.id)})},M=e=>()=>{A(e),C(!0)},I=()=>{T(!1),A(null),C(!1)},L={cols:{username:s.a.usernameCol,type:s.a.typeCol,usages:s.a.usagesCol,actions:s.a.actionsCol},cells:{username:s.a.usernameCell,type:s.a.typeCell,usages:s.a.usagesCell,actions:s.a.actionsCell}};return i.a.createElement("div",{className:"accounts-list"},i.a.createElement(d.a,{styleMap:L,rows:e,cols:[{id:"username",label:"Username",render:e=>i.a.createElement("div",null,i.a.createElement(g.a,{account:e,className:s.a.profilePic}),i.a.createElement("a",{className:s.a.username,onClick:k(e)},e.username))},{id:"type",label:"Type",render:e=>i.a.createElement("span",{className:s.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>i.a.createElement("span",{className:s.a.usages},e.usages.map((e,t)=>!!h.a.getById(e)&&i.a.createElement(l.a,{key:t,to:p.a.at({screen:"edit",id:e.toString()})},h.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&i.a.createElement(v.f,null,({ref:e,openMenu:t})=>i.a.createElement(u.a,{ref:e,className:s.a.actionsBtn,type:u.c.PILL,size:u.b.NORMAL,onClick:t},i.a.createElement(O.a,null)),i.a.createElement(v.b,null,i.a.createElement(v.c,{onClick:k(e)},"Info"),i.a.createElement(v.c,{onClick:B(e)},"Reconnect"),i.a.createElement(v.d,null),i.a.createElement(v.c,{onClick:M(e)},"Delete")))}]}),i.a.createElement(f.a,{isOpen:a,onClose:()=>r(!1),account:S}),i.a.createElement(y.a,{isOpen:E,title:"Are you sure?",buttons:[P?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:P,cancelDisabled:P,onAccept:()=>{T(!0),m.a.deleteAccount(_.id).then(()=>I()).catch(()=>{o&&o("An error occurred while trying to remove the account."),I()})},onCancel:I},i.a.createElement("p",null,"Are you sure you want to delete"," ",i.a.createElement("span",{style:{fontWeight:"bold"}},_?_.username:""),"?"," ","This will also delete all saved media associated with this account."),_&&_.type===c.a.Type.BUSINESS&&1===n&&i.a.createElement("p",null,i.a.createElement("b",null,"Note:")," ",i.a.createElement("span",null,"Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work."))))}var w=o(33),E=o(7),C=o(137),_=o(101),A=o.n(_);t.a=Object(E.b)((function(){const[,e]=i.a.useState(0),[t,o]=i.a.useState(""),n=i.a.useCallback(()=>e(e=>e++),[]);return c.b.hasAccounts()?i.a.createElement("div",{className:A.a.root},t.length>0&&i.a.createElement(w.a,{type:w.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>o("")},t),i.a.createElement("div",{className:A.a.connectBtn},i.a.createElement(a.a,{onConnect:n})),i.a.createElement(S,{accounts:c.b.list,showDelete:!0,onDeleteError:o})):i.a.createElement(C.a,null)}))},18:function(e,t,o){"use strict";o.d(t,"j",(function(){return s})),o.d(t,"f",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return u})),o.d(t,"a",(function(){return d})),o.d(t,"n",(function(){return h})),o.d(t,"h",(function(){return p})),o.d(t,"l",(function(){return m})),o.d(t,"k",(function(){return f})),o.d(t,"e",(function(){return g})),o.d(t,"d",(function(){return b})),o.d(t,"m",(function(){return y})),o.d(t,"g",(function(){return v})),o.d(t,"i",(function(){return O}));var n=o(0),i=o.n(n),a=o(59),r=o(46);function s(e,t){!function(e,t,o){const n=i.a.useRef(!0);e(()=>{n.current=!0;const e=t(()=>new Promise(e=>{n.current&&e()}));return()=>{n.current=!1,e&&e()}},o)}(n.useEffect,e,t)}function l(e){const[t,o]=i.a.useState(e),n=i.a.useRef(t);return[t,()=>n.current,e=>o(n.current=e)]}function c(e,t,o=[]){function i(n){!e.current||e.current.contains(n.target)||o.some(e=>e&&e.current&&e.current.contains(n.target))||t(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",i),document.addEventListener("touchend",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchend",i)}))}function u(e,t){Object(n.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function d(e,t,o=100){const[a,r]=i.a.useState(e);return Object(n.useEffect)(()=>{let n=null;return e===t?n=setTimeout(()=>r(t),o):r(!t),()=>{null!==n&&clearTimeout(n)}},[e]),[a,r]}function h(e){const[t,o]=i.a.useState(Object(r.b)()),a=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(n.useEffect)(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[]),t}function p(){return new URLSearchParams(Object(a.e)().search)}function m(e,t){Object(n.useEffect)(()=>{const o=o=>{if(t)return(o||window.event).returnValue=e,e};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[t])}function f(e,t){const o=i.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function g(e,t,o,i=[],a=[]){Object(n.useEffect)(()=>(i.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),a)}function b(e,t,o=[],n=[]){g(document,e,t,o,n)}function y(e,t,o=[],n=[]){g(window,e,t,o,n)}function v(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function O(e){const[t,o]=i.a.useState(e);return[function(e){const t=i.a.useRef(e);return t.current=e,t}(t),o]}o(53)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(1),a=function(e,t,o,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,o,r):i(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return n(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const n=s(this,t,e);return new o(n.desktop,n.tablet,n.phone)}}function n(e,t,o=!1){if(!e)return;const n=e[t.prop];return o&&null==n?e.desktop:n}function r(e,t,o){return e[o.prop]=t,e}function s(e,t,n){return r(new o(e.desktop,e.tablet,e.phone),t,n)}a([i.o],o.prototype,"desktop",void 0),a([i.o],o.prototype,"tablet",void 0),a([i.o],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const n=e.MODES.findIndex(e=>e===o);return void 0===n?t.DESKTOP:e.MODES[(n+1)%e.MODES.length]},e.get=n,e.set=r,e.withValue=s,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(n||(n={}))},22:function(e,t,o){"use strict";var n=o(50),i=o.n(n),a=o(15),r=o(53);const s=a.a.config.restApi.baseUrl,l={};a.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=a.a.config.restApi.authToken);const c=i.a.create({baseURL:s,headers:l});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const u={config:Object.assign(Object.assign({},a.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,n)=>{const a=n?new i.a.CancelToken(n):void 0;return new Promise((n,i)=>{const r=e=>{n(e),document.dispatchEvent(new Event(u.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:a}).then(n=>{n&&n.data.needImport?u.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:a}).then(r).catch(i)}).catch(i):r(n)}).catch(i)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,o)=>{document.dispatchEvent(new Event(u.events.onImportStart));const n=e=>{const t=u.getErrorReason(e);document.dispatchEvent(new ErrorEvent(u.events.onImportFail,{message:t})),o(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(u.events.onImportEnd)),t(e)):n(u.getErrorReason(e))}).catch(n)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=u},29:function(e,t,o){"use strict";o.d(t,"a",(function(){return s})),o.d(t,"d",(function(){return l})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return u})),o(5);var n=o(64),i=o(0),a=o.n(i),r=o(4);function s(e,t){const o=t.map(n.b).join("|");return new RegExp(`#(${o})(?:\\b|\\r|#|$)`,"imu").test(e)}function l(e,t,o=0,n=!1){let s=e.trim();n&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=s.split("\n"),c=l.map((e,o)=>{if(e=e.trim(),n&&/^[.*•]$/.test(e))return null;let s,c=[];for(;null!==(s=/#(\w+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],o=a.a.createElement("a",{href:t,target:"_blank",key:Object(r.q)()},s[0]),n=e.substr(0,s.index),i=e.substr(s.index+s[0].length);c.push(n),c.push(o),e=i}return e.length&&c.push(e),t&&(c=t(c,o)),l.length>1&&c.push(a.a.createElement("br",{key:Object(r.q)()})),a.a.createElement(i.Fragment,{key:Object(r.q)()},c)});return o>0?c.slice(0,o):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function u(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(22),a=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(n||(n={}));const r=Object(a.o)([]),s="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function u(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===n.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(a.o)(e))),r}function d(e){if("object"==typeof e&&Array.isArray(e.data))return u(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:s,getById:l,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==l(e)),idsToAccounts:e=>e.map(e=>l(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===n.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===n.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:s,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return i.a.getAccounts().then(d).catch(e=>{throw i.a.getErrorReason(e)})},loadFromResponse:d,addAccounts:u}},30:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(1),i=o(66),a=o(4),r=function(e,t,o,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,o,r):i(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(i.parse)(e.search),this.unListen=null,this.listeners=[],Object(n.p)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(i.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=!0){return Object(a.j)(this.parsed[e])}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}goto(e,t=!1){this.history.push(t?this.with(e):this.at(e),{})}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(i.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(o=>{e[o]&&0===e[o].length?delete t[o]:t[o]=e[o]}),t}}r([n.o],s.prototype,"path",void 0),r([n.o],s.prototype,"parsed",void 0),r([n.h],s.prototype,"_path",null);const l=new s},31:function(e,t,o){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-btn":"AccountsList__actions-btn",actionsBtn:"AccountsList__actions-btn","usages-cell":"AccountsList__usages-cell",usagesCell:"AccountsList__usages-cell","usages-col":"AccountsList__usages-col",usagesCol:"AccountsList__usages-col","type-cell":"AccountsList__type-cell",typeCell:"AccountsList__type-cell","type-col":"AccountsList__type-col",typeCol:"AccountsList__type-col"}},4:function(e,t,o){"use strict";o.d(t,"q",(function(){return r})),o.d(t,"h",(function(){return s})),o.d(t,"a",(function(){return l})),o.d(t,"r",(function(){return c})),o.d(t,"b",(function(){return u})),o.d(t,"d",(function(){return d})),o.d(t,"m",(function(){return h})),o.d(t,"l",(function(){return p})),o.d(t,"i",(function(){return m})),o.d(t,"e",(function(){return f})),o.d(t,"p",(function(){return g})),o.d(t,"o",(function(){return b})),o.d(t,"n",(function(){return y})),o.d(t,"k",(function(){return v})),o.d(t,"g",(function(){return O})),o.d(t,"f",(function(){return S})),o.d(t,"c",(function(){return w})),o.d(t,"j",(function(){return E}));var n=o(171),i=o(172);let a=0;function r(){return a++}function s(e){const t={};return Object.keys(e).forEach(o=>{const n=e[o];Array.isArray(n)?t[o]=n.slice():n instanceof Map?t[o]=new Map(n.entries()):t[o]="object"==typeof n?s(n):n}),t}function l(e,t){return Object.keys(t).forEach(o=>{e[o]=t[o]}),e}function c(e,t){return l(s(e),t)}function u(e,t){return Array.isArray(e)&&Array.isArray(t)?d(e,t):e instanceof Map&&t instanceof Map?d(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?h(e,t):e===t}function d(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(o){if(!o(e[n],t[n]))return!1}else if(!u(e[n],t[n]))return!1;return!0}function h(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return u(e,t);const o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;const i=new Set(o.concat(n));for(const o of i)if(!u(e[o],t[o]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function m(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function f(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function g(e,t){const o=/(\s+)/g;let n,i=0,a=0,r="";for(;null!==(n=o.exec(e))&&i<t;){const t=n.index+n[1].length;r+=e.substr(a,t-a),a=t,i++}return a<e.length&&(r+=" ..."),r}function b(e){return Object(n.a)(Object(i.a)(e),{addSuffix:!0})}function y(e,t){const o=[];return e.forEach((e,n)=>{const i=n%t;Array.isArray(o[i])?o[i].push(e):o[i]=[e]}),o}function v(e,t){for(const o of t){const t=o();if(e(t))return t}}function O(e,t,o){return Math.max(t,Math.min(o,e))}function S(e,t){return O(e,0,t.length-1)}function w(e,t,o){const n=e.slice();return n[t]=o,n}function E(e){return Array.isArray(e)?e[0]:e}},41:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));class n{static getById(e){const t=n.list.find(t=>t.id===e);return!t&&n.list.length>0?n.list[0]:t}static getName(e){const t=n.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){n.list.push(e)}}n.list=[]},42:function(e,o){e.exports=t},45:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,o){"use strict";function n(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function i(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function a(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return a}))},5:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(11),a=o(3);!function(e){let t,o,n;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let o;function n(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!i.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[o.SMALL]:t.thumbnail,[o.MEDIUM]:t.thumbnail,[o.LARGE]:t.thumbnail}}return{[o.SMALL]:t.url,[o.MEDIUM]:t.url,[o.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(o=t.Size||(t.Size={})),t.get=function(e,t){const o=n(e);return i.a.get(o,t)||(r(e)?e.thumbnail:e.url)},t.getMap=n,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!i.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var n;let a=[];i.a.has(e.thumbnails,o.SMALL)&&a.push(i.a.get(e.thumbnails,o.SMALL)+` ${t.s}w`),i.a.has(e.thumbnails,o.MEDIUM)&&a.push(i.a.get(e.thumbnails,o.MEDIUM)+` ${t.m}w`);const r=null!==(n=i.a.get(e.thumbnails,o.LARGE))&&void 0!==n?n:e.url;return a.push(r+` ${t.l}w`),a}}(o=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function o(e){switch(e){case t.PERSONAL_ACCOUNT:return a.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return a.a.Type.BUSINESS;default:return}}function n(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===a.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=o,e.getHashtagSort=n,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const i=[],r=[],s=[],l=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:n(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const u=a.b.getByUsername(e.name),d=u?o(e.type):null;u&&u.type===d?e.type===t.TAGGED_ACCOUNT?r.push(u):e.type===t.USER_STORY?s.push(u):i.push(u):l.push(e)}}),{accounts:i,tagged:r,stories:s,hashtags:c,misc:l}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(n=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===n.Type.POPULAR_HASHTAG||e.source.type===n.Type.RECENT_HASHTAG,e.isNotAChild=r}(n||(n={}))},53:function(e,t,o){"use strict";function n(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function i(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},54:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var n=o(0),i=o.n(n),a=o(45),r=o.n(a),s=o(105),l=o(5),c=o(73),u=o.n(c);function d(){return i.a.createElement("div",{className:u.a.root})}var h=o(10);function p(e){var{media:t,className:o,size:a,onLoadImage:c,width:u,height:p}=e,m=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}(e,["media","className","size","onLoadImage","width","height"]);const f=i.a.useRef(),g=i.a.useRef(),[b,y]=i.a.useState(!l.a.Thumbnails.has(t)),[v,O]=i.a.useState(!0),[S,w]=i.a.useState(!1);function E(){if(f.current){const e=null!=a?a:function(){const e=f.current.getBoundingClientRect();return e.width<=320?l.a.Thumbnails.Size.SMALL:e.width<=600?l.a.Thumbnails.Size.MEDIUM:l.a.Thumbnails.Size.LARGE}(),o=l.a.Thumbnails.get(t,e);f.current.src!==o&&(f.current.src=o)}}function C(){P()}function _(){t.type===l.a.Type.VIDEO?y(!0):f.current.src===t.url?w(!0):f.current.src=t.url,P()}function A(){isNaN(g.current.duration)||g.current.duration===1/0?g.current.currentTime=1:g.current.currentTime=g.current.duration/2,P()}function P(){O(!1),c&&c()}return Object(n.useLayoutEffect)(()=>{let e=new s.a(E);return f.current&&(f.current.onload=C,f.current.onerror=_,E(),e.observe(f.current)),g.current&&(g.current.onloadeddata=A),()=>{f.current&&(f.current.onload=()=>null,f.current.onerror=()=>null),g.current&&(g.current.onloadeddata=()=>null),e.disconnect()}},[t,a]),t.url&&t.url.length>0&&!S?i.a.createElement("div",Object.assign({className:Object(h.b)(r.a.root,o)},m),"VIDEO"===t.type&&b?i.a.createElement("video",{ref:g,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},i.a.createElement("source",{src:t.url}),"Your browser does not support videos"):i.a.createElement("img",Object.assign({ref:f,className:r.a.image,loading:"lazy",width:u,height:p,alt:""},h.e)),v&&i.a.createElement(d,null)):i.a.createElement("div",{className:r.a.notAvailable},i.a.createElement("span",null,"Thumbnail not available"))}},57:function(e,t,o){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},6:function(e,t,o){"use strict";o.d(t,"a",(function(){return y}));var n=o(50),i=o.n(n),a=o(1),r=o(2),s=o(41),l=o(3),c=o(4),u=o(29),d=o(16),h=o(22),p=o(68),m=o(12),f=o(11),g=o(15),b=function(e,t,o,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(r=(a<3?i(r):a>3?i(t,o,r):i(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r};class y{constructor(e=new y.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new y.Options(e),this.localMedia=a.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(a.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(a.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(a.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(a.p)(()=>this._media,e=>this.media=e),Object(a.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(a.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(a.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,y.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),y.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,a)=>{h.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,n&&n()}).catch(e=>{var t;if(i.a.isCancel(e)||void 0===e.response)return null;const o=new y.Events.FetchFailEvent(y.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(o),a&&a(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}b([a.o],y.prototype,"media",void 0),b([a.o],y.prototype,"canLoadMore",void 0),b([a.o],y.prototype,"stories",void 0),b([a.o],y.prototype,"numLoadedMore",void 0),b([a.o],y.prototype,"options",void 0),b([a.o],y.prototype,"totalMedia",void 0),b([a.o],y.prototype,"mode",void 0),b([a.o],y.prototype,"isLoaded",void 0),b([a.o],y.prototype,"isLoading",void 0),b([a.f],y.prototype,"reload",void 0),b([a.o],y.prototype,"localMedia",void 0),b([a.o],y.prototype,"numMediaShown",void 0),b([a.o],y.prototype,"numMediaToShow",void 0),b([a.o],y.prototype,"numMediaPerPage",void 0),b([a.h],y.prototype,"_media",null),b([a.h],y.prototype,"_numMediaShown",null),b([a.h],y.prototype,"_numMediaPerPage",null),b([a.h],y.prototype,"_canLoadMore",null),b([a.f],y.prototype,"loadMore",null),b([a.f],y.prototype,"load",null),b([a.f],y.prototype,"loadMedia",null),b([a.f],y.prototype,"addLocalMedia",null),function(e){let t,o,n,i,h,p,y,v,O,S,w,E;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class C{constructor(e={}){C.setFromObject(this,e)}static setFromObject(t,o={}){var n,i,a,c,u,d,h,p,m,g,b,y,v,O,S,w,E;const C=o.accounts?o.accounts.slice():e.DefaultOptions.accounts;t.accounts=C.filter(e=>!!e).map(e=>parseInt(e.toString()));const _=o.tagged?o.tagged.slice():e.DefaultOptions.tagged;return t.tagged=_.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.layout=s.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderNumScrollPosts=r.a.normalize(o.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.sliderInfinite=null!==(n=o.sliderInfinite)&&void 0!==n?n:e.DefaultOptions.sliderInfinite,t.sliderLoop=null!==(i=o.sliderLoop)&&void 0!==i?i:e.DefaultOptions.sliderLoop,t.sliderArrowPos=r.a.normalize(o.sliderArrowPos,e.DefaultOptions.sliderArrowPos),t.sliderArrowSize=o.sliderArrowSize||e.DefaultOptions.sliderArrowSize,t.sliderArrowColor=o.sliderArrowColor||e.DefaultOptions.sliderArrowColor,t.sliderArrowBgColor=o.sliderArrowBgColor||e.DefaultOptions.sliderArrowBgColor,t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(a=o.headerAccount)&&void 0!==a?a:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===l.b.getById(t.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(c=o.customProfilePic)&&void 0!==c?c:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(u=o.includeStories)&&void 0!==u?u:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(d=o.captionRemoveDots)&&void 0!==d?d:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(h=o.likesIconColor)&&void 0!==h?h:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(p=o.lightboxShowSidebar)&&void 0!==p?p:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=o.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(g=o.followBtnText)&&void 0!==g?g:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(b=o.hashtagWhitelistSettings)&&void 0!==b?b:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(y=o.hashtagBlacklistSettings)&&void 0!==y?y:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(v=o.captionWhitelistSettings)&&void 0!==v?v:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(O=o.captionBlacklistSettings)&&void 0!==O?O:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(S=o.promotionEnabled)&&void 0!==S?S:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(w=o.autoPromotionsEnabled)&&void 0!==w?w:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(E=o.globalPromotionsEnabled)&&void 0!==E?E:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(o.promotions)?t.promotions=f.a.fromArray(o.promotions):o.promotions&&o.promotions instanceof Map?t.promotions=f.a.fromMap(o.promotions):"object"==typeof o.promotions?t.promotions=o.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=l.b.idsToAccounts(e.accounts),o=l.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:l.b.idsToAccounts(e.accounts),tagged:l.b.idsToAccounts(e.tagged),hashtags:l.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const o=e.Options.getSources(t),n=o.accounts.length>0||o.tagged.length>0,i=o.hashtags.length>0;return n||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}b([a.o],C.prototype,"accounts",void 0),b([a.o],C.prototype,"hashtags",void 0),b([a.o],C.prototype,"tagged",void 0),b([a.o],C.prototype,"layout",void 0),b([a.o],C.prototype,"numColumns",void 0),b([a.o],C.prototype,"highlightFreq",void 0),b([a.o],C.prototype,"sliderNumScrollPosts",void 0),b([a.o],C.prototype,"sliderInfinite",void 0),b([a.o],C.prototype,"sliderLoop",void 0),b([a.o],C.prototype,"sliderArrowPos",void 0),b([a.o],C.prototype,"sliderArrowSize",void 0),b([a.o],C.prototype,"sliderArrowColor",void 0),b([a.o],C.prototype,"sliderArrowBgColor",void 0),b([a.o],C.prototype,"mediaType",void 0),b([a.o],C.prototype,"postOrder",void 0),b([a.o],C.prototype,"numPosts",void 0),b([a.o],C.prototype,"linkBehavior",void 0),b([a.o],C.prototype,"feedWidth",void 0),b([a.o],C.prototype,"feedHeight",void 0),b([a.o],C.prototype,"feedPadding",void 0),b([a.o],C.prototype,"imgPadding",void 0),b([a.o],C.prototype,"textSize",void 0),b([a.o],C.prototype,"bgColor",void 0),b([a.o],C.prototype,"textColorHover",void 0),b([a.o],C.prototype,"bgColorHover",void 0),b([a.o],C.prototype,"hoverInfo",void 0),b([a.o],C.prototype,"showHeader",void 0),b([a.o],C.prototype,"headerInfo",void 0),b([a.o],C.prototype,"headerAccount",void 0),b([a.o],C.prototype,"headerStyle",void 0),b([a.o],C.prototype,"headerTextSize",void 0),b([a.o],C.prototype,"headerPhotoSize",void 0),b([a.o],C.prototype,"headerTextColor",void 0),b([a.o],C.prototype,"headerBgColor",void 0),b([a.o],C.prototype,"headerPadding",void 0),b([a.o],C.prototype,"customBioText",void 0),b([a.o],C.prototype,"customProfilePic",void 0),b([a.o],C.prototype,"includeStories",void 0),b([a.o],C.prototype,"storiesInterval",void 0),b([a.o],C.prototype,"showCaptions",void 0),b([a.o],C.prototype,"captionMaxLength",void 0),b([a.o],C.prototype,"captionRemoveDots",void 0),b([a.o],C.prototype,"captionSize",void 0),b([a.o],C.prototype,"captionColor",void 0),b([a.o],C.prototype,"showLikes",void 0),b([a.o],C.prototype,"showComments",void 0),b([a.o],C.prototype,"lcIconSize",void 0),b([a.o],C.prototype,"likesIconColor",void 0),b([a.o],C.prototype,"commentsIconColor",void 0),b([a.o],C.prototype,"lightboxShowSidebar",void 0),b([a.o],C.prototype,"numLightboxComments",void 0),b([a.o],C.prototype,"showLoadMoreBtn",void 0),b([a.o],C.prototype,"loadMoreBtnText",void 0),b([a.o],C.prototype,"loadMoreBtnTextColor",void 0),b([a.o],C.prototype,"loadMoreBtnBgColor",void 0),b([a.o],C.prototype,"autoload",void 0),b([a.o],C.prototype,"showFollowBtn",void 0),b([a.o],C.prototype,"followBtnText",void 0),b([a.o],C.prototype,"followBtnTextColor",void 0),b([a.o],C.prototype,"followBtnBgColor",void 0),b([a.o],C.prototype,"followBtnLocation",void 0),b([a.o],C.prototype,"hashtagWhitelist",void 0),b([a.o],C.prototype,"hashtagBlacklist",void 0),b([a.o],C.prototype,"captionWhitelist",void 0),b([a.o],C.prototype,"captionBlacklist",void 0),b([a.o],C.prototype,"hashtagWhitelistSettings",void 0),b([a.o],C.prototype,"hashtagBlacklistSettings",void 0),b([a.o],C.prototype,"captionWhitelistSettings",void 0),b([a.o],C.prototype,"captionBlacklistSettings",void 0),b([a.o],C.prototype,"moderation",void 0),b([a.o],C.prototype,"moderationMode",void 0),e.Options=C;class _{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.d)(Object(c.p)(t,this.captionMaxLength)):t}static compute(t,o=r.a.Mode.DESKTOP){const n=new _({accounts:l.b.filterExisting(t.accounts),tagged:l.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:s.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,o,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,o,!0),sliderInfinite:t.sliderInfinite,sliderLoop:t.sliderLoop,sliderArrowPos:r.a.get(t.sliderArrowPos,o,!0),sliderArrowSize:r.a.get(t.sliderArrowSize,o,!0),sliderArrowColor:Object(d.a)(t.sliderArrowColor),sliderArrowBgColor:Object(d.a)(t.sliderArrowBgColor),linkBehavior:r.a.get(t.linkBehavior,o,!0),bgColor:Object(d.a)(t.bgColor),textColorHover:Object(d.a)(t.textColorHover),bgColorHover:Object(d.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,o,!0),headerInfo:r.a.get(t.headerInfo,o,!0),headerStyle:r.a.get(t.headerStyle,o,!0),headerTextColor:Object(d.a)(t.headerTextColor),headerBgColor:Object(d.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,o,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,o,!0),captionMaxLength:r.a.get(t.captionMaxLength,o,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(d.a)(t.captionColor),showLikes:r.a.get(t.showLikes,o,!0),showComments:r.a.get(t.showComments,o,!0),likesIconColor:Object(d.a)(t.likesIconColor),commentsIconColor:Object(d.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(d.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,o,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,o,!0),followBtnTextColor:Object(d.a)(t.followBtnTextColor),followBtnBgColor:Object(d.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=this.getNumCols(t,o),n.numPosts=this.getNumPosts(t,o),n.allAccounts=n.accounts.concat(n.tagged.filter(e=>!n.accounts.includes(e))),n.allAccounts.length>0&&(n.account=t.headerAccount&&n.allAccounts.includes(t.headerAccount)?l.b.getById(t.headerAccount):l.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:l.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showBio=n.headerInfo.some(t=>t===e.HeaderInfo.BIO),n.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==n.account?l.b.getBioText(n.account):"";n.bioText=Object(u.d)(e),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(t.feedWidth,o,"100%"),n.feedHeight=this.normalizeCssSize(t.feedHeight,o,"auto"),n.feedOverflowX=r.a.get(t.feedWidth,o)?"auto":void 0,n.feedOverflowY=r.a.get(t.feedHeight,o)?"auto":void 0,n.feedPadding=this.normalizeCssSize(t.feedPadding,o,"0"),n.imgPadding=this.normalizeCssSize(t.imgPadding,o,"0"),n.textSize=this.normalizeCssSize(t.textSize,o,"inherit",!0),n.headerTextSize=this.normalizeCssSize(t.headerTextSize,o,"inherit"),n.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,o,"50px"),n.captionSize=this.normalizeCssSize(t.captionSize,o,"inherit"),n.lcIconSize=this.normalizeCssSize(t.lcIconSize,o,"inherit"),n.buttonPadding=Math.max(10,r.a.get(t.imgPadding,o))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,o=0){const n=parseInt(r.a.get(e,t)+"");return isNaN(n)?t===r.a.Mode.DESKTOP?o:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,o):n}static normalizeCssSize(e,t,o=null,n=!1){const i=r.a.get(e,t,n);return i?i+"px":o}}function A(e,t){if(g.a.isPro)return Object(c.k)(m.a.isValid,[()=>P(e,t),()=>t.globalPromotionsEnabled&&m.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&m.a.getAutoPromo(e)])}function P(e,t){return e?m.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=_,function(e){e.NONE="none",e.LOOP="loop",e.INFINITE="infinite"}(o=e.SliderLoopMode||(e.SliderLoopMode={})),function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(n=e.SliderArrowPosition||(e.SliderArrowPosition={})),function(e){e.POPULAR="popular",e.RECENT="recent"}(i=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(h=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(p=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(y=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(v=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(O=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(S=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(w=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(E=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderNumScrollPosts:{desktop:1},sliderInfinite:!0,sliderLoop:!1,sliderArrowPos:{desktop:n.INSIDE},sliderArrowSize:{desktop:20},sliderArrowColor:{r:255,b:255,g:255,a:1},sliderArrowBgColor:{r:0,b:0,g:0,a:.8},mediaType:h.ALL,postOrder:y.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:p.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[v.LIKES_COMMENTS,v.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[S.PROFILE_PIC,S.BIO]},headerAccount:null,headerStyle:{desktop:O.NORMAL,phone:O.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:w.HEADER,phone:w.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:E.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=A,e.getFeedPromo=P,e.executeMediaClick=function(e,t){const o=A(e,t),n=m.a.getConfig(o),i=m.a.getType(o);return!(!i||!i.isValid(n)||"function"!=typeof i.onMediaClick)&&i.onMediaClick(e,n)},e.getLink=function(e,t){var o,n;const i=A(e,t),a=m.a.getConfig(i),r=m.a.getType(i);if(void 0===r||!r.isValid(a))return{text:null,url:null,newTab:!1};const[s,l]=r.getPopupLink?null!==(o=r.getPopupLink(e,a))&&void 0!==o?o:null:[null,!1];return{text:s,url:r.getMediaUrl&&null!==(n=r.getMediaUrl(e,a))&&void 0!==n?n:null,newTab:l,icon:"external"}}}(y||(y={}))},633:function(e,t,o){"use strict";o.r(t);var n=o(111),i=o(0),a=o.n(i),r=o(65),s=o(257),l=o(258);const c=n.a.tabs.find(e=>"connect"===e.id);c.groups=c.groups.filter(e=>!e.isFakePro),c.groups.push({id:"tagged",label:"Show posts where these accounts are tagged",fields:[{id:"tagged",component:Object(r.a)(({value:e,onChange:t})=>a.a.createElement(s.a,{value:e.tagged,onChange:e=>t({tagged:e})}),["accounts","tagged"])}]},{id:"hashtags",label:"Show posts with these hashtags",fields:[{id:"hashtags",component:Object(r.a)(({value:e,onChange:t})=>a.a.createElement(l.a,{value:e.hashtags,onChange:e=>t({hashtags:e})}),["accounts","hashtags"])}]});var u=o(32),d=o(84),h=o(77),p=o(420),m=o(72),f=o(6),g=o(92),b=o(182),y=f.a.LinkBehavior;function v(e){return!e.computed.showCaptions}const O=n.a.tabs.find(e=>"design"===e.id);O.groups=O.groups.filter(e=>!e.isFakePro);const S=O.groups.find(e=>"layouts"===e.id);S.fields.push({id:"highlight-freq",component:Object(u.a)({label:"Highlight every",option:"highlightFreq",deps:["layout"],when:e=>"highlight"===e.value.layout,render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:1,unit:"posts",placeholder:"1"})})}),S.fields.push({id:"slider-infinite",component:Object(u.a)({label:"Infinite loading",option:"sliderInfinite",deps:["layout"],when:e=>"slider"===e.value.layout,render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o}),tooltip:()=>a.a.createElement("span",null,"When this is enabled, the feed will load more posts when the slider reaches the end.")})}),S.fields.push({id:"slider-arrow-separator",component:Object(p.a)(e=>"slider"===e.value.layout)}),S.fields.push({id:"slider-arrow-pos",component:Object(u.a)({label:"Arrow positions",option:"sliderArrowPos",deps:["layout"],when:e=>"slider"===e.value.layout,render:(e,t,o)=>a.a.createElement(m.a,{id:e.field.id,value:t,onChange:e=>o(e.value),options:[{value:f.a.SliderArrowPosition.INSIDE,label:"Inside the slider"},{value:f.a.SliderArrowPosition.OUTSIDE,label:"Outside the slider"}]})})}),S.fields.push({id:"slider-arrow-size",component:Object(u.a)({label:"Arrow size",option:"sliderArrowSize",deps:["layout"],when:e=>"slider"===e.value.layout,render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:10,unit:"px"})})}),S.fields.push({id:"slider-arrow-color",component:Object(u.a)({label:"Arrow color",option:"sliderArrowColor",deps:["layout"],when:e=>"slider"===e.value.layout,render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})}),S.fields.push({id:"slider-arrow-bg-color",component:Object(u.a)({label:"Arrow background",option:"sliderArrowBgColor",deps:["layout"],when:e=>"slider"===e.value.layout,render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})});const w=O.groups.find(e=>"feed"===e.id);w.fields=w.fields.filter(e=>!e.isFakePro),w.fields.splice(1,0,{id:"media-type",component:Object(u.a)({label:"Types of posts",option:"mediaType",render:(e,t,o)=>a.a.createElement(m.a,{id:e.field.id,value:t,onChange:e=>o(e.value),options:[{value:f.a.MediaType.ALL,label:"All posts"},{value:f.a.MediaType.PHOTOS,label:"Photos Only"},{value:f.a.MediaType.VIDEOS,label:"Videos Only"}]})})});const E=O.groups.find(e=>"appearance"===e.id);{E.fields=E.fields.filter(e=>!e.isFakePro),E.fields.push({id:"hover-text-color",component:Object(u.a)({label:"Hover text color",option:"textColorHover",render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})},{id:"hover-bg-color",component:Object(u.a)({label:"Hover background color",option:"bgColorHover",render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})});const e=E.fields.find(e=>"hover-info"===e.id);e&&(e.data.options=e.data.options.map(e=>Object.assign(Object.assign({},e),{isFakePro:!1})))}const C=O.groups.find(e=>"header"===e.id);{C.fields=C.fields.filter(e=>!e.isFakePro),C.fields.splice(2,0,{id:"header-style",component:Object(u.a)({label:"Header style",option:"headerStyle",deps:["showHeader"],disabled:e=>Object(b.b)(e),render:(e,t,o)=>a.a.createElement(m.a,{id:e.field.id,value:t,onChange:e=>o(e.value),options:[{value:f.a.HeaderStyle.NORMAL,label:"Normal"},{value:f.a.HeaderStyle.CENTERED,label:"Centered"}]})})}),C.fields.push({id:"include-stories",component:Object(u.a)({label:"Include stories",option:"includeStories",deps:["showHeader"],disabled:e=>Object(b.b)(e),render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o}),tooltip:()=>a.a.createElement("span",null,"Re-shared stories are not available due to a restriction by Instagram.")})},{id:"stories-interval",component:Object(u.a)({label:"Stories interval time",option:"storiesInterval",deps:["includeStories","showHeader"],disabled:e=>function(e){return Object(b.b)(e)||!e.value.includeStories}(e),render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:1,unit:"sec"})})});const e=C.fields.find(e=>"header-info"===e.id);e&&(e.data.options=e.data.options.map(e=>Object.assign(Object.assign({},e),{isFakePro:!1})))}const _={id:"lightbox",label:"Popup box",fields:[{id:"show-lightbox-sidebar",component:Object(u.a)({label:"Show sidebar",option:"lightboxShowSidebar",deps:["linkBehavior"],disabled:({computed:e})=>e.linkBehavior!==y.LIGHTBOX,render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o})})},{id:"num-lightbox-comments",component:Object(u.a)({label:"Number of comments",option:"numLightboxComments",deps:["lightboxShowSidebar","linkBehavior"],disabled:({computed:e,value:t})=>e.linkBehavior!==y.LIGHTBOX||!t.lightboxShowSidebar,render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:0,placeholder:"No comments"}),tooltip:()=>a.a.createElement("span",null,"Comments are only available for posts from a ",a.a.createElement("strong",null,"Business")," account")})}]},A={id:"captions",label:"Captions",when:e=>Object(b.c)(e),fields:[{id:"show-captions",component:Object(u.a)({label:"Show captions",option:"showCaptions",render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o})})},{id:"caption-max-length",component:Object(u.a)({label:"Caption max length",option:"captionMaxLength",deps:["showCaptions"],disabled:e=>v(e),render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:0,unit:["word","words"],placeholder:"No limit"})})},{id:"caption-size",component:Object(u.a)({label:"Caption text size",option:"captionSize",deps:["showCaptions"],disabled:e=>v(e),render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:0,unit:"px",placeholder:"Theme default"})})},{id:"caption-color",component:Object(u.a)({label:"Caption text color",option:"captionColor",deps:["showCaptions"],disabled:e=>v(e),render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})},{id:"caption-remove-dots",component:Object(u.a)({label:"Remove dot lines",option:"captionRemoveDots",deps:["showCaptions"],disabled:e=>v(e),render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o}),tooltip:()=>a.a.createElement("span",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",a.a.createElement("code",null,"."),", ",a.a.createElement("code",null,"•"),", ",a.a.createElement("code",null,"*"),", etc.")})}]},P={id:"likes-comments",label:"Likes & Comments",when:e=>Object(b.c)(e),fields:[{id:"show-likes",component:Object(u.a)({label:"Show likes icon",option:"showLikes",render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o}),tooltip:()=>a.a.createElement("span",null,"Likes are not available for Personal accounts, due to restrictions set by Instagram.")})},{id:"likes-icon-color",component:Object(u.a)({label:"Likes icon color",option:"likesIconColor",deps:["showLikes"],disabled:e=>!e.computed.showLikes,render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})},{id:"show-comments",component:Object(u.a)({label:"Show comments icon",option:"showComments",render:(e,t,o)=>a.a.createElement(h.a,{id:e.field.id,value:t,onChange:o}),tooltip:()=>a.a.createElement("span",null,"Comments are not available for Personal accounts, due to restrictions set by Instagram.")})},{id:"comments-icon-color",component:Object(u.a)({label:"Comments icon color",option:"commentsIconColor",deps:["showComments"],disabled:e=>!e.computed.showComments,render:(e,t,o)=>a.a.createElement(g.a,{id:e.field.id,value:t,onChange:e=>o(e.rgb)})})},{id:"lcIconSize",component:Object(u.a)({label:"Icon size",option:"lcIconSize",deps:["showLikes","showComments"],disabled:e=>!e.computed.showLikes&&!e.computed.showComments,render:(e,t,o)=>a.a.createElement(d.a,{id:e.field.id,value:t,onChange:o,min:0,unit:"px"})})}]};O.groups.splice(4,0,_,A,P);var T=o(260),k=o(153),B=o(148),M=o(25),I=o(154),L=o(147);const x={id:"filters",label:"Filter",sidebar:T.a,groups:[{id:"caption-filters",label:"Caption filtering",fields:[{id:"caption-whitelist",component:Object(r.a)(({value:e,onChange:t,field:o})=>a.a.createElement(k.a,{label:"Only show posts with these words or phrases"},a.a.createElement(B.a,{id:o.id,value:e.captionWhitelist,onChange:e=>t({captionWhitelist:e}),exclude:M.c.values.captionBlacklist.concat(e.captionBlacklist),excludeMsg:"%s is already being used in the below option or your global filters"})),["captionWhitelist"])},{id:"caption-whitelist-settings",component:Object(r.a)(({value:e,onChange:t,feed:o})=>a.a.createElement(I.a,{value:e.captionWhitelistSettings,onChange:e=>t({captionWhitelistSettings:e}),feed:o}),["captionWhitelistSettings"])},{id:"caption-blacklist",component:Object(r.a)(({value:e,onChange:t,field:o})=>a.a.createElement(k.a,{label:"Hide posts with these words or phrases",bordered:!0},a.a.createElement(B.a,{id:o.id,value:e.captionBlacklist,onChange:e=>t({captionBlacklist:e}),exclude:M.c.values.captionWhitelist.concat(e.captionWhitelist),excludeMsg:"%s is already being used in the above option or your global filters"})),["captionBlacklist"])},{id:"caption-blacklist-settings",component:Object(r.a)(({value:e,onChange:t,feed:o})=>a.a.createElement(I.a,{value:e.captionBlacklistSettings,onChange:e=>t({captionBlacklistSettings:e}),feed:o}),["captionBlacklistSettings"])}]},{id:"hashtag-filters",label:"Hashtag filtering",fields:[{id:"hashtag-whitelist",component:Object(r.a)(({value:e,onChange:t,field:o})=>a.a.createElement(k.a,{label:"Only show posts with these hashtags"},a.a.createElement(L.a,{id:o.id,value:e.hashtagWhitelist,onChange:e=>t({hashtagWhitelist:e}),exclude:M.c.values.hashtagBlacklist.concat(e.hashtagBlacklist),excludeMsg:"The %s hashtag is already being used in the below option or your global filters"})),["hashtagWhitelist"])},{id:"hashtag-whitelist-settings",component:Object(r.a)(({value:e,onChange:t,feed:o})=>a.a.createElement(I.a,{value:e.hashtagWhitelistSettings,onChange:e=>t({hashtagWhitelistSettings:e}),feed:o}),["hashtagWhitelistSettings"])},{id:"hashtag-blacklist",component:Object(r.a)(({value:e,onChange:t,field:o})=>a.a.createElement(k.a,{label:"Hide posts with these hashtags",bordered:!0},a.a.createElement(L.a,{id:o.id,value:e.hashtagBlacklist,onChange:e=>t({hashtagBlacklist:e}),exclude:M.c.values.hashtagWhitelist.concat(e.hashtagWhitelist),excludeMsg:"The %s hashtag is already being used by the above option or your global filters"})),["hashtagBlacklist"])},{id:"hashtag-blacklist-settings",component:Object(r.a)(({value:e,onChange:t,feed:o})=>a.a.createElement(I.a,{value:e.hashtagBlacklistSettings,onChange:e=>t({hashtagBlacklistSettings:e}),feed:o}),["hashtagBlacklistSettings"])}]}]},j={id:"moderate",label:"Moderate",component:o(266).a},N={id:"promote",label:"Promote",component:o(267).a};n.a.tabs=n.a.tabs.filter(e=>!e.isFakePro),n.a.openGroups.push("caption-filters","hashtag-filters");const D=n.a.tabs.findIndex(e=>"embed"===e.id);D<0?n.a.tabs.push(x,j,N):n.a.tabs.splice(D,0,x,j,N)},64:function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}));const n=(e,t)=>e.startsWith(t)?e:t+e,i=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},68:function(e,t,o){"use strict";function n(e){return t=>(t.stopPropagation(),e(t))}function i(e,t){let o;return(...n)=>{clearTimeout(o),o=setTimeout(()=>{o=null,e(...n)},t)}}o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return i}))},69:function(e,t,o){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}},73:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},74:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var n=o(0),i=o.n(n),a=o(100),r=o.n(a),s=o(3),l=o(10);function c(e){var{account:t,square:o,className:n}=e,a=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}(e,["account","square","className"]);const c=s.b.getProfilePicUrl(t),u=Object(l.b)(o?r.a.square:r.a.round,n);return i.a.createElement("img",Object.assign({},a,{className:u,src:s.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}},8:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(0),i=o.n(n),a=o(10);const r=e=>{var{icon:t,className:o}=e,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}(e,["icon","className"]);return i.a.createElement("span",Object.assign({className:Object(a.b)("dashicons","dashicons-"+t,o)},n))}},82:function(e,t,o){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},96:function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),function(e){e.returnTrue=()=>!0,e.returnFalse=()=>!0,e.noop=()=>{},e.provide=function(e){return()=>e}}(n||(n={}))},97:function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),function(e){const t=[];e.trigger=function(e){if(0===t.length)throw e;t.forEach(t=>t(e))},e.addHandler=function(e){t.push(e)}}(n||(n={}))}},[[633,0,1,2,3]]])}));
ui/dist/editor.js CHANGED
@@ -1 +1 @@
1
- (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[3],{105:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(180),r=a.n(l),i=a(123),c=a(95);function s({id:e,label:t,children:a,wide:n,disabled:l,isFakePro:s}){const d=Array.isArray(a)?a[0]:a,u=Array.isArray(a)?a[1]:void 0;return o.a.createElement("div",{className:l||s?r.a.disabled:n?r.a.wide:r.a.container},o.a.createElement("div",{className:r.a.label},o.a.createElement("div",{className:r.a.labelAligner},o.a.createElement("label",{htmlFor:e},t),u&&o.a.createElement(i.a,null,u))),o.a.createElement("div",{className:r.a.content},d),s&&o.a.createElement(c.a,{className:r.a.proPill}))}},107:function(e,t,a){e.exports={root:"FeedPreview__root","shrunk-root":"FeedPreview__shrunk-root FeedPreview__root",shrunkRoot:"FeedPreview__shrunk-root FeedPreview__root","status-bar":"FeedPreview__status-bar",statusBar:"FeedPreview__status-bar","status-indicator":"FeedPreview__status-indicator",statusIndicator:"FeedPreview__status-indicator",reset:"FeedPreview__reset",container:"FeedPreview__container","no-posts-msg":"FeedPreview__no-posts-msg",noPostsMsg:"FeedPreview__no-posts-msg",indicators:"FeedPreview__indicators","waiting-indicator":"FeedPreview__waiting-indicator",waitingIndicator:"FeedPreview__waiting-indicator","loading-indicator":"FeedPreview__loading-indicator",loadingIndicator:"FeedPreview__loading-indicator",sizer:"FeedPreview__sizer","shrunk-sizer":"FeedPreview__shrunk-sizer FeedPreview__sizer",shrunkSizer:"FeedPreview__shrunk-sizer FeedPreview__sizer","tablet-sizer":"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",tabletSizer:"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer","phone-sizer":"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",phoneSizer:"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",onboarding:"FeedPreview__onboarding","no-break":"FeedPreview__no-break",noBreak:"FeedPreview__no-break","preview-device":"FeedPreview__preview-device",previewDevice:"FeedPreview__preview-device","indicator-dash":"FeedPreview__indicator-dash",indicatorDash:"FeedPreview__indicator-dash","indicator-text":"FeedPreview__indicator-text",indicatorText:"FeedPreview__indicator-text","indicator-animation":"FeedPreview__indicator-animation",indicatorAnimation:"FeedPreview__indicator-animation","loading-animation":"FeedPreview__loading-animation",loadingAnimation:"FeedPreview__loading-animation"}},120:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(312),r=a.n(l),i=a(3),c=a(125),s=a(199),d=a(390),u=a.n(d),m=a(2),p=a(107),b=a.n(p),h=a(391),g=a(9),f=a(8);function E(e){return o.a.createElement("div",{className:b.a.previewDevice},o.a.createElement("span",null,"Preview device"),o.a.createElement(h.a,null,m.a.MODES.map((t,a)=>o.a.createElement(g.a,{key:a,type:g.c.TOGGLE,onClick:()=>e.onChangeDevice(t),active:e.previewDevice===t,tooltip:t.name},o.a.createElement(f.a,{icon:t.icon})))))}var v=a(67),_=a(247),w=a(248),y=a(249),k=[{id:"accounts",label:"Show posts from these accounts",fields:[{id:"accounts",component:Object(v.a)(({value:e,onChange:t})=>o.a.createElement(_.a,{value:e.accounts,onChange:e=>t({accounts:e})}),["accounts"])}]},{id:"tagged",label:"Show posts where these accounts are tagged",isFakePro:!0,fields:[{id:"tagged",component:Object(v.a)(()=>o.a.createElement(w.a,{value:[]}),["accounts","tagged"])}]},{id:"hashtags",label:"Show posts with these hashtags",isFakePro:!0,fields:[{id:"hashtags",component:Object(v.a)(()=>o.a.createElement(y.a,{value:[]}),["accounts","hashtags"])}]}],C=a(202),P=a(152),O=a(146),S=a(153),F=a(145),N=[{id:"caption-filters",label:"Caption filtering",isFakePro:!0,fields:[{id:"caption-whitelist",component:Object(v.a)(({field:e})=>o.a.createElement(P.a,{label:"Only show posts with these words or phrases"},o.a.createElement(O.a,{id:e.id,value:[]})))},{id:"caption-whitelist-settings",component:Object(v.a)(()=>o.a.createElement(S.a,{value:!0}))},{id:"caption-blacklist",component:Object(v.a)(({field:e})=>o.a.createElement(P.a,{label:"Hide posts with these words or phrases",bordered:!0},o.a.createElement(O.a,{id:e.id,value:[]})))},{id:"caption-blacklist-settings",component:Object(v.a)(()=>o.a.createElement(S.a,{value:!0}))}]},{id:"hashtag-filters",label:"Hashtag filtering",isFakePro:!0,fields:[{id:"hashtag-whitelist",component:Object(v.a)(({field:e})=>o.a.createElement(P.a,{label:"Only show posts with these hashtags"},o.a.createElement(F.a,{id:e.id,value:[]})))},{id:"hashtag-whitelist-settings",component:Object(v.a)(()=>o.a.createElement(S.a,{value:!0}))},{id:"hashtag-blacklist",component:Object(v.a)(({field:e})=>o.a.createElement(P.a,{label:"Hide posts with these hashtags",bordered:!0},o.a.createElement(F.a,{id:e.id,value:[]})))},{id:"hashtag-blacklist-settings",component:Object(v.a)(()=>o.a.createElement(S.a,{value:!0}))}]}],T=a(251),x=a(257),I=a(258),j=[{id:"connect",label:"Connect",alwaysEnabled:!0,groups:k,sidebar:function(e){const[,t]=o.a.useState(0);return i.b.hasAccounts()?o.a.createElement("div",{className:r.a.connectSidebar},o.a.createElement("div",{className:r.a.connectButton},o.a.createElement(c.a,{onConnect:a=>{e.onChange&&e.onChange({accounts:e.value.accounts.concat([a])}),t(e=>e++)}})),o.a.createElement(s.a,Object.assign({groups:e.tab.groups},e))):null}},{id:"design",label:"Design",groups:C.a,sidebar:function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:u.a.previewOptions},o.a.createElement(E,Object.assign({},e))),o.a.createElement(s.a,Object.assign({groups:e.tab.groups},e)))}},{id:"filter",label:"Filter",isFakePro:!0,groups:N,sidebar:T.a},{id:"moderate",label:"Moderate",isFakePro:!0,groups:N,component:x.a},{id:"promote",label:"Promote",isFakePro:!0,component:I.a}];t.a={tabs:j,openGroups:["accounts","tagged","hashtags","layouts","feed"],showDoneBtn:!0,showCancelBtn:!1,showNameField:!1,isDoneBtnEnabled:!0,isCancelBtnEnabled:!0,doneBtnText:"Done",cancelBtnText:"Cancel"}},135:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(263),r=a(116),i=a(80),c=a(19);const s=({onConnect:e,beforeConnect:t,isTransitioning:a})=>o.a.createElement(r.a,{className:"accounts-onboarding",isTransitioning:a},o.a.createElement("div",{className:"accounts-onboarding__left"},o.a.createElement("h1",null,"Let's connect your Instagram account"),o.a.createElement("p",{className:"accounts-onboarding__first-msg"},"If you're unsure which button applies to you, it's most likely a ",o.a.createElement("strong",null,"Personal")," account."," ","Try that first."),o.a.createElement("div",{className:"accounts-onboarding__spacer"}),o.a.createElement(i.a,{label:"Upgrade to an Instagram Business account for free",stealth:!0},o.a.createElement("p",null,"Business accounts get additional API features that give you more control over your feeds in "," ","Spotlight, especially with ",o.a.createElement("strong",null,"PRO"),"."),o.a.createElement("p",null,"Plus, they get access to ",o.a.createElement("strong",null,"more cool stuff")," within Instagram itself, such as "," ","analytics."),o.a.createElement("p",null,o.a.createElement("a",{href:c.a.resources.businessAccounts,target:"_blank",className:"accounts-onboarding__learn-more-business"},"Learn more")))),o.a.createElement("div",null,o.a.createElement(l.a,{beforeConnect:e=>t&&t(e),onConnect:t=>e&&e(t),useColumns:!0,showPrompt:!1})))},152:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),l=a(268),r=a.n(l);function i({children:e,label:t,bordered:a}){const n=a?r.a.bordered:r.a.filterField;return o.a.createElement("div",{className:n},o.a.createElement("span",{className:r.a.label},t),e)}},153:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(269),r=a.n(l),i=a(9),c=a(398);function s({id:e,value:t,onChange:a,feed:n}){const[l,s]=o.a.useState(!1);return o.a.createElement("div",{className:r.a.incGlobalFilters},o.a.createElement("label",{className:r.a.label},o.a.createElement("div",{className:r.a.field},o.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:t,onChange:e=>a&&a(e.target.checked)}),o.a.createElement("span",null,"Include global filters")),o.a.createElement(i.a,{type:i.c.LINK,size:i.b.SMALL,onClick:()=>s(!0)},"Edit global filters"),o.a.createElement(c.a,{isOpen:l,onClose:()=>s(!1),onSave:()=>n&&n.reload()})))}},155:function(e,t,a){e.exports={root:"AccountSelector__root",row:"AccountSelector__row",account:"AccountSelector__account button__toggle-button button__panel-button theme__panel","account-selected":"AccountSelector__account-selected AccountSelector__account button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel",accountSelected:"AccountSelector__account-selected AccountSelector__account button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel","profile-pic":"AccountSelector__profile-pic",profilePic:"AccountSelector__profile-pic","info-column":"AccountSelector__info-column",infoColumn:"AccountSelector__info-column","info-text":"AccountSelector__info-text",infoText:"AccountSelector__info-text",username:"AccountSelector__username AccountSelector__info-text","account-type":"AccountSelector__account-type AccountSelector__info-text",accountType:"AccountSelector__account-type AccountSelector__info-text","tick-icon":"AccountSelector__tick-icon",tickIcon:"AccountSelector__tick-icon"}},157:function(e,t,a){e.exports={"embed-sidebar":"EmbedSidebar__embed-sidebar",embedSidebar:"EmbedSidebar__embed-sidebar","save-message":"EmbedSidebar__save-message",saveMessage:"EmbedSidebar__save-message",shortcode:"EmbedSidebar__shortcode",example:"EmbedSidebar__example",caption:"EmbedSidebar__caption","example-annotation":"EmbedSidebar__example-annotation",exampleAnnotation:"EmbedSidebar__example-annotation",instances:"EmbedSidebar__instances",pro:"EmbedSidebar__pro"}},179:function(e,t,a){e.exports={root:"LayoutSelector__root",layout:"LayoutSelector__layout button__toggle-button button__panel-button theme__panel","layout-selected":"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel",layoutSelected:"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel","layout-disabled":"LayoutSelector__layout-disabled LayoutSelector__layout button__toggle-button button__panel-button theme__panel",layoutDisabled:"LayoutSelector__layout-disabled LayoutSelector__layout button__toggle-button button__panel-button theme__panel","pro-overlay":"LayoutSelector__pro-overlay",proOverlay:"LayoutSelector__pro-overlay","coming-soon":"LayoutSelector__coming-soon ProPill__pill",comingSoon:"LayoutSelector__coming-soon ProPill__pill"}},180:function(e,t,a){e.exports={container:"EditorFieldRow__container",wide:"EditorFieldRow__wide EditorFieldRow__container",label:"EditorFieldRow__label",content:"EditorFieldRow__content","label-aligner":"EditorFieldRow__label-aligner",labelAligner:"EditorFieldRow__label-aligner",disabled:"EditorFieldRow__disabled EditorFieldRow__container","pro-pill":"EditorFieldRow__pro-pill",proPill:"EditorFieldRow__pro-pill"}},196:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(207),r=a.n(l),i=a(7),c=a(400),s=a(18);t.a=Object(i.b)((function({feed:e,media:t,store:a,selected:l,disabled:i,autoFocusFirst:u,onClickMedia:m,onSelectMedia:p,children:b}){i=null!=i&&i,u=null!=u&&u;const h=a&&e&&a.hasCache(e)||void 0!==t&&t.length>0,[g,f]=o.a.useState(null!=t?t:[]),[E,v]=o.a.useState(!h),[_,w,y]=Object(s.f)(l),k=o.a.useRef(),C=o.a.useRef(),P=o.a.useRef();function O(e){f(e),v(!1),e.length>0&&u&&p&&p(e[0],0)}Object(n.useEffect)(()=>{y(l)},[l]),Object(s.j)(n=>{a?a.fetchMedia(e).then(e=>n().then(()=>O(e))):t&&O(t)},[a,t]);const S=e=>{null===w()||e.target!==k.current&&e.target!==C.current||F(null)};function F(e){i||(N(e),m&&m(g[e],e))}function N(e){e===w()||i||(p&&p(g[e],e),y(e))}Object(n.useLayoutEffect)(()=>{if(k.current)return k.current.addEventListener("click",S),()=>k.current.removeEventListener("click",S)},[k.current]);const T=i?r.a.gridDisabled:r.a.grid;return o.a.createElement("div",{ref:k,className:r.a.root},o.a.createElement("div",{ref:C,className:T,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(i)return;const t=w(),a=function(){const e=C.current.getBoundingClientRect(),t=P.current.getBoundingClientRect(),a=e.width,n=t.width;return Math.floor((a+15)/(n+15))}(),n=Math.ceil(g.length/a);switch(e.key){case" ":case"Enter":F(t);break;case"ArrowLeft":N(Math.max(t-1,0));break;case"ArrowRight":N(Math.min(t+1,g.length-1));break;case"ArrowUp":{const e=Math.max(0,t-a),o=Math.floor(t/a),l=Math.floor(e/a);n>1&&l!==o&&N(e);break}case"ArrowDown":{const e=Math.min(g.length-1,t+a),o=Math.floor(t/a),l=Math.floor(e/a);n>1&&l!==o&&N(e);break}default:return}e.preventDefault(),e.stopPropagation()}},g.map((e,t)=>o.a.createElement(d,{key:e.id,ref:0===t?P:null,focused:!i&&_===t,onClick:()=>F(t),onFocus:()=>N(t)},b(e,t)))),E&&o.a.createElement("div",{className:r.a.loading},o.a.createElement(c.a,{size:60})))}));const d=o.a.forwardRef(({focused:e,onClick:t,onFocus:a,children:l},i)=>(i||(i=o.a.useRef()),Object(n.useEffect)(()=>{e&&i.current.focus()},[e]),o.a.createElement("div",{ref:i,className:r.a.item,onClick:t,onFocus:a,tabIndex:0},l)))},198:function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),o=a.n(n),l=a(318),r=a.n(l),i=a(253),c=a(9),s=a(19);function d({}){return o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Spotlight’s ‘Promote’ feature has lots more to come. Share your thoughts on what you’d like to"," ","promote and how."),o.a.createElement("p",null,"Take our 2-minute survey."),o.a.createElement("div",null,o.a.createElement(c.a,{type:c.c.PRIMARY,size:c.b.LARGE,onClick:function(){window.open(s.a.resources.promoTypesSurvey)}},"Start Survey")))}var u=new Map([["link",{heading:"Link options",fields:i.a,tutorial:function({}){return o.a.createElement(o.a.Fragment,null,o.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),o.a.createElement("ol",{style:{marginTop:0}},o.a.createElement("li",null,"Select a post from the preview on the left."),o.a.createElement("li",null,"Choose what the post should link to.")),o.a.createElement("p",null,"That’s it!"))}}],["-more-",{heading:"Have your say...",fields:d,tutorial:d}]]),m=a(80),p=a(35),b=a(31);function h({hasGlobal:e,hasAuto:t,isOverriding:a,onOverride:n}){return o.a.createElement(o.a.Fragment,null,o.a.createElement(p.a,{type:p.b.WARNING,showIcon:!0},o.a.createElement("span",null,"You have")," ",t&&o.a.createElement("a",{href:b.a.at({screen:"promotions",tab:"automate"}),target:"_blank"},"automated"),t&&e&&o.a.createElement(o.a.Fragment,null," ",o.a.createElement("span",null,"and")," "),e&&o.a.createElement("a",{href:b.a.at({screen:"promotions",tab:"global"}),target:"_blank"},"global")," ",o.a.createElement("span",null,"promotions that apply to this post.")," ",a?o.a.createElement("span",null,"To stop overriding, simply remove the custom promotion."):o.a.createElement("span",null,"Click the button below to use a custom promotion instead.")),!a&&o.a.createElement(c.a,{onClick:n},"Override"))}var g=a(4),f=a(89);function E({type:e,config:t,hasGlobal:a,hasAuto:l,showTutorial:i,showNextBtn:s,isNextBtnDisabled:d,hideRemove:p,onNext:b,onChange:E}){var v,_;const[w,y]=Object(n.useState)(!1),[k,C]=Object(n.useState)(!1),P=Object(n.useCallback)(()=>C(!0),[C]),O=Object(n.useCallback)(()=>C(!1),[C]),S=Object(n.useCallback)(()=>{y(!0),E&&E({})},[e,E]),F=!Object(g.k)(t),N=a||l,T=N&&(F||w),x=null!==(v=u.get(e?e.id:""))&&void 0!==v?v:{heading:"",fields:void 0,tutorial:void 0};return o.a.createElement(o.a.Fragment,null,o.a.createElement(m.a,{label:null!==(_=x.heading)&&void 0!==_?_:"Promotion options",fitted:!0,isOpen:!0,showIcon:!1},N&&o.a.createElement(h,{hasAuto:l,hasGlobal:a,isOverriding:T,onOverride:S}),T&&o.a.createElement("hr",null),(!N||T)&&!i&&x.fields&&o.a.createElement(x.fields,{config:null!=t?t:{},onChange:E}),i&&x.tutorial&&o.a.createElement(x.tutorial,null)),o.a.createElement("div",{className:r.a.bottom},s&&o.a.createElement(c.a,{size:c.b.LARGE,onClick:b,disabled:d},"Promote next post →"),(F||T)&&!p&&o.a.createElement("a",{className:r.a.removePromo,onClick:P},"Remove promotion")),o.a.createElement(f.a,{isOpen:k,title:"Are you sure?",buttons:["Yes, I'm sure","No, keep it"],onCancel:O,onAccept:()=>{E&&E({}),y(!1),C(!1)}},o.a.createElement("p",null,"Are you sure you want to remove this promotion? This ",o.a.createElement("strong",null,"cannot")," be undone!")))}},199:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),o=a.n(n),l=a(387),r=a.n(l),i=a(313),c=a.n(i),s=a(80),d=a(56),u=a(15),m=a(246);function p(e){const{group:t,showFakeOptions:a}=e,[n,l]=o.a.useState(e.openGroups.includes(t.id)),r=o.a.useCallback(()=>{l(e=>!e)},[n]),i=t.isFakePro?o.a.createElement(m.a,null,t.label):t.label;return!t.isFakePro||a||u.a.isPro?o.a.createElement(s.a,{className:t.isFakePro&&!u.a.isPro?c.a.disabled:c.a.spoiler,label:i,isOpen:n,onClick:r,scrollIntoView:!0,fitted:!0},t.fields.map(n=>{const l=Object.assign({},e);if(t.isFakePro||n.isFakePro){if(!a)return null;l.onChange=d.b}return o.a.createElement(n.component,Object.assign({key:n.id,field:n},e))})):null}function b(e){var{groups:t}=e,a=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["groups"]);return o.a.createElement("div",{className:r.a.fieldGroupList},t.map(e=>o.a.createElement(p,Object.assign({key:e.id,group:e},a))))}},201:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n);function l({id:e,value:t,onChange:a,placeholder:n}){return o.a.createElement("input",{id:e,type:"text",value:t,onChange:e=>a(e.target.value),placeholder:n})}a(378)},202:function(e,t,a){"use strict";a.d(t,"b",(function(){return T}));var n=a(0),o=a.n(n),l=a(67),r=a(179),i=a.n(r),c=a(40),s=a(15),d=a(95);function u({value:e,onChange:t,layouts:a,showPro:n}){return a=null!=a?a:c.a.list,o.a.createElement("div",{className:i.a.root},a.map(a=>(!a.isPro||s.a.isPro||n)&&o.a.createElement(m,{key:a.id,layout:a,onClick:t,isSelected:e===a.id})))}function m({layout:e,isSelected:t,onClick:a}){const n=e.isPro&&!s.a.isPro,l=e.isComingSoon||n,r=l?i.a.layoutDisabled:t?i.a.layoutSelected:i.a.layout;return o.a.createElement("div",{className:r,role:"button",tabIndex:l?void 0:0,onClick:l?void 0:()=>a(e.id),onKeyPress:l?void 0:()=>a(e.id)},o.a.createElement("span",null,e.name),o.a.createElement(e.iconComponent,null),n&&!e.isComingSoon&&o.a.createElement("div",{className:i.a.proOverlay},o.a.createElement(d.a,null)),e.isComingSoon&&o.a.createElement("div",{className:i.a.proOverlay},o.a.createElement("div",{className:i.a.comingSoon},"COMING SOON",!s.a.isPro&&" TO PRO")))}var p=a(6),b=a(74),h=a(84),g=a(2),f=a(101),E=a(223),v=a(35),_=a(83),w=a(3),y=a(133),k=a(9);a(572);const C=({id:e,title:t,mediaType:a,button:n,buttonSet:l,buttonChange:r,value:i,onChange:c})=>{l=void 0===n?l:n,r=void 0===n?r:n;const s=!!i,d=s?r:l,u=()=>{c&&c("")};return o.a.createElement(y.a,{id:e,title:t,mediaType:a,button:d,value:i,onSelect:e=>{c&&c(e.attributes.url)}},({open:e})=>o.a.createElement("div",{className:"wp-media-field"},s&&o.a.createElement("div",{className:"wp-media-field__preview",tabIndex:0,onClick:e,role:"button"},o.a.createElement("img",{src:i,alt:"Custom profile picture"})),o.a.createElement(k.a,{className:"wp-media-field__select-btn",type:k.c.SECONDARY,onClick:e},d),s&&o.a.createElement(k.a,{className:"wp-media-field__remove-btn",type:k.c.DANGER_LINK,onClick:u},"Remove custom photo")))};function P({id:e,value:t,onChange:a}){return o.a.createElement("textarea",{id:e,value:t,onChange:e=>a(e.target.value)})}var O=a(201),S=a(34),F=p.a.FollowBtnLocation,N=p.a.HeaderInfo;function T(e){return!e.computed.showHeader}function x(e,t){return T(t)||!t.computed.headerInfo.includes(e)}function I(e){return 0===e.value.accounts.length&&0===e.value.tagged.length&&e.value.hashtags.length>0}function j(e){return!e.computed.showFollowBtn}function M(e){return!e.computed.showLoadMoreBtn}t.a=[{id:"layouts",label:"Layout",fields:[{id:"layout",component:Object(l.a)(({value:e,onChange:t,showFakeOptions:a})=>o.a.createElement(u,{value:e.layout,onChange:e=>t({layout:e}),showPro:a}),["layout"])},{id:"num-columns",component:Object(S.a)({label:"Number of columns",option:"numColumns",deps:["layout"],when:e=>["grid","highlight","masonry"].includes(e.value.layout),render:(e,t,a)=>{const n=e.previewDevice===g.a.Mode.DESKTOP;return o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:n?1:0,placeholder:n?"1":e.value.numColumns.desktop})}})}]},{id:"feed",label:"Feed",fields:[{id:"num-posts",component:Object(S.a)({label:"Number of posts",option:"numPosts",render:(e,t,a)=>{const n=e.previewDevice===g.a.Mode.DESKTOP;return o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:1,placeholder:n?"1":e.value.numPosts.desktop})}})},{id:"post-order",component:Object(S.a)({label:"Post order",option:"postOrder",render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:p.a.PostOrder.DATE_DESC,label:"Most recent first"},{value:p.a.PostOrder.DATE_ASC,label:"Oldest first"},{value:p.a.PostOrder.POPULARITY_DESC,label:"Most popular first"},{value:p.a.PostOrder.POPULARITY_ASC,label:"Least popular first"},{value:p.a.PostOrder.RANDOM,label:"Random"}]}),tooltip:()=>o.a.createElement("span",null,o.a.createElement("b",null,"Most popular first")," and ",o.a.createElement("b",null,"Least popular first")," sorting does not work for posts from Personal accounts because Instagram does not provide the number of likes and comments for those posts.")})},{id:"media-type",isFakePro:!0,component:Object(S.a)({label:"Types of posts",option:"mediaType",render:e=>o.a.createElement(b.a,{id:e.field.id,value:p.a.MediaType.ALL,options:[{value:p.a.MediaType.ALL,label:"All posts"},{value:p.a.MediaType.PHOTOS,label:"Photos Only"},{value:p.a.MediaType.VIDEOS,label:"Videos Only"}]})})},{id:"link-behavior",component:Object(S.a)({label:"Open posts in",option:"linkBehavior",render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:p.a.LinkBehavior.NOTHING,label:"- Do not open -"},{value:p.a.LinkBehavior.SELF,label:"Same tab"},{value:p.a.LinkBehavior.NEW_TAB,label:"New tab"},{value:p.a.LinkBehavior.LIGHTBOX,label:"Popup box"}]})})}]},{id:"appearance",label:"Appearance",fields:[{id:"feed-width",component:Object(S.a)({label:"Feed width",option:"feedWidth",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",emptyMin:!0,placeholder:"Auto"})})},{id:"feed-height",component:Object(S.a)({label:"Feed height",option:"feedHeight",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",emptyMin:!0,placeholder:"Auto"})})},{id:"feed-padding",component:Object(S.a)({label:"Outside padding",option:"feedPadding",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"image-padding",component:Object(S.a)({label:"Image padding",option:"imgPadding",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"text-size",component:Object(S.a)({label:"Text size",option:"textSize",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"Theme default"}),tooltip:()=>o.a.createElement("span",null,"If left empty, the text size will be controlled by your theme."," ",'This option will be ignored for the header if the "Text size" option in the'," ",'"Header" section is not empty.')})},{id:"bg-color",component:Object(S.a)({label:"Background color",option:"bgColor",render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"hover-info",component:Object(S.a)({label:"Show on hover",option:"hoverInfo",render:(e,t,a)=>o.a.createElement(E.a,{id:e.field.id,value:t,onChange:a,showProOptions:e.showFakeOptions,options:e.field.data.options})}),data:{options:[{value:p.a.HoverInfo.LIKES_COMMENTS,label:"Likes & comments",tooltip:"Not available for posts from personal accounts due to a restriction by Instagram."},{value:p.a.HoverInfo.INSTA_LINK,label:"Instagram link"},{value:p.a.HoverInfo.CAPTION,label:"Caption",isFakePro:!0},{value:p.a.HoverInfo.USERNAME,label:"Username",isFakePro:!0,tooltip:"Not available for hashtag posts due to a restriction by Instagram."},{value:p.a.HoverInfo.DATE,label:"Date",isFakePro:!0}]}},{id:"hover-text-color",isFakePro:!0,component:Object(S.a)({label:"Hover text color",option:"textColorHover",render:e=>o.a.createElement(f.a,{id:e.field.id})})},{id:"hover-bg-color",isFakePro:!0,component:Object(S.a)({label:"Hover background color",option:"bgColorHover",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:.5}})})}]},{id:"header",label:"Header",fields:[{id:"header-hashtag-msg",component:Object(l.a)(e=>I(e)&&o.a.createElement(v.a,{type:v.b.INFO,showIcon:!0,shake:!0},"The header is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to show in the header."))},{id:"show-header",component:Object(S.a)({label:"Show header",option:"showHeader",disabled:e=>I(e),render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"header-style",isFakePro:!0,component:Object(S.a)({label:"Header style",option:"headerStyle",render:e=>o.a.createElement(b.a,{id:e.field.id,value:p.a.HeaderStyle.NORMAL,options:[{value:p.a.HeaderStyle.NORMAL,label:"Normal"},{value:p.a.HeaderStyle.CENTERED,label:"Centered"}]})})},{id:"header-account",component:Object(S.a)({label:"Account to show",option:"headerAccount",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:e.computed.account?e.computed.account.id:"",onChange:e=>a(e.value),options:e.computed.allAccounts.map(e=>({value:e,label:w.b.getById(e).username}))})})},{id:"header-info",component:Object(S.a)({label:"Show",option:"headerInfo",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(E.a,{id:e.field.id,value:t,onChange:a,options:e.field.data.options})}),data:{options:[{value:p.a.HeaderInfo.PROFILE_PIC,label:"Profile photo"},{value:p.a.HeaderInfo.BIO,label:"Profile bio text"},{value:N.MEDIA_COUNT,label:"Post count",isFakePro:!0},{value:N.FOLLOWERS,label:"Follower count",tooltip:"Not available for Personal accounts due to restrictions set by Instagram.",isFakePro:!0}]}},{id:"header-photo-size",component:Object(S.a)({label:"Profile photo size",option:"headerPhotoSize",deps:["showHeader","headerInfo"],disabled:e=>x(N.PROFILE_PIC,e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:null!=t?t:"",onChange:a,min:0,unit:"px",placeholder:"Default"})})},{id:"custom-profile-pic",component:Object(S.a)({label:"Custom profile pic",option:"customProfilePic",deps:["showHeader","headerInfo"],disabled:e=>x(N.PROFILE_PIC,e),render:(e,t,a)=>o.a.createElement(C,{id:e.field.id,value:t,onChange:a,title:"Select custom profile photo",buttonSet:"Choose custom photo",buttonChange:"Change custom photo",mediaType:"image"}),tooltip:()=>o.a.createElement("span",null,"Add a custom profile photo just for this feed. It will override the original"," ","profile photo from Instagram and any custom profile photo added in Spotlight.")})},{id:"custom-bio-text",component:Object(S.a)({label:"Custom bio text",option:"customBioText",deps:["headerInfo","showHeader"],disabled:e=>x(N.BIO,e),render:(e,t,a)=>o.a.createElement(P,{id:e.field.id,value:t,onChange:a}),tooltip:()=>o.a.createElement("span",null,"Add a custom bio text just for this feed. It will override the original custom bio"," ","text from Instagram and any custom bio text added in Spotlight.")})},{id:"header-text-size",component:Object(S.a)({label:"Header text size",option:"headerTextSize",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:null!=t?t:"",onChange:a,min:0,unit:"px",placeholder:"Default"}),tooltip:()=>o.a.createElement("span",null,'If left empty, the "Text size" option in the "Appearance" section will control the'," ","header's text size.")})},{id:"header-text-color",component:Object(S.a)({label:"Header text color",option:"headerTextColor",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"header-bg-color",component:Object(S.a)({label:"Header background color",option:"headerBgColor",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"header-padding",component:Object(S.a)({label:"Header padding",option:"headerPadding",deps:["showHeader"],disabled:e=>T(e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"include-stories",isFakePro:!0,component:Object(S.a)({label:"Include stories",option:"includeStories",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!0}),tooltip:()=>o.a.createElement("span",null,"Re-shared stories are not available due to a restriction by Instagram.")})},{id:"stories-interval",isFakePro:!0,component:Object(S.a)({label:"Stories interval time",option:"storiesInterval",render:e=>o.a.createElement(h.a,{id:e.field.id,value:5,min:1,unit:"sec"})})}]},{id:"lightbox",label:"Popup box",isFakePro:!0,fields:[{id:"show-lightbox-sidebar",component:Object(S.a)({label:"Show sidebar",option:"lightboxShowSidebar",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"num-lightbox-comments",label:"Number of comments",component:Object(S.a)({label:"Number of comments",option:"numLightboxComments",render:e=>o.a.createElement(h.a,{id:e.field.id,value:20,min:0,placeholder:"No comments"}),tooltip:()=>o.a.createElement("span",null,"Comments are only available for posts from a ",o.a.createElement("strong",null,"Business")," account")})}]},{id:"captions",label:"Captions",isFakePro:!0,fields:[{id:"show-captions",component:Object(S.a)({label:"Show captions",option:"showCaptions",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!0})})},{id:"caption-max-length",component:Object(S.a)({label:"Caption max length",option:"captionMaxLength",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:"words",placeholder:"No limit"})})},{id:"caption-size",component:Object(S.a)({label:"Caption text size",option:"captionSize",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:"px",placeholder:"Theme default"})})},{id:"caption-color",component:Object(S.a)({label:"Caption text color",option:"captionColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:0}})})},{id:"caption-remove-dots",component:Object(S.a)({label:"Remove dot lines",option:"captionRemoveDots",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1}),tooltip:()=>o.a.createElement("span",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",o.a.createElement("code",null,"."),", ",o.a.createElement("code",null,"•"),", ",o.a.createElement("code",null,"*"),", etc.")})}]},{id:"likes-comments",label:"Likes & Comments",isFakePro:!0,fields:[{id:"show-likes",component:Object(S.a)({label:"Show likes icon",option:"showLikes",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"likes-icon-color",component:Object(S.a)({label:"Likes icon color",option:"likesIconColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:1}})})},{id:"show-comments",component:Object(S.a)({label:"Show comments icon",option:"showComments",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"comments-icon-color",component:Object(S.a)({label:"Comments icon color",option:"commentsIconColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:1}})})},{id:"lcIconSize",component:Object(S.a)({label:"Icon size",option:"lcIconSize",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:"px"})})}]},{id:"follow-btn",label:"Follow button",fields:[{id:"follow-btn-hashtag-msg",component:Object(l.a)(e=>I(e)&&o.a.createElement(v.a,{type:v.b.INFO,showIcon:!0,shake:!0},"The follow button is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to follow."))},{id:"show-follow-btn",component:Object(S.a)({label:"Show 'Follow' button",option:"showFollowBtn",disabled:e=>I(e),render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"follow-btn-location",component:Object(S.a)({label:"Location",option:"followBtnLocation",deps:["showFollowBtn"],disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:F.HEADER,label:"Header"},{value:F.BOTTOM,label:"Bottom"},{value:F.BOTH,label:"Both"}]})})},{id:"follow-btn-text",component:Object(S.a)({label:"'Follow' text",option:"followBtnText",deps:["showFollowBtn"],disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(O.a,{id:e.field.id,value:t,onChange:a})})},{id:"follow-btn-text-color",component:Object(S.a)({label:"Text color",option:"followBtnTextColor",deps:["showFollowBtn"],disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"follow-btn-bg-color",component:Object(S.a)({label:"Background color",option:"followBtnBgColor",deps:["showFollowBtn"],disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})}]},{id:"load-more-btn",label:"Load more button",fields:[{id:"show-load-more-btn",component:Object(S.a)({label:"Show 'Load more' button",option:"showLoadMoreBtn",render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"load-more-btn-text",component:Object(S.a)({label:"'Load more' text",option:"loadMoreBtnText",deps:["showLoadMoreBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(O.a,{id:e.field.id,value:t,onChange:a})})},{id:"load-more-btn-text-color",component:Object(S.a)({label:"Text color",option:"loadMoreBtnTextColor",deps:["showLoadMoreBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"load-more-btn-bg-color",component:Object(S.a)({label:"Background color",option:"loadMoreBtnBgColor",deps:["showLoadMoreBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})}]}]},207:function(e,t,a){e.exports={root:"MediaGridPicker__root",loading:"MediaGridPicker__loading layout__fill-parent",grid:"MediaGridPicker__grid","grid-disabled":"MediaGridPicker__grid-disabled MediaGridPicker__grid",gridDisabled:"MediaGridPicker__grid-disabled MediaGridPicker__grid",item:"MediaGridPicker__item"}},223:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(95),r=a(10),i=(a(571),a(123));function c({id:e,value:t,onChange:a,showProOptions:n,options:c}){const s=new Set(t.map(e=>e.toString())),d=e=>{const t=e.target.value,n=e.target.checked,o=c.find(e=>e.value.toString()===t);o.isFakePro||o.isDisabled||(n?s.add(t):s.delete(t),a&&a(Array.from(s)))};return o.a.createElement("div",{className:"checkbox-list"},c.filter(e=>!!e).map((t,a)=>{var c;if(t.isFakePro&&!n)return null;const u=Object(r.a)("checkbox-list__option",{"--disabled":t.isDisabled||t.isFakePro});return o.a.createElement("label",{className:u,key:a},o.a.createElement("input",{type:"checkbox",id:e,value:null!==(c=t.value.toString())&&void 0!==c?c:"",checked:s.has(t.value.toString()),onChange:d,disabled:t.isDisabled||t.isFakePro}),o.a.createElement("span",null,t.label,t.tooltip&&!t.isFakePro&&o.a.createElement(o.a.Fragment,null," ",o.a.createElement(i.a,null,t.tooltip))),t.isFakePro&&o.a.createElement("div",{className:"checkbox-list__pro-pill"},o.a.createElement(l.a,null)))}))}},228:function(e,t,a){e.exports={"moderate-viewport":"ModerateViewport__moderate-viewport",moderateViewport:"ModerateViewport__moderate-viewport","moderate-blacklist":"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport",moderateBlacklist:"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport","moderate-whitelist":"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",moderateWhitelist:"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",loading:"ModerateViewport__loading layout__fill-parent",grid:"ModerateViewport__grid","grid-disabled":"ModerateViewport__grid-disabled ModerateViewport__grid",gridDisabled:"ModerateViewport__grid-disabled ModerateViewport__grid",item:"ModerateViewport__item","item-allowed":"ModerateViewport__item-allowed ModerateViewport__item",itemAllowed:"ModerateViewport__item-allowed ModerateViewport__item","item-thumbnail":"ModerateViewport__item-thumbnail",itemThumbnail:"ModerateViewport__item-thumbnail","item-removed":"ModerateViewport__item-removed ModerateViewport__item",itemRemoved:"ModerateViewport__item-removed ModerateViewport__item","item-focused":"ModerateViewport__item-focused",itemFocused:"ModerateViewport__item-focused"}},229:function(e,t,a){e.exports={item:"PromoteTile__item",selected:"PromoteTile__selected PromoteTile__item",thumbnail:"PromoteTile__thumbnail",unselected:"PromoteTile__unselected PromoteTile__item",icon:"PromoteTile__icon"}},247:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),l=a(155),r=a.n(l),i=a(3),c=a(8),s=a(18);function d({accounts:e,value:t,onChange:a}){t=null!=t?t:[],e=null!=e?e:i.b.list;const n=t.filter(t=>e.some(e=>e.id===t)),l=new Set(n);return o.a.createElement("div",{className:r.a.root},e.map((e,t)=>o.a.createElement(u,{key:t,account:e,selected:l.has(e.id),onChange:t=>{return n=e.id,t?l.add(n):l.delete(n),void a(Array.from(l));var n}})))}function u({account:e,selected:t,onChange:a}){const n=`url("${i.b.getProfilePicUrl(e)}")`,l=()=>{a(!t)},d=Object(s.g)(l);return o.a.createElement("div",{className:r.a.row},o.a.createElement("div",{className:t?r.a.accountSelected:r.a.account,onClick:l,onKeyPress:d,role:"button",tabIndex:0},o.a.createElement("div",{className:r.a.profilePic,style:{backgroundImage:n}}),o.a.createElement("div",{className:r.a.infoColumn},o.a.createElement("div",{className:r.a.username},e.username),o.a.createElement("div",{className:r.a.accountType},e.type)),t&&o.a.createElement(c.a,{icon:"yes-alt",className:r.a.tickIcon})))}},248:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(247),r=a(35),i=a(3);function c(e){const t=i.b.getBusinessAccounts();return t.length>0?o.a.createElement(l.a,Object.assign({accounts:t},e)):o.a.createElement(r.a,{type:r.b.WARNING},"Connect a business account to use this feature.")}},249:function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n,o=a(0),l=a.n(o),r=a(74),i=a(6),c=a(65),s=a(35),d=(a(463),a(9)),u=a(8),m=a(260),p=a(4),b=a(10),h=a(3);function g({value:e,onChange:t}){const a=(e=null!=e?e:[]).slice(),o=a.map(e=>({id:e.tag,tag:e.tag,sort:e.sort})),[r,i]=l.a.useState(""),[c,d]=l.a.useState(""),[u,b]=l.a.useState(null),g=h.b.getBusinessAccounts().length>0;return l.a.createElement("div",{className:"hashtag-selector"},!g&&l.a.createElement(s.a,{type:s.b.WARNING},"Connect a business account to use this feature."),l.a.createElement(m.a,{className:"hashtag-selector__list",list:o,setList:e=>{const n=e.map(e=>({tag:e.tag,sort:e.sort}));t&&!Object(p.d)(n,a,(e,t)=>e.tag===t.tag&&e.sort===t.sort)&&t(n)},handle:".hashtag-selector__drag-handle",animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},a.map((e,n)=>l.a.createElement(f,{key:n,disabled:null!==u&&u!==n||!g,hashtag:e,onEdit:e=>((e,n)=>{a[e]=n,t&&t(a)})(n,e),onDelete:()=>(e=>{a.splice(e,1),t&&t(a)})(n),onStartEdit:()=>b(n),onStopEdit:()=>b(null)}))),l.a.createElement(v,{type:n.ADD,disabled:null!==u||!g,hashtag:{tag:r,sort:c},onDone:e=>{a.push(e),t&&t(a),i(""),d("")}}))}function f({hashtag:e,disabled:t,onEdit:a,onDelete:o,onStartEdit:r,onStopEdit:i}){const[c,s]=l.a.useState(!1),d=()=>{s(!1),i&&i()};return c?l.a.createElement(v,{type:n.EDIT,disabled:t,hashtag:e,onDone:e=>{a&&a(e),d()},onCancel:d}):l.a.createElement(E,{hashtag:e,disabled:t,onEdit:()=>{s(!0),r&&r()},onDelete:o})}function E({hashtag:e,disabled:t,onEdit:a,onDelete:n}){const o=Object(b.a)("hashtag-selector__row",{"--static":!0,"--disabled":t});return l.a.createElement("div",{className:o},l.a.createElement("div",{className:"hashtag-selector__drag-handle"},l.a.createElement(u.a,{icon:"menu"})),l.a.createElement("div",{className:"hashtag-selector__tag"},e.sort===i.a.HashtagSort.RECENT?"Most recent":"Most popular"," posts with ",l.a.createElement("strong",null,"#",e.tag)),l.a.createElement("div",{className:"hashtag-selector__buttons"},l.a.createElement(d.a,{className:"hashtag-selector__edit-btn",type:d.c.PILL,onClick:a,tooltip:"Edit hashtag"},l.a.createElement(u.a,{icon:"edit"})),l.a.createElement(d.a,{className:"hashtag-selector__delete-btn",type:d.c.DANGER_PILL,onClick:n,tooltip:"Remove hashtag"},l.a.createElement(u.a,{icon:"trash"}))))}function v({type:e,hashtag:t,disabled:a,onChange:m,onDone:p,onCancel:h,focus:g}){const f=e===n.ADD,[E,v]=l.a.useState({tag:"",sort:i.a.HashtagSort.POPULAR});Object(o.useEffect)(()=>{var e;v({tag:null!==(e=t.tag)&&void 0!==e?e:"",sort:t.sort?t.sort:i.a.HashtagSort.POPULAR})},[t]);const[_,w]=l.a.useState(0),[y,k]=l.a.useState(!0);Object(o.useEffect)(()=>{if(k(!1),_>0){const e=setTimeout(()=>k(!0),10),t=setTimeout(()=>k(!1),310);return()=>{clearTimeout(e),clearTimeout(t)}}},[_]);const C=()=>{!_&&p&&p(E)},P=Object(b.a)("hashtag-selector__row",{"--disabled":a});return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:P},l.a.createElement("input",{className:"hashtag-selector__tag",type:"text",value:"#"+E.tag,onChange:e=>{const t=e.target.value.slice(1),a={tag:Object(c.b)(t),sort:E.sort};w(t!==a.tag?Date.now():0),v(a),m&&m(a)},onKeyDown:e=>{switch(e.key){case"Enter":C();break;case"Escape":h&&h()}},autoFocus:g}),l.a.createElement(r.a,{className:"hashtag-selector__sort",placeholder:"Sort by",value:E.sort,onChange:e=>{v({tag:E.tag,sort:e.value}),m&&m({tag:E.tag,sort:e.value})},isSearchable:!1,options:[{value:i.a.HashtagSort.POPULAR,label:"Most popular"},{value:i.a.HashtagSort.RECENT,label:"Most recent"}]}),l.a.createElement("div",{className:"hashtag-selector__buttons"},f?l.a.createElement(d.a,{type:d.c.PRIMARY,className:"hashtag-selector__add-btn",tooltip:"Add new hashtag",onClick:C,disabled:0===E.tag.length},"Add"):l.a.createElement(d.a,{type:f?d.c.PRIMARY:d.c.PILL,className:"hashtag-selector__done-btn",tooltip:"Done",disabled:0===E.tag.length,onClick:C},l.a.createElement(u.a,{icon:"yes"})),!f&&l.a.createElement(d.a,{type:d.c.DANGER_PILL,className:"hashtag-selector__cancel-btn",onClick:h,tooltip:"Cancel changes"},l.a.createElement(u.a,{icon:"no"})))),_?l.a.createElement(s.a,{type:s.b.ERROR,shake:y,showIcon:!0,isDismissible:!0,onDismiss:()=>w(0)},"Hashtags may only contain letters, numbers and underscores"):null)}!function(e){e[e.ADD=0]="ADD",e[e.EDIT=1]="EDIT"}(n||(n={}))},251:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n),l=a(199);function r(e){return o.a.createElement(l.a,Object.assign({groups:e.tab.groups},e))}},252:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0);const o=a.n(n).a.createContext(null)},253:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),o=a.n(n),l=a(74),r=a(15),i=a(19),c=(a(22),a(160)),s=a(105),d=a(83),u=a(201),m=a(4);const p=[],b={linkType:"",postId:0,postTitle:"",postUrl:"",url:"",linkText:"",newTab:!1,linkDirectly:!0};function h({config:e,onChange:t}){e=null!=e?e:b,e=Object.assign(Object.assign({},b),e),0===p.length&&(p.push({value:"",label:"- Do not link -"},{value:"url",label:"Custom URL"}),i.a.config.postTypes.forEach(e=>{"attachment"!==e.slug&&p.push({value:e.slug,label:e.labels.singularName})}));const a=o.a.useRef(),l=o.a.useRef(!1),r=o.a.useRef(),[s,d]=o.a.useState([]),[u,m]=o.a.useState(!1);Object(n.useEffect)(()=>(l.current=!1,e.linkType&&"url"!==e.linkType&&(m(!0),S("").then(e=>{l.current||d(e)}).finally(()=>{l.current||m(!1)})),()=>l.current=!0),[e.linkType]);const h=o.a.useCallback(a=>{t({linkType:a,postId:0,postTitle:"",postUrl:"",url:e.url,newTab:e.newTab,linkText:e.linkText})},[e,t]),y=o.a.useCallback(a=>{if(null===a)t(Object.assign(Object.assign({},e),{postId:0,postTitle:"",postUrl:""}));else{const n=r.current.find(e=>e.id==a.value);t(Object.assign(Object.assign({},e),{postId:a.value,postTitle:n.title,postUrl:n.permalink}))}},[e,t]),k=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{url:a}))},[e,t]),C=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{newTab:a}))},[e,t]),P=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{linkDirectly:a}))},[e,t]),O=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{linkText:a}))},[e,t]),S=o.a.useCallback(t=>(clearTimeout(a.current),new Promise(n=>{a.current=setTimeout(()=>{i.a.restApi.searchPosts(t,e.linkType).then(e=>{r.current=e.data,n(e.data.map(e=>({value:e.id,label:e.title})))}).catch(e=>{})},1e3)})),[e.linkType]),F=i.a.config.postTypes.find(t=>t.slug===e.linkType);return o.a.createElement(o.a.Fragment,null,o.a.createElement(g,{value:e.linkType,onChange:h}),"url"===e.linkType&&o.a.createElement(f,{value:e.url,onChange:k}),e.linkType&&"url"!==e.linkType&&o.a.createElement(E,{postType:F,postId:e.postId,postTitle:e.postTitle,onChange:y,loadOptions:S,isLoading:u,defaultPosts:s}),e.linkType&&o.a.createElement(v,{value:e.linkDirectly,onChange:P}),e.linkType&&o.a.createElement(_,{value:e.newTab,onChange:C}),e.linkType&&o.a.createElement(w,{value:e.linkText,onChange:O,placeholder:c.a.getDefaultLinkText(e)}))}const g=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-to",label:"Link to"},o.a.createElement(l.a,{id:"promo-link-to",value:e||"",onChange:e=>t(e.value),options:p,isCreatable:!1}))})),f=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"link-promo-url",label:"URL",wide:!0},o.a.createElement(u.a,{id:"link-promo-url",value:e,onChange:t}))})),E=o.a.memo((function({postType:e,postId:t,postTitle:a,onChange:n,defaultPosts:r,isLoading:i,loadOptions:c}){const d=e?"Search for a "+e.labels.singularName:"Search";return o.a.createElement(s.a,{id:"link-promo-url",label:d,wide:!0},o.a.createElement(l.a,{async:!0,cacheOptions:!0,key:Object(m.p)(),id:"sli-promo-search-post",placeholder:"Select or start typing...",value:t||0,defaultValue:0,defaultInputValue:t?a:"",onChange:n,defaultOptions:r,loadOptions:c,noOptionsMessage:({inputValue:e})=>e.length?`No posts were found for "${e}"`:"Type to search for posts",loadingMessage:()=>"Searching...",isLoading:i,isSearchable:!0,isClearable:!0}))})),v=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-directly",label:"Link directly"},o.a.createElement(d.a,{id:"promo-link-directly",value:e,onChange:t}),o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Tick this box to make posts go directly to the link. If left unticked, posts will open the popup box."),o.a.createElement("p",null,"To enable your feed's popup box and sidebar:"),o.a.createElement("ol",{style:{marginLeft:15}},o.a.createElement("li",null,"Set the ",o.a.createElement("b",null,"Design » Feed » Open posts in")," option to ",o.a.createElement("b",null,"Popup box")),o.a.createElement("li",null,"Enable the ",o.a.createElement("b",null,"Design » Popup box » Show sidebar")," option."))))})),_=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-new-tab",label:"Open in a new tab"},o.a.createElement(d.a,{id:"promo-link-new-tab",value:e,onChange:t}))})),w=o.a.memo((function({value:e,onChange:t,placeholder:a}){return o.a.createElement(s.a,{id:"promo-link-text",label:"Popup box link text"},o.a.createElement(u.a,{id:"promo-link-text",value:e,onChange:t,placeholder:a}),o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"The text to use for the link in the popup box sidebar:",o.a.createElement("br",null),o.a.createElement("img",{src:r.a.image("popup-link-text.png"),alt:""})),o.a.createElement("p",null,"Remember to enable your feed's popup box and sidebar, like so:"),o.a.createElement("ol",{style:{marginLeft:15}},o.a.createElement("li",null,"Set the ",o.a.createElement("b",null,"Design » Feed » Open posts in")," option to ",o.a.createElement("b",null,"Popup box")),o.a.createElement("li",null,"Enable the ",o.a.createElement("b",null,"Design » Popup box » Show sidebar")," option."))))}))},254:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),o=a.n(n),l=a(229),r=a.n(l),i=a(11),c=a(54),s=a(8),d=a(4);const u=o.a.memo((function({media:e,selected:t,promo:a}){const n=i.a.getType(a),l=i.a.getConfig(a),d=n&&n.isValid(l)&&n.getIcon?n.getIcon(e,l):void 0;return o.a.createElement("div",{className:t?r.a.selected:r.a.unselected},o.a.createElement(c.a,{media:e,className:r.a.thumbnail}),d&&o.a.createElement(s.a,{className:r.a.icon,icon:d}))}),(function(e,t){return e.selected===t.selected&&e.media.id===t.media.id&&i.a.getType(e.promo)==i.a.getType(e.promo)&&Object(d.b)(i.a.getConfig(e.promo),i.a.getConfig(t.promo))}))},255:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(319),r=a.n(l),i=a(54);function c({media:e}){return o.a.createElement("div",{className:r.a.container},o.a.createElement("div",{className:r.a.sizer},o.a.createElement(i.a,{media:e})))}},257:function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),o=a.n(n),l=a(316),r=a.n(l),i=a(114),c=a(271),s=a.n(c),d=a(6),u=a(95),m=a(399),p=a(35),b=a(89),h=a(118);const g=o.a.memo((function({value:e,onChange:t,tab:a}){const[n,l]=o.a.useState(!1);function r(){l(!1)}const i=e.moderationMode===d.a.ModerationMode.WHITELIST;return o.a.createElement(h.a,{padded:!0},o.a.createElement("div",null,o.a.createElement("p",null,"You can choose to hide specific posts or to only show posts that you choose."),o.a.createElement("p",null,"Choose the type of moderation that you wish to apply, then simply click on the posts that you "," ","want to show or hide. Posts that appear in grey will not be shown in the feed."),o.a.createElement("hr",null),o.a.createElement("div",{className:s.a.mode},a.isFakePro&&o.a.createElement("div",{className:s.a.proPill},o.a.createElement(u.a,null)),o.a.createElement(m.a,{name:"manualFilterMode",value:e.moderationMode,onChange:function(n){a.isFakePro||t({moderationMode:n,moderation:e.moderation})},disabled:a.isFakePro,options:[{value:d.a.ModerationMode.BLACKLIST,label:"Hide the selected posts"},{value:d.a.ModerationMode.WHITELIST,label:"Only show the selected posts"}]})),(e.moderation.length>0||i)&&o.a.createElement("a",{className:s.a.reset,onClick:function(){l(!0)}},"Reset moderation")),!a.isFakePro&&o.a.createElement("div",null,o.a.createElement("hr",null),o.a.createElement(p.a,{type:p.b.PRO_TIP,showIcon:!0},o.a.createElement("span",null,o.a.createElement("strong",null,"Pro tip"),":"," ","You can navigate the posts using arrow keys and select them by pressing Enter."))),o.a.createElement(b.a,{isOpen:n,title:"Are you sure?",buttons:["Yes","No"],onAccept:function(){a.isFakePro||(r(),t({moderationMode:d.a.ModerationMode.BLACKLIST,moderation:[]}))},onCancel:r},o.a.createElement("p",null,"Are you sure you want to reset your moderation settings? This cannot be undone.")))}),(e,t)=>e.value.moderationMode===t.value.moderationMode&&e.value.moderation.length===t.value.moderation.length);var f=a(228),E=a.n(f),v=a(54),_=a(102),w=a(4),y=a(196),k=a(10),C=d.a.ModerationMode;const P=o.a.memo((function({value:e,feed:t,tab:a,onChange:n}){const[l,r]=o.a.useState(0),i=new Set(e.moderation);return o.a.createElement(y.a,{feed:t,selected:l,onSelectMedia:(e,t)=>r(t),onClickMedia:function(t){if(a.isFakePro||!t)return;const o=new Set(e.moderation);o.has(t.id)?o.delete(t.id):o.add(t.id),n({moderation:Array.from(o),moderationMode:e.moderationMode})},autoFocusFirst:!0,disabled:a.isFakePro,store:_.c},(t,a)=>o.a.createElement(O,{media:t,mode:e.moderationMode,focused:a===l,selected:i.has(t.id)}))}),(function(e,t){return e.value.moderationMode===t.value.moderationMode&&e.value.moderation.length===t.value.moderation.length&&Object(w.d)(e.value.moderation,t.value.moderation)})),O=o.a.forwardRef(({media:e,selected:t,focused:a,mode:l},r)=>{r||(r=o.a.useRef()),Object(n.useEffect)(()=>{a&&r.current.focus()},[a]);const i=l===C.BLACKLIST,c=Object(k.b)(t!==i?E.a.itemAllowed:E.a.itemRemoved,a?E.a.itemFocused:null);return o.a.createElement("div",{ref:r,className:c},o.a.createElement(v.a,{media:e,className:E.a.itemThumbnail}))});var S=a(9),F=a(8);function N(e){const[t,a]=Object(n.useState)("content"),l=()=>a("sidebar"),c=()=>a("content");return o.a.createElement(i.a,{primary:"content",current:t,sidebar:t=>o.a.createElement(o.a.Fragment,null,t&&o.a.createElement(i.a.Navigation,{onClick:c}),o.a.createElement(g,Object.assign({},e))),content:t=>o.a.createElement("div",{className:r.a.viewport},t&&o.a.createElement("div",{className:r.a.mobileViewportHeader},o.a.createElement(S.a,{onClick:l},o.a.createElement(F.a,{icon:"admin-generic"}),o.a.createElement("span",null,"Moderation options"))),o.a.createElement(P,Object.assign({},e)))})}},258:function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(0),o=a.n(n),l=a(317),r=a.n(l),i=a(74),c=a(124),s=a(11),d=a(253),u=a(35),m=a(4),p=a(105),b=a(83),h=a(6),g=a(12),f=a(223),E=a(198);const v={id:"link",label:"Link",component:d.a,isValid:()=>!1},_={type:"link",config:{linkType:"url",url:"https://your-promotion-url.com",linkText:"Check out my promotion"}};function w({value:e,tab:t,onChange:a,selected:n,onNextPost:l,promoTypeRef:d}){const f=c.a.mediaStore.media[n],w=n>=c.a.mediaStore.media.length-1,y=o.a.useRef(g.a.isEmpty(e.promotions)?"link":g.a.values(e.promotions)[0].type),C=o.a.useCallback(n=>{if(!t.isFakePro){y.current=n.value;const t=g.a.map(e.promotions,e=>({type:n.value,config:s.a.getConfig(e)}));a({promotions:t})}},[t,e.promotions]),P=o.a.useCallback(o=>{if(!t.isFakePro){const t=c.a.mediaStore.media[n],l={type:y.current,config:Object(m.g)(o)},r=g.a.withEntry(e.promotions,t.id,l);a({promotions:r})}},[n,t.isFakePro]),O=o.a.useCallback(()=>{!t.isFakePro&&l()},[t.isFakePro]),S=t.isFakePro?_:h.a.getFeedPromo(f,e),F=t.isFakePro?v:s.a.getTypeById(y.current),N=s.a.getConfig(S),T=void 0!==s.a.getGlobalPromo(f)&&e.globalPromotionsEnabled,x=void 0!==s.a.getAutoPromo(f)&&e.autoPromotionsEnabled,I=s.a.getTypes().map(e=>({value:e.id,label:e.label}));return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.a.top},o.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."),o.a.createElement("hr",null),o.a.createElement(p.a,{id:"enable-promo",label:"Enable promotion"},o.a.createElement(b.a,{value:e.promotionEnabled,onChange:e=>a({promotionEnabled:e})})),!e.promotionEnabled&&o.a.createElement(u.a,{type:u.b.WARNING,showIcon:!0},"All feed, global and automated promotions are disabled."," ","Promotions may still be edited but will not apply to posts in this feed."),o.a.createElement(k,{options:e,onChange:a}),o.a.createElement(p.a,{id:"promo-type",label:"Promotion type"},o.a.createElement(i.a,{id:"sli-promo-type",ref:d,value:F.id,onChange:C,options:I,isSearchable:!1,isCreatable:!1,isClearable:!1,disabled:t.isFakePro}))),o.a.createElement(E.a,{key:f?f.id:void 0,type:F,config:N,onChange:P,hasGlobal:T,hasAuto:x,showTutorial:!f,showNextBtn:"-more-"!==F.id,isNextBtnDisabled:w,onNext:O}),t.isFakePro&&o.a.createElement("div",{className:r.a.disabledOverlay}))}const y=[{value:"global",label:"Global promotions"},{value:"auto",label:"Automated promotions"}];function k({options:e,onChange:t}){const a=Object(n.useCallback)(e=>{t({globalPromotionsEnabled:e.includes("global"),autoPromotionsEnabled:e.includes("auto")})},[t]),l=[e.globalPromotionsEnabled?"global":0,e.autoPromotionsEnabled?"auto":0];return o.a.createElement(p.a,{id:"enable-other-promos",label:"Include other promotions",disabled:!e.promotionEnabled},o.a.createElement(f.a,{value:l,onChange:a,options:y}))}var C=a(196),P=a(254);const O=o.a.memo((function({value:e,feed:t,tab:a,selected:n,onSelectMedia:l,onClickMedia:r}){return o.a.createElement(C.a,{feed:t,store:c.a.mediaStore,selected:n,onSelectMedia:l,onClickMedia:r,disabled:a.isFakePro},(t,a)=>{const l=h.a.getPromo(t,e);return o.a.createElement(P.a,{media:t,selected:a===n,promo:l})})}),(function(e,t){return e.selected===t.selected&&e.onSelectMedia===t.onSelectMedia&&e.onClickMedia===t.onClickMedia&&e.value.promotionEnabled===t.value.promotionEnabled&&e.value.autoPromotionsEnabled===t.value.autoPromotionsEnabled&&e.value.globalPromotionsEnabled===t.value.globalPromotionsEnabled&&g.a.size(e.value.promotions)===g.a.size(t.value.promotions)&&e.feed.media.length===t.feed.media.length&&e.value.promotions===t.value.promotions}));var S=a(114),F=a(118),N=a(255);function T(e){const[t,a]=o.a.useState(null),[n,l]=o.a.useState(!1),r=()=>l(!1),i=o.a.useRef(),s=o.a.useCallback(()=>{a(e=>Math.min(e+1,c.a.mediaStore.media.length-1))},[]),d=o.a.useCallback((e,t)=>{a(t)},[]),u=o.a.useCallback((e,t)=>{a(t),l(!0),requestAnimationFrame(()=>{i.current&&null!==t&&i.current.focus()})},[i]);return o.a.createElement(S.a,{primary:"content",current:n?"sidebar":"content",sidebar:a=>o.a.createElement(o.a.Fragment,null,a&&o.a.createElement(o.a.Fragment,null,o.a.createElement(S.a.Navigation,{onClick:r}),c.a.mediaStore.media[t]&&o.a.createElement(N.a,{media:c.a.mediaStore.media[t]})),o.a.createElement(F.a,null,o.a.createElement(w,Object.assign({},e,{selected:t,onNextPost:s,promoTypeRef:i})))),content:a=>o.a.createElement(o.a.Fragment,null,a&&o.a.createElement("div",{style:{textAlign:"center"}},o.a.createElement("p",null,"Click or tap a post to set up a promotion for it")),o.a.createElement(O,Object.assign({},e,{selected:t,onSelectMedia:d,onClickMedia:u})))})}},267:function(e,t,a){e.exports={"prop-field":"EditorPropField__prop-field",propField:"EditorPropField__prop-field","device-btn":"EditorPropField__device-btn",deviceBtn:"EditorPropField__device-btn",field:"EditorPropField__field"}},268:function(e,t,a){e.exports={"filter-field":"FilterFieldRow__filter-field",filterField:"FilterFieldRow__filter-field",bordered:"FilterFieldRow__bordered FilterFieldRow__filter-field",label:"FilterFieldRow__label"}},269:function(e,t,a){e.exports={"inc-global-filters":"IncGlobalFiltersField__inc-global-filters",incGlobalFilters:"IncGlobalFiltersField__inc-global-filters",label:"IncGlobalFiltersField__label",field:"IncGlobalFiltersField__field"}},271:function(e,t,a){e.exports={mode:"ModerateSidebar__mode","pro-pill":"ModerateSidebar__pro-pill",proPill:"ModerateSidebar__pro-pill",reset:"ModerateSidebar__reset"}},273:function(e,t,a){e.exports={root:"FeedEditor__root",hidden:"FeedEditor__hidden",content:"FeedEditor__content","accounts-onboarding":"FeedEditor__accounts-onboarding",accountsOnboarding:"FeedEditor__accounts-onboarding"}},274:function(e,t,a){e.exports={navbar:"EditorNavbar__navbar layout__z-high","fake-pro-item":"EditorNavbar__fake-pro-item",fakeProItem:"EditorNavbar__fake-pro-item","pro-pill":"EditorNavbar__pro-pill",proPill:"EditorNavbar__pro-pill"}},312:function(e,t,a){e.exports={"connect-button":"ConnectSidebar__connect-button",connectButton:"ConnectSidebar__connect-button","connect-sidebar":"ConnectSidebar__connect-sidebar",connectSidebar:"ConnectSidebar__connect-sidebar","connect-account":"ConnectSidebar__connect-account",connectAccount:"ConnectSidebar__connect-account"}},313:function(e,t,a){e.exports={"field-group":"FieldGroup__field-group",fieldGroup:"FieldGroup__field-group",spoiler:"FieldGroup__spoiler","pro-pill":"FieldGroup__pro-pill",proPill:"FieldGroup__pro-pill",disabled:"FieldGroup__disabled"}},316:function(e,t,a){e.exports={viewport:"ModerateTab__viewport","mobile-viewport-header":"ModerateTab__mobile-viewport-header",mobileViewportHeader:"ModerateTab__mobile-viewport-header"}},317:function(e,t,a){e.exports={top:"PromoteSidebar__top",row:"PromoteSidebar__row","disabled-overlay":"PromoteSidebar__disabled-overlay",disabledOverlay:"PromoteSidebar__disabled-overlay"}},318:function(e,t,a){e.exports={bottom:"PromotionFields__bottom","remove-promo":"PromotionFields__remove-promo",removePromo:"PromotionFields__remove-promo"}},319:function(e,t,a){e.exports={container:"PromotePreviewTile__container",sizer:"PromotePreviewTile__sizer"}},323:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return r}));var n=a(4);const o={showFakeOptions:!0};function l(){var e;try{const t=null!==(e=localStorage.getItem("sli_editor"))&&void 0!==e?e:"{}",a=JSON.parse(t);return Object.assign(Object.assign({},o),a)}catch(e){return o}}function r(e){var t;t=Object(n.a)(l(),e),localStorage.setItem("sli_editor",JSON.stringify(t))}},34:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(67),r=a(105),i=a(267),c=a.n(i),s=a(2),d=a(9),u=a(8);function m({option:e,children:t,value:a,previewDevice:n,onChange:l,onChangeDevice:r}){const i=o.a.useCallback(t=>{l({[e]:s.a.isValid(a[e])?s.a.withValue(a[e],t,n):t})},[a[e],n,l]),m=s.a.isValid(a[e]),p=m?s.a.get(a[e],n,!0):a[e];return o.a.createElement("div",{className:c.a.propField},m&&o.a.createElement("div",{className:c.a.deviceBtn},o.a.createElement(d.a,{type:d.c.PILL,size:d.b.NORMAL,onClick:()=>r(s.a.cycle(n)),tooltip:""},o.a.createElement(u.a,{icon:s.a.getIcon(n)}))),o.a.createElement("div",{className:c.a.field},t(p,i)))}t.a=function({label:e,option:t,render:a,memo:n,deps:i,when:c,disabled:s,tooltip:d}){return n=null==n||n,c=null!=c?c:()=>!0,s=null!=s?s:()=>!1,(i=null!=i?i:[]).includes(t),Object(l.a)(n=>c(n)&&o.a.createElement(r.a,Object.assign({},n,{label:e,disabled:s(n),isFakePro:n.field.isFakePro}),o.a.createElement(m,Object.assign({},n,{option:t}),(e,t)=>a(n,e,t)),d&&d(n)),n?[t].concat(i):[])}},387:function(e,t,a){e.exports={"field-group-list":"FieldGroupList__field-group-list",fieldGroupList:"FieldGroupList__field-group-list"}},390:function(e,t,a){e.exports={"preview-options":"DesignSidebar__preview-options",previewOptions:"DesignSidebar__preview-options"}},406:function(e,t,a){e.exports={viewport:"EditorViewport__viewport"}},407:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),o=a.n(n),l=a(157),r=a.n(l),i=a(106),c=a(19),s=a(35),d=a(80),u=a(256),m=a(9),p=a(15),b=a(41),h=a(246),g=b.a.SavedFeed;function f({name:e,showFakeOptions:t}){const a=g.getLabel(e),n=`[instagram feed="${i.a.feed.id}"]`,l=c.a.config.adminUrl+"/widgets.php",f=c.a.config.adminUrl+"/customize.php?autofocus%5Bpanel%5D=widgets";return i.a.feed.id?o.a.createElement("div",{className:r.a.embedSidebar},i.a.feed.usages.length>0&&o.a.createElement(d.a,{label:"Instances",defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",{className:r.a.instances},o.a.createElement("p",null,"This feed is currently being shown in these pages:"),o.a.createElement("ul",null,i.a.feed.usages.map((e,t)=>o.a.createElement("li",{key:t},o.a.createElement("a",{href:`${c.a.config.adminUrl}/post.php?action=edit&post=${e.id}`,target:"_blank"},e.name),o.a.createElement("span",null,"(",e.type,")")))))),o.a.createElement(d.a,{label:"Shortcode",defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"Copy the shortcode below and paste it in any page or post to embed this feed:"),o.a.createElement("div",{className:r.a.shortcode},o.a.createElement("code",null,n),o.a.createElement(u.a,{feed:i.a.feed},o.a.createElement(m.a,{type:m.c.SECONDARY},"Copy"))))),c.a.config.hasElementor&&(p.a.isPro||t)&&o.a.createElement(d.a,{className:p.a.isPro?void 0:r.a.pro,label:p.a.isPro?"Elementor Widget":o.a.createElement(h.a,null,"Elementor widget"),defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed in Elementor:"),o.a.createElement("ol",null,o.a.createElement("li",null,o.a.createElement("span",null,"Search for the ",o.a.createElement("b",null,"Spotlight Instagram feed")," widget",o.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"Choose the one with the Instagram logo. The other one is for the normal"," ","WordPress widget."))),o.a.createElement("li",null,"Add it to your post or page"),o.a.createElement("li",null,"Then choose ",o.a.createElement("strong",null,a)," from the list of feeds.")),o.a.createElement(v,{images:[{src:"elementor-widget-search.png",alt:"Searching for the widget"},{src:"elementor-widget-feed.png",alt:"The feed in a widget"}]}))),o.a.createElement(d.a,{label:"WordPress Block",defaultOpen:!c.a.config.hasElementor,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed in the WordPress block editor:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Search for the ",o.a.createElement("b",null,"Spotlight Instagram feed")," block"),o.a.createElement("li",null,"add it to your post or page."),b.a.list.length>1?o.a.createElement("li",null,"Next, choose ",o.a.createElement("strong",null,a)," from the list of feeds."):o.a.createElement("li",null,"Since this is your only feed, Spotlight will automatically show this feed.")),b.a.list.length>1?o.a.createElement(v,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block-select.png",alt:"Choosing a feed for the block"},{src:"wp-block.png",alt:"The feed in a block"}]}):o.a.createElement(v,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block.png",alt:"The feed in a block"}]}))),o.a.createElement(d.a,{label:"WordPress Widget",defaultOpen:!1,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed as a WordPress widget:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Go to the"," ",o.a.createElement("a",{href:l,target:"_blank"},"Appearance » Widgets")," ","page or the"," ",o.a.createElement("a",{href:f,target:"_blank"},"Widgets section of the Customizer")),o.a.createElement("li",null,"Then, add a ",o.a.createElement("strong",null,"Spotlight Instagram Feed")," widget"),o.a.createElement("li",null,"In the widget's settings, choose the ",o.a.createElement("strong",null,a)," as the feed"," ","to be shown.")),o.a.createElement(E,{img:"widget.png",alt:"Example of a widget"})))):o.a.createElement("div",{className:r.a.embedSidebar},o.a.createElement("div",{className:r.a.saveMessage},o.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"You're almost there... Click the ",o.a.createElement("strong",null,"Save")," button at the top-right to be"," ","able to embed this feed on your site!")))}function E({img:e,alt:t,annotation:a,onClick:n}){return o.a.createElement("figure",{className:r.a.example},o.a.createElement("figcaption",{className:r.a.caption},"Example:"),o.a.createElement("img",{src:p.a.image(e),alt:null!=t?t:"",style:{cursor:n?"pointer":"default"},onClick:n}),void 0!==a&&o.a.createElement("div",{className:r.a.exampleAnnotation},a))}function v({images:e}){const[t,a]=o.a.useState(0),l=o.a.useRef(),r=()=>{i(),l.current=setInterval(c,2e3)},i=()=>{clearInterval(l.current)},c=()=>{r(),a(t=>(t+1)%e.length)};Object(n.useEffect)(()=>(r(),i),[]);const s=e[t];return o.a.createElement(E,{img:s.src,alt:s.alt,annotation:t+1,onClick:c})}},411:function(e,t,a){"use strict";a.d(t,"a",(function(){return Y}));var n=a(0),o=a.n(n),l=a(273),r=a.n(l),i=a(274),c=a.n(i),s=a(15),d=a(6),u=a(88),m=a(95),p=a(171),b=a(275),h=a(303),g=a(136),f=a(9),E=a(304),v=a(305),_=a(173),w=a(41).a.SavedFeed;const y=o.a.memo((function(e){const t=d.a.Options.hasSources(e.value),a=(e.showFakeOptions||s.a.isPro?e.tabs:e.tabs.filter(e=>!e.isFakePro)).map(e=>({key:e.id,label:o.a.createElement(k,{key:e.id,tab:e}),disabled:!e.alwaysEnabled&&!t}));return o.a.createElement("div",{className:c.a.navbar},o.a.createElement(p.a,{breakpoints:b.a.Sizes.ALL,render:t=>{const n=e.showNameField?o.a.createElement(h.a,{key:"name-field",value:e.name,onDone:e.onRename,defaultValue:w.getDefaultName()}):void 0,l=e.showDoneBtn?o.a.createElement(g.a,{key:"save-btn",content:t=>t?"Saving ...":e.doneBtnText,isSaving:e.isSaving,disabled:!e.isDoneBtnEnabled,onClick:e.onSave}):void 0,r=e.showCancelBtn?o.a.createElement(f.a,{key:"cancel-btn",onClick:e.onCancel,disabled:!e.isCancelBtnEnabled,children:e.cancelBtnText}):void 0;if(t<=b.a.Sizes.SMALL)return o.a.createElement(E.a,{steps:a,current:e.tabId,onChangeStep:e.onChangeTab,firstStep:r,lastStep:l},n);if(t<=b.a.Sizes.MEDIUM)return o.a.createElement(v.a,{pages:a,current:e.tabId,onChangePage:e.onChangeTab,hideMenuArrow:!0,showNavArrows:!0},{path:n?[n]:[],right:[r,l]});let i=[o.a.createElement(u.a,{key:"logo"})];return n&&i.push(n),o.a.createElement(_.a,{current:e.tabId,onClickTab:e.onChangeTab},{path:i,tabs:a,right:[r,l]})}}))}),(e,t)=>e.tabId===t.tabId&&e.name===t.name&&e.showFakeOptions===t.showFakeOptions&&e.showDoneBtn===t.showDoneBtn&&e.showCancelBtn===t.showCancelBtn&&e.doneBtnText===t.doneBtnText&&e.cancelBtnText===t.cancelBtnText&&e.showNameField===t.showNameField&&e.onChangeTab===t.onChangeTab&&e.onRename===t.onRename&&e.onSave===t.onSave&&e.onCancel===t.onCancel&&e.isSaving===t.isSaving&&e.isDoneBtnEnabled===t.isDoneBtnEnabled&&e.isCancelBtnEnabled===t.isCancelBtnEnabled&&d.a.Options.hasSources(e.value)===d.a.Options.hasSources(t.value));function k({tab:e}){return e.isFakePro?o.a.createElement(C,{tab:e}):o.a.createElement("span",null,e.label)}function C({tab:e}){return o.a.createElement("span",{className:c.a.fakeProItem},o.a.createElement(m.a,{className:c.a.proPill}),o.a.createElement("span",null,e.label))}var P=a(118),O=a(114);function S(e){var{children:t,showPreviewBtn:a,onOpenPreview:n}=e,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children","showPreviewBtn","onOpenPreview"]);return!l.tab.sidebar||l.tab.showSidebar&&!l.tab.showSidebar()?null:o.a.createElement(o.a.Fragment,null,a&&o.a.createElement(O.a.Navigation,{align:"right",text:"Preview",icon:"visibility",onClick:n}),o.a.createElement(P.a,null,l.tab.sidebar&&o.a.createElement(l.tab.sidebar,Object.assign({tab:l.tab},l)),null!=t?t:null))}var F=a(406),N=a.n(F),T=a(107),x=a.n(T),I=a(7),j=a(2),M=a(130),A=a(116),L=a(8),B=a(87),D=a(19);const R=Object(I.b)(({feed:e,showCloseBtn:t,onClose:a})=>{const n=o.a.useRef(),l=o.a.useRef();if(!d.a.Options.hasSources(e.options))return o.a.createElement(A.a,{className:x.a.onboarding},t&&o.a.createElement(f.a,{onClick:a},o.a.createElement(L.a,{icon:"hidden"}),o.a.createElement("span",null,"Close Preview")),o.a.createElement("div",null,o.a.createElement("h1",null,"Select an account to get"," ",o.a.createElement("span",{className:x.a.noBreak},"started"," "," →")),o.a.createElement("p",null,"Your Instagram posts will be displayed instantly so you can easily design your feed using"," ","the live interactive preview.")));const r=e.mode,i=r===j.a.Mode.DESKTOP,c=r===j.a.Mode.TABLET,s=r===j.a.Mode.PHONE,u=i?x.a.root:x.a.shrunkRoot,m=s?x.a.phoneSizer:c?x.a.tabletSizer:x.a.sizer;return o.a.createElement("div",{className:u,ref:n},o.a.createElement("div",{className:x.a.statusBar},o.a.createElement("div",{className:x.a.statusIndicator},o.a.createElement("svg",{viewBox:"0 0 24 24"},o.a.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"red"})),o.a.createElement("span",{className:x.a.indicatorText},"Live interactive preview"),o.a.createElement("span",{className:x.a.indicatorDash}," — "),o.a.createElement("span",{className:x.a.indicatorCounter},"Showing ",e.media.length," out of ",e.totalMedia," posts"),e.numLoadedMore>0&&o.a.createElement("span",{className:x.a.reset},"(",o.a.createElement("a",{onClick:()=>e.load()},"Reset"),")")),t&&o.a.createElement(f.a,{onClick:a},o.a.createElement(L.a,{icon:"hidden"}),o.a.createElement("span",null,"Close Preview"))),o.a.createElement("div",{className:x.a.container},o.a.createElement(B.a.Context.Provider,{value:{target:i?n:l}},o.a.createElement("div",{className:m,ref:l},0===e.media.length&&d.a.Options.hasSources(e.options)&&d.a.Options.isLimitingPosts(e.options)&&!e.isLoading?o.a.createElement(z,null):o.a.createElement(M.a,{feed:e})))))});function z(){return o.a.createElement("div",{className:x.a.noPostsMsg},o.a.createElement("p",null,"There are no posts to show. Here are a few things you can try:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Make sure that the selected accounts/hashtags have posts related to them on Instagram."),o.a.createElement("li",null,'Check the "Types of posts" option in "Design » Feed".'),o.a.createElement("li",null,'Try relaxing your "Filters" (per feed and global) and "Moderation".')),o.a.createElement("p",null,"If you can't find the cause, please"," ",o.a.createElement("a",{target:"_blank",href:D.a.resources.supportUrl},"contact support"),"."))}function H(e){var{children:t,isCollapsed:a,onClosePreview:n}=e,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children","isCollapsed","onClosePreview"]);return o.a.createElement("div",{className:N.a.viewport},t||(l.tab.viewport?o.a.createElement(l.tab.viewport,Object.assign({},l)):o.a.createElement(R,Object.assign({},l,{showCloseBtn:a,onClose:n}))))}var V=a(252),G=a(3),U=a(135),W=a(1);function K({onChange:e,onChangeTab:t}){const[a,n]=o.a.useState(!1),l=o.a.useRef();return o.a.createElement(U.a,{beforeConnect:e=>{n(!0),l.current=e},onConnect:()=>{e&&e({accounts:W.o.array([l.current])}),setTimeout(()=>{t&&t("design")},A.a.TRANSITION_DURATION)},isTransitioning:a})}function Y(e){var t,a,l,i,c,s,u,m,p=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,[]);const[b,h]=Object(n.useState)(!1),g=()=>h(!0),f=()=>h(!1);p.tabs=null!==(t=p.tabs)&&void 0!==t?t:[],p.showDoneBtn=null===(a=p.showDoneBtn)||void 0===a||a,p.showCancelBtn=null===(l=p.showCancelBtn)||void 0===l||l,p.showNameField=null!==(i=p.showNameField)&&void 0!==i&&i,p.doneBtnText=null!==(c=p.doneBtnText)&&void 0!==c?c:"Done",p.cancelBtnText=null!==(s=p.cancelBtnText)&&void 0!==s?s:"Cancel",p.isDoneBtnEnabled=null===(u=p.isDoneBtnEnabled)||void 0===u||u,p.isCancelBtnEnabled=null===(m=p.isCancelBtnEnabled)||void 0===m||m;const E=p.tabs.find(e=>e.id===p.tabId),v=o.a.useRef();v.current||(v.current=new d.a(p.value),v.current.load()),Object(n.useEffect)(()=>{v.current.options=p.value},[p.value]),Object(n.useEffect)(()=>{v.current.mode=p.previewDevice},[p.previewDevice]);const _=d.a.ComputedOptions.compute(p.value),w=Object.assign(Object.assign({},p),{computed:_,tab:E,feed:v.current});return o.a.createElement(V.a.Provider,{value:p},o.a.createElement("div",{className:r.a.root},o.a.createElement(y,Object.assign({},p)),G.b.hasAccounts()?o.a.createElement("div",{className:r.a.content},void 0===E.component?o.a.createElement(O.a,{primary:"content",current:b?"content":"sidebar",sidebar:e=>o.a.createElement(S,Object.assign({},w,{showPreviewBtn:e,onOpenPreview:g})),content:e=>o.a.createElement(H,Object.assign({},w,{isCollapsed:e,onClosePreview:f}))}):o.a.createElement(E.component,Object.assign({},w))):o.a.createElement("div",{className:r.a.accountsOnboarding},o.a.createElement(K,Object.assign({},w)))))}},463:function(e,t,a){},572:function(e,t,a){},67:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),l=a(4),r=a(2);function i(e,t=[]){return o.a.memo(e,(e,a)=>{const n=t.reduce((t,n)=>t&&Object(l.b)(e.value[n],a.value[n]),t.length>0),o=!t.reduce((e,t)=>e||r.a.isValid(a.value[t]),!1)||e.previewDevice===a.previewDevice&&e.onChangeDevice===a.onChangeDevice;return n&&o&&e.showFakeOptions===a.showFakeOptions&&e.onChange===a.onChange})}},83:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n);function l({id:e,value:t,onChange:a,disabled:n}){return o.a.createElement("div",{className:"checkbox-field"},o.a.createElement("div",{className:"checkbox-field__aligner"},o.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:!!t,onChange:e=>a(e.target.checked),disabled:n})))}a(378)},84:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n),l=a(393);function r({value:e,onChange:t,min:a,emptyMin:n,placeholder:r,id:i,unit:c}){e=null!=e?e:"",a=null!=a?a:0,r=null!=r?r:"",n=null!=n&&n;const s=o.a.useCallback(e=>{const n=e.target.value,o=parseInt(n),l=isNaN(o)?n:Math.max(a,o);t&&t(l)},[a,t]),d=o.a.useCallback(()=>{n&&e<=a&&t&&t("")},[n,e,a,t]),u=o.a.useCallback(o=>{"ArrowUp"===o.key&&""===e&&t&&t(n?a+1:a)},[e,a,n,t]),m=n&&e<=a?"":e;return c?o.a.createElement(l.a,{id:i,type:"number",unit:c,value:m,min:a,placeholder:r+"",onChange:s,onBlur:d,onKeyDown:u}):o.a.createElement("input",{id:i,type:"number",value:m,min:a,placeholder:r+"",onChange:s,onBlur:d,onKeyDown:u})}}}]);
1
+ (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[3],{106:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(184),r=a.n(l),i=a(126),c=a(98);function s({id:e,label:t,children:a,wide:n,disabled:l,isFakePro:s}){const d=Array.isArray(a)?a[0]:a,u=Array.isArray(a)?a[1]:void 0;return o.a.createElement("div",{className:l||s?r.a.disabled:n?r.a.wide:r.a.container},o.a.createElement("div",{className:r.a.label},o.a.createElement("div",{className:r.a.labelAligner},o.a.createElement("label",{htmlFor:e},t),u&&o.a.createElement(i.a,null,u))),o.a.createElement("div",{className:r.a.content},d),s&&o.a.createElement(c.a,{className:r.a.proPill}))}},108:function(e,t,a){e.exports={root:"FeedPreview__root","shrunk-root":"FeedPreview__shrunk-root FeedPreview__root",shrunkRoot:"FeedPreview__shrunk-root FeedPreview__root","status-bar":"FeedPreview__status-bar",statusBar:"FeedPreview__status-bar","status-indicator":"FeedPreview__status-indicator",statusIndicator:"FeedPreview__status-indicator",reset:"FeedPreview__reset",container:"FeedPreview__container","no-posts-msg":"FeedPreview__no-posts-msg",noPostsMsg:"FeedPreview__no-posts-msg",indicators:"FeedPreview__indicators","waiting-indicator":"FeedPreview__waiting-indicator",waitingIndicator:"FeedPreview__waiting-indicator","loading-indicator":"FeedPreview__loading-indicator",loadingIndicator:"FeedPreview__loading-indicator",sizer:"FeedPreview__sizer","shrunk-sizer":"FeedPreview__shrunk-sizer FeedPreview__sizer",shrunkSizer:"FeedPreview__shrunk-sizer FeedPreview__sizer","tablet-sizer":"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",tabletSizer:"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer","phone-sizer":"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",phoneSizer:"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",onboarding:"FeedPreview__onboarding","no-break":"FeedPreview__no-break",noBreak:"FeedPreview__no-break","preview-device":"FeedPreview__preview-device",previewDevice:"FeedPreview__preview-device","indicator-dash":"FeedPreview__indicator-dash",indicatorDash:"FeedPreview__indicator-dash","indicator-text":"FeedPreview__indicator-text",indicatorText:"FeedPreview__indicator-text","indicator-animation":"FeedPreview__indicator-animation",indicatorAnimation:"FeedPreview__indicator-animation","loading-animation":"FeedPreview__loading-animation",loadingAnimation:"FeedPreview__loading-animation"}},111:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(321),r=a.n(l),i=a(3),c=a(127),s=a(204),d=a(402),u=a.n(d),m=a(2),p=a(108),b=a.n(p),h=a(403),g=a(9),f=a(8);function v(e){return o.a.createElement("div",{className:b.a.previewDevice},o.a.createElement("span",null,"Preview device"),o.a.createElement(h.a,null,m.a.MODES.map((t,a)=>o.a.createElement(g.a,{key:a,type:g.c.TOGGLE,onClick:()=>e.onChangeDevice(t),active:e.previewDevice===t,tooltip:t.name},o.a.createElement(f.a,{icon:t.icon})))))}var E=a(65),_=a(256),w=a(257),y=a(258),k=[{id:"accounts",label:"Show posts from these accounts",fields:[{id:"accounts",component:Object(E.a)(({value:e,onChange:t})=>o.a.createElement(_.a,{value:e.accounts,onChange:e=>t({accounts:e})}),["accounts"])}]},{id:"tagged",label:"Show posts where these accounts are tagged",isFakePro:!0,fields:[{id:"tagged",component:Object(E.a)(()=>o.a.createElement(w.a,{value:[]}),["accounts","tagged"])}]},{id:"hashtags",label:"Show posts with these hashtags",isFakePro:!0,fields:[{id:"hashtags",component:Object(E.a)(()=>o.a.createElement(y.a,{value:[]}),["accounts","hashtags"])}]}],C=a(182),P=a(153),O=a(148),S=a(154),F=a(147),N=[{id:"caption-filters",label:"Caption filtering",isFakePro:!0,fields:[{id:"caption-whitelist",component:Object(E.a)(({field:e})=>o.a.createElement(P.a,{label:"Only show posts with these words or phrases"},o.a.createElement(O.a,{id:e.id,value:[]})))},{id:"caption-whitelist-settings",component:Object(E.a)(()=>o.a.createElement(S.a,{value:!0}))},{id:"caption-blacklist",component:Object(E.a)(({field:e})=>o.a.createElement(P.a,{label:"Hide posts with these words or phrases",bordered:!0},o.a.createElement(O.a,{id:e.id,value:[]})))},{id:"caption-blacklist-settings",component:Object(E.a)(()=>o.a.createElement(S.a,{value:!0}))}]},{id:"hashtag-filters",label:"Hashtag filtering",isFakePro:!0,fields:[{id:"hashtag-whitelist",component:Object(E.a)(({field:e})=>o.a.createElement(P.a,{label:"Only show posts with these hashtags"},o.a.createElement(F.a,{id:e.id,value:[]})))},{id:"hashtag-whitelist-settings",component:Object(E.a)(()=>o.a.createElement(S.a,{value:!0}))},{id:"hashtag-blacklist",component:Object(E.a)(({field:e})=>o.a.createElement(P.a,{label:"Hide posts with these hashtags",bordered:!0},o.a.createElement(F.a,{id:e.id,value:[]})))},{id:"hashtag-blacklist-settings",component:Object(E.a)(()=>o.a.createElement(S.a,{value:!0}))}]}],T=a(260),x=a(266),I=a(267),j=[{id:"connect",label:"Connect",alwaysEnabled:!0,groups:k,sidebar:function(e){const[,t]=o.a.useState(0);return i.b.hasAccounts()?o.a.createElement("div",{className:r.a.connectSidebar},o.a.createElement("div",{className:r.a.connectButton},o.a.createElement(c.a,{onConnect:a=>{e.onChange&&e.onChange({accounts:e.value.accounts.concat([a])}),t(e=>e++)}})),o.a.createElement(s.a,Object.assign({groups:e.tab.groups},e))):null}},{id:"design",label:"Design",groups:C.a,sidebar:function(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:u.a.previewOptions},o.a.createElement(v,Object.assign({},e))),o.a.createElement(s.a,Object.assign({groups:e.tab.groups},e)))}},{id:"filter",label:"Filter",isFakePro:!0,groups:N,sidebar:T.a},{id:"moderate",label:"Moderate",isFakePro:!0,groups:N,component:x.a},{id:"promote",label:"Promote",isFakePro:!0,component:I.a}];t.a={tabs:j,openGroups:["accounts","tagged","hashtags","layouts","feed"],showDoneBtn:!0,showCancelBtn:!1,showNameField:!1,isDoneBtnEnabled:!0,isCancelBtnEnabled:!0,doneBtnText:"Done",cancelBtnText:"Cancel"}},137:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(272),r=a(119),i=a(81),c=a(19);const s=({onConnect:e,beforeConnect:t,isTransitioning:a})=>o.a.createElement(r.a,{className:"accounts-onboarding",isTransitioning:a},o.a.createElement("div",{className:"accounts-onboarding__left"},o.a.createElement("h1",null,"Let's connect your Instagram account"),o.a.createElement("p",{className:"accounts-onboarding__first-msg"},"If you're unsure which button applies to you, it's most likely a ",o.a.createElement("strong",null,"Personal")," account."," ","Try that first."),o.a.createElement("div",{className:"accounts-onboarding__spacer"}),o.a.createElement(i.a,{label:"Upgrade to an Instagram Business account for free",stealth:!0},o.a.createElement("p",null,"Business accounts get additional API features that give you more control over your feeds in "," ","Spotlight, especially with ",o.a.createElement("strong",null,"PRO"),"."),o.a.createElement("p",null,"Plus, they get access to ",o.a.createElement("strong",null,"more cool stuff")," within Instagram itself, such as "," ","analytics."),o.a.createElement("p",null,o.a.createElement("a",{href:c.a.resources.businessAccounts,target:"_blank",className:"accounts-onboarding__learn-more-business"},"Learn more")))),o.a.createElement("div",null,o.a.createElement(l.a,{beforeConnect:e=>t&&t(e),onConnect:t=>e&&e(t),useColumns:!0,showPrompt:!1})))},153:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),l=a(277),r=a.n(l);function i({children:e,label:t,bordered:a}){const n=a?r.a.bordered:r.a.filterField;return o.a.createElement("div",{className:n},o.a.createElement("span",{className:r.a.label},t),e)}},154:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),o=a.n(n),l=a(278),r=a.n(l),i=a(9),c=a(410);function s({id:e,value:t,onChange:a,feed:n}){const[l,s]=o.a.useState(!1);return o.a.createElement("div",{className:r.a.incGlobalFilters},o.a.createElement("label",{className:r.a.label},o.a.createElement("div",{className:r.a.field},o.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:t,onChange:e=>a&&a(e.target.checked)}),o.a.createElement("span",null,"Include global filters")),o.a.createElement(i.a,{type:i.c.LINK,size:i.b.SMALL,onClick:()=>s(!0)},"Edit global filters"),o.a.createElement(c.a,{isOpen:l,onClose:()=>s(!1),onSave:()=>n&&n.reload()})))}},156:function(e,t,a){e.exports={root:"AccountSelector__root",row:"AccountSelector__row",account:"AccountSelector__account button__toggle-button button__panel-button theme__panel","account-selected":"AccountSelector__account-selected AccountSelector__account button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel",accountSelected:"AccountSelector__account-selected AccountSelector__account button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel","profile-pic":"AccountSelector__profile-pic",profilePic:"AccountSelector__profile-pic","info-column":"AccountSelector__info-column",infoColumn:"AccountSelector__info-column","info-text":"AccountSelector__info-text",infoText:"AccountSelector__info-text",username:"AccountSelector__username AccountSelector__info-text","account-type":"AccountSelector__account-type AccountSelector__info-text",accountType:"AccountSelector__account-type AccountSelector__info-text","tick-icon":"AccountSelector__tick-icon",tickIcon:"AccountSelector__tick-icon"}},158:function(e,t,a){e.exports={"embed-sidebar":"EmbedSidebar__embed-sidebar",embedSidebar:"EmbedSidebar__embed-sidebar","save-message":"EmbedSidebar__save-message",saveMessage:"EmbedSidebar__save-message",shortcode:"EmbedSidebar__shortcode",example:"EmbedSidebar__example",caption:"EmbedSidebar__caption","example-annotation":"EmbedSidebar__example-annotation",exampleAnnotation:"EmbedSidebar__example-annotation",instances:"EmbedSidebar__instances",pro:"EmbedSidebar__pro"}},182:function(e,t,a){"use strict";a.d(t,"b",(function(){return x})),a.d(t,"c",(function(){return L}));var n=a(0),o=a.n(n),l=a(65),r=a(183),i=a.n(r),c=a(41),s=a(15),d=a(98);function u({value:e,onChange:t,layouts:a,showPro:n}){return a=null!=a?a:c.a.list,o.a.createElement("div",{className:i.a.root},a.map(a=>(!a.isPro||s.a.isPro||n)&&o.a.createElement(m,{key:a.id,layout:a,onClick:t,isSelected:e===a.id})))}function m({layout:e,isSelected:t,onClick:a}){const n=e.isPro&&!s.a.isPro,l=e.isComingSoon||n,r=l?i.a.layoutDisabled:t?i.a.layoutSelected:i.a.layout;return o.a.createElement("div",{className:r,role:"button",tabIndex:l?void 0:0,onClick:l?void 0:()=>a(e.id),onKeyPress:l?void 0:()=>a(e.id)},o.a.createElement("span",null,e.name),o.a.createElement(e.iconComponent,null),n&&!e.isComingSoon&&o.a.createElement("div",{className:i.a.proOverlay},o.a.createElement(d.a,null)),e.isComingSoon&&o.a.createElement("div",{className:i.a.proOverlay},o.a.createElement("div",{className:i.a.comingSoon},"COMING SOON",!s.a.isPro&&" TO PRO")))}var p=a(6),b=a(72),h=a(84),g=a(2),f=a(92),v=a(229),E=a(33),_=a(77),w=a(3),y=a(135),k=a(9);a(587);const C=({id:e,title:t,mediaType:a,button:n,buttonSet:l,buttonChange:r,value:i,onChange:c})=>{l=void 0===n?l:n,r=void 0===n?r:n;const s=!!i,d=s?r:l,u=()=>{c&&c("")};return o.a.createElement(y.a,{id:e,title:t,mediaType:a,button:d,value:i,onSelect:e=>{c&&c(e.attributes.url)}},({open:e})=>o.a.createElement("div",{className:"wp-media-field"},s&&o.a.createElement("div",{className:"wp-media-field__preview",tabIndex:0,onClick:e,role:"button"},o.a.createElement("img",{src:i,alt:"Custom profile picture"})),o.a.createElement(k.a,{className:"wp-media-field__select-btn",type:k.c.SECONDARY,onClick:e},d),s&&o.a.createElement(k.a,{className:"wp-media-field__remove-btn",type:k.c.DANGER_LINK,onClick:u},"Remove custom photo")))};function P({id:e,value:t,onChange:a}){return o.a.createElement("textarea",{id:e,value:t,onChange:e=>a(e.target.value)})}var O=a(206),S=a(32),F=a(11),N=p.a.FollowBtnLocation,T=p.a.HeaderInfo;function x(e){return!e.computed.showHeader}function I(e,t){return x(t)||!t.computed.headerInfo.includes(e)}function j(e){return 0===e.value.accounts.length&&0===e.value.tagged.length&&e.value.hashtags.length>0}function M(e){return!e.computed.showFollowBtn}function A(e){return!e.computed.showLoadMoreBtn}function L(e){return"slider"!==e.value.layout}t.a=[{id:"layouts",label:"Layout",fields:[{id:"layout",component:Object(l.a)(({value:e,onChange:t,showFakeOptions:a})=>o.a.createElement(u,{value:e.layout,onChange:e=>t({layout:e}),showPro:a}),["layout"])},{id:"num-posts",component:Object(S.a)({label:"Number of posts",option:"numPosts",render:(e,t,a)=>{const n=e.previewDevice===g.a.Mode.DESKTOP;return o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:1,unit:["post","posts"],placeholder:n?"1":e.value.numPosts.desktop})}})},{id:"num-columns",component:Object(S.a)({label:"Number of columns",option:"numColumns",deps:["layout"],when:e=>["grid","highlight","masonry","slider"].includes(e.value.layout),render:(e,t,a)=>{const n=e.previewDevice===g.a.Mode.DESKTOP;return o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:n?1:0,unit:["column","columns"],placeholder:n?"1":e.value.numColumns.desktop})}})}]},{id:"feed",label:"Feed",fields:[{id:"post-order",component:Object(S.a)({label:"Post order",option:"postOrder",render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:p.a.PostOrder.DATE_DESC,label:"Most recent first"},{value:p.a.PostOrder.DATE_ASC,label:"Oldest first"},{value:p.a.PostOrder.POPULARITY_DESC,label:"Most popular first"},{value:p.a.PostOrder.POPULARITY_ASC,label:"Least popular first"},{value:p.a.PostOrder.RANDOM,label:"Random"}]}),tooltip:()=>o.a.createElement("span",null,o.a.createElement("b",null,"Most popular first")," and ",o.a.createElement("b",null,"Least popular first")," sorting does not work for posts from Personal accounts because Instagram does not provide the number of likes and comments for those posts.")})},{id:"media-type",isFakePro:!0,component:Object(S.a)({label:"Types of posts",option:"mediaType",render:e=>o.a.createElement(b.a,{id:e.field.id,value:p.a.MediaType.ALL,options:[{value:p.a.MediaType.ALL,label:"All posts"},{value:p.a.MediaType.PHOTOS,label:"Photos Only"},{value:p.a.MediaType.VIDEOS,label:"Videos Only"}]})})},{id:"link-behavior",component:Object(S.a)({label:"Open posts in",option:"linkBehavior",render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:p.a.LinkBehavior.NOTHING,label:"- Do not open -"},{value:p.a.LinkBehavior.SELF,label:"Same tab"},{value:p.a.LinkBehavior.NEW_TAB,label:"New tab"},{value:p.a.LinkBehavior.LIGHTBOX,label:"Popup box"}]})})},{id:"link-behavior-promo-msg",component:({value:e,computed:t})=>{if(t.linkBehavior!==p.a.LinkBehavior.LIGHTBOX)return null;const a=!F.a.isEmpty(e.promotions),n=!F.a.isEmpty(s.a.config.globalPromotions),l=s.a.config.autoPromotions.length>0;return(a||n||l)&&o.a.createElement(E.a,{type:E.b.INFO,showIcon:!0},"Promotions may change this behavior for some posts.")}}]},{id:"appearance",label:"Appearance",fields:[{id:"feed-width",component:Object(S.a)({label:"Feed width",option:"feedWidth",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",emptyMin:!0,placeholder:"Auto"})})},{id:"feed-height",component:Object(S.a)({label:"Feed height",option:"feedHeight",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",emptyMin:!0,placeholder:"Auto"})})},{id:"feed-padding",component:Object(S.a)({label:"Outside padding",option:"feedPadding",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"image-padding",component:Object(S.a)({label:"Image padding",option:"imgPadding",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"text-size",component:Object(S.a)({label:"Text size",option:"textSize",render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"Theme default"}),tooltip:()=>o.a.createElement("span",null,"If left empty, the text size will be controlled by your theme."," ",'This option will be ignored for the header if the "Text size" option in the'," ",'"Header" section is not empty.')})},{id:"bg-color",component:Object(S.a)({label:"Background color",option:"bgColor",render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"hover-info",component:Object(S.a)({label:"Show on hover",option:"hoverInfo",render:(e,t,a)=>o.a.createElement(v.a,{id:e.field.id,value:t,onChange:a,showProOptions:e.showFakeOptions,options:e.field.data.options})}),data:{options:[{value:p.a.HoverInfo.LIKES_COMMENTS,label:"Likes & comments",tooltip:"Not available for posts from personal accounts due to a restriction by Instagram."},{value:p.a.HoverInfo.INSTA_LINK,label:"Instagram link"},{value:p.a.HoverInfo.CAPTION,label:"Caption",isFakePro:!0},{value:p.a.HoverInfo.USERNAME,label:"Username",isFakePro:!0,tooltip:"Not available for hashtag posts due to a restriction by Instagram."},{value:p.a.HoverInfo.DATE,label:"Date",isFakePro:!0}]}},{id:"hover-text-color",isFakePro:!0,component:Object(S.a)({label:"Hover text color",option:"textColorHover",render:e=>o.a.createElement(f.a,{id:e.field.id})})},{id:"hover-bg-color",isFakePro:!0,component:Object(S.a)({label:"Hover background color",option:"bgColorHover",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:.5}})})}]},{id:"header",label:"Header",fields:[{id:"header-hashtag-msg",component:Object(l.a)(e=>j(e)&&o.a.createElement(E.a,{type:E.b.INFO,showIcon:!0,shake:!0},"The header is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to show in the header."))},{id:"show-header",component:Object(S.a)({label:"Show header",option:"showHeader",disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"header-style",isFakePro:!0,component:Object(S.a)({label:"Header style",option:"headerStyle",render:e=>o.a.createElement(b.a,{id:e.field.id,value:p.a.HeaderStyle.NORMAL,options:[{value:p.a.HeaderStyle.NORMAL,label:"Normal"},{value:p.a.HeaderStyle.CENTERED,label:"Centered"}]})})},{id:"header-account",component:Object(S.a)({label:"Account to show",option:"headerAccount",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:e.computed.account?e.computed.account.id:"",onChange:e=>a(e.value),options:e.computed.allAccounts.map(e=>({value:e,label:w.b.getById(e).username}))})})},{id:"header-info",component:Object(S.a)({label:"Show",option:"headerInfo",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(v.a,{id:e.field.id,value:t,onChange:a,options:e.field.data.options})}),data:{options:[{value:p.a.HeaderInfo.PROFILE_PIC,label:"Profile photo"},{value:p.a.HeaderInfo.BIO,label:"Profile bio text"},{value:T.MEDIA_COUNT,label:"Post count",isFakePro:!0},{value:T.FOLLOWERS,label:"Follower count",tooltip:"Not available for Personal accounts due to restrictions set by Instagram.",isFakePro:!0}]}},{id:"header-photo-size",component:Object(S.a)({label:"Profile photo size",option:"headerPhotoSize",deps:["showHeader","headerInfo"],disabled:e=>I(T.PROFILE_PIC,e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:null!=t?t:"",onChange:a,min:0,unit:"px",placeholder:"Default"})})},{id:"custom-profile-pic",component:Object(S.a)({label:"Custom profile pic",option:"customProfilePic",deps:["showHeader","headerInfo"],disabled:e=>I(T.PROFILE_PIC,e),render:(e,t,a)=>o.a.createElement(C,{id:e.field.id,value:t,onChange:a,title:"Select custom profile photo",buttonSet:"Choose custom photo",buttonChange:"Change custom photo",mediaType:"image"}),tooltip:()=>o.a.createElement("span",null,"Add a custom profile photo just for this feed. It will override the original"," ","profile photo from Instagram and any custom profile photo added in Spotlight.")})},{id:"custom-bio-text",component:Object(S.a)({label:"Custom bio text",option:"customBioText",deps:["headerInfo","showHeader"],disabled:e=>I(T.BIO,e),render:(e,t,a)=>o.a.createElement(P,{id:e.field.id,value:t,onChange:a}),tooltip:()=>o.a.createElement("span",null,"Add a custom bio text just for this feed. It will override the original custom bio"," ","text from Instagram and any custom bio text added in Spotlight.")})},{id:"header-text-size",component:Object(S.a)({label:"Header text size",option:"headerTextSize",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:null!=t?t:"",onChange:a,min:0,unit:"px",placeholder:"Default"}),tooltip:()=>o.a.createElement("span",null,'If left empty, the "Text size" option in the "Appearance" section will control the'," ","header's text size.")})},{id:"header-text-color",component:Object(S.a)({label:"Header text color",option:"headerTextColor",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"header-bg-color",component:Object(S.a)({label:"Header background color",option:"headerBgColor",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"header-padding",component:Object(S.a)({label:"Header padding",option:"headerPadding",deps:["showHeader"],disabled:e=>x(e),render:(e,t,a)=>o.a.createElement(h.a,{id:e.field.id,value:t,onChange:a,min:0,unit:"px",placeholder:"No padding"})})},{id:"include-stories",isFakePro:!0,component:Object(S.a)({label:"Include stories",option:"includeStories",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!0}),tooltip:()=>o.a.createElement("span",null,"Re-shared stories are not available due to a restriction by Instagram.")})},{id:"stories-interval",isFakePro:!0,component:Object(S.a)({label:"Stories interval time",option:"storiesInterval",render:e=>o.a.createElement(h.a,{id:e.field.id,value:5,min:1,unit:"sec"})})}]},{id:"lightbox",label:"Popup box",isFakePro:!0,fields:[{id:"show-lightbox-sidebar",component:Object(S.a)({label:"Show sidebar",option:"lightboxShowSidebar",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"num-lightbox-comments",label:"Number of comments",component:Object(S.a)({label:"Number of comments",option:"numLightboxComments",render:e=>o.a.createElement(h.a,{id:e.field.id,value:20,min:0,placeholder:"No comments"}),tooltip:()=>o.a.createElement("span",null,"Comments are only available for posts from a ",o.a.createElement("strong",null,"Business")," account")})}]},{id:"captions",label:"Captions",isFakePro:!0,fields:[{id:"show-captions",component:Object(S.a)({label:"Show captions",option:"showCaptions",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!0})})},{id:"caption-max-length",component:Object(S.a)({label:"Caption max length",option:"captionMaxLength",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:["word","words"],placeholder:"No limit"})})},{id:"caption-size",component:Object(S.a)({label:"Caption text size",option:"captionSize",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:"px",placeholder:"Theme default"})})},{id:"caption-color",component:Object(S.a)({label:"Caption text color",option:"captionColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:0}})})},{id:"caption-remove-dots",component:Object(S.a)({label:"Remove dot lines",option:"captionRemoveDots",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1}),tooltip:()=>o.a.createElement("span",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",o.a.createElement("code",null,"."),", ",o.a.createElement("code",null,"•"),", ",o.a.createElement("code",null,"*"),", etc.")})}]},{id:"likes-comments",label:"Likes & Comments",isFakePro:!0,fields:[{id:"show-likes",component:Object(S.a)({label:"Show likes icon",option:"showLikes",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"likes-icon-color",component:Object(S.a)({label:"Likes icon color",option:"likesIconColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:1}})})},{id:"show-comments",component:Object(S.a)({label:"Show comments icon",option:"showComments",render:e=>o.a.createElement(_.a,{id:e.field.id,value:!1})})},{id:"comments-icon-color",component:Object(S.a)({label:"Comments icon color",option:"commentsIconColor",render:e=>o.a.createElement(f.a,{id:e.field.id,value:{r:0,g:0,b:0,a:1}})})},{id:"lcIconSize",component:Object(S.a)({label:"Icon size",option:"lcIconSize",render:e=>o.a.createElement(h.a,{id:e.field.id,value:"",min:0,unit:"px"})})}]},{id:"follow-btn",label:"Follow button",fields:[{id:"follow-btn-hashtag-msg",component:Object(l.a)(e=>j(e)&&o.a.createElement(E.a,{type:E.b.INFO,showIcon:!0,shake:!0},"The follow button is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to follow."))},{id:"show-follow-btn",component:Object(S.a)({label:"Show 'Follow' button",option:"showFollowBtn",disabled:e=>j(e),render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"follow-btn-location",component:Object(S.a)({label:"Location",option:"followBtnLocation",deps:["showFollowBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(b.a,{id:e.field.id,value:t,onChange:e=>a(e.value),options:[{value:N.HEADER,label:"Header"},{value:N.BOTTOM,label:"Bottom"},{value:N.BOTH,label:"Both"}]})})},{id:"follow-btn-text",component:Object(S.a)({label:"'Follow' text",option:"followBtnText",deps:["showFollowBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(O.a,{id:e.field.id,value:t,onChange:a})})},{id:"follow-btn-text-color",component:Object(S.a)({label:"Text color",option:"followBtnTextColor",deps:["showFollowBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"follow-btn-bg-color",component:Object(S.a)({label:"Background color",option:"followBtnBgColor",deps:["showFollowBtn"],disabled:e=>M(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})}]},{id:"load-more-btn",label:"Load more button",when:e=>L(e),fields:[{id:"show-load-more-btn",component:Object(S.a)({label:"Show 'Load more' button",option:"showLoadMoreBtn",render:(e,t,a)=>o.a.createElement(_.a,{id:e.field.id,value:t,onChange:a})})},{id:"load-more-btn-text",component:Object(S.a)({label:"'Load more' text",option:"loadMoreBtnText",deps:["showLoadMoreBtn"],disabled:e=>A(e),render:(e,t,a)=>o.a.createElement(O.a,{id:e.field.id,value:t,onChange:a})})},{id:"load-more-btn-text-color",component:Object(S.a)({label:"Text color",option:"loadMoreBtnTextColor",deps:["showLoadMoreBtn"],disabled:e=>A(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})},{id:"load-more-btn-bg-color",component:Object(S.a)({label:"Background color",option:"loadMoreBtnBgColor",deps:["showLoadMoreBtn"],disabled:e=>A(e),render:(e,t,a)=>o.a.createElement(f.a,{id:e.field.id,value:t,onChange:e=>a(e.rgb)})})}]}]},183:function(e,t,a){e.exports={root:"LayoutSelector__root",layout:"LayoutSelector__layout button__toggle-button button__panel-button theme__panel","layout-selected":"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel",layoutSelected:"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__panel-button theme__panel button__toggle-button-on button__toggle-button button__panel-button theme__panel","layout-disabled":"LayoutSelector__layout-disabled LayoutSelector__layout button__toggle-button button__panel-button theme__panel",layoutDisabled:"LayoutSelector__layout-disabled LayoutSelector__layout button__toggle-button button__panel-button theme__panel","pro-overlay":"LayoutSelector__pro-overlay",proOverlay:"LayoutSelector__pro-overlay","coming-soon":"LayoutSelector__coming-soon ProPill__pill",comingSoon:"LayoutSelector__coming-soon ProPill__pill"}},184:function(e,t,a){e.exports={container:"EditorFieldRow__container",wide:"EditorFieldRow__wide EditorFieldRow__container",label:"EditorFieldRow__label",content:"EditorFieldRow__content","label-aligner":"EditorFieldRow__label-aligner",labelAligner:"EditorFieldRow__label-aligner",disabled:"EditorFieldRow__disabled EditorFieldRow__container","pro-pill":"EditorFieldRow__pro-pill",proPill:"EditorFieldRow__pro-pill"}},201:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(212),r=a.n(l),i=a(7),c=a(412),s=a(18);t.a=Object(i.b)((function({feed:e,media:t,store:a,selected:l,disabled:i,autoFocusFirst:u,onClickMedia:m,onSelectMedia:p,children:b}){i=null!=i&&i,u=null!=u&&u;const h=a&&e&&a.hasCache(e)||void 0!==t&&t.length>0,[g,f]=o.a.useState(null!=t?t:[]),[v,E]=o.a.useState(!h),[_,w,y]=Object(s.f)(l),k=o.a.useRef(),C=o.a.useRef(),P=o.a.useRef();function O(e){f(e),E(!1),e.length>0&&u&&p&&p(e[0],0)}Object(n.useEffect)(()=>{y(l)},[l]),Object(s.j)(n=>{a?a.fetchMedia(e).then(e=>n().then(()=>O(e))):t&&O(t)},[a,t]);const S=e=>{null===w()||e.target!==k.current&&e.target!==C.current||F(null)};function F(e){i||(N(e),m&&m(g[e],e))}function N(e){e===w()||i||(p&&p(g[e],e),y(e))}Object(n.useLayoutEffect)(()=>{if(k.current)return k.current.addEventListener("click",S),()=>k.current.removeEventListener("click",S)},[k.current]);const T=i?r.a.gridDisabled:r.a.grid;return o.a.createElement("div",{ref:k,className:r.a.root},o.a.createElement("div",{ref:C,className:T,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(i)return;const t=w(),a=function(){const e=C.current.getBoundingClientRect(),t=P.current.getBoundingClientRect(),a=e.width,n=t.width;return Math.floor((a+15)/(n+15))}(),n=Math.ceil(g.length/a);switch(e.key){case" ":case"Enter":F(t);break;case"ArrowLeft":N(Math.max(t-1,0));break;case"ArrowRight":N(Math.min(t+1,g.length-1));break;case"ArrowUp":{const e=Math.max(0,t-a),o=Math.floor(t/a),l=Math.floor(e/a);n>1&&l!==o&&N(e);break}case"ArrowDown":{const e=Math.min(g.length-1,t+a),o=Math.floor(t/a),l=Math.floor(e/a);n>1&&l!==o&&N(e);break}default:return}e.preventDefault(),e.stopPropagation()}},g.map((e,t)=>o.a.createElement(d,{key:e.id,ref:0===t?P:null,focused:!i&&_===t,onClick:()=>F(t),onFocus:()=>N(t)},b(e,t)))),v&&o.a.createElement("div",{className:r.a.loading},o.a.createElement(c.a,{size:60})))}));const d=o.a.forwardRef(({focused:e,onClick:t,onFocus:a,children:l},i)=>(i||(i=o.a.useRef()),Object(n.useEffect)(()=>{e&&i.current.focus()},[e]),o.a.createElement("div",{ref:i,className:r.a.item,onClick:t,onFocus:a,tabIndex:0},l)))},203:function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),o=a.n(n),l=a(327),r=a.n(l),i=a(262),c=a(9),s=a(19);function d({}){return o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Spotlight’s ‘Promote’ feature has lots more to come. Share your thoughts on what you’d like to"," ","promote and how."),o.a.createElement("p",null,"Take our 2-minute survey."),o.a.createElement("div",null,o.a.createElement(c.a,{type:c.c.PRIMARY,size:c.b.LARGE,onClick:function(){window.open(s.a.resources.promoTypesSurvey)}},"Start Survey")))}var u=new Map([["link",{heading:"Link options",fields:i.a,tutorial:function({}){return o.a.createElement(o.a.Fragment,null,o.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),o.a.createElement("ol",{style:{marginTop:0}},o.a.createElement("li",null,"Select a post from the preview on the left."),o.a.createElement("li",null,"Choose what the post should link to.")),o.a.createElement("p",null,"That’s it!"))}}],["-more-",{heading:"Have your say...",fields:d,tutorial:d}]]),m=a(81),p=a(33),b=a(30);function h({hasGlobal:e,hasAuto:t,isOverriding:a,onOverride:n}){return o.a.createElement(o.a.Fragment,null,o.a.createElement(p.a,{type:p.b.WARNING,showIcon:!0},o.a.createElement("span",null,"You have")," ",t&&o.a.createElement("a",{href:b.a.at({screen:"promotions",tab:"automate"}),target:"_blank"},"automated"),t&&e&&o.a.createElement(o.a.Fragment,null," ",o.a.createElement("span",null,"and")," "),e&&o.a.createElement("a",{href:b.a.at({screen:"promotions",tab:"global"}),target:"_blank"},"global")," ",o.a.createElement("span",null,"promotions that apply to this post.")," ",a?o.a.createElement("span",null,"To stop overriding, simply remove the custom promotion."):o.a.createElement("span",null,"Click the button below to use a custom promotion instead.")),!a&&o.a.createElement(c.a,{onClick:n},"Override"))}var g=a(4),f=a(89);function v({type:e,config:t,hasGlobal:a,hasAuto:l,showTutorial:i,showNextBtn:s,isNextBtnDisabled:d,hideRemove:p,onNext:b,onChange:v,onRemove:E}){var _,w;const[y,k]=Object(n.useState)(!1),[C,P]=Object(n.useState)(!1),O=Object(n.useCallback)(()=>P(!0),[P]),S=Object(n.useCallback)(()=>P(!1),[P]),F=Object(n.useCallback)(()=>{k(!0),v&&v({})},[e,v]),N=!Object(g.l)(t),T=a||l,x=T&&(N||y),I=null!==(_=u.get(e?e.id:""))&&void 0!==_?_:{heading:"",fields:void 0,tutorial:void 0};return o.a.createElement(o.a.Fragment,null,o.a.createElement(m.a,{label:null!==(w=I.heading)&&void 0!==w?w:"Promotion options",fitted:!0,isOpen:!0,showIcon:!1},T&&o.a.createElement(h,{hasAuto:l,hasGlobal:a,isOverriding:x,onOverride:F}),x&&o.a.createElement("hr",null),(!T||x)&&!i&&I.fields&&o.a.createElement(I.fields,{config:null!=t?t:{},onChange:v,onRemove:E}),i&&I.tutorial&&o.a.createElement(I.tutorial,null)),o.a.createElement("div",{className:r.a.bottom},s&&o.a.createElement(c.a,{size:c.b.LARGE,onClick:b,disabled:d},"Promote next post →"),(N||x)&&!p&&o.a.createElement("a",{className:r.a.removePromo,onClick:O},"Remove promotion")),o.a.createElement(f.a,{isOpen:C,title:"Are you sure?",buttons:["Yes, I'm sure","No, keep it"],onCancel:S,onAccept:()=>{v&&v({}),k(!1),P(!1)}},o.a.createElement("p",null,"Are you sure you want to remove this promotion? This ",o.a.createElement("strong",null,"cannot")," be undone!")))}},204:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),o=a.n(n),l=a(399),r=a.n(l),i=a(322),c=a.n(i),s=a(81),d=a(15),u=a(255),m=a(96);function p(e){const{group:t,showFakeOptions:a}=e,[n,l]=o.a.useState(e.openGroups.includes(t.id)),r=o.a.useCallback(()=>{l(e=>!e)},[n]),i=t.isFakePro?o.a.createElement(u.a,null,t.label):t.label;return!t.isFakePro||a||d.a.isPro?o.a.createElement(s.a,{className:t.isFakePro&&!d.a.isPro?c.a.disabled:c.a.spoiler,label:i,isOpen:n,onClick:r,scrollIntoView:!0,fitted:!0},t.fields.map(n=>{const l=Object.assign({},e);if(t.isFakePro||n.isFakePro){if(!a)return null;l.onChange=m.a.noop}return o.a.createElement(n.component,Object.assign({key:n.id,field:n},e))})):null}function b(e){var{groups:t}=e,a=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["groups"]);return t=t.filter(e=>{var t;return(null!==(t=e.when)&&void 0!==t?t:m.a.returnTrue)(a)}),o.a.createElement("div",{className:r.a.fieldGroupList},t.map(e=>o.a.createElement(p,Object.assign({key:e.id,group:e},a))))}},206:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n);function l({id:e,value:t,onChange:a,placeholder:n}){return o.a.createElement("input",{id:e,type:"text",value:t,onChange:e=>a(e.target.value),placeholder:n})}a(387)},212:function(e,t,a){e.exports={root:"MediaGridPicker__root",loading:"MediaGridPicker__loading layout__fill-parent",grid:"MediaGridPicker__grid","grid-disabled":"MediaGridPicker__grid-disabled MediaGridPicker__grid",gridDisabled:"MediaGridPicker__grid-disabled MediaGridPicker__grid",item:"MediaGridPicker__item"}},229:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(98),r=a(10),i=(a(586),a(126));function c({id:e,value:t,onChange:a,showProOptions:n,options:c}){const s=new Set(t.map(e=>e.toString())),d=e=>{const t=e.target.value,n=e.target.checked,o=c.find(e=>e.value.toString()===t);o.isFakePro||o.isDisabled||(n?s.add(t):s.delete(t),a&&a(Array.from(s)))};return o.a.createElement("div",{className:"checkbox-list"},c.filter(e=>!!e).map((t,a)=>{var c;if(t.isFakePro&&!n)return null;const u=Object(r.a)("checkbox-list__option",{"--disabled":t.isDisabled||t.isFakePro});return o.a.createElement("label",{className:u,key:a},o.a.createElement("input",{type:"checkbox",id:e,value:null!==(c=t.value.toString())&&void 0!==c?c:"",checked:s.has(t.value.toString()),onChange:d,disabled:t.isDisabled||t.isFakePro}),o.a.createElement("span",null,t.label,t.tooltip&&!t.isFakePro&&o.a.createElement(o.a.Fragment,null," ",o.a.createElement(i.a,null,t.tooltip))),t.isFakePro&&o.a.createElement("div",{className:"checkbox-list__pro-pill"},o.a.createElement(l.a,null)))}))}},235:function(e,t,a){e.exports={"moderate-viewport":"ModerateViewport__moderate-viewport",moderateViewport:"ModerateViewport__moderate-viewport","moderate-blacklist":"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport",moderateBlacklist:"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport","moderate-whitelist":"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",moderateWhitelist:"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",loading:"ModerateViewport__loading layout__fill-parent",grid:"ModerateViewport__grid","grid-disabled":"ModerateViewport__grid-disabled ModerateViewport__grid",gridDisabled:"ModerateViewport__grid-disabled ModerateViewport__grid",item:"ModerateViewport__item","item-allowed":"ModerateViewport__item-allowed ModerateViewport__item",itemAllowed:"ModerateViewport__item-allowed ModerateViewport__item","item-thumbnail":"ModerateViewport__item-thumbnail",itemThumbnail:"ModerateViewport__item-thumbnail","item-removed":"ModerateViewport__item-removed ModerateViewport__item",itemRemoved:"ModerateViewport__item-removed ModerateViewport__item","item-focused":"ModerateViewport__item-focused",itemFocused:"ModerateViewport__item-focused"}},236:function(e,t,a){e.exports={item:"PromoteTile__item",selected:"PromoteTile__selected PromoteTile__item",thumbnail:"PromoteTile__thumbnail",unselected:"PromoteTile__unselected PromoteTile__item",icon:"PromoteTile__icon"}},256:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),o=a.n(n),l=a(156),r=a.n(l),i=a(3),c=a(8),s=a(18);function d({accounts:e,value:t,onChange:a}){t=null!=t?t:[],e=null!=e?e:i.b.list;const n=t.filter(t=>e.some(e=>e.id===t)),l=new Set(n);return o.a.createElement("div",{className:r.a.root},e.map((e,t)=>o.a.createElement(u,{key:t,account:e,selected:l.has(e.id),onChange:t=>{return n=e.id,t?l.add(n):l.delete(n),void a(Array.from(l));var n}})))}function u({account:e,selected:t,onChange:a}){const n=`url("${i.b.getProfilePicUrl(e)}")`,l=()=>{a(!t)},d=Object(s.g)(l);return o.a.createElement("div",{className:r.a.row},o.a.createElement("div",{className:t?r.a.accountSelected:r.a.account,onClick:l,onKeyPress:d,role:"button",tabIndex:0},o.a.createElement("div",{className:r.a.profilePic,style:{backgroundImage:n}}),o.a.createElement("div",{className:r.a.infoColumn},o.a.createElement("div",{className:r.a.username},e.username),o.a.createElement("div",{className:r.a.accountType},e.type)),t&&o.a.createElement(c.a,{icon:"yes-alt",className:r.a.tickIcon})))}},257:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(256),r=a(33),i=a(3);function c(e){const t=i.b.getBusinessAccounts();return t.length>0?o.a.createElement(l.a,Object.assign({accounts:t},e)):o.a.createElement(r.a,{type:r.b.WARNING},"Connect a business account to use this feature.")}},258:function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n,o=a(0),l=a.n(o),r=a(72),i=a(6),c=a(64),s=a(33),d=(a(478),a(9)),u=a(8),m=a(270),p=a(4),b=a(10),h=a(3);function g({value:e,onChange:t}){const a=(e=null!=e?e:[]).slice(),o=a.map(e=>({id:e.tag,tag:e.tag,sort:e.sort})),[r,i]=l.a.useState(""),[c,d]=l.a.useState(""),[u,b]=l.a.useState(null),g=h.b.getBusinessAccounts().length>0;return l.a.createElement("div",{className:"hashtag-selector"},!g&&l.a.createElement(s.a,{type:s.b.WARNING},"Connect a business account to use this feature."),l.a.createElement(m.a,{className:"hashtag-selector__list",list:o,setList:e=>{const n=e.map(e=>({tag:e.tag,sort:e.sort}));t&&!Object(p.d)(n,a,(e,t)=>e.tag===t.tag&&e.sort===t.sort)&&t(n)},handle:".hashtag-selector__drag-handle",animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},a.map((e,n)=>l.a.createElement(f,{key:n,disabled:null!==u&&u!==n||!g,hashtag:e,onEdit:e=>((e,n)=>{a[e]=n,t&&t(a)})(n,e),onDelete:()=>(e=>{a.splice(e,1),t&&t(a)})(n),onStartEdit:()=>b(n),onStopEdit:()=>b(null)}))),l.a.createElement(E,{type:n.ADD,disabled:null!==u||!g,hashtag:{tag:r,sort:c},onDone:e=>{a.push(e),t&&t(a),i(""),d("")}}))}function f({hashtag:e,disabled:t,onEdit:a,onDelete:o,onStartEdit:r,onStopEdit:i}){const[c,s]=l.a.useState(!1),d=()=>{s(!1),i&&i()};return c?l.a.createElement(E,{type:n.EDIT,disabled:t,hashtag:e,onDone:e=>{a&&a(e),d()},onCancel:d}):l.a.createElement(v,{hashtag:e,disabled:t,onEdit:()=>{s(!0),r&&r()},onDelete:o})}function v({hashtag:e,disabled:t,onEdit:a,onDelete:n}){const o=Object(b.a)("hashtag-selector__row",{"--static":!0,"--disabled":t});return l.a.createElement("div",{className:o},l.a.createElement("div",{className:"hashtag-selector__drag-handle"},l.a.createElement(u.a,{icon:"menu"})),l.a.createElement("div",{className:"hashtag-selector__tag"},e.sort===i.a.HashtagSort.RECENT?"Most recent":"Most popular"," posts with ",l.a.createElement("strong",null,"#",e.tag)),l.a.createElement("div",{className:"hashtag-selector__buttons"},l.a.createElement(d.a,{className:"hashtag-selector__edit-btn",type:d.c.PILL,onClick:a,tooltip:"Edit hashtag"},l.a.createElement(u.a,{icon:"edit"})),l.a.createElement(d.a,{className:"hashtag-selector__delete-btn",type:d.c.DANGER_PILL,onClick:n,tooltip:"Remove hashtag"},l.a.createElement(u.a,{icon:"trash"}))))}function E({type:e,hashtag:t,disabled:a,onChange:m,onDone:p,onCancel:h,focus:g}){const f=e===n.ADD,[v,E]=l.a.useState({tag:"",sort:i.a.HashtagSort.POPULAR});Object(o.useEffect)(()=>{var e;E({tag:null!==(e=t.tag)&&void 0!==e?e:"",sort:t.sort?t.sort:i.a.HashtagSort.POPULAR})},[t]);const[_,w]=l.a.useState(0),[y,k]=l.a.useState(!0);Object(o.useEffect)(()=>{if(k(!1),_>0){const e=setTimeout(()=>k(!0),10),t=setTimeout(()=>k(!1),310);return()=>{clearTimeout(e),clearTimeout(t)}}},[_]);const C=()=>{!_&&p&&p(v)},P=Object(b.a)("hashtag-selector__row",{"--disabled":a});return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:P},l.a.createElement("input",{className:"hashtag-selector__tag",type:"text",value:"#"+v.tag,onChange:e=>{const t=e.target.value.slice(1),a={tag:Object(c.b)(t),sort:v.sort};w(t!==a.tag?Date.now():0),E(a),m&&m(a)},onKeyDown:e=>{switch(e.key){case"Enter":C();break;case"Escape":h&&h()}},autoFocus:g}),l.a.createElement(r.a,{className:"hashtag-selector__sort",placeholder:"Sort by",value:v.sort,onChange:e=>{E({tag:v.tag,sort:e.value}),m&&m({tag:v.tag,sort:e.value})},isSearchable:!1,options:[{value:i.a.HashtagSort.POPULAR,label:"Most popular"},{value:i.a.HashtagSort.RECENT,label:"Most recent"}]}),l.a.createElement("div",{className:"hashtag-selector__buttons"},f?l.a.createElement(d.a,{type:d.c.PRIMARY,className:"hashtag-selector__add-btn",tooltip:"Add new hashtag",onClick:C,disabled:0===v.tag.length},"Add"):l.a.createElement(d.a,{type:f?d.c.PRIMARY:d.c.PILL,className:"hashtag-selector__done-btn",tooltip:"Done",disabled:0===v.tag.length,onClick:C},l.a.createElement(u.a,{icon:"yes"})),!f&&l.a.createElement(d.a,{type:d.c.DANGER_PILL,className:"hashtag-selector__cancel-btn",onClick:h,tooltip:"Cancel changes"},l.a.createElement(u.a,{icon:"no"})))),_?l.a.createElement(s.a,{type:s.b.ERROR,shake:y,showIcon:!0,isDismissible:!0,onDismiss:()=>w(0)},"Hashtags may only contain letters, numbers and underscores"):null)}!function(e){e[e.ADD=0]="ADD",e[e.EDIT=1]="EDIT"}(n||(n={}))},260:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0),o=a.n(n),l=a(204);function r(e){return o.a.createElement(l.a,Object.assign({groups:e.tab.groups},e))}},261:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0);const o=a.n(n).a.createContext(null)},262:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),o=a.n(n),l=a(72),r=a(15),i=a(19),c=(a(22),a(162)),s=a(106),d=a(77),u=a(206),m=a(4);const p=[],b={linkType:"",postId:0,postTitle:"",postUrl:"",url:"",linkText:"",newTab:!1,linkDirectly:!0};function h({config:e,onChange:t,onRemove:a}){e=null!=e?e:b,e=Object.assign(Object.assign({},b),e),0===p.length&&(p.push({value:"",label:"- Do not link -"},{value:"url",label:"Custom URL"}),i.a.config.postTypes.forEach(e=>{"attachment"!==e.slug&&p.push({value:e.slug,label:e.labels.singularName})}));const l=o.a.useRef(),r=o.a.useRef(!1),s=o.a.useRef(),[d,u]=o.a.useState([]),[m,h]=o.a.useState(!1);Object(n.useEffect)(()=>(r.current=!1,e.linkType&&"url"!==e.linkType&&(h(!0),F("").then(e=>{r.current||u(e)}).finally(()=>{r.current||h(!1)})),()=>r.current=!0),[e.linkType]);const y=o.a.useCallback(n=>{""===n?a():t({linkType:n,postId:0,postTitle:"",postUrl:"",url:e.url,newTab:e.newTab,linkText:e.linkText})},[e,t]),k=o.a.useCallback(a=>{if(null===a)t(Object.assign(Object.assign({},e),{postId:0,postTitle:"",postUrl:""}));else{const n=s.current.find(e=>e.id==a.value);t(Object.assign(Object.assign({},e),{postId:a.value,postTitle:n.title,postUrl:n.permalink}))}},[e,t]),C=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{url:a}))},[e,t]),P=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{newTab:a}))},[e,t]),O=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{linkDirectly:a}))},[e,t]),S=o.a.useCallback(a=>{t(Object.assign(Object.assign({},e),{linkText:a}))},[e,t]),F=o.a.useCallback(t=>(clearTimeout(l.current),new Promise(a=>{l.current=setTimeout(()=>{i.a.restApi.searchPosts(t,e.linkType).then(e=>{s.current=e.data,a(e.data.map(e=>({value:e.id,label:e.title})))}).catch(e=>{})},1e3)})),[e.linkType]),N=i.a.config.postTypes.find(t=>t.slug===e.linkType);return o.a.createElement(o.a.Fragment,null,o.a.createElement(g,{value:e.linkType,onChange:y}),"url"===e.linkType&&o.a.createElement(f,{value:e.url,onChange:C}),e.linkType&&"url"!==e.linkType&&o.a.createElement(v,{postType:N,postId:e.postId,postTitle:e.postTitle,onChange:k,loadOptions:F,isLoading:m,defaultPosts:d}),e.linkType&&o.a.createElement(E,{value:e.linkDirectly,onChange:O}),e.linkType&&o.a.createElement(_,{value:e.newTab,onChange:P}),e.linkType&&o.a.createElement(w,{value:e.linkText,onChange:S,placeholder:c.a.getDefaultLinkText(e)}))}const g=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-to",label:"Link to"},o.a.createElement(l.a,{id:"promo-link-to",value:e||"",onChange:e=>t(e.value),options:p,isCreatable:!1}))})),f=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"link-promo-url",label:"URL",wide:!0},o.a.createElement(u.a,{id:"link-promo-url",value:e,onChange:t}))})),v=o.a.memo((function({postType:e,postId:t,postTitle:a,onChange:n,defaultPosts:r,isLoading:i,loadOptions:c}){const d=e?"Search for a "+e.labels.singularName:"Search";return o.a.createElement(s.a,{id:"link-promo-url",label:d,wide:!0},o.a.createElement(l.a,{async:!0,cacheOptions:!0,key:Object(m.q)(),id:"sli-promo-search-post",placeholder:"Select or start typing...",value:t||0,defaultValue:0,defaultInputValue:t?a:"",onChange:n,defaultOptions:r,loadOptions:c,noOptionsMessage:({inputValue:e})=>e.length?`No posts were found for "${e}"`:"Type to search for posts",loadingMessage:()=>"Searching...",isLoading:i,isSearchable:!0,isClearable:!0}))})),E=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-directly",label:"Link directly"},o.a.createElement(d.a,{id:"promo-link-directly",value:e,onChange:t}),o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"Tick this box to make posts go directly to the link. If left unticked, posts will open the popup box."),o.a.createElement("p",null,"To enable your feed's popup box and sidebar:"),o.a.createElement("ol",{style:{marginLeft:15}},o.a.createElement("li",null,"Set the ",o.a.createElement("b",null,"Design » Feed » Open posts in")," option to ",o.a.createElement("b",null,"Popup box")),o.a.createElement("li",null,"Enable the ",o.a.createElement("b",null,"Design » Popup box » Show sidebar")," option."))))})),_=o.a.memo((function({value:e,onChange:t}){return o.a.createElement(s.a,{id:"promo-link-new-tab",label:"Open in a new tab"},o.a.createElement(d.a,{id:"promo-link-new-tab",value:e,onChange:t}))})),w=o.a.memo((function({value:e,onChange:t,placeholder:a}){return o.a.createElement(s.a,{id:"promo-link-text",label:"Popup box link text"},o.a.createElement(u.a,{id:"promo-link-text",value:e,onChange:t,placeholder:a}),o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,"The text to use for the link in the popup box sidebar:",o.a.createElement("br",null),o.a.createElement("img",{src:r.a.image("popup-link-text.png"),alt:""})),o.a.createElement("p",null,"Remember to enable your feed's popup box and sidebar, like so:"),o.a.createElement("ol",{style:{marginLeft:15}},o.a.createElement("li",null,"Set the ",o.a.createElement("b",null,"Design » Feed » Open posts in")," option to ",o.a.createElement("b",null,"Popup box")),o.a.createElement("li",null,"Enable the ",o.a.createElement("b",null,"Design » Popup box » Show sidebar")," option."))))}))},263:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),o=a.n(n),l=a(236),r=a.n(l),i=a(12),c=a(54),s=a(8),d=a(4);const u=o.a.memo((function({media:e,selected:t,promo:a}){const n=i.a.getType(a),l=i.a.getConfig(a),d=n&&n.isValid(l)&&n.getIcon?n.getIcon(e,l):void 0;return o.a.createElement("div",{className:t?r.a.selected:r.a.unselected},o.a.createElement(c.a,{media:e,className:r.a.thumbnail}),d&&o.a.createElement(s.a,{className:r.a.icon,icon:d}))}),(function(e,t){return e.selected===t.selected&&e.media.id===t.media.id&&i.a.getType(e.promo)==i.a.getType(e.promo)&&Object(d.b)(i.a.getConfig(e.promo),i.a.getConfig(t.promo))}))},264:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(328),r=a.n(l),i=a(54);function c({media:e}){return o.a.createElement("div",{className:r.a.container},o.a.createElement("div",{className:r.a.sizer},o.a.createElement(i.a,{media:e})))}},266:function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),o=a.n(n),l=a(325),r=a.n(l),i=a(117),c=a(280),s=a.n(c),d=a(6),u=a(98),m=a(411),p=a(33),b=a(89),h=a(122);const g=o.a.memo((function({value:e,onChange:t,tab:a}){const[n,l]=o.a.useState(!1);function r(){l(!1)}const i=e.moderationMode===d.a.ModerationMode.WHITELIST;return o.a.createElement(h.a,{padded:!0},o.a.createElement("div",null,o.a.createElement("p",null,"You can choose to hide specific posts or to only show posts that you choose."),o.a.createElement("p",null,"Choose the type of moderation that you wish to apply, then simply click on the posts that you "," ","want to show or hide. Posts that appear in grey will not be shown in the feed."),o.a.createElement("hr",null),o.a.createElement("div",{className:s.a.mode},a.isFakePro&&o.a.createElement("div",{className:s.a.proPill},o.a.createElement(u.a,null)),o.a.createElement(m.a,{name:"manualFilterMode",value:e.moderationMode,onChange:function(n){a.isFakePro||t({moderationMode:n,moderation:e.moderation})},disabled:a.isFakePro,options:[{value:d.a.ModerationMode.BLACKLIST,label:"Hide the selected posts"},{value:d.a.ModerationMode.WHITELIST,label:"Only show the selected posts"}]})),(e.moderation.length>0||i)&&o.a.createElement("a",{className:s.a.reset,onClick:function(){l(!0)}},"Reset moderation")),!a.isFakePro&&o.a.createElement("div",null,o.a.createElement("hr",null),o.a.createElement(p.a,{type:p.b.PRO_TIP,showIcon:!0},o.a.createElement("span",null,o.a.createElement("strong",null,"Pro tip"),":"," ","You can navigate the posts using arrow keys and select them by pressing Enter."))),o.a.createElement(b.a,{isOpen:n,title:"Are you sure?",buttons:["Yes","No"],onAccept:function(){a.isFakePro||(r(),t({moderationMode:d.a.ModerationMode.BLACKLIST,moderation:[]}))},onCancel:r},o.a.createElement("p",null,"Are you sure you want to reset your moderation settings? This cannot be undone.")))}),(e,t)=>e.value.moderationMode===t.value.moderationMode&&e.value.moderation.length===t.value.moderation.length);var f=a(235),v=a.n(f),E=a(54),_=a(103),w=a(4),y=a(201),k=a(10),C=d.a.ModerationMode;const P=o.a.memo((function({value:e,feed:t,tab:a,onChange:n}){const[l,r]=o.a.useState(0),i=new Set(e.moderation);return o.a.createElement(y.a,{feed:t,selected:l,onSelectMedia:(e,t)=>r(t),onClickMedia:function(t){if(a.isFakePro||!t)return;const o=new Set(e.moderation);o.has(t.id)?o.delete(t.id):o.add(t.id),n({moderation:Array.from(o),moderationMode:e.moderationMode})},autoFocusFirst:!0,disabled:a.isFakePro,store:_.c},(t,a)=>o.a.createElement(O,{media:t,mode:e.moderationMode,focused:a===l,selected:i.has(t.id)}))}),(function(e,t){return e.value.moderationMode===t.value.moderationMode&&e.value.moderation.length===t.value.moderation.length&&Object(w.d)(e.value.moderation,t.value.moderation)})),O=o.a.forwardRef(({media:e,selected:t,focused:a,mode:l},r)=>{r||(r=o.a.useRef()),Object(n.useEffect)(()=>{a&&r.current.focus()},[a]);const i=l===C.BLACKLIST,c=Object(k.b)(t!==i?v.a.itemAllowed:v.a.itemRemoved,a?v.a.itemFocused:null);return o.a.createElement("div",{ref:r,className:c},o.a.createElement(E.a,{media:e,className:v.a.itemThumbnail}))});var S=a(9),F=a(8);function N(e){const[t,a]=Object(n.useState)("content"),l=()=>a("sidebar"),c=()=>a("content");return o.a.createElement(i.a,{primary:"content",current:t,sidebar:t=>o.a.createElement(o.a.Fragment,null,t&&o.a.createElement(i.a.Navigation,{onClick:c}),o.a.createElement(g,Object.assign({},e))),content:t=>o.a.createElement("div",{className:r.a.viewport},t&&o.a.createElement("div",{className:r.a.mobileViewportHeader},o.a.createElement(S.a,{onClick:l},o.a.createElement(F.a,{icon:"admin-generic"}),o.a.createElement("span",null,"Moderation options"))),o.a.createElement(P,Object.assign({},e)))})}},267:function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(0),o=a.n(n),l=a(326),r=a.n(l),i=a(72),c=a(121),s=a(12),d=a(262),u=a(33),m=a(4),p=a(106),b=a(77),h=a(6),g=a(11),f=a(229),v=a(203);const E={id:"link",label:"Link",component:d.a,isValid:()=>!1},_={type:"link",config:{linkType:"url",url:"https://your-promotion-url.com",linkText:"Check out my promotion"}};function w({value:e,tab:t,onChange:a,selected:n,onNextPost:l,promoTypeRef:d}){const f=c.a.mediaStore.media[n],w=n>=c.a.mediaStore.media.length-1,y=o.a.useRef(g.a.isEmpty(e.promotions)?"link":g.a.values(e.promotions)[0].type),C=o.a.useCallback(n=>{if(!t.isFakePro){y.current=n.value;const t=g.a.map(e.promotions,e=>({type:n.value,config:s.a.getConfig(e)}));a({promotions:t})}},[t,e.promotions]),P=o.a.useCallback(o=>{if(!t.isFakePro){const t=c.a.mediaStore.media[n],l={type:y.current,config:Object(m.h)(o)},r=g.a.withEntry(e.promotions,t.id,l);a({promotions:r})}},[n,t.isFakePro]),O=o.a.useCallback(()=>{if(!t.isFakePro){const t=c.a.mediaStore.media[n],o=g.a.remove(e.promotions,t.id);a({promotions:o})}},[n,t.isFakePro]),S=o.a.useCallback(()=>{!t.isFakePro&&l()},[t.isFakePro]),F=t.isFakePro?_:h.a.getFeedPromo(f,e),N=t.isFakePro?E:s.a.getTypeById(y.current),T=s.a.getConfig(F),x=void 0!==s.a.getGlobalPromo(f)&&e.globalPromotionsEnabled,I=void 0!==s.a.getAutoPromo(f)&&e.autoPromotionsEnabled,j=s.a.getTypes().map(e=>({value:e.id,label:e.label}));return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:r.a.top},o.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."),o.a.createElement("hr",null),o.a.createElement(p.a,{id:"enable-promo",label:"Enable promotion"},o.a.createElement(b.a,{value:e.promotionEnabled,onChange:e=>a({promotionEnabled:e})})),!e.promotionEnabled&&o.a.createElement(u.a,{type:u.b.WARNING,showIcon:!0},"All feed, global and automated promotions are disabled."," ","Promotions may still be edited but will not apply to posts in this feed."),o.a.createElement(k,{options:e,onChange:a}),o.a.createElement(p.a,{id:"promo-type",label:"Promotion type"},o.a.createElement(i.a,{id:"sli-promo-type",ref:d,value:N.id,onChange:C,options:j,isSearchable:!1,isCreatable:!1,isClearable:!1,disabled:t.isFakePro}))),o.a.createElement(v.a,{key:f?f.id:void 0,type:N,config:T,onChange:P,onRemove:O,hasGlobal:x,hasAuto:I,showTutorial:!f,showNextBtn:"-more-"!==N.id,isNextBtnDisabled:w,onNext:S}),t.isFakePro&&o.a.createElement("div",{className:r.a.disabledOverlay}))}const y=[{value:"global",label:"Global promotions"},{value:"auto",label:"Automated promotions"}];function k({options:e,onChange:t}){const a=Object(n.useCallback)(e=>{t({globalPromotionsEnabled:e.includes("global"),autoPromotionsEnabled:e.includes("auto")})},[t]),l=[e.globalPromotionsEnabled?"global":0,e.autoPromotionsEnabled?"auto":0];return o.a.createElement(p.a,{id:"enable-other-promos",label:"Include other promotions",disabled:!e.promotionEnabled},o.a.createElement(f.a,{value:l,onChange:a,options:y}))}var C=a(201),P=a(263);const O=o.a.memo((function({value:e,feed:t,tab:a,selected:n,onSelectMedia:l,onClickMedia:r}){return o.a.createElement(C.a,{feed:t,store:c.a.mediaStore,selected:n,onSelectMedia:l,onClickMedia:r,disabled:a.isFakePro},(t,a)=>{const l=h.a.getPromo(t,e);return o.a.createElement(P.a,{media:t,selected:a===n,promo:l})})}),(function(e,t){return e.selected===t.selected&&e.onSelectMedia===t.onSelectMedia&&e.onClickMedia===t.onClickMedia&&e.value.promotionEnabled===t.value.promotionEnabled&&e.value.autoPromotionsEnabled===t.value.autoPromotionsEnabled&&e.value.globalPromotionsEnabled===t.value.globalPromotionsEnabled&&g.a.size(e.value.promotions)===g.a.size(t.value.promotions)&&e.feed.media.length===t.feed.media.length&&e.value.promotions===t.value.promotions}));var S=a(117),F=a(122),N=a(264);function T(e){const[t,a]=o.a.useState(null),[n,l]=o.a.useState(!1),r=()=>l(!1),i=o.a.useRef(),s=o.a.useCallback(()=>{a(e=>Math.min(e+1,c.a.mediaStore.media.length-1))},[]),d=o.a.useCallback((e,t)=>{a(t)},[]),u=o.a.useCallback((e,t)=>{a(t),l(!0),requestAnimationFrame(()=>{i.current&&null!==t&&i.current.focus()})},[i]);return o.a.createElement(S.a,{primary:"content",current:n?"sidebar":"content",sidebar:a=>o.a.createElement(o.a.Fragment,null,a&&o.a.createElement(o.a.Fragment,null,o.a.createElement(S.a.Navigation,{onClick:r}),c.a.mediaStore.media[t]&&o.a.createElement(N.a,{media:c.a.mediaStore.media[t]})),o.a.createElement(F.a,null,o.a.createElement(w,Object.assign({},e,{selected:t,onNextPost:s,promoTypeRef:i})))),content:a=>o.a.createElement(o.a.Fragment,null,a&&o.a.createElement("div",{style:{textAlign:"center"}},o.a.createElement("p",null,"Click or tap a post to set up a promotion for it")),o.a.createElement(O,Object.assign({},e,{selected:t,onSelectMedia:d,onClickMedia:u})))})}},276:function(e,t,a){e.exports={"prop-field":"EditorPropField__prop-field",propField:"EditorPropField__prop-field","device-btn":"EditorPropField__device-btn",deviceBtn:"EditorPropField__device-btn",field:"EditorPropField__field"}},277:function(e,t,a){e.exports={"filter-field":"FilterFieldRow__filter-field",filterField:"FilterFieldRow__filter-field",bordered:"FilterFieldRow__bordered FilterFieldRow__filter-field",label:"FilterFieldRow__label"}},278:function(e,t,a){e.exports={"inc-global-filters":"IncGlobalFiltersField__inc-global-filters",incGlobalFilters:"IncGlobalFiltersField__inc-global-filters",label:"IncGlobalFiltersField__label",field:"IncGlobalFiltersField__field"}},280:function(e,t,a){e.exports={mode:"ModerateSidebar__mode","pro-pill":"ModerateSidebar__pro-pill",proPill:"ModerateSidebar__pro-pill",reset:"ModerateSidebar__reset"}},282:function(e,t,a){e.exports={root:"FeedEditor__root",hidden:"FeedEditor__hidden",content:"FeedEditor__content","accounts-onboarding":"FeedEditor__accounts-onboarding",accountsOnboarding:"FeedEditor__accounts-onboarding"}},283:function(e,t,a){e.exports={navbar:"EditorNavbar__navbar layout__z-high","fake-pro-item":"EditorNavbar__fake-pro-item",fakeProItem:"EditorNavbar__fake-pro-item","pro-pill":"EditorNavbar__pro-pill",proPill:"EditorNavbar__pro-pill"}},32:function(e,t,a){"use strict";var n=a(0),o=a.n(n),l=a(65),r=a(106),i=a(276),c=a.n(i),s=a(2),d=a(9),u=a(8);function m({option:e,children:t,value:a,previewDevice:n,onChange:l,onChangeDevice:r}){const i=o.a.useCallback(t=>{l({[e]:s.a.isValid(a[e])?s.a.withValue(a[e],t,n):t})},[a[e],n,l]),m=s.a.isValid(a[e]),p=m?s.a.get(a[e],n,!0):a[e];return o.a.createElement("div",{className:c.a.propField},m&&o.a.createElement("div",{className:c.a.deviceBtn},o.a.createElement(d.a,{type:d.c.PILL,size:d.b.NORMAL,onClick:()=>r(s.a.cycle(n)),tooltip:""},o.a.createElement(u.a,{icon:s.a.getIcon(n)}))),o.a.createElement("div",{className:c.a.field},t(p,i)))}t.a=function({label:e,option:t,render:a,memo:n,deps:i,when:c,disabled:s,tooltip:d}){return n=null==n||n,c=null!=c?c:()=>!0,s=null!=s?s:()=>!1,(i=null!=i?i:[]).includes(t),Object(l.a)(n=>c(n)&&o.a.createElement(r.a,Object.assign({},n,{label:e,disabled:s(n),isFakePro:n.field.isFakePro}),o.a.createElement(m,Object.assign({},n,{option:t}),(e,t)=>a(n,e,t)),d&&d(n)),n?[t].concat(i):[])}},321:function(e,t,a){e.exports={"connect-button":"ConnectSidebar__connect-button",connectButton:"ConnectSidebar__connect-button","connect-sidebar":"ConnectSidebar__connect-sidebar",connectSidebar:"ConnectSidebar__connect-sidebar","connect-account":"ConnectSidebar__connect-account",connectAccount:"ConnectSidebar__connect-account"}},322:function(e,t,a){e.exports={"field-group":"FieldGroup__field-group",fieldGroup:"FieldGroup__field-group",spoiler:"FieldGroup__spoiler","pro-pill":"FieldGroup__pro-pill",proPill:"FieldGroup__pro-pill",disabled:"FieldGroup__disabled"}},325:function(e,t,a){e.exports={viewport:"ModerateTab__viewport","mobile-viewport-header":"ModerateTab__mobile-viewport-header",mobileViewportHeader:"ModerateTab__mobile-viewport-header"}},326:function(e,t,a){e.exports={top:"PromoteSidebar__top",row:"PromoteSidebar__row","disabled-overlay":"PromoteSidebar__disabled-overlay",disabledOverlay:"PromoteSidebar__disabled-overlay"}},327:function(e,t,a){e.exports={bottom:"PromotionFields__bottom","remove-promo":"PromotionFields__remove-promo",removePromo:"PromotionFields__remove-promo"}},328:function(e,t,a){e.exports={container:"PromotePreviewTile__container",sizer:"PromotePreviewTile__sizer"}},332:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return r}));var n=a(4);const o={showFakeOptions:!0};function l(){var e;try{const t=null!==(e=localStorage.getItem("sli_editor"))&&void 0!==e?e:"{}",a=JSON.parse(t);return Object.assign(Object.assign({},o),a)}catch(e){return o}}function r(e){var t;t=Object(n.a)(l(),e),localStorage.setItem("sli_editor",JSON.stringify(t))}},399:function(e,t,a){e.exports={"field-group-list":"FieldGroupList__field-group-list",fieldGroupList:"FieldGroupList__field-group-list"}},402:function(e,t,a){e.exports={"preview-options":"DesignSidebar__preview-options",previewOptions:"DesignSidebar__preview-options"}},418:function(e,t,a){e.exports={viewport:"EditorViewport__viewport"}},419:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),o=a.n(n),l=a(158),r=a.n(l),i=a(107),c=a(19),s=a(33),d=a(81),u=a(265),m=a(9),p=a(15),b=a(40),h=a(255),g=b.a.SavedFeed;function f({name:e,showFakeOptions:t}){const a=g.getLabel(e),n=`[instagram feed="${i.a.feed.id}"]`,l=c.a.config.adminUrl+"/widgets.php",f=c.a.config.adminUrl+"/customize.php?autofocus%5Bpanel%5D=widgets";return i.a.feed.id?o.a.createElement("div",{className:r.a.embedSidebar},i.a.feed.usages.length>0&&o.a.createElement(d.a,{label:"Instances",defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",{className:r.a.instances},o.a.createElement("p",null,"This feed is currently being shown in these pages:"),o.a.createElement("ul",null,i.a.feed.usages.map((e,t)=>o.a.createElement("li",{key:t},o.a.createElement("a",{href:`${c.a.config.adminUrl}/post.php?action=edit&post=${e.id}`,target:"_blank"},e.name),o.a.createElement("span",null,"(",e.type,")")))))),o.a.createElement(d.a,{label:"Shortcode",defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"Copy the shortcode below and paste it in any page or post to embed this feed:"),o.a.createElement("div",{className:r.a.shortcode},o.a.createElement("code",null,n),o.a.createElement(u.a,{feed:i.a.feed},o.a.createElement(m.a,{type:m.c.SECONDARY},"Copy"))))),c.a.config.hasElementor&&(p.a.isPro||t)&&o.a.createElement(d.a,{className:p.a.isPro?void 0:r.a.pro,label:p.a.isPro?"Elementor Widget":o.a.createElement(h.a,null,"Elementor widget"),defaultOpen:!0,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed in Elementor:"),o.a.createElement("ol",null,o.a.createElement("li",null,o.a.createElement("span",null,"Search for the ",o.a.createElement("b",null,"Spotlight Instagram feed")," widget",o.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"Choose the one with the Instagram logo. The other one is for the normal"," ","WordPress widget."))),o.a.createElement("li",null,"Add it to your post or page"),o.a.createElement("li",null,"Then choose ",o.a.createElement("strong",null,a)," from the list of feeds.")),o.a.createElement(E,{images:[{src:"elementor-widget-search.png",alt:"Searching for the widget"},{src:"elementor-widget-feed.png",alt:"The feed in a widget"}]}))),o.a.createElement(d.a,{label:"WordPress Block",defaultOpen:!c.a.config.hasElementor,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed in the WordPress block editor:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Search for the ",o.a.createElement("b",null,"Spotlight Instagram feed")," block"),o.a.createElement("li",null,"add it to your post or page."),b.a.list.length>1?o.a.createElement("li",null,"Next, choose ",o.a.createElement("strong",null,a)," from the list of feeds."):o.a.createElement("li",null,"Since this is your only feed, Spotlight will automatically show this feed.")),b.a.list.length>1?o.a.createElement(E,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block-select.png",alt:"Choosing a feed for the block"},{src:"wp-block.png",alt:"The feed in a block"}]}):o.a.createElement(E,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block.png",alt:"The feed in a block"}]}))),o.a.createElement(d.a,{label:"WordPress Widget",defaultOpen:!1,fitted:!0,scrollIntoView:!0},o.a.createElement("div",null,o.a.createElement("p",null,"To embed this feed as a WordPress widget:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Go to the"," ",o.a.createElement("a",{href:l,target:"_blank"},"Appearance » Widgets")," ","page or the"," ",o.a.createElement("a",{href:f,target:"_blank"},"Widgets section of the Customizer")),o.a.createElement("li",null,"Then, add a ",o.a.createElement("strong",null,"Spotlight Instagram Feed")," widget"),o.a.createElement("li",null,"In the widget's settings, choose the ",o.a.createElement("strong",null,a)," as the feed"," ","to be shown.")),o.a.createElement(v,{img:"widget.png",alt:"Example of a widget"})))):o.a.createElement("div",{className:r.a.embedSidebar},o.a.createElement("div",{className:r.a.saveMessage},o.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"You're almost there... Click the ",o.a.createElement("strong",null,"Save")," button at the top-right to be"," ","able to embed this feed on your site!")))}function v({img:e,alt:t,annotation:a,onClick:n}){return o.a.createElement("figure",{className:r.a.example},o.a.createElement("figcaption",{className:r.a.caption},"Example:"),o.a.createElement("img",{src:p.a.image(e),alt:null!=t?t:"",style:{cursor:n?"pointer":"default"},onClick:n}),void 0!==a&&o.a.createElement("div",{className:r.a.exampleAnnotation},a))}function E({images:e}){const[t,a]=o.a.useState(0),l=o.a.useRef(),r=()=>{i(),l.current=setInterval(c,2e3)},i=()=>{clearInterval(l.current)},c=()=>{r(),a(t=>(t+1)%e.length)};Object(n.useEffect)(()=>(r(),i),[]);const s=e[t];return o.a.createElement(v,{img:s.src,alt:s.alt,annotation:t+1,onClick:c})}},420:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),o=a.n(n),l=a(421),r=a.n(l),i=a(96);function c(e=i.a.returnTrue){return t=>(void 0===e||e(t))&&o.a.createElement("div",{className:r.a.separator})}},421:function(e,t,a){e.exports={separator:"EditorFieldSeparator__separator"}},426:function(e,t,a){"use strict";a.d(t,"a",(function(){return Y}));var n=a(0),o=a.n(n),l=a(282),r=a.n(l),i=a(283),c=a.n(i),s=a(15),d=a(6),u=a(88),m=a(98),p=a(174),b=a(284),h=a(312),g=a(138),f=a(9),v=a(313),E=a(314),_=a(176),w=a(40).a.SavedFeed;const y=o.a.memo((function(e){const t=d.a.Options.hasSources(e.value),a=(e.showFakeOptions||s.a.isPro?e.tabs:e.tabs.filter(e=>!e.isFakePro)).map(e=>({key:e.id,label:o.a.createElement(k,{key:e.id,tab:e}),disabled:!e.alwaysEnabled&&!t}));return o.a.createElement("div",{className:c.a.navbar},o.a.createElement(p.a,{breakpoints:b.a.Sizes.ALL,render:t=>{const n=e.showNameField?o.a.createElement(h.a,{key:"name-field",value:e.name,onDone:e.onRename,defaultValue:w.getDefaultName()}):void 0,l=e.showDoneBtn?o.a.createElement(g.a,{key:"save-btn",content:t=>t?"Saving ...":e.doneBtnText,isSaving:e.isSaving,disabled:!e.isDoneBtnEnabled,onClick:e.onSave}):void 0,r=e.showCancelBtn?o.a.createElement(f.a,{key:"cancel-btn",onClick:e.onCancel,disabled:!e.isCancelBtnEnabled,children:e.cancelBtnText}):void 0;if(t<=b.a.Sizes.SMALL)return o.a.createElement(v.a,{steps:a,current:e.tabId,onChangeStep:e.onChangeTab,firstStep:r,lastStep:l},n);if(t<=b.a.Sizes.MEDIUM)return o.a.createElement(E.a,{pages:a,current:e.tabId,onChangePage:e.onChangeTab,hideMenuArrow:!0,showNavArrows:!0},{path:n?[n]:[],right:[r,l]});let i=[o.a.createElement(u.a,{key:"logo"})];return n&&i.push(n),o.a.createElement(_.a,{current:e.tabId,onClickTab:e.onChangeTab},{path:i,tabs:a,right:[r,l]})}}))}),(e,t)=>e.tabId===t.tabId&&e.name===t.name&&e.showFakeOptions===t.showFakeOptions&&e.showDoneBtn===t.showDoneBtn&&e.showCancelBtn===t.showCancelBtn&&e.doneBtnText===t.doneBtnText&&e.cancelBtnText===t.cancelBtnText&&e.showNameField===t.showNameField&&e.onChangeTab===t.onChangeTab&&e.onRename===t.onRename&&e.onSave===t.onSave&&e.onCancel===t.onCancel&&e.isSaving===t.isSaving&&e.isDoneBtnEnabled===t.isDoneBtnEnabled&&e.isCancelBtnEnabled===t.isCancelBtnEnabled&&d.a.Options.hasSources(e.value)===d.a.Options.hasSources(t.value));function k({tab:e}){return e.isFakePro?o.a.createElement(C,{tab:e}):o.a.createElement("span",null,e.label)}function C({tab:e}){return o.a.createElement("span",{className:c.a.fakeProItem},o.a.createElement(m.a,{className:c.a.proPill}),o.a.createElement("span",null,e.label))}var P=a(122),O=a(117);function S(e){var{children:t,showPreviewBtn:a,onOpenPreview:n}=e,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children","showPreviewBtn","onOpenPreview"]);return!l.tab.sidebar||l.tab.showSidebar&&!l.tab.showSidebar()?null:o.a.createElement(o.a.Fragment,null,a&&o.a.createElement(O.a.Navigation,{align:"right",text:"Preview",icon:"visibility",onClick:n}),o.a.createElement(P.a,null,l.tab.sidebar&&o.a.createElement(l.tab.sidebar,Object.assign({tab:l.tab},l)),null!=t?t:null))}var F=a(418),N=a.n(F),T=a(108),x=a.n(T),I=a(7),j=a(2),M=a(129),A=a(119),L=a(8),B=a(87),D=a(19);const R=Object(I.b)(({feed:e,showCloseBtn:t,onClose:a})=>{const n=o.a.useRef(),l=o.a.useRef();if(!d.a.Options.hasSources(e.options))return o.a.createElement(A.a,{className:x.a.onboarding},t&&o.a.createElement(f.a,{onClick:a},o.a.createElement(L.a,{icon:"hidden"}),o.a.createElement("span",null,"Close Preview")),o.a.createElement("div",null,o.a.createElement("h1",null,"Select an account to get"," ",o.a.createElement("span",{className:x.a.noBreak},"started"," "," →")),o.a.createElement("p",null,"Your Instagram posts will be displayed instantly so you can easily design your feed using"," ","the live interactive preview.")));const r=e.mode,i=r===j.a.Mode.DESKTOP,c=r===j.a.Mode.TABLET,s=r===j.a.Mode.PHONE,u=i?x.a.root:x.a.shrunkRoot,m=s?x.a.phoneSizer:c?x.a.tabletSizer:x.a.sizer;return o.a.createElement("div",{className:u,ref:n},o.a.createElement("div",{className:x.a.statusBar},o.a.createElement("div",{className:x.a.statusIndicator},o.a.createElement("svg",{viewBox:"0 0 24 24"},o.a.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"red"})),o.a.createElement("span",{className:x.a.indicatorText},"Live interactive preview"),o.a.createElement("span",{className:x.a.indicatorDash}," — "),o.a.createElement("span",{className:x.a.indicatorCounter},"Showing ",e.media.length," out of ",e.totalMedia," posts"),e.numLoadedMore>0&&o.a.createElement("span",{className:x.a.reset},"(",o.a.createElement("a",{onClick:()=>e.load()},"Reset"),")")),t&&o.a.createElement(f.a,{onClick:a},o.a.createElement(L.a,{icon:"hidden"}),o.a.createElement("span",null,"Close Preview"))),o.a.createElement("div",{className:x.a.container},o.a.createElement(B.a.Context.Provider,{value:{target:i?n:l}},o.a.createElement(M.b.Provider,{value:!0},o.a.createElement("div",{className:m,ref:l},0===e.media.length&&d.a.Options.hasSources(e.options)&&d.a.Options.isLimitingPosts(e.options)&&!e.isLoading?o.a.createElement(z,null):o.a.createElement(M.a,{feed:e}))))))});function z(){return o.a.createElement("div",{className:x.a.noPostsMsg},o.a.createElement("p",null,"There are no posts to show. Here are a few things you can try:"),o.a.createElement("ol",null,o.a.createElement("li",null,"Make sure that the selected accounts/hashtags have posts related to them on Instagram."),o.a.createElement("li",null,'Check the "Types of posts" option in "Design » Feed".'),o.a.createElement("li",null,'Try relaxing your "Filters" (per feed and global) and "Moderation".')),o.a.createElement("p",null,"If you can't find the cause, please"," ",o.a.createElement("a",{target:"_blank",href:D.a.resources.supportUrl},"contact support"),"."))}function H(e){var{children:t,isCollapsed:a,onClosePreview:n}=e,l=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,["children","isCollapsed","onClosePreview"]);return o.a.createElement("div",{className:N.a.viewport},t||(l.tab.viewport?o.a.createElement(l.tab.viewport,Object.assign({},l)):o.a.createElement(R,Object.assign({},l,{showCloseBtn:a,onClose:n}))))}var V=a(261),G=a(3),U=a(137),W=a(1);function K({onChange:e,onChangeTab:t}){const[a,n]=o.a.useState(!1),l=o.a.useRef();return o.a.createElement(U.a,{beforeConnect:e=>{n(!0),l.current=e},onConnect:()=>{e&&e({accounts:W.o.array([l.current])}),setTimeout(()=>{t&&t("design")},A.a.TRANSITION_DURATION)},isTransitioning:a})}function Y(e){var t,a,l,i,c,s,u,m,p=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(a[n[o]]=e[n[o]])}return a}(e,[]);const[b,h]=Object(n.useState)(!1),g=()=>h(!0),f=()=>h(!1);p.tabs=null!==(t=p.tabs)&&void 0!==t?t:[],p.showDoneBtn=null===(a=p.showDoneBtn)||void 0===a||a,p.showCancelBtn=null===(l=p.showCancelBtn)||void 0===l||l,p.showNameField=null!==(i=p.showNameField)&&void 0!==i&&i,p.doneBtnText=null!==(c=p.doneBtnText)&&void 0!==c?c:"Done",p.cancelBtnText=null!==(s=p.cancelBtnText)&&void 0!==s?s:"Cancel",p.isDoneBtnEnabled=null===(u=p.isDoneBtnEnabled)||void 0===u||u,p.isCancelBtnEnabled=null===(m=p.isCancelBtnEnabled)||void 0===m||m;const v=p.tabs.find(e=>e.id===p.tabId),E=o.a.useRef();E.current||(E.current=new d.a(p.value),E.current.load()),Object(n.useEffect)(()=>{E.current.options=p.value},[p.value]),Object(n.useEffect)(()=>{E.current.mode=p.previewDevice},[p.previewDevice]);const _=d.a.ComputedOptions.compute(p.value),w=Object.assign(Object.assign({},p),{computed:_,tab:v,feed:E.current});return o.a.createElement(V.a.Provider,{value:p},o.a.createElement("div",{className:r.a.root},o.a.createElement(y,Object.assign({},p)),G.b.hasAccounts()?o.a.createElement("div",{className:r.a.content},void 0===v.component?o.a.createElement(O.a,{primary:"content",current:b?"content":"sidebar",sidebar:e=>o.a.createElement(S,Object.assign({},w,{showPreviewBtn:e,onOpenPreview:g})),content:e=>o.a.createElement(H,Object.assign({},w,{isCollapsed:e,onClosePreview:f}))}):o.a.createElement(v.component,Object.assign({},w))):o.a.createElement("div",{className:r.a.accountsOnboarding},o.a.createElement(K,Object.assign({},w)))))}},478:function(e,t,a){},587:function(e,t,a){},65:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),l=a(4),r=a(2);function i(e,t=[]){return o.a.memo(e,(e,a)=>{const n=t.reduce((t,n)=>t&&Object(l.b)(e.value[n],a.value[n]),t.length>0),o=!t.reduce((e,t)=>e||r.a.isValid(a.value[t]),!1)||e.previewDevice===a.previewDevice&&e.onChangeDevice===a.onChangeDevice;return n&&o&&e.showFakeOptions===a.showFakeOptions&&e.onChange===a.onChange})}},77:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),o=a.n(n);function l({id:e,value:t,onChange:a,disabled:n}){return o.a.createElement("div",{className:"checkbox-field"},o.a.createElement("div",{className:"checkbox-field__aligner"},o.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:!!t,onChange:e=>a(e.target.checked),disabled:n})))}a(387)},84:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),o=a.n(n),l=a(405),r=a(4);function i({value:e,onChange:t,min:a,max:n,emptyMin:i,placeholder:c,id:s,unit:d}){e=null!=e?e:"",a=null!=a?a:0,n=null!=n?n:1/0,c=null!=c?c:"",i=null!=i&&i;const u=o.a.useCallback(e=>{const o=e.target.value,l=parseInt(o),i=isNaN(l)?o:Object(r.g)(l,a,n);t&&t(i)},[a,n,t]),m=o.a.useCallback(()=>{i&&e<=a&&e>=n&&t&&t("")},[i,e,a,n,t]),p=o.a.useCallback(n=>{"ArrowUp"===n.key&&""===e&&t&&t(i?a+1:a)},[e,a,i,t]),b=i&&e<=a?"":e,[h,g]=Array.isArray(d)?d:[d,d],f=1===e?h:g;return f?o.a.createElement(l.a,{id:s,type:"number",unit:f,value:b,min:a,max:n,placeholder:c+"",onChange:u,onBlur:m,onKeyDown:p}):o.a.createElement("input",{id:s,type:"number",value:b,min:a,max:n,placeholder:c+"",onChange:u,onBlur:m,onKeyDown:p})}}}]);
ui/dist/elementor-editor.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[9],{0:function(t,o){t.exports=e},10:function(e,t,o){"use strict";function a(...e){return e.filter(e=>!!e).join(" ")}function n(e){return a(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return i})),o.d(t,"e",(function(){return r})),o.d(t,"d",(function(){return l}));const r={onMouseDown:e=>e.preventDefault()};function l(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}},102:function(e,t,o){"use strict";o.d(t,"b",(function(){return s})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return u}));var a=o(6),n=o(22),i=o(4),r=o(29),l=o(12);class s{constructor(e){this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.config=Object(i.g)(e),void 0===this.config.watch&&(this.config.watch={all:!0})}fetchMedia(e,t){if(this.hasCache(e))return Promise.resolve(this.media);const o=Object.assign({},e.options,{moderation:this.isWatchingField("moderation")?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.isWatchingField("hashtagBlacklist")?e.options.hashtagBlacklist:[],hashtagWhitelist:this.isWatchingField("hashtagWhitelist")?e.options.hashtagWhitelist:[],captionBlacklist:this.isWatchingField("captionBlacklist")?e.options.captionBlacklist:[],captionWhitelist:this.isWatchingField("captionWhitelist")?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.isWatchingField("hashtagBlacklistSettings")&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.isWatchingField("hashtagWhitelistSettings")&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.isWatchingField("captionBlacklistSettings")&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.isWatchingField("captionWhitelistSettings")&&e.options.captionWhitelistSettings});return t&&t(),n.a.getFeedMedia(o).then(t=>(this.prevOptions=new a.a.Options(e.options),this.media=[],this.addMedia(t.data.media),this.media))}addMedia(e){e.forEach(e=>{this.media.some(t=>t.id==e.id)||this.media.push(e)})}hasCache(e){return null!==this.prevOptions&&!this.isCacheInvalid(e)}isWatchingField(e){var t,o,a;let n=null!==(t=this.config.watch.all)&&void 0!==t&&t;return 1===l.a.size(this.config.watch)&&void 0!==this.config.watch.all?n:(s.FILTER_FIELDS.includes(e)&&(n=null!==(o=l.a.get(this.config.watch,"filters"))&&void 0!==o?o:n),null!==(a=l.a.get(this.config.watch,e))&&void 0!==a?a:n)}isCacheInvalid(e){const t=e.options,o=this.prevOptions;if(Object(i.h)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(this.isWatchingField("accounts")&&!Object(i.e)(t.accounts,o.accounts))return!0;if(this.isWatchingField("tagged")&&!Object(i.e)(t.tagged,o.tagged))return!0;if(this.isWatchingField("hashtags")&&!Object(i.e)(t.hashtags,o.hashtags,r.c))return!0;if(this.isWatchingField("moderationMode")&&t.moderationMode!==o.moderationMode)return!0;if(this.isWatchingField("moderation")&&!Object(i.e)(t.moderation,o.moderation))return!0;if(this.isWatchingField("filters")){if(this.isWatchingField("captionWhitelistSettings")&&t.captionWhitelistSettings!==o.captionWhitelistSettings)return!0;if(this.isWatchingField("captionBlacklistSettings")&&t.captionBlacklistSettings!==o.captionBlacklistSettings)return!0;if(this.isWatchingField("hashtagWhitelistSettings")&&t.hashtagWhitelistSettings!==o.hashtagWhitelistSettings)return!0;if(this.isWatchingField("hashtagBlacklistSettings")&&t.hashtagBlacklistSettings!==o.hashtagBlacklistSettings)return!0;if(this.isWatchingField("captionWhitelist")&&!Object(i.e)(t.captionWhitelist,o.captionWhitelist))return!0;if(this.isWatchingField("captionBlacklist")&&!Object(i.e)(t.captionBlacklist,o.captionBlacklist))return!0;if(this.isWatchingField("hashtagWhitelist")&&!Object(i.e)(t.hashtagWhitelist,o.hashtagWhitelist))return!0;if(this.isWatchingField("hashtagBlacklist")&&!Object(i.e)(t.hashtagBlacklist,o.hashtagBlacklist))return!0}return!1}}!function(e){e.FILTER_FIELDS=["hashtagBlacklist","hashtagWhitelist","captionBlacklist","captionWhitelist","hashtagBlacklistSettings","hashtagWhitelistSettings","captionBlacklistSettings","captionWhitelistSettings"]}(s||(s={}));const c=new s({watch:{all:!0,filters:!1}}),u=new s({watch:{all:!0,moderation:!1}})},103:function(e,t,o){"use strict";o.d(t,"a",(function(){return E}));var a=o(0),n=o.n(a),i=o(64),r=o(13),l=o.n(r),s=o(7),c=o(3),u=o(592),d=o(412),m=o(80),p=o(133),_=o(127),h=o(47),f=o(9),g=o(35),b=o(19),y=o(73),v=Object(s.b)((function({account:e,onUpdate:t}){const[o,a]=n.a.useState(!1),[i,r]=n.a.useState(""),[s,v]=n.a.useState(!1),E=e.type===c.a.Type.PERSONAL,x=c.b.getBioText(e),S=()=>{e.customBio=i,v(!0),h.a.updateAccount(e).then(()=>{a(!1),v(!1),t&&t()})},M=o=>{e.customProfilePicUrl=o,v(!0),h.a.updateAccount(e).then(()=>{v(!1),t&&t()})};return n.a.createElement("div",{className:l.a.root},n.a.createElement("div",{className:l.a.container},n.a.createElement("div",{className:l.a.infoColumn},n.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:l.a.username},"@",e.username),n.a.createElement("div",{className:l.a.row},n.a.createElement("span",{className:l.a.label},"Spotlight ID:"),e.id),n.a.createElement("div",{className:l.a.row},n.a.createElement("span",{className:l.a.label},"User ID:"),e.userId),n.a.createElement("div",{className:l.a.row},n.a.createElement("span",{className:l.a.label},"Type:"),e.type),!o&&n.a.createElement("div",{className:l.a.row},n.a.createElement("div",null,n.a.createElement("span",{className:l.a.label},"Bio:"),n.a.createElement("a",{className:l.a.editBioLink,onClick:()=>{r(c.b.getBioText(e)),a(!0)}},"Edit bio"),n.a.createElement("pre",{className:l.a.bio},x.length>0?x:"(No bio)"))),o&&n.a.createElement("div",{className:l.a.row},n.a.createElement("textarea",{className:l.a.bioEditor,value:i,onChange:e=>{r(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(S(),e.preventDefault(),e.stopPropagation())},rows:4}),n.a.createElement("div",{className:l.a.bioFooter},n.a.createElement("div",{className:l.a.bioEditingControls},s&&n.a.createElement("span",null,"Please wait ...")),n.a.createElement("div",{className:l.a.bioEditingControls},n.a.createElement(f.a,{className:l.a.bioEditingButton,type:f.c.DANGER,disabled:s,onClick:()=>{e.customBio="",v(!0),h.a.updateAccount(e).then(()=>{a(!1),v(!1),t&&t()})}},"Reset"),n.a.createElement(f.a,{className:l.a.bioEditingButton,type:f.c.SECONDARY,disabled:s,onClick:()=>{a(!1)}},"Cancel"),n.a.createElement(f.a,{className:l.a.bioEditingButton,type:f.c.PRIMARY,disabled:s,onClick:S},"Save"))))),n.a.createElement("div",{className:l.a.picColumn},n.a.createElement("div",null,n.a.createElement(y.a,{account:e,className:l.a.profilePic})),n.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),o=_.a.media.attachment(t).attributes.url;M(o)}},({open:e})=>n.a.createElement(f.a,{type:f.c.SECONDARY,className:l.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&n.a.createElement("a",{className:l.a.resetCustomPic,onClick:()=>{M("")}},"Reset profile picture"))),E&&n.a.createElement("div",{className:l.a.personalInfoMessage},n.a.createElement(g.a,{type:g.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",n.a.createElement("a",{href:b.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),n.a.createElement(m.a,{label:"View access token",stealth:!0},n.a.createElement("div",{className:l.a.row},e.accessToken&&n.a.createElement("div",null,n.a.createElement("p",null,n.a.createElement("span",{className:l.a.label},"Expires on:"),n.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),n.a.createElement("pre",{className:l.a.accessToken},e.accessToken.code)))))}));function E({isOpen:e,onClose:t,onUpdate:o,account:a}){return n.a.createElement(i.a,{isOpen:e&&!!a,title:"Account details",icon:"admin-users",onClose:t},n.a.createElement(i.a.Content,null,a&&n.a.createElement(v,{account:a,onUpdate:o})))}},11:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(15),i=o(12),r=o(4);!function(e){function t(e){return e?c(e.type):void 0}function o(e){var o;if("object"!=typeof e)return!1;const a=t(e);return void 0!==a&&a.isValid(null!==(o=e.config)&&void 0!==o?o:{})}function a(t){return t?e.getPromoFromDictionary(t,n.a.config.globalPromotions):void 0}function l(e){const t=s(e);return void 0===t?void 0:t.promotion}function s(t){if(t)for(const o of n.a.config.autoPromotions){const a=e.Automation.getType(o),n=e.Automation.getConfig(o);if(a&&a.matches(t,n))return o}}function c(t){return e.types.find(e=>e.id===t)}let u;e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getType=t,e.isValid=o,e.getPromoFromDictionary=function(t,o){const a=i.a.get(o,t.id);if(a)return e.getType(a)?a:void 0},e.getPromo=function(e){return Object(r.j)(o,[()=>a(e),()=>l(e)])},e.getGlobalPromo=a,e.getAutoPromo=l,e.getAutomation=s,e.types=[],e.getTypes=function(){return e.types},e.registerType=function(t){e.types.push(t)},e.getTypeById=c,e.clearTypes=function(){e.types.splice(0,e.types.length)},function(e){e.getType=function(e){return e?o(e.type):void 0},e.getConfig=function(e){var t,o;return e&&null!==(o=null!==(t=e.config)&&void 0!==t?t:e.data)&&void 0!==o?o:{}},e.getPromotion=function(e){return e?e.promotion:void 0};const t=[];function o(e){return t.find(t=>t.id===e)}e.getTypes=function(){return t},e.registerType=function(e){t.push(e)},e.getTypeById=o,e.clearTypes=function(){t.splice(0,t.length)}}(u=e.Automation||(e.Automation={}))}(a||(a={}))},111:function(e,t,o){e.exports={label:"TabNavbar__label",tab:"TabNavbar__tab",current:"TabNavbar__current TabNavbar__tab",disabled:"TabNavbar__disabled TabNavbar__tab"}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(4);!function(e){function t(e,t){return(null!=e?e:{}).hasOwnProperty(t.toString())}function o(e,t){return(null!=e?e:{})[t.toString()]}function a(e,t,o){return(e=null!=e?e:{})[t.toString()]=o,e}e.has=t,e.get=o,e.set=a,e.ensure=function(o,n,i){return t(o,n)||a(o,n,i),e.get(o,n)},e.withEntry=function(t,o,a){return e.set(Object(n.g)(null!=t?t:{}),o,a)},e.remove=function(e,t){return delete(e=null!=e?e:{})[t.toString()],e},e.without=function(t,o){return e.remove(Object(n.g)(null!=t?t:{}),o)},e.at=function(t,a){return o(t,e.keys(t)[a])},e.keys=function(e){return Object.keys(null!=e?e:{})},e.values=function(e){return Object.values(null!=e?e:{})},e.entries=function(t){return e.keys(t).map(e=>[e,t[e]])},e.map=function(t,o){const a={};return e.forEach(t,(e,t)=>a[e]=o(t,e)),a},e.size=function(t){return e.keys(null!=t?t:{}).length},e.isEmpty=function(t){return 0===e.size(null!=t?t:{})},e.equals=function(e,t){return Object(n.l)(e,t)},e.forEach=function(t,o){e.keys(t).forEach(e=>o(e,t[e]))},e.fromArray=function(t){const o={};return t.forEach(([t,a])=>e.set(o,t,a)),o},e.fromMap=function(t){const o={};return t.forEach((t,a)=>e.set(o,a,t)),o}}(a||(a={}))},121:function(e,t,o){e.exports={root:"PopupTextField__root layout__flex-row",container:"PopupTextField__container layout__flex-row","edit-container":"PopupTextField__edit-container PopupTextField__container layout__flex-row",editContainer:"PopupTextField__edit-container PopupTextField__container layout__flex-row","static-container":"PopupTextField__static-container PopupTextField__container layout__flex-row",staticContainer:"PopupTextField__static-container PopupTextField__container layout__flex-row","edit-icon":"PopupTextField__edit-icon dashicons__dashicon-normal",editIcon:"PopupTextField__edit-icon dashicons__dashicon-normal",label:"PopupTextField__label","done-btn":"PopupTextField__done-btn",doneBtn:"PopupTextField__done-btn"}},122:function(e,t,o){e.exports={root:"ProUpgradeBtn__root"}},124:function(e,t,o){"use strict";var a=o(102);t.a=new class{constructor(){this.mediaStore=a.a}}},13:function(e,t,o){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},130:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var a=o(0),n=o.n(a),i=o(7),r=o(40),l=o(6),s=o(92);const c=Object(i.b)(({feed:e})=>{var t;const o=r.a.getById(e.options.layout),a=l.a.ComputedOptions.compute(e.options,e.mode);return n.a.createElement(null!==(t=o.component)&&void 0!==t?t:s.a,{feed:e,options:a})})},131:function(e,t,o){"use strict";o.d(t,"a",(function(){return b}));var a=o(0),n=o.n(a),i=o(81),r=o.n(i),l=o(25),s=o(69),c=o.n(s),u=o(58),d=o.n(u),m=o(7),p=o(4),_=o(123),h=Object(m.b)((function({field:e}){const t="settings-field-"+Object(p.p)(),o=!e.label||e.fullWidth;return n.a.createElement("div",{className:d.a.root},e.label&&n.a.createElement("div",{className:d.a.label},n.a.createElement("label",{htmlFor:t},e.label)),n.a.createElement("div",{className:d.a.container},n.a.createElement("div",{className:o?d.a.controlFullWidth:d.a.controlPartialWidth},n.a.createElement(e.component,{id:t})),e.tooltip&&n.a.createElement("div",{className:d.a.tooltip},n.a.createElement(_.a,null,e.tooltip))))}));function f({group:e}){return n.a.createElement("div",{className:c.a.root},e.title&&e.title.length>0&&n.a.createElement("h1",{className:c.a.title},e.title),e.component&&n.a.createElement("div",{className:c.a.content},n.a.createElement(e.component)),e.fields&&n.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>n.a.createElement(h,{field:e,key:e.id}))))}var g=o(18);function b({page:e}){return Object(g.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(l.c.save(),e.preventDefault(),e.stopPropagation())}),n.a.createElement("article",{className:r.a.root},e.component&&n.a.createElement("div",{className:r.a.content},n.a.createElement(e.component)),e.groups&&n.a.createElement("div",{className:r.a.groupList},e.groups.map(e=>n.a.createElement(f,{key:e.id,group:e}))))}},14:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaPopupBox__container layout__flex-box",horizontal:"MediaPopupBox__horizontal MediaPopupBox__container layout__flex-box",vertical:"MediaPopupBox__vertical MediaPopupBox__container layout__flex-box",layer:"MediaPopupBox__layer layout__flex-box",control:"MediaPopupBox__control","control-label":"MediaPopupBox__control-label",controlLabel:"MediaPopupBox__control-label","control-icon":"MediaPopupBox__control-icon",controlIcon:"MediaPopupBox__control-icon","close-button":"MediaPopupBox__close-button MediaPopupBox__control",closeButton:"MediaPopupBox__close-button MediaPopupBox__control","nav-layer":"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box",navLayer:"MediaPopupBox__nav-layer MediaPopupBox__layer layout__flex-box","nav-boundary":"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box",navBoundary:"MediaPopupBox__nav-boundary MediaPopupBox__layer layout__flex-box","nav-aligner":"MediaPopupBox__nav-aligner layout__flex-box",navAligner:"MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-sidebar":"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerSidebar:"MediaPopupBox__nav-aligner-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-aligner-no-sidebar":"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box",navAlignerNoSidebar:"MediaPopupBox__nav-aligner-no-sidebar MediaPopupBox__nav-aligner layout__flex-box","nav-btn":"MediaPopupBox__nav-btn MediaPopupBox__control",navBtn:"MediaPopupBox__nav-btn MediaPopupBox__control","prev-btn":"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control",prevBtn:"MediaPopupBox__prev-btn MediaPopupBox__nav-btn MediaPopupBox__control","next-btn":"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control",nextBtn:"MediaPopupBox__next-btn MediaPopupBox__nav-btn MediaPopupBox__control","modal-layer":"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box",modalLayer:"MediaPopupBox__modal-layer MediaPopupBox__layer layout__flex-box","modal-aligner":"MediaPopupBox__modal-aligner layout__flex-box",modalAligner:"MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-sidebar":"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerSidebar:"MediaPopupBox__modal-aligner-sidebar MediaPopupBox__modal-aligner layout__flex-box","modal-aligner-no-sidebar":"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modalAlignerNoSidebar:"MediaPopupBox__modal-aligner-no-sidebar MediaPopupBox__modal-aligner layout__flex-box",modal:"MediaPopupBox__modal","no-scroll":"MediaPopupBox__no-scroll",noScroll:"MediaPopupBox__no-scroll"}},15:function(e,t,o){"use strict";var a,n=o(11);let i;t.a=i={isPro:!1,config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl,autoPromotions:SliCommonL10n.autoPromotions,globalPromotions:null!==(a=SliCommonL10n.globalPromotions)&&void 0!==a?a:{}},image:e=>`${i.config.imagesUrl}/${e}`},n.a.registerType({id:"link",label:"Link",isValid:()=>!1}),n.a.registerType({id:"-more-",label:"- More promotion types -",isValid:()=>!1}),n.a.Automation.registerType({id:"hashtag",label:"Hashtag",matches:()=>!1})},150:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var a=o(0),n=o.n(a),i=o(122),r=o.n(i),l=o(19);function s({url:e,children:t}){return n.a.createElement("a",{className:r.a.root,href:null!=e?e:l.a.resources.pricingUrl,target:"_blank"},null!=t?t:"Free 14-day PRO trial")}},16:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));const a=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},160:function(e,t,o){"use strict";function a(e,t){return"url"===t.linkType?t.url:t.postUrl}var n;o.d(t,"a",(function(){return n})),t.b={id:"link",label:"Link",getIcon:()=>"admin-links",getPopupLink:function(e,t){return"string"==typeof t.linkText&&t.linkText.length>0?[t.linkText,t.newTab]:[n.getDefaultLinkText(t),t.newTab]},isValid:function(e){return"string"==typeof e.linkType&&e.linkType.length>0&&("url"===e.linkType&&"string"==typeof e.url&&e.url.length>0||!!e.postId&&"string"==typeof e.postUrl&&e.postUrl.length>0)},getMediaUrl:a,onMediaClick:function(e,t){var o;const n=a(0,t),i=null===(o=t.linkDirectly)||void 0===o||o;return!(!n||!i)&&(window.open(n,t.newTab?"_blank":"_self"),!0)}},function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(n||(n={}))},164:function(e,t,o){e.exports={"menu-link":"PageMenuNavbar__menu-link",menuLink:"PageMenuNavbar__menu-link","menu-ref":"PageMenuNavbar__menu-ref",menuRef:"PageMenuNavbar__menu-ref","arrow-down":"PageMenuNavbar__arrow-down",arrowDown:"PageMenuNavbar__arrow-down"}},17:function(e,t,o){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},171:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var a=o(0),n=o.n(a),i=o(46);function r({breakpoints:e,render:t,children:o}){const[r,l]=n.a.useState(null),s=n.a.useCallback(()=>{const t=Object(i.b)();l(()=>e.reduce((e,o)=>t.width<=o&&o<e?o:e,1/0))},[e]);Object(a.useEffect)(()=>(s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)),[]);const c=t?t(r):n.a.createElement(o,{breakpoint:r});return null!==r?c:null}},172:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(125),r=o(30),l=o.n(r),s=o(59),c=o(3),u=o(9),d=o(132),m=o(41),p=o(31),_=o(47),h=o(103),f=o(73),g=o(19),b=o(89),y=o(37),v=o(134);function E({accounts:e,showDelete:t,onDeleteError:o}){const a=(e=null!=e?e:[]).filter(e=>e.type===c.a.Type.BUSINESS).length,[i,r]=n.a.useState(!1),[E,x]=n.a.useState(null),[S,M]=n.a.useState(!1),[w,P]=n.a.useState(),[O,C]=n.a.useState(!1),k=e=>()=>{x(e),r(!0)},B=e=>()=>{_.a.openAuthWindow(e.type,0,()=>{g.a.restApi.deleteAccountMedia(e.id)})},L=e=>()=>{P(e),M(!0)},N=()=>{C(!1),P(null),M(!1)},T={cols:{username:l.a.usernameCol,type:l.a.typeCol,usages:l.a.usagesCol,actions:l.a.actionsCol},cells:{username:l.a.usernameCell,type:l.a.typeCell,usages:l.a.usagesCell,actions:l.a.actionsCell}};return n.a.createElement("div",{className:"accounts-list"},n.a.createElement(d.a,{styleMap:T,rows:e,cols:[{id:"username",label:"Username",render:e=>n.a.createElement("div",null,n.a.createElement(f.a,{account:e,className:l.a.profilePic}),n.a.createElement("a",{className:l.a.username,onClick:k(e)},e.username))},{id:"type",label:"Type",render:e=>n.a.createElement("span",{className:l.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>n.a.createElement("span",{className:l.a.usages},e.usages.map((e,t)=>!!m.a.getById(e)&&n.a.createElement(s.a,{key:t,to:p.a.at({screen:"edit",id:e.toString()})},m.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&n.a.createElement(y.f,null,({ref:e,openMenu:t})=>n.a.createElement(u.a,{ref:e,className:l.a.actionsBtn,type:u.c.PILL,size:u.b.NORMAL,onClick:t},n.a.createElement(v.a,null)),n.a.createElement(y.b,null,n.a.createElement(y.c,{onClick:k(e)},"Info"),n.a.createElement(y.c,{onClick:B(e)},"Reconnect"),n.a.createElement(y.d,null),n.a.createElement(y.c,{onClick:L(e)},"Delete")))}]}),n.a.createElement(h.a,{isOpen:i,onClose:()=>r(!1),account:E}),n.a.createElement(b.a,{isOpen:S,title:"Are you sure?",buttons:[O?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:O,cancelDisabled:O,onAccept:()=>{C(!0),_.a.deleteAccount(w.id).then(()=>N()).catch(()=>{o&&o("An error occurred while trying to remove the account."),N()})},onCancel:N},n.a.createElement("p",null,"Are you sure you want to delete"," ",n.a.createElement("span",{style:{fontWeight:"bold"}},w?w.username:""),"?"," ","This will also delete all saved media associated with this account."),w&&w.type===c.a.Type.BUSINESS&&1===a&&n.a.createElement("p",null,n.a.createElement("b",null,"Note:")," ",n.a.createElement("span",null,"Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work."))))}var x=o(35),S=o(7),M=o(135),w=o(99),P=o.n(w);t.a=Object(S.b)((function(){const[,e]=n.a.useState(0),[t,o]=n.a.useState(""),a=n.a.useCallback(()=>e(e=>e++),[]);return c.b.hasAccounts()?n.a.createElement("div",{className:P.a.root},t.length>0&&n.a.createElement(x.a,{type:x.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>o("")},t),n.a.createElement("div",{className:P.a.connectBtn},n.a.createElement(i.a,{onConnect:a})),n.a.createElement(E,{accounts:c.b.list,showDelete:!0,onDeleteError:o})):n.a.createElement(M.a,null)}))},173:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var a=o(0),n=o.n(a),i=o(111),r=o.n(i),l=o(88),s=o(18);function c({children:{path:e,tabs:t,right:o},current:a,onClickTab:i}){return n.a.createElement(l.b,{pathStyle:"chevron"},{path:e,right:o,left:t.map(e=>{return n.a.createElement(u,{tab:e,key:e.key,isCurrent:e.key===a,onClick:(t=e.key,()=>i&&i(t))});var t})})}function u({tab:e,isCurrent:t,onClick:o}){return n.a.createElement("a",{key:e.key,role:"button",tabIndex:0,className:e.disabled?r.a.disabled:t?r.a.current:r.a.tab,onClick:o,onKeyDown:Object(s.g)(o)},n.a.createElement("span",{className:r.a.label},e.label))}},174:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var a=o(0),n=o.n(a),i=o(60),r=o(18);function l({when:e,message:t}){return Object(r.l)(t,e),n.a.createElement(i.a,{when:e,message:t})}},18:function(e,t,o){"use strict";o.d(t,"j",(function(){return l})),o.d(t,"f",(function(){return s})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return u})),o.d(t,"a",(function(){return d})),o.d(t,"n",(function(){return m})),o.d(t,"h",(function(){return p})),o.d(t,"l",(function(){return _})),o.d(t,"k",(function(){return h})),o.d(t,"e",(function(){return f})),o.d(t,"d",(function(){return g})),o.d(t,"m",(function(){return b})),o.d(t,"g",(function(){return y})),o.d(t,"i",(function(){return v}));var a=o(0),n=o.n(a),i=o(60),r=o(46);function l(e,t){!function(e,t,o){const a=n.a.useRef(!0);e(()=>{a.current=!0;const e=t(()=>new Promise(e=>{a.current&&e()}));return()=>{a.current=!1,e&&e()}},o)}(a.useEffect,e,t)}function s(e){const[t,o]=n.a.useState(e),a=n.a.useRef(t);return[t,()=>a.current,e=>o(a.current=e)]}function c(e,t,o=[]){function n(a){!e.current||e.current.contains(a.target)||o.some(e=>e&&e.current&&e.current.contains(a.target))||t(a)}Object(a.useEffect)(()=>(document.addEventListener("mousedown",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchend",n)}))}function u(e,t){Object(a.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function d(e,t,o=100){const[i,r]=n.a.useState(e);return Object(a.useEffect)(()=>{let a=null;return e===t?a=setTimeout(()=>r(t),o):r(!t),()=>{null!==a&&clearTimeout(a)}},[e]),[i,r]}function m(e){const[t,o]=n.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(a.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function _(e,t){Object(a.useEffect)(()=>{const o=o=>{if(t)return(o||window.event).returnValue=e,e};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[t])}function h(e,t){const o=n.a.useRef(!1);return Object(a.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(e,t,o,n=[],i=[]){Object(a.useEffect)(()=>(n.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function g(e,t,o=[],a=[]){f(document,e,t,o,a)}function b(e,t,o=[],a=[]){f(window,e,t,o,a)}function y(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}function v(e){const[t,o]=n.a.useState(e);return[function(e){const t=n.a.useRef(e);return t.current=e,t}(t),o]}o(53)},190:function(e,t,o){e.exports={"arrow-link":"WizardNavbar__arrow-link",arrowLink:"WizardNavbar__arrow-link","prev-link":"WizardNavbar__prev-link WizardNavbar__arrow-link",prevLink:"WizardNavbar__prev-link WizardNavbar__arrow-link","next-link":"WizardNavbar__next-link WizardNavbar__arrow-link",nextLink:"WizardNavbar__next-link WizardNavbar__arrow-link"}},191:function(e,t,o){e.exports={message:"FeedNamePrompt__message",input:"FeedNamePrompt__input"}},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(1),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return a(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const a=l(this,t,e);return new o(a.desktop,a.tablet,a.phone)}}function a(e,t,o=!1){if(!e)return;const a=e[t.prop];return o&&null==a?e.desktop:a}function r(e,t,o){return e[o.prop]=t,e}function l(e,t,a){return r(new o(e.desktop,e.tablet,e.phone),t,a)}i([n.o],o.prototype,"desktop",void 0),i([n.o],o.prototype,"tablet",void 0),i([n.o],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const a=e.MODES.findIndex(e=>e===o);return void 0===a?t.DESKTOP:e.MODES[(a+1)%e.MODES.length]},e.get=a,e.set=r,e.withValue=l,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP},e.isValid=function(e){return"object"==typeof e&&e.hasOwnProperty("desktop")}}(a||(a={}))},20:function(e,t,o){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},21:function(e,t,o){e.exports={container:"MediaInfo__container",padded:"MediaInfo__padded",bordered:"MediaInfo__bordered",header:"MediaInfo__header MediaInfo__padded MediaInfo__bordered","source-img":"MediaInfo__source-img",sourceImg:"MediaInfo__source-img","source-img-link":"MediaInfo__source-img-link MediaInfo__source-img",sourceImgLink:"MediaInfo__source-img-link MediaInfo__source-img","source-name":"MediaInfo__source-name",sourceName:"MediaInfo__source-name","comments-scroller":"MediaInfo__comments-scroller",commentsScroller:"MediaInfo__comments-scroller","comments-list":"MediaInfo__comments-list MediaInfo__padded",commentsList:"MediaInfo__comments-list MediaInfo__padded",comment:"MediaInfo__comment",footer:"MediaInfo__footer","footer-info":"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered",footerInfo:"MediaInfo__footer-info MediaInfo__padded MediaInfo__bordered","footer-info-line":"MediaInfo__footer-info-line",footerInfoLine:"MediaInfo__footer-info-line","num-likes":"MediaInfo__num-likes MediaInfo__footer-info-line",numLikes:"MediaInfo__num-likes MediaInfo__footer-info-line",date:"MediaInfo__date MediaInfo__footer-info-line","footer-link":"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered",footerLink:"MediaInfo__footer-link MediaInfo__padded MediaInfo__bordered","footer-link-icon":"MediaInfo__footer-link-icon",footerLinkIcon:"MediaInfo__footer-link-icon"}},216:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));class a{constructor(e=[],t=0){this.fns=e,this.delay=null!=t?t:1}add(e){this.fns.push(e)}run(){return this.numLoaded=0,this.isLoading=!0,new Promise((e,t)=>{this.fns.forEach(o=>o().then(()=>{this.numLoaded++,this.numLoaded>=this.fns.length&&setTimeout(()=>{this.isLoading=!1,e()},this.delay)}).catch(t))})}}},22:function(e,t,o){"use strict";var a=o(51),n=o.n(a),i=o(15),r=o(53);const l=i.a.config.restApi.baseUrl,s={};i.a.config.restApi.authToken&&(s["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=n.a.create({baseURL:l,headers:s});c.interceptors.response.use(e=>e,e=>{if(void 0!==e.response){if(403===e.response.status)throw new Error("Your login cookie is not valid. Please check if you are still logged in.");throw e}});const u={config:Object.assign(Object.assign({},i.a.config.restApi),{forceImports:!1}),driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,a)=>{const i=a?new n.a.CancelToken(a):void 0;return new Promise((a,n)=>{const r=e=>{a(e),document.dispatchEvent(new Event(u.events.onGetFeedMedia))};c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(a=>{a&&a.data.needImport?u.importMedia(e).then(()=>{c.post("/media/feed",{options:e,num:o,from:t},{cancelToken:i}).then(r).catch(n)}).catch(n):r(a)}).catch(n)})},getMedia:(e=0,t=0)=>c.get(`/media?num=${e}&offset=${t}`),importMedia:e=>new Promise((t,o)=>{document.dispatchEvent(new Event(u.events.onImportStart));const a=e=>{document.dispatchEvent(new Event(u.events.onImportFail)),o(e)};c.post("/media/import",{options:e}).then(e=>{e.data.success?(document.dispatchEvent(new Event(u.events.onImportEnd)),t(e)):a(e)}).catch(a)}),getErrorReason:e=>{let t;return"object"==typeof e.response&&(e=e.response.data),t="string"==typeof e.message?e.message:"string"==typeof e.error?e.error:e.toString(),Object(r.b)(t)},events:{onGetFeedMedia:"sli/api/media/feed",onImportStart:"sli/api/import/start",onImportEnd:"sli/api/import/end",onImportFail:"sli/api/import/fail"}};t.a=u},23:function(e,t,o){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username","date-container":"MediaOverlay__date-container",dateContainer:"MediaOverlay__date-container",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},233:function(e,t,o){e.exports={root:"ElementorApp__root",shade:"ElementorApp__shade",container:"ElementorApp__container","close-button":"ElementorApp__close-button",closeButton:"ElementorApp__close-button"}},27:function(e,t,o){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},28:function(e,t,o){e.exports={reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation","flex-box":"layout__flex-box",flexBox:"layout__flex-box",album:"MediaPopupBoxAlbum__album",frame:"MediaPopupBoxAlbum__frame",scroller:"MediaPopupBoxAlbum__scroller",child:"MediaPopupBoxAlbum__child","controls-layer":"MediaPopupBoxAlbum__controls-layer layout__flex-box",controlsLayer:"MediaPopupBoxAlbum__controls-layer layout__flex-box","controls-container":"MediaPopupBoxAlbum__controls-container",controlsContainer:"MediaPopupBoxAlbum__controls-container","nav-button":"MediaPopupBoxAlbum__nav-button",navButton:"MediaPopupBoxAlbum__nav-button","prev-button":"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button",prevButton:"MediaPopupBoxAlbum__prev-button MediaPopupBoxAlbum__nav-button","next-button":"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button",nextButton:"MediaPopupBoxAlbum__next-button MediaPopupBoxAlbum__nav-button","indicator-list":"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicatorList:"MediaPopupBoxAlbum__indicator-list layout__flex-row",indicator:"MediaPopupBoxAlbum__indicator","indicator-current":"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator",indicatorCurrent:"MediaPopupBoxAlbum__indicator-current MediaPopupBoxAlbum__indicator"}},29:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"d",(function(){return s})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return u})),o(5);var a=o(65),n=o(0),i=o.n(n),r=o(4);function l(e,t){const o=t.map(a.b).join("|");return new RegExp(`#(${o})(?:\\b|\\r|#|$)`,"imu").test(e)}function s(e,t,o=0,a=!1){let l=e.trim();a&&(l=l.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const s=l.split("\n"),c=s.map((e,o)=>{if(e=e.trim(),a&&/^[.*•]$/.test(e))return null;let l,c=[];for(;null!==(l=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+l[1],o=i.a.createElement("a",{href:t,target:"_blank",key:Object(r.p)()},l[0]),a=e.substr(0,l.index),n=e.substr(l.index+l[0].length);c.push(a),c.push(o),e=n}return e.length&&c.push(e),t&&(c=t(c,o)),s.length>1&&c.push(i.a.createElement("br",{key:Object(r.p)()})),i.a.createElement(n.Fragment,{key:Object(r.p)()},c)});return o>0?c.slice(0,o):c}function c(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function u(e){return"https://instagram.com/explore/tags/"+e}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(22),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(a||(a={}));const r=Object(i.o)([]),l="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",s=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function u(e){return e.slice().sort((e,t)=>e.type===t.type?0:e.type===a.Type.PERSONAL?-1:1),r.splice(0,r.length),e.forEach(e=>r.push(Object(i.o)(e))),r}function d(e){if("object"==typeof e&&Array.isArray(e.data))return u(e.data);throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:l,getById:s,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==s(e)),idsToAccounts:e=>e.map(e=>s(e)).filter(e=>void 0!==e),getPersonalAccounts:()=>r.filter(e=>e.type===a.Type.PERSONAL),getBusinessAccounts:()=>r.filter(e=>e.type===a.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:l,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return n.a.getAccounts().then(d).catch(e=>{throw n.a.getErrorReason(e)})},loadFromResponse:d,addAccounts:u}},30:function(e,t,o){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-btn":"AccountsList__actions-btn",actionsBtn:"AccountsList__actions-btn","usages-cell":"AccountsList__usages-cell",usagesCell:"AccountsList__usages-cell","usages-col":"AccountsList__usages-col",usagesCol:"AccountsList__usages-col","type-cell":"AccountsList__type-cell",typeCell:"AccountsList__type-cell","type-col":"AccountsList__type-col",typeCol:"AccountsList__type-col"}},303:function(e,t,o){"use strict";o.d(t,"a",(function(){return d}));var a=o(121),n=o.n(a),i=o(0),r=o.n(i),l=o(9),s=o(8),c=o(37),u=o(10);function d({value:e,defaultValue:t,onDone:o}){const a=r.a.useRef(),[i,d]=r.a.useState(""),[m,p]=r.a.useState(!1),_=()=>{d(e),p(!0)},h=()=>{p(!1),o&&o(i),a.current&&a.current.focus()},f=e=>{switch(e.key){case"Enter":case" ":_()}};return r.a.createElement("div",{className:n.a.root},r.a.createElement(c.a,{isOpen:m,onBlur:()=>p(!1),placement:"bottom"},({ref:o})=>r.a.createElement("div",{ref:Object(u.d)(o,a),className:n.a.staticContainer,onClick:_,onKeyPress:f,tabIndex:0,role:"button"},r.a.createElement("span",{className:n.a.label},e||t),r.a.createElement(s.a,{icon:"edit",className:n.a.editIcon})),r.a.createElement(c.b,null,r.a.createElement(c.e,null,r.a.createElement("div",{className:n.a.editContainer},r.a.createElement("input",{type:"text",value:i,onChange:e=>{d(e.target.value)},onKeyDown:e=>{switch(e.key){case"Enter":h();break;case"Escape":p(!1);break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:!0,placeholder:"Feed name"}),r.a.createElement(l.a,{className:n.a.doneBtn,type:l.c.PRIMARY,size:l.b.NORMAL,onClick:h},r.a.createElement(s.a,{icon:"yes"})))))))}},304:function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var a=o(0),n=o.n(a),i=o(190),r=o.n(i),l=o(88),s=o(9),c=o(8);function u({children:e,steps:t,current:o,onChangeStep:a,firstStep:i,lastStep:u}){var d;i=null!=i?i:[],u=null!=u?u:[];const m=null!==(d=t.findIndex(e=>e.key===o))&&void 0!==d?d:0,p=m<=0,_=m>=t.length-1,h=p?null:t[m-1],f=_?null:t[m+1],g=p?i:n.a.createElement(s.a,{type:s.c.LINK,onClick:()=>!p&&a&&a(t[m-1].key),className:r.a.prevLink,disabled:h.disabled},n.a.createElement(c.a,{icon:"arrow-left-alt2"}),n.a.createElement("span",null,h.label)),b=_?u:n.a.createElement(s.a,{type:s.c.LINK,onClick:()=>!_&&a&&a(t[m+1].key),className:r.a.nextLink,disabled:f.disabled},n.a.createElement("span",null,f.label),n.a.createElement(c.a,{icon:"arrow-right-alt2"}));return n.a.createElement(l.b,null,{path:[],left:g,right:b,center:e})}},305:function(e,t,o){"use strict";o.d(t,"a",(function(){return d}));var a=o(0),n=o.n(a),i=o(164),r=o.n(i),l=o(88),s=o(9),c=o(8),u=o(37);function d({pages:e,current:t,onChangePage:o,showNavArrows:a,hideMenuArrow:i,children:u}){var d,p;const{path:_,right:h}=u,f=null!==(d=e.findIndex(e=>e.key===t))&&void 0!==d?d:0,g=null!==(p=e[f].label)&&void 0!==p?p:"",b=f<=0,y=f>=e.length-1,v=b?null:e[f-1],E=y?null:e[f+1];let x=[];return a&&x.push(n.a.createElement(s.a,{key:"page-menu-left",type:s.c.PILL,onClick:()=>!b&&o&&o(e[f-1].key),disabled:b||v.disabled},n.a.createElement(c.a,{icon:"arrow-left-alt2"}))),x.push(n.a.createElement(m,{key:"page-menu",pages:e,current:t,onClickPage:e=>o&&o(e)},n.a.createElement("span",null,g),!i&&n.a.createElement(c.a,{icon:"arrow-down-alt2",className:r.a.arrowDown}))),a&&x.push(n.a.createElement(s.a,{key:"page-menu-left",type:s.c.PILL,onClick:()=>!y&&o&&o(e[f+1].key),disabled:y||E.disabled},n.a.createElement(c.a,{icon:"arrow-right-alt2"}))),n.a.createElement(l.b,{pathStyle:_.length>1?"line":"none"},{path:_,right:h,center:x})}function m({pages:e,current:t,onClickPage:o,children:a}){const[i,l]=n.a.useState(!1),s=()=>l(!0),c=()=>l(!1);return n.a.createElement(u.a,{isOpen:i,onBlur:c,placement:"bottom-start",refClassName:r.a.menuRef},({ref:e})=>n.a.createElement("a",{ref:e,className:r.a.menuLink,onClick:s},a),n.a.createElement(u.b,null,e.map(e=>{return n.a.createElement(u.c,{key:e.key,disabled:e.disabled,active:e.key===t,onClick:(a=e.key,()=>{o&&o(a),c()})},e.label);var a})))}},306:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var a=o(0),n=o.n(a),i=o(191),r=o.n(i),l=o(89);function s({isOpen:e,onAccept:t,onCancel:o}){const[a,i]=n.a.useState("");function s(){t&&t(a)}return n.a.createElement(l.a,{title:"Feed name",isOpen:e,onCancel:function(){o&&o()},onAccept:s,buttons:["Save","Cancel"]},n.a.createElement("p",{className:r.a.message},"Give this feed a memorable name:"),n.a.createElement("input",{type:"text",className:r.a.input,value:a,onChange:e=>{i(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(s(),e.preventDefault(),e.stopPropagation())},autoFocus:!0}))}},31:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var a=o(1),n=o(66),i=o(4),r=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class l{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(n.parse)(e.search),this.unListen=null,this.listeners=[],Object(a.p)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(n.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=!0){return Object(i.i)(this.parsed[e])}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}goto(e,t=!1){this.history.push(t?this.with(e):this.at(e),{})}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(n.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(o=>{e[o]&&0===e[o].length?delete t[o]:t[o]=e[o]}),t}}r([a.o],l.prototype,"path",void 0),r([a.o],l.prototype,"parsed",void 0),r([a.h],l.prototype,"_path",null);const s=new l},32:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",container:"MediaViewer__container layout__flex-box",horizontal:"MediaViewer__horizontal MediaViewer__container layout__flex-box",vertical:"MediaViewer__vertical MediaViewer__container layout__flex-box",wrapper:"MediaViewer__wrapper layout__flex-box","wrapper-sidebar":"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",wrapperSidebar:"MediaViewer__wrapper-sidebar MediaViewer__wrapper layout__flex-box",sidebar:"MediaViewer__sidebar","media-frame":"MediaViewer__media-frame layout__flex-box",mediaFrame:"MediaViewer__media-frame layout__flex-box","media-container":"MediaViewer__media-container",mediaContainer:"MediaViewer__media-container","media-sizer":"MediaViewer__media-sizer layout__flex-box",mediaSizer:"MediaViewer__media-sizer layout__flex-box",media:"MediaViewer__media"}},33:function(e,t,o){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},39:function(e,t,o){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},4:function(e,t,o){"use strict";o.d(t,"p",(function(){return r})),o.d(t,"g",(function(){return l})),o.d(t,"a",(function(){return s})),o.d(t,"q",(function(){return c})),o.d(t,"b",(function(){return u})),o.d(t,"d",(function(){return d})),o.d(t,"l",(function(){return m})),o.d(t,"k",(function(){return p})),o.d(t,"h",(function(){return _})),o.d(t,"e",(function(){return h})),o.d(t,"o",(function(){return f})),o.d(t,"n",(function(){return g})),o.d(t,"m",(function(){return b})),o.d(t,"j",(function(){return y})),o.d(t,"f",(function(){return v})),o.d(t,"c",(function(){return E})),o.d(t,"i",(function(){return x}));var a=o(169),n=o(170);let i=0;function r(){return i++}function l(e){const t={};return Object.keys(e).forEach(o=>{const a=e[o];Array.isArray(a)?t[o]=a.slice():a instanceof Map?t[o]=new Map(a.entries()):t[o]="object"==typeof a?l(a):a}),t}function s(e,t){return Object.keys(t).forEach(o=>{e[o]=t[o]}),e}function c(e,t){return s(l(e),t)}function u(e,t){return Array.isArray(e)&&Array.isArray(t)?d(e,t):e instanceof Map&&t instanceof Map?d(Array.from(e.entries()),Array.from(t.entries())):"object"==typeof e&&"object"==typeof t?m(e,t):e===t}function d(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;++a)if(o){if(!o(e[a],t[a]))return!1}else if(!u(e[a],t[a]))return!1;return!0}function m(e,t){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return u(e,t);const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const n=new Set(o.concat(a));for(const o of n)if(!u(e[o],t[o]))return!1;return!0}function p(e){return 0===Object.keys(null!=e?e:{}).length}function _(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function f(e,t){const o=/(\s+)/g;let a,n=0,i=0,r="";for(;null!==(a=o.exec(e))&&n<t;){const t=a.index+a[1].length;r+=e.substr(i,t-i),i=t,n++}return i<e.length&&(r+=" ..."),r}function g(e){return Object(a.a)(Object(n.a)(e),{addSuffix:!0})}function b(e,t){const o=[];return e.forEach((e,a)=>{const n=a%t;Array.isArray(o[n])?o[n].push(e):o[n]=[e]}),o}function y(e,t){for(const o of t){const t=o();if(e(t))return t}}function v(e,t){return Math.max(0,Math.min(t.length-1,e))}function E(e,t,o){const a=e.slice();return a[t]=o,a}function x(e){return Array.isArray(e)?e[0]:e}},40:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));class a{static getById(e){const t=a.list.find(t=>t.id===e);return!t&&a.list.length>0?a.list[0]:t}static getName(e){const t=a.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){a.list.push(e)}}a.list=[]},42:function(e,o){e.exports=t},45:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},46:function(e,t,o){"use strict";function a(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function n(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},49:function(e,t,o){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},5:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(12),i=o(3);!function(e){let t,o,a;function r(e){return e.hasOwnProperty("children")}!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(t){let o;function a(t){if(r(t)&&e.Source.isOwnMedia(t.source)){if("object"==typeof t.thumbnails&&!n.a.isEmpty(t.thumbnails))return t.thumbnails;if("string"==typeof t.thumbnail&&t.thumbnail.length>0)return{[o.SMALL]:t.thumbnail,[o.MEDIUM]:t.thumbnail,[o.LARGE]:t.thumbnail}}return{[o.SMALL]:t.url,[o.MEDIUM]:t.url,[o.LARGE]:t.url}}!function(e){e.SMALL="s",e.MEDIUM="m",e.LARGE="l"}(o=t.Size||(t.Size={})),t.get=function(e,t){const o=a(e);return n.a.get(o,t)||(r(e)?e.thumbnail:e.url)},t.getMap=a,t.has=function(t){return!!r(t)&&!!e.Source.isOwnMedia(t.source)&&("string"==typeof t.thumbnail&&t.thumbnail.length>0||!n.a.isEmpty(t.thumbnails))},t.getSrcSet=function(e,t){var a;let i=[];n.a.has(e.thumbnails,o.SMALL)&&i.push(n.a.get(e.thumbnails,o.SMALL)+` ${t.s}w`),n.a.has(e.thumbnails,o.MEDIUM)&&i.push(n.a.get(e.thumbnails,o.MEDIUM)+` ${t.m}w`);const r=null!==(a=n.a.get(e.thumbnails,o.LARGE))&&void 0!==a?a:e.url;return i.push(r+` ${t.l}w`),i}}(o=e.Thumbnails||(e.Thumbnails={})),function(e){let t;function o(e){switch(e){case t.PERSONAL_ACCOUNT:return i.a.Type.PERSONAL;case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:return i.a.Type.BUSINESS;default:return}}function a(e){switch(e){case t.RECENT_HASHTAG:return"recent";case t.POPULAR_HASHTAG:return"popular";default:return}}!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={})),e.createForAccount=function(e){return{name:e.username,type:e.type===i.a.Type.PERSONAL?t.PERSONAL_ACCOUNT:t.BUSINESS_ACCOUNT}},e.createForTaggedAccount=function(e){return{name:e.username,type:t.TAGGED_ACCOUNT}},e.createForHashtag=function(e){return{name:e.tag,type:"popular"===e.sort?t.POPULAR_HASHTAG:t.RECENT_HASHTAG}},e.getAccountType=o,e.getHashtagSort=a,e.getTypeLabel=function(e){switch(e){case t.PERSONAL_ACCOUNT:return"PERSONAL";case t.BUSINESS_ACCOUNT:return"BUSINESS";case t.TAGGED_ACCOUNT:return"TAGGED";case t.RECENT_HASHTAG:return"RECENT";case t.POPULAR_HASHTAG:return"POPULAR";case t.USER_STORY:return"STORY";default:return"UNKNOWN"}},e.processSources=function(e){const n=[],r=[],l=[],s=[],c=[];return e.forEach(e=>{switch(e.type){case t.RECENT_HASHTAG:case t.POPULAR_HASHTAG:c.push({tag:e.name,sort:a(e.type)});break;case t.PERSONAL_ACCOUNT:case t.BUSINESS_ACCOUNT:case t.TAGGED_ACCOUNT:case t.USER_STORY:const u=i.b.getByUsername(e.name),d=u?o(e.type):null;u&&u.type===d?e.type===t.TAGGED_ACCOUNT?r.push(u):e.type===t.USER_STORY?l.push(u):n.push(u):s.push(e)}}),{accounts:n,tagged:r,stories:l,hashtags:c,misc:s}},e.isOwnMedia=function(e){return e.type===t.PERSONAL_ACCOUNT||e.type===t.BUSINESS_ACCOUNT||e.type===t.USER_STORY}}(a=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===a.Type.POPULAR_HASHTAG||e.source.type===a.Type.RECENT_HASHTAG,e.isNotAChild=r}(a||(a={}))},50:function(e,t,o){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},53:function(e,t,o){"use strict";function a(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function n(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}))},54:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var a=o(0),n=o.n(a),i=o(45),r=o.n(i),l=o(104),s=o(5),c=o(72),u=o.n(c);function d(){return n.a.createElement("div",{className:u.a.root})}var m=o(10);function p(e){var{media:t,className:o,size:i,onLoadImage:c,width:u,height:p}=e,_=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["media","className","size","onLoadImage","width","height"]);const h=n.a.useRef(),f=n.a.useRef(),[g,b]=n.a.useState(!s.a.Thumbnails.has(t)),[y,v]=n.a.useState(!0),[E,x]=n.a.useState(!1);function S(){if(h.current){const e=null!=i?i:function(){const e=h.current.getBoundingClientRect();return e.width<=320?s.a.Thumbnails.Size.SMALL:e.width<=600?s.a.Thumbnails.Size.MEDIUM:s.a.Thumbnails.Size.LARGE}(),o=s.a.Thumbnails.get(t,e);h.current.src!==o&&(h.current.src=o)}}function M(){O()}function w(){t.type===s.a.Type.VIDEO?b(!0):h.current.src===t.url?x(!0):h.current.src=t.url,O()}function P(){isNaN(f.current.duration)||f.current.duration===1/0?f.current.currentTime=1:f.current.currentTime=f.current.duration/2,O()}function O(){v(!1),c&&c()}return Object(a.useLayoutEffect)(()=>{let e=new l.a(S);return h.current&&(h.current.onload=M,h.current.onerror=w,S(),e.observe(h.current)),f.current&&(f.current.onloadeddata=P),()=>{h.current&&(h.current.onload=()=>null,h.current.onerror=()=>null),f.current&&(f.current.onloadeddata=()=>null),e.disconnect()}},[t,i]),t.url&&t.url.length>0&&!E?n.a.createElement("div",Object.assign({className:Object(m.b)(r.a.root,o)},_),"VIDEO"===t.type&&g?n.a.createElement("video",{ref:f,className:r.a.video,src:t.url,autoPlay:!1,controls:!1,loop:!1,tabIndex:0},n.a.createElement("source",{src:t.url}),"Your browser does not support videos"):n.a.createElement("img",Object.assign({ref:h,className:r.a.image,loading:"lazy",width:u,height:p,alt:""},m.e)),y&&n.a.createElement(d,null)):n.a.createElement("div",{className:r.a.notAvailable},n.a.createElement("span",null,"Thumbnail not available"))}},55:function(e,t,o){e.exports={"flex-box":"layout__flex-box",flexBox:"layout__flex-box",reset:"MediaPopupBoxObject__reset","loading-animation":"MediaPopupBoxObject__loading-animation",loadingAnimation:"MediaPopupBoxObject__loading-animation",image:"MediaPopupBoxImage__image MediaPopupBoxObject__reset",loading:"MediaPopupBoxImage__loading MediaPopupBoxImage__image MediaPopupBoxObject__reset MediaPopupBoxObject__loading-animation",error:"MediaPopupBoxImage__error MediaPopupBoxImage__image MediaPopupBoxObject__reset layout__flex-box","fade-in-animation":"MediaPopupBoxImage__fade-in-animation",fadeInAnimation:"MediaPopupBoxImage__fade-in-animation"}},56:function(e,t,o){"use strict";function a(e){return t=>(t.stopPropagation(),e(t))}function n(e,t){let o;return(...a)=>{clearTimeout(o),o=setTimeout(()=>{o=null,e(...a)},t)}}function i(){}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},58:function(e,t,o){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},587:function(e,t,o){"use strict";o.r(t);var a=o(0),n=o.n(a),i=o(42),r=o.n(i),l=o(233),s=o.n(l),c=o(224),u=o(41),d=o(216),m=o(3),p=o(25),_=o(10),h=o(60),f=o(117),g=o(8),b=u.a.SavedFeed;const y=Object(f.a)(),v={loaded:!1,loader:new d.a([()=>p.c.load(),()=>u.a.loadFeeds(),()=>m.b.loadAccounts()])};function E({rows:e,loading:t,select:o,editBtn:a,newBtn:i,value:r,update:l}){const d=n.a.useRef(!1),[m,p]=n.a.useState(v.loaded),[f,E]=n.a.useState(!1),[S,M]=n.a.useState(null),w=n.a.useCallback(()=>{E(!0),d.current=!1},[]),P=n.a.useCallback(()=>{E(!1),d.current=!1},[]),O=n.a.useCallback(()=>{d.current?confirm(c.b)&&P():P()},[d]),C=n.a.useCallback(()=>{M(u.a.getById(o.value)),w()},[]),k=n.a.useCallback(()=>{M(new b),w()},[]),B=n.a.useCallback(t=>{const a=u.a.hasFeeds(),n=null!=t?t:r;for(e.forEach((e,t)=>{e.style.display=0!==t||a?"flex":"none"});o.options.length>0;)o.remove(o.options.length-1);n&&void 0===u.a.getById(n)&&o.add(x(n,"(Missing feed)",!0)),u.a.list.forEach(e=>{o.add(x(e.id.toString(),e.label,n===e.id.toString()))}),i.textContent=a?"Create a new feed":"Design your feed",t!==r&&(o.value=t.toString(),l(o.value))},[o,r,l]),L=n.a.useCallback(()=>{v.loaded=!0,B(r),t.remove(),p(!0)},[r]),N=n.a.useCallback(e=>new Promise(t=>{u.a.saveFeed(e).then(e=>{B(e.id),t(),setTimeout(P,500)})}),[]),T=n.a.useCallback(()=>{d.current=!0},[]);return n.a.useEffect(()=>(v.loaded?L():v.loader.run().then(L),a.addEventListener("click",C),i.addEventListener("click",k),()=>{a.removeEventListener("click",C),i.removeEventListener("click",k)}),[]),f&&n.a.createElement(h.b,{history:y},n.a.createElement("div",{className:Object(_.b)(s.a.root,"wp-core-ui-override wp-core-ui spotlight-modal-target")},n.a.createElement("div",{className:s.a.shade,onClick:O}),m&&n.a.createElement("div",{className:s.a.container},n.a.createElement(c.a,{feed:S,onSave:N,onCancel:O,onDirtyChange:T,useCtrlS:!1,requireName:!0,confirmOnCancel:!0,config:{showDoneBtn:!0,showCancelBtn:!1,showNameField:!0,doneBtnText:"Save and embed"}})),n.a.createElement("div",{className:s.a.closeButton,onClick:O,role:"button","aria-label":"Cancel",tabIndex:0},n.a.createElement(g.a,{icon:"no-alt"}))))}function x(e,t,o,a){const n=document.createElement("option");return n.value=e.toString(),n.text=t,o&&(n.selected=!0),a&&(n.disabled=!0),n}elementor.addControlView("sli-select-feed",elementor.modules.controls.BaseData.extend({onReady(){const e=this.$el.find("div.sli-select-field-row"),t=this.$el.find("div.sli-select-loading"),o=this.$el.find("select.sli-select-element"),a=this.$el.find("button.sli-select-edit-btn"),i=this.$el.find("button.sli-select-new-btn");if(!o.length||!a.length||!i.length)return;const l=document.createElement("div");l.id="spotlight-elementor-app",document.body.appendChild(l);const s=n.a.createElement(E,{rows:e.get(),loading:t[0],select:o[0],editBtn:a[0],newBtn:i[0],value:this.elementSettingsModel.attributes.feed,update:e=>this.updateElementModel(e)});r.a.render(s,l)},onBeforeDestroy(){},saveValue(){}}))},6:function(e,t,o){"use strict";o.d(t,"a",(function(){return b}));var a=o(51),n=o.n(a),i=o(1),r=o(2),l=o(40),s=o(3),c=o(4),u=o(29),d=o(16),m=o(22),p=o(56),_=o(11),h=o(12),f=o(15),g=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class b{constructor(e=new b.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaShown=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new b.Options(e),this.localMedia=i.o.array([]),this.mode=t,this.numMediaToShow=this._numMediaPerPage,this.reload=Object(p.a)(()=>this.load(),300),Object(i.p)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.numMediaToShow=this._numMediaPerPage,this.localMedia.length<this.numMediaShown&&this.loadMedia(this.localMedia.length,this.numMediaShown-this.localMedia.length))}),Object(i.p)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.p)(()=>({num:this._numMediaPerPage,mode:this.mode}),({num:e})=>{this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.numMediaToShow=Math.max(1,e)}),Object(i.p)(()=>this._media,e=>this.media=e),Object(i.p)(()=>this._numMediaShown,e=>this.numMediaShown=e),Object(i.p)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.p)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaShown)}get _numMediaShown(){return Math.min(this.numMediaToShow,this.totalMedia)}get _numMediaPerPage(){return Math.max(1,b.ComputedOptions.normalizeMultiInt(this.options.numPosts,this.mode,1))}get _canLoadMore(){return this.localMedia.length>this.numMediaToShow||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaShown+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.numMediaToShow+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.numMediaToShow+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.numMediaToShow=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),b.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((a,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&this.localMedia.replace([]),this.addLocalMedia(e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,a&&a()}).catch(e=>{var t;if(n.a.isCancel(e)||void 0===e.response)return null;const o=new b.Events.FetchFailEvent(b.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.response?e.response.data.message:void 0)&&void 0!==t?t:e.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia.replace([]),this.totalMedia=0,e&&e()})}addLocalMedia(e){e.forEach(e=>{this.localMedia.some(t=>t.id==e.id)||this.localMedia.push(e)})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}g([i.o],b.prototype,"media",void 0),g([i.o],b.prototype,"canLoadMore",void 0),g([i.o],b.prototype,"stories",void 0),g([i.o],b.prototype,"numLoadedMore",void 0),g([i.o],b.prototype,"options",void 0),g([i.o],b.prototype,"totalMedia",void 0),g([i.o],b.prototype,"mode",void 0),g([i.o],b.prototype,"isLoaded",void 0),g([i.o],b.prototype,"isLoading",void 0),g([i.f],b.prototype,"reload",void 0),g([i.o],b.prototype,"localMedia",void 0),g([i.o],b.prototype,"numMediaShown",void 0),g([i.o],b.prototype,"numMediaToShow",void 0),g([i.o],b.prototype,"numMediaPerPage",void 0),g([i.h],b.prototype,"_media",null),g([i.h],b.prototype,"_numMediaShown",null),g([i.h],b.prototype,"_numMediaPerPage",null),g([i.h],b.prototype,"_canLoadMore",null),g([i.f],b.prototype,"loadMore",null),g([i.f],b.prototype,"load",null),g([i.f],b.prototype,"loadMedia",null),g([i.f],b.prototype,"addLocalMedia",null),function(e){let t,o,a,n,m,p,b,y,v,E;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class x{constructor(e={}){x.setFromObject(this,e)}static setFromObject(t,o={}){var a,n,i,c,u,d,m,p,_,f,g,b,y,v,E;const x=o.accounts?o.accounts.slice():e.DefaultOptions.accounts;t.accounts=x.filter(e=>!!e).map(e=>parseInt(e.toString()));const S=o.tagged?o.tagged.slice():e.DefaultOptions.tagged;return t.tagged=S.filter(e=>!!e).map(e=>parseInt(e.toString())),t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.layout=l.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.sliderPostsPerPage=r.a.normalize(o.sliderPostsPerPage,e.DefaultOptions.sliderPostsPerPage),t.sliderNumScrollPosts=r.a.normalize(o.sliderNumScrollPosts,e.DefaultOptions.sliderNumScrollPosts),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(a=o.headerAccount)&&void 0!==a?a:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===s.b.getById(t.headerAccount)?s.b.list.length>0?s.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(n=o.customProfilePic)&&void 0!==n?n:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(c=o.captionRemoveDots)&&void 0!==c?c:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(u=o.likesIconColor)&&void 0!==u?u:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(d=o.lightboxShowSidebar)&&void 0!==d?d:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=o.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(p=o.followBtnText)&&void 0!==p?p:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(_=o.hashtagWhitelistSettings)&&void 0!==_?_:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(g=o.captionWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=o.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=null!==(y=o.promotionEnabled)&&void 0!==y?y:e.DefaultOptions.promotionEnabled,t.autoPromotionsEnabled=null!==(v=o.autoPromotionsEnabled)&&void 0!==v?v:e.DefaultOptions.autoPromotionsEnabled,t.globalPromotionsEnabled=null!==(E=o.globalPromotionsEnabled)&&void 0!==E?E:e.DefaultOptions.globalPromotionsEnabled,Array.isArray(o.promotions)?t.promotions=h.a.fromArray(o.promotions):o.promotions&&o.promotions instanceof Map?t.promotions=h.a.fromMap(o.promotions):"object"==typeof o.promotions?t.promotions=o.promotions:t.promotions=e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=s.b.idsToAccounts(e.accounts),o=s.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:s.b.idsToAccounts(e.accounts),tagged:s.b.idsToAccounts(e.tagged),hashtags:s.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t){const o=e.Options.getSources(t),a=o.accounts.length>0||o.tagged.length>0,n=o.hashtags.length>0;return a||n}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}g([i.o],x.prototype,"accounts",void 0),g([i.o],x.prototype,"hashtags",void 0),g([i.o],x.prototype,"tagged",void 0),g([i.o],x.prototype,"layout",void 0),g([i.o],x.prototype,"numColumns",void 0),g([i.o],x.prototype,"highlightFreq",void 0),g([i.o],x.prototype,"sliderPostsPerPage",void 0),g([i.o],x.prototype,"sliderNumScrollPosts",void 0),g([i.o],x.prototype,"mediaType",void 0),g([i.o],x.prototype,"postOrder",void 0),g([i.o],x.prototype,"numPosts",void 0),g([i.o],x.prototype,"linkBehavior",void 0),g([i.o],x.prototype,"feedWidth",void 0),g([i.o],x.prototype,"feedHeight",void 0),g([i.o],x.prototype,"feedPadding",void 0),g([i.o],x.prototype,"imgPadding",void 0),g([i.o],x.prototype,"textSize",void 0),g([i.o],x.prototype,"bgColor",void 0),g([i.o],x.prototype,"textColorHover",void 0),g([i.o],x.prototype,"bgColorHover",void 0),g([i.o],x.prototype,"hoverInfo",void 0),g([i.o],x.prototype,"showHeader",void 0),g([i.o],x.prototype,"headerInfo",void 0),g([i.o],x.prototype,"headerAccount",void 0),g([i.o],x.prototype,"headerStyle",void 0),g([i.o],x.prototype,"headerTextSize",void 0),g([i.o],x.prototype,"headerPhotoSize",void 0),g([i.o],x.prototype,"headerTextColor",void 0),g([i.o],x.prototype,"headerBgColor",void 0),g([i.o],x.prototype,"headerPadding",void 0),g([i.o],x.prototype,"customBioText",void 0),g([i.o],x.prototype,"customProfilePic",void 0),g([i.o],x.prototype,"includeStories",void 0),g([i.o],x.prototype,"storiesInterval",void 0),g([i.o],x.prototype,"showCaptions",void 0),g([i.o],x.prototype,"captionMaxLength",void 0),g([i.o],x.prototype,"captionRemoveDots",void 0),g([i.o],x.prototype,"captionSize",void 0),g([i.o],x.prototype,"captionColor",void 0),g([i.o],x.prototype,"showLikes",void 0),g([i.o],x.prototype,"showComments",void 0),g([i.o],x.prototype,"lcIconSize",void 0),g([i.o],x.prototype,"likesIconColor",void 0),g([i.o],x.prototype,"commentsIconColor",void 0),g([i.o],x.prototype,"lightboxShowSidebar",void 0),g([i.o],x.prototype,"numLightboxComments",void 0),g([i.o],x.prototype,"showLoadMoreBtn",void 0),g([i.o],x.prototype,"loadMoreBtnText",void 0),g([i.o],x.prototype,"loadMoreBtnTextColor",void 0),g([i.o],x.prototype,"loadMoreBtnBgColor",void 0),g([i.o],x.prototype,"autoload",void 0),g([i.o],x.prototype,"showFollowBtn",void 0),g([i.o],x.prototype,"followBtnText",void 0),g([i.o],x.prototype,"followBtnTextColor",void 0),g([i.o],x.prototype,"followBtnBgColor",void 0),g([i.o],x.prototype,"followBtnLocation",void 0),g([i.o],x.prototype,"hashtagWhitelist",void 0),g([i.o],x.prototype,"hashtagBlacklist",void 0),g([i.o],x.prototype,"captionWhitelist",void 0),g([i.o],x.prototype,"captionBlacklist",void 0),g([i.o],x.prototype,"hashtagWhitelistSettings",void 0),g([i.o],x.prototype,"hashtagBlacklistSettings",void 0),g([i.o],x.prototype,"captionWhitelistSettings",void 0),g([i.o],x.prototype,"captionBlacklistSettings",void 0),g([i.o],x.prototype,"moderation",void 0),g([i.o],x.prototype,"moderationMode",void 0),e.Options=x;class S{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.d)(Object(c.o)(t,this.captionMaxLength)):t}static compute(t,o=r.a.Mode.DESKTOP){const a=new S({accounts:s.b.filterExisting(t.accounts),tagged:s.b.filterExisting(t.tagged),hashtags:t.hashtags.filter(e=>e.tag.length>0),layout:l.a.getById(t.layout),highlightFreq:r.a.get(t.highlightFreq,o,!0),sliderPostsPerPage:r.a.get(t.sliderPostsPerPage,o,!0),sliderNumScrollPosts:r.a.get(t.sliderNumScrollPosts,o,!0),linkBehavior:r.a.get(t.linkBehavior,o,!0),bgColor:Object(d.a)(t.bgColor),textColorHover:Object(d.a)(t.textColorHover),bgColorHover:Object(d.a)(t.bgColorHover),hoverInfo:t.hoverInfo,showHeader:r.a.get(t.showHeader,o,!0),headerInfo:r.a.get(t.headerInfo,o,!0),headerStyle:r.a.get(t.headerStyle,o,!0),headerTextColor:Object(d.a)(t.headerTextColor),headerBgColor:Object(d.a)(t.headerBgColor),headerPadding:r.a.get(t.headerPadding,o,!0),includeStories:t.includeStories,storiesInterval:t.storiesInterval,showCaptions:r.a.get(t.showCaptions,o,!0),captionMaxLength:r.a.get(t.captionMaxLength,o,!0),captionRemoveDots:t.captionRemoveDots,captionColor:Object(d.a)(t.captionColor),showLikes:r.a.get(t.showLikes,o,!0),showComments:r.a.get(t.showComments,o,!0),likesIconColor:Object(d.a)(t.likesIconColor),commentsIconColor:Object(d.a)(t.commentsIconColor),lightboxShowSidebar:t.lightboxShowSidebar,numLightboxComments:t.numLightboxComments,showLoadMoreBtn:r.a.get(t.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(d.a)(t.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(t.loadMoreBtnBgColor),loadMoreBtnText:t.loadMoreBtnText,showFollowBtn:r.a.get(t.showFollowBtn,o,!0),autoload:t.autoload,followBtnLocation:r.a.get(t.followBtnLocation,o,!0),followBtnTextColor:Object(d.a)(t.followBtnTextColor),followBtnBgColor:Object(d.a)(t.followBtnBgColor),followBtnText:t.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:s.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=this.getNumCols(t,o),a.numPosts=this.getNumPosts(t,o),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=t.headerAccount&&a.allAccounts.includes(t.headerAccount)?s.b.getById(t.headerAccount):s.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=t.customProfilePic.length?t.customProfilePic:s.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=t.customBioText.trim().length>0?t.customBioText:null!==a.account?s.b.getBioText(a.account):"";a.bioText=Object(u.d)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(t.feedWidth,o,"100%"),a.feedHeight=this.normalizeCssSize(t.feedHeight,o,"auto"),a.feedOverflowX=r.a.get(t.feedWidth,o)?"auto":void 0,a.feedOverflowY=r.a.get(t.feedHeight,o)?"auto":void 0,a.feedPadding=this.normalizeCssSize(t.feedPadding,o,"0"),a.imgPadding=this.normalizeCssSize(t.imgPadding,o,"0"),a.textSize=this.normalizeCssSize(t.textSize,o,"inherit",!0),a.headerTextSize=this.normalizeCssSize(t.headerTextSize,o,"inherit"),a.headerPhotoSize=this.normalizeCssSize(t.headerPhotoSize,o,"50px"),a.captionSize=this.normalizeCssSize(t.captionSize,o,"inherit"),a.lcIconSize=this.normalizeCssSize(t.lcIconSize,o,"inherit"),a.buttonPadding=Math.max(10,r.a.get(t.imgPadding,o))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static getNumCols(e,t){return Math.max(1,this.normalizeMultiInt(e.numColumns,t,1))}static getNumPosts(e,t){return Math.max(1,this.normalizeMultiInt(e.numPosts,t,1))}static normalizeMultiInt(e,t,o=0){const a=parseInt(r.a.get(e,t)+"");return isNaN(a)?t===r.a.Mode.DESKTOP?o:this.normalizeMultiInt(e,r.a.Mode.DESKTOP,o):a}static normalizeCssSize(e,t,o=null,a=!1){const n=r.a.get(e,t,a);return n?n+"px":o}}function M(e,t){if(f.a.isPro)return Object(c.j)(_.a.isValid,[()=>w(e,t),()=>t.globalPromotionsEnabled&&_.a.getGlobalPromo(e),()=>t.autoPromotionsEnabled&&_.a.getAutoPromo(e)])}function w(e,t){return e?_.a.getPromoFromDictionary(e,t.promotions):void 0}e.ComputedOptions=S,function(e){e.POPULAR="popular",e.RECENT="recent"}(o=e.HashtagSort||(e.HashtagSort={})),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(a=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(n=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(m=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(p=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(b=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(y=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(v=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(E=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},sliderPostsPerPage:{desktop:5},sliderNumScrollPosts:{desktop:1},mediaType:a.ALL,postOrder:m.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{all:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[y.PROFILE_PIC,y.BIO]},headerAccount:null,headerStyle:{desktop:b.NORMAL,phone:b.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:v.HEADER,phone:v.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:E.BLACKLIST,promotionEnabled:!0,autoPromotionsEnabled:!0,globalPromotionsEnabled:!0,promotions:{}},e.getPromo=M,e.getFeedPromo=w,e.executeMediaClick=function(e,t){const o=M(e,t),a=_.a.getConfig(o),n=_.a.getType(o);return!(!n||!n.isValid(a)||"function"!=typeof n.onMediaClick)&&n.onMediaClick(e,a)},e.getLink=function(e,t){var o,a;const n=M(e,t),i=_.a.getConfig(n),r=_.a.getType(n);if(void 0===r||!r.isValid(i))return{text:null,url:null,newTab:!1};const[l,s]=r.getPopupLink?null!==(o=r.getPopupLink(e,i))&&void 0!==o?o:null:[null,!1];return{text:l,url:r.getMediaUrl&&null!==(a=r.getMediaUrl(e,i))&&void 0!==a?a:null,newTab:s,icon:"external"}}}(b||(b={}))},61:function(e,t,o){e.exports={root:"GenericNavbar__root",list:"GenericNavbar__list","left-list":"GenericNavbar__left-list GenericNavbar__list",leftList:"GenericNavbar__left-list GenericNavbar__list",item:"GenericNavbar__item","center-list":"GenericNavbar__center-list GenericNavbar__list",centerList:"GenericNavbar__center-list GenericNavbar__list","right-list":"GenericNavbar__right-list GenericNavbar__list",rightList:"GenericNavbar__right-list GenericNavbar__list","path-list":"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",pathList:"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list","path-segment":"GenericNavbar__path-segment",pathSegment:"GenericNavbar__path-segment",separator:"GenericNavbar__separator GenericNavbar__item"}},62:function(e,t,o){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},65:function(e,t,o){"use strict";o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}));const a=(e,t)=>e.startsWith(t)?e:t+e,n=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},69:function(e,t,o){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}},70:function(e,t,o){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},71:function(e,t,o){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},72:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},73:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var a=o(0),n=o.n(a),i=o(98),r=o.n(i),l=o(3),s=o(10);function c(e){var{account:t,square:o,className:a}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["account","square","className"]);const c=l.b.getProfilePicUrl(t),u=Object(s.b)(o?r.a.square:r.a.round,a);return n.a.createElement("img",Object.assign({},i,{className:u,src:l.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}},78:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(50),r=o.n(i),l=o(7),s=o(6),c=o(20),u=o.n(c),d=o(71),m=o.n(d);const p=Object(l.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,o={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return n.a.createElement("a",{href:t,target:"__blank",className:m.a.link},n.a.createElement("button",{className:m.a.button,style:o},e.followBtnText))});var _=o(17),h=o.n(_),f=o(5),g=o(170),b=o(589),y=o(42),v=o.n(y),E=o(18),x=o(8),S=Object(l.b)((function({stories:e,options:t,onClose:o}){e.sort((e,t)=>{const o=Object(g.a)(e.timestamp).getTime(),a=Object(g.a)(t.timestamp).getTime();return o<a?-1:o==a?0:1});const[i,r]=n.a.useState(0),l=e.length-1,[s,c]=n.a.useState(0),[u,d]=n.a.useState(0);Object(a.useEffect)(()=>{0!==s&&c(0)},[i]);const m=i<l,p=i>0,_=()=>o&&o(),y=()=>i<l?r(i+1):_(),S=()=>r(e=>Math.max(e-1,0)),P=e[i],O="https://instagram.com/"+t.account.username,C=P.type===f.a.Type.VIDEO?u:t.storiesInterval;Object(E.d)("keydown",e=>{switch(e.key){case"Escape":_();break;case"ArrowLeft":S();break;case"ArrowRight":y();break;default:return}e.preventDefault(),e.stopPropagation()});const k=n.a.createElement("div",{className:h.a.root},n.a.createElement("div",{className:h.a.container},n.a.createElement("div",{className:h.a.header},n.a.createElement("a",{href:O,target:"_blank"},n.a.createElement("img",{className:h.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),n.a.createElement("a",{href:O,className:h.a.username,target:"_blank"},t.account.username),n.a.createElement("div",{className:h.a.date},Object(b.a)(Object(g.a)(P.timestamp),{addSuffix:!0}))),n.a.createElement("div",{className:h.a.progress},e.map((e,t)=>n.a.createElement(M,{key:e.id,duration:C,animate:t===i,isDone:t<i}))),n.a.createElement("div",{className:h.a.content},p&&n.a.createElement("div",{className:h.a.prevButton,onClick:S,role:"button"},n.a.createElement(x.a,{icon:"arrow-left-alt2"})),n.a.createElement("div",{className:h.a.media},n.a.createElement(w,{key:P.id,media:P,imgDuration:t.storiesInterval,onGetDuration:d,onEnd:()=>m?y():_()})),m&&n.a.createElement("div",{className:h.a.nextButton,onClick:y,role:"button"},n.a.createElement(x.a,{icon:"arrow-right-alt2"})),n.a.createElement("div",{className:h.a.closeButton,onClick:_,role:"button"},n.a.createElement(x.a,{icon:"no-alt"})))));return v.a.createPortal(k,document.body)}));function M({animate:e,isDone:t,duration:o}){const a=e?h.a.progressOverlayAnimating:t?h.a.progressOverlayDone:h.a.progressOverlay,i={animationDuration:o+"s"};return n.a.createElement("div",{className:h.a.progressSegment},n.a.createElement("div",{className:a,style:i}))}function w({media:e,imgDuration:t,onGetDuration:o,onEnd:a}){return e.type===f.a.Type.VIDEO?n.a.createElement(O,{media:e,onEnd:a,onGetDuration:o}):n.a.createElement(P,{media:e,onEnd:a,duration:t})}function P({media:e,duration:t,onEnd:o}){const[i,r]=n.a.useState(!1);return Object(a.useEffect)(()=>{const e=i?setTimeout(o,1e3*t):null;return()=>clearTimeout(e)},[e,i]),n.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function O({media:e,onEnd:t,onGetDuration:o}){const a=n.a.useRef();return n.a.createElement("video",{ref:a,src:e.url,poster:e.thumbnail,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>o(a.current.duration),onEnded:t},n.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var C=o(3),k=Object(l.b)((function({feed:e,options:t}){const[o,a]=n.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,l=e.stories.filter(e=>e.username===i.username),c=l.length>0,d=t.headerInfo.includes(s.a.HeaderInfo.MEDIA_COUNT),m=t.headerInfo.includes(s.a.HeaderInfo.FOLLOWERS)&&i.type!=C.a.Type.PERSONAL,_=t.headerInfo.includes(s.a.HeaderInfo.PROFILE_PIC),h=t.includeStories&&c,f=t.headerStyle===s.a.HeaderStyle.BOXED,g={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},b=h?"button":void 0,y={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:h?"pointer":"normal"},v=t.showFollowBtn&&(t.followBtnLocation===s.a.FollowBtnLocation.HEADER||t.followBtnLocation===s.a.FollowBtnLocation.BOTH),E={justifyContent:t.showBio&&f?"flex-start":"center"},x=n.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),M=h&&c?u.a.profilePicWithStories:u.a.profilePic;return n.a.createElement("div",{className:B(t.headerStyle),style:g},n.a.createElement("div",{className:u.a.leftContainer},_&&n.a.createElement("div",{className:M,style:y,role:b,onClick:()=>{h&&a(0)}},h?x:n.a.createElement("a",{href:r,target:"_blank"},x)),n.a.createElement("div",{className:u.a.info},n.a.createElement("div",{className:u.a.username},n.a.createElement("a",{href:r,target:"_blank",style:{color:t.headerTextColor}},n.a.createElement("span",null,"@"),n.a.createElement("span",null,i.username))),t.showBio&&n.a.createElement("div",{className:u.a.bio},t.bioText),(d||m)&&n.a.createElement("div",{className:u.a.counterList},d&&n.a.createElement("div",{className:u.a.counter},n.a.createElement("span",null,i.mediaCount)," posts"),m&&n.a.createElement("div",{className:u.a.counter},n.a.createElement("span",null,i.followersCount)," followers")))),n.a.createElement("div",{className:u.a.rightContainer},v&&n.a.createElement("div",{className:u.a.followButton,style:E},n.a.createElement(p,{options:t}))),h&&null!==o&&n.a.createElement(S,{stories:l,options:t,onClose:()=>{a(null)}}))}));function B(e){switch(e){case s.a.HeaderStyle.NORMAL:return u.a.normalStyle;case s.a.HeaderStyle.CENTERED:return u.a.centeredStyle;case s.a.HeaderStyle.BOXED:return u.a.boxedStyle;default:return}}var L=o(93),N=o.n(L);const T=Object(l.b)(({feed:e,options:t})=>{const o=n.a.useRef(),a=Object(E.k)(o,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return n.a.createElement("button",{ref:o,className:N.a.root,style:i,onClick:()=>{a(),e.loadMore()}},e.isLoading?n.a.createElement("span",null,"Loading ..."):n.a.createElement("span",null,e.options.loadMoreBtnText))});var A=o(87);t.a=Object(l.b)((function({children:e,feed:t,options:o}){const[a,i]=n.a.useState(null),l=n.a.useCallback(e=>{const a=t.media.findIndex(t=>t.id===e.id);if(!t.options.promotionEnabled||!s.a.executeMediaClick(e,t.options))switch(o.linkBehavior){case s.a.LinkBehavior.LIGHTBOX:return void i(a);case s.a.LinkBehavior.NEW_TAB:return void window.open(e.permalink,"_blank");case s.a.LinkBehavior.SELF:return void window.open(e.permalink,"_self")}},[t,o.linkBehavior]),c={width:o.feedWidth,height:o.feedHeight,fontSize:o.textSize,overflowX:o.feedOverflowX,overflowY:o.feedOverflowY},u={backgroundColor:o.bgColor,padding:o.feedPadding},d={marginBottom:o.imgPadding},m={marginTop:o.buttonPadding},_=o.showHeader&&n.a.createElement("div",{style:d},n.a.createElement(k,{feed:t,options:o})),h=o.showLoadMoreBtn&&t.canLoadMore&&n.a.createElement("div",{className:r.a.loadMoreBtn,style:m},n.a.createElement(T,{feed:t,options:o})),f=o.showFollowBtn&&(o.followBtnLocation===s.a.FollowBtnLocation.BOTTOM||o.followBtnLocation===s.a.FollowBtnLocation.BOTH)&&n.a.createElement("div",{className:r.a.followBtn,style:m},n.a.createElement(p,{options:o})),g=t.isLoading?new Array(o.numPosts).fill(r.a.fakeMedia):[];return n.a.createElement("div",{className:r.a.root,style:c},n.a.createElement("div",{className:r.a.wrapper,style:u},e({mediaList:t.media,openMedia:l,header:_,loadMoreBtn:h,followBtn:f,loadingMedia:g})),null!==a&&n.a.createElement(A.a,{feed:t,current:a,numComments:o.numLightboxComments,showSidebar:o.lightboxShowSidebar,onRequestClose:()=>i(null)}))}))},79:function(e,t,o){"use strict";var a=o(49),n=o.n(a),i=o(0),r=o.n(i),l=o(5),s=o(7),c=o(23),u=o.n(c),d=o(170),m=o(593),p=o(592),_=o(6),h=o(8),f=o(4),g=o(3),b=Object(s.b)((function({options:e,media:t}){var o;const a=r.a.useRef(),[n,s]=r.a.useState(null);Object(i.useEffect)(()=>{a.current&&s(a.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===_.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==l.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===l.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const b=e.hoverInfo.some(e=>e===_.a.HoverInfo.CAPTION),y=e.hoverInfo.some(e=>e===_.a.HoverInfo.USERNAME),v=e.hoverInfo.some(e=>e===_.a.HoverInfo.DATE),E=e.hoverInfo.some(e=>e===_.a.HoverInfo.INSTA_LINK),x=null!==(o=t.caption)&&void 0!==o?o:"",S=t.timestamp?Object(d.a)(t.timestamp):null,M=t.timestamp?Object(m.a)(S).toString():null,w=t.timestamp?Object(p.a)(S,"HH:mm - do MMM yyyy"):null,P=t.timestamp?Object(f.n)(t.timestamp):null,O={color:e.textColorHover,backgroundColor:e.bgColorHover};let C=null;if(null!==n){const o=Math.sqrt(1.3*(n+30)),a=Math.sqrt(1.7*n+100),i=Math.sqrt(n-36),l=Math.max(o,8)+"px",s=Math.max(a,8)+"px",d=Math.max(i,8)+"px",m={fontSize:l},p={fontSize:l,width:l,height:l},_={color:e.textColorHover,fontSize:s,width:s,height:s},f={fontSize:d};C=r.a.createElement("div",{className:u.a.rows},r.a.createElement("div",{className:u.a.topRow},y&&t.username&&r.a.createElement("div",{className:u.a.username},r.a.createElement("a",{href:g.b.getUsernameUrl(t.username),target:"_blank"},"@",t.username)),b&&t.caption&&r.a.createElement("div",{className:u.a.caption},x)),r.a.createElement("div",{className:u.a.middleRow},c&&r.a.createElement("div",{className:u.a.counterList},r.a.createElement("span",{className:u.a.likesCount,style:m},r.a.createElement(h.a,{icon:"heart",style:p})," ",t.likesCount),r.a.createElement("span",{className:u.a.commentsCount,style:m},r.a.createElement(h.a,{icon:"admin-comments",style:p})," ",t.commentsCount))),r.a.createElement("div",{className:u.a.bottomRow},v&&t.timestamp&&r.a.createElement("div",{className:u.a.dateContainer},r.a.createElement("time",{className:u.a.date,dateTime:M,title:w,style:f},P)),E&&r.a.createElement("a",{className:u.a.igLinkIcon,href:t.permalink,title:x,target:"_blank",style:_,onClick:e=>e.stopPropagation()},r.a.createElement(h.a,{icon:"instagram",style:_}))))}return r.a.createElement("div",{ref:a,className:u.a.root,style:O},C)})),y=o(15),v=o(54);t.a=Object(s.b)((function({media:e,options:t,forceOverlay:o,onClick:a}){const[i,s]=r.a.useState(!1),c=function(e){switch(e.type){case l.a.Type.IMAGE:return n.a.imageTypeIcon;case l.a.Type.VIDEO:return n.a.videoTypeIcon;case l.a.Type.ALBUM:return n.a.albumTypeIcon;default:return}}(e),u={backgroundImage:`url(${y.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:n.a.root,onClick:e=>{a&&a(e)},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},r.a.createElement(v.a,{media:e}),r.a.createElement("div",{className:c,style:u}),(i||o)&&r.a.createElement("div",{className:n.a.overlay},r.a.createElement(b,{media:e,options:t}))))}))},8:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var a=o(0),n=o.n(a),i=o(10);const r=e=>{var{icon:t,className:o}=e,a=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["icon","className"]);return n.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},a))}},81:function(e,t,o){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},85:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(70),r=o.n(i),l=o(7),s=o(4),c=o(29);t.a=Object(l.b)((function({media:e,options:t,full:o}){if(!t.showCaptions||!e.type)return null;const a={color:t.captionColor,fontSize:t.captionSize},i=o?0:1,l=e.caption?e.caption:"",u=t.captionMaxLength?Object(s.o)(l,t.captionMaxLength):l,d=Object(c.d)(u,void 0,i,t.captionRemoveDots),m=o?r.a.full:r.a.preview;return n.a.createElement("div",{className:m,style:a},d)}))},86:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(62),r=o.n(i),l=o(7),s=o(5),c=o(8);t.a=Object(l.b)((function({media:e,options:t}){if(!e.type||e.source.type===s.a.Source.Type.PERSONAL_ACCOUNT)return null;const o={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},a=Object.assign(Object.assign({},o),{color:t.likesIconColor}),i=Object.assign(Object.assign({},o),{color:t.commentsIconColor}),l={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&n.a.createElement("div",{className:r.a.root},t.showLikes&&n.a.createElement("div",{className:r.a.icon,style:a},n.a.createElement(c.a,{icon:"heart",style:l}),n.a.createElement("span",null,e.likesCount)),t.showComments&&n.a.createElement("div",{className:r.a