Version Description
- 2021/Aug/27 =
- TWEAK: Bug fixes and updates to the library
Download this release
Release Info
Developer | metaslider |
Plugin | MetaSlider |
Version | 3.23.0 |
Comparing to | |
See all releases |
Code changes from version 3.22.1 to 3.23.0
- extendify-sdk/.eslintrc.js +7 -6
- extendify-sdk/app/Controllers/MetaController.php +30 -0
- extendify-sdk/app/Controllers/TemplateController.php +12 -0
- extendify-sdk/app/Controllers/UserController.php +13 -0
- extendify-sdk/bootstrap.php +5 -1
- extendify-sdk/public/build/extendify-sdk.css +1 -1
- extendify-sdk/public/build/extendify-sdk.js +1 -1
- extendify-sdk/readme.txt +1 -1
- extendify-sdk/routes/api.php +4 -0
- extendify-sdk/src/api/{SimplePing.js → General.js} +5 -2
- extendify-sdk/src/api/Templates.js +15 -0
- extendify-sdk/src/api/User.js +11 -0
- extendify-sdk/src/app.css +20 -1
- extendify-sdk/src/components/ImportButton.js +6 -2
- extendify-sdk/src/components/TemplatesSingle.js +0 -51
- extendify-sdk/src/hooks/helpers.js +11 -0
- extendify-sdk/src/hooks/useBeacon.js +0 -3
- extendify-sdk/src/layout/MainWindow.js +9 -0
- extendify-sdk/src/layout/Toolbar.js +33 -18
- extendify-sdk/src/middleware/NeedsRegistrationModal.js +77 -0
- extendify-sdk/src/middleware/hasPluginsActivated/index.js +2 -2
- extendify-sdk/src/middleware/hasRequiredPlugins/index.js +2 -2
- extendify-sdk/src/middleware/helpers.js +15 -9
- extendify-sdk/src/middleware/index.js +2 -0
- extendify-sdk/src/pages/Content.js +3 -3
- extendify-sdk/src/{components → pages}/TemplatesList.js +0 -0
- extendify-sdk/src/pages/TemplatesSingle.js +121 -0
- extendify-sdk/src/pages/Welcome.js +3 -3
- extendify-sdk/src/state/GlobalState.js +1 -0
- extendify-sdk/src/state/User.js +4 -1
- extendify-sdk/support/notices.php +84 -0
- extendify-sdk/tailwind.config.js +5 -1
- ml-slider.php +2 -3
- readme.txt +4 -1
extendify-sdk/.eslintrc.js
CHANGED
@@ -20,7 +20,7 @@ module.exports = {
|
|
20 |
'require-await': 'error',
|
21 |
quotes: ['error', 'single'],
|
22 |
'comma-dangle': ['error', 'always-multiline'],
|
23 |
-
'multiline-ternary': ['error', 'always'],
|
24 |
'array-element-newline': ['error', 'consistent'],
|
25 |
'no-constant-condition': ['error', {
|
26 |
checkLoops: false,
|
@@ -50,7 +50,9 @@ module.exports = {
|
|
50 |
},
|
51 |
],
|
52 |
'quote-props': ['error', 'as-needed'],
|
53 |
-
'object-curly-spacing': ['error', 'always'
|
|
|
|
|
54 |
'no-multiple-empty-lines': [
|
55 |
'error',
|
56 |
{
|
@@ -69,14 +71,13 @@ module.exports = {
|
|
69 |
'error',
|
70 |
{
|
71 |
ObjectExpression: {
|
72 |
-
minProperties:
|
73 |
},
|
74 |
ObjectPattern: {
|
75 |
-
multiline: true,
|
76 |
},
|
77 |
ImportDeclaration: {
|
78 |
-
multiline: true,
|
79 |
-
minProperties: 3,
|
80 |
},
|
81 |
ExportDeclaration: {
|
82 |
multiline: true,
|
20 |
'require-await': 'error',
|
21 |
quotes: ['error', 'single'],
|
22 |
'comma-dangle': ['error', 'always-multiline'],
|
23 |
+
'multiline-ternary': ['error', 'always-multiline'],
|
24 |
'array-element-newline': ['error', 'consistent'],
|
25 |
'no-constant-condition': ['error', {
|
26 |
checkLoops: false,
|
50 |
},
|
51 |
],
|
52 |
'quote-props': ['error', 'as-needed'],
|
53 |
+
'object-curly-spacing': ['error', 'always', {
|
54 |
+
objectsInObjects: false,
|
55 |
+
}],
|
56 |
'no-multiple-empty-lines': [
|
57 |
'error',
|
58 |
{
|
71 |
'error',
|
72 |
{
|
73 |
ObjectExpression: {
|
74 |
+
consistent: true, multiline: true, minProperties: 3,
|
75 |
},
|
76 |
ObjectPattern: {
|
77 |
+
consistent: true, multiline: true,
|
78 |
},
|
79 |
ImportDeclaration: {
|
80 |
+
multiline: true, minProperties: 3,
|
|
|
81 |
},
|
82 |
ExportDeclaration: {
|
83 |
multiline: true,
|
extendify-sdk/app/Controllers/MetaController.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Controls Http requests
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace Extendify\ExtendifySdk\Controllers;
|
7 |
+
|
8 |
+
use Extendify\ExtendifySdk\Http;
|
9 |
+
|
10 |
+
if (!defined('ABSPATH')) {
|
11 |
+
die('No direct access.');
|
12 |
+
}
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The controller for sending little bits of info
|
16 |
+
*/
|
17 |
+
class MetaController
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Send data about a specific topic
|
21 |
+
*
|
22 |
+
* @param \WP_REST_Request $request - The request.
|
23 |
+
* @return WP_REST_Response|WP_Error
|
24 |
+
*/
|
25 |
+
public static function getAll($request)
|
26 |
+
{
|
27 |
+
$response = Http::get('/meta-data', $request->get_params());
|
28 |
+
return new \WP_REST_Response($response);
|
29 |
+
}
|
30 |
+
}
|
extendify-sdk/app/Controllers/TemplateController.php
CHANGED
@@ -29,6 +29,18 @@ class TemplateController
|
|
29 |
return new \WP_REST_Response($response);
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Send data about a specific template
|
34 |
*
|
29 |
return new \WP_REST_Response($response);
|
30 |
}
|
31 |
|
32 |
+
/**
|
33 |
+
* Get related templates
|
34 |
+
*
|
35 |
+
* @param \WP_REST_Request $request - The request.
|
36 |
+
* @return WP_REST_Response|WP_Error
|
37 |
+
*/
|
38 |
+
public static function related($request)
|
39 |
+
{
|
40 |
+
$response = Http::post('/templates/related', $request->get_params());
|
41 |
+
return new \WP_REST_Response($response);
|
42 |
+
}
|
43 |
+
|
44 |
/**
|
45 |
* Send data about a specific template
|
46 |
*
|
extendify-sdk/app/Controllers/UserController.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
|
6 |
namespace Extendify\ExtendifySdk\Controllers;
|
7 |
|
|
|
8 |
use Extendify\ExtendifySdk\User;
|
9 |
|
10 |
if (!defined('ABSPATH')) {
|
@@ -52,4 +53,16 @@ class UserController
|
|
52 |
|
53 |
return new \WP_REST_Response(User::state());
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
5 |
|
6 |
namespace Extendify\ExtendifySdk\Controllers;
|
7 |
|
8 |
+
use Extendify\ExtendifySdk\Http;
|
9 |
use Extendify\ExtendifySdk\User;
|
10 |
|
11 |
if (!defined('ABSPATH')) {
|
53 |
|
54 |
return new \WP_REST_Response(User::state());
|
55 |
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Sign up the user to the mailing list.
|
59 |
+
*
|
60 |
+
* @param \WP_REST_Request $request - The request.
|
61 |
+
* @return WP_REST_Response|WP_Error
|
62 |
+
*/
|
63 |
+
public static function mailingList($request)
|
64 |
+
{
|
65 |
+
$response = Http::post('/register-mailing-list', $request->get_params());
|
66 |
+
return new \WP_REST_Response($response);
|
67 |
+
}
|
68 |
}
|
extendify-sdk/bootstrap.php
CHANGED
@@ -22,10 +22,14 @@ $extendifysdkAdmin = new Admin();
|
|
22 |
require EXTENDIFYSDK_PATH . 'routes/api.php';
|
23 |
require EXTENDIFYSDK_PATH . 'editorplus/EditorPlus.php';
|
24 |
|
25 |
-
|
26 |
\add_action(
|
27 |
'init',
|
28 |
function () {
|
|
|
|
|
|
|
|
|
|
|
29 |
\load_plugin_textdomain('extendify-sdk', false, EXTENDIFYSDK_PATH . 'languages');
|
30 |
}
|
31 |
);
|
22 |
require EXTENDIFYSDK_PATH . 'routes/api.php';
|
23 |
require EXTENDIFYSDK_PATH . 'editorplus/EditorPlus.php';
|
24 |
|
|
|
25 |
\add_action(
|
26 |
'init',
|
27 |
function () {
|
28 |
+
// Hard-coded to run only within Editor Plus for now.
|
29 |
+
if (isset($GLOBALS['extendifySdkSourcePlugin']) && in_array($GLOBALS['extendifySdkSourcePlugin'], ['Editor Plus'], true)) {
|
30 |
+
require EXTENDIFYSDK_PATH . 'support/notices.php';
|
31 |
+
}
|
32 |
+
|
33 |
\load_plugin_textdomain('extendify-sdk', false, EXTENDIFYSDK_PATH . 'languages');
|
34 |
}
|
35 |
);
|
extendify-sdk/public/build/extendify-sdk.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
*,:after,:before{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.extendify-sdk .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.extendify-sdk .focus\:not-sr-only:focus{clip:auto;height:auto;margin:0;overflow:visible;padding:0;position:static;white-space:normal;width:auto}.extendify-sdk .pointer-events-none{pointer-events:none}.extendify-sdk .static{position:static}.extendify-sdk .fixed{position:fixed}.extendify-sdk .absolute{position:absolute}.extendify-sdk .relative{position:relative}.extendify-sdk .sticky{position:sticky}.extendify-sdk .inset-0{bottom:0;left:0;right:0;top:0}.extendify-sdk .top-0{top:0}.extendify-sdk .top-3{top:.75rem}.extendify-sdk .top-16{top:4rem}.extendify-sdk .right-0{right:0}.extendify-sdk .right-6{right:1.5rem}.extendify-sdk .bottom-0{bottom:0}.extendify-sdk .left-0{left:0}.extendify-sdk .z-0{z-index:0}.extendify-sdk .z-10{z-index:10}.extendify-sdk .z-20{z-index:20}.extendify-sdk .z-30{z-index:30}.extendify-sdk .z-50{z-index:50}.extendify-sdk .z-high{z-index:1000000}.extendify-sdk .m-0{margin:0}.extendify-sdk .m-6{margin:1.5rem}.extendify-sdk .m-auto{margin:auto}.extendify-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.extendify-sdk .mx-auto{margin-left:auto;margin-right:auto}.extendify-sdk .my-2{margin-bottom:.5rem;margin-top:.5rem}.extendify-sdk .my-4{margin-bottom:1rem;margin-top:1rem}.extendify-sdk .mt-0{margin-top:0}.extendify-sdk .mt-1{margin-top:.25rem}.extendify-sdk .mt-4{margin-top:1rem}.extendify-sdk .mt-5{margin-top:1.25rem}.extendify-sdk .mt-px{margin-top:1px}.extendify-sdk .-mt-2{margin-top:-.5rem}.extendify-sdk .-mt-6{margin-top:-1.5rem}.extendify-sdk .-mt-16{margin-top:-4rem}.extendify-sdk .mb-2{margin-bottom:.5rem}.extendify-sdk .mb-4{margin-bottom:1rem}.extendify-sdk .mb-6{margin-bottom:1.5rem}.extendify-sdk .mb-12{margin-bottom:3rem}.extendify-sdk .mb-2\.5{margin-bottom:.625rem}.extendify-sdk .ml-4{margin-left:1rem}.extendify-sdk .ml-8{margin-left:2rem}.extendify-sdk .-ml-px{margin-left:-1px}.extendify-sdk .block{display:block}.extendify-sdk .inline{display:inline}.extendify-sdk .flex{display:flex}.extendify-sdk .inline-flex{display:inline-flex}.extendify-sdk .table{display:table}.extendify-sdk .grid{display:grid}.extendify-sdk .hidden{display:none}.extendify-sdk .h-16{height:4rem}.extendify-sdk .h-80{height:20rem}.extendify-sdk .h-auto{height:auto}.extendify-sdk .h-px{height:1px}.extendify-sdk .h-full{height:100%}.extendify-sdk .h-screen{height:100vh}.extendify-sdk .max-h-60{max-height:15rem}.extendify-sdk .min-h-screen{min-height:100vh}.extendify-sdk .w-32{width:8rem}.extendify-sdk .w-72{width:18rem}.extendify-sdk .w-96{width:24rem}.extendify-sdk .w-full{width:100%}.extendify-sdk .w-screen{width:100vw}.extendify-sdk .max-w-xs{max-width:20rem}.extendify-sdk .max-w-lg{max-width:32rem}.extendify-sdk .max-w-xl{max-width:36rem}.extendify-sdk .max-w-full{max-width:100%}.extendify-sdk .max-w-screen-xl{max-width:1280px}.extendify-sdk .max-w-screen-4xl{max-width:1920px}.extendify-sdk .flex-1{flex:1 1 0%}.extendify-sdk .flex-shrink-0{flex-shrink:0}.extendify-sdk .flex-grow{flex-grow:1}.extendify-sdk .transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.extendify-sdk .-translate-x-3{--tw-translate-x:-0.75rem}.extendify-sdk .translate-x-full{--tw-translate-x:100%}.extendify-sdk .-translate-x-full{--tw-translate-x:-100%}.extendify-sdk .translate-y-0{--tw-translate-y:0px}.extendify-sdk .translate-y-4{--tw-translate-y:1rem}.extendify-sdk .translate-y-0\.5{--tw-translate-y:0.125rem}.extendify-sdk .-translate-y-full{--tw-translate-y:-100%}.extendify-sdk .rotate-180{--tw-rotate:180deg}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.extendify-sdk .cursor-pointer{cursor:pointer}.extendify-sdk .flex-col{flex-direction:column}.extendify-sdk .items-start{align-items:flex-start}.extendify-sdk .items-end{align-items:flex-end}.extendify-sdk .items-center{align-items:center}.extendify-sdk .justify-start{justify-content:flex-start}.extendify-sdk .justify-end{justify-content:flex-end}.extendify-sdk .justify-center{justify-content:center}.extendify-sdk .justify-between{justify-content:space-between}.extendify-sdk .justify-items-center{justify-items:center}.extendify-sdk .gap-6{gap:1.5rem}.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.375rem*var(--tw-space-x-reverse))}.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(4rem*var(--tw-space-y-reverse));margin-top:calc(4rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.extendify-sdk .overflow-hidden{overflow:hidden}.extendify-sdk .overflow-y-auto{overflow-y:auto}.extendify-sdk .whitespace-nowrap{white-space:nowrap}.extendify-sdk .rounded-none{border-radius:0}.extendify-sdk .border-0{border-width:0}.extendify-sdk .border{border-width:1px}.extendify-sdk .border-t-0{border-top-width:0}.extendify-sdk .border-t{border-top-width:1px}.extendify-sdk .border-r{border-right-width:1px}.extendify-sdk .border-b-0{border-bottom-width:0}.extendify-sdk .border-b{border-bottom-width:1px}.extendify-sdk .border-l{border-left-width:1px}.extendify-sdk .border-solid{border-style:solid}.extendify-sdk .border-transparent{border-color:transparent}.extendify-sdk .border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.extendify-sdk .border-gray-200{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.extendify-sdk .border-gray-300{--tw-border-opacity:1;border-color:rgba(221,221,221,var(--tw-border-opacity))}.extendify-sdk .border-gray-900{--tw-border-opacity:1;border-color:rgba(30,30,30,var(--tw-border-opacity))}.extendify-sdk .border-extendify-main{--tw-border-opacity:1;border-color:rgba(0,129,96,var(--tw-border-opacity))}.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1;border-color:rgba(204,24,24,var(--tw-border-opacity))}.extendify-sdk .group:hover .group-hover\:border-wp-theme-500{border-color:var(--wp-admin-theme-color)}.extendify-sdk .bg-transparent{background-color:transparent}.extendify-sdk .bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.extendify-sdk .bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-50{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-100{--tw-bg-opacity:1;background-color:rgba(240,240,240,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-200{--tw-bg-opacity:1;background-color:rgba(224,224,224,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-900{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-lightest{--tw-bg-opacity:1;background-color:rgba(248,255,254,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-light{--tw-bg-opacity:1;background-color:rgba(231,248,245,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity))}.extendify-sdk .group:hover .group-hover\:bg-transparent{background-color:transparent}.extendify-sdk .hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-opacity-30{--tw-bg-opacity:0.3}.extendify-sdk .fill-current{fill:currentColor}.extendify-sdk .stroke-current{stroke:currentColor}.extendify-sdk .object-cover{-o-object-fit:cover;object-fit:cover}.extendify-sdk .p-0{padding:0}.extendify-sdk .p-1{padding:.25rem}.extendify-sdk .p-3{padding:.75rem}.extendify-sdk .p-4{padding:1rem}.extendify-sdk .p-6{padding:1.5rem}.extendify-sdk .p-8{padding:2rem}.extendify-sdk .p-1\.5{padding:.375rem}.extendify-sdk .p-3\.5{padding:.875rem}.extendify-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.extendify-sdk .px-4{padding-left:1rem;padding-right:1rem}.extendify-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.extendify-sdk .py-0{padding-bottom:0;padding-top:0}.extendify-sdk .py-1{padding-bottom:.25rem;padding-top:.25rem}.extendify-sdk .py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .py-4{padding-bottom:1rem;padding-top:1rem}.extendify-sdk .py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.extendify-sdk .pt-4{padding-top:1rem}.extendify-sdk .pt-6{padding-top:1.5rem}.extendify-sdk .pt-14{padding-top:3.5rem}.extendify-sdk .pt-20{padding-top:5rem}.extendify-sdk .pt-px{padding-top:1px}.extendify-sdk .pr-2{padding-right:.5rem}.extendify-sdk .pr-4{padding-right:1rem}.extendify-sdk .pb-2{padding-bottom:.5rem}.extendify-sdk .pb-3{padding-bottom:.75rem}.extendify-sdk .pb-4{padding-bottom:1rem}.extendify-sdk .pb-6{padding-bottom:1.5rem}.extendify-sdk .pb-20{padding-bottom:5rem}.extendify-sdk .pb-32{padding-bottom:8rem}.extendify-sdk .pl-6{padding-left:1.5rem}.extendify-sdk .pl-12{padding-left:3rem}.extendify-sdk .text-left{text-align:left}.extendify-sdk .text-center{text-align:center}.extendify-sdk .text-xs{font-size:.75rem;line-height:1rem}.extendify-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.extendify-sdk .text-base{font-size:1rem;line-height:1.5rem}.extendify-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.extendify-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .font-normal{font-weight:400}.extendify-sdk .font-medium{font-weight:500}.extendify-sdk .font-bold{font-weight:700}.extendify-sdk .leading-none{line-height:1}.extendify-sdk .leading-tight{line-height:1.25}.extendify-sdk .text-black{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.extendify-sdk .text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .text-gray-900{--tw-text-opacity:1;color:rgba(30,30,30,var(--tw-text-opacity))}.extendify-sdk .text-extendify-main{--tw-text-opacity:1;color:rgba(0,129,96,var(--tw-text-opacity))}.extendify-sdk .text-extendify-link{--tw-text-opacity:1;color:rgba(41,152,117,var(--tw-text-opacity))}.extendify-sdk .text-extendify-bright{--tw-text-opacity:1;color:rgba(48,168,80,var(--tw-text-opacity))}.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)}.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1;color:rgba(204,24,24,var(--tw-text-opacity))}.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)}.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.extendify-sdk .active\:text-white:active{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .underline{text-decoration:underline}.extendify-sdk .no-underline{text-decoration:none}.extendify-sdk .opacity-0{opacity:0}.extendify-sdk .focus\:opacity-100:focus,.extendify-sdk .group:hover .group-hover\:opacity-100,.extendify-sdk .opacity-100{opacity:1}*,:after,:before{--tw-shadow:0 0 #0000}.extendify-sdk .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.extendify-sdk .outline-none{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.extendify-sdk .focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)}.extendify-sdk .ring-offset-1{--tw-ring-offset-width:1px}.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.extendify-sdk .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .duration-150{transition-duration:.15s}.extendify-sdk .duration-200{transition-duration:.2s}.extendify-sdk .duration-300{transition-duration:.3s}.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb;box-sizing:border-box}.extendify-sdk .button-focus{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-focus{--tw-ring-offset-width:1px}.button-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity));cursor:pointer}.button-extendify-main:active,.button-extendify-main:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.button-extendify-main{padding:.375rem .75rem}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.button-extendify-main{text-decoration:none;transition-duration:.15s;transition-duration:.2s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .button-extendify-main{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-extendify-main{--tw-ring-offset-width:1px}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent;border-bottom:1px solid #e0e0e0!important}@media (min-width:600px){.extendify-sdk .sm\:static{position:static}.extendify-sdk .sm\:top-auto{top:auto}.extendify-sdk .sm\:m-0{margin:0}.extendify-sdk .sm\:my-6{margin-bottom:1.5rem;margin-top:1.5rem}.extendify-sdk .sm\:mt-64{margin-top:16rem}.extendify-sdk .sm\:mb-12{margin-bottom:3rem}.extendify-sdk .sm\:block{display:block}.extendify-sdk .sm\:flex{display:flex}.extendify-sdk .sm\:hidden{display:none}.extendify-sdk .sm\:h-auto{height:auto}.extendify-sdk .sm\:min-h-0{min-height:0}.extendify-sdk .sm\:w-56{width:14rem}.extendify-sdk .sm\:w-auto{width:auto}.extendify-sdk .sm\:w-full{width:100%}.extendify-sdk .sm\:translate-x-8{--tw-translate-x:2rem}.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem}.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .sm\:border-0{border-width:0}.extendify-sdk .sm\:p-0{padding:0}.extendify-sdk .sm\:p-16{padding:4rem}.extendify-sdk .sm\:px-0{padding-left:0;padding-right:0}.extendify-sdk .sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.extendify-sdk .sm\:px-12{padding-left:3rem;padding-right:3rem}.extendify-sdk .sm\:py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .sm\:py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .sm\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.extendify-sdk .sm\:pt-0{padding-top:0}.extendify-sdk .sm\:pt-6{padding-top:1.5rem}.extendify-sdk .sm\:pr-8{padding-right:2rem}.extendify-sdk .sm\:pb-6{padding-bottom:1.5rem}.extendify-sdk .sm\:pl-0{padding-left:0}.extendify-sdk .sm\:pl-12{padding-left:3rem}.extendify-sdk .sm\:text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .sm\:text-3xl{font-size:2rem;line-height:2.5rem}.extendify-sdk .sm\:opacity-0{opacity:0}}@media (min-width:782px){.extendify-sdk .md\:-mt-32{margin-top:-8rem}.extendify-sdk .md\:flex{display:flex}.extendify-sdk .md\:flex-row{flex-direction:row}.extendify-sdk .md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.extendify-sdk .md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}}@media (min-width:1080px){.extendify-sdk .lg\:static{position:static}.extendify-sdk .lg\:absolute{position:absolute}.extendify-sdk .lg\:mx-0{margin-left:0;margin-right:0}.extendify-sdk .lg\:-mx-2{margin-left:-.5rem;margin-right:-.5rem}.extendify-sdk .lg\:-ml-px{margin-left:-1px}.extendify-sdk .lg\:block{display:block}.extendify-sdk .lg\:flex{display:flex}.extendify-sdk .lg\:hidden{display:none}.extendify-sdk .lg\:h-auto{height:auto}.extendify-sdk .lg\:h-full{height:100%}.extendify-sdk .lg\:w-72{width:18rem}.extendify-sdk .lg\:w-auto{width:auto}.extendify-sdk .lg\:w-1\/2{width:50%}.extendify-sdk .lg\:w-2\/5{width:40%}.extendify-sdk .lg\:max-w-none{max-width:none}.extendify-sdk .lg\:flex-row{flex-direction:row}.extendify-sdk .lg\:items-center{align-items:center}.extendify-sdk .lg\:justify-between{justify-content:space-between}.extendify-sdk .lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.extendify-sdk .lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .lg\:divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.extendify-sdk .lg\:overflow-hidden{overflow:hidden}.extendify-sdk .lg\:border{border-width:1px}.extendify-sdk .lg\:p-5{padding:1.25rem}.extendify-sdk .lg\:p-8{padding:2rem}.extendify-sdk .lg\:px-0{padding-left:0;padding-right:0}.extendify-sdk .lg\:px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .lg\:pt-0{padding-top:0}.extendify-sdk .lg\:pl-px{padding-left:1px}.extendify-sdk .lg\:leading-none{line-height:1}}@media (min-width:1280px){.extendify-sdk .xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .xl\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.extendify-sdk .xl\:space-x-16>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(4rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(4rem*var(--tw-space-x-reverse))}}@media (min-width:1440px){.extendify-sdk .\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
1 |
+
*,:after,:before{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.extendify-sdk .sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.extendify-sdk .focus\:not-sr-only:focus{clip:auto;height:auto;margin:0;overflow:visible;padding:0;position:static;white-space:normal;width:auto}.extendify-sdk .pointer-events-none{pointer-events:none}.extendify-sdk .static{position:static}.extendify-sdk .fixed{position:fixed}.extendify-sdk .absolute{position:absolute}.extendify-sdk .relative{position:relative}.extendify-sdk .sticky{position:sticky}.extendify-sdk .inset-0{bottom:0;left:0;right:0;top:0}.extendify-sdk .top-0{top:0}.extendify-sdk .top-1{top:.25rem}.extendify-sdk .top-3{top:.75rem}.extendify-sdk .top-16{top:4rem}.extendify-sdk .-top-3{top:-.75rem}.extendify-sdk .right-0{right:0}.extendify-sdk .right-6{right:1.5rem}.extendify-sdk .bottom-0{bottom:0}.extendify-sdk .left-0{left:0}.extendify-sdk .left-1{left:.25rem}.extendify-sdk .z-0{z-index:0}.extendify-sdk .z-10{z-index:10}.extendify-sdk .z-20{z-index:20}.extendify-sdk .z-30{z-index:30}.extendify-sdk .z-50{z-index:50}.extendify-sdk .z-high{z-index:1000000}.extendify-sdk .m-0{margin:0}.extendify-sdk .m-6{margin:1.5rem}.extendify-sdk .m-auto{margin:auto}.extendify-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.extendify-sdk .mx-auto{margin-left:auto;margin-right:auto}.extendify-sdk .my-2{margin-bottom:.5rem;margin-top:.5rem}.extendify-sdk .my-4{margin-bottom:1rem;margin-top:1rem}.extendify-sdk .mt-0{margin-top:0}.extendify-sdk .mt-1{margin-top:.25rem}.extendify-sdk .mt-4{margin-top:1rem}.extendify-sdk .mt-5{margin-top:1.25rem}.extendify-sdk .mt-px{margin-top:1px}.extendify-sdk .-mt-2{margin-top:-.5rem}.extendify-sdk .-mt-6{margin-top:-1.5rem}.extendify-sdk .-mt-16{margin-top:-4rem}.extendify-sdk .mb-2{margin-bottom:.5rem}.extendify-sdk .mb-4{margin-bottom:1rem}.extendify-sdk .mb-6{margin-bottom:1.5rem}.extendify-sdk .mb-8{margin-bottom:2rem}.extendify-sdk .mb-12{margin-bottom:3rem}.extendify-sdk .mb-16{margin-bottom:4rem}.extendify-sdk .mb-2\.5{margin-bottom:.625rem}.extendify-sdk .ml-4{margin-left:1rem}.extendify-sdk .ml-8{margin-left:2rem}.extendify-sdk .-ml-px{margin-left:-1px}.extendify-sdk .block{display:block}.extendify-sdk .flex{display:flex}.extendify-sdk .inline-flex{display:inline-flex}.extendify-sdk .table{display:table}.extendify-sdk .grid{display:grid}.extendify-sdk .hidden{display:none}.extendify-sdk .h-8{height:2rem}.extendify-sdk .h-16{height:4rem}.extendify-sdk .h-80{height:20rem}.extendify-sdk .h-auto{height:auto}.extendify-sdk .h-px{height:1px}.extendify-sdk .h-full{height:100%}.extendify-sdk .h-screen{height:100vh}.extendify-sdk .max-h-60{max-height:15rem}.extendify-sdk .min-h-0{min-height:0}.extendify-sdk .min-h-60{min-height:15rem}.extendify-sdk .min-h-screen{min-height:100vh}.extendify-sdk .w-32{width:8rem}.extendify-sdk .w-72{width:18rem}.extendify-sdk .w-96{width:24rem}.extendify-sdk .w-full{width:100%}.extendify-sdk .w-screen{width:100vw}.extendify-sdk .max-w-xs{max-width:20rem}.extendify-sdk .max-w-md{max-width:28rem}.extendify-sdk .max-w-lg{max-width:32rem}.extendify-sdk .max-w-xl{max-width:36rem}.extendify-sdk .max-w-full{max-width:100%}.extendify-sdk .max-w-screen-xl{max-width:1280px}.extendify-sdk .max-w-screen-4xl{max-width:1920px}.extendify-sdk .flex-1{flex:1 1 0%}.extendify-sdk .flex-shrink-0{flex-shrink:0}.extendify-sdk .flex-grow{flex-grow:1}.extendify-sdk .transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.extendify-sdk .-translate-x-3{--tw-translate-x:-0.75rem}.extendify-sdk .translate-x-full{--tw-translate-x:100%}.extendify-sdk .-translate-x-full{--tw-translate-x:-100%}.extendify-sdk .translate-y-0{--tw-translate-y:0px}.extendify-sdk .translate-y-4{--tw-translate-y:1rem}.extendify-sdk .translate-y-0\.5{--tw-translate-y:0.125rem}.extendify-sdk .-translate-y-full{--tw-translate-y:-100%}.extendify-sdk .rotate-180{--tw-rotate:180deg}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@keyframes bounce{0%,to{-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.extendify-sdk .cursor-pointer{cursor:pointer}.extendify-sdk .flex-col{flex-direction:column}.extendify-sdk .items-start{align-items:flex-start}.extendify-sdk .items-end{align-items:flex-end}.extendify-sdk .items-center{align-items:center}.extendify-sdk .justify-start{justify-content:flex-start}.extendify-sdk .justify-end{justify-content:flex-end}.extendify-sdk .justify-center{justify-content:center}.extendify-sdk .justify-between{justify-content:space-between}.extendify-sdk .justify-items-center{justify-items:center}.extendify-sdk .gap-6{gap:1.5rem}.extendify-sdk .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .space-x-1\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.375rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.375rem*var(--tw-space-x-reverse))}.extendify-sdk .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(4rem*var(--tw-space-y-reverse));margin-top:calc(4rem*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.extendify-sdk .overflow-hidden{overflow:hidden}.extendify-sdk .overflow-y-auto{overflow-y:auto}.extendify-sdk .whitespace-nowrap{white-space:nowrap}.extendify-sdk .rounded-none{border-radius:0}.extendify-sdk .border-0{border-width:0}.extendify-sdk .border{border-width:1px}.extendify-sdk .border-t-0{border-top-width:0}.extendify-sdk .border-t{border-top-width:1px}.extendify-sdk .border-b-0{border-bottom-width:0}.extendify-sdk .border-b{border-bottom-width:1px}.extendify-sdk .border-l{border-left-width:1px}.extendify-sdk .border-solid{border-style:solid}.extendify-sdk .border-transparent{border-color:transparent}.extendify-sdk .border-black{--tw-border-opacity:1;border-color:rgba(0,0,0,var(--tw-border-opacity))}.extendify-sdk .border-gray-200{--tw-border-opacity:1;border-color:rgba(224,224,224,var(--tw-border-opacity))}.extendify-sdk .border-gray-300{--tw-border-opacity:1;border-color:rgba(221,221,221,var(--tw-border-opacity))}.extendify-sdk .border-gray-900{--tw-border-opacity:1;border-color:rgba(30,30,30,var(--tw-border-opacity))}.extendify-sdk .border-extendify-main{--tw-border-opacity:1;border-color:rgba(0,129,96,var(--tw-border-opacity))}.extendify-sdk .border-wp-alert-red{--tw-border-opacity:1;border-color:rgba(204,24,24,var(--tw-border-opacity))}.extendify-sdk .group:hover .group-hover\:border-wp-theme-500,.extendify-sdk .hover\:border-wp-theme-500:hover{border-color:var(--wp-admin-theme-color)}.extendify-sdk .focus\:border-transparent:focus{border-color:transparent}.extendify-sdk .bg-transparent{background-color:transparent}.extendify-sdk .bg-black{--tw-bg-opacity:1;background-color:rgba(0,0,0,var(--tw-bg-opacity))}.extendify-sdk .bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-50{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-100{--tw-bg-opacity:1;background-color:rgba(240,240,240,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-200{--tw-bg-opacity:1;background-color:rgba(224,224,224,var(--tw-bg-opacity))}.extendify-sdk .bg-gray-900{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-lightest{--tw-bg-opacity:1;background-color:rgba(248,255,254,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-light{--tw-bg-opacity:1;background-color:rgba(231,248,245,var(--tw-bg-opacity))}.extendify-sdk .bg-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity))}.extendify-sdk .group:hover .group-hover\:bg-transparent{background-color:transparent}.extendify-sdk .hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(250,250,250,var(--tw-bg-opacity))}.extendify-sdk .hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .focus\:bg-white:focus{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.extendify-sdk .active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.extendify-sdk .bg-opacity-30{--tw-bg-opacity:0.3}.extendify-sdk .fill-current{fill:currentColor}.extendify-sdk .stroke-current{stroke:currentColor}.extendify-sdk .object-cover{-o-object-fit:cover;object-fit:cover}.extendify-sdk .p-0{padding:0}.extendify-sdk .p-1{padding:.25rem}.extendify-sdk .p-2{padding:.5rem}.extendify-sdk .p-3{padding:.75rem}.extendify-sdk .p-4{padding:1rem}.extendify-sdk .p-6{padding:1.5rem}.extendify-sdk .p-8{padding:2rem}.extendify-sdk .p-1\.5{padding:.375rem}.extendify-sdk .p-3\.5{padding:.875rem}.extendify-sdk .px-1{padding-left:.25rem;padding-right:.25rem}.extendify-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.extendify-sdk .px-4{padding-left:1rem;padding-right:1rem}.extendify-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.extendify-sdk .py-0{padding-bottom:0;padding-top:0}.extendify-sdk .py-1{padding-bottom:.25rem;padding-top:.25rem}.extendify-sdk .py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .py-4{padding-bottom:1rem;padding-top:1rem}.extendify-sdk .py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.extendify-sdk .pt-4{padding-top:1rem}.extendify-sdk .pt-6{padding-top:1.5rem}.extendify-sdk .pt-14{padding-top:3.5rem}.extendify-sdk .pt-20{padding-top:5rem}.extendify-sdk .pt-px{padding-top:1px}.extendify-sdk .pr-2{padding-right:.5rem}.extendify-sdk .pr-4{padding-right:1rem}.extendify-sdk .pb-2{padding-bottom:.5rem}.extendify-sdk .pb-3{padding-bottom:.75rem}.extendify-sdk .pb-4{padding-bottom:1rem}.extendify-sdk .pb-6{padding-bottom:1.5rem}.extendify-sdk .pb-20{padding-bottom:5rem}.extendify-sdk .pb-32{padding-bottom:8rem}.extendify-sdk .pb-40{padding-bottom:10rem}.extendify-sdk .pl-6{padding-left:1.5rem}.extendify-sdk .pl-12{padding-left:3rem}.extendify-sdk .text-left{text-align:left}.extendify-sdk .text-center{text-align:center}.extendify-sdk .text-xs{font-size:.75rem;line-height:1rem}.extendify-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.extendify-sdk .text-base{font-size:1rem;line-height:1.5rem}.extendify-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.extendify-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .font-normal{font-weight:400}.extendify-sdk .font-medium{font-weight:500}.extendify-sdk .font-semibold{font-weight:600}.extendify-sdk .font-bold{font-weight:700}.extendify-sdk .leading-none{line-height:1}.extendify-sdk .leading-tight{line-height:1.25}.extendify-sdk .text-black{--tw-text-opacity:1;color:rgba(0,0,0,var(--tw-text-opacity))}.extendify-sdk .text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .text-gray-900{--tw-text-opacity:1;color:rgba(30,30,30,var(--tw-text-opacity))}.extendify-sdk .text-extendify-main{--tw-text-opacity:1;color:rgba(0,129,96,var(--tw-text-opacity))}.extendify-sdk .text-extendify-link{--tw-text-opacity:1;color:rgba(41,152,117,var(--tw-text-opacity))}.extendify-sdk .text-extendify-bright{--tw-text-opacity:1;color:rgba(48,168,80,var(--tw-text-opacity))}.extendify-sdk .text-wp-theme-500{color:var(--wp-admin-theme-color)}.extendify-sdk .text-wp-alert-red{--tw-text-opacity:1;color:rgba(204,24,24,var(--tw-text-opacity))}.extendify-sdk .hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .hover\:text-wp-theme-500:hover{color:var(--wp-admin-theme-color)}.extendify-sdk .focus\:text-white:focus{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .focus\:text-blue-500:focus{--tw-text-opacity:1;color:rgba(59,130,246,var(--tw-text-opacity))}.extendify-sdk .active\:text-white:active{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.extendify-sdk .underline{text-decoration:underline}.extendify-sdk .no-underline{text-decoration:none}.extendify-sdk .placeholder-transparent::-moz-placeholder{color:transparent}.extendify-sdk .placeholder-transparent:-ms-input-placeholder{color:transparent}.extendify-sdk .placeholder-transparent::placeholder{color:transparent}.extendify-sdk .opacity-0{opacity:0}.extendify-sdk .focus\:opacity-100:focus,.extendify-sdk .group:hover .group-hover\:opacity-100,.extendify-sdk .opacity-100{opacity:1}*,:after,:before{--tw-shadow:0 0 #0000}.extendify-sdk .shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.extendify-sdk .outline-none{outline:2px solid transparent;outline-offset:2px}*,:after,:before{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000}.extendify-sdk .focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .focus\:ring-wp-theme-500:focus{--tw-ring-color:var(--wp-admin-theme-color)}.extendify-sdk .ring-offset-1{--tw-ring-offset-width:1px}.extendify-sdk .filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.extendify-sdk .transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition{transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .duration-150{transition-duration:.15s}.extendify-sdk .duration-200{transition-duration:.2s}.extendify-sdk .duration-300{transition-duration:.3s}.extendify-sdk .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.extendify-sdk *,.extendify-sdk :after,.extendify-sdk :before{border:0 solid #e5e7eb;box-sizing:border-box}.extendify-sdk .button-focus{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-focus:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-focus{--tw-ring-offset-width:1px}.button-extendify-main{--tw-bg-opacity:1;background-color:rgba(0,129,96,var(--tw-bg-opacity));cursor:pointer;white-space:nowrap}.button-extendify-main:active,.button-extendify-main:hover{--tw-bg-opacity:1;background-color:rgba(30,30,30,var(--tw-bg-opacity))}.button-extendify-main{padding:.375rem .75rem}.button-extendify-main,.button-extendify-main:active,.button-extendify-main:focus,.button-extendify-main:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.button-extendify-main{text-decoration:none;transition-duration:.15s;transition-duration:.2s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.extendify-sdk .button-extendify-main{outline:2px solid transparent;outline-offset:2px}.extendify-sdk .button-extendify-main:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:var(--wp-admin-theme-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.extendify-sdk .button-extendify-main{--tw-ring-offset-width:1px}.extendify-sdk input.button-extendify-main:focus,.extendify-sdk input.button-focus:focus,.extendify-sdk select.button-extendify-main:focus,.extendify-sdk select.button-focus:focus{border-color:transparent;outline:2px solid transparent;outline-offset:2px}#extendify-search-input:not(:-moz-placeholder-shown)~svg{display:none}#extendify-search-input:not(:-ms-input-placeholder)~svg{display:none}#extendify-search-input:focus~svg,#extendify-search-input:not(:placeholder-shown)~svg{display:none}#extendify-search-input::-webkit-textfield-decoration-container{margin-right:.75rem}.extendify-sdk .components-panel__body>.components-panel__body-title{background-color:transparent;border-bottom:1px solid #e0e0e0!important}.extendify-sdk .components-modal__header{--tw-border-opacity:1;border-bottom-width:1px;border-color:rgba(221,221,221,var(--tw-border-opacity))}.extendify-special-input:-moz-placeholder-shown~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:-ms-input-placeholder~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:placeholder-shown~label{--tw-text-opacity:1;color:rgba(148,148,148,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;top:.375rem}.extendify-special-input:focus~label{color:var(--wp-admin-theme-color);font-size:.75rem;line-height:1rem;top:-.75rem}@media (min-width:600px){.extendify-sdk .sm\:top-auto{top:auto}.extendify-sdk .sm\:m-0{margin:0}.extendify-sdk .sm\:my-6{margin-bottom:1.5rem;margin-top:1.5rem}.extendify-sdk .sm\:mt-64{margin-top:16rem}.extendify-sdk .sm\:mb-8{margin-bottom:2rem}.extendify-sdk .sm\:block{display:block}.extendify-sdk .sm\:flex{display:flex}.extendify-sdk .sm\:hidden{display:none}.extendify-sdk .sm\:h-auto{height:auto}.extendify-sdk .sm\:min-h-0{min-height:0}.extendify-sdk .sm\:w-56{width:14rem}.extendify-sdk .sm\:w-auto{width:auto}.extendify-sdk .sm\:w-full{width:100%}.extendify-sdk .sm\:translate-x-6{--tw-translate-x:1.5rem}.extendify-sdk .sm\:translate-x-8{--tw-translate-x:2rem}.extendify-sdk .sm\:translate-y-5{--tw-translate-y:1.25rem}.extendify-sdk .sm\:space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(3rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(3rem*var(--tw-space-x-reverse))}.extendify-sdk .sm\:border-0{border-width:0}.extendify-sdk .sm\:p-0{padding:0}.extendify-sdk .sm\:p-16{padding:4rem}.extendify-sdk .sm\:px-0{padding-left:0;padding-right:0}.extendify-sdk .sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.extendify-sdk .sm\:px-12{padding-left:3rem;padding-right:3rem}.extendify-sdk .sm\:py-2{padding-bottom:.5rem;padding-top:.5rem}.extendify-sdk .sm\:py-6{padding-bottom:1.5rem;padding-top:1.5rem}.extendify-sdk .sm\:py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.extendify-sdk .sm\:pt-0{padding-top:0}.extendify-sdk .sm\:pt-6{padding-top:1.5rem}.extendify-sdk .sm\:pr-8{padding-right:2rem}.extendify-sdk .sm\:pb-6{padding-bottom:1.5rem}.extendify-sdk .sm\:pl-0{padding-left:0}.extendify-sdk .sm\:pl-12{padding-left:3rem}.extendify-sdk .sm\:text-2xl{font-size:1.5rem;line-height:2rem}.extendify-sdk .sm\:text-3xl{font-size:2rem;line-height:2.5rem}.extendify-sdk .sm\:opacity-0{opacity:0}}@media (min-width:782px){.extendify-sdk .md\:-mt-32{margin-top:-8rem}.extendify-sdk .md\:flex{display:flex}.extendify-sdk .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .md\:flex-row{flex-direction:row}.extendify-sdk .md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.extendify-sdk .md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}}@media (min-width:1080px){.extendify-sdk .lg\:static{position:static}.extendify-sdk .lg\:absolute{position:absolute}.extendify-sdk .lg\:sticky{position:sticky}.extendify-sdk .lg\:mx-0{margin-left:0;margin-right:0}.extendify-sdk .lg\:-mx-2{margin-left:-.5rem;margin-right:-.5rem}.extendify-sdk .lg\:-ml-px{margin-left:-1px}.extendify-sdk .lg\:block{display:block}.extendify-sdk .lg\:flex{display:flex}.extendify-sdk .lg\:h-auto{height:auto}.extendify-sdk .lg\:h-full{height:100%}.extendify-sdk .lg\:w-72{width:18rem}.extendify-sdk .lg\:w-auto{width:auto}.extendify-sdk .lg\:w-1\/2{width:50%}.extendify-sdk .lg\:w-2\/5{width:40%}.extendify-sdk .lg\:max-w-none{max-width:none}.extendify-sdk .lg\:flex-row{flex-direction:row}.extendify-sdk .lg\:items-center{align-items:center}.extendify-sdk .lg\:justify-between{justify-content:space-between}.extendify-sdk .lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.extendify-sdk .lg\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.extendify-sdk .lg\:divide-x-2>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(2px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(2px*var(--tw-divide-x-reverse))}.extendify-sdk .lg\:overflow-hidden{overflow:hidden}.extendify-sdk .lg\:border{border-width:1px}.extendify-sdk .lg\:border-t-0{border-top-width:0}.extendify-sdk .lg\:border-b{border-bottom-width:1px}.extendify-sdk .lg\:p-5{padding:1.25rem}.extendify-sdk .lg\:p-8{padding:2rem}.extendify-sdk .lg\:px-0{padding-left:0;padding-right:0}.extendify-sdk .lg\:px-2{padding-left:.5rem;padding-right:.5rem}.extendify-sdk .lg\:pt-0{padding-top:0}.extendify-sdk .lg\:pl-px{padding-left:1px}.extendify-sdk .lg\:leading-none{line-height:1}}@media (min-width:1280px){.extendify-sdk .xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.extendify-sdk .xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.extendify-sdk .xl\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.extendify-sdk .xl\:space-x-16>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(4rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(4rem*var(--tw-space-x-reverse))}}@media (min-width:1440px){.extendify-sdk .\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
extendify-sdk/public/build/extendify-sdk.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
-
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),i=n(570),o=n(940),a=n(581),s=n(574),u=n(845),l=n(338),c=n(524);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var v=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};i(t,n,o),p=null}},p.onabort=function(){p&&(n(c("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(c(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||l(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},57:(e,t,n)=>{"use strict";var r=n(485),i=n(875),o=n(29),a=n(941);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=s(n(141));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(132),u.CancelToken=n(603),u.isCancel=n(475),u.all=function(e){return Promise.all(e)},u.spread=n(739),u.isAxiosError=n(835),e.exports=u,e.exports.default=u},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),i=n(581),o=n(96),a=n(9),s=n(941);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},96:(e,t,n)=>{"use strict";var r=n(485);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},574:(e,t,n)=>{"use strict";var r=n(642),i=n(288);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},9:(e,t,n)=>{"use strict";var r=n(485),i=n(212),o=n(475),a=n(141);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,l),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var c=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return r.forEach(f,l),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),i=n(485),o=n(446),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,l={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(u=n(387)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),e.exports=l},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},485:(e,t,n)=>{"use strict";var r=n(875),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},152:(e,t,n)=>{"use strict";const r=wp.element;var i=n(804),o=n.n(i);function a(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let a=r(t);function s(){const n=r(t);if(!o(a,n)){const t=a;e(a=n,t)}}return n.add(s),()=>n.delete(s)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const s="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;const u=function(e){const t="function"==typeof e?a(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,i.useReducer)((e=>e+1),0),o=t.getState(),a=(0,i.useRef)(o),u=(0,i.useRef)(e),l=(0,i.useRef)(n),c=(0,i.useRef)(!1),f=(0,i.useRef)();let d;void 0===f.current&&(f.current=e(o));let p=!1;(a.current!==o||u.current!==e||l.current!==n||c.current)&&(d=e(o),p=!n(f.current,d)),s((()=>{p&&(f.current=d),a.current=o,u.current=e,l.current=n,c.current=!1}));const h=(0,i.useRef)(o);return s((()=>{const e=()=>{try{const e=t.getState(),n=u.current(e);l.current(f.current,n)||(a.current=e,f.current=n,r())}catch(e){c.current=!0,r()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]),p?d:f.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n};var l="pattern",c=12;function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=window.wp.blocks.createBlock;return e.map((function(e){var n=f(Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],3),r=n[0],i=n[1],o=n[2];return t(r,i,p(void 0===o?[]:o))}))}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=u((function(e,t){return{templates:[],fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},searchParams:{taxonomies:{},type:l,search:""},nextPage:"",removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:y(new Map([].concat(y(t().templates),y(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(n){var r=Object.keys(n).reduce((function(e,n){return e[n]=function(e){return function(e,t){return"pattern"===e&&"tax_categories"===t?"Default":""}(t().searchParams.type,e)}(n),e}),{}),i={};i.taxonomies=Object.assign({},r,t().searchParams.taxonomies),e({taxonomyDefaultState:r,searchParams:m({},Object.assign(t().searchParams,i))})},setActive:function(t){var n;if(e({activeTemplate:t}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code){var r=window.wp.blocks.parse;e({activeTemplateBlocks:p(r(t.fields.code))})}},resetTaxonomies:function(){var e=v({},"tax_categories","pattern"===t().searchParams.type?"Default":"");t().updateSearchParams({taxonomies:Object.assign(t().taxonomyDefaultState,e)})},updateTaxonomies:function(e){var n={};n.taxonomies=Object.assign({},t().searchParams.taxonomies,e),t().updateSearchParams(n)},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState),e({templates:[],nextPage:"",searchParams:m({},Object.assign(t().searchParams,n))})}}})),b=u((function(e){return{open:!1,currentPage:"welcome",setOpen:function(t){e({open:t}),t&&g.getState().removeTemplates()}}})),w=n(135),j=n.n(w),k=Object.defineProperty,S=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,N=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))_.call(t,n)&&N(e,n,t[n]);if(S)for(var n of S(t))E.call(t,n)&&N(e,n,t[n]);return e};const C=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>C(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>C(t)(e)}}},P=(e,t)=>(n,r,i)=>{const{name:o,getStorage:a=(()=>localStorage),serialize:s=JSON.stringify,deserialize:u=JSON.parse,blacklist:l,whitelist:c,onRehydrateStorage:f,version:d=0,migrate:p,merge:h=((e,t)=>O(O({},t),e))}=t||{};let m;try{m=a()}catch(e){}if(!m)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...e)}),r,i);const v=C(s),y=()=>{const e=O({},r());let t;c&&Object.keys(e).forEach((t=>{!c.includes(t)&&delete e[t]})),l&&l.forEach((t=>delete e[t]));const n=v({state:e,version:d}).then((e=>m.setItem(o,e))).catch((e=>{t=e}));if(t)throw t;return n},x=i.setState;i.setState=(e,t)=>{x(e,t),y()};const g=e(((...e)=>{n(...e),y()}),r,i);let b;const w=(null==f?void 0:f(r()))||void 0;return C(m.getItem.bind(m))(o).then((e=>{if(e)return u(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===d)return e.state;if(p)return p(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(b=h(e,g),n(b,!0),y()))).then((()=>{null==w||w(b,void 0)})).catch((e=>{null==w||w(void 0,e)})),b||g};var A=n(206),F=n.n(A)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function T(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}F.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(T(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(T(e.response))}(e)})),F.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=W.getState().remainingImports(),e.data.entry_point=W.getState().entryPoint,e.data.total_imports=W.getState().imports),e}(e))}),(function(e){return e}));var L=function(){return F.get("user")},I=function(e){return F.get("user-meta",{params:{key:e}})},D=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),F.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},R=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),F.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})};function V(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){V(o,r,i,a,s,"next",e)}function s(e){V(o,r,i,a,s,"throw",e)}a(void 0)}))}}var H,B,U,q,Z={getItem:(B=M(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return B.apply(this,arguments)}),setItem:(H=M(j().mark((function e(t,n){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return H.apply(this,arguments)})},W=u(P((function(e,t){return{apiKey:"",imports:0,uuid:"",email:"",allowedImports:0,entryPoint:"not-set",enabled:!0,hasClickedThroughWelcomePage:!1,canInstallPlugins:!1,canActivatePlugins:!1,incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0}}}),{name:"extendify-user",getStorage:function(){return Z}}));function z(){return(z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Y(e,t){if(e in t){for(var n=t[e],r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,i):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,Y),a}function X(e){var t=e.props,n=e.slot,r=e.defaultTag,i=e.features,o=e.visible,a=void 0===o||o,s=e.name;if(a)return J(t,n,r,s);var u=null!=i?i:U.None;if(u&U.Static){var l=t.static,c=void 0!==l&&l,f=$(t,["static"]);if(c)return J(f,n,r,s)}if(u&U.RenderStrategy){var d,p=t.unmount,h=void 0===p||p,m=$(t,["unmount"]);return Y(h?q.Unmount:q.Hidden,((d={})[q.Unmount]=function(){return null},d[q.Hidden]=function(){return J(z({},m,{hidden:!0,style:{display:"none"}}),n,r,s)},d))}return J(t,n,r,s)}function J(e,t,n,r){var o;void 0===t&&(t={});var a=ee(e,["unmount","static"]),s=a.as,u=void 0===s?n:s,l=a.children,c=a.refName,f=void 0===c?"ref":c,d=$(a,["as","children","refName"]),p=void 0!==e.ref?((o={})[f]=e.ref,o):{},h="function"==typeof l?l(t):l;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),u===i.Fragment&&Object.keys(d).length>0){if(!(0,i.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,i.cloneElement)(h,Object.assign({},function(e,t,n){for(var r,i=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(i,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},a=K(n);!(r=a()).done;)o();return i}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(ee(d,["ref"])),h.props,["onClick"]),p))}return(0,i.createElement)(u,Object.assign({},ee(d,["ref"]),u!==i.Fragment&&p),h)}function Q(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function ee(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),i=K(t);!(n=i()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(U||(U={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(q||(q={}));var te="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,ne={serverHandoffComplete:!1};function re(){var e=(0,i.useState)(ne.serverHandoffComplete),t=e[0],n=e[1];return(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){!1===ne.serverHandoffComplete&&(ne.serverHandoffComplete=!0)}),[]),t}var ie=0;function oe(){return++ie}function ae(){var e=re(),t=(0,i.useState)(e?oe:null),n=t[0],r=t[1];return te((function(){null===n&&r(oe())}),[n]),null!=n?""+n:void 0}function se(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var ue,le,ce=(0,i.createContext)(null);function fe(){return(0,i.useContext)(ce)}function de(e){var t=e.value,n=e.children;return o().createElement(ce.Provider,{value:t},n)}function pe(){var e=(0,i.useRef)(!0);return(0,i.useEffect)((function(){e.current=!1}),[]),e.current}function he(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=K(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function me(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function ve(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function ye(e,t,n,r,i,o){var a=he(),s=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return ve.apply(void 0,[e].concat(i)),me.apply(void 0,[e].concat(t,n)),a.nextFrame((function(){ve.apply(void 0,[e].concat(n)),me.apply(void 0,[e].concat(r)),a.add(function(e,t){var n=he();if(!e)return n.dispose;var r=getComputedStyle(e),i=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=i[0],a=i[1];return 0!==o?n.setTimeout((function(){t(le.Finished)}),o+a):t(le.Finished),n.add((function(){return t(le.Cancelled)})),n.dispose}(e,(function(n){return ve.apply(void 0,[e].concat(r,t)),me.apply(void 0,[e].concat(i)),s(n)})))})),a.add((function(){return ve.apply(void 0,[e].concat(t,n,r,i))})),a.add((function(){return s(le.Cancelled)})),a.dispose}function xe(e){return void 0===e&&(e=""),(0,i.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}ce.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ue||(ue={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(le||(le={}));var ge,be=(0,i.createContext)(null);be.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(ge||(ge={}));var we=(0,i.createContext)(null);function je(e){return"children"in e?je(e.children):e.current.filter((function(e){return e.state===ge.Visible})).length>0}function ke(e){var t=(0,i.useRef)(e),n=(0,i.useRef)([]),r=se();(0,i.useEffect)((function(){t.current=e}),[e]);var o=(0,i.useCallback)((function(e,i){var o;void 0===i&&(i=q.Hidden);var a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(Y(i,((o={})[q.Unmount]=function(){n.current.splice(a,1)},o[q.Hidden]=function(){n.current[a].state=ge.Hidden},o)),!je(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),a=(0,i.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==ge.Visible&&(t.state=ge.Visible):n.current.push({id:e,state:ge.Visible}),function(){return o(e,q.Unmount)}}),[n,o]);return(0,i.useMemo)((function(){return{children:n,register:a,unregister:o}}),[a,o,n])}function Se(){}we.displayName="NestingContext";var _e=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ee(e){for(var t,n={},r=K(_e);!(t=r()).done;){var i,o=t.value;n[o]=null!=(i=e[o])?i:Se}return n}var Ne,Oe=U.RenderStrategy;function Ce(e){var t,n=e.beforeEnter,r=e.afterEnter,a=e.beforeLeave,s=e.afterLeave,u=e.enter,l=e.enterFrom,c=e.enterTo,f=e.entered,d=e.leave,p=e.leaveFrom,h=e.leaveTo,m=$(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),v=(0,i.useRef)(null),y=(0,i.useState)(ge.Visible),x=y[0],g=y[1],b=m.unmount?q.Unmount:q.Hidden,w=function(){var e=(0,i.useContext)(be);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,S=function(){var e=(0,i.useContext)(we);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),_=S.register,E=S.unregister,N=pe(),O=ae(),C=(0,i.useRef)(!1),P=ke((function(){C.current||(g(ge.Hidden),E(O),V.current.afterLeave())}));te((function(){if(O)return _(O)}),[_,O]),te((function(){var e;b===q.Hidden&&O&&(j&&x!==ge.Visible?g(ge.Visible):Y(x,((e={})[ge.Hidden]=function(){return E(O)},e[ge.Visible]=function(){return _(O)},e)))}),[x,O,_,E,j,b]);var A=xe(u),F=xe(l),T=xe(c),L=xe(f),I=xe(d),D=xe(p),R=xe(h),V=function(e){var t=(0,i.useRef)(Ee(e));return(0,i.useEffect)((function(){t.current=Ee(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:a,afterLeave:s}),M=re();(0,i.useEffect)((function(){if(M&&x===ge.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,x,M]);var H=N&&!k;te((function(){var e=v.current;if(e&&!H)return C.current=!0,j&&V.current.beforeEnter(),j||V.current.beforeLeave(),j?ye(e,A,F,T,L,(function(e){C.current=!1,e===le.Finished&&V.current.afterEnter()})):ye(e,I,D,R,L,(function(e){C.current=!1,e===le.Finished&&(je(P)||(g(ge.Hidden),E(O),V.current.afterLeave()))}))}),[V,O,C,E,P,v,H,j,A,F,T,I,D,R]);var B={ref:v},U=m;return o().createElement(we.Provider,{value:P},o().createElement(de,{value:Y(x,(t={},t[ge.Visible]=ue.Open,t[ge.Hidden]=ue.Closed,t))},X({props:z({},U,B),defaultTag:"div",features:Oe,visible:x===ge.Visible,name:"Transition.Child"})))}function Pe(e){var t,n=e.show,r=e.appear,a=void 0!==r&&r,s=e.unmount,u=$(e,["show","appear","unmount"]),l=fe();void 0===n&&null!==l&&(n=Y(l,((t={})[ue.Open]=!0,t[ue.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var c=(0,i.useState)(n?ge.Visible:ge.Hidden),f=c[0],d=c[1],p=ke((function(){d(ge.Hidden)})),h=pe(),m=(0,i.useMemo)((function(){return{show:n,appear:a||!h}}),[n,a,h]);(0,i.useEffect)((function(){n?d(ge.Visible):je(p)||d(ge.Hidden)}),[n,p]);var v={unmount:s};return o().createElement(we.Provider,{value:p},o().createElement(be.Provider,{value:m},X({props:z({},v,{as:i.Fragment,children:o().createElement(Ce,Object.assign({},v,u))}),defaultTag:i.Fragment,features:Oe,visible:f===ge.Visible,name:"Transition"})))}function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,i.useRef)(t);return(0,i.useEffect)((function(){r.current=t}),[t]),(0,i.useCallback)((function(e){for(var t,n=K(r.current);!(t=n()).done;){var i=t.value;null!=i&&("function"==typeof i?i(e):i.current=e)}}),[r])}function Fe(e){for(var t,n,r=e.parentElement,i=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(i=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(i))&&o}function Te(e,t,n){var r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Pe.Child=function(e){var t=null!==(0,i.useContext)(be),n=null!==fe();return!t&&n?o().createElement(Pe,Object.assign({},e)):o().createElement(Ce,Object.assign({},e))},Pe.Root=Pe,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Ne||(Ne={}));var Le,Ie,De,Re,Ve,Me=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function He(e){null==e||e.focus({preventScroll:!0})}function Be(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(Me))}(e),r=document.activeElement,i=function(){if(t&(Le.First|Le.Next))return De.Next;if(t&(Le.Previous|Le.Last))return De.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),o=function(){if(t&Le.First)return 0;if(t&Le.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Le.Next)return Math.max(0,n.indexOf(r))+1;if(t&Le.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&Le.NoScroll?{preventScroll:!0}:{},s=0,u=n.length,l=void 0;do{var c;if(s>=u||s+u<=0)return Ie.Error;var f=o+s;if(t&Le.WrapAround)f=(f+u)%u;else{if(f<0)return Ie.Underflow;if(f>=u)return Ie.Overflow}null==(c=l=n[f])||c.focus(a),s+=i}while(l!==document.activeElement);return l.hasAttribute("tabindex")||l.setAttribute("tabindex","0"),Ie.Success}function Ue(e,t,n){void 0===t&&(t=Ve.All);var r=void 0===n?{}:n,o=r.initialFocus,a=r.containers,s=(0,i.useRef)("undefined"!=typeof window?document.activeElement:null),u=(0,i.useRef)(null),l=se(),c=Boolean(t&Ve.RestoreFocus),f=Boolean(t&Ve.InitialFocus);(0,i.useEffect)((function(){c&&(s.current=document.activeElement)}),[c]),(0,i.useEffect)((function(){if(c)return function(){He(s.current),s.current=null}}),[c]),(0,i.useEffect)((function(){if(f&&e.current){var t=document.activeElement;if(null==o?void 0:o.current){if((null==o?void 0:o.current)===t)return void(u.current=t)}else if(e.current.contains(t))return void(u.current=t);if(null==o?void 0:o.current)He(o.current);else if(Be(e.current,Le.First)===Ie.Error)throw new Error("There are no focusable elements inside the <FocusTrap />");u.current=document.activeElement}}),[e,o,f]),Te("keydown",(function(n){t&Ve.TabLock&&e.current&&n.key===Ne.Tab&&(n.preventDefault(),Be(e.current,(n.shiftKey?Le.Previous:Le.Next)|Le.WrapAround)===Ie.Success&&(u.current=document.activeElement))})),Te("focus",(function(n){if(t&Ve.FocusLock){var r=new Set(null==a?void 0:a.current);if(r.add(e),r.size){var i=u.current;if(i&&l.current){var o=n.target;o&&o instanceof HTMLElement?!function(e,t){for(var n,r=K(e);!(n=r()).done;){var i;if(null==(i=n.value.current)?void 0:i.contains(t))return!0}return!1}(r,o)?(n.preventDefault(),n.stopPropagation(),He(i)):(u.current=o,He(o)):He(u.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Le||(Le={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(Ie||(Ie={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(De||(De={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(Re||(Re={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(Ve||(Ve={}));var qe=new Set,Ze=new Map;function We(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function ze(e){var t=Ze.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var $e=(0,i.createContext)(!1);function Ge(e){return o().createElement($e.Provider,{value:e.force},e.children)}const Ke=ReactDOM;function Ye(){var e=(0,i.useContext)($e),t=(0,i.useContext)(et),n=(0,i.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],o=n[1];return(0,i.useEffect)((function(){e||null!==t&&o(t.current)}),[t,o,e]),r}var Xe=i.Fragment;function Je(e){var t=e,n=Ye(),r=(0,i.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],o=re();return te((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),o&&n&&r?(0,Ke.createPortal)(X({props:t,defaultTag:Xe,name:"Portal"}),r):null}var Qe=i.Fragment,et=(0,i.createContext)(null);Je.Group=function(e){var t=e.target,n=$(e,["target"]);return o().createElement(et.Provider,{value:t},X({props:n,defaultTag:Qe,name:"Popover.Group"}))};var tt=(0,i.createContext)(null);function nt(){var e=(0,i.useContext)(tt);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,nt),t}return e}var rt,it,ot,at,st=(0,i.createContext)((function(){}));function ut(e){var t=e.children,n=e.onUpdate,r=e.type,a=e.element,s=(0,i.useContext)(st),u=(0,i.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),s.apply(void 0,t)}),[s,n]);return te((function(){return u(rt.Add,r,a),function(){return u(rt.Remove,r,a)}}),[u,r,a]),o().createElement(st.Provider,{value:u},t)}st.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(rt||(rt={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(ot||(ot={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(at||(at={}));var lt=((it={})[at.SetTitleId]=function(e,t){return e.titleId===t.id?e:z({},e,{titleId:t.id})},it),ct=(0,i.createContext)(null);function ft(e){var t=(0,i.useContext)(ct);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+vt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,ft),n}return t}function dt(e,t){return Y(t.type,lt,e,t)}ct.displayName="DialogContext";var pt=U.RenderStrategy|U.Static,ht=Q((function(e,t){var n,r=e.open,a=e.onClose,s=e.initialFocus,u=$(e,["open","onClose","initialFocus"]),l=(0,i.useState)(0),c=l[0],f=l[1],d=fe();void 0===r&&null!==d&&(r=Y(d,((n={})[ue.Open]=!0,n[ue.Closed]=!1,n)));var p=(0,i.useRef)(new Set),h=(0,i.useRef)(null),m=Ae(h,t),v=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!v&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof a)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+a);var x=r?ot.Open:ot.Closed,g=null!==d?d===ue.Open:x===ot.Open,b=(0,i.useReducer)(dt,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,i.useCallback)((function(){return a(!1)}),[a]),S=(0,i.useCallback)((function(e){return j({type:at.SetTitleId,id:e})}),[j]),_=re()&&x===ot.Open,E=c>1,N=null!==(0,i.useContext)(ct);Ue(h,_?Y(E?"parent":"leaf",{parent:Ve.RestoreFocus,leaf:Ve.All}):Ve.None,{initialFocus:s,containers:p}),function(e,t){void 0===t&&(t=!0),te((function(){if(t&&e.current){var n=e.current;qe.add(n);for(var r,i=K(Ze.keys());!(r=i()).done;){var o=r.value;o.contains(n)&&(ze(o),Ze.delete(o))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=K(qe);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===qe.size&&(Ze.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),We(e))}})),function(){if(qe.delete(n),qe.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!Ze.has(e)){for(var t,n=K(qe);!(t=n()).done;){var r=t.value;if(e.contains(r))return}Ze.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),We(e)}}));else for(var e,t=K(Ze.keys());!(e=t()).done;){var r=e.value;ze(r),Ze.delete(r)}}}}),[t])}(h,!!E&&_),Te("mousedown",(function(e){var t,n=e.target;x===ot.Open&&(E||(null==(t=h.current)?void 0:t.contains(n))||k())})),(0,i.useEffect)((function(){if(x===ot.Open&&!N){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[x,N]),(0,i.useEffect)((function(){if(x===ot.Open&&h.current){var e=new IntersectionObserver((function(e){for(var t,n=K(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(h.current),function(){return e.disconnect()}}}),[x,h,k]);var O=function(){var e=(0,i.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=(0,i.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return o().createElement(tt.Provider,{value:r},e.children)}}),[n])]}(),C=O[0],P=O[1],A="headlessui-dialog-"+ae(),F=(0,i.useMemo)((function(){return[{dialogState:x,close:k,setTitleId:S},w]}),[x,w,k,S]),T=(0,i.useMemo)((function(){return{open:x===ot.Open}}),[x]),L={ref:m,id:A,role:"dialog","aria-modal":x===ot.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":C,onClick:function(e){e.stopPropagation()},onKeyDown:function(e){e.key===Ne.Escape&&x===ot.Open&&(E||(e.preventDefault(),e.stopPropagation(),k()))}},I=u;return o().createElement(ut,{type:"Dialog",element:h,onUpdate:(0,i.useCallback)((function(e,t,n){var r;"Dialog"===t&&Y(e,((r={})[rt.Add]=function(){p.current.add(n),f((function(e){return e+1}))},r[rt.Remove]=function(){p.current.add(n),f((function(e){return e-1}))},r))}),[])},o().createElement(Ge,{force:!0},o().createElement(Je,null,o().createElement(ct.Provider,{value:F},o().createElement(Je.Group,{target:h},o().createElement(Ge,{force:!1},o().createElement(P,{slot:T,name:"Dialog.Description"},X({props:z({},I,L),slot:T,defaultTag:"div",features:pt,visible:g,name:"Dialog"}))))))))})),mt=Q((function e(t,n){var r=ft([vt.displayName,e.name].join("."))[0],o=r.dialogState,a=r.close,s=Ae(n),u="headlessui-dialog-overlay-"+ae(),l=(0,i.useCallback)((function(e){if(Fe(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}),[a]),c=(0,i.useMemo)((function(){return{open:o===ot.Open}}),[o]);return X({props:z({},t,{ref:s,id:u,"aria-hidden":!0,onClick:l}),slot:c,defaultTag:"div",name:"Dialog.Overlay"})}));var vt=Object.assign(ht,{Overlay:mt,Title:function e(t){var n=ft([vt.displayName,e.name].join("."))[0],r=n.dialogState,o=n.setTitleId,a="headlessui-dialog-title-"+ae();(0,i.useEffect)((function(){return o(a),function(){return o(null)}}),[a,o]);var s=(0,i.useMemo)((function(){return{open:r===ot.Open}}),[r]);return X({props:z({},t,{id:a}),slot:s,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=nt(),n="headlessui-description-"+ae();te((function(){return t.register(n)}),[n,t.register]);var r=e,i=z({},t.props,{id:n});return X({props:z({},r,i),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const yt=wp.i18n;var xt=n(246);function gt(e){var t=e.className,n=e.hideLibrary,r=W((function(e){return e.remainingImports})),i=W((function(e){return e.apiKey})),o=W((function(e){return e.allowedImports}));return(0,xt.jsx)("div",{className:t,children:(0,xt.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,xt.jsxs)("div",{className:"flex space-x-12 h-full",children:[(0,xt.jsxs)("div",{className:"font-bold flex items-center space-x-1.5 lg:w-72",children:[(0,xt.jsxs)("svg",{className:"",width:"30",height:"30",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,xt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,xt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,xt.jsx)("span",{className:"text-sm transform translate-y-0.5 whitespace-nowrap",children:(0,yt.__)("Extendify Library","extendify-sdk")})]}),!i.length&&(0,xt.jsx)(xt.Fragment,{children:(0,xt.jsxs)("div",{className:"items-center ml-8 h-full hidden md:flex",children:[(0,xt.jsxs)("div",{className:"h-full flex items-center px-6 border-l border-r border-gray-300 bg-extendify-lightest",children:[(0,xt.jsx)("a",{className:"button-extendify-main inline lg:hidden",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,yt.__)("Sign up","extendify-sdk")}),(0,xt.jsx)("a",{className:"button-extendify-main hidden lg:block",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,yt.__)("Sign up today to get unlimited access","extendify-sdk")})]}),(0,xt.jsx)("div",{className:"m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center",children:(0,yt.sprintf)((0,yt.__)("Imports left: %s / %s"),r(),Number(o))})]})})]}),(0,xt.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,xt.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return n()},children:[(0,xt.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,xt.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,xt.jsx)("span",{className:"sr-only",children:(0,yt.__)("Close library","extendify-sdk")})]})})]})})}const bt=lodash;var wt=function(){return F.get("taxonomies")};const jt=wp.components;var kt=n(42),St=n.n(kt);function _t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ot(e){var t=Et(e.taxonomy,2),n=t[0],i=t[1],o=e.open,a=g((function(e){return e.updateTaxonomies})),s=g((function(e){return e.resetTaxonomies})),u=g((function(e){return e.searchParams})),l=Et((0,r.useState)({}),2),c=l[0],f=l[1],d=Et((0,r.useState)({}),2),p=d[0],h=d[1],m=(0,r.useRef)(),v=(0,r.useRef)(),y=(0,r.useRef)(),x=(0,r.useRef)(!0),b=function(e){var t;return(null==u?void 0:u.taxonomies[n])===e.term||(null===(t=e.children)||void 0===t?void 0:t.filter((function(e){return e.term===(null==u?void 0:u.taxonomies[n])})).length)>0},w=function(e){var t;return Object.prototype.hasOwnProperty.call(e,"children")?e.children.filter((function(e){return null==e?void 0:e.type.includes(u.type)})).length:null==e||null===(t=e.type)||void 0===t?void 0:t.includes(u.type)};if((0,r.useEffect)((function(){x.current?x.current=!1:(f({}),s())}),[u.type,s]),(0,r.useEffect)((function(){Object.keys(c).length?setTimeout((function(){requestAnimationFrame((function(){h(m.current.clientHeight),y.current.focus()}))}),200):h("auto")}),[c]),!Object.keys(i).length||!Object.values(i).filter((function(e){return w(e)})).length)return"";var j=n.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,xt.jsx)(jt.PanelBody,{title:j,initialOpen:o,children:(0,xt.jsx)(jt.PanelRow,{children:(0,xt.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:p},children:[(0,xt.jsxs)("ul",{className:St()("p-1 m-0 w-full transform transition duration-200",{"-translate-x-full":Object.keys(c).length}),children:[(0,xt.jsx)("li",{className:"m-0",children:(0,xt.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:v,onClick:function(){a(_t({},n,"pattern"===u.type&&"tax_categories"===n?"Default":""))},children:(0,xt.jsx)("span",{className:St()({"text-wp-theme-500":!u.taxonomies[n].length||"Default"===(null==u?void 0:u.taxonomies[n])}),children:"pattern"===u.type&&"tax_categories"===n?(0,yt.__)("Default","extendify-sdk"):(0,yt.__)("All","extendify-sdk")})})}),Object.values(i).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,xt.jsx)("li",{className:"m-0 w-full",children:(0,xt.jsxs)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){Object.prototype.hasOwnProperty.call(e,"children")?f(e):a(_t({},n,e.term))},children:[(0,xt.jsx)("span",{className:St()({"text-wp-theme-500":b(e)}),children:e.term}),Object.prototype.hasOwnProperty.call(e,"children")&&(0,xt.jsx)("span",{className:"text-black",children:(0,xt.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",className:"stroke-current",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})})})]})},e.term)}))]}),(0,xt.jsxs)("ul",{ref:m,className:St()("p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0",{"translate-x-full":!Object.keys(c).length}),children:[Object.values(c).length>0&&(0,xt.jsx)("li",{className:"m-0",children:(0,xt.jsxs)("button",{type:"button",className:"text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:y,onClick:function(){f({}),v.current.focus()},children:[(0,xt.jsx)("svg",{className:"stroke-current transform rotate-180",width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})}),(0,xt.jsx)("span",{children:c.term})]})}),Object.values(c).length&&Object.values(c.children).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,xt.jsx)("li",{className:"m-0 pl-6 w-full flex justify-between items-center",children:(0,xt.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){a(_t({},n,e.term))},children:(0,xt.jsx)("span",{className:St()({"text-wp-theme-500":b(e)}),children:e.term})})},e.term)}))]})]})})})}function Ct(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Pt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ct(o,r,i,a,s,"next",e)}function s(e){Ct(o,r,i,a,s,"throw",e)}a(void 0)}))}}function At(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ft(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tt(){var e,t=g((function(e){return e.updateSearchParams})),n=g((function(e){return e.setupDefaultTaxonomies})),i=g((function(e){return e.searchParams})),o=(0,bt.debounce)((function(e){return t({taxonomies:{},search:e})}),500),a=At((0,r.useState)(null!==(e=null==i?void 0:i.search)&&void 0!==e?e:""),2),s=a[0],u=a[1],l=At((0,r.useState)({}),2),c=l[0],f=l[1],d=(0,r.useCallback)(Pt(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wt();case 2:t=e.sent,t=Object.keys(t).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,n){return e[n]=t[n],e}),{}),n(t),f(t);case 6:case"end":return e.stop()}}),e)}))),[n]);return(0,r.useEffect)((function(){d()}),[d]),(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)("div",{className:"mt-px bg-white mb-6 mx-6 pt-6 lg:mx-0 lg:pt-0",children:[(0,xt.jsx)("label",{className:"sr-only",htmlFor:"extendify-search-input",children:(0,yt.__)("What are you looking for?","extendify-sdk")}),(0,xt.jsx)("input",{id:"extendify-search-input",type:"search",placeholder:(0,yt.__)("What are you looking for?","extendify-sdk"),onChange:function(e){g.setState({nextPage:""}),u(e.target.value),o(e.target.value)},value:s,className:"button-focus bg-gray-100 focus:bg-white border-0 m-0 p-3.5 pb-3 rounded-none text-sm w-full",autoComplete:"off"}),(0,xt.jsx)("svg",{className:"absolute top-3 right-6 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,xt.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),(0,xt.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,xt.jsx)(jt.Panel,{children:Object.entries(c).map((function(e,t){return(0,xt.jsx)(Ot,{open:!1,taxonomy:e},t)}))})})]})}function Lt(e){var t=e.taxonomies,n=e.search,r=e.type,i=[],o=Object.entries(t).filter((function(e){return Boolean(e[1].length)})).map((function(e){return"".concat(e[0],' = "').concat(e[1],'"')})).join(", ");return o.length&&i.push(o),n.length&&i.push('OR(FIND(LOWER("'.concat(n,'"), LOWER(title))!= 0, FIND(LOWER("').concat(n,'"), LOWER({tax_categories})) != 0)')),r.length&&i.push('{type}="'.concat(r,'"')),i.length?"AND(".concat(i.join(", "),")").replace(/\r?\n|\r/g,""):""}function It(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var Dt=0,Rt=function(e,t){return(n=j().mark((function n(){var r,i,o;return j().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Dt++,i=A.CancelToken.source(),null!==(r=g.getState().fetchToken)&&void 0!==r&&r.cancel&&g.getState().fetchToken.cancel(),g.setState({fetchToken:i}),n.next=6,F.post("templates",{filterByFormula:Lt(e),pageSize:c,categories:e.taxonomies,search:e.search,type:e.type,offset:t,initial:1===Dt,request_count:Dt},{cancelToken:i.token});case 6:return o=n.sent,g.setState({fetchToken:null}),n.abrupt("return",o);case 9:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(e){It(o,r,i,a,s,"next",e)}function s(e){It(o,r,i,a,s,"throw",e)}a(void 0)}))})();var n},Vt=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Mt=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,single:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Ht=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,imported:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})};function Bt(){return(Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ut=new Map,qt=new WeakMap,Zt=0;function Wt(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(qt.has(n)||(Zt+=1,qt.set(n,Zt.toString())),qt.get(n)):"0":e[t]);var n})).toString()}function zt(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=Wt(e),n=Ut.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},Ut.set(t,n)}return n}(n),i=r.id,o=r.observer,a=r.elements,s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),Ut.delete(i))}}function $t(e){return"function"!=typeof e.children}var Gt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),$t(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=zt(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!$t(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,o=r.children,a=r.as,s=r.tag,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,i.createElement)(a||s||"div",Bt({ref:this.handleNode},u),o)},r}(i.Component);Gt.displayName="InView",Gt.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function Kt(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yt(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Xt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Yt(o,r,i,a,s,"next",e)}function s(e){Yt(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Qt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tn(e){var t=e.templates,n=g((function(e){return e.setActive})),o=g((function(e){return e.activeTemplate})),a=g((function(e){return e.appendTemplates})),s=Jt((0,r.useState)(""),2),u=s[0],l=s[1],c=Jt((0,r.useState)(!1),2),f=c[0],d=c[1],p=Jt((0,r.useState)([]),2),h=p[0],m=p[1],v=Jt(function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,o=t.trackVisibility,a=t.rootMargin,s=t.root,u=t.triggerOnce,l=t.skip,c=t.initialInView,f=(0,i.useRef)(),d=(0,i.useState)({inView:!!c}),p=d[0],h=d[1],m=(0,i.useCallback)((function(e){void 0!==f.current&&(f.current(),f.current=void 0),l||e&&(f.current=zt(e,(function(e,t){h({inView:e,entry:t}),t.isIntersecting&&u&&f.current&&(f.current(),f.current=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:o,delay:r}))}),[Array.isArray(n)?n.toString():n,s,a,u,l,o,r]);(0,i.useEffect)((function(){f.current||!p.entry||u||l||h({inView:!!c})}));var v=[m,p.inView,p.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}(),2),y=v[0],x=v[1],b=g((function(e){return e.updateSearchParams})),w=g((function(e){return e.searchParams})),k=(0,r.useRef)(g.getState().nextPage),S=(0,r.useRef)(g.getState().searchParams);(0,r.useEffect)((function(){return g.subscribe((function(e){return k.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return g.subscribe((function(e){return S.current=e}),(function(e){return e.searchParams}))}),[]);var _=(0,r.useCallback)(Xt(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(""),d(!1),e.next=4,Rt(S.current,k.current).catch((function(e){console.error(e),l(e&&e.message?e.message:(0,yt.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:null!=(n=e.sent)&&null!==(t=n.error)&&void 0!==t&&t.length&&l(null==n?void 0:n.error),null!=n&&n.records&&w===S.current&&(a(n.records),d(n.records.length<=0),g.setState({nextPage:n.offset}));case 7:case"end":return e.stop()}}),e)}))),[w,a]);return(0,r.useEffect)((function(){Object.keys(S.current.taxonomies).length&&(m([]),_())}),[_,S]),(0,r.useEffect)((function(){x&&_()}),[x,_]),u.length?(0,xt.jsxs)("div",{className:"text-left",children:[(0,xt.jsx)("h2",{className:"text-left",children:(0,yt.__)("Server error","extendify-sdk")}),(0,xt.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:u}),(0,xt.jsx)(jt.Button,{isTertiary:!0,onClick:function(){m([]),b({taxonomies:{},search:""}),_()},children:(0,yt.__)("Press here to reload experience")})]}):f?null!=w&&w.search.length?(0,xt.jsx)("h2",{className:"text-left",children:(0,yt.sprintf)((0,yt.__)("No results for %s.","extendify-sdk"),null==w?void 0:w.search)}):(0,xt.jsx)("h2",{className:"text-left",children:(0,yt.__)("No results found.","extendify-sdk")}):t.length?(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 pb-32 m-0",children:t.map((function(e,t){var r,i,a,s,u,l,c,f,d;return(0,xt.jsxs)("li",{className:"flex flex-col justify-between group overflow-hidden max-w-lg",children:[(0,xt.jsx)("div",{className:"flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",onClick:function(){return n(e)},children:(0,xt.jsx)("img",{role:"button",className:"max-w-full block m-auto object-cover",onLoad:function(){return m([].concat(Kt(h),[t]))},src:null!==(r=null==e||null===(i=e.fields)||void 0===i||null===(a=i.screenshot[0])||void 0===a||null===(s=a.thumbnails)||void 0===s||null===(u=s.large)||void 0===u?void 0:u.url)&&void 0!==r?r:null==e||null===(l=e.fields)||void 0===l||null===(c=l.screenshot[0])||void 0===c?void 0:c.url})}),(0,xt.jsx)("span",{role:"img","aria-hidden":"true",className:"h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"}),(0,xt.jsxs)("div",{className:"bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",role:"button",onClick:function(){return n(e)},children:[(0,xt.jsxs)("div",{children:[(0,xt.jsx)("h4",{className:"m-0 font-bold",children:e.fields.display_title}),(0,xt.jsx)("p",{className:"m-0",children:null==e||null===(f=e.fields)||void 0===f||null===(d=f.tax_categories)||void 0===d?void 0:d.filter((function(e){return"default"!==e.toLowerCase()})).join(", ")})]}),(0,xt.jsx)(jt.Button,{isSecondary:!0,tabIndex:Object.keys(o).length?"-1":"0",className:"sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100",onClick:function(t){t.stopPropagation(),n(e)},children:(0,yt.__)("View","extendify-sdk")})]})]},e.id)}))}),g.getState().nextPage&&!!h.length&&h.length===t.length&&(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:y,style:{zIndex:-1}}),(0,xt.jsx)("div",{className:"my-4",children:(0,xt.jsx)(jt.Spinner,{})})]})]}):(0,xt.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,xt.jsx)(jt.Spinner,{})})}var nn=function(){return F.get("plugins")},rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),F.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},on=function(){return F.get("active-plugins")};function an(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function sn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){an(o,r,i,a,s,"next",e)}function s(e){an(o,r,i,a,s,"throw",e)}a(void 0)}))}}function un(e){return ln.apply(this,arguments)}function ln(){return(ln=sn(j().mark((function e(t){var n,r,i,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,bt.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,nn();case 7:return e.t1=e.sent,i=e.t0.keys.call(e.t0,e.t1),o=!!r.length&&r.filter((function(e){return!i.some((function(t){return t.includes(e)}))})),e.abrupt("return",o.length);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cn(e){return fn.apply(this,arguments)}function fn(){return(fn=sn(j().mark((function e(t){var n,r,i,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(r=null!==(n=(0,bt.get)(t,"fields.required_plugins"))&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:return e.t0=Object,e.next=7,on();case 7:if(e.t1=e.sent,i=e.t0.values.call(e.t0,e.t1),!(o=!!r.length&&r.filter((function(e){return!i.some((function(t){return t.includes(e)}))})))){e.next=15;break}return e.next=13,un(t);case 13:if(!e.sent){e.next=15;break}return e.abrupt("return",!1);case 15:return e.abrupt("return",o.length);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var dn=u(P((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function pn(e){var t=e.msg;return(0,xt.jsxs)(jt.Modal,{style:{maxWidth:"500px"},title:(0,yt.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,yt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,xt.jsx)("br",{}),(0,xt.jsx)(jt.Notice,{isDismissible:!1,status:"error",children:t}),(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(Sn,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Go back","extendify-sdk")})]})}const hn=wp.data;function mn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yn(){var e=mn((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,hn.select)("core/editor").isEditedPostDirty)()?(0,xt.jsxs)(jt.Modal,{title:(0,yt.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,xt.jsx)("p",{style:{maxWidth:"400px"},children:(0,yt.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,xt.jsxs)(jt.ButtonGroup,{children:[(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,yt.__)("Reload page","extendify-sdk")}),(0,xt.jsx)(jt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,hn.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,yt.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}function xn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bn(){var e,t=xn((0,r.useState)(""),2),n=t[0],i=t[1],o=dn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return rn(a).then((function(){dn.setState({importOnLoad:!0}),(0,r.render)((0,xt.jsx)(yn,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,xt.jsx)(pn,{msg:n}):(0,xt.jsx)(jt.Modal,{title:(0,yt.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,xt.jsx)(jt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,yt.__)("Installing...","extendify-sdk")})})}var wn=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";W.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function jn(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function kn(){var e,t,n,i=dn((function(e){return e.wantedTemplate})),o=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,xt.jsxs)(jt.Modal,{title:(0,yt.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,xt.jsx)("p",{style:{maxWidth:"400px"},children:(0,yt.sprintf)((0,yt.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==i||null===(n=i.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,xt.jsx)("ul",{children:o.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:jn(e)},e)}))}),(0,xt.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,yt.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(yr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,yt.__)("Return to library","extendify-sdk")})]})}function Sn(e){var t,n,i,o,a,s,u,l,c=dn((function(e){return e.wantedTemplate})),f=(null==c||null===(t=c.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=W.getState())&&void 0!==n&&n.canInstallPlugins?(0,xt.jsxs)(jt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,yt.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,xt.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,yt.__)((0,yt.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(a=null==c||null===(s=c.fields)||void 0===s?void 0:s.type)&&void 0!==a?a:"template"),"extendify-sdk")}),(null===(u=e.message)||void 0===u?void 0:u.length)>0||(0,xt.jsx)("ul",{children:f.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:jn(e)},e)}))}),(0,xt.jsxs)(jt.ButtonGroup,{children:[(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(bn,{}),document.getElementById("extendify-root"))},children:null!==(l=e.buttonLabel)&&void 0!==l?l:(0,yt.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,xt.jsx)(jt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,xt.jsx)(yr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,yt.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,xt.jsx)(kn,{})}function _n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function En(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){_n(o,r,i,a,s,"next",e)}function s(e){_n(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Nn=function(){var e=En(j().mark((function e(t){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,un(t);case 2:return e.t0=!e.sent,e.t1=function(){return En(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return En(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,xt.jsx)(Sn,{}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function On(e){var t=e.msg;return(0,xt.jsxs)(jt.Modal,{style:{maxWidth:"500px"},title:(0,yt.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,yt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,xt.jsx)("br",{}),(0,xt.jsx)(jt.Notice,{isDismissible:!1,status:"error",children:t}),(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,xt.jsx)(Ln,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Go back","extendify-sdk")})]})}function Cn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Pn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Cn(o,r,i,a,s,"next",e)}function s(e){Cn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function An(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tn(){var e,t=An((0,r.useState)(""),2),n=t[0],i=t[1],o=dn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return rn(a).then((function(){dn.setState({importOnLoad:!0})})).then(Pn(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,xt.jsx)(yn,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;i(t.data.message)})),n?(0,xt.jsx)(On,{msg:n}):(0,xt.jsx)(jt.Modal,{title:(0,yt.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,xt.jsx)(jt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,yt.__)("Activating...","extendify-sdk")})})}function Ln(e){var t,n,i,o,a,s=dn((function(e){return e.wantedTemplate})),u=(null==s||null===(t=s.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=W.getState())&&void 0!==n&&n.canActivatePlugins?(0,xt.jsx)(jt.Modal,{title:(0,yt.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,xt.jsxs)("div",{children:[(0,xt.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,yt.__)((0,yt.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==s||null===(a=s.fields)||void 0===a?void 0:a.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,xt.jsx)("ul",{children:u.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:jn(e)},e)}))}),(0,xt.jsxs)(jt.ButtonGroup,{children:[(0,xt.jsx)(jt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(Tn,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,xt.jsx)(jt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(yr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,yt.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,xt.jsx)(kn,{})}function In(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Dn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){In(o,r,i,a,s,"next",e)}function s(e){In(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Rn=function(){var e=Dn(j().mark((function e(t){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cn(t);case 2:return e.t0=!e.sent,e.t1=function(){return Dn(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()},e.t2=function(){return Dn(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(){(0,r.render)((0,xt.jsx)(Ln,{showClose:!0}),document.getElementById("extendify-root"))})));case 1:case"end":return e.stop()}}),e)})))()},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Vn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Bn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Hn(o,r,i,a,s,"next",e)}function s(e){Hn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Un(e){return function(){return new qn(e.apply(this,arguments))}}function qn(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof Zn;Promise.resolve(s?a.wrapped:a).then((function(e){s?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function Zn(e){this.wrapped=e}qn.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},qn.prototype.next=function(e){return this._invoke("next",e)},qn.prototype.throw=function(e){return this._invoke("throw",e)},qn.prototype.return=function(e){return this._invoke("return",e)};function Wn(){return(Wn=Bn(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=zn(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(e){return $n.apply(this,arguments)}function $n(){return($n=Un(j().mark((function e(t){var n,r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Vn(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function Gn(e,t){return(0,(0,hn.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function Kn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:Nn,hasPluginsActivated:Rn,stack:[],check:function(t){var n=this;return Bn(j().mark((function r(){var i,o,a;return j().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Vn(e),r.prev=1,a=j().mark((function e(){var r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.value,e.next=3,n["".concat(r)](t);case 3:i=e.sent,setTimeout((function(){n.stack.push(i.pass?i.allow:i.deny)}),0);case 5:case"end":return e.stop()}}),e)})),i.s();case 4:if((o=i.n()).done){r.next=8;break}return r.delegateYield(a(),"t0",6);case 6:r.next=4;break;case 8:r.next=13;break;case 10:r.prev=10,r.t1=r.catch(1),i.e(r.t1);case 13:return r.prev=13,i.f(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},reset:function(){this.stack=[]}}}(["hasRequiredPlugins","hasPluginsActivated"]);function Jn(e){var t=e.template,n=(0,r.useRef)(null),i=g((function(e){return e.activeTemplateBlocks})),o=W((function(e){return e.canImport})),a=W((function(e){return e.apiKey})),s=b((function(e){return e.setOpen})),u=Kn((0,r.useState)(!1),2),l=u[0],c=u[1],f=Kn((0,r.useState)(!1),2),d=f[0],p=f[1],h=dn((function(e){return e.setWanted})),m=function(){(function(e){return Wn.apply(this,arguments)})(Xn.stack).then((function(){setTimeout((function(){Gn(i,t).then((function(){return s(!1)}))}),100)}))};(0,r.useEffect)((function(){return Xn.check(t).then((function(){return p(!0)})),function(){return Xn.reset()&&p(!1)}}),[t]),(0,r.useEffect)((function(){!l&&n.current&&n.current.focus()}),[n,l,d]);return d&&Object.keys(i).length?a||o()?l?(0,xt.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,yt.__)("Importing...","extendify-sdk")}):(0,xt.jsx)("button",{ref:n,type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return Vt(t),c(!0),h(t),void m()},children:(0,yt.sprintf)((0,yt.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,xt.jsx)("a",{ref:n,className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=single_page"),rel:"noreferrer",children:(0,yt.__)("Sign up now","extendify-sdk")}):""}function Qn(e){var t=e.categories,n=e.styles,r=e.types,i=e.requiredPlugins;return(0,xt.jsxs)(xt.Fragment,{children:[t&&(0,xt.jsxs)("div",{className:"w-full pb-4",children:[(0,xt.jsx)("h3",{className:"text-sm m-0 mb-2",children:(0,yt.__)("Categories:","extendify-sdk")}),(0,xt.jsx)("div",{children:t.join(", ")})]}),n&&(0,xt.jsxs)("div",{className:"w-full py-4",children:[(0,xt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,yt.__)("Styles:","extendify-sdk")}),(0,xt.jsx)("div",{children:n.join(", ")})]}),r&&(0,xt.jsxs)("div",{className:"w-full py-4",children:[(0,xt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,yt.__)("Types:","extendify-sdk")}),(0,xt.jsx)("div",{children:r.join(", ")})]}),i.filter((function(e){return"editorplus"!==e})).length>0&&(0,xt.jsxs)("div",{className:"pt-4 w-full",children:[(0,xt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,yt.__)("Required Plugins:","extendify-sdk")}),(0,xt.jsx)("div",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return jn(e)})).join(", ")})]}),(0,xt.jsx)("div",{className:"py-4 mt-4",children:(0,xt.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sidebar"),rel:"noreferrer",target:"_blank",children:(0,yt.__)("What happens when a template is added?","extendify-sdk")})})]})}function er(e){var t,n,i,o,a,s,u,l=e.template,c=l.fields,f=c.tax_categories,d=c.required_plugins,p=c.tax_style,h=c.tax_pattern_types,m=W((function(e){return e.apiKey}));return(0,r.useEffect)((function(){Mt(l)}),[l]),(0,xt.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,xt.jsxs)("div",{className:"flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl",children:[(0,xt.jsxs)("div",{className:"text-left m-0 h-full p-6 sm:p-0",children:[(0,xt.jsx)("h1",{className:"leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal",children:l.fields.display_title}),(0,xt.jsx)(jt.ExternalLink,{href:l.fields.url,children:(0,yt.__)("Demo","extendify-sdk")})]}),(0,xt.jsx)("div",{className:St()({"inline-flex absolute sm:static sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!m.length,"top-0":m.length>0}),children:(0,xt.jsx)(Jn,{template:l})})]}),(0,xt.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-12 m-6 border border-gray-300 m-46",children:(0,xt.jsx)("img",{className:"max-w-full w-full block",src:null!==(t=null==l||null===(n=l.fields)||void 0===n||null===(i=n.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(a=o.full)||void 0===a?void 0:a.url)&&void 0!==t?t:null==l||null===(s=l.fields)||void 0===s||null===(u=s.screenshot[0])||void 0===u?void 0:u.url})}),(0,xt.jsx)("div",{className:"text-xs text-left p-6 w-full block sm:hidden divide-y",children:(0,xt.jsx)(Qn,{categories:f,types:h,requiredPlugins:d,styles:p})})]})}function tr(){return 0===W((function(e){return e.apiKey})).length?(0,xt.jsx)("button",{className:"components-button",onClick:function(){return b.setState({currentPage:"login"})},children:(0,yt.__)("Log into account","extendify-sdk")}):(0,xt.jsx)("button",{className:"components-button",onClick:function(){return W.setState({apiKey:""})},children:(0,yt.__)("Log out","extendify-sdk")})}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ir(e){var t=e.children,n=W((function(e){return e.apiKey})),i=nr((0,r.useState)(!1),2),o=i[0],a=i[1];return(0,r.useEffect)((function(){a(!n.length||window.location.search.indexOf("DEVMODE")>-1)}),[n]),(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)("aside",{className:"flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative",children:[(0,xt.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col lg:h-full",children:t[0]}),(0,xt.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 bg-white p-4 w-72 text-left space-y-4",children:o&&(0,xt.jsx)("div",{className:"border-t border-gray-300",children:(0,xt.jsx)(tr,{})})})]}),(0,xt.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function or(){var e=g((function(e){return e.updateSearchParams})),t=g((function(e){return e.searchParams})),n=function(t){return e({type:t})};return(0,xt.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0",children:[(0,xt.jsx)("h4",{className:"sr-only",children:(0,yt.__)("Type select","extendify-sdk")}),(0,xt.jsxs)("button",{type:"button",className:St()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t.type,"bg-transparent text-black":"pattern"!==t.type}),onClick:function(){return n("pattern")},children:[(0,xt.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,xt.jsx)("span",{className:"",children:(0,yt.__)("Patterns","extendify-sdk")})]}),(0,xt.jsxs)("button",{type:"button",className:St()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t.type,"bg-transparent text-black":"template"!==t.type}),onClick:function(){return n("template")},children:[(0,xt.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,xt.jsx)("span",{className:"",children:(0,yt.__)("Page templates","extendify-sdk")})]})]})}function ar(e){var t=e.template,n=g((function(e){return e.setActive})),r=t.fields,i=r.tax_categories,o=r.required_plugins,a=r.tax_style,s=r.tax_pattern_types,u=W((function(e){return e.apiKey}));return(0,xt.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!u.length&&(0,xt.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,xt.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,yt.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,xt.jsx)("button",{className:"components-button",onClick:function(){return b.setState({currentPage:"login"})},children:(0,yt.__)("Log in","extendify-sdk")})]}),(0,xt.jsx)("div",{className:"p-6 sm:p-0",children:(0,xt.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return n({})},children:[(0,xt.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,xt.jsx)("span",{className:"ml-4",children:(0,yt.__)("Go back","extendify-sdk")})]})}),(0,xt.jsx)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:(0,xt.jsx)(Qn,{categories:i,types:s,requiredPlugins:o,styles:a})})]})}function sr(){var e=g((function(e){return e.searchParams}));return(0,xt.jsx)("div",{className:"hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none",children:Object.entries(e.taxonomies).map((function(t){return"template"===e.type&&"tax_pattern_types"===t[0]||"template"===e.type&&"tax_features"===t[0]||"pattern"===e.type&&"tax_page_types"===t[0]?"":(0,xt.jsxs)("div",{className:"lg:px-2 text-left",children:[(0,xt.jsx)("span",{className:"font-bold",children:(n=t[0],n.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,xt.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function ur(e){var t=e.className,n=g((function(e){return e.templates})),r=g((function(e){return e.activeTemplate}));return(0,xt.jsxs)("div",{className:t,children:[(0,xt.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,yt.__)("Skip to content","extendify-sdk")}),(0,xt.jsxs)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:[!!Object.keys(r).length&&(0,xt.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,xt.jsxs)(ir,{children:[(0,xt.jsx)(ar,{template:r}),(0,xt.jsx)(er,{template:r})]})}),(0,xt.jsxs)(ir,{children:[(0,xt.jsx)(Tt,{}),(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(or,{}),(0,xt.jsx)(sr,{}),(0,xt.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,xt.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8",children:(0,xt.jsx)(tn,{templates:n})})})]})]})]})]})}function lr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function cr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return fr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dr(){var e=cr((0,r.useState)(W.getState().apiKey),2),t=e[0],n=e[1],i=cr((0,r.useState)(W.getState().email),2),o=i[0],a=i[1],s=cr((0,r.useState)(""),2),u=s[0],l=s[1],c=cr((0,r.useState)("info"),2),f=c[0],d=c[1],p=cr((0,r.useState)(""),2),h=p[0],m=p[1];(0,r.useEffect)((function(){return function(){return d("info")}}),[]);var v=function(){var e,n=(e=j().mark((function e(n){var r,i,a,s,u,c;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),l(""),r=o.length?o:h,e.next=5,D(r,t);case 5:if(i=e.sent,a=i.token,s=i.error,u=i.exception,void 0===(c=i.message)){e.next=13;break}return d("error"),e.abrupt("return",l(c.length?c:"Error: Are you interacting with the wrong server?"));case 13:if(!s&&!u){e.next=16;break}return d("error"),e.abrupt("return",l(s.length?s:u));case 16:if(a&&"string"==typeof a){e.next=19;break}return d("error"),e.abrupt("return",l((0,yt.__)("Something went wrong","extendify-sdk")));case 19:return d("success"),l("Success!"),e.next=23,new Promise((function(e){return setTimeout(e,1500)}));case 23:W.setState({apiKey:a}),b.setState({currentPage:"content"});case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){lr(o,r,i,a,s,"next",e)}function s(e){lr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){o||I("user_email").then((function(e){return m(e)}))}),[o]),(0,xt.jsxs)("section",{className:"w-96 text-left md:-mt-32",children:[(0,xt.jsx)("h1",{className:"border-b border-gray-900 mb-12 pb-4",children:(0,yt.__)("Welcome","extendify-sdk")}),u&&(0,xt.jsx)("div",{className:St()({"border-b pb-6 mb-6 -mt-6":!0,"border-gray-900 text-gray-900":"info"===f,"border-wp-alert-red text-wp-alert-red":"error"===f,"border-extendify-main text-extendify-main":"success"===f}),children:u}),(0,xt.jsxs)("form",{onSubmit:v,className:" space-y-6",children:[(0,xt.jsxs)("div",{className:"flex items-center",children:[(0,xt.jsx)("label",{htmlFor:"extendifysdk-login-email",className:"w-32 font-bold",children:(0,yt.__)("Email:","extendify-sdk")}),(0,xt.jsx)("input",{id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border px-2 w-full",placeholder:"Email",value:o.length?o:h,onChange:function(e){return a(e.target.value)}})]}),(0,xt.jsxs)("div",{className:"flex items-center",children:[(0,xt.jsx)("label",{htmlFor:"extendifysdk-login-license",className:"w-32 font-bold",children:(0,yt.__)("License:","extendify-sdk")}),(0,xt.jsx)("input",{id:"extendifysdk-login-license",name:"extendifysdk-login-email",type:"text",className:"border px-2 w-full",placeholder:"License key",value:t,onChange:function(e){return n(e.target.value)}})]}),(0,xt.jsx)("div",{className:"flex justify-end",children:(0,xt.jsx)("button",{type:"submit",className:"button-extendify-main p-3 px-4",children:(0,yt.__)("Sign in","extendify-sdk")})})]})]})}function pr(e){var t=e.className;return(0,xt.jsxs)("div",{className:t,children:[(0,xt.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,yt.__)("Skip to content","extendify-sdk")}),(0,xt.jsx)("div",{className:"flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,xt.jsxs)("div",{className:"absolute flex inset-0 items-center justify-center z-20 sm:space-x-12",children:[(0,xt.jsx)("div",{className:"pl-12 py-6 absolute top-0 left-0",children:(0,xt.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return b.setState({currentPage:"content"})},children:[(0,xt.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,xt.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,xt.jsx)("span",{className:"ml-4",children:(0,yt.__)("Go back","extendify-sdk")})]})}),(0,xt.jsx)("div",{className:"flex justify-center",children:(0,xt.jsx)(dr,{})})]})})]})}var hr=function(e){return F.post("simple-ping",{action:e})};function mr(e){var t=e.className,n=g((function(e){return e.updateSearchParams})),i=function(e){hr("welcome-".concat(null!=e?e:"closed")),e&&n({type:e}),W.setState({hasClickedThroughWelcomePage:!0}),b.setState({currentPage:"content"})};return(0,r.useEffect)((function(){hr("welcome-opened")}),[]),(0,xt.jsxs)("div",{className:t,children:[(0,xt.jsx)("div",{className:"w-full h-16 relative z-10 border-solid border-0 flex-shrink-0",children:(0,xt.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,xt.jsx)("div",{className:"flex space-x-12 h-full"}),(0,xt.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,xt.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return i()},children:[(0,xt.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,xt.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,xt.jsx)("span",{className:"sr-only",children:(0,yt.__)("Close library","extendify-sdk")})]})})]})}),(0,xt.jsx)("section",{className:"w-full lg:w-auto lg:flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,xt.jsx)("div",{className:"flex items-center justify-center",children:(0,xt.jsx)("div",{className:"-mt-16 h-screen lg:h-auto lg:p-8 w-full",children:(0,xt.jsxs)("div",{className:"bg-white overflow-y-auto h-screen lg:h-auto lg:flex pt-20 p-8 sm:p-16 space-y-16 lg:space-y-0 lg:space-x-8 xl:space-x-16 max-w-screen-xl lg:border border-gray-300",children:[(0,xt.jsxs)("div",{className:"flex-grow flex items-center space-y-4 md:space-y-0 md:space-x-4 xl:space-x-8 flex-col md:flex-row",children:[(0,xt.jsx)("div",{className:"flex-1 lg:w-1/2 w-full flex items-center max-w-xs h-full max-h-60",children:(0,xt.jsxs)("button",{onClick:function(){return i("pattern")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex w-full space-y-4 flex-col items-center justify-center p-8 lg:px-0",children:[(0,xt.jsx)("h3",{className:"m-0 text-gray-900",children:(0,yt.__)("Sections","extendify-sdk")}),(0,xt.jsx)("span",{children:(0,xt.jsxs)("svg",{className:"mt-1",xmlns:"http://www.w3.org/2000/svg",width:"206",height:"122",viewBox:"0 0 206 122",fill:"none",children:[(0,xt.jsx)("path",{d:"M69 0H0V59H69V0Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M204 0H79V60H204V0Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M62.166 25H9.16602V28H62.166V25Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M63.166 18H10.166V21H63.166V18Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M62.166 34H9.16602V39H62.166V34Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M62.166 43H9.16602V48H62.166V43Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M140.166 25H87.166V28H140.166V25Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M140.166 34H87.166V39H140.166V34Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M140.166 43H87.166V48H140.166V43Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M197.166 25H151.166V28H197.166V25Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M141.166 17H88.166V20H141.166V17Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M198.166 17H152.166V20H198.166V17Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M62.166 10H9.16602V13H62.166V10Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M140.166 9H87.166V12H140.166V9Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M197.166 9H151.166V12H197.166V9Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M197.166 34H151.166V39H197.166V34Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M197.166 43H151.166V48H197.166V43Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M154.172 77.8088H0V121.216H154.172V77.8088Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M133.637 110.446C141.077 110.446 147.109 104.75 147.109 97.7229C147.109 90.6963 141.077 85 133.637 85C126.197 85 120.166 90.6963 120.166 97.7229C120.166 104.75 126.197 110.446 133.637 110.446Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M205.166 78H162.166V121H205.166V78Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M183.803 111.637C191.243 111.637 197.275 105.941 197.275 98.9141C197.275 91.8874 191.243 86.1912 183.803 86.1912C176.363 86.1912 170.332 91.8874 170.332 98.9141C170.332 105.941 176.363 111.637 183.803 111.637Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M113.695 88.7898H13.4082V100.764H113.695V88.7898Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M113.695 105.255H13.4082V109.745H113.695V105.255Z",fill:"#F9F9F9"})]})}),(0,xt.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,yt.__)("View patterns","extendify-sdk")})]})}),(0,xt.jsx)("div",{className:"flex-1 lg:w-1/2 w-full flex items-center max-w-xs h-full max-h-60",children:(0,xt.jsxs)("button",{onClick:function(){return i("template")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex w-full space-y-4 flex-col items-center justify-center p-8 lg:px-0",children:[(0,xt.jsx)("h3",{className:"m-0 text-gray-900",children:(0,yt.__)("Full pages","extendify-sdk")}),(0,xt.jsx)("span",{children:(0,xt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"156",height:"128",viewBox:"0 0 156 128",fill:"none",children:[(0,xt.jsx)("path",{d:"M155.006 38.4395H0.833984V81.8471H155.006V38.4395Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M155 0H1V36H155V0Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M148 7H10V28H148V7Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M147.521 47.4204H9.81445V50.414H147.521V47.4204Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M147.521 56.4012H9.81445V60.8917H147.521V56.4012Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M147.521 65.3821H9.81445V69.8726H147.521V65.3821Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M155.006 83.8089H0.833984V127.217H155.006V83.8089Z",fill:"#DFDFDF"}),(0,xt.jsx)("path",{d:"M21.7897 118.236C29.2297 118.236 35.261 112.539 35.261 105.513C35.261 98.486 29.2297 92.7898 21.7897 92.7898C14.3497 92.7898 8.31836 98.486 8.31836 105.513C8.31836 112.539 14.3497 118.236 21.7897 118.236Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M144.529 92.7898H44.2422V104.764H144.529V92.7898Z",fill:"#F9F9F9"}),(0,xt.jsx)("path",{d:"M144.529 109.255H44.2422V113.745H144.529V109.255Z",fill:"#F9F9F9"})]})}),(0,xt.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,yt.__)("View templates","extendify-sdk")})]})})]}),(0,xt.jsx)("div",{className:"lg:w-2/5 text-left",children:(0,xt.jsxs)("div",{className:"max-w-lg lg:max-w-none",children:[(0,xt.jsx)("h1",{className:"m-0 pb-4 mb-6 border-b border-gray-900 font-medium text-2xl",children:(0,yt.__)("Welcome to Extendify","extendify-sdk")}),(0,xt.jsxs)("div",{className:"mb-12",children:[(0,xt.jsx)("p",{children:(0,yt.__)("Congratulations! You have access to our entire library of Gutenberg patterns and templates. You can add up to 3 templates or patterns to your site completely free.","extendify-sdk")}),(0,xt.jsx)("p",{children:(0,yt.__)("All patterns and templates are pre-designed to look beautiful with options to fit your style. They also keep your site running lightning fast by using only core blocks with no 3rd party page builder required.","extendify-sdk")}),(0,xt.jsx)("a",{className:"text-sm text-extendify-link underline",href:"https://extendify.com?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,yt.__)("Learn more about Extendify","extendify-sdk")})]}),(0,xt.jsx)("h2",{className:"text-base pb-2 mb-4 border-b border-gray-900",children:(0,yt.__)("Don't want the library in your editor?","extendify-sdk")}),(0,xt.jsxs)("div",{className:"text-xs",children:[(0,xt.jsx)("p",{children:(0,yt.sprintf)((0,yt.__)("Extendify was included with the %s plugin.","extendify-sdk"),window.extendifySdkData.source)}),(0,xt.jsx)("a",{className:"text-xs text-extendify-link underline",href:"https://extendify.com/how-to-disable-the-extendify-library/?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,yt.__)("Learn how to remove the library","extendify-sdk")})]})]})})]})})})})]})}function vr(){var e=(0,r.useRef)(null),t=b((function(e){return e.open})),n=b((function(e){return e.setOpen})),i=b((function(e){return e.currentPage})),o=W((function(e){return e.hasClickedThroughWelcomePage}));return function(e){console.log({show:e});var t=function(){var e=document.getElementById("beacon-container");e&&(e.style.position="relative",e.style.zIndex=Number.MAX_SAFE_INTEGER,e.style.display="block")},n=function(){var e=document.getElementById("beacon-container");e&&(e.style.display="none",window.Beacon("close"))};(0,r.useEffect)((function(){if(e)return window.Beacon?(t(),function(){return n()}):(function(e,t,n){function r(){var e,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.async=!0,r.src="https://beacon-v2.helpscout.net",null===(e=n.parentNode)||void 0===e||e.insertBefore(r,n)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)}(window,document,window.Beacon||function(){}),window.Beacon("init","2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91"),window.Beacon("on","ready",t),function(){window.Beacon("off","ready",t),n()})}),[e])}(t),(0,r.useEffect)((function(){o&&b.setState({currentPage:"content"})}),[o]),(0,xt.jsx)(Pe.Root,{show:t,as:r.Fragment,children:(0,xt.jsx)(vt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:e,onClose:function(){},children:(0,xt.jsx)("div",{className:"h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,xt.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,xt.jsx)(Pe.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,xt.jsx)(vt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,xt.jsx)(Pe.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,xt.jsx)("div",{ref:e,tabIndex:"0",className:"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:p-5",children:"welcome"===i?(0,xt.jsx)(mr,{className:"w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-extendify-light"}):(0,xt.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,xt.jsx)(gt,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0",hideLibrary:function(){return n(!1)}}),"content"===i&&(0,xt.jsx)(ur,{className:"w-full flex-grow overflow-hidden"}),"login"===i&&(0,xt.jsx)(pr,{className:"w-full flex-grow overflow-hidden bg-extendify-light"})]})})})]})})})})}function yr(e){var t=e.show,n=void 0!==t&&t,i=b((function(e){return e.setOpen})),o=(0,r.useCallback)((function(){return i(!0)}),[i]),a=(0,r.useCallback)((function(){i(!1)}),[i]);return(0,r.useEffect)((function(){n&&i(!0)}),[n,i]),(0,r.useEffect)((function(){return window.localStorage.getItem("etfy_library__key")&&W.setState({apiKey:"any-key-will-work-during-beta"}),function(){return window.localStorage.removeItem("etfy_library__key")}}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",o),window.addEventListener("extendify-sdk::close-library",a),function(){window.removeEventListener("extendify-sdk::open-library",o),window.removeEventListener("extendify-sdk::close-library",a)}}),[a,o]),(0,xt.jsx)(vr,{})}const xr=wp.plugins,gr=wp.editPost;function br(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function wr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){br(o,r,i,a,s,"next",e)}function s(e){br(o,r,i,a,s,"throw",e)}a(void 0)}))}}var jr=function(e){var t,n;wn(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},kr=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},Sr=(0,xt.jsx)("div",{id:"extendify-templates-inserter",children:(0,xt.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,xt.jsxs)("svg",{style:"margin-right:0.5rem",width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,xt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,xt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,yt.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){kr()&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Sr)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",jr)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(kr()&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,xt.jsx)("div",{children:(0,xt.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,yt.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",jr)}}),0)}));window._wpLoadBlockEditor&&kr()&&(0,xr.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return(0,xt.jsx)(gr.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:jr,icon:(0,xt.jsx)("span",{className:"components-menu-items__item-icon",children:(0,xt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,xt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,xt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),children:(0,yt.__)("Library","extendify-sdk")})}});window._wpLoadBlockEditor&&(0,xr.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,xt.jsx)(gr.PluginSidebarMoreMenuItem,{onClick:wr(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return t=e.sent,(t=JSON.parse(t)).state.enabled=!kr(),e.next=7,R(JSON.stringify(Object.assign({},t)));case 7:location.reload();case 8:case"end":return e.stop()}}),e)}))),icon:(0,xt.jsx)(xt.Fragment,{}),children:kr()?(0,yt.__)("Disable Extendify","extendify-sdk"):(0,yt.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,hn.dispatch)("core/notices").createNotice,t=W.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,yt.__)("Template Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),Ht(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,bt.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,xt.jsx)(Sn,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=document.createElement("div");if(e.id="extendify-root",document.body.append(e),(0,r.render)((0,xt.jsx)(yr,{}),e),dn.getState().importOnLoad){var t=dn.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");Gn(p((0,window.wp.blocks.parse)((0,bt.get)(e,"fields.code"))),e)}(t)}),0)}dn.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},716:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,u=i(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))n.call(a,c)&&(u[c]=a[c]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},61:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,u=[],l=!1,c=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(804),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:o,_owner:a.current}}t.jsx=l,t.jsxs=l},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function v(){}function y(){}function x(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&r.call(w,o)&&(g=w);var j=x.prototype=v.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var u=c(e[i],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function _(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,_(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:P}}function P(){return{value:t,done:!0}}return y.prototype=j.constructor=x,x.constructor=y,y.displayName=u(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,s,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(S.prototype),S.prototype[a]=function(){return this},e.AsyncIterator=S,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new S(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(j),u(j,s,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},804:e=>{"use strict";e.exports=React}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,i,o]=e[l],s=!0,u=0;u<n.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(s=!1,o<a&&(a=o));s&&(e.splice(l--,1),t=i())}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={172:0,106:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[a,s,u]=n,l=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(u)var c=u(r);for(t&&t(n);l<a.length;l++)o=a[l],r.o(e,o)&&e[o]&&e[o][0](),e[a[l]]=0;return r.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[106],(()=>r(152)));var i=r.O(void 0,[106],(()=>r(716)));i=r.O(i)})();
|
1 |
/*! For license information please see extendify-sdk.js.LICENSE.txt */
|
2 |
+
(()=>{var e,t={135:(e,t,n)=>{e.exports=n(248)},206:(e,t,n)=>{e.exports=n(57)},387:(e,t,n)=>{"use strict";var r=n(485),i=n(570),o=n(940),a=n(581),s=n(574),u=n(845),l=n(338),c=n(524);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var v=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};i(t,n,o),p=null}},p.onabort=function(){p&&(n(c("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(c("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(c(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||l(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},57:(e,t,n)=>{"use strict";var r=n(485),i=n(875),o=n(29),a=n(941);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=s(n(141));u.Axios=o,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=n(132),u.CancelToken=n(603),u.isCancel=n(475),u.all=function(e){return Promise.all(e)},u.spread=n(739),u.isAxiosError=n(835),e.exports=u,e.exports.default=u},132:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:(e,t,n)=>{"use strict";var r=n(132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},475:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:(e,t,n)=>{"use strict";var r=n(485),i=n(581),o=n(96),a=n(9),s=n(941);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},96:(e,t,n)=>{"use strict";var r=n(485);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},574:(e,t,n)=>{"use strict";var r=n(642),i=n(288);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},524:(e,t,n)=>{"use strict";var r=n(953);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},9:(e,t,n)=>{"use strict";var r=n(485),i=n(212),o=n(475),a=n(141);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},941:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,l),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var c=i.concat(o).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===c.indexOf(e)}));return r.forEach(f,l),n}},570:(e,t,n)=>{"use strict";var r=n(524);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},141:(e,t,n)=>{"use strict";var r=n(61),i=n(485),o=n(446),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,l={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(u=n(387)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),e.exports=l},875:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:(e,t,n)=>{"use strict";var r=n(485);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},288:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},835:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},338:(e,t,n)=>{"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:(e,t,n)=>{"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:(e,t,n)=>{"use strict";var r=n(485),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},739:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},485:(e,t,n)=>{"use strict";var r=n(875),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},491:(e,t,n)=>{"use strict";const r=wp.element;var i=n(804),o=n.n(i);function a(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,o={setState:r,getState:i,subscribe:(e,r,o)=>r||o?((e,r=i,o=Object.is)=>{let a=r(t);function s(){const n=r(t);if(!o(a,n)){const t=a;e(a=n,t)}}return n.add(s),()=>n.delete(s)})(e,r,o):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,o),o}const s="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;const u=function(e){const t="function"==typeof e?a(e):e,n=(e=t.getState,n=Object.is)=>{const[,r]=(0,i.useReducer)((e=>e+1),0),o=t.getState(),a=(0,i.useRef)(o),u=(0,i.useRef)(e),l=(0,i.useRef)(n),c=(0,i.useRef)(!1),f=(0,i.useRef)();let d;void 0===f.current&&(f.current=e(o));let p=!1;(a.current!==o||u.current!==e||l.current!==n||c.current)&&(d=e(o),p=!n(f.current,d)),s((()=>{p&&(f.current=d),a.current=o,u.current=e,l.current=n,c.current=!1}));const h=(0,i.useRef)(o);return s((()=>{const e=()=>{try{const e=t.getState(),n=u.current(e);l.current(f.current,n)||(a.current=e,f.current=n,r())}catch(e){c.current=!0,r()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]),p?d:f.current};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n};var l="pattern",c=12;function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=window.wp.blocks.createBlock;return e.map((function(e){var n=f(Array.isArray(e)?e:[e.name,e.attributes,e.innerBlocks],3),r=n[0],i=n[1],o=n[2];return t(r,i,p(void 0===o?[]:o))}))}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g=u((function(e,t){return{templates:[],fetchToken:null,activeTemplate:{},activeTemplateBlocks:{},taxonomyDefaultState:{},searchParams:{taxonomies:{},type:l,search:""},nextPage:"",removeTemplates:function(){return e({nextPage:"",templates:[]})},appendTemplates:function(n){return e({templates:y(new Map([].concat(y(t().templates),y(n)).map((function(e){return[e.id,e]}))).values())})},setupDefaultTaxonomies:function(n){var r=Object.keys(n).reduce((function(e,n){return e[n]=function(e){return function(e,t){return"pattern"===e&&"tax_categories"===t?"Default":""}(t().searchParams.type,e)}(n),e}),{}),i={};i.taxonomies=Object.assign({},r,t().searchParams.taxonomies),e({taxonomyDefaultState:r,searchParams:m({},Object.assign(t().searchParams,i))})},setActive:function(t){var n;if(e({activeTemplate:t}),null!=t&&null!==(n=t.fields)&&void 0!==n&&n.code){var r=window.wp.blocks.parse;e({activeTemplateBlocks:p(r(t.fields.code))})}},resetTaxonomies:function(){var e=v({},"tax_categories","pattern"===t().searchParams.type?"Default":"");t().updateSearchParams({taxonomies:Object.assign(t().taxonomyDefaultState,e)})},updateTaxonomies:function(e){var n={};n.taxonomies=Object.assign({},t().searchParams.taxonomies,e),t().updateSearchParams(n)},updateSearchParams:function(n){null!=n&&n.taxonomies&&!Object.keys(n.taxonomies).length&&(n.taxonomies=t().taxonomyDefaultState),e({templates:[],nextPage:"",searchParams:m({},Object.assign(t().searchParams,n))})}}})),b=u((function(e){return{open:!1,metaData:{},currentPage:"welcome",setOpen:function(t){e({open:t}),t&&g.getState().removeTemplates()}}})),w=n(135),j=n.n(w),k=Object.defineProperty,_=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,N=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))S.call(t,n)&&N(e,n,t[n]);if(_)for(var n of _(t))E.call(t,n)&&N(e,n,t[n]);return e};const C=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>C(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>C(t)(e)}}},A=(e,t)=>(n,r,i)=>{const{name:o,getStorage:a=(()=>localStorage),serialize:s=JSON.stringify,deserialize:u=JSON.parse,blacklist:l,whitelist:c,onRehydrateStorage:f,version:d=0,migrate:p,merge:h=((e,t)=>O(O({},t),e))}=t||{};let m;try{m=a()}catch(e){}if(!m)return e(((...e)=>{console.warn(`Persist middleware: unable to update ${o}, the given storage is currently unavailable.`),n(...e)}),r,i);const v=C(s),y=()=>{const e=O({},r());let t;c&&Object.keys(e).forEach((t=>{!c.includes(t)&&delete e[t]})),l&&l.forEach((t=>delete e[t]));const n=v({state:e,version:d}).then((e=>m.setItem(o,e))).catch((e=>{t=e}));if(t)throw t;return n},x=i.setState;i.setState=(e,t)=>{x(e,t),y()};const g=e(((...e)=>{n(...e),y()}),r,i);let b;const w=(null==f?void 0:f(r()))||void 0;return C(m.getItem.bind(m))(o).then((e=>{if(e)return u(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===d)return e.state;if(p)return p(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>(b=h(e,g),n(b,!0),y()))).then((()=>{null==w||w(b,void 0)})).catch((e=>{null==w||w(void 0,e)})),b||g};var P=n(206),F=n.n(P)().create({baseURL:window.extendifySdkData.root,headers:{"X-WP-Nonce":window.extendifySdkData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});function T(e){return Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}F.interceptors.response.use((function(e){return function(e){return Object.prototype.hasOwnProperty.call(e,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify-sdk::softerror-encountered",{detail:e.soft_error,bubbles:!0})),e}(T(e))}),(function(e){return function(e){if(e.response)return console.error(e.response),Promise.reject(T(e.response))}(e)})),F.interceptors.request.use((function(e){return function(e){return e.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,e.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,e}(function(e){return e.data&&(e.data.remaining_imports=z.getState().remainingImports(),e.data.entry_point=z.getState().entryPoint,e.data.total_imports=z.getState().imports),e}(e))}),(function(e){return e}));var L=function(){return F.get("user")},I=function(e){return F.get("user-meta",{params:{key:e}})},D=function(e,t){var n=new FormData;return n.append("email",e),n.append("key",t),F.post("login",n,{headers:{"Content-Type":"multipart/form-data"}})},R=function(e){var t=new FormData;return t.append("data",JSON.stringify(e)),F.post("user",t,{headers:{"Content-Type":"multipart/form-data"}})},M=function(e){var t=new FormData;return t.append("email",e),F.post("register-mailing-list",t,{headers:{"Content-Type":"multipart/form-data"}})};function V(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){V(o,r,i,a,s,"next",e)}function s(e){V(o,r,i,a,s,"throw",e)}a(void 0)}))}}var B,U,q,Z,W={getItem:(U=H(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return U.apply(this,arguments)}),setItem:(B=H(j().mark((function e(t,n){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R(n);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(e,t){return B.apply(this,arguments)})},z=u(A((function(e,t){return{email:"",apiKey:"",imports:0,uuid:"",registration:{email:""},allowedImports:0,entryPoint:"not-set",enabled:!0,hasClickedThroughWelcomePage:!1,canInstallPlugins:!1,canActivatePlugins:!1,incrementImports:function(){return e({imports:t().imports+1})},canImport:function(){return!!t().apiKey||Number(t().imports)<Number(t().allowedImports)},remainingImports:function(){if(t().apiKey)return"unlimited";var e=Number(t().allowedImports)-Number(t().imports);return e>0?e:0}}}),{name:"extendify-user",getStorage:function(){return W}}));function $(){return($=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function G(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function X(e,t){if(e in t){for(var n=t[e],r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return"function"==typeof n?n.apply(void 0,i):n}var a=new Error('Tried to handle "'+e+'" but there is no handler defined. Only defined handlers are: '+Object.keys(t).map((function(e){return'"'+e+'"'})).join(", ")+".");throw Error.captureStackTrace&&Error.captureStackTrace(a,X),a}function J(e){var t=e.props,n=e.slot,r=e.defaultTag,i=e.features,o=e.visible,a=void 0===o||o,s=e.name;if(a)return Q(t,n,r,s);var u=null!=i?i:q.None;if(u&q.Static){var l=t.static,c=void 0!==l&&l,f=G(t,["static"]);if(c)return Q(f,n,r,s)}if(u&q.RenderStrategy){var d,p=t.unmount,h=void 0===p||p,m=G(t,["unmount"]);return X(h?Z.Unmount:Z.Hidden,((d={})[Z.Unmount]=function(){return null},d[Z.Hidden]=function(){return Q($({},m,{hidden:!0,style:{display:"none"}}),n,r,s)},d))}return Q(t,n,r,s)}function Q(e,t,n,r){var o;void 0===t&&(t={});var a=te(e,["unmount","static"]),s=a.as,u=void 0===s?n:s,l=a.children,c=a.refName,f=void 0===c?"ref":c,d=G(a,["as","children","refName"]),p=void 0!==e.ref?((o={})[f]=e.ref,o):{},h="function"==typeof l?l(t):l;if(d.className&&"function"==typeof d.className&&(d.className=d.className(t)),u===i.Fragment&&Object.keys(d).length>0){if(!(0,i.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <"+r+' /> is rendering a "Fragment".',"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - "+e})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - "+e})).join("\n")].join("\n"));return(0,i.cloneElement)(h,Object.assign({},function(e,t,n){for(var r,i=Object.assign({},e),o=function(){var n,o=r.value;void 0!==e[o]&&void 0!==t[o]&&Object.assign(i,((n={})[o]=function(n){n.defaultPrevented||e[o](n),n.defaultPrevented||t[o](n)},n))},a=Y(n);!(r=a()).done;)o();return i}(function(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}(te(d,["ref"])),h.props,["onClick"]),p))}return(0,i.createElement)(u,Object.assign({},te(d,["ref"]),u!==i.Fragment&&p),h)}function ee(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function te(e,t){void 0===t&&(t=[]);for(var n,r=Object.assign({},e),i=Y(t);!(n=i()).done;){var o=n.value;o in r&&delete r[o]}return r}!function(e){e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static"}(q||(q={})),function(e){e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden"}(Z||(Z={}));var ne="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,re={serverHandoffComplete:!1};function ie(){var e=(0,i.useState)(re.serverHandoffComplete),t=e[0],n=e[1];return(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){!1===re.serverHandoffComplete&&(re.serverHandoffComplete=!0)}),[]),t}var oe=0;function ae(){return++oe}function se(){var e=ie(),t=(0,i.useState)(e?ae:null),n=t[0],r=t[1];return ne((function(){null===n&&r(ae())}),[n]),null!=n?""+n:void 0}function ue(){var e=(0,i.useRef)(!1);return(0,i.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var le,ce,fe=(0,i.createContext)(null);function de(){return(0,i.useContext)(fe)}function pe(e){var t=e.value,n=e.children;return o().createElement(fe.Provider,{value:t},n)}function he(){var e=(0,i.useRef)(!0);return(0,i.useEffect)((function(){e.current=!1}),[]),e.current}function me(){var e=[],t={requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);t.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.requestAnimationFrame((function(){t.requestAnimationFrame.apply(t,n)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);t.add((function(){return clearTimeout(e)}))})),add:function(t){e.push(t)},dispose:function(){for(var t,n=Y(e.splice(0));!(t=n()).done;){var r=t.value;r()}}};return t}function ve(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function ye(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}function xe(e,t,n,r,i,o){var a=me(),s=void 0!==o?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(o):function(){};return ye.apply(void 0,[e].concat(i)),ve.apply(void 0,[e].concat(t,n)),a.nextFrame((function(){ye.apply(void 0,[e].concat(n)),ve.apply(void 0,[e].concat(r)),a.add(function(e,t){var n=me();if(!e)return n.dispose;var r=getComputedStyle(e),i=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e}))[0];return void 0===t?0:t})),o=i[0],a=i[1];return 0!==o?n.setTimeout((function(){t(ce.Finished)}),o+a):t(ce.Finished),n.add((function(){return t(ce.Cancelled)})),n.dispose}(e,(function(n){return ye.apply(void 0,[e].concat(r,t)),ve.apply(void 0,[e].concat(i)),s(n)})))})),a.add((function(){return ye.apply(void 0,[e].concat(t,n,r,i))})),a.add((function(){return s(ce.Cancelled)})),a.dispose}function ge(e){return void 0===e&&(e=""),(0,i.useMemo)((function(){return e.split(" ").filter((function(e){return e.trim().length>1}))}),[e])}fe.displayName="OpenClosedContext",function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(le||(le={})),function(e){e.Finished="finished",e.Cancelled="cancelled"}(ce||(ce={}));var be,we=(0,i.createContext)(null);we.displayName="TransitionContext",function(e){e.Visible="visible",e.Hidden="hidden"}(be||(be={}));var je=(0,i.createContext)(null);function ke(e){return"children"in e?ke(e.children):e.current.filter((function(e){return e.state===be.Visible})).length>0}function _e(e){var t=(0,i.useRef)(e),n=(0,i.useRef)([]),r=ue();(0,i.useEffect)((function(){t.current=e}),[e]);var o=(0,i.useCallback)((function(e,i){var o;void 0===i&&(i=Z.Hidden);var a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(X(i,((o={})[Z.Unmount]=function(){n.current.splice(a,1)},o[Z.Hidden]=function(){n.current[a].state=be.Hidden},o)),!ke(n)&&r.current&&(null==t.current||t.current()))}),[t,r,n]),a=(0,i.useCallback)((function(e){var t=n.current.find((function(t){return t.id===e}));return t?t.state!==be.Visible&&(t.state=be.Visible):n.current.push({id:e,state:be.Visible}),function(){return o(e,Z.Unmount)}}),[n,o]);return(0,i.useMemo)((function(){return{children:n,register:a,unregister:o}}),[a,o,n])}function Se(){}je.displayName="NestingContext";var Ee=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ne(e){for(var t,n={},r=Y(Ee);!(t=r()).done;){var i,o=t.value;n[o]=null!=(i=e[o])?i:Se}return n}var Oe,Ce=q.RenderStrategy;function Ae(e){var t,n=e.beforeEnter,r=e.afterEnter,a=e.beforeLeave,s=e.afterLeave,u=e.enter,l=e.enterFrom,c=e.enterTo,f=e.entered,d=e.leave,p=e.leaveFrom,h=e.leaveTo,m=G(e,["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),v=(0,i.useRef)(null),y=(0,i.useState)(be.Visible),x=y[0],g=y[1],b=m.unmount?Z.Unmount:Z.Hidden,w=function(){var e=(0,i.useContext)(we);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),j=w.show,k=w.appear,_=function(){var e=(0,i.useContext)(je);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),S=_.register,E=_.unregister,N=he(),O=se(),C=(0,i.useRef)(!1),A=_e((function(){C.current||(g(be.Hidden),E(O),M.current.afterLeave())}));ne((function(){if(O)return S(O)}),[S,O]),ne((function(){var e;b===Z.Hidden&&O&&(j&&x!==be.Visible?g(be.Visible):X(x,((e={})[be.Hidden]=function(){return E(O)},e[be.Visible]=function(){return S(O)},e)))}),[x,O,S,E,j,b]);var P=ge(u),F=ge(l),T=ge(c),L=ge(f),I=ge(d),D=ge(p),R=ge(h),M=function(e){var t=(0,i.useRef)(Ne(e));return(0,i.useEffect)((function(){t.current=Ne(e)}),[e]),t}({beforeEnter:n,afterEnter:r,beforeLeave:a,afterLeave:s}),V=ie();(0,i.useEffect)((function(){if(V&&x===be.Visible&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[v,x,V]);var H=N&&!k;ne((function(){var e=v.current;if(e&&!H)return C.current=!0,j&&M.current.beforeEnter(),j||M.current.beforeLeave(),j?xe(e,P,F,T,L,(function(e){C.current=!1,e===ce.Finished&&M.current.afterEnter()})):xe(e,I,D,R,L,(function(e){C.current=!1,e===ce.Finished&&(ke(A)||(g(be.Hidden),E(O),M.current.afterLeave()))}))}),[M,O,C,E,A,v,H,j,P,F,T,I,D,R]);var B={ref:v},U=m;return o().createElement(je.Provider,{value:A},o().createElement(pe,{value:X(x,(t={},t[be.Visible]=le.Open,t[be.Hidden]=le.Closed,t))},J({props:$({},U,B),defaultTag:"div",features:Ce,visible:x===be.Visible,name:"Transition.Child"})))}function Pe(e){var t,n=e.show,r=e.appear,a=void 0!==r&&r,s=e.unmount,u=G(e,["show","appear","unmount"]),l=de();void 0===n&&null!==l&&(n=X(l,((t={})[le.Open]=!0,t[le.Closed]=!1,t)));if(![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var c=(0,i.useState)(n?be.Visible:be.Hidden),f=c[0],d=c[1],p=_e((function(){d(be.Hidden)})),h=he(),m=(0,i.useMemo)((function(){return{show:n,appear:a||!h}}),[n,a,h]);(0,i.useEffect)((function(){n?d(be.Visible):ke(p)||d(be.Hidden)}),[n,p]);var v={unmount:s};return o().createElement(je.Provider,{value:p},o().createElement(we.Provider,{value:m},J({props:$({},v,{as:i.Fragment,children:o().createElement(Ae,Object.assign({},v,u))}),defaultTag:i.Fragment,features:Ce,visible:f===be.Visible,name:"Transition"})))}function Fe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(0,i.useRef)(t);return(0,i.useEffect)((function(){r.current=t}),[t]),(0,i.useCallback)((function(e){for(var t,n=Y(r.current);!(t=n()).done;){var i=t.value;null!=i&&("function"==typeof i?i(e):i.current=e)}}),[r])}function Te(e){for(var t,n,r=e.parentElement,i=null;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(i=r),r=r.parentElement;var o=null!=(t=""===(null==(n=r)?void 0:n.getAttribute("disabled")))&&t;return(!o||!function(e){if(!e)return!1;var t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(i))&&o}function Le(e,t,n){var r=(0,i.useRef)(t);r.current=t,(0,i.useEffect)((function(){function t(e){r.current.call(window,e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}Pe.Child=function(e){var t=null!==(0,i.useContext)(we),n=null!==de();return!t&&n?o().createElement(Pe,Object.assign({},e)):o().createElement(Ae,Object.assign({},e))},Pe.Root=Pe,function(e){e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab"}(Oe||(Oe={}));var Ie,De,Re,Me,Ve,He=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return e+":not([tabindex='-1'])"})).join(",");function Be(e){null==e||e.focus({preventScroll:!0})}function Ue(e,t){var n=Array.isArray(e)?e:function(e){return void 0===e&&(e=document.body),null==e?[]:Array.from(e.querySelectorAll(He))}(e),r=document.activeElement,i=function(){if(t&(Ie.First|Ie.Next))return Re.Next;if(t&(Ie.Previous|Ie.Last))return Re.Previous;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),o=function(){if(t&Ie.First)return 0;if(t&Ie.Previous)return Math.max(0,n.indexOf(r))-1;if(t&Ie.Next)return Math.max(0,n.indexOf(r))+1;if(t&Ie.Last)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),a=t&Ie.NoScroll?{preventScroll:!0}:{},s=0,u=n.length,l=void 0;do{var c;if(s>=u||s+u<=0)return De.Error;var f=o+s;if(t&Ie.WrapAround)f=(f+u)%u;else{if(f<0)return De.Underflow;if(f>=u)return De.Overflow}null==(c=l=n[f])||c.focus(a),s+=i}while(l!==document.activeElement);return l.hasAttribute("tabindex")||l.setAttribute("tabindex","0"),De.Success}function qe(e,t,n){void 0===t&&(t=Ve.All);var r=void 0===n?{}:n,o=r.initialFocus,a=r.containers,s=(0,i.useRef)("undefined"!=typeof window?document.activeElement:null),u=(0,i.useRef)(null),l=ue(),c=Boolean(t&Ve.RestoreFocus),f=Boolean(t&Ve.InitialFocus);(0,i.useEffect)((function(){c&&(s.current=document.activeElement)}),[c]),(0,i.useEffect)((function(){if(c)return function(){Be(s.current),s.current=null}}),[c]),(0,i.useEffect)((function(){if(f&&e.current){var t=document.activeElement;if(null==o?void 0:o.current){if((null==o?void 0:o.current)===t)return void(u.current=t)}else if(e.current.contains(t))return void(u.current=t);if(null==o?void 0:o.current)Be(o.current);else if(Ue(e.current,Ie.First)===De.Error)throw new Error("There are no focusable elements inside the <FocusTrap />");u.current=document.activeElement}}),[e,o,f]),Le("keydown",(function(n){t&Ve.TabLock&&e.current&&n.key===Oe.Tab&&(n.preventDefault(),Ue(e.current,(n.shiftKey?Ie.Previous:Ie.Next)|Ie.WrapAround)===De.Success&&(u.current=document.activeElement))})),Le("focus",(function(n){if(t&Ve.FocusLock){var r=new Set(null==a?void 0:a.current);if(r.add(e),r.size){var i=u.current;if(i&&l.current){var o=n.target;o&&o instanceof HTMLElement?!function(e,t){for(var n,r=Y(e);!(n=r()).done;){var i;if(null==(i=n.value.current)?void 0:i.contains(t))return!0}return!1}(r,o)?(n.preventDefault(),n.stopPropagation(),Be(i)):(u.current=o,Be(o)):Be(u.current)}}}}),!0)}!function(e){e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll"}(Ie||(Ie={})),function(e){e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow"}(De||(De={})),function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"}(Re||(Re={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(Me||(Me={})),function(e){e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All"}(Ve||(Ve={}));var Ze=new Set,We=new Map;function ze(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function $e(e){var t=We.get(e);t&&(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var Ge=(0,i.createContext)(!1);function Ke(e){return o().createElement(Ge.Provider,{value:e.force},e.children)}const Ye=ReactDOM;function Xe(){var e=(0,i.useContext)(Ge),t=(0,i.useContext)(tt),n=(0,i.useState)((function(){if(!e&&null!==t)return null;if("undefined"==typeof window)return null;var n=document.getElementById("headlessui-portal-root");if(n)return n;var r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)})),r=n[0],o=n[1];return(0,i.useEffect)((function(){e||null!==t&&o(t.current)}),[t,o,e]),r}var Je=i.Fragment;function Qe(e){var t=e,n=Xe(),r=(0,i.useState)((function(){return"undefined"==typeof window?null:document.createElement("div")}))[0],o=ie();return ne((function(){if(n&&r)return n.appendChild(r),function(){var e;n&&(r&&(n.removeChild(r),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n))))}}),[n,r]),o&&n&&r?(0,Ye.createPortal)(J({props:t,defaultTag:Je,name:"Portal"}),r):null}var et=i.Fragment,tt=(0,i.createContext)(null);Qe.Group=function(e){var t=e.target,n=G(e,["target"]);return o().createElement(tt.Provider,{value:t},J({props:n,defaultTag:et,name:"Popover.Group"}))};var nt=(0,i.createContext)(null);function rt(){var e=(0,i.useContext)(nt);if(null===e){var t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,rt),t}return e}var it,ot,at,st,ut=(0,i.createContext)((function(){}));function lt(e){var t=e.children,n=e.onUpdate,r=e.type,a=e.element,s=(0,i.useContext)(ut),u=(0,i.useCallback)((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null==n||n.apply(void 0,t),s.apply(void 0,t)}),[s,n]);return ne((function(){return u(it.Add,r,a),function(){return u(it.Remove,r,a)}}),[u,r,a]),o().createElement(ut.Provider,{value:u},t)}ut.displayName="StackContext",function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(it||(it={})),function(e){e[e.Open=0]="Open",e[e.Closed=1]="Closed"}(at||(at={})),function(e){e[e.SetTitleId=0]="SetTitleId"}(st||(st={}));var ct=((ot={})[st.SetTitleId]=function(e,t){return e.titleId===t.id?e:$({},e,{titleId:t.id})},ot),ft=(0,i.createContext)(null);function dt(e){var t=(0,i.useContext)(ft);if(null===t){var n=new Error("<"+e+" /> is missing a parent <"+yt.displayName+" /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(n,dt),n}return t}function pt(e,t){return X(t.type,ct,e,t)}ft.displayName="DialogContext";var ht=q.RenderStrategy|q.Static,mt=ee((function(e,t){var n,r=e.open,a=e.onClose,s=e.initialFocus,u=G(e,["open","onClose","initialFocus"]),l=(0,i.useState)(0),c=l[0],f=l[1],d=de();void 0===r&&null!==d&&(r=X(d,((n={})[le.Open]=!0,n[le.Closed]=!1,n)));var p=(0,i.useRef)(new Set),h=(0,i.useRef)(null),m=Fe(h,t),v=e.hasOwnProperty("open")||null!==d,y=e.hasOwnProperty("onClose");if(!v&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: "+r);if("function"!=typeof a)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: "+a);var x=r?at.Open:at.Closed,g=null!==d?d===le.Open:x===at.Open,b=(0,i.useReducer)(pt,{titleId:null,descriptionId:null}),w=b[0],j=b[1],k=(0,i.useCallback)((function(){return a(!1)}),[a]),_=(0,i.useCallback)((function(e){return j({type:st.SetTitleId,id:e})}),[j]),S=ie()&&x===at.Open,E=c>1,N=null!==(0,i.useContext)(ft);qe(h,S?X(E?"parent":"leaf",{parent:Ve.RestoreFocus,leaf:Ve.All}):Ve.None,{initialFocus:s,containers:p}),function(e,t){void 0===t&&(t=!0),ne((function(){if(t&&e.current){var n=e.current;Ze.add(n);for(var r,i=Y(We.keys());!(r=i()).done;){var o=r.value;o.contains(n)&&($e(o),We.delete(o))}return document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement){for(var t,n=Y(Ze);!(t=n()).done;){var r=t.value;if(e.contains(r))return}1===Ze.size&&(We.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),ze(e))}})),function(){if(Ze.delete(n),Ze.size>0)document.querySelectorAll("body > *").forEach((function(e){if(e instanceof HTMLElement&&!We.has(e)){for(var t,n=Y(Ze);!(t=n()).done;){var r=t.value;if(e.contains(r))return}We.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),ze(e)}}));else for(var e,t=Y(We.keys());!(e=t()).done;){var r=e.value;$e(r),We.delete(r)}}}}),[t])}(h,!!E&&S),Le("mousedown",(function(e){var t,n=e.target;x===at.Open&&(E||(null==(t=h.current)?void 0:t.contains(n))||k())})),(0,i.useEffect)((function(){if(x===at.Open&&!N){var e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=n+"px",function(){document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}}),[x,N]),(0,i.useEffect)((function(){if(x===at.Open&&h.current){var e=new IntersectionObserver((function(e){for(var t,n=Y(e);!(t=n()).done;){var r=t.value;0===r.boundingClientRect.x&&0===r.boundingClientRect.y&&0===r.boundingClientRect.width&&0===r.boundingClientRect.height&&k()}}));return e.observe(h.current),function(){return e.disconnect()}}}),[x,h,k]);var O=function(){var e=(0,i.useState)([]),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=(0,i.useCallback)((function(e){return n((function(t){return[].concat(t,[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}}),[]),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return o().createElement(nt.Provider,{value:r},e.children)}}),[n])]}(),C=O[0],A=O[1],P="headlessui-dialog-"+se(),F=(0,i.useMemo)((function(){return[{dialogState:x,close:k,setTitleId:_},w]}),[x,w,k,_]),T=(0,i.useMemo)((function(){return{open:x===at.Open}}),[x]),L={ref:m,id:P,role:"dialog","aria-modal":x===at.Open||void 0,"aria-labelledby":w.titleId,"aria-describedby":C,onClick:function(e){e.stopPropagation()},onKeyDown:function(e){e.key===Oe.Escape&&x===at.Open&&(E||(e.preventDefault(),e.stopPropagation(),k()))}},I=u;return o().createElement(lt,{type:"Dialog",element:h,onUpdate:(0,i.useCallback)((function(e,t,n){var r;"Dialog"===t&&X(e,((r={})[it.Add]=function(){p.current.add(n),f((function(e){return e+1}))},r[it.Remove]=function(){p.current.add(n),f((function(e){return e-1}))},r))}),[])},o().createElement(Ke,{force:!0},o().createElement(Qe,null,o().createElement(ft.Provider,{value:F},o().createElement(Qe.Group,{target:h},o().createElement(Ke,{force:!1},o().createElement(A,{slot:T,name:"Dialog.Description"},J({props:$({},I,L),slot:T,defaultTag:"div",features:ht,visible:g,name:"Dialog"}))))))))})),vt=ee((function e(t,n){var r=dt([yt.displayName,e.name].join("."))[0],o=r.dialogState,a=r.close,s=Fe(n),u="headlessui-dialog-overlay-"+se(),l=(0,i.useCallback)((function(e){if(Te(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}),[a]),c=(0,i.useMemo)((function(){return{open:o===at.Open}}),[o]);return J({props:$({},t,{ref:s,id:u,"aria-hidden":!0,onClick:l}),slot:c,defaultTag:"div",name:"Dialog.Overlay"})}));var yt=Object.assign(mt,{Overlay:vt,Title:function e(t){var n=dt([yt.displayName,e.name].join("."))[0],r=n.dialogState,o=n.setTitleId,a="headlessui-dialog-title-"+se();(0,i.useEffect)((function(){return o(a),function(){return o(null)}}),[a,o]);var s=(0,i.useMemo)((function(){return{open:r===at.Open}}),[r]);return J({props:$({},t,{id:a}),slot:s,defaultTag:"h2",name:"Dialog.Title"})},Description:function(e){var t=rt(),n="headlessui-description-"+se();ne((function(){return t.register(n)}),[n,t.register]);var r=e,i=$({},t.props,{id:n});return J({props:$({},r,i),slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}});const xt=wp.i18n;var gt=n(246);function bt(e){var t,n,r,i,o,a,s=e.className,u=e.hideLibrary,l=z((function(e){return e.remainingImports})),c=z((function(e){return e.apiKey})),f=z((function(e){return e.allowedImports})),d=b((function(e){return e.metaData}));return(0,gt.jsx)("div",{className:s,children:(0,gt.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,gt.jsxs)("div",{className:"flex space-x-12 h-full",children:[(0,gt.jsxs)("div",{className:"font-bold flex items-center space-x-1.5 lg:w-72",children:[(0,gt.jsxs)("svg",{className:"",width:"30",height:"30",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,gt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,gt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,gt.jsx)("span",{className:"text-sm transform translate-y-0.5 whitespace-nowrap",children:(0,xt.__)("Extendify Library","extendify-sdk")})]}),!c.length&&(0,gt.jsx)(gt.Fragment,{children:(0,gt.jsxs)("div",{className:"items-center ml-8 h-full hidden md:flex",children:[(0,gt.jsx)("div",{className:"m-0 p-0 px-6 text-sm bg-gray-50 border-l border-gray-300 h-full flex items-center whitespace-nowrap",children:(0,xt.sprintf)((0,xt.__)("Imports left: %s / %s"),l(),Number(f))}),(0,gt.jsx)("div",{className:"h-full items-center border-l hidden lg:flex",children:(null==d||null===(t=d.banners)||void 0===t?void 0:t.library_header)&&(0,gt.jsxs)(gt.Fragment,{children:[(null===(n=d.banners.library_header)||void 0===n?void 0:n.image)&&(0,gt.jsx)("a",{className:"h-full block",target:"_blank",rel:"noreferrer",href:d.banners.library_header.url,children:(0,gt.jsx)("img",{src:d.banners.library_header.image,alt:"Extendify notice"})}),!(null!==(r=d.banners.library_header)&&void 0!==r&&r.image)&&(0,gt.jsxs)("div",{className:"text-gray-900 space-x-6 bg-extendify-light px-6 p-2 h-full flex items-center",children:[(0,gt.jsx)("span",{className:"font-bold text-left",children:d.banners.library_header.text_backup}),(null===(i=d.banners.library_header)||void 0===i?void 0:i.url)&&(0,gt.jsx)("div",{children:(0,gt.jsx)("a",{className:"button-extendify-main",target:"_blank",rel:"noreferrer",href:"".concat(d.banners.library_header.url,"&utm_source=").concat(encodeURIComponent(window.extendifySdkData.source),"&utm_medium=library&utm_campaign=banner"),children:null!==(o=null===(a=d.banners.library_header)||void 0===a?void 0:a.button_text)&&void 0!==o?o:(0,xt.__)("Get it now","extendify-sdk")})})]})]})})]})})]}),(0,gt.jsx)("div",{className:"space-x-2 transform sm:translate-x-6",children:(0,gt.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return u()},children:[(0,gt.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,gt.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,gt.jsx)("span",{className:"sr-only",children:(0,xt.__)("Close library","extendify-sdk")})]})})]})})}const wt=lodash;var jt=function(){return F.get("taxonomies")};const kt=wp.components;var _t=n(42),St=n.n(_t);function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ot(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ot(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ct(e){var t=Nt(e.taxonomy,2),n=t[0],i=t[1],o=e.open,a=g((function(e){return e.updateTaxonomies})),s=g((function(e){return e.resetTaxonomies})),u=g((function(e){return e.searchParams})),l=Nt((0,r.useState)({}),2),c=l[0],f=l[1],d=Nt((0,r.useState)({}),2),p=d[0],h=d[1],m=(0,r.useRef)(),v=(0,r.useRef)(),y=(0,r.useRef)(),x=(0,r.useRef)(!0),b=function(e){var t;return(null==u?void 0:u.taxonomies[n])===e.term||(null===(t=e.children)||void 0===t?void 0:t.filter((function(e){return e.term===(null==u?void 0:u.taxonomies[n])})).length)>0},w=function(e){var t;return Object.prototype.hasOwnProperty.call(e,"children")?e.children.filter((function(e){return null==e?void 0:e.type.includes(u.type)})).length:null==e||null===(t=e.type)||void 0===t?void 0:t.includes(u.type)};if((0,r.useEffect)((function(){x.current?x.current=!1:(f({}),s())}),[u.type,s]),(0,r.useEffect)((function(){Object.keys(c).length?setTimeout((function(){requestAnimationFrame((function(){h(m.current.clientHeight),y.current.focus()}))}),200):h("auto")}),[c]),!Object.keys(i).length||!Object.values(i).filter((function(e){return w(e)})).length)return"";var j=n.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,gt.jsx)(kt.PanelBody,{title:j,initialOpen:o,children:(0,gt.jsx)(kt.PanelRow,{children:(0,gt.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:p},children:[(0,gt.jsxs)("ul",{className:St()("p-1 m-0 w-full transform transition duration-200",{"-translate-x-full":Object.keys(c).length}),children:[(0,gt.jsx)("li",{className:"m-0",children:(0,gt.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:v,onClick:function(){a(Et({},n,"pattern"===u.type&&"tax_categories"===n?"Default":""))},children:(0,gt.jsx)("span",{className:St()({"text-wp-theme-500":!u.taxonomies[n].length||"Default"===(null==u?void 0:u.taxonomies[n])}),children:"pattern"===u.type&&"tax_categories"===n?(0,xt.__)("Default","extendify-sdk"):(0,xt.__)("All","extendify-sdk")})})}),Object.values(i).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,gt.jsx)("li",{className:"m-0 w-full",children:(0,gt.jsxs)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){Object.prototype.hasOwnProperty.call(e,"children")?f(e):a(Et({},n,e.term))},children:[(0,gt.jsx)("span",{className:St()({"text-wp-theme-500":b(e)}),children:e.term}),Object.prototype.hasOwnProperty.call(e,"children")&&(0,gt.jsx)("span",{className:"text-black",children:(0,gt.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",className:"stroke-current",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})})})]})},e.term)}))]}),(0,gt.jsxs)("ul",{ref:m,className:St()("p-1 m-0 w-full transform transition duration-200 absolute top-0 right-0",{"translate-x-full":!Object.keys(c).length}),children:[Object.values(c).length>0&&(0,gt.jsx)("li",{className:"m-0",children:(0,gt.jsxs)("button",{type:"button",className:"text-left cursor-pointer font-bold flex space-x-4 items-center py-2 pr-4 m-0leading-none hover:text-wp-theme-500 bg-transparent transition duration-200 button-focus",ref:y,onClick:function(){f({}),v.current.focus()},children:[(0,gt.jsx)("svg",{className:"stroke-current transform rotate-180",width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M1 12.5L6 6.99998L1 1.5",strokeWidth:"1.5"})}),(0,gt.jsx)("span",{children:c.term})]})}),Object.values(c).length&&Object.values(c.children).filter((function(e){return w(e)})).sort((function(e,t){return e.term.localeCompare(t.term)})).map((function(e){return(0,gt.jsx)("li",{className:"m-0 pl-6 w-full flex justify-between items-center",children:(0,gt.jsx)("button",{type:"button",className:"text-left cursor-pointer w-full flex justify-between items-center py-1.5 m-0 leading-none bg-transparent hover:text-wp-theme-500 transition duration-200 button-focus",onClick:function(){a(Et({},n,e.term))},children:(0,gt.jsx)("span",{className:St()({"text-wp-theme-500":b(e)}),children:e.term})})},e.term)}))]})]})})})}function At(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Pt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){At(o,r,i,a,s,"next",e)}function s(e){At(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ft(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lt(){var e,t=g((function(e){return e.updateSearchParams})),n=g((function(e){return e.setupDefaultTaxonomies})),i=g((function(e){return e.searchParams})),o=(0,wt.debounce)((function(e){return t({taxonomies:{},search:e})}),500),a=Ft((0,r.useState)(null!==(e=null==i?void 0:i.search)&&void 0!==e?e:""),2),s=a[0],u=a[1],l=Ft((0,r.useState)({}),2),c=l[0],f=l[1],d=(0,r.useCallback)(Pt(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jt();case 2:t=e.sent,t=Object.keys(t).filter((function(e){return e.startsWith("tax_")})).reduce((function(e,n){return e[n]=t[n],e}),{}),n(t),f(t);case 6:case"end":return e.stop()}}),e)}))),[n]);return(0,r.useEffect)((function(){d()}),[d]),(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)("div",{className:"mt-px bg-white mb-6 mx-6 pt-6 lg:mx-0 lg:pt-0",children:[(0,gt.jsx)("label",{className:"sr-only",htmlFor:"extendify-search-input",children:(0,xt.__)("What are you looking for?","extendify-sdk")}),(0,gt.jsx)("input",{id:"extendify-search-input",type:"search",placeholder:(0,xt.__)("What are you looking for?","extendify-sdk"),onChange:function(e){g.setState({nextPage:""}),u(e.target.value),o(e.target.value)},value:s,className:"button-focus bg-gray-100 focus:bg-white border-0 m-0 p-3.5 pb-3 rounded-none text-sm w-full",autoComplete:"off"}),(0,gt.jsx)("svg",{className:"absolute top-3 right-6 hidden lg:block pointer-events-none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,gt.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]}),(0,gt.jsx)("div",{className:"mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,gt.jsx)(kt.Panel,{children:Object.entries(c).map((function(e,t){return(0,gt.jsx)(Ct,{open:!1,taxonomy:e},t)}))})})]})}function It(e){var t=e.taxonomies,n=e.search,r=e.type,i=[],o=Object.entries(t).filter((function(e){return Boolean(e[1].length)})).map((function(e){return"".concat(e[0],' = "').concat(e[1],'"')})).join(", ");return o.length&&i.push(o),n.length&&i.push('OR(FIND(LOWER("'.concat(n,'"), LOWER(title))!= 0, FIND(LOWER("').concat(n,'"), LOWER({tax_categories})) != 0)')),r.length&&i.push('{type}="'.concat(r,'"')),i.length?"AND(".concat(i.join(", "),")").replace(/\r?\n|\r/g,""):""}function Dt(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var Rt=0,Mt=function(e,t){return(n=j().mark((function n(){var r,i,o;return j().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Rt++,i=P.CancelToken.source(),null!==(r=g.getState().fetchToken)&&void 0!==r&&r.cancel&&g.getState().fetchToken.cancel(),g.setState({fetchToken:i}),n.next=6,F.post("templates",{filterByFormula:It(e),pageSize:c,categories:e.taxonomies,search:e.search,type:e.type,offset:t,initial:1===Rt,request_count:Rt},{cancelToken:i.token});case 6:return o=n.sent,g.setState({fetchToken:null}),n.abrupt("return",o);case 9:case"end":return n.stop()}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(e){Dt(o,r,i,a,s,"next",e)}function s(e){Dt(o,r,i,a,s,"throw",e)}a(void 0)}))})();var n},Vt=function(e,t,n){var r,i,o,a;return F.post("related",{pageSize:4,query_type:t,wanted_type:n,categories:null==e||null===(r=e.fields)||void 0===r?void 0:r.tax_categories,pattern_types:null==e||null===(i=e.fields)||void 0===i?void 0:i.tax_pattern_types,style:null==e||null===(o=e.fields)||void 0===o?void 0:o.tax_style,type:null==e||null===(a=e.fields)||void 0===a?void 0:a.type,template_id:null==e?void 0:e.id})},Ht=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,maybe_import:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Bt=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,single:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})},Ut=function(e){var t;return F.post("templates/".concat(e.id),{template_id:e.id,imported:!0,type:e.fields.type,pageSize:c,template_name:null===(t=e.fields)||void 0===t?void 0:t.title})};function qt(){return(qt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Zt=new Map,Wt=new WeakMap,zt=0;function $t(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Wt.has(n)||(zt+=1,Wt.set(n,zt.toString())),Wt.get(n)):"0":e[t]);var n})).toString()}function Gt(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=$t(e),n=Zt.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},Zt.set(t,n)}return n}(n),i=r.id,o=r.observer,a=r.elements,s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),0===s.length&&(a.delete(e),o.unobserve(e)),0===a.size&&(o.disconnect(),Zt.delete(i))}}function Kt(e){return"function"!=typeof e.children}var Yt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),Kt(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=Gt(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o})}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!Kt(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,o=r.children,a=r.as,s=r.tag,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,i.createElement)(a||s||"div",qt({ref:this.handleNode},u),o)},r}(i.Component);Yt.displayName="InView",Yt.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function Xt(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jt(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Qt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Jt(o,r,i,a,s,"next",e)}function s(e){Jt(o,r,i,a,s,"throw",e)}a(void 0)}))}}function en(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||tn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){if(e){if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(e,t):void 0}}function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rn(e){var t=e.templates,n=g((function(e){return e.setActive})),o=g((function(e){return e.activeTemplate})),a=g((function(e){return e.appendTemplates})),s=en((0,r.useState)(""),2),u=s[0],l=s[1],c=en((0,r.useState)(!1),2),f=c[0],d=c[1],p=en((0,r.useState)([]),2),h=p[0],m=p[1],v=en(function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,o=t.trackVisibility,a=t.rootMargin,s=t.root,u=t.triggerOnce,l=t.skip,c=t.initialInView,f=(0,i.useRef)(),d=(0,i.useState)({inView:!!c}),p=d[0],h=d[1],m=(0,i.useCallback)((function(e){void 0!==f.current&&(f.current(),f.current=void 0),l||e&&(f.current=Gt(e,(function(e,t){h({inView:e,entry:t}),t.isIntersecting&&u&&f.current&&(f.current(),f.current=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:o,delay:r}))}),[Array.isArray(n)?n.toString():n,s,a,u,l,o,r]);(0,i.useEffect)((function(){f.current||!p.entry||u||l||h({inView:!!c})}));var v=[m,p.inView,p.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}(),2),y=v[0],x=v[1],b=g((function(e){return e.updateSearchParams})),w=g((function(e){return e.searchParams})),k=(0,r.useRef)(g.getState().nextPage),_=(0,r.useRef)(g.getState().searchParams);(0,r.useEffect)((function(){return g.subscribe((function(e){return k.current=e}),(function(e){return e.nextPage}))}),[]),(0,r.useEffect)((function(){return g.subscribe((function(e){return _.current=e}),(function(e){return e.searchParams}))}),[]);var S=(0,r.useCallback)(Qt(j().mark((function e(){var t,n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(""),d(!1),e.next=4,Mt(_.current,k.current).catch((function(e){console.error(e),l(e&&e.message?e.message:(0,xt.__)("Unknown error occured. Check browser console or contact support.","extendify-sdk"))}));case 4:null!=(n=e.sent)&&null!==(t=n.error)&&void 0!==t&&t.length&&l(null==n?void 0:n.error),null!=n&&n.records&&w===_.current&&(a(n.records),d(n.records.length<=0),g.setState({nextPage:n.offset}));case 7:case"end":return e.stop()}}),e)}))),[w,a]);return(0,r.useEffect)((function(){Object.keys(_.current.taxonomies).length&&(m([]),S())}),[S,_]),(0,r.useEffect)((function(){x&&S()}),[x,S]),u.length?(0,gt.jsxs)("div",{className:"text-left",children:[(0,gt.jsx)("h2",{className:"text-left",children:(0,xt.__)("Server error","extendify-sdk")}),(0,gt.jsx)("code",{className:"block max-w-xl p-4 mb-4",style:{minHeight:"10rem"},children:u}),(0,gt.jsx)(kt.Button,{isTertiary:!0,onClick:function(){m([]),b({taxonomies:{},search:""}),S()},children:(0,xt.__)("Press here to reload experience")})]}):f?null!=w&&w.search.length?(0,gt.jsx)("h2",{className:"text-left",children:(0,xt.sprintf)((0,xt.__)("No results for %s.","extendify-sdk"),null==w?void 0:w.search)}):(0,gt.jsx)("h2",{className:"text-left",children:(0,xt.__)("No results found.","extendify-sdk")}):t.length?(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)("ul",{className:"flex-grow gap-6 grid xl:grid-cols-2 2xl:grid-cols-3 pb-32 m-0",children:t.map((function(e,t){var r,i,a,s,u,l,c,f,d;return(0,gt.jsxs)("li",{className:"flex flex-col justify-between group overflow-hidden max-w-lg",children:[(0,gt.jsx)("div",{className:"flex justify-items-center flex-grow h-80 border-gray-200 bg-white border border-b-0 group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",onClick:function(){return n(e)},children:(0,gt.jsx)("img",{role:"button",className:"max-w-full block m-auto object-cover",onLoad:function(){return m([].concat(Xt(h),[t]))},src:null!==(r=null==e||null===(i=e.fields)||void 0===i||null===(a=i.screenshot[0])||void 0===a||null===(s=a.thumbnails)||void 0===s||null===(u=s.large)||void 0===u?void 0:u.url)&&void 0!==r?r:null==e||null===(l=e.fields)||void 0===l||null===(c=l.screenshot[0])||void 0===c?void 0:c.url})}),(0,gt.jsx)("span",{role:"img","aria-hidden":"true",className:"h-px w-full bg-gray-200 border group-hover:bg-transparent border-t-0 border-b-0 border-gray-200 group-hover:border-wp-theme-500 transition duration-150"}),(0,gt.jsxs)("div",{className:"bg-transparent text-left bg-white flex items-center justify-between p-4 border border-t-0 border-transparent group-hover:border-wp-theme-500 transition duration-150 cursor-pointer",role:"button",onClick:function(){return n(e)},children:[(0,gt.jsxs)("div",{children:[(0,gt.jsx)("h4",{className:"m-0 font-bold",children:e.fields.display_title}),(0,gt.jsx)("p",{className:"m-0",children:null==e||null===(f=e.fields)||void 0===f||null===(d=f.tax_categories)||void 0===d?void 0:d.filter((function(e){return"default"!==e.toLowerCase()})).join(", ")})]}),(0,gt.jsx)(kt.Button,{isSecondary:!0,tabIndex:Object.keys(o).length?"-1":"0",className:"sm:opacity-0 group-hover:opacity-100 transition duration-150 focus:opacity-100",onClick:function(t){t.stopPropagation(),n(e)},children:(0,xt.__)("View","extendify-sdk")})]})]},e.id)}))}),g.getState().nextPage&&!!h.length&&h.length===t.length&&(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)("div",{className:"-translate-y-full flex flex-col h-80 items-end justify-end my-2 relative transform z-0 text",ref:y,style:{zIndex:-1}}),(0,gt.jsx)("div",{className:"my-4",children:(0,gt.jsx)(kt.Spinner,{})})]})]}):(0,gt.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,gt.jsx)(kt.Spinner,{})})}var on=function(){return F.get("plugins")},an=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new FormData;return t.append("plugins",JSON.stringify(e)),F.post("plugins",t,{headers:{"Content-Type":"multipart/form-data"}})},sn=function(){return F.get("active-plugins")};function un(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function ln(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){un(o,r,i,a,s,"next",e)}function s(e){un(o,r,i,a,s,"throw",e)}a(void 0)}))}}var cn=[],fn=[];function dn(e){return pn.apply(this,arguments)}function pn(){return(pn=ln(j().mark((function e(t){var n,r,i,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(cn.length){e.next=10;break}return e.t0=Object,e.next=8,on();case 8:e.t1=e.sent,cn=e.t0.keys.call(e.t0,e.t1);case 10:return o=!!i.length&&i.filter((function(e){return!cn.some((function(t){return t.includes(e)}))})),e.abrupt("return",o.length);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hn(e){return mn.apply(this,arguments)}function mn(){return(mn=ln(j().mark((function e(t){var n,r,i,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=(i=null!==(n=null==t||null===(r=t.fields)||void 0===r?void 0:r.required_plugins)&&void 0!==n?n:[]).filter((function(e){return"editorplus"!==e}))).length){e.next=4;break}return e.abrupt("return",!1);case 4:if(fn.length){e.next=10;break}return e.t0=Object,e.next=8,sn();case 8:e.t1=e.sent,fn=e.t0.values.call(e.t0,e.t1);case 10:if(!(o=!!i.length&&i.filter((function(e){return!fn.some((function(t){return t.includes(e)}))})))){e.next=16;break}return e.next=14,dn(t);case 14:if(!e.sent){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",o.length);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var vn=u(A((function(e){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(t){return e({wantedTemplate:t})},removeWanted:function(){return e({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));function yn(e){var t=e.msg;return(0,gt.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,xt.__)("Error installing plugins","extendify-sdk"),isDismissible:!1,children:[(0,xt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,gt.jsx)("br",{}),(0,gt.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,gt.jsx)(On,{}),document.getElementById("extendify-root"))},children:(0,xt.__)("Go back","extendify-sdk")})]})}const xn=wp.data;function gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wn(){var e=gn((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,xn.select)("core/editor").isEditedPostDirty)()?(0,gt.jsxs)(kt.Modal,{title:(0,xt.__)("Reload required","extendify-sdk"),isDismissible:!1,children:[(0,gt.jsx)("p",{style:{maxWidth:"400px"},children:(0,xt.__)("Just one more thing! We need to reload the page to continue.","extendify-sdk")}),(0,gt.jsxs)(kt.ButtonGroup,{children:[(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,xt.__)("Reload page","extendify-sdk")}),(0,gt.jsx)(kt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,xn.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,xt.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}function jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _n(){var e,t=jn((0,r.useState)(""),2),n=t[0],i=t[1],o=vn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return an(a).then((function(){vn.setState({importOnLoad:!0}),(0,r.render)((0,gt.jsx)(wn,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,gt.jsx)(yn,{msg:n}):(0,gt.jsx)(kt.Modal,{title:(0,xt.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,gt.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,xt.__)("Installing...","extendify-sdk")})})}var Sn=function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";z.setState({entryPoint:e}),window.dispatchEvent(new CustomEvent("extendify-sdk::".concat(t,"-library"),{detail:e,bubbles:!0}))}(e,"open")};function En(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Nn(){var e,t,n,i=vn((function(e){return e.wantedTemplate})),o=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,gt.jsxs)(kt.Modal,{title:(0,xt.__)("Plugins required","extendify-sdk"),isDismissible:!1,children:[(0,gt.jsx)("p",{style:{maxWidth:"400px"},children:(0,xt.sprintf)((0,xt.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify-sdk"),null!==(t=null==i||null===(n=i.fields)||void 0===n?void 0:n.type)&&void 0!==t?t:"template")}),(0,gt.jsx)("ul",{children:o.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,gt.jsx)("li",{children:En(e)},e)}))}),(0,gt.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,xt.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify-sdk")}),(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,gt.jsx)(Cr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,xt.__)("Return to library","extendify-sdk")})]})}function On(e){var t,n,i,o,a,s,u,l,c=vn((function(e){return e.wantedTemplate})),f=(null==c||null===(t=c.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=z.getState())&&void 0!==n&&n.canInstallPlugins?(0,gt.jsxs)(kt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,xt.__)("Install required plugins","extendify-sdk"),isDismissible:!1,children:[(0,gt.jsx)("p",{style:{maxWidth:"400px"},children:null!==(o=e.message)&&void 0!==o?o:(0,xt.__)((0,xt.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(a=null==c||null===(s=c.fields)||void 0===s?void 0:s.type)&&void 0!==a?a:"template"),"extendify-sdk")}),(null===(u=e.message)||void 0===u?void 0:u.length)>0||(0,gt.jsx)("ul",{children:f.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,gt.jsx)("li",{children:En(e)},e)}))}),(0,gt.jsxs)(kt.ButtonGroup,{children:[(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,gt.jsx)(_n,{}),document.getElementById("extendify-root"))},children:null!==(l=e.buttonLabel)&&void 0!==l?l:(0,xt.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,gt.jsx)(kt.Button,{isTertiary:!0,onClick:function(){e.forceOpen||(0,r.render)((0,gt.jsx)(Cr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,xt.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,gt.jsx)(Nn,{})}function Cn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var An=function(){var e,t=(e=j().mark((function e(t){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dn(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,gt.jsx)(On,{}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasRequiredPlugins",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Cn(o,r,i,a,s,"next",e)}function s(e){Cn(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Pn(e){var t=e.msg;return(0,gt.jsxs)(kt.Modal,{style:{maxWidth:"500px"},title:(0,xt.__)("Error Activating plugins","extendify-sdk"),isDismissible:!1,children:[(0,xt.__)("You have encountered an error that we cannot recover from. Please try again.","extendify-sdk"),(0,gt.jsx)("br",{}),(0,gt.jsx)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,gt.jsx)(Rn,{}),document.getElementById("extendify-root"))},children:(0,xt.__)("Go back","extendify-sdk")})]})}function Fn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Tn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Fn(o,r,i,a,s,"next",e)}function s(e){Fn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ln(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return In(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return In(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function In(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dn(){var e,t=Ln((0,r.useState)(""),2),n=t[0],i=t[1],o=vn((function(e){return e.wantedTemplate})),a=null==o||null===(e=o.fields)||void 0===e?void 0:e.required_plugins.filter((function(e){return"editorplus"!==e}));return an(a).then((function(){vn.setState({importOnLoad:!0})})).then(Tn(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){return setTimeout(e,1e3)}));case 2:(0,r.render)((0,gt.jsx)(wn,{}),document.getElementById("extendify-root"));case 3:case"end":return e.stop()}}),e)})))).catch((function(e){var t=e.response;i(t.data.message)})),n?(0,gt.jsx)(Pn,{msg:n}):(0,gt.jsx)(kt.Modal,{title:(0,xt.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,gt.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,xt.__)("Activating...","extendify-sdk")})})}function Rn(e){var t,n,i,o,a,s=vn((function(e){return e.wantedTemplate})),u=(null==s||null===(t=s.fields)||void 0===t?void 0:t.required_plugins)||[];return null!==(n=z.getState())&&void 0!==n&&n.canActivatePlugins?(0,gt.jsx)(kt.Modal,{title:(0,xt.__)("Activate required plugins","extendify-sdk"),isDismissible:!1,children:(0,gt.jsxs)("div",{children:[(0,gt.jsx)("p",{style:{maxWidth:"400px"},children:null!==(i=e.message)&&void 0!==i?i:(0,xt.__)((0,xt.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(o=null==s||null===(a=s.fields)||void 0===a?void 0:a.type)&&void 0!==o?o:"template"),"extendify-sdk")}),(0,gt.jsx)("ul",{children:u.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,gt.jsx)("li",{children:En(e)},e)}))}),(0,gt.jsxs)(kt.ButtonGroup,{children:[(0,gt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,gt.jsx)(Dn,{}),document.getElementById("extendify-root"))},children:(0,xt.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,gt.jsx)(kt.Button,{isTertiary:!0,onClick:function(){return(0,r.render)((0,gt.jsx)(Cr,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,xt.__)("No thanks, return to library","extendify-sdk")})]})]})}):(0,gt.jsx)(Nn,{})}function Mn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}var Vn=function(){var e,t=(e=j().mark((function e(t){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hn(t);case 2:return e.t0=!e.sent,e.t1=function(){},e.t2=function(){return new Promise((function(){(0,r.render)((0,gt.jsx)(Rn,{showClose:!0}),document.getElementById("extendify-root"))}))},e.abrupt("return",{id:"hasPluginsActivated",pass:e.t0,allow:e.t1,deny:e.t2});case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Mn(o,r,i,a,s,"next",e)}function s(e){Mn(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();function Hn(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Bn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Un(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Un(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qn(e){var t=e.finished,n=Bn((0,r.useState)(""),2),i=n[0],o=n[1],a=(0,r.useRef)(),s=function(){var e,n=(e=j().mark((function e(n){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),e.next=3,M(i);case 3:z.setState({registration:{email:i}}),t();case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Hn(o,r,i,a,s,"next",e)}function s(e){Hn(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){I("user_email").then((function(e){return o(null!=e?e:"")})),a.current.focus()}),[]),(0,gt.jsxs)(kt.Modal,{className:"extendify-sdk",title:(0,xt.__)("One last step...","extendify-sdk"),isDismissible:!1,children:[(0,gt.jsx)("p",{className:"m-0 mb-4 max-w-md",children:(0,xt.__)("Register now to receive updates and special offers from Extendify","extendify-sdk")}),(0,gt.jsxs)("form",{onSubmit:s,className:"flex space-x-4 mb-8",children:[(0,gt.jsxs)("div",{className:"relative w-full max-w-xs",children:[(0,gt.jsx)("input",{id:"extendify-email-register",value:i,required:!0,onChange:function(e){return o(e.target.value)},type:"text",className:"extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2",placeholder:(0,xt.__)("Email","extendify-sdk")}),(0,gt.jsx)("label",{htmlFor:"extendify-email-register",className:"-top-3 bg-white absolute left-1 px-1 transition-all",children:(0,xt.__)("Email","extendify-sdk")})]}),(0,gt.jsx)("input",{type:"submit",className:"hidden"})]}),(0,gt.jsxs)(kt.ButtonGroup,{children:[(0,gt.jsx)(kt.Button,{ref:a,isPrimary:!0,onClick:s,children:(0,xt.__)("Submit and import","extendify-sdk")}),(0,gt.jsx)(kt.Button,{isTertiary:!0,onClick:t,style:{boxShadow:"none",margin:"0 4px"},children:(0,xt.__)("Skip and import","extendify-sdk")})]})]})}function Zn(){var e;return{id:"NeedsRegistrationModal",pass:(null===(e=z.getState().registration)||void 0===e?void 0:e.email)||z.getState().apiKey,allow:function(){},deny:function(){return new Promise((function(e){(0,r.render)((0,gt.jsx)(qn,{finished:e}),document.getElementById("extendify-root"))}))}}}function Wn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Gn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){$n(o,r,i,a,s,"next",e)}function s(e){$n(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Kn(e){return function(){return new Yn(e.apply(this,arguments))}}function Yn(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof Xn;Promise.resolve(s?a.wrapped:a).then((function(e){s?r("return"===t?"return":"next",e):i(o.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function Xn(e){this.wrapped=e}Yn.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Yn.prototype.next=function(e){return this._invoke("next",e)},Yn.prototype.throw=function(e){return this._invoke("throw",e)},Yn.prototype.return=function(e){return this._invoke("return",e)};function Jn(){return(Jn=Gn(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Qn(t);case 1:return e.next=4,n.next();case 4:if(!e.sent.done){e.next=7;break}return e.abrupt("break",9);case 7:e.next=1;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qn(e){return er.apply(this,arguments)}function er(){return(er=Kn(j().mark((function e(t){var n,r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Wn(t),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function tr(e,t){return(0,(0,xn.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ir=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:An,hasPluginsActivated:Vn,NeedsRegistrationModal:Zn,stack:[],check:function(t){var n=this;return Gn(j().mark((function r(){var i,o,a;return j().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Wn(e),r.prev=1,a=j().mark((function e(){var r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.value,e.next=3,n["".concat(r)](t);case 3:i=e.sent,setTimeout((function(){n.stack.push(i.pass?i.allow:i.deny)}),0);case 5:case"end":return e.stop()}}),e)})),i.s();case 4:if((o=i.n()).done){r.next=8;break}return r.delegateYield(a(),"t0",6);case 6:r.next=4;break;case 8:r.next=13;break;case 10:r.prev=10,r.t1=r.catch(1),i.e(r.t1);case 13:return r.prev=13,i.f(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[1,10,13,16]])})))()},reset:function(){this.stack=[]}}}(["NeedsRegistrationModal","hasRequiredPlugins","hasPluginsActivated"]);function or(e){var t=e.template,n=(0,r.useRef)(null),i=g((function(e){return e.activeTemplateBlocks})),o=z((function(e){return e.canImport})),a=z((function(e){return e.apiKey})),s=b((function(e){return e.setOpen})),u=nr((0,r.useState)(!1),2),l=u[0],c=u[1],f=nr((0,r.useState)(!1),2),d=f[0],p=f[1],h=vn((function(e){return e.setWanted})),m=function(){(function(e){return Jn.apply(this,arguments)})(ir.stack).then((function(){setTimeout((function(){tr(i,t).then((function(){return s(!1)})).then((function(){return(0,r.render)((0,gt.jsx)(Cr,{}),document.getElementById("extendify-root"))}))}),100)}))};(0,r.useEffect)((function(){return ir.check(t).then((function(){return p(!0)})),function(){return ir.reset()&&p(!1)}}),[t]),(0,r.useEffect)((function(){!l&&n.current&&n.current.focus()}),[n,l,d]);return d&&Object.keys(i).length?a||o()?l?(0,gt.jsx)("button",{type:"button",disabled:!0,className:"components-button is-secondary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){},children:(0,xt.__)("Importing...","extendify-sdk")}):(0,gt.jsx)("button",{ref:n,type:"button",className:"components-button is-primary text-lg sm:text-2xl h-auto py-1.5 px-3 sm:py-2.5 sm:px-5",onClick:function(){return Ht(t),c(!0),h(t),void m()},children:(0,xt.sprintf)((0,xt.__)("Add %s","extendify-sdk"),t.fields.type)}):(0,gt.jsx)("a",{ref:n,className:"button-extendify-main text-lg sm:text-2xl py-1.5 px-3 sm:py-2.5 sm:px-5",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=single_page"),rel:"noreferrer",children:(0,xt.__)("Sign up now","extendify-sdk")}):""}function ar(e){var t=e.categories,n=e.styles,r=e.types,i=e.requiredPlugins;return(0,gt.jsxs)(gt.Fragment,{children:[t&&(0,gt.jsxs)("div",{className:"w-full pb-4",children:[(0,gt.jsx)("h3",{className:"text-sm m-0 mb-2",children:(0,xt.__)("Categories:","extendify-sdk")}),(0,gt.jsx)("div",{children:t.join(", ")})]}),n&&(0,gt.jsxs)("div",{className:"w-full py-4",children:[(0,gt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,xt.__)("Styles:","extendify-sdk")}),(0,gt.jsx)("div",{children:n.join(", ")})]}),r&&(0,gt.jsxs)("div",{className:"w-full py-4",children:[(0,gt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,xt.__)("Types:","extendify-sdk")}),(0,gt.jsx)("div",{children:r.join(", ")})]}),i.filter((function(e){return"editorplus"!==e})).length>0&&(0,gt.jsxs)("div",{className:"pt-4 w-full",children:[(0,gt.jsx)("h3",{className:"text-sm m-0 my-2",children:(0,xt.__)("Required Plugins:","extendify-sdk")}),(0,gt.jsx)("div",{children:i.filter((function(e){return"editorplus"!==e})).map((function(e){return En(e)})).join(", ")})]}),(0,gt.jsx)("div",{className:"py-4 mt-4",children:(0,gt.jsx)("a",{href:"https://extendify.com/what-happens-when-a-template-is-added?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sidebar"),rel:"noreferrer",target:"_blank",children:(0,xt.__)("What happens when a template is added?","extendify-sdk")})})]})}function sr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function ur(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return lr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var cr=new Map;function fr(e){var t,n,i,o,a,s,u,l=e.template,c=l.fields,f=c.tax_categories,d=c.required_plugins,p=c.tax_style,h=c.tax_pattern_types,m=z((function(e){return e.apiKey})),v=ur((0,r.useState)([]),2),y=v[0],x=v[1],b=ur((0,r.useState)([]),2),w=b[0],k=b[1],_=function(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}})),e}(),S=g((function(e){return e.setActive})),E=function(e){x([]),k([]),requestAnimationFrame((function(){return S(e)}))},N=(0,r.useCallback)(function(){var e,t=(e=j().mark((function e(t,n){var r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="".concat(l.id,"|").concat(t,"|").concat(n),!cr.has(r)){e.next=3;break}return e.abrupt("return",cr.get(r));case 3:return e.next=5,Vt(l,t,n);case 5:return i=e.sent,cr.set(r,i),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){sr(o,r,i,a,s,"next",e)}function s(e){sr(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),[l]);return(0,r.useEffect)((function(){Bt(l)}),[l]),(0,r.useEffect)((function(){N("related","pattern").then((function(e){_.current&&x(e)}))}),[l,N,_]),(0,gt.jsxs)("div",{className:"flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px",children:[(0,gt.jsxs)("div",{className:"lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300",children:[(0,gt.jsxs)("div",{className:"text-left m-0 h-full px-6 sm:p-0",children:[(0,gt.jsx)("h1",{className:"leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal",children:l.fields.display_title}),(0,gt.jsx)(kt.ExternalLink,{href:l.fields.url,children:(0,xt.__)("Demo","extendify-sdk")})]}),(0,gt.jsx)("div",{className:St()({"inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3":!0,"top-16 mt-5":!m.length,"top-0":m.length>0}),children:(0,gt.jsx)(or,{template:l})})]}),(0,gt.jsx)("div",{className:"max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46",children:(0,gt.jsx)("img",{className:"max-w-full w-full block",src:null!==(t=null==l||null===(n=l.fields)||void 0===n||null===(i=n.screenshot[0])||void 0===i||null===(o=i.thumbnails)||void 0===o||null===(a=o.full)||void 0===a?void 0:a.url)&&void 0!==t?t:null==l||null===(s=l.fields)||void 0===s||null===(u=s.screenshot[0])||void 0===u?void 0:u.url})}),(0,gt.jsxs)("div",{className:"divide-y p-6 sm:p-0 mb-16",children:[y.length>0&&(0,gt.jsxs)("section",{className:"mb-4",children:[(0,gt.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,xt.__)("Related","extendify-sdk")}),(0,gt.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:y.map((function(e){var t,n,r,i,o,a,s;return(0,gt.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return E(e)},children:(0,gt.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(a=e.fields)||void 0===a||null===(s=a.screenshot[0])||void 0===s?void 0:s.url})},e.id)}))})]}),w.length>0&&(0,gt.jsxs)("section",{className:"mb-4 pt-6",children:[(0,gt.jsx)("h4",{className:"text-lg m-0 mb-4 text-left font-semibold",children:(0,xt.__)("Alternatives","extendify-sdk")}),(0,gt.jsx)("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 gap-6",children:w.map((function(e){var t,n,r,i,o,a,s;return(0,gt.jsx)("button",{type:"button",className:"min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer",onClick:function(){return E(e)},children:(0,gt.jsx)("img",{className:"max-w-full block p-0 m-0 object-cover",src:null!==(t=null==e||null===(n=e.fields)||void 0===n||null===(r=n.screenshot[0])||void 0===r||null===(i=r.thumbnails)||void 0===i||null===(o=i.large)||void 0===o?void 0:o.url)&&void 0!==t?t:null==e||null===(a=e.fields)||void 0===a||null===(s=a.screenshot[0])||void 0===s?void 0:s.url})},e.id)}))})]})]}),(0,gt.jsx)("div",{className:"text-xs text-left p-6 w-full block sm:hidden divide-y",children:(0,gt.jsx)(ar,{categories:f,types:h,requiredPlugins:d,styles:p})})]})}function dr(){return 0===z((function(e){return e.apiKey})).length?(0,gt.jsx)("button",{className:"components-button",onClick:function(){return b.setState({currentPage:"login"})},children:(0,xt.__)("Log into account","extendify-sdk")}):(0,gt.jsx)("button",{className:"components-button",onClick:function(){return z.setState({apiKey:""})},children:(0,xt.__)("Log out","extendify-sdk")})}function pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mr(e){var t=e.children,n=z((function(e){return e.apiKey})),i=pr((0,r.useState)(!1),2),o=i[0],a=i[1];return(0,r.useEffect)((function(){a(!n.length||window.location.search.indexOf("DEVMODE")>-1)}),[n]),(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsxs)("aside",{className:"flex-shrink-0 sm:pl-12 py-0 sm:py-6 relative",children:[(0,gt.jsx)("div",{className:"sm:w-56 lg:w-72 sticky flex flex-col lg:h-full",children:t[0]}),(0,gt.jsx)("div",{className:"hidden sm:flex flex-col absolute bottom-0 bg-white p-4 w-72 text-left space-y-4",children:o&&(0,gt.jsx)("div",{className:"border-t border-gray-300",children:(0,gt.jsx)(dr,{})})})]}),(0,gt.jsx)("main",{id:"extendify-templates",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function vr(){var e=g((function(e){return e.updateSearchParams})),t=g((function(e){return e.searchParams})),n=function(t){return e({type:t})};return(0,gt.jsxs)("div",{className:"text-left w-full bg-white px-6 sm:px-0 pb-4 sm:pb-6 mt-px border-b sm:border-0",children:[(0,gt.jsx)("h4",{className:"sr-only",children:(0,xt.__)("Type select","extendify-sdk")}),(0,gt.jsxs)("button",{type:"button",className:St()({"cursor-pointer p-3.5 space-x-2 inline-flex items-center border border-black button-focus":!0,"bg-gray-900 text-white":"pattern"===t.type,"bg-transparent text-black":"pattern"!==t.type}),onClick:function(){return n("pattern")},children:[(0,gt.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M1 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H1C0.45 7 0 7.45 0 8V12C0 12.55 0.45 13 1 13ZM0 1V5C0 5.55 0.45 6 1 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H1C0.45 0 0 0.45 0 1Z"})}),(0,gt.jsx)("span",{className:"",children:(0,xt.__)("Patterns","extendify-sdk")})]}),(0,gt.jsxs)("button",{type:"button",className:St()({"cursor-pointer p-3.5 px-4 space-x-2 inline-flex items-center border border-black focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none -ml-px":!0,"bg-gray-900 text-white":"template"===t.type,"bg-transparent text-black":"template"!==t.type}),onClick:function(){return n("template")},children:[(0,gt.jsx)("svg",{width:"17",height:"13",viewBox:"0 0 17 13",className:"fill-current",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M7 13H10C10.55 13 11 12.55 11 12V8C11 7.45 10.55 7 10 7H7C6.45 7 6 7.45 6 8V12C6 12.55 6.45 13 7 13ZM1 13H4C4.55 13 5 12.55 5 12V1C5 0.45 4.55 0 4 0H1C0.45 0 0 0.45 0 1V12C0 12.55 0.45 13 1 13ZM13 13H16C16.55 13 17 12.55 17 12V8C17 7.45 16.55 7 16 7H13C12.45 7 12 7.45 12 8V12C12 12.55 12.45 13 13 13ZM6 1V5C6 5.55 6.45 6 7 6H16C16.55 6 17 5.55 17 5V1C17 0.45 16.55 0 16 0H7C6.45 0 6 0.45 6 1Z"})}),(0,gt.jsx)("span",{className:"",children:(0,xt.__)("Page templates","extendify-sdk")})]})]})}function yr(e){var t=e.template,n=g((function(e){return e.setActive})),r=t.fields,i=r.tax_categories,o=r.required_plugins,a=r.tax_style,s=r.tax_pattern_types,u=z((function(e){return e.apiKey}));return(0,gt.jsxs)("div",{className:"flex flex-col items-start justify-start",children:[!u.length&&(0,gt.jsxs)("div",{className:"h-full flex sm:hidden w-full p-4 justify-between border items-center border-gray-300 bg-extendify-lightest",children:[(0,gt.jsx)("a",{className:"button-extendify-main",target:"_blank",href:"https://extendify.com/pricing?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=sign_up&utm_content=main"),rel:"noreferrer",children:(0,xt.__)("Sign up today to get unlimited access","extendify-sdk")}),(0,gt.jsx)("button",{className:"components-button",onClick:function(){return b.setState({currentPage:"login"})},children:(0,xt.__)("Log in","extendify-sdk")})]}),(0,gt.jsx)("div",{className:"p-6 sm:p-0",children:(0,gt.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return n({})},children:[(0,gt.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,gt.jsx)("span",{className:"ml-4",children:(0,xt.__)("Go back","extendify-sdk")})]})}),(0,gt.jsx)("div",{className:"text-left pt-14 divide-y w-full hidden sm:block",children:(0,gt.jsx)(ar,{categories:i,types:s,requiredPlugins:o,styles:a})})]})}function xr(){var e=g((function(e){return e.searchParams}));return(0,gt.jsx)("div",{className:"hidden sm:flex items-start flex-col lg:flex-row -mt-2 lg:-mx-2 mb-4 lg:divide-x-2 lg:leading-none",children:Object.entries(e.taxonomies).map((function(t){return"template"===e.type&&"tax_pattern_types"===t[0]||"template"===e.type&&"tax_features"===t[0]||"pattern"===e.type&&"tax_page_types"===t[0]?"":(0,gt.jsxs)("div",{className:"lg:px-2 text-left",children:[(0,gt.jsx)("span",{className:"font-bold",children:(n=t[0],n.replace("tax_","").replace(/_/g," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,gt.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function gr(e){var t=e.className,n=g((function(e){return e.templates})),r=g((function(e){return e.activeTemplate}));return(0,gt.jsxs)("div",{className:t,children:[(0,gt.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,xt.__)("Skip to content","extendify-sdk")}),(0,gt.jsxs)("div",{className:"sm:flex sm:space-x-12 relative bg-white mx-auto max-w-screen-4xl h-full",children:[!!Object.keys(r).length&&(0,gt.jsx)("div",{className:"absolute bg-white sm:flex inset-0 z-50 sm:space-x-12",children:(0,gt.jsxs)(mr,{children:[(0,gt.jsx)(yr,{template:r}),(0,gt.jsx)(fr,{template:r})]})}),(0,gt.jsxs)(mr,{children:[(0,gt.jsx)(Lt,{}),(0,gt.jsxs)(gt.Fragment,{children:[(0,gt.jsx)(vr,{}),(0,gt.jsx)(xr,{}),(0,gt.jsx)("div",{className:"relative h-full z-30 bg-white",children:(0,gt.jsx)("div",{className:"absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40",children:(0,gt.jsx)(rn,{templates:n})})})]})]})]})]})}function br(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function wr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kr(){var e=wr((0,r.useState)(z.getState().apiKey),2),t=e[0],n=e[1],i=wr((0,r.useState)(z.getState().email),2),o=i[0],a=i[1],s=wr((0,r.useState)(""),2),u=s[0],l=s[1],c=wr((0,r.useState)("info"),2),f=c[0],d=c[1],p=wr((0,r.useState)(""),2),h=p[0],m=p[1];(0,r.useEffect)((function(){return function(){return d("info")}}),[]);var v=function(){var e,n=(e=j().mark((function e(n){var r,i,a,s,u,c;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.preventDefault(),l(""),r=o.length?o:h,e.next=5,D(r,t);case 5:if(i=e.sent,a=i.token,s=i.error,u=i.exception,void 0===(c=i.message)){e.next=13;break}return d("error"),e.abrupt("return",l(c.length?c:"Error: Are you interacting with the wrong server?"));case 13:if(!s&&!u){e.next=16;break}return d("error"),e.abrupt("return",l(s.length?s:u));case 16:if(a&&"string"==typeof a){e.next=19;break}return d("error"),e.abrupt("return",l((0,xt.__)("Something went wrong","extendify-sdk")));case 19:return d("success"),l("Success!"),e.next=23,new Promise((function(e){return setTimeout(e,1500)}));case 23:z.setState({apiKey:a}),b.setState({currentPage:"content"});case 25:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){br(o,r,i,a,s,"next",e)}function s(e){br(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}();return(0,r.useEffect)((function(){o||I("user_email").then((function(e){return m(e)}))}),[o]),(0,gt.jsxs)("section",{className:"w-96 text-left md:-mt-32",children:[(0,gt.jsx)("h1",{className:"border-b border-gray-900 mb-12 pb-4",children:(0,xt.__)("Welcome","extendify-sdk")}),u&&(0,gt.jsx)("div",{className:St()({"border-b pb-6 mb-6 -mt-6":!0,"border-gray-900 text-gray-900":"info"===f,"border-wp-alert-red text-wp-alert-red":"error"===f,"border-extendify-main text-extendify-main":"success"===f}),children:u}),(0,gt.jsxs)("form",{onSubmit:v,className:" space-y-6",children:[(0,gt.jsxs)("div",{className:"flex items-center",children:[(0,gt.jsx)("label",{htmlFor:"extendifysdk-login-email",className:"w-32 font-bold",children:(0,xt.__)("Email:","extendify-sdk")}),(0,gt.jsx)("input",{id:"extendifysdk-login-email",name:"extendifysdk-login-email",type:"email",className:"border px-2 w-full",placeholder:"Email",value:o.length?o:h,onChange:function(e){return a(e.target.value)}})]}),(0,gt.jsxs)("div",{className:"flex items-center",children:[(0,gt.jsx)("label",{htmlFor:"extendifysdk-login-license",className:"w-32 font-bold",children:(0,xt.__)("License:","extendify-sdk")}),(0,gt.jsx)("input",{id:"extendifysdk-login-license",name:"extendifysdk-login-email",type:"text",className:"border px-2 w-full",placeholder:"License key",value:t,onChange:function(e){return n(e.target.value)}})]}),(0,gt.jsx)("div",{className:"flex justify-end",children:(0,gt.jsx)("button",{type:"submit",className:"button-extendify-main p-3 px-4",children:(0,xt.__)("Sign in","extendify-sdk")})})]})]})}function _r(e){var t=e.className;return(0,gt.jsxs)("div",{className:t,children:[(0,gt.jsx)("a",{href:"#extendify-templates",className:"sr-only focus:not-sr-only focus:text-blue-500",children:(0,xt.__)("Skip to content","extendify-sdk")}),(0,gt.jsx)("div",{className:"flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,gt.jsxs)("div",{className:"absolute flex inset-0 items-center justify-center z-20 sm:space-x-12",children:[(0,gt.jsx)("div",{className:"pl-12 py-6 absolute top-0 left-0",children:(0,gt.jsxs)("button",{type:"button",className:"cursor-pointer text-black bg-transparent font-medium flex items-center p-3 transform -translate-x-3 button-focus",onClick:function(){return b.setState({currentPage:"content"})},children:[(0,gt.jsx)("svg",{className:"fill-current",width:"8",height:"12",viewBox:"0 0 8 12",xmlns:"http://www.w3.org/2000/svg",children:(0,gt.jsx)("path",{d:"M6.70998 9.88047L2.82998 6.00047L6.70998 2.12047C7.09998 1.73047 7.09998 1.10047 6.70998 0.710469C6.31998 0.320469 5.68998 0.320469 5.29998 0.710469L0.70998 5.30047C0.31998 5.69047 0.31998 6.32047 0.70998 6.71047L5.29998 11.3005C5.68998 11.6905 6.31998 11.6905 6.70998 11.3005C7.08998 10.9105 7.09998 10.2705 6.70998 9.88047Z"})}),(0,gt.jsx)("span",{className:"ml-4",children:(0,xt.__)("Go back","extendify-sdk")})]})}),(0,gt.jsx)("div",{className:"flex justify-center",children:(0,gt.jsx)(kr,{})})]})})]})}var Sr=function(){return F.get("meta-data")},Er=function(e){return F.post("simple-ping",{action:e})};function Nr(e){var t=e.className,n=g((function(e){return e.updateSearchParams})),i=function(e){Er("welcome-".concat(null!=e?e:"closed")),e&&n({type:e}),z.setState({hasClickedThroughWelcomePage:!0}),b.setState({currentPage:"content"})};return(0,r.useEffect)((function(){Er("welcome-opened")}),[]),(0,gt.jsxs)("div",{className:t,children:[(0,gt.jsx)("div",{className:"w-full h-16 relative z-10 border-solid border-0 flex-shrink-0",children:(0,gt.jsxs)("div",{className:"flex justify-between items-center px-6 sm:px-12 h-full",children:[(0,gt.jsx)("div",{className:"flex space-x-12 h-full"}),(0,gt.jsx)("div",{className:"space-x-2 transform sm:translate-x-8",children:(0,gt.jsxs)("button",{type:"button",className:"components-button has-icon",onClick:function(){return i()},children:[(0,gt.jsx)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",size:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,gt.jsx)("path",{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})}),(0,gt.jsx)("span",{className:"sr-only",children:(0,xt.__)("Close library","extendify-sdk")})]})})]})}),(0,gt.jsx)("section",{className:"w-full lg:w-auto lg:flex sm:space-x-12 relative mx-auto max-w-screen-4xl h-full",children:(0,gt.jsx)("div",{className:"flex items-center justify-center",children:(0,gt.jsx)("div",{className:"-mt-16 h-screen lg:h-auto lg:p-8 w-full",children:(0,gt.jsxs)("div",{className:"bg-white overflow-y-auto h-screen lg:h-auto lg:flex pt-20 p-8 sm:p-16 space-y-16 lg:space-y-0 lg:space-x-8 xl:space-x-16 max-w-screen-xl lg:border border-gray-300",children:[(0,gt.jsxs)("div",{className:"flex-grow flex items-center space-y-4 md:space-y-0 md:space-x-4 xl:space-x-8 flex-col md:flex-row",children:[(0,gt.jsx)("div",{className:"flex-1 lg:w-1/2 w-full flex items-center max-w-xs h-full max-h-60",children:(0,gt.jsxs)("button",{onClick:function(){return i("pattern")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex w-full space-y-4 flex-col items-center justify-center p-8 lg:px-0",children:[(0,gt.jsx)("h3",{className:"m-0 text-gray-900",children:(0,xt.__)("Sections","extendify-sdk")}),(0,gt.jsx)("span",{children:(0,gt.jsxs)("svg",{className:"mt-1",xmlns:"http://www.w3.org/2000/svg",width:"206",height:"122",viewBox:"0 0 206 122",fill:"none",children:[(0,gt.jsx)("path",{d:"M69 0H0V59H69V0Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M204 0H79V60H204V0Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M62.166 25H9.16602V28H62.166V25Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M63.166 18H10.166V21H63.166V18Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M62.166 34H9.16602V39H62.166V34Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M62.166 43H9.16602V48H62.166V43Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M140.166 25H87.166V28H140.166V25Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M140.166 34H87.166V39H140.166V34Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M140.166 43H87.166V48H140.166V43Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M197.166 25H151.166V28H197.166V25Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M141.166 17H88.166V20H141.166V17Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M198.166 17H152.166V20H198.166V17Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M62.166 10H9.16602V13H62.166V10Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M140.166 9H87.166V12H140.166V9Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M197.166 9H151.166V12H197.166V9Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M197.166 34H151.166V39H197.166V34Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M197.166 43H151.166V48H197.166V43Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M154.172 77.8088H0V121.216H154.172V77.8088Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M133.637 110.446C141.077 110.446 147.109 104.75 147.109 97.7229C147.109 90.6963 141.077 85 133.637 85C126.197 85 120.166 90.6963 120.166 97.7229C120.166 104.75 126.197 110.446 133.637 110.446Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M205.166 78H162.166V121H205.166V78Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M183.803 111.637C191.243 111.637 197.275 105.941 197.275 98.9141C197.275 91.8874 191.243 86.1912 183.803 86.1912C176.363 86.1912 170.332 91.8874 170.332 98.9141C170.332 105.941 176.363 111.637 183.803 111.637Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M113.695 88.7898H13.4082V100.764H113.695V88.7898Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M113.695 105.255H13.4082V109.745H113.695V105.255Z",fill:"#F9F9F9"})]})}),(0,gt.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,xt.__)("View patterns","extendify-sdk")})]})}),(0,gt.jsx)("div",{className:"flex-1 lg:w-1/2 w-full flex items-center max-w-xs h-full max-h-60",children:(0,gt.jsxs)("button",{onClick:function(){return i("template")},className:"bg-white hover:bg-gray-50 cursor-pointer border border-gray-300 flex w-full space-y-4 flex-col items-center justify-center p-8 lg:px-0",children:[(0,gt.jsx)("h3",{className:"m-0 text-gray-900",children:(0,xt.__)("Full pages","extendify-sdk")}),(0,gt.jsx)("span",{children:(0,gt.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"156",height:"128",viewBox:"0 0 156 128",fill:"none",children:[(0,gt.jsx)("path",{d:"M155.006 38.4395H0.833984V81.8471H155.006V38.4395Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M155 0H1V36H155V0Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M148 7H10V28H148V7Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M147.521 47.4204H9.81445V50.414H147.521V47.4204Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M147.521 56.4012H9.81445V60.8917H147.521V56.4012Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M147.521 65.3821H9.81445V69.8726H147.521V65.3821Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M155.006 83.8089H0.833984V127.217H155.006V83.8089Z",fill:"#DFDFDF"}),(0,gt.jsx)("path",{d:"M21.7897 118.236C29.2297 118.236 35.261 112.539 35.261 105.513C35.261 98.486 29.2297 92.7898 21.7897 92.7898C14.3497 92.7898 8.31836 98.486 8.31836 105.513C8.31836 112.539 14.3497 118.236 21.7897 118.236Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M144.529 92.7898H44.2422V104.764H144.529V92.7898Z",fill:"#F9F9F9"}),(0,gt.jsx)("path",{d:"M144.529 109.255H44.2422V113.745H144.529V109.255Z",fill:"#F9F9F9"})]})}),(0,gt.jsx)("span",{className:"text-extendify-bright underline text-base font-bold",children:(0,xt.__)("View templates","extendify-sdk")})]})})]}),(0,gt.jsx)("div",{className:"lg:w-2/5 text-left",children:(0,gt.jsxs)("div",{className:"max-w-lg lg:max-w-none",children:[(0,gt.jsx)("h1",{className:"m-0 pb-4 mb-6 border-b border-gray-900 font-medium text-2xl",children:(0,xt.__)("Welcome to Extendify","extendify-sdk")}),(0,gt.jsxs)("div",{className:"mb-12",children:[(0,gt.jsx)("p",{children:(0,xt.__)("Congratulations! You have access to our entire library of Gutenberg patterns and templates. You can add up to 3 templates or patterns to your site completely free.","extendify-sdk")}),(0,gt.jsx)("p",{children:(0,xt.__)("All patterns and templates are pre-designed to look beautiful with options to fit your style. They also keep your site running lightning fast by using only core blocks with no 3rd party page builder required.","extendify-sdk")}),(0,gt.jsx)("a",{className:"text-sm text-extendify-link underline",href:"https://extendify.com?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,xt.__)("Learn more about Extendify","extendify-sdk")})]}),(0,gt.jsx)("h2",{className:"text-base pb-2 mb-4 border-b border-gray-900",children:(0,xt.__)("Don't want the library in your editor?","extendify-sdk")}),(0,gt.jsxs)("div",{className:"text-xs",children:[(0,gt.jsx)("p",{children:(0,xt.sprintf)((0,xt.__)("Extendify was included with the %s plugin.","extendify-sdk"),window.extendifySdkData.source)}),(0,gt.jsx)("a",{className:"text-xs text-extendify-link underline",href:"https://extendify.com/how-to-disable-the-extendify-library/?utm_source=".concat(window.extendifySdkData.source,"&utm_medium=library&utm_campaign=welcome"),target:"_blank",rel:"noreferrer",children:(0,xt.__)("Learn how to remove the library","extendify-sdk")})]})]})})]})})})})]})}function Or(){var e,t,n,i=(0,r.useRef)(null),o=b((function(e){return e.open})),a=b((function(e){return e.metaData})),s=b((function(e){return e.setOpen})),u=b((function(e){return e.currentPage})),l=z((function(e){return e.hasClickedThroughWelcomePage}));return e=o,t=function(){var e=document.getElementById("beacon-container");e&&(e.style.position="relative",e.style.zIndex=Number.MAX_SAFE_INTEGER,e.style.display="block")},n=function(){var e=document.getElementById("beacon-container");e&&(e.style.display="none",window.Beacon("close"))},(0,r.useEffect)((function(){if(e)return window.Beacon?(t(),function(){return n()}):(function(e,t,n){function r(){var e,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.async=!0,r.src="https://beacon-v2.helpscout.net",null===(e=n.parentNode)||void 0===e||e.insertBefore(r,n)}if(e.Beacon=n=function(t,n,r){e.Beacon.readyQueue.push({method:t,options:n,data:r})},n.readyQueue=[],"complete"===t.readyState)return r();e.attachEvent?e.attachEvent("onload",r):e.addEventListener("load",r,!1)}(window,document,window.Beacon||function(){}),window.Beacon("init","2b8c11c0-5afc-4cb9-bee0-a5cb76b2fc91"),window.Beacon("on","ready",t),function(){window.Beacon("off","ready",t),n()})}),[e]),(0,r.useEffect)((function(){l&&b.setState({currentPage:"content"})}),[l]),(0,r.useEffect)((function(){o&&!Object.keys(a).length&&Sr().then((function(e){return b.setState({metaData:e})}))}),[o,a]),(0,gt.jsx)(Pe.Root,{show:o,as:r.Fragment,children:(0,gt.jsx)(yt,{as:"div",static:!0,className:"extendify-sdk",initialFocus:i,onClose:function(){},children:(0,gt.jsx)("div",{className:"h-screen w-screen sm:h-auto sm:w-auto fixed z-high inset-0 overflow-y-auto",children:(0,gt.jsxs)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,gt.jsx)(Pe.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,gt.jsx)(yt.Overlay,{className:"fixed inset-0 bg-black bg-opacity-30 transition-opacity"})}),(0,gt.jsx)(Pe.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,gt.jsx)("div",{ref:i,tabIndex:"0",className:"fixed lg:absolute inset-0 lg:overflow-hidden transform transition-all lg:p-5",children:"welcome"===u?(0,gt.jsx)(Nr,{className:"w-full h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto bg-extendify-light"}):(0,gt.jsxs)("div",{className:"bg-white h-full flex flex-col items-center relative shadow-xl max-w-screen-4xl mx-auto",children:[(0,gt.jsx)(bt,{className:"w-full h-16 border-solid border-0 border-b border-gray-300 flex-shrink-0",hideLibrary:function(){return s(!1)}}),"content"===u&&(0,gt.jsx)(gr,{className:"w-full flex-grow overflow-hidden"}),"login"===u&&(0,gt.jsx)(_r,{className:"w-full flex-grow overflow-hidden bg-extendify-light"})]})})})]})})})})}function Cr(e){var t=e.show,n=void 0!==t&&t,i=b((function(e){return e.setOpen})),o=(0,r.useCallback)((function(){return i(!0)}),[i]),a=(0,r.useCallback)((function(){i(!1)}),[i]);return(0,r.useEffect)((function(){n&&i(!0)}),[n,i]),(0,r.useEffect)((function(){return window.localStorage.getItem("etfy_library__key")&&z.setState({apiKey:"any-key-will-work-during-beta"}),function(){return window.localStorage.removeItem("etfy_library__key")}}),[]),(0,r.useEffect)((function(){return window.addEventListener("extendify-sdk::open-library",o),window.addEventListener("extendify-sdk::close-library",a),function(){window.removeEventListener("extendify-sdk::open-library",o),window.removeEventListener("extendify-sdk::close-library",a)}}),[a,o]),(0,gt.jsx)(Or,{})}const Ar=wp.plugins,Pr=wp.editPost;function Fr(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function Tr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Fr(o,r,i,a,s,"next",e)}function s(e){Fr(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Lr=function(e){var t,n;Sn(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},Ir=function(){var e,t,n;return null===window.extendifySdkData.user||(null===(e=window.extendifySdkData)||void 0===e||null===(t=e.user)||void 0===t||null===(n=t.state)||void 0===n?void 0:n.enabled)},Dr=(0,gt.jsx)("div",{id:"extendify-templates-inserter",children:(0,gt.jsxs)("button",{style:"background:#D9F1EE;color:#1e1e1e;border:1px solid #949494;font-weight:bold;font-size:14px;padding:8px;margin-right:8px",type:"button","data-extendify-identifier":"main-button",id:"extendify-templates-inserter-btn",className:"components-button",children:[(0,gt.jsxs)("svg",{style:"margin-right:0.5rem",width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,gt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,gt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]}),(0,xt.__)("Library","extendify-sdk")]})});window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){Ir()&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Dr)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Lr)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(Ir()&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var e=(0,gt.jsx)("div",{children:(0,gt.jsx)("button",{id:"extendify-cta-button",style:"margin:1rem 1rem 0","data-extendify-identifier":"patterns-cta",className:"components-button is-secondary",children:(0,xt.__)("Discover more patterns in Extendify Library","extendify-sdk")})});document.querySelector("[id$=patterns-view]").insertAdjacentHTML("afterbegin",(0,r.renderToString)(e)),document.getElementById("extendify-cta-button").addEventListener("click",Lr)}}),0)}));window._wpLoadBlockEditor&&Ir()&&(0,Ar.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return(0,gt.jsx)(Pr.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:Lr,icon:(0,gt.jsx)("span",{className:"components-menu-items__item-icon",children:(0,gt.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 103 103",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,gt.jsx)("rect",{y:"25.75",width:"70.8125",height:"77.25",fill:"#000000"}),(0,gt.jsx)("rect",{x:"45.0625",width:"57.9375",height:"57.9375",fill:"#37C2A2"})]})}),children:(0,xt.__)("Library","extendify-sdk")})}});window._wpLoadBlockEditor&&(0,Ar.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,gt.jsx)(Pr.PluginSidebarMoreMenuItem,{onClick:Tr(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return t=e.sent,(t=JSON.parse(t)).state.enabled=!Ir(),e.next=7,R(JSON.stringify(Object.assign({},t)));case 7:location.reload();case 8:case"end":return e.stop()}}),e)}))),icon:(0,gt.jsx)(gt.Fragment,{}),children:Ir()?(0,xt.__)("Disable Extendify","extendify-sdk"):(0,xt.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,xn.dispatch)("core/notices").createNotice,t=z.getState().incrementImports;window.addEventListener("extendify-sdk::template-inserted",(function(n){e("info",(0,xt.__)("Template Added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var e;t(),Ut(null===(e=n.detail)||void 0===e?void 0:e.template)}),0)}))}},{register:function(){var e=this;window.addEventListener("extendify-sdk::softerror-encountered",(function(t){e[(0,wt.camelCase)(t.detail.type)](t.detail)}))},versionOutdated:function(e){(0,r.render)((0,gt.jsx)(On,{title:e.data.title,message:e.data.message,buttonLabel:e.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(e){return e.register()})),window._wpLoadBlockEditor&&window.wp.domReady((function(){var e=document.createElement("div");if(e.id="extendify-root",document.body.append(e),(0,r.render)((0,gt.jsx)(Cr,{}),e),vn.getState().importOnLoad){var t=vn.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");tr(p((0,window.wp.blocks.parse)((0,wt.get)(e,"fields.code"))),e)}(t)}),0)}vn.setState({importOnLoad:!1,wantedTemplate:{}})}))},42:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var a=i.apply(null,n);a&&e.push(a)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},716:()=>{},525:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,u=i(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))n.call(a,c)&&(u[c]=a[c]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},61:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,u=[],l=!1,c=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=a(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},426:(e,t,n)=>{"use strict";n(525);var r=n(804),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,o={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:o,_owner:a.current}}t.jsx=l,t.jsxs=l},246:(e,t,n)=>{"use strict";e.exports=n(426)},248:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new O(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?h:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",m={};function v(){}function y(){}function x(){}var g={};g[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&r.call(w,o)&&(g=w);var j=x.prototype=v.prototype=Object.create(g);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,o,a,s){var u=c(e[i],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:t,done:!0}}return y.prototype=j.constructor=x,x.constructor=y,y.displayName=u(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,u(e,s,"GeneratorFunction")),e.prototype=Object.create(j),e},e.awrap=function(e){return{__await:e}},k(_.prototype),_.prototype[a]=function(){return this},e.AsyncIterator=_,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new _(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(j),u(j,s,"Generator"),j[o]=function(){return this},j.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:C(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},804:e=>{"use strict";e.exports=React}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,i,o)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,i,o]=e[l],s=!0,u=0;u<n.length;u++)(!1&o||a>=o)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(s=!1,o<a&&(a=o));s&&(e.splice(l--,1),t=i())}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,i,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={172:0,106:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,o,[a,s,u]=n,l=0;for(i in s)r.o(s,i)&&(r.m[i]=s[i]);if(u)var c=u(r);for(t&&t(n);l<a.length;l++)o=a[l],r.o(e,o)&&e[o]&&e[o][0](),e[a[l]]=0;return r.O(c)},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[106],(()=>r(491)));var i=r.O(void 0,[106],(()=>r(716)));i=r.O(i)})();
|
extendify-sdk/readme.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
-
Stable tag: 6.
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
1 |
=== Extendify Sdk ===
|
2 |
Requires at least: 5.4
|
3 |
+
Stable tag: 6.5
|
4 |
Requires PHP: 5.6
|
5 |
Tested up to: 5.7.0
|
extendify-sdk/routes/api.php
CHANGED
@@ -9,6 +9,7 @@ if (!defined('ABSPATH')) {
|
|
9 |
|
10 |
use Extendify\ExtendifySdk\ApiRouter;
|
11 |
use Extendify\ExtendifySdk\Controllers\AuthController;
|
|
|
12 |
use Extendify\ExtendifySdk\Controllers\PingController;
|
13 |
use Extendify\ExtendifySdk\Controllers\UserController;
|
14 |
use Extendify\ExtendifySdk\Controllers\PluginController;
|
@@ -26,14 +27,17 @@ use Extendify\ExtendifySdk\Controllers\TemplateController;
|
|
26 |
|
27 |
ApiRouter::post('/templates', [TemplateController::class, 'index']);
|
28 |
ApiRouter::post('/templates/(?P<template_id>[a-zA-Z0-9-]+)', [TemplateController::class, 'ping']);
|
|
|
29 |
|
30 |
ApiRouter::get('/user', [UserController::class, 'show']);
|
31 |
ApiRouter::post('/user', [UserController::class, 'store']);
|
32 |
ApiRouter::get('/user-meta', [UserController::class, 'meta']);
|
|
|
33 |
|
34 |
ApiRouter::post('/register', [AuthController::class, 'register']);
|
35 |
ApiRouter::post('/login', [AuthController::class, 'login']);
|
36 |
|
|
|
37 |
ApiRouter::post('/simple-ping', [PingController::class, 'ping']);
|
38 |
}
|
39 |
);
|
9 |
|
10 |
use Extendify\ExtendifySdk\ApiRouter;
|
11 |
use Extendify\ExtendifySdk\Controllers\AuthController;
|
12 |
+
use Extendify\ExtendifySdk\Controllers\MetaController;
|
13 |
use Extendify\ExtendifySdk\Controllers\PingController;
|
14 |
use Extendify\ExtendifySdk\Controllers\UserController;
|
15 |
use Extendify\ExtendifySdk\Controllers\PluginController;
|
27 |
|
28 |
ApiRouter::post('/templates', [TemplateController::class, 'index']);
|
29 |
ApiRouter::post('/templates/(?P<template_id>[a-zA-Z0-9-]+)', [TemplateController::class, 'ping']);
|
30 |
+
ApiRouter::post('/related', [TemplateController::class, 'related']);
|
31 |
|
32 |
ApiRouter::get('/user', [UserController::class, 'show']);
|
33 |
ApiRouter::post('/user', [UserController::class, 'store']);
|
34 |
ApiRouter::get('/user-meta', [UserController::class, 'meta']);
|
35 |
+
ApiRouter::post('/register-mailing-list', [UserController::class, 'mailingList']);
|
36 |
|
37 |
ApiRouter::post('/register', [AuthController::class, 'register']);
|
38 |
ApiRouter::post('/login', [AuthController::class, 'login']);
|
39 |
|
40 |
+
ApiRouter::get('/meta-data', [MetaController::class, 'getAll']);
|
41 |
ApiRouter::post('/simple-ping', [PingController::class, 'ping']);
|
42 |
}
|
43 |
);
|
extendify-sdk/src/api/{SimplePing.js → General.js}
RENAMED
@@ -1,7 +1,10 @@
|
|
1 |
import { Axios as api } from './axios'
|
2 |
|
3 |
-
export const
|
4 |
-
|
|
|
|
|
|
|
5 |
return api.post('simple-ping', {
|
6 |
action,
|
7 |
})
|
1 |
import { Axios as api } from './axios'
|
2 |
|
3 |
+
export const General = {
|
4 |
+
metaData() {
|
5 |
+
return api.get('meta-data')
|
6 |
+
},
|
7 |
+
ping(action) {
|
8 |
return api.post('simple-ping', {
|
9 |
action,
|
10 |
})
|
extendify-sdk/src/api/Templates.js
CHANGED
@@ -37,6 +37,21 @@ export const Templates = {
|
|
37 |
})
|
38 |
return templates
|
39 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
// TODO: Refactor this later to combine the following three
|
41 |
maybeImport(template) {
|
42 |
return api.post(`templates/${template.id}`, {
|
37 |
})
|
38 |
return templates
|
39 |
},
|
40 |
+
related(
|
41 |
+
template, queryType, wantedType,
|
42 |
+
) {
|
43 |
+
return api.post('related', {
|
44 |
+
pageSize: 4,
|
45 |
+
query_type: queryType,
|
46 |
+
wanted_type: wantedType,
|
47 |
+
categories: template?.fields?.tax_categories,
|
48 |
+
pattern_types: template?.fields?.tax_pattern_types,
|
49 |
+
style: template?.fields?.tax_style,
|
50 |
+
type: template?.fields?.type,
|
51 |
+
template_id: template?.id,
|
52 |
+
})
|
53 |
+
},
|
54 |
+
|
55 |
// TODO: Refactor this later to combine the following three
|
56 |
maybeImport(template) {
|
57 |
return api.post(`templates/${template.id}`, {
|
extendify-sdk/src/api/User.js
CHANGED
@@ -45,4 +45,15 @@ export const User = {
|
|
45 |
},
|
46 |
)
|
47 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
45 |
},
|
46 |
)
|
47 |
},
|
48 |
+
registerMailingList(email) {
|
49 |
+
const formData = new FormData()
|
50 |
+
formData.append('email', email)
|
51 |
+
return api.post(
|
52 |
+
'register-mailing-list', formData, {
|
53 |
+
headers: {
|
54 |
+
'Content-Type': 'multipart/form-data',
|
55 |
+
},
|
56 |
+
},
|
57 |
+
)
|
58 |
+
},
|
59 |
}
|
extendify-sdk/src/app.css
CHANGED
@@ -10,9 +10,13 @@
|
|
10 |
.extendify-sdk .button-focus {
|
11 |
@apply focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none;
|
12 |
}
|
|
|
|
|
|
|
|
|
13 |
|
14 |
.button-extendify-main {
|
15 |
-
@apply bg-extendify-main cursor-pointer transition duration-200 p-1.5 px-3 text-white hover:text-white no-underline hover:bg-gray-900
|
16 |
}
|
17 |
#extendify-search-input:focus ~ svg,
|
18 |
#extendify-search-input:not(:placeholder-shown) ~ svg {
|
@@ -28,3 +32,18 @@
|
|
28 |
border-bottom: 1px solid #e0e0e0 !important;
|
29 |
@apply bg-transparent;
|
30 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
.extendify-sdk .button-focus {
|
11 |
@apply focus:ring-2 focus:ring-wp-theme-500 ring-offset-1 outline-none;
|
12 |
}
|
13 |
+
.extendify-sdk select.button-focus,
|
14 |
+
.extendify-sdk input.button-focus {
|
15 |
+
@apply focus:border-transparent focus:outline-none;
|
16 |
+
}
|
17 |
|
18 |
.button-extendify-main {
|
19 |
+
@apply bg-extendify-main button-focus cursor-pointer transition duration-200 p-1.5 px-3 text-white hover:text-white no-underline hover:bg-gray-900 active:bg-gray-900 active:text-white focus:text-white whitespace-nowrap;
|
20 |
}
|
21 |
#extendify-search-input:focus ~ svg,
|
22 |
#extendify-search-input:not(:placeholder-shown) ~ svg {
|
32 |
border-bottom: 1px solid #e0e0e0 !important;
|
33 |
@apply bg-transparent;
|
34 |
}
|
35 |
+
.extendify-sdk .components-modal__header {
|
36 |
+
@apply border-b border-gray-300;
|
37 |
+
}
|
38 |
+
|
39 |
+
/* Special input animation */
|
40 |
+
.extendify-special-input:placeholder-shown ~ label {
|
41 |
+
@apply top-1.5;
|
42 |
+
@apply text-sm;
|
43 |
+
@apply text-gray-600;
|
44 |
+
}
|
45 |
+
.extendify-special-input:focus ~ label {
|
46 |
+
@apply -top-3;
|
47 |
+
@apply text-xs;
|
48 |
+
@apply text-wp-theme-500;
|
49 |
+
}
|
extendify-sdk/src/components/ImportButton.js
CHANGED
@@ -9,8 +9,10 @@ import { useUserStore } from '../state/User'
|
|
9 |
import { useGlobalStore } from '../state/GlobalState'
|
10 |
import { __, sprintf } from '@wordpress/i18n'
|
11 |
import { Templates as TemplatesApi } from '../api/Templates'
|
|
|
|
|
12 |
|
13 |
-
const canImportMiddleware = Middleware(['hasRequiredPlugins', 'hasPluginsActivated'])
|
14 |
export function ImportButton({ template }) {
|
15 |
const importButtonRef = useRef(null)
|
16 |
const activeTemplateBlocks = useTemplatesStore(state => state.activeTemplateBlocks)
|
@@ -24,7 +26,9 @@ export function ImportButton({ template }) {
|
|
24 |
AuthorizationCheck(canImportMiddleware.stack).then(() => {
|
25 |
// Give it a bit of time for the importing state to render
|
26 |
setTimeout(() => {
|
27 |
-
injectTemplateBlocks(activeTemplateBlocks, template)
|
|
|
|
|
28 |
}, 100)
|
29 |
})
|
30 |
}
|
9 |
import { useGlobalStore } from '../state/GlobalState'
|
10 |
import { __, sprintf } from '@wordpress/i18n'
|
11 |
import { Templates as TemplatesApi } from '../api/Templates'
|
12 |
+
import { render } from '@wordpress/element'
|
13 |
+
import ExtendifyLibrary from '../layout/ExtendifyLibrary'
|
14 |
|
15 |
+
const canImportMiddleware = Middleware(['NeedsRegistrationModal', 'hasRequiredPlugins', 'hasPluginsActivated'])
|
16 |
export function ImportButton({ template }) {
|
17 |
const importButtonRef = useRef(null)
|
18 |
const activeTemplateBlocks = useTemplatesStore(state => state.activeTemplateBlocks)
|
26 |
AuthorizationCheck(canImportMiddleware.stack).then(() => {
|
27 |
// Give it a bit of time for the importing state to render
|
28 |
setTimeout(() => {
|
29 |
+
injectTemplateBlocks(activeTemplateBlocks, template)
|
30 |
+
.then(() => setOpen(false))
|
31 |
+
.then(() => render(<ExtendifyLibrary/>, document.getElementById('extendify-root')))
|
32 |
}, 100)
|
33 |
})
|
34 |
}
|
extendify-sdk/src/components/TemplatesSingle.js
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
import { ImportButton } from './ImportButton'
|
2 |
-
import { __ } from '@wordpress/i18n'
|
3 |
-
import classNames from 'classnames'
|
4 |
-
import { useUserStore } from '../state/User'
|
5 |
-
import { ExternalLink } from '@wordpress/components'
|
6 |
-
import { useEffect } from '@wordpress/element'
|
7 |
-
import { Templates as TemplatesApi } from '../api/Templates'
|
8 |
-
import TaxonomyList from '../components/TaxonomyList'
|
9 |
-
|
10 |
-
export default function Templates({ template }) {
|
11 |
-
const {
|
12 |
-
tax_categories: categories,
|
13 |
-
required_plugins: requiredPlugins,
|
14 |
-
tax_style: styles,
|
15 |
-
tax_pattern_types: types,
|
16 |
-
} = template.fields
|
17 |
-
const apiKey = useUserStore(state => state.apiKey)
|
18 |
-
|
19 |
-
useEffect(() => { TemplatesApi.single(template) }, [template])
|
20 |
-
|
21 |
-
return <div className="flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px">
|
22 |
-
<div className="flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl">
|
23 |
-
<div className="text-left m-0 h-full p-6 sm:p-0">
|
24 |
-
<h1 className="leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal">{template.fields.display_title}</h1>
|
25 |
-
<ExternalLink href={template.fields.url}>
|
26 |
-
{__('Demo', 'extendify-sdk')}
|
27 |
-
</ExternalLink>
|
28 |
-
</div>
|
29 |
-
<div className={classNames({
|
30 |
-
'inline-flex absolute sm:static sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3': true,
|
31 |
-
'top-16 mt-5': !apiKey.length,
|
32 |
-
'top-0': apiKey.length > 0,
|
33 |
-
})}>
|
34 |
-
<ImportButton template={template} />
|
35 |
-
</div>
|
36 |
-
</div>
|
37 |
-
<div className="max-w-screen-xl sm:w-full sm:m-0 sm:mb-12 m-6 border border-gray-300 m-46">
|
38 |
-
<img
|
39 |
-
className="max-w-full w-full block"
|
40 |
-
src={template?.fields?.screenshot[0]?.thumbnails?.full?.url ?? template?.fields?.screenshot[0]?.url}/>
|
41 |
-
</div>
|
42 |
-
{/* Hides on desktop and is repeated in the single sidebar too */}
|
43 |
-
<div className="text-xs text-left p-6 w-full block sm:hidden divide-y">
|
44 |
-
<TaxonomyList
|
45 |
-
categories={categories}
|
46 |
-
types={types}
|
47 |
-
requiredPlugins={requiredPlugins}
|
48 |
-
styles={styles}/>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extendify-sdk/src/hooks/helpers.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { useRef, useEffect } from '@wordpress/element'
|
2 |
+
|
3 |
+
export function useIsMounted() {
|
4 |
+
const isMounted = useRef(false)
|
5 |
+
|
6 |
+
useEffect(() => {
|
7 |
+
isMounted.current = true
|
8 |
+
return () => isMounted.current = false
|
9 |
+
})
|
10 |
+
return isMounted
|
11 |
+
}
|
extendify-sdk/src/hooks/useBeacon.js
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
import { useEffect } from '@wordpress/element'
|
2 |
|
3 |
export default function useBeacon(show) {
|
4 |
-
console.log({
|
5 |
-
show,
|
6 |
-
})
|
7 |
const showBeacon = () => {
|
8 |
const container = document.getElementById('beacon-container')
|
9 |
if (container) {
|
1 |
import { useEffect } from '@wordpress/element'
|
2 |
|
3 |
export default function useBeacon(show) {
|
|
|
|
|
|
|
4 |
const showBeacon = () => {
|
5 |
const container = document.getElementById('beacon-container')
|
6 |
if (container) {
|
extendify-sdk/src/layout/MainWindow.js
CHANGED
@@ -9,10 +9,12 @@ import Welcome from '../pages/Welcome'
|
|
9 |
import useBeacon from '../hooks/useBeacon'
|
10 |
import { useGlobalStore } from '../state/GlobalState'
|
11 |
import { useUserStore } from '../state/User'
|
|
|
12 |
|
13 |
export default function MainWindow() {
|
14 |
const containerRef = useRef(null)
|
15 |
const open = useGlobalStore(state => state.open)
|
|
|
16 |
const setOpen = useGlobalStore(state => state.setOpen)
|
17 |
const currentPage = useGlobalStore(state => state.currentPage)
|
18 |
const hasClickedThroughWelcomePage = useUserStore(state => state.hasClickedThroughWelcomePage)
|
@@ -24,6 +26,13 @@ export default function MainWindow() {
|
|
24 |
})
|
25 |
}, [hasClickedThroughWelcomePage])
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
return (
|
28 |
<Transition.Root show={open} as={Fragment}>
|
29 |
<Dialog
|
9 |
import useBeacon from '../hooks/useBeacon'
|
10 |
import { useGlobalStore } from '../state/GlobalState'
|
11 |
import { useUserStore } from '../state/User'
|
12 |
+
import { General as GeneralApi } from '../api/General'
|
13 |
|
14 |
export default function MainWindow() {
|
15 |
const containerRef = useRef(null)
|
16 |
const open = useGlobalStore(state => state.open)
|
17 |
+
const metaData = useGlobalStore(state => state.metaData)
|
18 |
const setOpen = useGlobalStore(state => state.setOpen)
|
19 |
const currentPage = useGlobalStore(state => state.currentPage)
|
20 |
const hasClickedThroughWelcomePage = useUserStore(state => state.hasClickedThroughWelcomePage)
|
26 |
})
|
27 |
}, [hasClickedThroughWelcomePage])
|
28 |
|
29 |
+
useEffect(() => {
|
30 |
+
if (!open || Object.keys(metaData).length) {
|
31 |
+
return
|
32 |
+
}
|
33 |
+
GeneralApi.metaData().then((data) => useGlobalStore.setState({ metaData: data }))
|
34 |
+
}, [open, metaData])
|
35 |
+
|
36 |
return (
|
37 |
<Transition.Root show={open} as={Fragment}>
|
38 |
<Dialog
|
extendify-sdk/src/layout/Toolbar.js
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
|
|
2 |
import { useUserStore } from '../state/User'
|
3 |
|
4 |
export default function Toolbar({ className, hideLibrary }) {
|
5 |
const remainingImports = useUserStore(state => state.remainingImports)
|
6 |
const apiKey = useUserStore(state => state.apiKey)
|
7 |
const allowedImports = useUserStore(state => state.allowedImports)
|
|
|
8 |
|
9 |
return <div className={className}>
|
10 |
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
@@ -20,31 +22,44 @@ export default function Toolbar({ className, hideLibrary }) {
|
|
20 |
</div>
|
21 |
{!apiKey.length && <>
|
22 |
<div className="items-center ml-8 h-full hidden md:flex">
|
23 |
-
<div className="
|
24 |
-
<a
|
25 |
-
className="button-extendify-main inline lg:hidden"
|
26 |
-
target="_blank"
|
27 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.source}&utm_medium=library&utm_campaign=sign_up&utm_content=main`}
|
28 |
-
rel="noreferrer">
|
29 |
-
{__('Sign up', 'extendify-sdk')}
|
30 |
-
</a>
|
31 |
-
<a
|
32 |
-
className="button-extendify-main hidden lg:block"
|
33 |
-
target="_blank"
|
34 |
-
href={`https://extendify.com/pricing?utm_source=${window.extendifySdkData.source}&utm_medium=library&utm_campaign=sign_up&utm_content=main`}
|
35 |
-
rel="noreferrer">
|
36 |
-
{__('Sign up today to get unlimited access', 'extendify-sdk')}
|
37 |
-
</a>
|
38 |
-
</div>
|
39 |
-
<div className="m-0 p-0 px-6 text-sm bg-gray-50 border-r border-gray-300 h-full flex items-center">
|
40 |
{sprintf(
|
41 |
__('Imports left: %s / %s'), remainingImports(), Number(allowedImports),
|
42 |
)}
|
43 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
</div>
|
45 |
</>}
|
46 |
</div>
|
47 |
-
<div className="space-x-2 transform sm:translate-x-
|
48 |
<button type="button" className="components-button has-icon" onClick={() => hideLibrary()}>
|
49 |
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
50 |
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
1 |
import { __, sprintf } from '@wordpress/i18n'
|
2 |
+
import { useGlobalStore } from '../state/GlobalState'
|
3 |
import { useUserStore } from '../state/User'
|
4 |
|
5 |
export default function Toolbar({ className, hideLibrary }) {
|
6 |
const remainingImports = useUserStore(state => state.remainingImports)
|
7 |
const apiKey = useUserStore(state => state.apiKey)
|
8 |
const allowedImports = useUserStore(state => state.allowedImports)
|
9 |
+
const metaData = useGlobalStore(state => state.metaData)
|
10 |
|
11 |
return <div className={className}>
|
12 |
<div className="flex justify-between items-center px-6 sm:px-12 h-full">
|
22 |
</div>
|
23 |
{!apiKey.length && <>
|
24 |
<div className="items-center ml-8 h-full hidden md:flex">
|
25 |
+
<div className="m-0 p-0 px-6 text-sm bg-gray-50 border-l border-gray-300 h-full flex items-center whitespace-nowrap">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
{sprintf(
|
27 |
__('Imports left: %s / %s'), remainingImports(), Number(allowedImports),
|
28 |
)}
|
29 |
</div>
|
30 |
+
<div className="h-full items-center border-l hidden lg:flex">
|
31 |
+
{metaData?.banners?.library_header && <>
|
32 |
+
{metaData.banners.library_header?.image &&
|
33 |
+
<a
|
34 |
+
className="h-full block"
|
35 |
+
target="_blank"
|
36 |
+
rel="noreferrer"
|
37 |
+
href={metaData.banners.library_header.url}>
|
38 |
+
<img
|
39 |
+
src={metaData.banners.library_header.image}
|
40 |
+
alt="Extendify notice"/>
|
41 |
+
</a>
|
42 |
+
}
|
43 |
+
{!metaData.banners.library_header?.image &&
|
44 |
+
<div className="text-gray-900 space-x-6 bg-extendify-light px-6 p-2 h-full flex items-center">
|
45 |
+
<span className="font-bold text-left">{metaData.banners.library_header.text_backup}</span>
|
46 |
+
{metaData.banners.library_header?.url && <div>
|
47 |
+
<a
|
48 |
+
className="button-extendify-main"
|
49 |
+
target="_blank"
|
50 |
+
rel="noreferrer"
|
51 |
+
href={`${metaData.banners.library_header.url}&utm_source=${encodeURIComponent(window.extendifySdkData.source)}&utm_medium=library&utm_campaign=banner`}>
|
52 |
+
{metaData.banners.library_header?.button_text ?? __('Get it now', 'extendify-sdk')}
|
53 |
+
</a>
|
54 |
+
</div>}
|
55 |
+
</div>
|
56 |
+
}
|
57 |
+
</>}
|
58 |
+
</div>
|
59 |
</div>
|
60 |
</>}
|
61 |
</div>
|
62 |
+
<div className="space-x-2 transform sm:translate-x-6">
|
63 |
<button type="button" className="components-button has-icon" onClick={() => hideLibrary()}>
|
64 |
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" size="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
65 |
<span className="sr-only">{__('Close library', 'extendify-sdk')}</span>
|
extendify-sdk/src/middleware/NeedsRegistrationModal.js
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from '@wordpress/i18n'
|
2 |
+
import {
|
3 |
+
Modal, Button, ButtonGroup,
|
4 |
+
} from '@wordpress/components'
|
5 |
+
import {
|
6 |
+
render, useEffect, useRef,
|
7 |
+
} from '@wordpress/element'
|
8 |
+
import { useUserStore } from '../state/User'
|
9 |
+
import { useState } from '@wordpress/element'
|
10 |
+
import { User as UserApi } from '../api/User'
|
11 |
+
|
12 |
+
export default function NeedsRegistrationModal({ finished }) {
|
13 |
+
const [email, setEmail] = useState('')
|
14 |
+
const submitRef = useRef()
|
15 |
+
|
16 |
+
const registerAndContinue = async (event) => {
|
17 |
+
event.preventDefault()
|
18 |
+
await UserApi.registerMailingList(email)
|
19 |
+
useUserStore.setState({
|
20 |
+
registration: { email },
|
21 |
+
})
|
22 |
+
finished()
|
23 |
+
}
|
24 |
+
|
25 |
+
useEffect(() => {
|
26 |
+
UserApi.getMeta('user_email')
|
27 |
+
.then((value) => setEmail(value ?? ''))
|
28 |
+
submitRef.current.focus()
|
29 |
+
}, [])
|
30 |
+
|
31 |
+
return <Modal
|
32 |
+
className="extendify-sdk"
|
33 |
+
title={__('One last step...', 'extendify-sdk')}
|
34 |
+
isDismissible={false}>
|
35 |
+
<p className="m-0 mb-4 max-w-md">
|
36 |
+
{__('Register now to receive updates and special offers from Extendify', 'extendify-sdk')}
|
37 |
+
</p>
|
38 |
+
<form onSubmit={registerAndContinue} className="flex space-x-4 mb-8">
|
39 |
+
<div className="relative w-full max-w-xs">
|
40 |
+
<input
|
41 |
+
id="extendify-email-register"
|
42 |
+
value={email}
|
43 |
+
required
|
44 |
+
onChange={(event) => setEmail(event.target.value)}
|
45 |
+
type="text"
|
46 |
+
className="extendify-special-input button-focus text-sm h-8 min-h-0 border border-gray-900 special-input placeholder-transparent rounded-none w-full px-2"
|
47 |
+
placeholder={__('Email', 'extendify-sdk')} />
|
48 |
+
<label htmlFor="extendify-email-register" className="-top-3 bg-white absolute left-1 px-1 transition-all">{__('Email', 'extendify-sdk')}</label>
|
49 |
+
</div>
|
50 |
+
<input type="submit" className="hidden" />
|
51 |
+
</form>
|
52 |
+
|
53 |
+
<ButtonGroup>
|
54 |
+
<Button ref={submitRef} isPrimary onClick={registerAndContinue}>
|
55 |
+
{__('Submit and import', 'extendify-sdk')}
|
56 |
+
</Button>
|
57 |
+
<Button isTertiary onClick={finished} style={{
|
58 |
+
boxShadow: 'none', margin: '0 4px',
|
59 |
+
}}>
|
60 |
+
{__('Skip and import', 'extendify-sdk')}
|
61 |
+
</Button>
|
62 |
+
</ButtonGroup>
|
63 |
+
</Modal>
|
64 |
+
}
|
65 |
+
|
66 |
+
export function check() {
|
67 |
+
return {
|
68 |
+
id: 'NeedsRegistrationModal',
|
69 |
+
pass: (useUserStore.getState().registration?.email || useUserStore.getState().apiKey),
|
70 |
+
allow() {},
|
71 |
+
deny() {
|
72 |
+
return new Promise((finished) => {
|
73 |
+
render(<NeedsRegistrationModal finished={finished}/>, document.getElementById('extendify-root'))
|
74 |
+
})
|
75 |
+
},
|
76 |
+
}
|
77 |
+
}
|
extendify-sdk/src/middleware/hasPluginsActivated/index.js
CHANGED
@@ -6,8 +6,8 @@ export const hasPluginsActivated = async (template) => {
|
|
6 |
return {
|
7 |
id: 'hasPluginsActivated',
|
8 |
pass: !(await checkIfUserNeedsToActivatePlugins(template)),
|
9 |
-
|
10 |
-
|
11 |
return new Promise(() => {
|
12 |
render(<ActivatePluginsModal showClose={true}/>, document.getElementById('extendify-root'))
|
13 |
})
|
6 |
return {
|
7 |
id: 'hasPluginsActivated',
|
8 |
pass: !(await checkIfUserNeedsToActivatePlugins(template)),
|
9 |
+
allow() {},
|
10 |
+
deny() {
|
11 |
return new Promise(() => {
|
12 |
render(<ActivatePluginsModal showClose={true}/>, document.getElementById('extendify-root'))
|
13 |
})
|
extendify-sdk/src/middleware/hasRequiredPlugins/index.js
CHANGED
@@ -6,8 +6,8 @@ export const hasRequiredPlugins = async (template) => {
|
|
6 |
return {
|
7 |
id: 'hasRequiredPlugins',
|
8 |
pass: !(await checkIfUserNeedsToInstallPlugins(template)),
|
9 |
-
|
10 |
-
|
11 |
return new Promise(() => {
|
12 |
render(<RequiredPluginsModal/>, document.getElementById('extendify-root'))
|
13 |
})
|
6 |
return {
|
7 |
id: 'hasRequiredPlugins',
|
8 |
pass: !(await checkIfUserNeedsToInstallPlugins(template)),
|
9 |
+
allow() {},
|
10 |
+
deny() {
|
11 |
return new Promise(() => {
|
12 |
render(<RequiredPluginsModal/>, document.getElementById('extendify-root'))
|
13 |
})
|
extendify-sdk/src/middleware/helpers.js
CHANGED
@@ -1,21 +1,24 @@
|
|
1 |
import { Plugins } from '../api/Plugins'
|
2 |
-
|
|
|
|
|
3 |
|
4 |
export async function checkIfUserNeedsToInstallPlugins(template) {
|
5 |
-
|
6 |
-
let required = get(template, 'fields.required_plugins') ?? []
|
7 |
// Hardcoded temporarily to not force EP install
|
8 |
required = required.filter((p) => p !== 'editorplus')
|
9 |
if (!required.length) {
|
10 |
return false
|
11 |
}
|
12 |
|
13 |
-
|
|
|
|
|
14 |
// if no dependencies are required, then this will be false automatically
|
15 |
const weNeedInstalls = required.length
|
16 |
? required.filter((plugin) => {
|
17 |
// TODO: if we have better data to work with this can be more literal
|
18 |
-
return !
|
19 |
return k.includes(plugin)
|
20 |
})
|
21 |
})
|
@@ -25,20 +28,23 @@ export async function checkIfUserNeedsToInstallPlugins(template) {
|
|
25 |
}
|
26 |
|
27 |
export async function checkIfUserNeedsToActivatePlugins(template) {
|
28 |
-
|
29 |
-
let required = get(template, 'fields.required_plugins') ?? []
|
30 |
|
31 |
// Hardcoded temporarily to not force EP install
|
32 |
required = required.filter((p) => p !== 'editorplus')
|
33 |
if (!required.length) {
|
34 |
return false
|
35 |
}
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
// if no dependencies are required, then this will be false automatically
|
38 |
const weNeedActivations = required.length
|
39 |
? required.filter((plugin) => {
|
40 |
// TODO: if we have better data to work with this can be more literal
|
41 |
-
return !
|
42 |
return k.includes(plugin)
|
43 |
})
|
44 |
})
|
1 |
import { Plugins } from '../api/Plugins'
|
2 |
+
|
3 |
+
let installedPlugins = []
|
4 |
+
let activatedPlugins = []
|
5 |
|
6 |
export async function checkIfUserNeedsToInstallPlugins(template) {
|
7 |
+
let required = template?.fields?.required_plugins ?? []
|
|
|
8 |
// Hardcoded temporarily to not force EP install
|
9 |
required = required.filter((p) => p !== 'editorplus')
|
10 |
if (!required.length) {
|
11 |
return false
|
12 |
}
|
13 |
|
14 |
+
if (!installedPlugins.length) {
|
15 |
+
installedPlugins = Object.keys(await Plugins.getInstalled())
|
16 |
+
}
|
17 |
// if no dependencies are required, then this will be false automatically
|
18 |
const weNeedInstalls = required.length
|
19 |
? required.filter((plugin) => {
|
20 |
// TODO: if we have better data to work with this can be more literal
|
21 |
+
return !installedPlugins.some((k) => {
|
22 |
return k.includes(plugin)
|
23 |
})
|
24 |
})
|
28 |
}
|
29 |
|
30 |
export async function checkIfUserNeedsToActivatePlugins(template) {
|
31 |
+
let required = template?.fields?.required_plugins ?? []
|
|
|
32 |
|
33 |
// Hardcoded temporarily to not force EP install
|
34 |
required = required.filter((p) => p !== 'editorplus')
|
35 |
if (!required.length) {
|
36 |
return false
|
37 |
}
|
38 |
+
|
39 |
+
if (!activatedPlugins.length) {
|
40 |
+
activatedPlugins = Object.values(await Plugins.getActivated())
|
41 |
+
}
|
42 |
+
|
43 |
// if no dependencies are required, then this will be false automatically
|
44 |
const weNeedActivations = required.length
|
45 |
? required.filter((plugin) => {
|
46 |
// TODO: if we have better data to work with this can be more literal
|
47 |
+
return !activatedPlugins.some((k) => {
|
48 |
return k.includes(plugin)
|
49 |
})
|
50 |
})
|
extendify-sdk/src/middleware/index.js
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import { hasRequiredPlugins } from './hasRequiredPlugins'
|
2 |
import { hasPluginsActivated } from './hasPluginsActivated'
|
|
|
3 |
|
4 |
export const Middleware = (middleware = []) => {
|
5 |
return {
|
6 |
hasRequiredPlugins: hasRequiredPlugins,
|
7 |
hasPluginsActivated: hasPluginsActivated,
|
|
|
8 |
stack: [],
|
9 |
async check(template) {
|
10 |
for (const m of middleware) {
|
1 |
import { hasRequiredPlugins } from './hasRequiredPlugins'
|
2 |
import { hasPluginsActivated } from './hasPluginsActivated'
|
3 |
+
import { check as checkNeedsRegistrationModal } from './NeedsRegistrationModal'
|
4 |
|
5 |
export const Middleware = (middleware = []) => {
|
6 |
return {
|
7 |
hasRequiredPlugins: hasRequiredPlugins,
|
8 |
hasPluginsActivated: hasPluginsActivated,
|
9 |
+
NeedsRegistrationModal: checkNeedsRegistrationModal,
|
10 |
stack: [],
|
11 |
async check(template) {
|
12 |
for (const m of middleware) {
|
extendify-sdk/src/pages/Content.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import { useTemplatesStore } from '../state/Templates'
|
2 |
import Filtering from '../components/Filtering'
|
3 |
-
import TemplatesList from '
|
4 |
-
import TemplatesSingle from '
|
5 |
import HasSidebar from '../layout/HasSidebar'
|
6 |
import TypeSelect from '../components/TypeSelect'
|
7 |
import { __ } from '@wordpress/i18n'
|
@@ -31,7 +31,7 @@ export default function Content({ className }) {
|
|
31 |
{/* TODO: we may want to inject this as a portal so it can directly share state with Filtering.js */}
|
32 |
<TaxonomyBreadcrumbs/>
|
33 |
<div className="relative h-full z-30 bg-white">
|
34 |
-
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8">
|
35 |
<TemplatesList templates={templates}/>
|
36 |
</div>
|
37 |
</div>
|
1 |
import { useTemplatesStore } from '../state/Templates'
|
2 |
import Filtering from '../components/Filtering'
|
3 |
+
import TemplatesList from './TemplatesList'
|
4 |
+
import TemplatesSingle from './TemplatesSingle'
|
5 |
import HasSidebar from '../layout/HasSidebar'
|
6 |
import TypeSelect from '../components/TypeSelect'
|
7 |
import { __ } from '@wordpress/i18n'
|
31 |
{/* TODO: we may want to inject this as a portal so it can directly share state with Filtering.js */}
|
32 |
<TaxonomyBreadcrumbs/>
|
33 |
<div className="relative h-full z-30 bg-white">
|
34 |
+
<div className="absolute z-20 inset-0 lg:static h-screen overflow-y-auto pt-4 sm:pt-0 px-6 sm:pl-0 sm:pr-8 pb-40">
|
35 |
<TemplatesList templates={templates}/>
|
36 |
</div>
|
37 |
</div>
|
extendify-sdk/src/{components → pages}/TemplatesList.js
RENAMED
File without changes
|
extendify-sdk/src/pages/TemplatesSingle.js
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { ImportButton } from '../components/ImportButton'
|
2 |
+
import { __ } from '@wordpress/i18n'
|
3 |
+
import classNames from 'classnames'
|
4 |
+
import { useUserStore } from '../state/User'
|
5 |
+
import { ExternalLink } from '@wordpress/components'
|
6 |
+
import {
|
7 |
+
useEffect, useState, useCallback,
|
8 |
+
} from '@wordpress/element'
|
9 |
+
import { Templates as TemplatesApi } from '../api/Templates'
|
10 |
+
import TaxonomyList from '../components/TaxonomyList'
|
11 |
+
import { useIsMounted } from '../hooks/helpers'
|
12 |
+
import { useTemplatesStore } from '../state/Templates'
|
13 |
+
|
14 |
+
const relatedMap = new Map()
|
15 |
+
|
16 |
+
export default function TemplateSingle({ template }) {
|
17 |
+
const {
|
18 |
+
tax_categories: categories,
|
19 |
+
required_plugins: requiredPlugins,
|
20 |
+
tax_style: styles,
|
21 |
+
tax_pattern_types: types,
|
22 |
+
} = template.fields
|
23 |
+
const apiKey = useUserStore(state => state.apiKey)
|
24 |
+
const [related, setRelated] = useState([])
|
25 |
+
const [alternatives, setAlternatives] = useState([])
|
26 |
+
const isMounted = useIsMounted()
|
27 |
+
const setActiveTemplate = useTemplatesStore(state => state.setActive)
|
28 |
+
|
29 |
+
const changeTemplate = (template) => {
|
30 |
+
setRelated([])
|
31 |
+
setAlternatives([])
|
32 |
+
requestAnimationFrame(() => setActiveTemplate(template))
|
33 |
+
}
|
34 |
+
|
35 |
+
const fetchRelated = useCallback(async (queryType, wantedType) => {
|
36 |
+
const key = `${template.id}|${queryType}|${wantedType}`
|
37 |
+
if (relatedMap.has(key)) {
|
38 |
+
return relatedMap.get(key)
|
39 |
+
}
|
40 |
+
const results = await TemplatesApi.related(
|
41 |
+
template, queryType, wantedType,
|
42 |
+
)
|
43 |
+
relatedMap.set(key, results)
|
44 |
+
return results
|
45 |
+
}, [template])
|
46 |
+
|
47 |
+
useEffect(() => { TemplatesApi.single(template) }, [template])
|
48 |
+
useEffect(() => {
|
49 |
+
fetchRelated('related', 'pattern').then((results) => {
|
50 |
+
isMounted.current && setRelated(results)
|
51 |
+
// fetchRelated('alternatives', template.fields.type).then((results) => {
|
52 |
+
// isMounted.current && setAlternatives(results)
|
53 |
+
// })
|
54 |
+
})
|
55 |
+
}, [template, fetchRelated, isMounted])
|
56 |
+
|
57 |
+
return <div className="flex flex-col min-h-screen bg-white sm:min-h-0 items-start overflow-y-auto h-full sm:pr-8 lg:pl-px lg:-ml-px">
|
58 |
+
<div className="lg:sticky top-0 bg-white flex flex-col lg:flex-row items-start justify-start lg:items-center lg:justify-between w-full max-w-screen-xl lg:border-b border-gray-300">
|
59 |
+
<div className="text-left m-0 h-full px-6 sm:p-0">
|
60 |
+
<h1 className="leading-tight text-left mb-2.5 mt-0 sm:text-3xl font-normal">{template.fields.display_title}</h1>
|
61 |
+
<ExternalLink href={template.fields.url}>
|
62 |
+
{__('Demo', 'extendify-sdk')}
|
63 |
+
</ExternalLink>
|
64 |
+
</div>
|
65 |
+
<div className={classNames({
|
66 |
+
'inline-flex sm:top-auto right-0 m-6 sm:m-0 sm:my-6 space-x-3': true,
|
67 |
+
'top-16 mt-5': !apiKey.length,
|
68 |
+
'top-0': apiKey.length > 0,
|
69 |
+
})}>
|
70 |
+
<ImportButton template={template} />
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
<div className="max-w-screen-xl sm:w-full sm:m-0 sm:mb-8 m-6 border lg:border-t-0 border-gray-300 m-46">
|
74 |
+
<img
|
75 |
+
className="max-w-full w-full block"
|
76 |
+
src={template?.fields?.screenshot[0]?.thumbnails?.full?.url ?? template?.fields?.screenshot[0]?.url}/>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<div className="divide-y p-6 sm:p-0 mb-16">
|
80 |
+
{related.length > 0 && <section className="mb-4">
|
81 |
+
<h4 className="text-lg m-0 mb-4 text-left font-semibold">{__('Related', 'extendify-sdk')}</h4>
|
82 |
+
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-6">
|
83 |
+
{related.map((template) => {
|
84 |
+
return <button key={template.id}
|
85 |
+
type="button"
|
86 |
+
className="min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer"
|
87 |
+
onClick={() => changeTemplate(template)}>
|
88 |
+
<img
|
89 |
+
className="max-w-full block p-0 m-0 object-cover"
|
90 |
+
src={template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url}/>
|
91 |
+
</button>
|
92 |
+
})}
|
93 |
+
</div>
|
94 |
+
</section>}
|
95 |
+
{alternatives.length > 0 && <section className="mb-4 pt-6">
|
96 |
+
<h4 className="text-lg m-0 mb-4 text-left font-semibold">{__('Alternatives', 'extendify-sdk')}</h4>
|
97 |
+
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-6">
|
98 |
+
{alternatives.map((template) => {
|
99 |
+
return <button key={template.id}
|
100 |
+
type="button"
|
101 |
+
className="min-h-60 border border-transparent hover:border-wp-theme-500 transition duration-150 p-0 m-0 cursor-pointer"
|
102 |
+
onClick={() => changeTemplate(template)}>
|
103 |
+
<img
|
104 |
+
className="max-w-full block p-0 m-0 object-cover"
|
105 |
+
src={template?.fields?.screenshot[0]?.thumbnails?.large?.url ?? template?.fields?.screenshot[0]?.url}/>
|
106 |
+
</button>
|
107 |
+
})}
|
108 |
+
</div>
|
109 |
+
</section>}
|
110 |
+
</div>
|
111 |
+
|
112 |
+
{/* Hides on desktop and is repeated in the single sidebar too */}
|
113 |
+
<div className="text-xs text-left p-6 w-full block sm:hidden divide-y">
|
114 |
+
<TaxonomyList
|
115 |
+
categories={categories}
|
116 |
+
types={types}
|
117 |
+
requiredPlugins={requiredPlugins}
|
118 |
+
styles={styles}/>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
}
|
extendify-sdk/src/pages/Welcome.js
CHANGED
@@ -3,13 +3,13 @@ import { __, sprintf } from '@wordpress/i18n'
|
|
3 |
import { useGlobalStore } from '../state/GlobalState'
|
4 |
import { useTemplatesStore } from '../state/Templates'
|
5 |
import { useUserStore } from '../state/User'
|
6 |
-
import {
|
7 |
import { useEffect } from '@wordpress/element'
|
8 |
|
9 |
export default function Login({ className }) {
|
10 |
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
11 |
const updateTypeAndClose = (type) => {
|
12 |
-
|
13 |
|
14 |
type && updateSearchParams({
|
15 |
type: type,
|
@@ -22,7 +22,7 @@ export default function Login({ className }) {
|
|
22 |
})
|
23 |
}
|
24 |
useEffect(() => {
|
25 |
-
|
26 |
}, [])
|
27 |
|
28 |
return <div className={className}>
|
3 |
import { useGlobalStore } from '../state/GlobalState'
|
4 |
import { useTemplatesStore } from '../state/Templates'
|
5 |
import { useUserStore } from '../state/User'
|
6 |
+
import { General as GeneralApi } from '../api/General'
|
7 |
import { useEffect } from '@wordpress/element'
|
8 |
|
9 |
export default function Login({ className }) {
|
10 |
const updateSearchParams = useTemplatesStore(state => state.updateSearchParams)
|
11 |
const updateTypeAndClose = (type) => {
|
12 |
+
GeneralApi.ping(`welcome-${type ?? 'closed'}`)
|
13 |
|
14 |
type && updateSearchParams({
|
15 |
type: type,
|
22 |
})
|
23 |
}
|
24 |
useEffect(() => {
|
25 |
+
GeneralApi.ping('welcome-opened')
|
26 |
}, [])
|
27 |
|
28 |
return <div className={className}>
|
extendify-sdk/src/state/GlobalState.js
CHANGED
@@ -3,6 +3,7 @@ import { useTemplatesStore } from './Templates'
|
|
3 |
|
4 |
export const useGlobalStore = create((set) => ({
|
5 |
open: false,
|
|
|
6 |
currentPage: 'welcome',
|
7 |
setOpen: (value) => {
|
8 |
set({
|
3 |
|
4 |
export const useGlobalStore = create((set) => ({
|
5 |
open: false,
|
6 |
+
metaData: {},
|
7 |
currentPage: 'welcome',
|
8 |
setOpen: (value) => {
|
9 |
set({
|
extendify-sdk/src/state/User.js
CHANGED
@@ -8,10 +8,13 @@ const storage = {
|
|
8 |
}
|
9 |
|
10 |
export const useUserStore = create(persist((set, get) => ({
|
|
|
11 |
apiKey: '',
|
12 |
imports: 0,
|
13 |
uuid: '',
|
14 |
-
|
|
|
|
|
15 |
allowedImports: 0,
|
16 |
entryPoint: 'not-set',
|
17 |
enabled: true,
|
8 |
}
|
9 |
|
10 |
export const useUserStore = create(persist((set, get) => ({
|
11 |
+
email: '',
|
12 |
apiKey: '',
|
13 |
imports: 0,
|
14 |
uuid: '',
|
15 |
+
registration: {
|
16 |
+
email: '',
|
17 |
+
},
|
18 |
allowedImports: 0,
|
19 |
entryPoint: 'not-set',
|
20 |
enabled: true,
|
extendify-sdk/support/notices.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Adds a notice to the plugins page
|
4 |
+
*/
|
5 |
+
|
6 |
+
$extendifySdkNoticesKey = 'extendify_subscribe_to_extendify';
|
7 |
+
$extendifySdkUrl = add_query_arg(
|
8 |
+
[
|
9 |
+
'utm_source' => rawurlencode(sanitize_text_field(wp_unslash($GLOBALS['extendifySdkSourcePlugin']))),
|
10 |
+
'utm_medium' => 'admin',
|
11 |
+
'utm_campaign' => 'notice',
|
12 |
+
'utm_content' => 'launch60',
|
13 |
+
],
|
14 |
+
'https://extendify.com/pricing'
|
15 |
+
);
|
16 |
+
$extendifySdkNoticesNonce = wp_create_nonce($extendifySdkNoticesKey);
|
17 |
+
|
18 |
+
add_action(
|
19 |
+
'admin_notices',
|
20 |
+
function () use ($extendifySdkNoticesKey, $extendifySdkNoticesNonce, $extendifySdkUrl) {
|
21 |
+
$currentPage = get_current_screen();
|
22 |
+
if (!$currentPage || !in_array($currentPage->base, ['plugins'], true)) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
+
|
26 |
+
// In short, the notice will always show until they press dismiss.
|
27 |
+
if (!get_user_option($extendifySdkNoticesKey)) { ?>
|
28 |
+
<div id="<?php echo esc_attr($extendifySdkNoticesKey); ?>" class="notice notice-info"
|
29 |
+
style="display:flex;align-items:stretch;justify-content:space-between;position:relative">
|
30 |
+
<div style="display:flex;align-items:center;position:relative">
|
31 |
+
<div style="margin-right:1.5rem;">
|
32 |
+
<svg width="60" height="60" viewBox="0 0 103 103" fill="none" xmlns="http://www.w3.org/2000/svg">
|
33 |
+
<title>Extendify Logo</title>
|
34 |
+
<rect y="25.75" width="70.8125" height="77.25" fill="black" />
|
35 |
+
<rect x="45.0625" width="57.9375" height="57.9375" fill="#37C2A2" />
|
36 |
+
</svg>
|
37 |
+
</div>
|
38 |
+
<div>
|
39 |
+
<h3 style="margin-bottom:0.25rem;">
|
40 |
+
<?php esc_html_e('Special offer: Save 60% off Extendify Pro', 'extendify-sdk'); ?></h3>
|
41 |
+
<div style="max-width:850px;">
|
42 |
+
<p>
|
43 |
+
<?php esc_html_e('Thank you for using Editor Plus by Extendify. For a limited time, sign up for Extendify Pro and save 60% using coupon code launch60. Extendify Pro gives full access to thousands of templates and patterns designed for the Gutenberg block editor.', 'extendify-sdk'); ?>
|
44 |
+
</p>
|
45 |
+
<p style="max-width:850px;">
|
46 |
+
<?php
|
47 |
+
// translators: %s surrounding the word 'here' and is wrapped with <a>.
|
48 |
+
printf(esc_html__('Click %1$shere%2$s to sign up today!', 'extendify-sdk'), '<a target="_blank" href="' . esc_url($extendifySdkUrl) . '">', '</a>'); ?>
|
49 |
+
</p>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div style="margin:5px -5px 0 0;">
|
54 |
+
<button
|
55 |
+
style="max-width:15px;border:0;background:0;color: #7b7b7b;white-space:nowrap;cursor: pointer;padding: 0"
|
56 |
+
title="<?php esc_attr_e('Dismiss notice', 'extendify-sdk'); ?>"
|
57 |
+
aria-label="<?php esc_attr_e('Dismiss Extendify notice', 'extendify-sdk'); ?>"
|
58 |
+
onclick="jQuery('#<?php echo esc_attr($extendifySdkNoticesKey); ?>').remove();jQuery.post(window.ajaxurl, {action: 'handle_<?php echo esc_attr($extendifySdkNoticesKey); ?>', _wpnonce: '<?php echo esc_attr($extendifySdkNoticesNonce); ?>' });">
|
59 |
+
<svg width="15" height="15" style="width:100%" xmlns="http://www.w3.org/2000/svg" fill="none"
|
60 |
+
viewBox="0 0 24 24" stroke="currentColor">
|
61 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
62 |
+
</svg>
|
63 |
+
</button>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<?php
|
67 |
+
}//end if
|
68 |
+
}
|
69 |
+
);
|
70 |
+
|
71 |
+
add_action(
|
72 |
+
'wp_ajax_handle_' . $extendifySdkNoticesKey,
|
73 |
+
function () use ($extendifySdkNoticesKey) {
|
74 |
+
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'], $extendifySdkNoticesKey)))) {
|
75 |
+
wp_send_json_error(
|
76 |
+
['message' => esc_html__('The security check failed. Please refresh the page and try again.', 'extendify-sdk')],
|
77 |
+
401
|
78 |
+
);
|
79 |
+
}
|
80 |
+
|
81 |
+
update_user_option(get_current_user_id(), $extendifySdkNoticesKey, time());
|
82 |
+
wp_send_json_success();
|
83 |
+
}
|
84 |
+
);
|
extendify-sdk/tailwind.config.js
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
**/
|
9 |
|
10 |
module.exports = {
|
|
|
11 |
purge: ['src/**/*'],
|
12 |
important: '.extendify-sdk',
|
13 |
darkMode: false,
|
@@ -29,6 +30,9 @@ module.exports = {
|
|
29 |
minWidth: {
|
30 |
md2: '960px',
|
31 |
},
|
|
|
|
|
|
|
32 |
fontSize: {
|
33 |
'3xl': ['2rem', '2.5rem'],
|
34 |
},
|
@@ -74,7 +78,7 @@ module.exports = {
|
|
74 |
},
|
75 |
variants: {
|
76 |
extend: {
|
77 |
-
borderWidth: ['group-hover', 'hover'],
|
78 |
backgroundColor: ['active'],
|
79 |
textColor: ['active'],
|
80 |
},
|
8 |
**/
|
9 |
|
10 |
module.exports = {
|
11 |
+
// mode: 'jit',
|
12 |
purge: ['src/**/*'],
|
13 |
important: '.extendify-sdk',
|
14 |
darkMode: false,
|
30 |
minWidth: {
|
31 |
md2: '960px',
|
32 |
},
|
33 |
+
minHeight: {
|
34 |
+
60: '15rem',
|
35 |
+
},
|
36 |
fontSize: {
|
37 |
'3xl': ['2rem', '2.5rem'],
|
38 |
},
|
78 |
},
|
79 |
variants: {
|
80 |
extend: {
|
81 |
+
borderWidth: ['group-hover', 'hover', 'focus'],
|
82 |
backgroundColor: ['active'],
|
83 |
textColor: ['active'],
|
84 |
},
|
ml-slider.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Plugin Name: MetaSlider
|
7 |
* Plugin URI: https://www.metaslider.com
|
8 |
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
9 |
-
* Version: 3.
|
10 |
* Author: MetaSlider
|
11 |
* Author URI: https://www.metaslider.com
|
12 |
* License: GPL-2.0+
|
@@ -35,7 +35,7 @@ class MetaSliderPlugin
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
public $version = '3.
|
39 |
|
40 |
/**
|
41 |
* Pro installed version number
|
@@ -1907,5 +1907,4 @@ if (is_readable(dirname(__FILE__) . '/extendify-sdk/loader.php')) {
|
|
1907 |
}
|
1908 |
|
1909 |
endif;
|
1910 |
-
|
1911 |
add_action('plugins_loaded', array(MetaSliderPlugin::get_instance(), 'setup'), 10);
|
6 |
* Plugin Name: MetaSlider
|
7 |
* Plugin URI: https://www.metaslider.com
|
8 |
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
9 |
+
* Version: 3.23.0
|
10 |
* Author: MetaSlider
|
11 |
* Author URI: https://www.metaslider.com
|
12 |
* License: GPL-2.0+
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
public $version = '3.23.0';
|
39 |
|
40 |
/**
|
41 |
* Pro installed version number
|
1907 |
}
|
1908 |
|
1909 |
endif;
|
|
|
1910 |
add_action('plugins_loaded', array(MetaSliderPlugin::get_instance(), 'setup'), 10);
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82
|
3 |
Tags: slideshow, slider, image slider, carousel, gallery, flexslider, wordpress slider, nivoslider, rotating banner, responsive slideshow, seo slideshow, unsplash
|
4 |
Requires at least: 3.5
|
5 |
-
Stable tag: 3.
|
6 |
Requires PHP: 5.2
|
7 |
Tested up to: 5.8
|
8 |
License: GPLv2 or later
|
@@ -288,6 +288,9 @@ See https://www.metaslider.com/documentation/image-cropping/
|
|
288 |
|
289 |
== Changelog ==
|
290 |
|
|
|
|
|
|
|
291 |
= 3.22.1 - 2021/Aug/11 =
|
292 |
* FIX: Addresses bug with array_key_exists
|
293 |
* FIX: Addresses conflict with standalone Gutenberg plugin
|
2 |
Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82
|
3 |
Tags: slideshow, slider, image slider, carousel, gallery, flexslider, wordpress slider, nivoslider, rotating banner, responsive slideshow, seo slideshow, unsplash
|
4 |
Requires at least: 3.5
|
5 |
+
Stable tag: 3.23.0
|
6 |
Requires PHP: 5.2
|
7 |
Tested up to: 5.8
|
8 |
License: GPLv2 or later
|
288 |
|
289 |
== Changelog ==
|
290 |
|
291 |
+
= 3.23.0 - 2021/Aug/27 =
|
292 |
+
* TWEAK: Bug fixes and updates to the library
|
293 |
+
|
294 |
= 3.22.1 - 2021/Aug/11 =
|
295 |
* FIX: Addresses bug with array_key_exists
|
296 |
* FIX: Addresses conflict with standalone Gutenberg plugin
|