MetaSlider - Version 3.22.1

Version Description

  • 2021/Aug/11 =
  • FIX: Addresses bug with array_key_exists
  • FIX: Addresses conflict with standalone Gutenberg plugin
Download this release

Release Info

Developer metaslider
Plugin Icon 128x128 MetaSlider
Version 3.22.1
Comparing to
See all releases

Code changes from version 3.22.0 to 3.22.1

extendify-sdk/app/Admin.php CHANGED
@@ -67,7 +67,7 @@ class Admin
67
  */
68
  public function checkItsGutenbergPost($hook = '')
69
  {
70
- if (isset($GLOBALS['typenow']) && use_block_editor_for_post_type($GLOBALS['typenow'])) {
71
  return $hook && in_array($hook, ['post.php', 'post-new.php'], true);
72
  }
73
 
67
  */
68
  public function checkItsGutenbergPost($hook = '')
69
  {
70
+ if (isset($GLOBALS['typenow']) && \use_block_editor_for_post_type($GLOBALS['typenow'])) {
71
  return $hook && in_array($hook, ['post.php', 'post-new.php'], true);
72
  }
73
 
extendify-sdk/editorplus/EditorPlus.php CHANGED
@@ -172,7 +172,7 @@ if (!class_exists('edpl__EditorPlus')) {
172
  public function registerProjectTemplates($attributes)
173
  {
174
  // Create the key used for the themes cache.
175
- $cacheKey = 'page_templates-' . md5(get_theme_root() . '/' . get_stylesheet());
176
  // Retrieve the cache list.
177
  // If it doesn't exist, or it's empty prepare an array.
178
  $templates = wp_get_theme()->get_page_templates();
@@ -206,7 +206,7 @@ if (!class_exists('edpl__EditorPlus')) {
206
  $currentTemplate = get_post_meta($post->ID, '_wp_page_template', true);
207
 
208
  // Check that the set template is one we have defined.
209
- if (!array_key_exists($currentTemplate, $this->templates)) {
210
  return $template;
211
  }
212
 
172
  public function registerProjectTemplates($attributes)
173
  {
174
  // Create the key used for the themes cache.
175
+ $cacheKey = 'page_templates-' . \wp_hash(get_theme_root() . '/' . get_stylesheet());
176
  // Retrieve the cache list.
177
  // If it doesn't exist, or it's empty prepare an array.
178
  $templates = wp_get_theme()->get_page_templates();
206
  $currentTemplate = get_post_meta($post->ID, '_wp_page_template', true);
207
 
208
  // Check that the set template is one we have defined.
209
+ if (!is_string($currentTemplate) || !array_key_exists($currentTemplate, $this->templates)) {
210
  return $template;
211
  }
212
 
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 .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-16{top:4rem}.extendify-sdk .right-0{right:0}.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-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-1{margin-top:-.25rem}.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-1{margin-bottom:.25rem}.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 .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-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 .active\:bg-gray-900:active,.extendify-sdk .hover\:bg-gray-900:hover{--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-1{padding-top:.25rem}.extendify-sdk .pt-4{padding-top:1rem}.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-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-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\:mr-1{margin-right:.25rem}.extendify-sdk .sm\:mb-6{margin-bottom:1.5rem}.extendify-sdk .sm\:mb-12{margin-bottom:3rem}.extendify-sdk .sm\:ml-px{margin-left:1px}.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-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\: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-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))}}
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}}},394:(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}})},R=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"}})},D=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,D(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),R=xe(p),D=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,R,D,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,R,D]);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,Re,De,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 Re.Next;if(t&(Le.Previous|Le.Last))return Re.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"}(Re||(Re={})),function(e){e[e.Strict=0]="Strict",e[e.Loose=1]="Loose"}(De||(De={})),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=wp.blockEditor,wt=lodash;var jt=function(){return F.get("taxonomies")};const kt=wp.components;var St=n(42),_t=n.n(St);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("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()}));return(0,xt.jsx)(kt.PanelBody,{title:j,initialOpen:o,children:(0,xt.jsx)(kt.PanelRow,{children:(0,xt.jsxs)("div",{className:"overflow-hidden w-full relative",style:{height:p},children:[(0,xt.jsxs)("ul",{className:_t()("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(Et({},n,"pattern"===u.type&&"tax_categories"===n?"Default":""))},children:(0,xt.jsx)("span",{className:_t()({"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(Et({},n,e.term))},children:[(0,xt.jsx)("span",{className:_t()({"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:_t()("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(Et({},n,e.term))},children:(0,xt.jsx)("span",{className:_t()({"text-wp-theme-500":b(e)}),children:e.term})})},e.term)}))]})]})})})}function Pt(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 At(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Pt(o,r,i,a,s,"next",e)}function s(e){Pt(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)(At(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,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)("div",{className:"pt-1 -mt-1 mb-1 bg-white",children:(0,xt.jsx)(bt.__experimentalSearchForm,{placeholder:(0,yt.__)("What are you looking for?","extendify-sdk"),onChange:function(e){g.setState({nextPage:""}),u(e),o(e)},value:s,className:"sm:ml-px sm:mr-1 sm:mb-6 px-6 sm:p-0 sm:px-0",autoComplete:"off"})}),(0,xt.jsx)("div",{className:"flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block",children:(0,xt.jsx)(kt.Panel,{children:Object.entries(c).map((function(e,t){return(0,xt.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 Rt(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,Vt=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:It(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){Rt(o,r,i,a,s,"next",e)}function s(e){Rt(o,r,i,a,s,"throw",e)}a(void 0)}))})();var n},Mt=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})},Ht=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})},Bt=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 Ut(){return(Ut=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 qt=new Map,Zt=new WeakMap,Wt=0;function zt(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(Zt.has(n)||(Wt+=1,Zt.set(n,Wt.toString())),Zt.get(n)):"0":e[t]);var n})).toString()}function $t(e,t,n){if(void 0===n&&(n={}),!e)return function(){};var r=function(e){var t=zt(e),n=qt.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},qt.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(),qt.delete(i))}}function Gt(e){return"function"!=typeof e.children}var Kt=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(),Gt(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=$t(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(!Gt(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",Ut({ref:this.handleNode},u),o)},r}(i.Component);Kt.displayName="InView",Kt.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function Yt(e){return function(e){if(Array.isArray(e))return tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||en(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 Xt(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 Jt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Xt(o,r,i,a,s,"next",e)}function s(e){Xt(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Qt(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)||en(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 en(e,t){if(e){if("string"==typeof e)return tn(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)?tn(e,t):void 0}}function tn(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 nn(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=Qt((0,r.useState)(""),2),u=s[0],l=s[1],c=Qt((0,r.useState)(!1),2),f=c[0],d=c[1],p=Qt((0,r.useState)([]),2),h=p[0],m=p[1],v=Qt(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=$t(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)(Jt(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,Vt(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)(kt.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(Yt(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)(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,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)(kt.Spinner,{})})]})]}):(0,xt.jsx)("div",{className:"flex items-center justify-center w-full sm:mt-64",children:(0,xt.jsx)(kt.Spinner,{})})}var rn=function(){return F.get("plugins")},on=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"}})},an=function(){return F.get("active-plugins")};function sn(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 un(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){sn(o,r,i,a,s,"next",e)}function s(e){sn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function ln(e){return cn.apply(this,arguments)}function cn(){return(cn=un(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,wt.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,rn();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 fn(e){return dn.apply(this,arguments)}function dn(){return(dn=un(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,wt.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,an();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,ln(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 pn=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 hn(e){var t=e.msg;return(0,xt.jsxs)(kt.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)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,xt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(_n,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Go back","extendify-sdk")})]})}const mn=wp.data;function vn(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}function xn(){var e=vn((0,r.useState)(!1),2),t=e[0],n=e[1],i=function(){location.reload()};return(0,(0,mn.select)("core/editor").isEditedPostDirty)()?(0,xt.jsxs)(kt.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)(kt.ButtonGroup,{children:[(0,xt.jsx)(kt.Button,{isPrimary:!0,onClick:i,disabled:t,children:(0,yt.__)("Reload page","extendify-sdk")}),(0,xt.jsx)(kt.Button,{isSecondary:!0,onClick:function(){n(!0),(0,mn.dispatch)("core/editor").savePost(),n(!1)},isBusy:t,style:{margin:"0 4px"},children:(0,yt.__)("Save changes","extendify-sdk")})]})]}):(i(),null)}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,t=gn((0,r.useState)(""),2),n=t[0],i=t[1],o=pn((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 on(a).then((function(){pn.setState({importOnLoad:!0}),(0,r.render)((0,xt.jsx)(xn,{}),document.getElementById("extendify-root"))})).catch((function(e){var t=e.message;i(t)})),n?(0,xt.jsx)(hn,{msg:n}):(0,xt.jsx)(kt.Modal,{title:(0,yt.__)("Installing plugins","extendify-sdk"),isDismissible:!1,children:(0,xt.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,yt.__)("Installing...","extendify-sdk")})})}var jn=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 kn(e){switch(e){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return e}function Sn(){var e,t,n,i=pn((function(e){return e.wantedTemplate})),o=function(){return(0,r.render)((0,xt.jsx)(gr,{show:!0}),document.getElementById("extendify-root"))},a=(null==i||null===(e=i.fields)||void 0===e?void 0:e.required_plugins)||[];return(0,xt.jsxs)(kt.Modal,{title:(0,yt.__)("Plugins required","extendify-sdk"),closeButtonLabel:(0,yt.__)("Return to library","extendify-sdk"),onRequestClose:o,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:a.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:kn(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)(kt.Button,{isPrimary:!0,onClick:o,style:{boxShadow:"none"},children:(0,yt.__)("Return to library","extendify-sdk")})]})}function _n(e){var t,n,i,o,a,s,u,l,c=pn((function(e){return e.wantedTemplate})),f=function(){e.forceOpen||(0,r.render)((0,xt.jsx)(gr,{show:!0}),document.getElementById("extendify-root"))},d=(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)(kt.Modal,{title:null!==(i=e.title)&&void 0!==i?i:(0,yt.__)("Install required plugins","extendify-sdk"),closeButtonLabel:(0,yt.__)("No thanks, take me back","extendify-sdk"),onRequestClose:f,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:d.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:kn(e)},e)}))}),(0,xt.jsxs)(kt.ButtonGroup,{children:[(0,xt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(wn,{}),document.getElementById("extendify-root"))},children:null!==(l=e.buttonLabel)&&void 0!==l?l:(0,yt.__)("Install Plugins","extendify-sdk")}),e.forceOpen||(0,xt.jsx)(kt.Button,{isTertiary:!0,onClick:f,style:{boxShadow:"none",margin:"0 4px"},children:(0,yt.__)("No thanks, take me back","extendify-sdk")})]})]}):(0,xt.jsx)(Sn,{})}function En(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 Nn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){En(o,r,i,a,s,"next",e)}function s(e){En(o,r,i,a,s,"throw",e)}a(void 0)}))}}var On=function(){var e=Nn(j().mark((function e(t){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ln(t);case 2:return e.t0=!e.sent,e.t1=function(){return Nn(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 Nn(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)(_n,{}),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 Cn(e){var t=e.msg;return(0,xt.jsxs)(kt.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)(kt.Notice,{isDismissible:!1,status:"error",children:t}),(0,xt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){(0,r.render)((0,xt.jsx)(In,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Go back","extendify-sdk")})]})}function Pn(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 An(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Pn(o,r,i,a,s,"next",e)}function s(e){Pn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Fn(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 Tn(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 Tn(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 Tn(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 Ln(){var e,t=Fn((0,r.useState)(""),2),n=t[0],i=t[1],o=pn((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 on(a).then((function(){pn.setState({importOnLoad:!0})})).then(An(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)(xn,{}),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)(Cn,{msg:n}):(0,xt.jsx)(kt.Modal,{title:(0,yt.__)("Activating plugins","extendify-sdk"),isDismissible:!1,children:(0,xt.jsx)(kt.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,yt.__)("Activating...","extendify-sdk")})})}function In(e){var t,n,i,o,a,s=pn((function(e){return e.wantedTemplate})),u=function(){return(0,r.render)((0,xt.jsx)(gr,{show:!0}),document.getElementById("extendify-root"))},l=(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.jsxs)(kt.Modal,{title:(0,yt.__)("Activate required plugins","extendify-sdk"),closeButtonLabel:(0,yt.__)("No thanks, return to library","extendify-sdk"),onRequestClose:u,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:l.filter((function(e){return"editorplus"!==e})).map((function(e){return(0,xt.jsx)("li",{children:kn(e)},e)}))}),(0,xt.jsxs)(kt.ButtonGroup,{children:[(0,xt.jsx)(kt.Button,{isPrimary:!0,onClick:function(){return(0,r.render)((0,xt.jsx)(Ln,{}),document.getElementById("extendify-root"))},children:(0,yt.__)("Activate Plugins","extendify-sdk")}),e.showClose&&(0,xt.jsx)(kt.Button,{isTertiary:!0,onClick:u,style:{boxShadow:"none",margin:"0 4px"},children:(0,yt.__)("No thanks, return to library","extendify-sdk")})]})]}):(0,xt.jsx)(Sn,{})}function Rn(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){Rn(o,r,i,a,s,"next",e)}function s(e){Rn(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Vn=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,fn(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)(In,{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 Mn(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 Hn(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 Hn(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 Hn(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(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 Un(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Bn(o,r,i,a,s,"next",e)}function s(e){Bn(o,r,i,a,s,"throw",e)}a(void 0)}))}}function qn(e){return function(){return new Zn(e.apply(this,arguments))}}function Zn(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof Wn;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 Wn(e){this.wrapped=e}Zn.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Zn.prototype.next=function(e){return this._invoke("next",e)},Zn.prototype.throw=function(e){return this._invoke("throw",e)},Zn.prototype.return=function(e){return this._invoke("return",e)};function zn(){return(zn=Un(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=$n(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 $n(e){return Gn.apply(this,arguments)}function Gn(){return(Gn=qn(j().mark((function e(t){var n,r,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Mn(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 Kn(e,t){return(0,(0,mn.dispatch)("core/block-editor").insertBlocks)(e).then((function(){window.dispatchEvent(new CustomEvent("extendify-sdk::template-inserted",{detail:{template:t},bubbles:!0}))}))}function Yn(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 Xn(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 Xn(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 Xn(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 Jn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:On,hasPluginsActivated:Vn,stack:[],check:function(t){var n=this;return Un(j().mark((function r(){var i,o,a;return j().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:i=Mn(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 Qn(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=Yn((0,r.useState)(!1),2),l=u[0],c=u[1],f=Yn((0,r.useState)(!1),2),d=f[0],p=f[1],h=pn((function(e){return e.setWanted})),m=function(){(function(e){return zn.apply(this,arguments)})(Jn.stack).then((function(){setTimeout((function(){Kn(i,t).then((function(){return s(!1)}))}),100)}))};(0,r.useEffect)((function(){return Jn.check(t).then((function(){return p(!0)})),function(){return Jn.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 Mt(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 er(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 kn(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 tr(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(){Ht(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)(kt.ExternalLink,{href:l.fields.url,children:(0,yt.__)("Demo","extendify-sdk")})]}),(0,xt.jsx)("div",{className:_t()({"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)(Qn,{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)(er,{categories:f,types:h,requiredPlugins:d,styles:p})})]})}function nr(){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 rr(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 ir(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 ir(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 ir(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 or(e){var t=e.children,n=W((function(e){return e.apiKey})),i=rr((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)(nr,{})})})]}),(0,xt.jsx)("main",{id:"extendify-templates",tabIndex:"0",className:"w-full smp:l-12 sm:pt-6 h-full overflow-hidden",children:t[1]})]})}function ar(){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:_t()({"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:_t()({"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 sr(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)(er,{categories:i,types:s,requiredPlugins:o,styles:a})})]})}function ur(){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("_"," ").replace(/\b\w/g,(function(e){return e.toUpperCase()})))}),": ",(0,xt.jsx)("span",{children:t[1]?t[1]:"All"})]},t[0]);var n}))})}function lr(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)(or,{children:[(0,xt.jsx)(sr,{template:r}),(0,xt.jsx)(tr,{template:r})]})}),(0,xt.jsxs)(or,{children:[(0,xt.jsx)(Lt,{}),(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ar,{}),(0,xt.jsx)(ur,{}),(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)(nn,{templates:n})})})]})]})]})]})}function cr(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 fr(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 dr(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 dr(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 dr(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 pr(){var e=fr((0,r.useState)(W.getState().apiKey),2),t=e[0],n=e[1],i=fr((0,r.useState)(W.getState().email),2),o=i[0],a=i[1],s=fr((0,r.useState)(""),2),u=s[0],l=s[1],c=fr((0,r.useState)("info"),2),f=c[0],d=c[1],p=fr((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,R(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){cr(o,r,i,a,s,"next",e)}function s(e){cr(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:_t()({"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 hr(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)(pr,{})})]})})]})}var mr=function(e){return F.post("simple-ping",{action:e})};function vr(e){var t=e.className,n=g((function(e){return e.updateSearchParams})),i=function(e){mr("welcome-".concat(null!=e?e:"closed")),e&&n({type:e}),W.setState({hasClickedThroughWelcomePage:!0}),b.setState({currentPage:"content"})};return(0,r.useEffect)((function(){mr("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 yr(e){var t=e.show,n=function(){var e=document.getElementById("beacon-container");e&&(e.style.position="relative",e.style.zIndex=Number.MAX_SAFE_INTEGER,e.style.display="block")},i=function(){var e=document.getElementById("beacon-container");e&&(e.style.display="none",window.Beacon("close"))};return(0,r.useEffect)((function(){if(t)return window.Beacon?(n(),function(){return i()}):(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",n),function(){window.Beacon("off","ready",n),i()})}),[t]),(0,xt.jsx)(xt.Fragment,{})}function xr(){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(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.jsxs)("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)(vr,{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)(lr,{className:"w-full flex-grow overflow-hidden"}),"login"===i&&(0,xt.jsx)(hr,{className:"w-full flex-grow overflow-hidden bg-extendify-light"})]}),(0,xt.jsx)(yr,{show:t})]})})]})})})})}function gr(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)(xr,{})}const br=wp.plugins,wr=wp.editPost;function jr(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 kr(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){jr(o,r,i,a,s,"next",e)}function s(e){jr(o,r,i,a,s,"throw",e)}a(void 0)}))}}var Sr=function(e){var t,n;jn(null===(t=e.target.closest("[data-extendify-identifier]"))||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.extendifyIdentifier)},_r=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)},Er=(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(){_r()&&(document.getElementById("extendify-templates-inserter-btn")||document.querySelector(".edit-post-header-toolbar")&&(document.querySelector(".edit-post-header-toolbar").insertAdjacentHTML("beforeend",(0,r.renderToString)(Er)),document.getElementById("extendify-templates-inserter-btn").addEventListener("click",Sr)))}),0)})),window._wpLoadBlockEditor&&window.wp.data.subscribe((function(){setTimeout((function(){if(_r()&&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",Sr)}}),0)}));window._wpLoadBlockEditor&&_r()&&(0,br.registerPlugin)("extendify-temps-more-menu-trigger",{render:function(){return(0,xt.jsx)(wr.PluginSidebarMoreMenuItem,{"data-extendify-identifier":"sidebar-button",onClick:Sr,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,br.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,xt.jsx)(wr.PluginSidebarMoreMenuItem,{onClick:kr(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=!_r(),e.next=7,D(JSON.stringify(Object.assign({},t)));case 7:location.reload();case 8:case"end":return e.stop()}}),e)}))),icon:(0,xt.jsx)(xt.Fragment,{}),children:_r()?(0,yt.__)("Disable Extendify","extendify-sdk"):(0,yt.__)("Enable Extendify","extendify-sdk")})}}),[{register:function(){var e=(0,mn.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(),Bt(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,xt.jsx)(_n,{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)(gr,{}),e),pn.getState().importOnLoad){var t=pn.getState().wantedTemplate;setTimeout((function(){!function(e){if(!e)throw Error("Template not found");Kn(p((0,window.wp.blocks.parse)((0,wt.get)(e,"fields.code"))),e)}(t)}),0)}pn.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(394)));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}}},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)})();
extendify-sdk/readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Extendify Sdk ===
2
  Requires at least: 5.4
3
- Stable tag: 5.7
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.1
4
  Requires PHP: 5.6
5
  Tested up to: 5.7.0
extendify-sdk/src/app.css CHANGED
@@ -14,6 +14,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 button-focus active:bg-gray-900 active:text-white focus:text-white;
16
  }
 
 
 
 
 
 
 
17
 
18
  /* WP tweaks and overrides */
19
  .extendify-sdk .components-panel__body > .components-panel__body-title {
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 button-focus active:bg-gray-900 active:text-white focus:text-white;
16
  }
17
+ #extendify-search-input:focus ~ svg,
18
+ #extendify-search-input:not(:placeholder-shown) ~ svg {
19
+ @apply hidden;
20
+ }
21
+ #extendify-search-input::-webkit-textfield-decoration-container {
22
+ @apply mr-3;
23
+ }
24
 
25
  /* WP tweaks and overrides */
26
  .extendify-sdk .components-panel__body > .components-panel__body-title {
extendify-sdk/src/components/Filtering.js CHANGED
@@ -1,5 +1,4 @@
1
  import { useTemplatesStore } from '../state/Templates'
2
- import { __experimentalSearchForm as SearchForm } from '@wordpress/block-editor'
3
  // import { SelectControl } from '@wordpress/components'
4
  import { __ } from '@wordpress/i18n'
5
  import { debounce } from 'lodash'
@@ -38,21 +37,27 @@ export default function Filtering() {
38
  }, [fetchTaxonomies])
39
 
40
  return <>
41
- <div className="pt-1 -mt-1 mb-1 bg-white">
42
- <SearchForm
 
 
 
 
 
43
  placeholder={__('What are you looking for?', 'extendify-sdk')}
44
- onChange={(value) => {
45
  useTemplatesStore.setState({
46
  nextPage: '',
47
  })
48
- setSearchValue(value)
49
- searchInputUpdate(value)
50
  }}
51
  value={searchValue}
52
- className="sm:ml-px sm:mr-1 sm:mb-6 px-6 sm:p-0 sm:px-0"
53
  autoComplete="off" />
 
54
  </div>
55
- <div className="flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block">
56
  <Panel>
57
  {Object.entries(taxonomies).map((taxonomy, index) => {
58
  return <TaxonomySection
1
  import { useTemplatesStore } from '../state/Templates'
 
2
  // import { SelectControl } from '@wordpress/components'
3
  import { __ } from '@wordpress/i18n'
4
  import { debounce } from 'lodash'
37
  }, [fetchTaxonomies])
38
 
39
  return <>
40
+ <div className="mt-px bg-white mb-6 mx-6 pt-6 lg:mx-0 lg:pt-0">
41
+ <label
42
+ className="sr-only"
43
+ htmlFor="extendify-search-input">{__('What are you looking for?', 'extendify-sdk')}</label>
44
+ <input
45
+ id="extendify-search-input"
46
+ type="search"
47
  placeholder={__('What are you looking for?', 'extendify-sdk')}
48
+ onChange={(event) => {
49
  useTemplatesStore.setState({
50
  nextPage: '',
51
  })
52
+ setSearchValue(event.target.value)
53
+ searchInputUpdate(event.target.value)
54
  }}
55
  value={searchValue}
56
+ className="button-focus bg-gray-100 focus:bg-white border-0 m-0 p-3.5 pb-3 rounded-none text-sm w-full"
57
  autoComplete="off" />
58
+ <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"><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"></path></svg>
59
  </div>
60
+ <div className="mt-px flex-grow hidden overflow-y-auto pb-32 pr-2 pt-px sm:block">
61
  <Panel>
62
  {Object.entries(taxonomies).map((taxonomy, index) => {
63
  return <TaxonomySection
extendify-sdk/src/components/TaxonomyBreadcrumbs.js CHANGED
@@ -2,7 +2,7 @@ import { useTemplatesStore } from '../state/Templates'
2
 
3
  export default function TaxonomyBreadcrumbs() {
4
  const searchParams = useTemplatesStore(state => state.searchParams)
5
- const formatTitle = (title) => title.replace('tax_', '').replace('_' , ' ').replace(/\b\w/g, l => l.toUpperCase())
6
  return <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">
7
  {Object.entries(searchParams.taxonomies).map((tax) => {
8
  // Special exception for page templates
2
 
3
  export default function TaxonomyBreadcrumbs() {
4
  const searchParams = useTemplatesStore(state => state.searchParams)
5
+ const formatTitle = (title) => title.replace('tax_', '').replace(/_/g , ' ').replace(/\b\w/g, l => l.toUpperCase())
6
  return <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">
7
  {Object.entries(searchParams.taxonomies).map((tax) => {
8
  // Special exception for page templates
extendify-sdk/src/components/TaxonomySection.js CHANGED
@@ -60,7 +60,7 @@ export default function TaxonomySection({ taxonomy: [title, data], open }) {
60
  return ''
61
  }
62
 
63
- const theTitle = title.replace('tax_', '').replace('_' , ' ').replace(/\b\w/g, l => l.toUpperCase())
64
  return <PanelBody title={theTitle} initialOpen={open}>
65
  <PanelRow>
66
  <div className="overflow-hidden w-full relative" style={{
60
  return ''
61
  }
62
 
63
+ const theTitle = title.replace('tax_', '').replace(/_/g , ' ').replace(/\b\w/g, l => l.toUpperCase())
64
  return <PanelBody title={theTitle} initialOpen={open}>
65
  <PanelRow>
66
  <div className="overflow-hidden w-full relative" style={{
extendify-sdk/src/{components/Beacon.js → hooks/useBeacon.js} RENAMED
@@ -1,7 +1,9 @@
1
  import { useEffect } from '@wordpress/element'
2
 
3
- export default function Beacon({ show }) {
4
-
 
 
5
  const showBeacon = () => {
6
  const container = document.getElementById('beacon-container')
7
  if (container) {
@@ -71,5 +73,4 @@ export default function Beacon({ show }) {
71
  }
72
  }, [show])
73
 
74
- return <></>
75
  }
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) {
73
  }
74
  }, [show])
75
 
 
76
  }
extendify-sdk/src/layout/HasSidebar.js CHANGED
@@ -17,7 +17,7 @@ export default function HasSidebar({ children }) {
17
  </aside>
18
  <main
19
  id="extendify-templates"
20
- tabIndex="0"
21
  className="w-full smp:l-12 sm:pt-6 h-full overflow-hidden">
22
  {children[1]}
23
  </main>
17
  </aside>
18
  <main
19
  id="extendify-templates"
20
+ // tabIndex="0"
21
  className="w-full smp:l-12 sm:pt-6 h-full overflow-hidden">
22
  {children[1]}
23
  </main>
extendify-sdk/src/layout/MainWindow.js CHANGED
@@ -6,7 +6,7 @@ import Toolbar from './Toolbar'
6
  import Content from '../pages/Content'
7
  import Login from '../pages/Login'
8
  import Welcome from '../pages/Welcome'
9
- import Beacon from '../components/Beacon'
10
  import { useGlobalStore } from '../state/GlobalState'
11
  import { useUserStore } from '../state/User'
12
 
@@ -16,6 +16,7 @@ export default function MainWindow() {
16
  const setOpen = useGlobalStore(state => state.setOpen)
17
  const currentPage = useGlobalStore(state => state.currentPage)
18
  const hasClickedThroughWelcomePage = useUserStore(state => state.hasClickedThroughWelcomePage)
 
19
 
20
  useEffect(() => {
21
  hasClickedThroughWelcomePage && useGlobalStore.setState({
@@ -67,7 +68,6 @@ export default function MainWindow() {
67
  <Login className="w-full flex-grow overflow-hidden bg-extendify-light"/>
68
  }
69
  </div>}
70
- <Beacon show={open}/>
71
  </div>
72
  </Transition.Child>
73
  </div>
6
  import Content from '../pages/Content'
7
  import Login from '../pages/Login'
8
  import Welcome from '../pages/Welcome'
9
+ import useBeacon from '../hooks/useBeacon'
10
  import { useGlobalStore } from '../state/GlobalState'
11
  import { useUserStore } from '../state/User'
12
 
16
  const setOpen = useGlobalStore(state => state.setOpen)
17
  const currentPage = useGlobalStore(state => state.currentPage)
18
  const hasClickedThroughWelcomePage = useUserStore(state => state.hasClickedThroughWelcomePage)
19
+ useBeacon(open)
20
 
21
  useEffect(() => {
22
  hasClickedThroughWelcomePage && useGlobalStore.setState({
68
  <Login className="w-full flex-grow overflow-hidden bg-extendify-light"/>
69
  }
70
  </div>}
 
71
  </div>
72
  </Transition.Child>
73
  </div>
extendify-sdk/src/middleware/NeedsPermissionModal.js CHANGED
@@ -11,8 +11,7 @@ export default function NeedsPermissionModal() {
11
  const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
12
  return <Modal
13
  title={__('Plugins required', 'extendify-sdk')}
14
- closeButtonLabel={__('Return to library', 'extendify-sdk')}
15
- onRequestClose={closeModal}>
16
  <p style={{
17
  maxWidth: '400px',
18
  }}>
11
  const requiredPlugins = wantedTemplate?.fields?.required_plugins || []
12
  return <Modal
13
  title={__('Plugins required', 'extendify-sdk')}
14
+ isDismissible={false}>
 
15
  <p style={{
16
  maxWidth: '400px',
17
  }}>
extendify-sdk/src/middleware/ReloadRequiredModal.js CHANGED
@@ -21,7 +21,9 @@ export default function ReloadRequiredModal() {
21
  reload()
22
  return null
23
  }
24
- return <Modal title={__('Reload required', 'extendify-sdk')} isDismissible={false}>
 
 
25
  <p style={{
26
  maxWidth: '400px',
27
  }}>
21
  reload()
22
  return null
23
  }
24
+ return <Modal
25
+ title={__('Reload required', 'extendify-sdk')}
26
+ isDismissible={false}>
27
  <p style={{
28
  maxWidth: '400px',
29
  }}>
extendify-sdk/src/middleware/hasPluginsActivated/ActivatePluginsModal.js CHANGED
@@ -22,35 +22,36 @@ export default function ActivatePluginsModal(props) {
22
 
23
  return <Modal
24
  title={__('Activate required plugins', 'extendify-sdk')}
25
- closeButtonLabel={__('No thanks, return to library', 'extendify-sdk')}
26
- onRequestClose={closeModal}
27
  >
28
- <p style={{
29
- maxWidth: '400px',
30
- }}>
31
- {props.message ?? __(sprintf('There is just one more step. This %s requires the following plugins to be installed and activated:',
32
- wantedTemplate?.fields?.type ?? 'template'),
33
- 'extendify-sdk')}
34
- </p>
35
- <ul>
36
- {
37
- // Hardcoded temporarily to not force EP install
38
- // requiredPlugins.map((plugin) =>
39
- requiredPlugins.filter((p) => p !== 'editorplus').map((plugin) =>
40
- <li key={plugin}>
41
- {getPluginDescription(plugin)}
42
- </li>)
43
- }
44
- </ul>
45
- <ButtonGroup>
46
- <Button isPrimary onClick={installPlugins}>
47
- {__('Activate Plugins', 'extendify-sdk')}
48
- </Button>
49
- {props.showClose && <Button isTertiary onClick={closeModal} style={{
50
- boxShadow: 'none', margin: '0 4px',
51
  }}>
52
- {__('No thanks, return to library', 'extendify-sdk')}
53
- </Button>}
54
- </ButtonGroup>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  </Modal>
56
  }
22
 
23
  return <Modal
24
  title={__('Activate required plugins', 'extendify-sdk')}
25
+ isDismissible={false}
 
26
  >
27
+ <div>
28
+ <p style={{
29
+ maxWidth: '400px',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }}>
31
+ {props.message ?? __(sprintf('There is just one more step. This %s requires the following plugins to be installed and activated:',
32
+ wantedTemplate?.fields?.type ?? 'template'),
33
+ 'extendify-sdk')}
34
+ </p>
35
+ <ul>
36
+ {
37
+ // Hardcoded temporarily to not force EP install
38
+ // requiredPlugins.map((plugin) =>
39
+ requiredPlugins.filter((p) => p !== 'editorplus').map((plugin) =>
40
+ <li key={plugin}>
41
+ {getPluginDescription(plugin)}
42
+ </li>)
43
+ }
44
+ </ul>
45
+ <ButtonGroup>
46
+ <Button isPrimary onClick={installPlugins}>
47
+ {__('Activate Plugins', 'extendify-sdk')}
48
+ </Button>
49
+ {props.showClose && <Button isTertiary onClick={closeModal} style={{
50
+ boxShadow: 'none', margin: '0 4px',
51
+ }}>
52
+ {__('No thanks, return to library', 'extendify-sdk')}
53
+ </Button>}
54
+ </ButtonGroup>
55
+ </div>
56
  </Modal>
57
  }
extendify-sdk/src/middleware/hasPluginsActivated/ActivatingModal.js CHANGED
@@ -30,7 +30,9 @@ export default function ActivatingModal() {
30
  return <ErrorActivating msg={errorMessage}/>
31
  }
32
 
33
- return <Modal title={__('Activating plugins', 'extendify-sdk')} isDismissible={false}>
 
 
34
  <Button
35
  style={{
36
  width: '100%',
30
  return <ErrorActivating msg={errorMessage}/>
31
  }
32
 
33
+ return <Modal
34
+ title={__('Activating plugins', 'extendify-sdk')}
35
+ isDismissible={false}>
36
  <Button
37
  style={{
38
  width: '100%',
extendify-sdk/src/middleware/hasRequiredPlugins/InstallingModal.js CHANGED
@@ -28,7 +28,9 @@ export default function InstallingModal() {
28
  return <ErrorInstalling msg={errorMessage}/>
29
  }
30
 
31
- return <Modal title={__('Installing plugins', 'extendify-sdk')} isDismissible={false}>
 
 
32
  <Button style={{
33
  width: '100%',
34
  }} disabled isPrimary isBusy onClick={() => {}}>
28
  return <ErrorInstalling msg={errorMessage}/>
29
  }
30
 
31
+ return <Modal
32
+ title={__('Installing plugins', 'extendify-sdk')}
33
+ isDismissible={false}>
34
  <Button style={{
35
  width: '100%',
36
  }} disabled isPrimary isBusy onClick={() => {}}>
extendify-sdk/src/middleware/hasRequiredPlugins/RequiredPluginsModal.js CHANGED
@@ -27,8 +27,7 @@ export default function RequiredPluginsModal(props) {
27
 
28
  return <Modal
29
  title={props.title ?? __('Install required plugins', 'extendify-sdk')}
30
- closeButtonLabel={__('No thanks, take me back', 'extendify-sdk')}
31
- onRequestClose={closeModal}
32
  >
33
  <p style={{
34
  maxWidth: '400px',
27
 
28
  return <Modal
29
  title={props.title ?? __('Install required plugins', 'extendify-sdk')}
30
+ isDismissible={false}
 
31
  >
32
  <p style={{
33
  maxWidth: '400px',
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.22.0
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.22.0';
39
 
40
  /**
41
  * Pro installed version number
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.22.1
10
  * Author: MetaSlider
11
  * Author URI: https://www.metaslider.com
12
  * License: GPL-2.0+
35
  *
36
  * @var string
37
  */
38
+ public $version = '3.22.1';
39
 
40
  /**
41
  * Pro installed version number
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.22.0
6
  Requires PHP: 5.2
7
  Tested up to: 5.8
8
  License: GPLv2 or later
@@ -288,8 +288,12 @@ See https://www.metaslider.com/documentation/image-cropping/
288
 
289
  == Changelog ==
290
 
 
 
 
 
291
  = 3.22.0 - 2021/Aug/05 =
292
- * TWEAK: Remove plugin dependency from editor library
293
 
294
  = 3.21.0 - 2021/July/19 =
295
  * FEATURE: Adds MetaSLider patterns to editor Library
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.22.1
6
  Requires PHP: 5.2
7
  Tested up to: 5.8
8
  License: GPLv2 or later
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
294
+
295
  = 3.22.0 - 2021/Aug/05 =
296
+ * TWEAK: Removes plugin dependency from editor library
297
 
298
  = 3.21.0 - 2021/July/19 =
299
  * FEATURE: Adds MetaSLider patterns to editor Library