AMP for WordPress - Version 1.4.1

Version Description

Download this release

Release Info

Developer westonruter
Plugin Icon 128x128 AMP for WordPress
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

amp.php CHANGED
@@ -5,7 +5,7 @@
5
* Plugin URI: https://amp-wp.org
6
* Author: AMP Project Contributors
7
* Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
- * Version: 1.4.0
9
* Text Domain: amp
10
* Domain Path: /languages/
11
* License: GPLv2 or later
@@ -15,7 +15,7 @@
15
16
define( 'AMP__FILE__', __FILE__ );
17
define( 'AMP__DIR__', dirname( __FILE__ ) );
18
- define( 'AMP__VERSION', '1.4.0' );
19
20
/**
21
* Errors encountered while loading the plugin.
5
* Plugin URI: https://amp-wp.org
6
* Author: AMP Project Contributors
7
* Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
+ * Version: 1.4.1
9
* Text Domain: amp
10
* Domain Path: /languages/
11
* License: GPLv2 or later
15
16
define( 'AMP__FILE__', __FILE__ );
17
define( 'AMP__DIR__', dirname( __FILE__ ) );
18
+ define( 'AMP__VERSION', '1.4.1' );
19
20
/**
21
* Errors encountered while loading the plugin.
assets/css/amp-stories-editor-compiled-rtl.css CHANGED
@@ -1 +1 @@
1
- :root{--preview-scale:1;--preview-translateX:0%;--preview-translateY:0%}.edit-post-visual-editor{padding-right:50px;padding-left:50px}.block-editor-block-preview .block-editor-block-preview__content>div,.editor-styles-wrapper #amp-story-editor,.editor-styles-wrapper .wp-block:not([data-font-family]){font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}@media screen and (min-width:1280px){#amp-story-editor{min-width:820px}}#amp-story-editor .components-placeholder{background:#f3f3f3}#amp-story-editor .block-editor-block-list__block .block-editor-block-list__empty-block-inserter,#amp-story-editor .block-editor-block-list__block>.block-editor-block-list__insertion-point,#amp-story-editor .block-editor-block-list__layout .block-editor-default-block-appender{display:none!important}.editor-styles-wrapper #amp-story-editor [data-block]{margin-top:0;margin-bottom:0}.wp-block-quote__citation{font-size:16px;margin-top:24px;display:block}.editor-styles-wrapper .wp-block-quote p{line-height:34px;font-weight:700;font-size:30px;font-family:Source Sans Pro,sans-serif}.wp-block-quote,.wp-block-quote[style*="text-align: right"]{border:none;padding-top:100px}.block-editor-block-list__layout .block-editor-block-list__block [data-type="core/quote"] .block-editor-block-list__block-edit:before{left:-5px;right:-5px;top:-5px;bottom:-5px}:not(.amp-story-page-preview) :not(.amp-stories__editor-inserter__results) .components-disabled .wp-block-quote.is-style-white{background-color:#313131}.amp-stories__editor-inserter__menu .amp-stories__editor-inserter__results .components-disabled .wp-block-quote.is-style-white,.amp-story-reorderer-item .amp-story-page-preview .components-disabled .wp-block-quote.is-style-white{background-color:transparent;background-color:initial}.wp-block .components-resizable-box__container+.__resizable_base__{right:0!important}.wp-block[data-type="core/list"] .amp-story-editor__rotate-container,.wp-block[data-type="core/list"] .block-mover,.wp-block[data-type="core/list"] .block-mover div{height:100%}.wp-block[data-type="core/code"] .amp-story-editor__rotate-container,.wp-block[data-type="core/code"] .block-mover,.wp-block[data-type="core/code"] .block-mover div{height:100%}.wp-block[data-type="core/video"] .block-mover,.wp-block[data-type="core/video"] .block-mover div{height:100%}.wp-block[data-type="core/video"] .block-mover .editor-rich-text.block-editor-rich-text,.wp-block[data-type="core/video"] .block-mover .editor-rich-text.block-editor-rich-text div{height:auto}.wp-block[data-type="core/video"] .wp-block-video{margin:0}.wp-block-code textarea{white-space:nowrap}.wp-block[data-type="core/preformatted"] div[draggable=true],.wp-block[data-type="core/verse"] div[draggable=true]{border:5px solid transparent}.wp-block-preformatted .block-editor-rich-text__editable,.wp-block-verse .block-editor-rich-text__editable{white-space:nowrap!important;padding:5px}.wp-block-pullquote,.wp-block[data-type="core/pullquote"] .block-mover,.wp-block[data-type="core/pullquote"] .block-mover div{height:100%}.wp-block-table,.wp-block[data-type="core/table"] .block-mover,.wp-block[data-type="core/table"] .block-mover div{height:100%}.wp-block[data-type="core/table"] .block-mover .components-placeholder,.wp-block[data-type="core/table"] .block-mover .components-placeholder div{height:auto}.block-library-list ul li,.wp-block-preformatted pre,.wp-block-verse pre{cursor:auto}.block-library-list{padding:5px}.block-library-list ul,.wp-block-preformatted pre,.wp-block-verse pre{margin:0}.edit-post-more-menu__content .components-menu-group:first-of-type .components-button:first-of-type{display:none}.edit-post-more-menu__content .components-menu-group:nth-last-of-type(2) div[role=group]>.components-button:first-child{display:none}.editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-block-list__block-edit>:not(.editor-warning){pointer-events:all}.editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-block-list__block-edit>div>div:not(.editor-warning){pointer-events:none}div[data-amp-caption=noCaption] .wp-block-video figcaption,div[data-amp-caption=noCaption] figure.wp-block-image figcaption{display:none}.wp-block .is-amp-fit-text{word-wrap:normal}.wp-block-video,.wp-block-video .components-disabled{height:100%}.wp-block-video .components-disabled{overflow:hidden}.wp-block-video video{height:100%;width:100%}.media-frame.has-two-notices .media-frame-content{bottom:120px}.components-panel__body .components-notice{margin-right:0;margin-left:0}.video-block__poster-image.editor-post-featured-image__preview img{-o-object-fit:cover;object-fit:cover}@keyframes story-animation-pulse{0%{transform:scale(1)}25%{transform:scale(.95)}75%{transform:scale(1.05)}to{transform:scale(1)}}.story-animation-pulse{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-pulse;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(.4,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pulse{transform:scale(1)}@keyframes story-animation-fly-in-left{0%{transform:translate(var(--animation-offset-x))}to{transform:translate(0)}}.story-animation-fly-in-left{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-fly-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-left{transform:translate(var(--animation-offset-x))}@keyframes story-animation-fly-in-right{0%{transform:translate(var(--animation-offset-x))}to{transform:translate(0)}}.story-animation-fly-in-right{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-fly-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-right{transform:translate(var(--animation-offset-x))}@keyframes story-animation-fly-in-top{0%{transform:translateY(var(--animation-offset-y))}to{transform:translate(0)}}.story-animation-fly-in-top{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-fly-in-top;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-top{transform:translateY(var(--animation-offset-y))}@keyframes story-animation-fly-in-bottom{0%{transform:translateY(var(--animation-offset-y))}to{transform:translate(0)}}.story-animation-fly-in-bottom{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-fly-in-bottom;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-bottom{transform:translateY(var(--animation-offset-y))}@keyframes story-animation-rotate-in-left{0%{transform:translate(var(--animation-offset-x)) rotate(1turn)}to{transform:translate(0)}}.story-animation-rotate-in-left{--animation-duration:600ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-rotate-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-rotate-in-left{transform:translate(var(--animation-offset-x)) rotate(1turn)}@keyframes story-animation-rotate-in-right{0%{transform:translate(var(--animation-offset-x)) rotate(1turn)}to{transform:translate(0)}}.story-animation-rotate-in-right{--animation-duration:600ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-rotate-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-rotate-in-right{transform:translate(var(--animation-offset-x)) rotate(1turn)}@keyframes story-animation-fade-in{0%{opacity:0}to{opacity:1}}.story-animation-fade-in{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-fade-in;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fade-in{opacity:0}@keyframes story-animation-drop{0%{transform:translateY(calc(-1*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}30%{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}52%{transform:translateY(calc(-0.6*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}74%{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}83%{transform:translateY(calc(-0.3*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}to{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}}.story-animation-drop{--animation-duration:1600ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-drop;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-drop{transform:translateY(calc(-1*var(--animation-offset-y)))}@keyframes story-animation-twirl-in{0%{transform:rotate(540deg) scale(.1);opacity:0}to{transform:none;opacity:1}}.story-animation-twirl-in{--animation-duration:1000ms;--animation-delay:0ms;animation-name:story-animation-twirl-in;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(.2,.75,.4,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-twirl-in{transform:rotate(540deg) scale(.1);opacity:0}@keyframes story-animation-whoosh-in-left{0%{opacity:0;transform:translate(var(--animation-offset-x)) scale(.15)}to{opacity:1;transform:translate(0) scale(1)}}.story-animation-whoosh-in-left{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-whoosh-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-whoosh-in-left{transform:translate(var(--animation-offset-x)) scale(.15);opacity:0}@keyframes story-animation-whoosh-in-right{0%{opacity:0;transform:translate(var(--animation-offset-x)) scale(.15)}to{opacity:1;transform:translate(0) scale(1)}}.story-animation-whoosh-in-right{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-whoosh-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-whoosh-in-right{transform:translate(var(--animation-offset-x)) scale(.15);opacity:0}@keyframes story-animation-pan-left{0%{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-left{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1;--animation-scale-end:1;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-left;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-left{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-right{0%{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-right{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-right;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-right{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-down{0%{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-down{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-down;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-down{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-up{0%{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-up{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-up;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-up{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-zoom-in{0%{transform:scale(var(--animation-scale-start))}to{transform:scale(var(--animation-scale-end))}}.story-animation-zoom-in{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1;--animation-scale-end:3;animation-name:story-animation-zoom-in;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-zoom-in{transform:scale(var(--animation-scale-start))}@keyframes story-animation-zoom-out{0%{transform:scale(var(--animation-scale-start))}to{transform:scale(var(--animation-scale-end))}}.story-animation-zoom-out{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:3;--animation-scale-end:1;animation-name:story-animation-zoom-out;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-zoom-out{transform:scale(var(--animation-scale-start))}#amp-story-block-navigation{display:none;position:absolute;right:45px;top:75px;width:300px;min-width:115px;z-index:80;list-style-type:none;padding:0;margin:0}@media (max-width:1200px){.is-sidebar-opened #amp-story-block-navigation{right:0}}@media (min-width:1001px) and (max-width:1100px){.is-sidebar-opened .editor-block-list__layout{margin-left:-100px}}@media (min-width:961px){#amp-story-block-navigation{display:block}}@media (min-width:961px) and (max-width:1000px){.is-sidebar-opened #amp-story-block-navigation{display:none}}#amp-story-block-navigation .editor-inserter{position:absolute;bottom:100%;right:0;width:100%}#amp-story-block-navigation .components-popover:not(.is-mobile).is-center .components-popover__content{transform:translateX(13%)}.post-type-amp_story.folded #amp-story-block-navigation .components-popover:not(.is-mobile):not(.is-middle).is-right .components-popover__content{margin-right:-50px}#amp-story-block-navigation .block-editor-block-navigation__list{list-style-type:none;margin-bottom:15px;margin-right:0;padding-right:0}#amp-story-block-navigation .editor-block-navigation__list__static{margin:0;padding:0}#amp-story-block-navigation .components-icon-button .dashicon{margin-left:5px}#amp-story-block-navigation .block-editor-block-navigation__label{margin:0 0 1em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}:root{--block-settings-sidebar-width:280px;--admin-menu-expanded-sidebar-width:160px;--admin-menu-collapsed-sidebar-width:36px;--amp-story-content-width:334px;--block-editor-horizontal-margin:50px;--scrollbar-width:20px;--block-navigation-right-margin:45px}.post-type-amp_story:not(.folded) .edit-post-layout #amp-story-block-navigation{max-width:calc((100vw - 614px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-expanded-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story.folded .edit-post-layout #amp-story-block-navigation{max-width:calc((100vw - 490px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-collapsed-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story .edit-post-layout.is-sidebar-opened #amp-story-block-navigation{max-width:calc((100vw - 894px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-expanded-sidebar-width) - var(--block-settings-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story.folded #amp-story-block-navigation{max-width:calc(100vw - 370px);max-width:calc(100vw - var(--admin-menu-collapsed-sidebar-width) - var(--amp-story-content-width))}.post-type-amp_story.folded .edit-post-layout.is-sidebar-opened #amp-story-block-navigation{max-width:calc((100vw - 770px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-collapsed-sidebar-width) - var(--block-settings-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}@media (max-width:960px){.block-editor-block-list__block-edit>div>.editor-selectors{display:none}}.edit-post-header-toolbar .components-icon-button.block-editor-block-navigation{display:none}@media (min-width:961px){.edit-post-header-toolbar #amp-story-media-inserter,.edit-post-header-toolbar #amp-story-shortcuts{display:flex}.edit-post-visual-editor .editor-post-title__block{margin-right:0;margin-left:0}.block-editor-block-navigation__container{background:#fff;border:1px solid #eee;padding:1em}.block-editor-block-navigation__container .component-editor__selector button{background:no-repeat 100% 0;padding-right:37px;height:40px;margin:1px 4px 1px 0}.block-editor-block-navigation__container .component-editor__selector .components-button:focus{box-shadow:none}.components-range-control__number{width:60px}}.block-editor-block-navigation__list .block-editor-block-navigation__item{position:relative}.block-editor-block-navigation__list .block-editor-block-navigation__item-is-dragging{cursor:grab}.block-editor-block-navigation__list .block-editor-block-navigation__item .components-drop-zone{border:none;border-radius:0}.block-editor-block-navigation__list .block-editor-block-navigation__item .components-drop-zone.is-dragging-over-element .components-drop-zone__content{display:none}.block-editor-block-navigation__list li .block-editor-block-navigation__item .components-drop-zone{background:none}.block-editor-block-navigation__list li .block-navigation__placeholder{transition:height .3s ease;height:0}.block-editor-block-navigation__list li .block-editor-block-navigation__item .components-drop-zone.is-close-to-top+.block-navigation__placeholder{visibility:hidden;height:36px}.block-editor-block-navigation__list li:last-child .components-drop-zone:not(.is-close-to-top){height:72px}.block-editor-block-navigation__item-is-dragging>.editor-block-navigation__item-button{display:none}#amp-story-editor-carousel{display:none}@media (min-width:961px){#amp-story-editor-carousel{display:block}}#amp-story-editor{position:relative;overflow:hidden}#amp-story-editor>.editor-block-list__layout{padding-right:0;padding-left:0;display:flex;align-items:center;transform:none;transition:transform .3s ease-in-out}#amp-story-editor>.editor-block-list__layout .block-list-appender{display:none}.amp-story-editor-carousel-navigation{display:flex;justify-content:space-between;margin-top:5em}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list{flex:1;display:flex;margin:0;padding:0;list-style-type:none;justify-content:center;max-width:30%}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item{flex:1;height:.5em;max-width:5em}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item+.amp-story-editor-carousel-item{margin-right:20px}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button{background:#eff0f1;width:100%;height:100%;display:block}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button:focus,.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button:hover{background:#e0e0e0}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item--active button{background:#666}.amp-story-editor-carousel-item-wrapper{width:100%;height:100%}.components-draggable__clone .amp-story-editor-carousel-item-wrapper{height:8px}.amp-story-editor-carousel-item{position:relative}.amp-story-editor-carousel-item .components-drop-zone{right:-10px;width:calc(100% + 20px);height:18px;top:-5px;border:none;border-radius:0}.amp-story-editor-carousel-item .components-drop-zone.is-active{background:none}.amp-story-editor-carousel-item .components-drop-zone.is-close-to-right{border-left:4px solid #0071a1;right:-8px}.amp-story-editor-carousel-item .components-drop-zone.is-close-to-left{border-right:4px solid #0071a1;right:-12px}.amp-story-editor-carousel-item .components-drop-zone .components-drop-zone__content-icon,.amp-story-editor-carousel-item .components-drop-zone .components-drop-zone__content-text,.amp-story-editor-carousel-item .components-drop-zone.is-dragging-indicator{display:none}.indicator-page-number{font-size:13px;display:block;margin-top:10px;color:#555d66}.amp-story-editor-carousel-item--active .indicator-page-number{font-weight:600}.block-editor-block-list__block .block-editor-post-input,.block-editor-post-input{flex-grow:1;position:relative;padding:1px}.block-editor-post-input input[type=text]{font-size:13px;width:300px;padding:12px;border-color:#007cba;outline:2px solid transparent;border-radius:0;margin-right:0;margin-left:0}body.admin-color-sunrise .block-editor-post-input input[type=text]{border-color:#d1864a}body.admin-color-ocean .block-editor-post-input input[type=text]{border-color:#a3b9a2}body.admin-color-midnight .block-editor-post-input input[type=text]{border-color:#e14d43}body.admin-color-ectoplasm .block-editor-post-input input[type=text]{border-color:#a7b656}body.admin-color-coffee .block-editor-post-input input[type=text]{border-color:#c2a68c}body.admin-color-blue .block-editor-post-input input[type=text]{border-color:#82b4cb}body.admin-color-light .block-editor-post-input input[type=text]{border-color:#007cba}.block-editor-post-input label{font-size:14px}.block-editor-post-input__suggestions{display:inherit;max-height:200px;transition:all .15s ease-in-out;padding:4px 0;width:302px;overflow-y:auto}.block-editor-post-input__suggestion{padding:4px 8px;color:#6c7781;display:block;font-size:13px;cursor:pointer;background:#fff;width:100%;border:none;text-align:right;box-shadow:none}.block-editor-post-input__suggestion:hover{background:#e2e4e7}.block-editor-post-input__suggestion.is-selected,.block-editor-post-input__suggestion:focus{background:#e2e4e7;outline:none}.amp-story-reorderer{margin-top:100px;display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,169px);grid-gap:0;justify-content:space-between}.amp-story-reorderer .amp-story-reorderer-item{margin:0 auto 10px;width:100%;position:relative}.amp-story-reorderer .amp-story-reorderer-item .amp-story-reorderer-item-page{max-width:165px;height:270px}.amp-story-reorderer .block-editor-block-preview .block-editor-block-preview__content .components-disabled{transform:none;text-align:right;text-align:initial}.amp-story-reorderer .block-editor-block-list__layout .block-editor-block-list__block{padding:0}.amp-story-reorderer .editor-block-list__layout.block-editor-block-list__layout,.amp-story-reorderer .editor-inner-blocks.block-editor-inner-blocks{height:100%;padding:0}.amp-story-reorderer .components-disabled,.amp-story-reorderer .components-disabled div:first-of-type{padding:0;width:100%;height:100%}.amp-story-reorderer .amp-story-reorderer-item .amp-story-reorderer-item-page .wp-block{--preview-scale:0.47;--preview-translateX:-40%;--preview-translateY:-70%;position:absolute;transform:scale(var(--preview-scale)) translateX(var(--preview-translateX)) translateY(var(--preview-translateY))}.amp-story-reorderer .block-editor-block-list__layout>.block-editor-block-list__block>.block-editor-block-list__block-edit{margin-top:0;margin-bottom:0}@media (min-width:600px){.amp-story-reorderer .block-editor-block-list__block-edit{margin-right:-50px;margin-left:-50px}}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone{border:none;border-radius:0;background:transparent}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-active{opacity:0;visibility:hidden}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element,.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-page{opacity:1;visibility:visible;transition:opacity .3s,background-color .3s}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-page{background:#eff0f1;border:none!important;margin:0 10px}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element.is-close-to-right{border-left:3px solid #0071a1}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element.is-close-to-left{border-right:3px solid #0071a1}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone__content,.amp-story-reorderer .amp-story-reorderer-item .is-dragging-over-element .components-drop-zone__content{display:none}.amp-story-reorderer .amp-story-page-preview{border:5px solid #eff0f1;border-radius:5px;background:#fff;width:100%;height:100%;cursor:grab;overflow:hidden}#amp-story-editor .amp-story-reorderer .components-draggable__clone{position:fixed}.amp-story-reorderer .amp-story-page-preview .editor-styles-wrapper{margin:0;height:260px}.amp-story-reorderer .amp-story-page-preview .editor-block-list__layout{padding:0}.amp-story-reorderer .amp-story-page-preview .block-list-appender{display:none}#amp-story-media-inserter,#amp-story-shortcuts{display:inline-flex}#amp-story-controls{text-align:left;padding-left:20px}.amp-story-controls-reorder{box-sizing:border-box;height:49px;width:49px;border:1px solid #aaaeb3;border-radius:50%}#amp-story-controls .amp-story-controls-reorder{display:inline-block;line-height:1}.amp-story-controls-reorder-cancel{padding-top:5px;padding-bottom:5px;margin-left:20px;display:inline-flex}.amp-story-controls-reorder-save{float:left}.amp-story-page-snap-lines{position:absolute;top:0;pointer-events:none;z-index:20}.amp-story-page-snap-lines line{stroke:red;pointer-events:none}.amp-story-order-controls .amp-story-controls-description{display:none}.amp-story-order-controls-wrap{display:flex;align-items:center;justify-content:space-between}.amp-story-order-controls-wrap .components-icon-button{display:block;-ms-grid-row-align:start;align-self:start;text-align:center;color:inherit}.amp-story-order-controls-wrap .components-icon-button svg{display:block;margin:0 auto}.wp-block [draggable=true]{-webkit-user-select:auto}.wp-block [draggable=true]:hover{cursor:grab}.wp-block[data-type="amp/amp-story-text"] .editor-rich-text__editable:hover,.wp-block[data-type="core/quote"] .editor-rich-text__editable:hover{cursor:default}.components-draggable__clone .components-resizable-box__handle,.components-draggable__clone .rotatable-box-wrap:before,.components-draggable__clone .rotatable-box-wrap__handle{display:none;opacity:0;visibility:hidden;content:none}#amp-story-controls .editor-inserter__amp-inserter{height:48px;width:48px;background-color:#007cba;border-radius:50%;margin-left:10px}body.admin-color-sunrise #amp-story-controls .editor-inserter__amp-inserter{background-color:#d1864a}body.admin-color-ocean #amp-story-controls .editor-inserter__amp-inserter{background-color:#a3b9a2}body.admin-color-midnight #amp-story-controls .editor-inserter__amp-inserter{background-color:#e14d43}body.admin-color-ectoplasm #amp-story-controls .editor-inserter__amp-inserter{background-color:#a7b656}body.admin-color-coffee #amp-story-controls .editor-inserter__amp-inserter{background-color:#c2a68c}body.admin-color-blue #amp-story-controls .editor-inserter__amp-inserter{background-color:#82b4cb}body.admin-color-light #amp-story-controls .editor-inserter__amp-inserter{background-color:#007cba}#amp-story-controls .editor-inserter__amp-inserter svg{margin:0 auto}.autocomplete__wrapper{position:relative}.autocomplete__hint,.autocomplete__input{-webkit-appearance:none;border:2px solid;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%}.autocomplete__input{background-color:transparent;position:relative}.autocomplete__hint{color:#bfc1c3;position:absolute}.autocomplete__input--default{padding:4px}.autocomplete__input--focused{outline-offset:0;outline:3px solid #ffbf47}.autocomplete__input--show-all-values{padding:4px 4px 4px 34px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;left:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#34384b;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:0 2px 6px rgba(0,0,0,.256863);right:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-right-width:0;border-bottom:1px solid #bfc1c3;border-left-width:0;border-top-width:1px;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#005ea5;border-color:#005ea5;color:#fff;outline:none}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:16px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:4px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:19px;line-height:1.31579}}.autocomplete__wrapper .autocomplete__menu{border-color:#007cba;width:101%;border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;margin-top:-3px;padding-top:3px;max-height:200px}body.admin-color-sunrise .autocomplete__wrapper .autocomplete__menu{border-color:#d1864a}body.admin-color-ocean .autocomplete__wrapper .autocomplete__menu{border-color:#a3b9a2}body.admin-color-midnight .autocomplete__wrapper .autocomplete__menu{border-color:#e14d43}body.admin-color-ectoplasm .autocomplete__wrapper .autocomplete__menu{border-color:#a7b656}body.admin-color-coffee .autocomplete__wrapper .autocomplete__menu{border-color:#c2a68c}body.admin-color-blue .autocomplete__wrapper .autocomplete__menu{border-color:#82b4cb}body.admin-color-light .autocomplete__wrapper .autocomplete__menu{border-color:#007cba}.autocomplete__icon{position:absolute;top:2px;left:0;padding:4px;box-shadow:none!important;border:0}.autocomplete__option{border-bottom:0;padding:6px 8px;font-size:13px}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#0071a1;border-color:#0071a1}.autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{color:#191e23;border-color:#007cba;box-shadow:0 0 0 1px #007cba;outline:2px solid transparent}body.admin-color-sunrise .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#d1864a;box-shadow:0 0 0 1px #d1864a}body.admin-color-ocean .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#a3b9a2;box-shadow:0 0 0 1px #a3b9a2}body.admin-color-midnight .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#e14d43;box-shadow:0 0 0 1px #e14d43}body.admin-color-ectoplasm .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#a7b656;box-shadow:0 0 0 1px #a7b656}body.admin-color-coffee .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#c2a68c;box-shadow:0 0 0 1px #c2a68c}body.admin-color-blue .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#82b4cb;box-shadow:0 0 0 1px #82b4cb}body.admin-color-light .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-mover{display:none!important}.components-draggable__clone .block-editor-block-list__block .rotatable-box-wrap{display:none;opacity:0}.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-contextual-toolbar,.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-list__breadcrumb,.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-list__insertion-point{display:none!important}.block-editor-block-list__block .rotatable-box-wrap{position:absolute;left:-14px;bottom:-44px;right:calc(50% - 15px);width:30px;height:44px;z-index:1}.block-editor-block-list__block .rotatable-box-wrap:before{display:block;content:"";cursor:inherit;border-right:1px solid rgba(66,88,99,.4);height:24px;width:0;margin:3px auto 0;position:relative;left:-1px}.block-editor-block-list__block .rotatable-box-wrap .rotatable-box-wrap__handle{display:block;opacity:1;transition:opacity .3s;position:absolute;bottom:0;right:calc(50% - 24px);width:50px;height:24px;padding:4px;cursor:move;background:transparent;border:none}.rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#007cba;border:2px solid #fff;border-radius:50%;content:"";cursor:inherit;display:block;height:15px;width:15px;margin:0 auto}body.admin-color-sunrise .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#d1864a}body.admin-color-ocean .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#a3b9a2}body.admin-color-midnight .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#e14d43}body.admin-color-ectoplasm .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#a7b656}body.admin-color-coffee .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#c2a68c}body.admin-color-blue .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#82b4cb}body.admin-color-light .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#007cba}.block-editor-inner-blocks .wp-block.is-typing .rotatable-box-wrap,.block-editor-inner-blocks .wp-block .rotatable-box-wrap{display:block;opacity:0;transition:opacity .3s}.block-editor-inner-blocks .wp-block .amp-story-resize-container.is-resizing .rotatable-box-wrap,.block-editor-inner-blocks .wp-block.is-typing .rotatable-box-wrap{opacity:0}.block-editor-inner-blocks .wp-block.is-rotating .rotatable-box-wrap,.block-editor-inner-blocks .wp-block.is-selected .rotatable-box-wrap,.block-editor-inner-blocks .wp-block:hover .rotatable-box-wrap{opacity:1}#amp-story-right-click-menu{position:absolute}#amp-story-right-click-menu .amp-story-right-click-menu__popover{position:absolute;top:0!important;left:0!important}.amp-story-right-click-menu__popover.is-top.is-from-bottom .components-popover__content{margin-bottom:-8px}.amp-right-click-menu__container{position:absolute}.components-preview-picker__buttons{display:flex;justify-content:space-between;align-items:center}.components-preview-picker__dropdown-content .components-button{display:block;position:relative;padding:10px 40px 10px 20px;width:100%;text-align:right}.components-preview-picker__dropdown-content .components-button:hover{color:#191e23;border:none;box-shadow:none;background:#f3f4f5}.components-preview-picker__dropdown-content .components-button:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-2px;outline:1px dotted #555d66}.components-preview-picker__dropdown-content .components-button .dashicon{position:absolute;top:calc(50% - 10px);right:10px}.components-preview-picker__dropdown-content .components-button .editor-block-icon{position:absolute;top:calc(50% - 10px);left:10px}.components-preview-picker__buttons .components-preview-picker__selector{background:none;position:relative;width:200px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:4px;border:1px solid #8d96a0}.components-preview-picker__buttons .components-preview-picker__selector:focus{color:#191e23;border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.components-preview-picker__buttons .components-preview-picker__selector:after{content:"";pointer-events:none;display:block;width:0;height:0;border-right:3px solid transparent;border-left:3px solid transparent;border-top:5px solid;margin-right:4px;margin-left:2px;left:8px;top:12px;position:absolute}.amp__block-editor-inserter__menu.block-editor-inserter__menu{flex-direction:column}.amp-story-resize-container .components-resizable-box__handle{display:block;opacity:0;transition:opacity .3s}.block-editor-inner-blocks .wp-block.is-typing .amp-story-resize-container .components-resizable-box__handle{opacity:0}.block-editor-inner-blocks .wp-block .amp-story-resize-container.is-resizing .components-resizable-box__handle,.block-editor-inner-blocks .wp-block.is-selected .amp-story-resize-container .components-resizable-box__handle,.block-editor-inner-blocks .wp-block:hover .amp-story-resize-container .components-resizable-box__handle{opacity:1}.amp-story-resize-container .components-resizable-box__handle-top{top:-14px!important}.amp-story-resize-container .components-resizable-box__handle-right{right:-14px!important}.amp-story-resize-container .components-resizable-box__handle-bottom{bottom:-14px!important}.amp-story-resize-container .components-resizable-box__handle-left{left:-14px!important}.amp-story-editor__rotate-container .components-resizable-box__handle{display:none!important}.amp-story-resize-container .amp-story-editor__rotate-container{height:100%}.wp-block-image .components-resizable-box__container img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-drag:none}.block-editor-block-list__block[data-type="core/image"] img{-webkit-user-drag:none}.editor-block-list__layout div[data-type="amp/amp-story-cta"]{top:80%;right:0;width:100%;height:20%}.block-editor-block-list__layout div[data-type="amp/amp-story-cta"]:not(#id){margin-top:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] img{max-height:86px}.amp-block-story-cta__link img{-o-object-fit:contain;object-fit:contain}.amp-block-story-cta__link .amp-text-placeholder{opacity:.62}div[data-type="amp/amp-story-cta"] .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;right:0;left:0;bottom:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] .editor-block-mover{display:none}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit{--cta-margin:3px;height:calc(100% + var(--cta-margin)*2);width:100%;bottom:var(--cta-margin)}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit:before{top:0;right:0;bottom:0;left:0}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-contextual-toolbar{margin-right:-1px;margin-left:0}.amp-story-cta-button{position:absolute}.wp-block-amp-amp-story-cta{display:inline-block;padding:5px;margin-bottom:0;position:relative}.wp-block-amp-amp-story-cta [contenteditable]{cursor:text}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]+.block-editor-rich-text__editable{opacity:.8}.block-editor-block-preview__content .wp-block-amp-amp-story-cta{max-width:100%}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable code{background:inherit;color:inherit}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]{height:auto}.wp-block-amp-amp-story-cta .amp-block-story-cta__link{max-width:100%;overflow:hidden;white-space:nowrap!important;text-overflow:ellipsis}.amp-block-story-cta__link{border:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:18px;margin:0;padding:7px 19px 0;text-align:center;text-decoration:none;white-space:normal;word-wrap:break-word;line-height:1.15}.amp-block-story-cta__inline-link{background:#fff;display:flex;flex-wrap:wrap;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:374px;position:absolute;z-index:10;margin-top:-.5em;top:100%}.is-dragging-components-draggable .amp-block-story-cta__inline-link{display:none}.amp-block-story-cta__inline-link .block-editor-url-input{width:auto}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]{border:1px solid #ddd}.amp-block-story-cta__inline-link .block-editor-url-input__suggestions{width:302px;z-index:10}.amp-block-story-cta__inline-link>.dashicon{width:36px}.amp-block-story-cta__inline-link .dashicon{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]:-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::placeholder{color:#8f98a1}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]{top:85%;right:0;width:100%;height:15%}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]>[data-type="amp/amp-story-page-attachment"]{height:100%}div[data-type="amp/amp-story-page-attachment"] .components-notice.is-warning{position:absolute}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper,div[data-type="amp/amp-story-page-attachment"] .editor-block-list__block-edit.block-editor-block-list__block-edit{width:100%;height:100%}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper{overflow:hidden}@keyframes slide-up{0%{opacity:0;transform:translateY(85%)}to{opacity:1;transform:translateY(0)}}.attachment-wrapper{animation:slide-up .5s ease;-moz-animation:slide-up .5s;-webkit-animation:slide-up .5s;-o-animation:slide-up .5s}.amp-page-attachment-content{background:#fff;overflow-y:auto;height:100%;padding:10px}.attachment-header{display:flex;position:relative;height:40px!important;background:#fff;border-radius:8px 8px 0 0;box-shadow:0 1px 2px 1px rgba(0,0,0,.12);z-index:1}.amp-story-page-attachment-title{font-family:Roboto,sans-serif;width:calc(100% - 80px);padding-left:40px;color:rgba(0,0,0,.87);font-size:16px;line-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.amp-story-page-attachment-close-button{display:block;margin:8px;height:24px;width:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 36 36' fill='rgba(0, 0, 0, 0.54)'%3E%3Cpath d='M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z'/%3E%3Cpath d='M0 0h36v36H0z' fill='none'/%3E%3C/svg%3E");color:rgba(0,0,0,.87);cursor:pointer}div[data-type="amp/amp-story-page-attachment"] .open-attachment-wrapper .amp-story-page-attachment__text{width:auto!important;padding:0 32px;margin:12px 0 20px;height:16px!important;max-width:calc(100% - 64px);color:#fff;font-family:Roboto,sans-serif;font-size:16px;font-weight:700;letter-spacing:.3px;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 6px rgba(0,0,0,.36);white-space:nowrap}div[data-type="amp/amp-story-page-attachment"] .attachment-container{position:relative;height:553px;overflow:hidden;transform:translateY(-85%)}.attachment-container .components-spinner{margin-left:calc(50% - 9px);margin-right:calc(50% - 9px)}.attachment-container .failed-message{font-size:14px}.amp-story-page-open-attachment-icon{position:relative;display:block;height:32px;width:32px;cursor:pointer;background:#fff;border-radius:50%}.amp-story-page-open-attachment-bar{position:absolute;display:block;height:3px;width:12px;border-radius:3px;top:14px;background:#000}.amp-story-page-open-attachment-bar-left{right:6px;transform:rotate(40deg)}.amp-story-page-open-attachment-bar-right{left:6px;transform:rotate(-40deg)}.open-attachment-wrapper{display:flex;align-items:center;justify-content:center;flex-direction:column;position:absolute;bottom:0;right:0;width:100%;background:linear-gradient(0,rgba(0,0,0,.15),transparent);z-index:3}.remove-attachment-post{position:absolute;left:10px;top:10px}.amp-page-attachment-content .wp-block-columns{display:flex;margin-bottom:28px;flex-wrap:wrap}@media (min-width:782px){.amp-page-attachment-content .wp-block-columns{flex-wrap:nowrap}}.amp-page-attachment-content .wp-block-column{margin-bottom:1em;flex-grow:1;min-width:0;word-break:break-word;word-wrap:break-word}@media (max-width:599px){.amp-page-attachment-content .wp-block-column{flex-basis:100%!important}}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-center{align-items:center}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-top{align-self:flex-start}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-center{-ms-grid-row-align:center;align-self:center}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-edit:before{right:-3px;top:-3px;left:-3px;bottom:-3px}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-contextual-toolbar>.block-editor-block-toolbar{right:18px;top:11px}[data-type="amp/amp-story-page"]>.editor-block-list__block-edit>.editor-block-mover{display:none!important}.editor-block-list__layout div[data-type="amp/amp-story-page"]{padding:0;margin:60px 30px 0}@media (min-width:600px){div[data-type="amp/amp-story-page"] .editor-block-list__block{margin:0;padding:0}}#amp-story-editor .wp-block[data-type="amp/amp-story-page"]{background:#fff}#amp-story-editor .wp-block[data-type="amp/amp-story-page"],#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-inner-blocks .editor-block-list__layout:first-of-type{width:100%;max-width:328px;height:553px;position:relative}#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-block-list__layout>.block-list-appender{width:316px;margin:0 auto;display:none}.editor-block-list__layout .editor-block-list__layout .editor-block-list__block .editor-block-list__block-edit,.editor-block-list__layout div[data-type="amp/amp-story-page"].editor-block-list__block .editor-block-list__block-edit{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"]{flex:0 0 auto;position:relative;transition:border .3s linear}.editor-block-list__layout div[data-type="amp/amp-story-page"]+div[data-type="amp/amp-story-page"]{margin-right:20px}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive{opacity:.5}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover{opacity:1}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{display:block;content:"";position:absolute;top:-4px;bottom:-4px;right:-4px;left:-4px;border:4px solid #007cba;z-index:10}body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #d1864a}body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a3b9a2}body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #e14d43}body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a7b656}body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #c2a68c}body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #82b4cb}body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #007cba}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before{top:calc(80% - 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-undroppable:after{display:block;content:"";position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;opacity:.8;z-index:10}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after{bottom:calc(20% + 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive>div{pointer-events:none}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number{position:absolute;top:-3em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number+div .editor-inner-blocks.block-editor-inner-blocks{height:553px}.editor-styles-wrapper [data-block]{margin-top:0;margin-bottom:0}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-dragging,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-focused,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-rotating,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-selected,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-typing{z-index:100}.block-editor-block-list__block.amp-page-inactive>.block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid #e3e5e7}.block-editor-block-list__block.amp-page-active.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active.is-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active>.block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-rotating .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-selected .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block:hover .block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid rgba(66,88,99,.4)}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks{overflow:hidden}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .amp-story-resize-container .components-resizable-box__handle,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .rotatable-box-wrap{content:none;visibility:hidden;display:none;opacity:0}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block{z-index:10}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block:not([data-type="amp/amp-story-cta"]){position:absolute}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block[data-type="amp/amp-story-cta"]{height:100%}.editor-block-list__block .editor-block-list__layout{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent] .editor-block-drop-zone{height:603px;--dropzone-padding:400px;--page-width:328px;width:calc(var(--dropzone-padding) + var(--page-width));margin:0;right:calc(var(--dropzone-padding)/-2);top:-50px;border:none;background:transparent}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent]>.editor-block-drop-zone .components-drop-zone__content{display:none}div[data-type="amp/amp-story-page"] .wp-block-image{margin-top:0}.edit-post-layout[data-block-name="core/image"] .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-dropdown-menu.components-toolbar{display:none}.amp-page-inactive[data-type="amp/amp-story-page"] .block-list-appender{display:none}.block-editor-block-list__block-edit .components-draggable__clone{position:absolute}.wp-block[data-type="core/pullquote"][data-align=full],.wp-block[data-type="core/pullquote"][data-align=wide]{width:100%;max-width:100%}.block-editor-inner-blocks .wp-block[data-type="core/pullquote"] .block-editor-block-list__block-edit{display:block}#amp-story-editor .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin:0}.editor-amp-story-page-video-wrap{position:absolute;overflow:hidden;width:100%;height:100%}.editor-amp-story-page-background.editor-post-featured-image__preview img,.editor-amp-story-page-video{-o-object-fit:cover;object-fit:cover}.editor-amp-story-page-video{position:absolute;top:0;right:0;left:0;bottom:0;min-width:100%;min-height:100%}.editor-amp-story-page-background{display:block}.editor-amp-story-page-background~.components-button{margin-top:1em;margin-left:8px}#editor-amp-story-page-poster__help{margin-top:0}.edit-post-settings-sidebar__panel-block .components-focal-point-picker_position-display-container>.components-base-control{margin-bottom:0}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block .block-editor-warning{transform:none}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block.is-selected .block-editor-warning{border:none}.components-panel__body.editor-amp-story-remove-page{border:none;padding-top:0}.wp-block[data-type="amp/amp-story-post-author"]{line-height:0}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-author"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-author"] .block-mover,.wp-block[data-type="amp/amp-story-post-author"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-author"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-date"]{line-height:0}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-date"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-date"] .block-mover,.wp-block[data-type="amp/amp-story-post-date"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-date"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-title"]{line-height:0}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;font-weight:700}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-title"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-title"] .block-mover,.wp-block[data-type="amp/amp-story-post-title"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-title"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-text"] p{margin:0}.wp-block-amp-story-text .block-editor-rich-text__editable{padding:7px!important;width:100%}.is-not-editing .wp-block-amp-amp-story-text.block-editor-rich-text__editable.editor-rich-text__editable{cursor:grab}.wp-block-amp-story-text-wrapper.is-empty-draggable-text,.wp-block-amp-story-text-wrapper:not(.with-line-height),.wp-block-amp-story-text-wrapper:not(.with-line-height) div{height:100%}.wp-block-amp-story-text-wrapper .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;right:0;left:0;bottom:0}.wp-block-amp-story-text-wrapper.is-empty-draggable-text .amp-text-placeholder{opacity:.62}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block[data-type="amp/amp-story-text"]{width:auto;line-height:0}.wp-block[data-type="amp/amp-story-text"] .block-editor-rich-text__editable,div[data-type="amp/amp-story-page"] .block-editor-inner-blocks .block-editor-block-list__block-edit{display:inline-block;line-height:1.15}.with-line-height .wp-block-amp-story-text{position:relative}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text{display:inline-block;vertical-align:middle;line-height:1.15}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.editor-block-list__layout .wp-block[data-type="amp/amp-story-text"] .editor-block-list__block-edit:before{position:absolute}.wp-block[data-type="amp/amp-story-text"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-text"] .block-mover{height:100%}.is-resizing .wp-block-amp-story-text-wrapper{overflow:hidden}.components-background-color-popover-content{padding:16px}.components-background-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;right:auto;left:auto;margin-right:-1px}.components-background-color-indicator:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.components-text-color-popover-content{padding:16px}.components-text-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;right:auto;left:auto;margin-right:1px}.components-text-color-indicator:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}
1
+ :root{--preview-scale:1;--preview-translateX:0%;--preview-translateY:0%}.edit-post-visual-editor{padding-right:50px;padding-left:50px}.block-editor-block-preview .block-editor-block-preview__content>div,.editor-styles-wrapper #amp-story-editor,.editor-styles-wrapper .wp-block:not([data-font-family]){font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}@media screen and (min-width:1280px){#amp-story-editor{min-width:820px}}#amp-story-editor .components-placeholder{background:#f3f3f3}#amp-story-editor .block-editor-block-list__block .block-editor-block-list__empty-block-inserter,#amp-story-editor .block-editor-block-list__block>.block-editor-block-list__insertion-point,#amp-story-editor .block-editor-block-list__layout .block-editor-default-block-appender{display:none!important}.editor-styles-wrapper #amp-story-editor [data-block]{margin-top:0;margin-bottom:0}.wp-block-quote__citation{font-size:16px;margin-top:24px;display:block}.editor-styles-wrapper .wp-block-quote p{line-height:34px;font-weight:700;font-size:30px;font-family:Source Sans Pro,sans-serif}.wp-block-quote,.wp-block-quote[style*="text-align: right"]{border:none;padding-top:100px}.block-editor-block-list__layout .block-editor-block-list__block [data-type="core/quote"] .block-editor-block-list__block-edit:before{left:-5px;right:-5px;top:-5px;bottom:-5px}:not(.amp-story-page-preview) :not(.amp-stories__editor-inserter__results) .components-disabled .wp-block-quote.is-style-white{background-color:#313131}.amp-stories__editor-inserter__menu .amp-stories__editor-inserter__results .components-disabled .wp-block-quote.is-style-white,.amp-story-reorderer-item .amp-story-page-preview .components-disabled .wp-block-quote.is-style-white{background-color:transparent;background-color:initial}.wp-block .components-resizable-box__container+.__resizable_base__{right:0!important}.wp-block[data-type="core/list"] .amp-story-editor__rotate-container,.wp-block[data-type="core/list"] .block-mover,.wp-block[data-type="core/list"] .block-mover div{height:100%}.wp-block[data-type="core/code"] .amp-story-editor__rotate-container,.wp-block[data-type="core/code"] .block-mover,.wp-block[data-type="core/code"] .block-mover div{height:100%}.wp-block[data-type="core/video"] .block-mover,.wp-block[data-type="core/video"] .block-mover div{height:100%}.wp-block[data-type="core/video"] .block-mover .editor-rich-text.block-editor-rich-text,.wp-block[data-type="core/video"] .block-mover .editor-rich-text.block-editor-rich-text div{height:auto}.wp-block[data-type="core/video"] .wp-block-video{margin:0}.wp-block-code textarea{white-space:nowrap}.wp-block[data-type="core/preformatted"] div[draggable=true],.wp-block[data-type="core/verse"] div[draggable=true]{border:5px solid transparent}.wp-block-preformatted .block-editor-rich-text__editable,.wp-block-verse .block-editor-rich-text__editable{white-space:nowrap!important;padding:5px}.wp-block-pullquote,.wp-block[data-type="core/pullquote"] .block-mover,.wp-block[data-type="core/pullquote"] .block-mover div{height:100%}.wp-block-table,.wp-block[data-type="core/table"] .block-mover,.wp-block[data-type="core/table"] .block-mover div{height:100%}.wp-block[data-type="core/table"] .block-mover .components-placeholder,.wp-block[data-type="core/table"] .block-mover .components-placeholder div{height:auto}.block-library-list ul li,.wp-block-preformatted pre,.wp-block-verse pre{cursor:auto}.block-library-list{padding:5px}.block-library-list ul,.wp-block-preformatted pre,.wp-block-verse pre{margin:0}.edit-post-more-menu__content .components-menu-group:first-of-type .components-button:first-of-type{display:none}.edit-post-more-menu__content .components-menu-group:nth-last-of-type(2) div[role=group]>.components-button:first-child{display:none}.editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-block-list__block-edit>:not(.editor-warning){pointer-events:all}.editor-block-list__layout .block-editor-block-list__block.has-warning .block-editor-block-list__block-edit>div>div:not(.editor-warning){pointer-events:none}div[data-amp-caption=noCaption] .wp-block-video figcaption,div[data-amp-caption=noCaption] figure.wp-block-image figcaption{display:none}.wp-block .is-amp-fit-text{word-wrap:normal}.wp-block-video,.wp-block-video .components-disabled{height:100%}.wp-block-video .components-disabled{overflow:hidden}.wp-block-video video{height:100%;width:100%}.media-frame.has-two-notices .media-frame-content{bottom:120px}.components-panel__body .components-notice{margin-right:0;margin-left:0}.video-block__poster-image.editor-post-featured-image__preview img{-o-object-fit:cover;object-fit:cover}@keyframes story-animation-pulse{0%{transform:scale(1)}25%{transform:scale(.95)}75%{transform:scale(1.05)}to{transform:scale(1)}}.story-animation-pulse{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-pulse;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(.4,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pulse{transform:scale(1)}@keyframes story-animation-fly-in-left{0%{transform:translate(var(--animation-offset-x))}to{transform:translate(0)}}.story-animation-fly-in-left{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-fly-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-left{transform:translate(var(--animation-offset-x))}@keyframes story-animation-fly-in-right{0%{transform:translate(var(--animation-offset-x))}to{transform:translate(0)}}.story-animation-fly-in-right{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-fly-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-right{transform:translate(var(--animation-offset-x))}@keyframes story-animation-fly-in-top{0%{transform:translateY(var(--animation-offset-y))}to{transform:translate(0)}}.story-animation-fly-in-top{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-fly-in-top;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-top{transform:translateY(var(--animation-offset-y))}@keyframes story-animation-fly-in-bottom{0%{transform:translateY(var(--animation-offset-y))}to{transform:translate(0)}}.story-animation-fly-in-bottom{--animation-duration:400ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-fly-in-bottom;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fly-in-bottom{transform:translateY(var(--animation-offset-y))}@keyframes story-animation-rotate-in-left{0%{transform:translate(var(--animation-offset-x)) rotate(1turn)}to{transform:translate(0)}}.story-animation-rotate-in-left{--animation-duration:600ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-rotate-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-rotate-in-left{transform:translate(var(--animation-offset-x)) rotate(1turn)}@keyframes story-animation-rotate-in-right{0%{transform:translate(var(--animation-offset-x)) rotate(1turn)}to{transform:translate(0)}}.story-animation-rotate-in-right{--animation-duration:600ms;--animation-delay:0ms;--animation-offset-x:0;animation-name:story-animation-rotate-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-rotate-in-right{transform:translate(var(--animation-offset-x)) rotate(1turn)}@keyframes story-animation-fade-in{0%{opacity:0}to{opacity:1}}.story-animation-fade-in{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-fade-in;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-fade-in{opacity:0}@keyframes story-animation-drop{0%{transform:translateY(calc(-1*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}30%{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}52%{transform:translateY(calc(-0.6*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}74%{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}83%{transform:translateY(calc(-0.3*var(--animation-offset-y)));animation-timing-function:cubic-bezier(.75,.05,.86,.08)}to{transform:translateY(0);animation-timing-function:cubic-bezier(.22,.61,.35,1)}}.story-animation-drop{--animation-duration:1600ms;--animation-delay:0ms;--animation-offset-y:0;animation-name:story-animation-drop;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-drop{transform:translateY(calc(-1*var(--animation-offset-y)))}@keyframes story-animation-twirl-in{0%{transform:rotate(540deg) scale(.1);opacity:0}to{transform:none;opacity:1}}.story-animation-twirl-in{--animation-duration:1000ms;--animation-delay:0ms;animation-name:story-animation-twirl-in;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(.2,.75,.4,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-twirl-in{transform:rotate(540deg) scale(.1);opacity:0}@keyframes story-animation-whoosh-in-left{0%{opacity:0;transform:translate(var(--animation-offset-x)) scale(.15)}to{opacity:1;transform:translate(0) scale(1)}}.story-animation-whoosh-in-left{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-whoosh-in-left;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-whoosh-in-left{transform:translate(var(--animation-offset-x)) scale(.15);opacity:0}@keyframes story-animation-whoosh-in-right{0%{opacity:0;transform:translate(var(--animation-offset-x)) scale(.15)}to{opacity:1;transform:translate(0) scale(1)}}.story-animation-whoosh-in-right{--animation-duration:400ms;--animation-delay:0ms;animation-name:story-animation-whoosh-in-right;animation-duration:var(--animation-duration);animation-timing-function:cubic-bezier(0,0,.2,1);animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-whoosh-in-right{transform:translate(var(--animation-offset-x)) scale(.15);opacity:0}@keyframes story-animation-pan-left{0%{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-left{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1;--animation-scale-end:1;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-left;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-left{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-right{0%{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-right{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-right;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-right{transform:translateY(var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-down{0%{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-down{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-down;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-down{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-pan-up{0%{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}to{transform:translate(var(--animation-offset-x)) scale(var(--animation-scale-end));transform-origin:right top}}.story-animation-pan-up{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1.25;--animation-scale-end:1.25;--animation-offset-x:0;--animation-offset-y:0;animation-name:story-animation-pan-up;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-pan-up{transform:translate(var(--animation-offset-x),var(--animation-offset-y)) scale(var(--animation-scale-start));transform-origin:right top}@keyframes story-animation-zoom-in{0%{transform:scale(var(--animation-scale-start))}to{transform:scale(var(--animation-scale-end))}}.story-animation-zoom-in{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:1;--animation-scale-end:3;animation-name:story-animation-zoom-in;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-zoom-in{transform:scale(var(--animation-scale-start))}@keyframes story-animation-zoom-out{0%{transform:scale(var(--animation-scale-start))}to{transform:scale(var(--animation-scale-end))}}.story-animation-zoom-out{--animation-duration:1000ms;--animation-delay:0ms;--animation-scale-start:3;--animation-scale-end:1;animation-name:story-animation-zoom-out;animation-duration:var(--animation-duration);animation-timing-function:linear;animation-delay:var(--animation-delay);animation-fill-mode:both}.story-animation-init-zoom-out{transform:scale(var(--animation-scale-start))}#amp-story-block-navigation{display:none;position:absolute;right:45px;top:75px;width:300px;min-width:115px;z-index:80;list-style-type:none;padding:0;margin:0}@media (max-width:1200px){.is-sidebar-opened #amp-story-block-navigation{right:0}}@media (min-width:1001px) and (max-width:1100px){.is-sidebar-opened .editor-block-list__layout{margin-left:-100px}}@media (min-width:961px){#amp-story-block-navigation{display:block}}@media (min-width:961px) and (max-width:1000px){.is-sidebar-opened #amp-story-block-navigation{display:none}}#amp-story-block-navigation .editor-inserter{position:absolute;bottom:100%;right:0;width:100%}#amp-story-block-navigation .components-popover:not(.is-mobile).is-center .components-popover__content{transform:translateX(13%)}.post-type-amp_story.folded #amp-story-block-navigation .components-popover:not(.is-mobile):not(.is-middle).is-right .components-popover__content{margin-right:-50px}#amp-story-block-navigation .block-editor-block-navigation__list{list-style-type:none;margin-bottom:15px;margin-right:0;padding-right:0}#amp-story-block-navigation .editor-block-navigation__list__static{margin:0;padding:0}#amp-story-block-navigation .components-icon-button .dashicon{margin-left:5px}#amp-story-block-navigation .block-editor-block-navigation__label{margin:0 0 1em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}:root{--block-settings-sidebar-width:280px;--admin-menu-expanded-sidebar-width:160px;--admin-menu-collapsed-sidebar-width:36px;--amp-story-content-width:334px;--block-editor-horizontal-margin:50px;--scrollbar-width:20px;--block-navigation-right-margin:45px}.post-type-amp_story:not(.folded) .edit-post-layout #amp-story-block-navigation{max-width:calc((100vw - 614px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-expanded-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story.folded .edit-post-layout #amp-story-block-navigation{max-width:calc((100vw - 490px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-collapsed-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story .edit-post-layout.is-sidebar-opened #amp-story-block-navigation{max-width:calc((100vw - 894px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-expanded-sidebar-width) - var(--block-settings-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}.post-type-amp_story.folded #amp-story-block-navigation{max-width:calc(100vw - 370px);max-width:calc(100vw - var(--admin-menu-collapsed-sidebar-width) - var(--amp-story-content-width))}.post-type-amp_story.folded .edit-post-layout.is-sidebar-opened #amp-story-block-navigation{max-width:calc((100vw - 770px)/2 - 45px);max-width:calc((100vw - var(--admin-menu-collapsed-sidebar-width) - var(--block-settings-sidebar-width) - var(--amp-story-content-width) - var(--block-editor-horizontal-margin)*2 - var(--scrollbar-width))/2 - var(--block-navigation-right-margin))}@media (max-width:960px){.block-editor-block-list__block-edit>div>.editor-selectors{display:none}}.edit-post-header-toolbar .components-icon-button.block-editor-block-navigation{display:none}@media (min-width:961px){.edit-post-header-toolbar #amp-story-media-inserter,.edit-post-header-toolbar #amp-story-shortcuts{display:flex}.edit-post-visual-editor .editor-post-title__block{margin-right:0;margin-left:0}.block-editor-block-navigation__container{background:#fff;border:1px solid #eee;padding:1em}.block-editor-block-navigation__container .component-editor__selector button{background:no-repeat 100% 0;padding-right:37px;height:40px;margin:1px 4px 1px 0}.block-editor-block-navigation__container .component-editor__selector .components-button:focus{box-shadow:none}.components-range-control__number{width:60px}}.block-editor-block-navigation__list .block-editor-block-navigation__item{position:relative}.block-editor-block-navigation__list .block-editor-block-navigation__item-is-dragging{cursor:grab}.block-editor-block-navigation__list .block-editor-block-navigation__item .components-drop-zone{border:none;border-radius:0}.block-editor-block-navigation__list .block-editor-block-navigation__item .components-drop-zone.is-dragging-over-element .components-drop-zone__content{display:none}.block-editor-block-navigation__list li .block-editor-block-navigation__item .components-drop-zone{background:none}.block-editor-block-navigation__list li .block-navigation__placeholder{transition:height .3s ease;height:0}.block-editor-block-navigation__list li .block-editor-block-navigation__item .components-drop-zone.is-close-to-top+.block-navigation__placeholder{visibility:hidden;height:36px}.block-editor-block-navigation__list li:last-child .components-drop-zone:not(.is-close-to-top){height:72px}.block-editor-block-navigation__item-is-dragging>.editor-block-navigation__item-button{display:none}#amp-story-editor-carousel{display:none}@media (min-width:961px){#amp-story-editor-carousel{display:block}}#amp-story-editor{position:relative;overflow:hidden}#amp-story-editor>.editor-block-list__layout{padding-right:0;padding-left:0;display:flex;align-items:center;transform:none;transition:transform .3s ease-in-out}#amp-story-editor>.editor-block-list__layout .block-list-appender{display:none}.amp-story-editor-carousel-navigation{display:flex;justify-content:space-between;margin-top:5em}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list{flex:1;display:flex;margin:0;padding:0;list-style-type:none;justify-content:center;max-width:30%}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item{flex:1;height:.5em;max-width:5em}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item+.amp-story-editor-carousel-item{margin-right:20px}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button{background:#eff0f1;width:100%;height:100%;display:block}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button:focus,.editor-styles-wrapper ul.amp-story-editor-carousel-item-list button:hover{background:#e0e0e0}.editor-styles-wrapper ul.amp-story-editor-carousel-item-list .amp-story-editor-carousel-item--active button{background:#666}.amp-story-editor-carousel-item-wrapper{width:100%;height:100%}.components-draggable__clone .amp-story-editor-carousel-item-wrapper{height:8px}.amp-story-editor-carousel-item{position:relative}.amp-story-editor-carousel-item .components-drop-zone{right:-10px;width:calc(100% + 20px);height:18px;top:-5px;border:none;border-radius:0}.amp-story-editor-carousel-item .components-drop-zone.is-active{background:none}.amp-story-editor-carousel-item .components-drop-zone.is-close-to-right{border-left:4px solid #0071a1;right:-8px}.amp-story-editor-carousel-item .components-drop-zone.is-close-to-left{border-right:4px solid #0071a1;right:-12px}.amp-story-editor-carousel-item .components-drop-zone .components-drop-zone__content-icon,.amp-story-editor-carousel-item .components-drop-zone .components-drop-zone__content-text,.amp-story-editor-carousel-item .components-drop-zone.is-dragging-indicator{display:none}.indicator-page-number{font-size:13px;display:block;margin-top:10px;color:#555d66}.amp-story-editor-carousel-item--active .indicator-page-number{font-weight:600}.block-editor-block-list__block .block-editor-post-input,.block-editor-post-input{flex-grow:1;position:relative;padding:1px}.block-editor-post-input input[type=text]{font-size:13px;width:300px;padding:12px;border-color:#007cba;outline:2px solid transparent;border-radius:0;margin-right:0;margin-left:0}body.admin-color-sunrise .block-editor-post-input input[type=text]{border-color:#d1864a}body.admin-color-ocean .block-editor-post-input input[type=text]{border-color:#a3b9a2}body.admin-color-midnight .block-editor-post-input input[type=text]{border-color:#e14d43}body.admin-color-ectoplasm .block-editor-post-input input[type=text]{border-color:#a7b656}body.admin-color-coffee .block-editor-post-input input[type=text]{border-color:#c2a68c}body.admin-color-blue .block-editor-post-input input[type=text]{border-color:#82b4cb}body.admin-color-light .block-editor-post-input input[type=text]{border-color:#007cba}.block-editor-post-input label{font-size:14px}.block-editor-post-input__suggestions{display:inherit;max-height:200px;transition:all .15s ease-in-out;padding:4px 0;width:302px;overflow-y:auto}.block-editor-post-input__suggestion{padding:4px 8px;color:#6c7781;display:block;font-size:13px;cursor:pointer;background:#fff;width:100%;border:none;text-align:right;box-shadow:none}.block-editor-post-input__suggestion:hover{background:#e2e4e7}.block-editor-post-input__suggestion.is-selected,.block-editor-post-input__suggestion:focus{background:#e2e4e7;outline:none}.amp-story-reorderer{margin-top:100px;display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,169px);grid-gap:0;justify-content:space-between}.amp-story-reorderer .amp-story-reorderer-item{margin:0 auto 10px;width:100%;position:relative}.amp-story-reorderer .amp-story-reorderer-item .amp-story-reorderer-item-page{max-width:165px;height:270px}.amp-story-reorderer .block-editor-block-preview .block-editor-block-preview__content .components-disabled{transform:none;text-align:right;text-align:initial}.amp-story-reorderer .block-editor-block-list__layout .block-editor-block-list__block{padding:0}.amp-story-reorderer .editor-block-list__layout.block-editor-block-list__layout,.amp-story-reorderer .editor-inner-blocks.block-editor-inner-blocks{height:100%;padding:0}.amp-story-reorderer .components-disabled,.amp-story-reorderer .components-disabled div:first-of-type{padding:0;width:100%;height:100%}.amp-story-reorderer .amp-story-reorderer-item .amp-story-reorderer-item-page .wp-block{--preview-scale:0.47;--preview-translateX:-40%;--preview-translateY:-70%;position:absolute;transform:scale(var(--preview-scale)) translateX(var(--preview-translateX)) translateY(var(--preview-translateY))}.amp-story-reorderer .block-editor-block-list__layout>.block-editor-block-list__block>.block-editor-block-list__block-edit{margin-top:0;margin-bottom:0}@media (min-width:600px){.amp-story-reorderer .block-editor-block-list__block-edit{margin-right:-50px;margin-left:-50px}}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone{border:none;border-radius:0;background:transparent}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-active{opacity:0;visibility:hidden}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element,.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-page{opacity:1;visibility:visible;transition:opacity .3s,background-color .3s}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-page{background:#eff0f1;border:none!important;margin:0 10px}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element.is-close-to-right{border-left:3px solid #0071a1}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone.is-dragging-over-element.is-close-to-left{border-right:3px solid #0071a1}.amp-story-reorderer .amp-story-reorderer-item .components-drop-zone__content,.amp-story-reorderer .amp-story-reorderer-item .is-dragging-over-element .components-drop-zone__content{display:none}.amp-story-reorderer .amp-story-page-preview{border:5px solid #eff0f1;border-radius:5px;background:#fff;width:100%;height:100%;cursor:grab;overflow:hidden}#amp-story-editor .amp-story-reorderer .components-draggable__clone{position:fixed}.amp-story-reorderer .amp-story-page-preview .editor-styles-wrapper{margin:0;height:260px}.amp-story-reorderer .amp-story-page-preview .editor-block-list__layout{padding:0}.amp-story-reorderer .amp-story-page-preview .block-list-appender{display:none}#amp-story-media-inserter,#amp-story-shortcuts{display:inline-flex}#amp-story-controls{text-align:left;padding-left:20px}.amp-story-controls-reorder{box-sizing:border-box;height:49px;width:49px;border:1px solid #aaaeb3;border-radius:50%}#amp-story-controls .amp-story-controls-reorder{display:inline-block;line-height:1}.amp-story-controls-reorder-cancel{padding-top:5px;padding-bottom:5px;margin-left:20px;display:inline-flex}.amp-story-controls-reorder-save{float:left}.amp-story-page-snap-lines{position:absolute;top:0;pointer-events:none;z-index:20}.amp-story-page-snap-lines line{stroke:red;pointer-events:none}.amp-story-order-controls .amp-story-controls-description{display:none}.amp-story-order-controls-wrap{display:flex;align-items:center;justify-content:space-between}.amp-story-order-controls-wrap .components-icon-button{display:block;-ms-grid-row-align:start;align-self:start;text-align:center;color:inherit}.amp-story-order-controls-wrap .components-icon-button svg{display:block;margin:0 auto}.wp-block [draggable=true]{-webkit-user-select:auto}.wp-block [draggable=true]:hover{cursor:grab}.wp-block[data-type="amp/amp-story-text"] .editor-rich-text__editable:hover,.wp-block[data-type="core/quote"] .editor-rich-text__editable:hover{cursor:default}.components-draggable__clone .components-resizable-box__handle,.components-draggable__clone .rotatable-box-wrap:before,.components-draggable__clone .rotatable-box-wrap__handle{display:none;opacity:0;visibility:hidden;content:none}#amp-story-controls .editor-inserter__amp-inserter{height:48px;width:48px;background-color:#007cba;border-radius:50%;margin-left:10px}body.admin-color-sunrise #amp-story-controls .editor-inserter__amp-inserter{background-color:#d1864a}body.admin-color-ocean #amp-story-controls .editor-inserter__amp-inserter{background-color:#a3b9a2}body.admin-color-midnight #amp-story-controls .editor-inserter__amp-inserter{background-color:#e14d43}body.admin-color-ectoplasm #amp-story-controls .editor-inserter__amp-inserter{background-color:#a7b656}body.admin-color-coffee #amp-story-controls .editor-inserter__amp-inserter{background-color:#c2a68c}body.admin-color-blue #amp-story-controls .editor-inserter__amp-inserter{background-color:#82b4cb}body.admin-color-light #amp-story-controls .editor-inserter__amp-inserter{background-color:#007cba}#amp-story-controls .editor-inserter__amp-inserter svg{margin:0 auto}.autocomplete__wrapper{position:relative}.autocomplete__hint,.autocomplete__input{-webkit-appearance:none;border:2px solid;border-radius:0;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;margin-bottom:0;width:100%}.autocomplete__input{background-color:transparent;position:relative}.autocomplete__hint{color:#bfc1c3;position:absolute}.autocomplete__input--default{padding:4px}.autocomplete__input--focused{outline-offset:0;outline:3px solid #ffbf47}.autocomplete__input--show-all-values{padding:4px 4px 4px 34px;cursor:pointer}.autocomplete__dropdown-arrow-down{z-index:-1;display:inline-block;position:absolute;left:8px;width:24px;height:24px;top:10px}.autocomplete__menu{background-color:#fff;border:2px solid #0b0c0c;border-top:0;color:#34384b;margin:0;max-height:342px;overflow-x:hidden;padding:0;width:100%;width:calc(100% - 4px)}.autocomplete__menu--visible{display:block}.autocomplete__menu--hidden{display:none}.autocomplete__menu--overlay{box-shadow:0 2px 6px rgba(0,0,0,.256863);right:0;position:absolute;top:100%;z-index:100}.autocomplete__menu--inline{position:relative}.autocomplete__option{border-right-width:0;border-bottom:1px solid #bfc1c3;border-left-width:0;border-top-width:1px;cursor:pointer;display:block;position:relative}.autocomplete__option>*{pointer-events:none}.autocomplete__option:first-of-type{border-top-width:0}.autocomplete__option:last-of-type{border-bottom-width:0}.autocomplete__option--odd{background-color:#fafafa}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#005ea5;border-color:#005ea5;color:#fff;outline:none}.autocomplete__option--no-results{background-color:#fafafa;color:#646b6f;cursor:not-allowed}.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:16px;line-height:1.25}.autocomplete__hint,.autocomplete__option{padding:4px}@media (min-width:641px){.autocomplete__hint,.autocomplete__input,.autocomplete__option{font-size:19px;line-height:1.31579}}.autocomplete__wrapper .autocomplete__menu{border-color:#007cba;width:101%;border-bottom-right-radius:4px!important;border-bottom-left-radius:4px!important;margin-top:-3px;padding-top:3px;max-height:200px}body.admin-color-sunrise .autocomplete__wrapper .autocomplete__menu{border-color:#d1864a}body.admin-color-ocean .autocomplete__wrapper .autocomplete__menu{border-color:#a3b9a2}body.admin-color-midnight .autocomplete__wrapper .autocomplete__menu{border-color:#e14d43}body.admin-color-ectoplasm .autocomplete__wrapper .autocomplete__menu{border-color:#a7b656}body.admin-color-coffee .autocomplete__wrapper .autocomplete__menu{border-color:#c2a68c}body.admin-color-blue .autocomplete__wrapper .autocomplete__menu{border-color:#82b4cb}body.admin-color-light .autocomplete__wrapper .autocomplete__menu{border-color:#007cba}.autocomplete__icon{position:absolute;top:2px;left:0;padding:4px;box-shadow:none!important;border:0}.autocomplete__option{border-bottom:0;padding:6px 8px;font-size:13px}.autocomplete__option--focused,.autocomplete__option:hover{background-color:#0071a1;border-color:#0071a1}.autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{color:#191e23;border-color:#007cba;box-shadow:0 0 0 1px #007cba;outline:2px solid transparent}body.admin-color-sunrise .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#d1864a;box-shadow:0 0 0 1px #d1864a}body.admin-color-ocean .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#a3b9a2;box-shadow:0 0 0 1px #a3b9a2}body.admin-color-midnight .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#e14d43;box-shadow:0 0 0 1px #e14d43}body.admin-color-ectoplasm .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#a7b656;box-shadow:0 0 0 1px #a7b656}body.admin-color-coffee .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#c2a68c;box-shadow:0 0 0 1px #c2a68c}body.admin-color-blue .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#82b4cb;box-shadow:0 0 0 1px #82b4cb}body.admin-color-light .autocomplete__wrapper .autocomplete__input.autocomplete__input--focused{border-color:#007cba;box-shadow:0 0 0 1px #007cba}.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-mover{display:none!important}.components-draggable__clone .block-editor-block-list__block .rotatable-box-wrap{display:none;opacity:0}.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-contextual-toolbar,.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-list__breadcrumb,.editor-inner-blocks .block-editor-block-list__block.is-rotating .block-editor-block-list__insertion-point{display:none!important}.block-editor-block-list__block .rotatable-box-wrap{position:absolute;left:-14px;bottom:-44px;right:calc(50% - 15px);width:30px;height:44px;z-index:1}.block-editor-block-list__block .rotatable-box-wrap:before{display:block;content:"";cursor:inherit;border-right:1px solid rgba(66,88,99,.4);height:24px;width:0;margin:3px auto 0;position:relative;left:-1px}.block-editor-block-list__block .rotatable-box-wrap .rotatable-box-wrap__handle{display:block;opacity:1;transition:opacity .3s;position:absolute;bottom:0;right:calc(50% - 24px);width:50px;height:24px;padding:4px;cursor:move;background:transparent;border:none}.rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#007cba;border:2px solid #fff;border-radius:50%;content:"";cursor:inherit;display:block;height:15px;width:15px;margin:0 auto}body.admin-color-sunrise .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#d1864a}body.admin-color-ocean .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#a3b9a2}body.admin-color-midnight .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#e14d43}body.admin-color-ectoplasm .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#a7b656}body.admin-color-coffee .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#c2a68c}body.admin-color-blue .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#82b4cb}body.admin-color-light .rotatable-box-wrap .rotatable-box-wrap__handle:before{background:#007cba}.block-editor-inner-blocks .wp-block.is-typing .rotatable-box-wrap,.block-editor-inner-blocks .wp-block .rotatable-box-wrap{display:block;opacity:0;transition:opacity .3s}.block-editor-inner-blocks .wp-block .amp-story-resize-container.is-resizing .rotatable-box-wrap,.block-editor-inner-blocks .wp-block.is-typing .rotatable-box-wrap{opacity:0}.block-editor-inner-blocks .wp-block.is-rotating .rotatable-box-wrap,.block-editor-inner-blocks .wp-block.is-selected .rotatable-box-wrap,.block-editor-inner-blocks .wp-block:hover .rotatable-box-wrap{opacity:1}#amp-story-right-click-menu{position:absolute}#amp-story-right-click-menu .amp-story-right-click-menu__popover{position:absolute;top:0!important;left:0!important}.amp-story-right-click-menu__popover.is-top.is-from-bottom .components-popover__content{margin-bottom:-8px}.amp-right-click-menu__container{position:absolute}.components-preview-picker__buttons{display:flex;justify-content:space-between;align-items:center}.components-preview-picker__dropdown-content .components-button{display:block;position:relative;padding:10px 40px 10px 20px;width:100%;text-align:right}.components-preview-picker__dropdown-content .components-button:hover{color:#191e23;border:none;box-shadow:none;background:#f3f4f5}.components-preview-picker__dropdown-content .components-button:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-2px;outline:1px dotted #555d66}.components-preview-picker__dropdown-content .components-button .dashicon{position:absolute;top:calc(50% - 10px);right:10px}.components-preview-picker__dropdown-content .components-button .editor-block-icon{position:absolute;top:calc(50% - 10px);left:10px}.components-preview-picker__buttons .components-preview-picker__selector{background:none;position:relative;width:200px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:4px;border:1px solid #8d96a0}.components-preview-picker__buttons .components-preview-picker__selector:focus{color:#191e23;border-color:#00a0d2;box-shadow:0 0 0 1px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.components-preview-picker__buttons .components-preview-picker__selector:after{content:"";pointer-events:none;display:block;width:0;height:0;border-right:3px solid transparent;border-left:3px solid transparent;border-top:5px solid;margin-right:4px;margin-left:2px;left:8px;top:12px;position:absolute}.amp__block-editor-inserter__menu.block-editor-inserter__menu{flex-direction:column}.amp-story-resize-container .components-resizable-box__handle{display:block;opacity:0;transition:opacity .3s}.block-editor-inner-blocks .wp-block.is-typing .amp-story-resize-container .components-resizable-box__handle{opacity:0}.block-editor-inner-blocks .wp-block .amp-story-resize-container.is-resizing .components-resizable-box__handle,.block-editor-inner-blocks .wp-block.is-selected .amp-story-resize-container .components-resizable-box__handle,.block-editor-inner-blocks .wp-block:hover .amp-story-resize-container .components-resizable-box__handle{opacity:1}.amp-story-resize-container .components-resizable-box__handle-top{top:-14px!important}.amp-story-resize-container .components-resizable-box__handle-right{right:-14px!important}.amp-story-resize-container .components-resizable-box__handle-bottom{bottom:-14px!important}.amp-story-resize-container .components-resizable-box__handle-left{left:-14px!important}.amp-story-editor__rotate-container .components-resizable-box__handle{display:none!important}.amp-story-resize-container .amp-story-editor__rotate-container{height:100%}.wp-block-image .components-resizable-box__container img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-drag:none}.block-editor-block-list__block[data-type="core/image"] img{-webkit-user-drag:none}.editor-block-list__layout div[data-type="amp/amp-story-cta"]{top:80%;right:0;width:100%;height:20%}.block-editor-block-list__layout div[data-type="amp/amp-story-cta"]:not(#id){margin-top:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] img{max-height:86px}.amp-block-story-cta__link img{-o-object-fit:contain;object-fit:contain}.amp-block-story-cta__link .amp-text-placeholder{opacity:.62}div[data-type="amp/amp-story-cta"] .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;right:0;left:0;bottom:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] .editor-block-mover{display:none}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit{--cta-margin:3px;height:calc(100% + var(--cta-margin)*2);width:100%;bottom:var(--cta-margin)}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit:before{top:0;right:0;bottom:0;left:0}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-contextual-toolbar{margin-right:-1px;margin-left:0}.amp-story-cta-button{position:absolute}.wp-block-amp-amp-story-cta{display:inline-block;padding:5px;margin-bottom:0;position:relative}.wp-block-amp-amp-story-cta [contenteditable]{cursor:text}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]+.block-editor-rich-text__editable{opacity:.8}.block-editor-block-preview__content .wp-block-amp-amp-story-cta{max-width:100%}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable code{background:inherit;color:inherit}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]{height:auto}.wp-block-amp-amp-story-cta .amp-block-story-cta__link{max-width:100%;overflow:hidden;white-space:nowrap!important;text-overflow:ellipsis}.amp-block-story-cta__link{border:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:18px;margin:0;padding:7px 19px 0;text-align:center;text-decoration:none;white-space:normal;word-wrap:break-word;line-height:1.15}.amp-block-story-cta__inline-link{background:#fff;display:flex;flex-wrap:wrap;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:374px;position:absolute;z-index:10;margin-top:-.5em;top:100%}.is-dragging-components-draggable .amp-block-story-cta__inline-link{display:none}.amp-block-story-cta__inline-link .block-editor-url-input{width:auto}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]{border:1px solid #ddd}.amp-block-story-cta__inline-link .block-editor-url-input__suggestions{width:302px;z-index:10}.amp-block-story-cta__inline-link>.dashicon{width:36px}.amp-block-story-cta__inline-link .dashicon{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]:-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::placeholder{color:#8f98a1}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]{top:85%;right:0;width:100%;height:15%}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]>[data-type="amp/amp-story-page-attachment"]{height:100%}div[data-type="amp/amp-story-page-attachment"] .components-notice.is-warning{position:absolute}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper,div[data-type="amp/amp-story-page-attachment"] .editor-block-list__block-edit.block-editor-block-list__block-edit{width:100%;height:100%}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper{overflow:hidden}@keyframes slide-up{0%{opacity:0;transform:translateY(85%)}to{opacity:1;transform:translateY(0)}}.attachment-wrapper{animation:slide-up .5s ease;-moz-animation:slide-up .5s;-webkit-animation:slide-up .5s;-o-animation:slide-up .5s}.amp-page-attachment-content{background:#fff;overflow-y:auto;height:100%;padding:10px}.attachment-header{display:flex;position:relative;height:40px!important;background:#fff;border-radius:8px 8px 0 0;box-shadow:0 1px 2px 1px rgba(0,0,0,.12);z-index:1}.amp-story-page-attachment-title{font-family:Roboto,sans-serif;width:calc(100% - 80px);padding-left:40px;color:rgba(0,0,0,.87);font-size:16px;line-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.amp-story-page-attachment-close-button{display:block;margin:8px;height:24px;width:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 36 36' fill='rgba(0, 0, 0, 0.54)'%3E%3Cpath d='M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z'/%3E%3Cpath d='M0 0h36v36H0z' fill='none'/%3E%3C/svg%3E");color:rgba(0,0,0,.87);cursor:pointer}div[data-type="amp/amp-story-page-attachment"] .open-attachment-wrapper .amp-story-page-attachment__text{width:auto!important;padding:0 32px;margin:12px 0 20px;height:16px!important;max-width:calc(100% - 64px);color:#fff;font-family:Roboto,sans-serif;font-size:16px;font-weight:700;letter-spacing:.3px;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 6px rgba(0,0,0,.36);white-space:nowrap}div[data-type="amp/amp-story-page-attachment"] .attachment-container{position:relative;height:553px;overflow:hidden;transform:translateY(-85%)}.attachment-container .components-spinner{margin-left:calc(50% - 9px);margin-right:calc(50% - 9px)}.attachment-container .failed-message{font-size:14px}.amp-story-page-open-attachment-icon{position:relative;display:block;height:32px;width:32px;cursor:pointer;background:#fff;border-radius:50%}.amp-story-page-open-attachment-bar{position:absolute;display:block;height:3px;width:12px;border-radius:3px;top:14px;background:#000}.amp-story-page-open-attachment-bar-left{right:6px;transform:rotate(40deg)}.amp-story-page-open-attachment-bar-right{left:6px;transform:rotate(-40deg)}.open-attachment-wrapper{display:flex;align-items:center;justify-content:center;flex-direction:column;position:absolute;bottom:0;right:0;width:100%;background:linear-gradient(0,rgba(0,0,0,.15),transparent);z-index:3}.remove-attachment-post{position:absolute;left:10px;top:10px}.amp-page-attachment-content .wp-block-columns{display:flex;margin-bottom:28px;flex-wrap:wrap}@media (min-width:782px){.amp-page-attachment-content .wp-block-columns{flex-wrap:nowrap}}.amp-page-attachment-content .wp-block-column{margin-bottom:1em;flex-grow:1;min-width:0;word-break:break-word;word-wrap:break-word}@media (max-width:599px){.amp-page-attachment-content .wp-block-column{flex-basis:100%!important}}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-center{align-items:center}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-top{align-self:flex-start}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-center{-ms-grid-row-align:center;align-self:center}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-edit:before{right:-3px;top:-3px;left:-3px;bottom:-3px}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-contextual-toolbar>.block-editor-block-toolbar{right:18px;top:11px}[data-type="amp/amp-story-page"]>.editor-block-list__block-edit>.editor-block-mover{display:none!important}.editor-block-list__layout div[data-type="amp/amp-story-page"]{padding:0;margin:60px 30px 0}@media (min-width:600px){div[data-type="amp/amp-story-page"] .editor-block-list__block{margin:0;padding:0}}#amp-story-editor .wp-block[data-type="amp/amp-story-page"]{background:#fff}#amp-story-editor .wp-block[data-type="amp/amp-story-page"],#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-inner-blocks .editor-block-list__layout:first-of-type{width:100%;max-width:328px;height:553px;position:relative}#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-block-list__layout>.block-list-appender{width:316px;margin:0 auto;display:none}.editor-block-list__layout .editor-block-list__layout .editor-block-list__block .editor-block-list__block-edit,.editor-block-list__layout div[data-type="amp/amp-story-page"].editor-block-list__block .editor-block-list__block-edit{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"]{flex:0 0 auto;position:relative;transition:border .3s linear}.editor-block-list__layout div[data-type="amp/amp-story-page"]+div[data-type="amp/amp-story-page"]{margin-right:20px}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive{opacity:.5}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover{opacity:1}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{display:block;content:"";position:absolute;top:-4px;bottom:-4px;right:-4px;left:-4px;border:4px solid #007cba;z-index:10}body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #d1864a}body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a3b9a2}body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #e14d43}body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a7b656}body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #c2a68c}body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #82b4cb}body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #007cba}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before{top:calc(80% - 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-undroppable:after{display:block;content:"";position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;opacity:.8;z-index:10}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after{bottom:calc(20% + 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive>div{pointer-events:none}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number{position:absolute;top:-3em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number+div .editor-inner-blocks.block-editor-inner-blocks{height:553px}.editor-styles-wrapper [data-block]{margin-top:0;margin-bottom:0}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-dragging,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-focused,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-rotating,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-selected,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-typing{z-index:100}.block-editor-block-list__block.amp-page-inactive>.block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid #e3e5e7}.block-editor-block-list__block.amp-page-active.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active.is-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active>.block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-rotating .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-selected .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block:hover .block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid rgba(66,88,99,.4)}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks{overflow:hidden}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .amp-story-resize-container .components-resizable-box__handle,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .rotatable-box-wrap{content:none;visibility:hidden;display:none;opacity:0}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block{z-index:10}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block:not([data-type="amp/amp-story-cta"]){position:absolute}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block[data-type="amp/amp-story-cta"]{height:100%}.editor-block-list__block .editor-block-list__layout{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent] .editor-block-drop-zone{height:603px;--dropzone-padding:400px;--page-width:328px;width:calc(var(--dropzone-padding) + var(--page-width));margin:0;right:calc(var(--dropzone-padding)/-2);top:-50px;border:none;background:transparent}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent]>.editor-block-drop-zone .components-drop-zone__content{display:none}div[data-type="amp/amp-story-page"] .wp-block-image{margin-top:0}.edit-post-layout[data-block-name="core/image"] .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-dropdown-menu.components-toolbar{display:none}.amp-page-inactive[data-type="amp/amp-story-page"] .block-list-appender{display:none}.block-editor-block-list__block-edit .components-draggable__clone{position:absolute}.wp-block[data-type="core/pullquote"][data-align=full],.wp-block[data-type="core/pullquote"][data-align=wide]{width:100%;max-width:100%}.block-editor-inner-blocks .wp-block[data-type="core/pullquote"] .block-editor-block-list__block-edit{display:block}#amp-story-editor .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin:0}.editor-amp-story-page-video-wrap{position:absolute;overflow:hidden;width:100%;height:100%}.editor-amp-story-page-background.editor-post-featured-image__preview img,.editor-amp-story-page-video{-o-object-fit:cover;object-fit:cover}.editor-amp-story-page-video{position:absolute;top:0;right:0;left:0;bottom:0;min-width:100%;min-height:100%}.editor-amp-story-page-background{display:block}.editor-amp-story-page-background~.components-button{margin-top:1em;margin-left:8px}#editor-amp-story-page-poster__help{margin-top:0}.edit-post-settings-sidebar__panel-block .components-focal-point-picker_position-display-container>.components-base-control{margin-bottom:0}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block .block-editor-warning{transform:none}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block.is-selected .block-editor-warning{border:none}.components-panel__body.editor-amp-story-remove-page{border:none;padding-top:0}.wp-block[data-type="amp/amp-story-post-author"]{line-height:0}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-author"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-author"] .block-mover,.wp-block[data-type="amp/amp-story-post-author"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-author"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-date"]{line-height:0}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-date"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-date"] .block-mover,.wp-block[data-type="amp/amp-story-post-date"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-date"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-title"]{line-height:0}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;font-weight:700}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-title"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-title"] .block-mover,.wp-block[data-type="amp/amp-story-post-title"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-title"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-text"] p{margin:0}.wp-block-amp-story-text .block-editor-rich-text__editable{padding:7px!important;width:100%}.is-not-editing .wp-block-amp-amp-story-text.block-editor-rich-text__editable.editor-rich-text__editable{cursor:grab}.wp-block-amp-story-text-wrapper.is-empty-draggable-text,.wp-block-amp-story-text-wrapper:not(.with-line-height),.wp-block-amp-story-text-wrapper:not(.with-line-height) div{height:100%}.wp-block-amp-story-text-wrapper .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;right:0;left:0;bottom:0}.wp-block-amp-story-text-wrapper.is-empty-draggable-text .amp-text-placeholder{opacity:.62}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block[data-type="amp/amp-story-text"]{width:auto;line-height:0}.wp-block[data-type="amp/amp-story-text"] .block-editor-rich-text__editable,div[data-type="amp/amp-story-page"] .block-editor-inner-blocks .block-editor-block-list__block-edit{display:inline-block;line-height:1.15}.with-line-height .wp-block-amp-story-text{position:relative}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text{display:inline-block;vertical-align:middle;line-height:1.15}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.editor-block-list__layout .wp-block[data-type="amp/amp-story-text"] .editor-block-list__block-edit:before{position:absolute}.wp-block[data-type="amp/amp-story-text"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-text"] .block-mover{height:100%}.is-resizing .wp-block-amp-story-text-wrapper{overflow:hidden}.components-background-color-popover-content{padding:16px}.components-background-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;right:auto;left:auto;margin-right:-1px}.components-background-color-indicator:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.components-text-color-popover-content{padding:16px}.components-text-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;right:auto;left:auto;margin-right:1px}.components-text-color-indicator:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0}
assets/css/amp-stories-editor-compiled.css CHANGED
@@ -4,4 +4,4 @@
4
5
/*!rtl:ignore*/right:-14px!important}.amp-story-resize-container .components-resizable-box__handle-bottom{bottom:-14px!important}.amp-story-resize-container .components-resizable-box__handle-left{
6
7
- /*!rtl:ignore*/left:-14px!important}.amp-story-editor__rotate-container .components-resizable-box__handle{display:none!important}.amp-story-resize-container .amp-story-editor__rotate-container{height:100%}.wp-block-image .components-resizable-box__container img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-drag:none}.block-editor-block-list__block[data-type="core/image"] img{-webkit-user-drag:none}.editor-block-list__layout div[data-type="amp/amp-story-cta"]{top:80%;left:0;width:100%;height:20%}.block-editor-block-list__layout div[data-type="amp/amp-story-cta"]:not(#id){margin-top:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] img{max-height:86px}.amp-block-story-cta__link img{-o-object-fit:contain;object-fit:contain}.amp-block-story-cta__link .amp-text-placeholder{opacity:.62}div[data-type="amp/amp-story-cta"] .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;left:0;right:0;bottom:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] .editor-block-mover{display:none}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit{--cta-margin:3px;height:calc(100% + var(--cta-margin)*2);width:100%;bottom:var(--cta-margin)}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit:before{top:0;left:0;bottom:0;right:0}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-contextual-toolbar{margin-left:-1px;margin-right:0}.amp-story-cta-button{position:absolute}.wp-block-amp-amp-story-cta{display:inline-block;padding:5px;margin-bottom:0;position:relative}.wp-block-amp-amp-story-cta [contenteditable]{cursor:text}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]+.block-editor-rich-text__editable{opacity:.8}.block-editor-block-preview__content .wp-block-amp-amp-story-cta{max-width:100%}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable code{background:inherit;color:inherit}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]{height:auto}.wp-block-amp-amp-story-cta .amp-block-story-cta__link{max-width:100%;overflow:hidden;white-space:nowrap!important;text-overflow:ellipsis}.amp-block-story-cta__link{border:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:18px;margin:0;padding:7px 19px 0;text-align:center;text-decoration:none;white-space:normal;word-wrap:break-word;line-height:1.15}.amp-block-story-cta__inline-link{background:#fff;display:flex;flex-wrap:wrap;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:374px;position:absolute;z-index:10;margin-top:-.5em;top:100%}.is-dragging-components-draggable .amp-block-story-cta__inline-link{display:none}.amp-block-story-cta__inline-link .block-editor-url-input{width:auto}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]{border:1px solid #ddd}.amp-block-story-cta__inline-link .block-editor-url-input__suggestions{width:302px;z-index:10}.amp-block-story-cta__inline-link>.dashicon{width:36px}.amp-block-story-cta__inline-link .dashicon{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]:-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::placeholder{color:#8f98a1}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]{top:85%;left:0;width:100%;height:15%}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]>[data-type="amp/amp-story-page-attachment"]{height:100%}div[data-type="amp/amp-story-page-attachment"] .components-notice.is-warning{position:absolute}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper,div[data-type="amp/amp-story-page-attachment"] .editor-block-list__block-edit.block-editor-block-list__block-edit{width:100%;height:100%}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper{overflow:hidden}@keyframes slide-up{0%{opacity:0;transform:translateY(85%)}to{opacity:1;transform:translateY(0)}}.attachment-wrapper{animation:slide-up .5s ease;-moz-animation:slide-up .5s;-webkit-animation:slide-up .5s;-o-animation:slide-up .5s}.amp-page-attachment-content{background:#fff;overflow-y:auto;height:100%;padding:10px}.attachment-header{display:flex;position:relative;height:40px!important;background:#fff;border-radius:8px 8px 0 0;box-shadow:0 1px 2px 1px rgba(0,0,0,.12);z-index:1}.amp-story-page-attachment-title{font-family:Roboto,sans-serif;width:calc(100% - 80px);padding-right:40px;color:rgba(0,0,0,.87);font-size:16px;line-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.amp-story-page-attachment-close-button{display:block;margin:8px;height:24px;width:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 36 36' fill='rgba(0, 0, 0, 0.54)'%3E%3Cpath d='M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z'/%3E%3Cpath d='M0 0h36v36H0z' fill='none'/%3E%3C/svg%3E");color:rgba(0,0,0,.87);cursor:pointer}div[data-type="amp/amp-story-page-attachment"] .open-attachment-wrapper .amp-story-page-attachment__text{width:auto!important;padding:0 32px;margin:12px 0 20px;height:16px!important;max-width:calc(100% - 64px);color:#fff;font-family:Roboto,sans-serif;font-size:16px;font-weight:700;letter-spacing:.3px;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 6px rgba(0,0,0,.36);white-space:nowrap}div[data-type="amp/amp-story-page-attachment"] .attachment-container{position:relative;height:553px;overflow:hidden;transform:translateY(-85%)}.attachment-container .components-spinner{margin-right:calc(50% - 9px);margin-left:calc(50% - 9px)}.attachment-container .failed-message{font-size:14px}.amp-story-page-open-attachment-icon{position:relative;display:block;height:32px;width:32px;cursor:pointer;background:#fff;border-radius:50%}.amp-story-page-open-attachment-bar{position:absolute;display:block;height:3px;width:12px;border-radius:3px;top:14px;background:#000}.amp-story-page-open-attachment-bar-left{left:6px;transform:rotate(-40deg)}.amp-story-page-open-attachment-bar-right{right:6px;transform:rotate(40deg)}.open-attachment-wrapper{display:flex;align-items:center;justify-content:center;flex-direction:column;position:absolute;bottom:0;left:0;width:100%;background:linear-gradient(0,rgba(0,0,0,.15),transparent);z-index:3}.remove-attachment-post{position:absolute;right:10px;top:10px}.amp-page-attachment-content .wp-block-columns{display:flex;margin-bottom:28px;flex-wrap:wrap}@media (min-width:782px){.amp-page-attachment-content .wp-block-columns{flex-wrap:nowrap}}.amp-page-attachment-content .wp-block-column{margin-bottom:1em;flex-grow:1;min-width:0;word-break:break-word;word-wrap:break-word}@media (max-width:599px){.amp-page-attachment-content .wp-block-column{flex-basis:100%!important}}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-center{align-items:center}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-top{align-self:flex-start}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-center{-ms-grid-row-align:center;align-self:center}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-edit:before{left:-3px;top:-3px;right:-3px;bottom:-3px}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-contextual-toolbar>.block-editor-block-toolbar{left:18px;top:11px}[data-type="amp/amp-story-page"]>.editor-block-list__block-edit>.editor-block-mover{display:none!important}.editor-block-list__layout div[data-type="amp/amp-story-page"]{padding:0;margin:60px 30px 0}@media (min-width:600px){div[data-type="amp/amp-story-page"] .editor-block-list__block{margin:0;padding:0}}#amp-story-editor .wp-block[data-type="amp/amp-story-page"]{background:#fff}#amp-story-editor .wp-block[data-type="amp/amp-story-page"],#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-inner-blocks .editor-block-list__layout:first-of-type{width:100%;max-width:328px;height:553px;position:relative}#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-block-list__layout>.block-list-appender{width:316px;margin:0 auto;display:none}.editor-block-list__layout .editor-block-list__layout .editor-block-list__block .editor-block-list__block-edit,.editor-block-list__layout div[data-type="amp/amp-story-page"].editor-block-list__block .editor-block-list__block-edit{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"]{flex:0 0 auto;position:relative;transition:border .3s linear}.editor-block-list__layout div[data-type="amp/amp-story-page"]+div[data-type="amp/amp-story-page"]{margin-left:20px}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive{opacity:.5}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover{opacity:1}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{display:block;content:"";position:absolute;top:-4px;bottom:-4px;left:-4px;right:-4px;border:4px solid #007cba;z-index:10}body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #d1864a}body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a3b9a2}body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #e14d43}body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a7b656}body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #c2a68c}body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #82b4cb}body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #007cba}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before{top:calc(80% - 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-undroppable:after{display:block;content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.8;z-index:10}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after{bottom:calc(20% + 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive>div{pointer-events:none}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number{position:absolute;top:-3em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number+div .editor-inner-blocks.block-editor-inner-blocks{height:553px}.editor-styles-wrapper [data-block]{margin-top:0;margin-bottom:0}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-dragging,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-focused,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-rotating,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-selected,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-typing{z-index:100}.block-editor-block-list__block.amp-page-inactive>.block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid #e3e5e7}.block-editor-block-list__block.amp-page-active.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active.is-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active>.block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-rotating .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-selected .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block:hover .block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid rgba(66,88,99,.4)}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks{overflow:hidden}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .amp-story-resize-container .components-resizable-box__handle,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .rotatable-box-wrap{content:none;visibility:hidden;display:none;opacity:0}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block{z-index:10}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block:not([data-type="amp/amp-story-cta"]){position:absolute}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block[data-type="amp/amp-story-cta"]{height:100%}.editor-block-list__block .editor-block-list__layout{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent] .editor-block-drop-zone{height:603px;--dropzone-padding:400px;--page-width:328px;width:calc(var(--dropzone-padding) + var(--page-width));margin:0;left:calc(var(--dropzone-padding)/-2);top:-50px;border:none;background:transparent}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent]>.editor-block-drop-zone .components-drop-zone__content{display:none}div[data-type="amp/amp-story-page"] .wp-block-image{margin-top:0}.edit-post-layout[data-block-name="core/image"] .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-dropdown-menu.components-toolbar{display:none}.amp-page-inactive[data-type="amp/amp-story-page"] .block-list-appender{display:none}.block-editor-block-list__block-edit .components-draggable__clone{position:absolute}.wp-block[data-type="core/pullquote"][data-align=full],.wp-block[data-type="core/pullquote"][data-align=wide]{width:100%;max-width:100%}.block-editor-inner-blocks .wp-block[data-type="core/pullquote"] .block-editor-block-list__block-edit{display:block}#amp-story-editor .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin:0}.editor-amp-story-page-video-wrap{position:absolute;overflow:hidden;width:100%;height:100%}.editor-amp-story-page-background.editor-post-featured-image__preview img,.editor-amp-story-page-video{-o-object-fit:cover;object-fit:cover}.editor-amp-story-page-video{position:absolute;top:0;left:0;right:0;bottom:0;min-width:100%;min-height:100%}.editor-amp-story-page-background{display:block}.editor-amp-story-page-background~.components-button{margin-top:1em;margin-right:8px}#editor-amp-story-page-poster__help{margin-top:0}.edit-post-settings-sidebar__panel-block .components-focal-point-picker_position-display-container>.components-base-control{margin-bottom:0}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block .block-editor-warning{transform:none}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block.is-selected .block-editor-warning{border:none}.components-panel__body.editor-amp-story-remove-page{border:none;padding-top:0}.wp-block[data-type="amp/amp-story-post-author"]{line-height:0}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-author"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-author"] .block-mover,.wp-block[data-type="amp/amp-story-post-author"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-author"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-date"]{line-height:0}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-date"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-date"] .block-mover,.wp-block[data-type="amp/amp-story-post-date"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-date"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-title"]{line-height:0}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title{margin:0;padding:7px!important;height:100%}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;font-weight:700}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-title"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-title"] .block-mover,.wp-block[data-type="amp/amp-story-post-title"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-title"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-text"] p{margin:0}.wp-block-amp-story-text .block-editor-rich-text__editable{padding:7px!important;width:100%}.is-not-editing .wp-block-amp-amp-story-text.block-editor-rich-text__editable.editor-rich-text__editable{cursor:grab}.wp-block-amp-story-text-wrapper.is-empty-draggable-text,.wp-block-amp-story-text-wrapper:not(.with-line-height),.wp-block-amp-story-text-wrapper:not(.with-line-height) div{height:100%}.wp-block-amp-story-text-wrapper .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;left:0;right:0;bottom:0}.wp-block-amp-story-text-wrapper.is-empty-draggable-text .amp-text-placeholder{opacity:.62}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block[data-type="amp/amp-story-text"]{width:auto;line-height:0}.wp-block[data-type="amp/amp-story-text"] .block-editor-rich-text__editable,div[data-type="amp/amp-story-page"] .block-editor-inner-blocks .block-editor-block-list__block-edit{display:inline-block;line-height:1.15}.with-line-height .wp-block-amp-story-text{position:relative}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text{display:inline-block;vertical-align:middle;line-height:1.15}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.editor-block-list__layout .wp-block[data-type="amp/amp-story-text"] .editor-block-list__block-edit:before{position:absolute}.wp-block[data-type="amp/amp-story-text"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-text"] .block-mover{height:100%}.is-resizing .wp-block-amp-story-text-wrapper{overflow:hidden}.components-background-color-popover-content{padding:16px}.components-background-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;left:auto;right:auto;margin-left:-1px}.components-background-color-indicator:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0}.components-text-color-popover-content{padding:16px}.components-text-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;left:auto;right:auto;margin-left:1px}.components-text-color-indicator:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0}
4
5
/*!rtl:ignore*/right:-14px!important}.amp-story-resize-container .components-resizable-box__handle-bottom{bottom:-14px!important}.amp-story-resize-container .components-resizable-box__handle-left{
6
7
+ /*!rtl:ignore*/left:-14px!important}.amp-story-editor__rotate-container .components-resizable-box__handle{display:none!important}.amp-story-resize-container .amp-story-editor__rotate-container{height:100%}.wp-block-image .components-resizable-box__container img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-drag:none}.block-editor-block-list__block[data-type="core/image"] img{-webkit-user-drag:none}.editor-block-list__layout div[data-type="amp/amp-story-cta"]{top:80%;left:0;width:100%;height:20%}.block-editor-block-list__layout div[data-type="amp/amp-story-cta"]:not(#id){margin-top:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] img{max-height:86px}.amp-block-story-cta__link img{-o-object-fit:contain;object-fit:contain}.amp-block-story-cta__link .amp-text-placeholder{opacity:.62}div[data-type="amp/amp-story-cta"] .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;left:0;right:0;bottom:0}.editor-block-list__layout div[data-type="amp/amp-story-cta"] .editor-block-mover{display:none}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit{--cta-margin:3px;height:calc(100% + var(--cta-margin)*2);width:100%;bottom:var(--cta-margin)}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-list__block-edit:before{top:0;left:0;bottom:0;right:0}.block-editor-block-list__block[data-type="amp/amp-story-cta"] .block-editor-block-contextual-toolbar{margin-left:-1px;margin-right:0}.amp-story-cta-button{position:absolute}.wp-block-amp-amp-story-cta{display:inline-block;padding:5px;margin-bottom:0;position:relative}.wp-block-amp-amp-story-cta [contenteditable]{cursor:text}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]+.block-editor-rich-text__editable{opacity:.8}.block-editor-block-preview__content .wp-block-amp-amp-story-cta{max-width:100%}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable code{background:inherit;color:inherit}.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible=true]{height:auto}.wp-block-amp-amp-story-cta .amp-block-story-cta__link{max-width:100%;overflow:hidden;white-space:nowrap!important;text-overflow:ellipsis}.amp-block-story-cta__link{border:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:18px;margin:0;padding:7px 19px 0;text-align:center;text-decoration:none;white-space:normal;word-wrap:break-word;line-height:1.15}.amp-block-story-cta__inline-link{background:#fff;display:flex;flex-wrap:wrap;align-items:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:374px;position:absolute;z-index:10;margin-top:-.5em;top:100%}.is-dragging-components-draggable .amp-block-story-cta__inline-link{display:none}.amp-block-story-cta__inline-link .block-editor-url-input{width:auto}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]{border:1px solid #ddd}.amp-block-story-cta__inline-link .block-editor-url-input__suggestions{width:302px;z-index:10}.amp-block-story-cta__inline-link>.dashicon{width:36px}.amp-block-story-cta__inline-link .dashicon{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]:-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::-ms-input-placeholder{color:#8f98a1}.amp-block-story-cta__inline-link .block-editor-url-input input[type=text]::placeholder{color:#8f98a1}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]{top:85%;left:0;width:100%;height:15%}.amp-page-child-block[data-type="amp/amp-story-page-attachment"]>[data-type="amp/amp-story-page-attachment"]{height:100%}div[data-type="amp/amp-story-page-attachment"] .components-notice.is-warning{position:absolute}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper,div[data-type="amp/amp-story-page-attachment"] .editor-block-list__block-edit.block-editor-block-list__block-edit{width:100%;height:100%}div[data-type="amp/amp-story-page-attachment"] .attachment-wrapper{overflow:hidden}@keyframes slide-up{0%{opacity:0;transform:translateY(85%)}to{opacity:1;transform:translateY(0)}}.attachment-wrapper{animation:slide-up .5s ease;-moz-animation:slide-up .5s;-webkit-animation:slide-up .5s;-o-animation:slide-up .5s}.amp-page-attachment-content{background:#fff;overflow-y:auto;height:100%;padding:10px}.attachment-header{display:flex;position:relative;height:40px!important;background:#fff;border-radius:8px 8px 0 0;box-shadow:0 1px 2px 1px rgba(0,0,0,.12);z-index:1}.amp-story-page-attachment-title{font-family:Roboto,sans-serif;width:calc(100% - 80px);padding-right:40px;color:rgba(0,0,0,.87);font-size:16px;line-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.amp-story-page-attachment-close-button{display:block;margin:8px;height:24px;width:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 36 36' fill='rgba(0, 0, 0, 0.54)'%3E%3Cpath d='M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z'/%3E%3Cpath d='M0 0h36v36H0z' fill='none'/%3E%3C/svg%3E");color:rgba(0,0,0,.87);cursor:pointer}div[data-type="amp/amp-story-page-attachment"] .open-attachment-wrapper .amp-story-page-attachment__text{width:auto!important;padding:0 32px;margin:12px 0 20px;height:16px!important;max-width:calc(100% - 64px);color:#fff;font-family:Roboto,sans-serif;font-size:16px;font-weight:700;letter-spacing:.3px;line-height:16px;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 6px rgba(0,0,0,.36);white-space:nowrap}div[data-type="amp/amp-story-page-attachment"] .attachment-container{position:relative;height:553px;overflow:hidden;transform:translateY(-85%)}.attachment-container .components-spinner{margin-right:calc(50% - 9px);margin-left:calc(50% - 9px)}.attachment-container .failed-message{font-size:14px}.amp-story-page-open-attachment-icon{position:relative;display:block;height:32px;width:32px;cursor:pointer;background:#fff;border-radius:50%}.amp-story-page-open-attachment-bar{position:absolute;display:block;height:3px;width:12px;border-radius:3px;top:14px;background:#000}.amp-story-page-open-attachment-bar-left{left:6px;transform:rotate(-40deg)}.amp-story-page-open-attachment-bar-right{right:6px;transform:rotate(40deg)}.open-attachment-wrapper{display:flex;align-items:center;justify-content:center;flex-direction:column;position:absolute;bottom:0;left:0;width:100%;background:linear-gradient(0,rgba(0,0,0,.15),transparent);z-index:3}.remove-attachment-post{position:absolute;right:10px;top:10px}.amp-page-attachment-content .wp-block-columns{display:flex;margin-bottom:28px;flex-wrap:wrap}@media (min-width:782px){.amp-page-attachment-content .wp-block-columns{flex-wrap:nowrap}}.amp-page-attachment-content .wp-block-column{margin-bottom:1em;flex-grow:1;min-width:0;word-break:break-word;word-wrap:break-word}@media (max-width:599px){.amp-page-attachment-content .wp-block-column{flex-basis:100%!important}}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-center{align-items:center}.amp-page-attachment-content .wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-top{align-self:flex-start}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-center{-ms-grid-row-align:center;align-self:center}.amp-page-attachment-content .wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-edit:before{left:-3px;top:-3px;right:-3px;bottom:-3px}.block-editor-block-list__layout .block-editor-block-list__block[data-type="amp/amp-story-page"]>.block-editor-block-list__block-edit>.block-editor-block-contextual-toolbar>.block-editor-block-toolbar{left:18px;top:11px}[data-type="amp/amp-story-page"]>.editor-block-list__block-edit>.editor-block-mover{display:none!important}.editor-block-list__layout div[data-type="amp/amp-story-page"]{padding:0;margin:60px 30px 0}@media (min-width:600px){div[data-type="amp/amp-story-page"] .editor-block-list__block{margin:0;padding:0}}#amp-story-editor .wp-block[data-type="amp/amp-story-page"]{background:#fff}#amp-story-editor .wp-block[data-type="amp/amp-story-page"],#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-inner-blocks .editor-block-list__layout:first-of-type{width:100%;max-width:328px;height:553px;position:relative}#amp-story-editor .wp-block[data-type="amp/amp-story-page"] .editor-block-list__layout>.block-list-appender{width:316px;margin:0 auto;display:none}.editor-block-list__layout .editor-block-list__layout .editor-block-list__block .editor-block-list__block-edit,.editor-block-list__layout div[data-type="amp/amp-story-page"].editor-block-list__block .editor-block-list__block-edit{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"]{flex:0 0 auto;position:relative;transition:border .3s linear}.editor-block-list__layout div[data-type="amp/amp-story-page"]+div[data-type="amp/amp-story-page"]{margin-left:20px}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive{opacity:.5}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover{opacity:1}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{display:block;content:"";position:absolute;top:-4px;bottom:-4px;left:-4px;right:-4px;border:4px solid #007cba;z-index:10}body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-sunrise .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #d1864a}body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ocean .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a3b9a2}body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-midnight .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #e14d43}body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-ectoplasm .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #a7b656}body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-coffee .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #c2a68c}body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-blue .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #82b4cb}body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before,body.admin-color-light .editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-droppable:before{border:4px solid #007cba}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:before{top:calc(80% - 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after,.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-undroppable:after{display:block;content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.8;z-index:10}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-draggable-hover-amp-amp-story-cta.amp-page-draggable-hover-droppable:after{bottom:calc(20% + 2px)}.editor-block-list__layout [data-type="amp/amp-story-page"].amp-page-inactive>div{pointer-events:none}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number{position:absolute;top:-3em;text-transform:uppercase;font-weight:500;font-size:12px;color:#666;letter-spacing:1px}.editor-block-list__layout div[data-type="amp/amp-story-page"] .amp-story-page-number+div .editor-inner-blocks.block-editor-inner-blocks{height:553px}.editor-styles-wrapper [data-block]{margin-top:0;margin-bottom:0}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-dragging,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-focused,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-rotating,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-selected,.editor-styles-wrapper #amp-story-editor .wp-block .wp-block.is-typing{z-index:100}.block-editor-block-list__block.amp-page-inactive>.block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid #e3e5e7}.block-editor-block-list__block.amp-page-active.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active.is-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-active>.block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-rotating .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block.is-selected .block-editor-block-list__block-edit:before,.block-editor-inner-blocks .wp-block:hover .block-editor-block-list__block-edit:before{box-shadow:none;border:1px solid rgba(66,88,99,.4)}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks{overflow:hidden}.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .amp-story-resize-container .components-resizable-box__handle,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .block-editor-block-list__block-edit:before,.block-editor-block-list__block.amp-page-is-animating .block-editor-inner-blocks .rotatable-box-wrap{content:none;visibility:hidden;display:none;opacity:0}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block{z-index:10}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block:not([data-type="amp/amp-story-cta"]){position:absolute}div[data-type="amp/amp-story-page"] .editor-inner-blocks .amp-page-child-block[data-type="amp/amp-story-cta"]{height:100%}.editor-block-list__block .editor-block-list__layout{margin:0}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent] .editor-block-drop-zone{height:603px;--dropzone-padding:400px;--page-width:328px;width:calc(var(--dropzone-padding) + var(--page-width));margin:0;left:calc(var(--dropzone-padding)/-2);top:-50px;border:none;background:transparent}.editor-block-list__layout div[data-type="amp/amp-story-page"][data-amp-selected=parent]>.editor-block-drop-zone .components-drop-zone__content{display:none}div[data-type="amp/amp-story-page"] .wp-block-image{margin-top:0}.edit-post-layout[data-block-name="core/image"] .edit-post-header-toolbar__block-toolbar .block-editor-block-toolbar .components-dropdown-menu.components-toolbar{display:none}.amp-page-inactive[data-type="amp/amp-story-page"] .block-list-appender{display:none}.block-editor-block-list__block-edit .components-draggable__clone{position:absolute}.wp-block[data-type="core/pullquote"][data-align=full],.wp-block[data-type="core/pullquote"][data-align=wide]{width:100%;max-width:100%}.block-editor-inner-blocks .wp-block[data-type="core/pullquote"] .block-editor-block-list__block-edit{display:block}#amp-story-editor .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin:0}.editor-amp-story-page-video-wrap{position:absolute;overflow:hidden;width:100%;height:100%}.editor-amp-story-page-background.editor-post-featured-image__preview img,.editor-amp-story-page-video{-o-object-fit:cover;object-fit:cover}.editor-amp-story-page-video{position:absolute;top:0;left:0;right:0;bottom:0;min-width:100%;min-height:100%}.editor-amp-story-page-background{display:block}.editor-amp-story-page-background~.components-button{margin-top:1em;margin-right:8px}#editor-amp-story-page-poster__help{margin-top:0}.edit-post-settings-sidebar__panel-block .components-focal-point-picker_position-display-container>.components-base-control{margin-bottom:0}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block .block-editor-warning{transform:none}.editor-block-list__layout [data-type="amp/amp-story-page"] .block-editor-block-list__block.is-selected .block-editor-warning{border:none}.components-panel__body.editor-amp-story-remove-page{border:none;padding-top:0}.wp-block[data-type="amp/amp-story-post-author"]{line-height:0}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-author"] .wp-block-amp-amp-story-post-author.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-author"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-author"] .block-mover,.wp-block[data-type="amp/amp-story-post-author"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-author"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-date"]{line-height:0}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-date"] .wp-block-amp-amp-story-post-date.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-date"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-date"] .block-mover,.wp-block[data-type="amp/amp-story-post-date"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-date"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-post-title"]{line-height:0}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title{margin:0;padding:7px!important;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-editing{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-amp-fit-text{line-height:1.15;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;font-weight:700}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title:not(.is-amp-fit-text){display:block;font-size:16px}.wp-block[data-type="amp/amp-story-post-title"] .wp-block-amp-amp-story-post-title.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.wp-block[data-type="amp/amp-story-post-title"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-post-title"] .block-mover,.wp-block[data-type="amp/amp-story-post-title"] .block-mover div{height:100%}.wp-block[data-type="amp/amp-story-post-title"] .is-resizing .block-mover{overflow:hidden}.wp-block[data-type="amp/amp-story-text"] p{margin:0}.wp-block-amp-story-text .block-editor-rich-text__editable{padding:7px!important;width:100%}.is-not-editing .wp-block-amp-amp-story-text.block-editor-rich-text__editable.editor-rich-text__editable{cursor:grab}.wp-block-amp-story-text-wrapper.is-empty-draggable-text,.wp-block-amp-story-text-wrapper:not(.with-line-height),.wp-block-amp-story-text-wrapper:not(.with-line-height) div{height:100%}.wp-block-amp-story-text-wrapper .amp-overlay{height:100%;width:100%;z-index:1000;position:absolute;top:0;left:0;right:0;bottom:0}.wp-block-amp-story-text-wrapper.is-empty-draggable-text .amp-text-placeholder{opacity:.62}.editor-styles-wrapper #amp-story-editor .wp-block .wp-block[data-type="amp/amp-story-text"]{width:auto;line-height:0}.wp-block[data-type="amp/amp-story-text"] .block-editor-rich-text__editable,div[data-type="amp/amp-story-page"] .block-editor-inner-blocks .block-editor-block-list__block-edit{display:inline-block;line-height:1.15}.with-line-height .wp-block-amp-story-text{position:relative}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text{display:inline-block;vertical-align:middle;line-height:1.15}.wp-block[data-type="amp/amp-story-text"] .wp-block-amp-story-text .is-amp-fit-text.is-measuring{height:auto!important;width:auto!important;position:absolute!important}.editor-block-list__layout .wp-block[data-type="amp/amp-story-text"] .editor-block-list__block-edit:before{position:absolute}.wp-block[data-type="amp/amp-story-text"] .amp-story-editor__rotate-container,.wp-block[data-type="amp/amp-story-text"] .block-mover{height:100%}.is-resizing .wp-block-amp-story-text-wrapper{overflow:hidden}.components-background-color-popover-content{padding:16px}.components-background-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;left:auto;right:auto;margin-left:-1px}.components-background-color-indicator:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0}.components-text-color-popover-content{padding:16px}.components-text-color-indicator{position:absolute;background:transparent;height:3px;width:20px;bottom:6px;left:auto;right:auto;margin-left:1px}.components-text-color-indicator:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0}
assets/js/amp-stories-editor.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-rich-text', 'wp-url', 'wp-wordcount'), 'version' => 'a7c823932e4442de22a4cb870bbc4819');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-rich-text', 'wp-url', 'wp-wordcount'), 'version' => '274ed3f40d287da4009b46c1fa615ad7');
assets/js/amp-stories-editor.js CHANGED
@@ -1,35 +1,35 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";n(70),n(41);var r=window.ampStoriesFonts,o=function(e){if(e&&void 0!==r){var t=r.find((function(t){return t.name===e}));if(t){var n=t.handle,o=t.src;if(n&&o)if(!document.getElementById(n)){var a=document.createElement("link");a.id=n,a.href=o,a.rel="stylesheet",a.type="text/css",a.media="all",a.crossOrigin="anonymous",document.head.appendChild(a)}}}},a=n(6),c=n.n(a),i=n(4);function l(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t=e.name;return i.d.includes(t)?"amp/amp-story-page"!==t?s({},e,{parent:[""]}):e:s({},e,{parent:["amp/amp-story-page"]})},p=function(e){switch(e){case"core/quote":case"core/video":case"core/embed":return 200;case"core/pullquote":return 250;case"core/table":return 100;case"amp/amp-story-post-author":case"amp/amp-story-post-date":return 50;case"amp/amp-story-post-title":return 100;default:return 60}};function d(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={"1.2.0":function(e,t,n){var r={},o=f({},e);if(o.id=n.anchor||Vt(),n.rotationAngle){var a=o.style?o.style:{};a=f({},a,{transform:"rotate(".concat(parseInt(n.rotationAngle),"deg)")}),r.style=a}return n.ampFontFamily&&(r["data-font-family"]=n.ampFontFamily),f({},o,{},r)}},b=n(21),g=n.n(b),h=n(0);function O(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={"1.2.0":function(e,t,n){var r=n.ampAnimationType,o=n.ampAnimationDelay,a=n.ampAnimationDuration,c=n.ampAnimationAfter,i=n.positionTop,l=n.positionLeft,s=n.width,u=n.height,p={};void 0!==i&&void 0!==l&&(p=y({},p,{position:"absolute",top:"".concat(i||0,"%"),left:"".concat(l||0,"%")})),void 0!==s&&void 0!==u&&(p=y({},p,{width:s?"".concat(_e("x",s),"%"):"0%",height:u?"".concat(_e("y",u),"%"):"0%"}));var d={};return r&&(d["animate-in"]=r,o&&(d["animate-in-delay"]=parseInt(o)+"ms"),a&&(d["animate-in-duration"]=parseInt(a)+"ms"),c&&(d["animate-in-after"]=c)),Object(h.createElement)("amp-story-grid-layer",{template:"vertical","data-block-name":t.name},Object(h.createElement)("div",g()({className:"amp-story-block-wrapper",style:p},d),e))}};function j(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w={"1.2.0":function(e,t){var n="core/image"===t,r="core/video"===t,o=i.j.includes(t),a=i.i.includes(t)&&!n,c={anchor:{type:"string",source:"attribute",attribute:"id",selector:"amp-story-grid-layer .amp-story-block-wrapper > *, amp-story-cta-layer"},ampAnimationType:{type:"string"},addedAttributes:{type:"number",default:0},ampAnimationAfter:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},ampFontFamily:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},opacity:{type:"number",default:100}};return o&&(c.autoFontSize={type:"number",default:36},c.ampFitText={type:"boolean",default:!0}),E(t)&&(c.positionTop={default:0,type:"number"},c.positionLeft={default:5,type:"number"},a&&(c.height={type:"number",default:p(t)},c.width={type:"number",default:250}),c.rotationAngle={type:"number",default:0},c.ampAnimationType={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in"},c.ampAnimationDelay={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-delay",default:0},c.ampAnimationDuration={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-duration",default:0},c.ampAnimationAfter={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-after"}),n&&(c.ampShowImageCaption={type:"boolean",default:!1}),r&&(c.ampShowCaption={type:"boolean",default:!1},c.autoplay=k({},e.attributes.autoplay,{default:!0}),c.playsInline=k({},e.attributes.playsInline,{default:!1}),c.loop=k({},e.attributes.loop,{default:!0}),c.controls=k({},e.attributes.controls,{default:!1})),Object.keys(c).forEach((function(t){void 0===c[t].default&&void 0!==e.attributes[t]&&void 0!==e.attributes[t].default&&(c[t].default=e.attributes[t].default)})),k({},e,{attributes:k({},e.attributes,{},c),supports:k({},e.supports,{anchor:!1})})}},E=function(e){return i.c.includes(e)},_=function(e){return"amp/amp-story-cta"===e};function S(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 x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=function(e,t){if(!i.b.includes(t)||"core/template"===t)return e;if(e.attributes.deprecated&&w[e.attributes.deprecated.default]){var n=w[e.attributes.deprecated.default];if("function"==typeof n)return n(e,t)}var r="core/image"===t,o="core/video"===t,a=i.j.includes(t),c=i.i.includes(t)&&!r,l={addedAttributes:{type:"number",default:0},fontSize:{type:"string"},customFontSize:{type:"number"},ampFontFamily:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},opacity:{type:"number",default:100}};return a&&(l.autoFontSize={type:"number",default:36},l.ampFitText={type:"boolean",default:!0}),_(t)&&(l.anchor={type:"string",source:"attribute",attribute:"id",selector:"amp-story-cta-layer"}),E(t)&&(l.anchor={type:"string"},l.positionTop={default:0,type:"number"},l.positionLeft={default:5,type:"number"},c&&(l.height={type:"number",default:p(t)},l.width={type:"number",default:250}),l.rotationAngle={type:"number",default:0},l.ampAnimationType={type:"string"},l.ampAnimationDelay={default:0},l.ampAnimationDuration={default:0},l.ampAnimationAfter={type:"string"}),r&&(l.ampShowImageCaption={type:"boolean",default:!1}),o&&(l.ampShowCaption={type:"boolean",default:!1},l.ampAriaLabel={type:"string",default:""},l.autoplay=x({},e.attributes.autoplay,{default:!0}),l.playsInline=x({},e.attributes.playsInline,{default:!1}),l.loop=x({},e.attributes.loop,{default:!0}),l.controls=x({},e.attributes.controls,{default:!1})),Object.keys(l).forEach((function(t){void 0===l[t].default&&void 0!==e.attributes[t]&&void 0!==e.attributes[t].default&&(l[t].default=e.attributes[t].default)})),x({},e,{attributes:x({},e.attributes,{},l),supports:x({},e.supports,{anchor:!1,align:!1,alignWide:!1})})};function C(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e,t,n){var r={};if(!i.b.includes(t.name))return e;if(n.deprecated&&m[n.deprecated]){var o=m[n.deprecated];if("function"==typeof o)return o(e,t,n)}if(n.rotationAngle){var a=e.style?e.style:{};a=I({},a,{transform:"rotate(".concat(parseInt(n.rotationAngle),"deg)")}),r.style=a}return n.ampFontFamily&&(r["data-font-family"]=n.ampFontFamily),I({},e,{},r)},A=n(15),T=n.n(A),D=(n(9),n(19));function N(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}var R=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"text",selector:"code"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes;return Object(h.createElement)("pre",null,Object(h.createElement)("code",null,t.content))},migrate:D.a}],M=n(13),L=n.n(M),F=n(7);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}var z=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"},rotationAngle:{type:"number",default:0},ampAnimationType:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in"},ampAnimationDelay:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-delay",default:0},ampAnimationDuration:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-duration",default:0},ampAnimationAfter:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-after"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"amp-story-grid-layer .amp-story-block-wrapper, amp-story-cta-layer"},positionTop:{default:0,type:"number"},positionLeft:{default:5,type:"number"},ampShowImageCaption:{type:"boolean",default:!1},sizeSlug:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,i=n.align,l=n.href,s=n.rel,u=n.linkClass,p=n.width,d=n.height,f=n.id,m=n.linkTarget,b=n.sizeSlug,g=L()((t={},c()(t,"align".concat(i),i),c()(t,"size-".concat(b),b),c()(t,"is-resized",p||d),t)),O=Object(h.createElement)("img",{src:r,alt:o,className:f?"wp-image-".concat(f):null,width:p,height:d}),y=Object(h.createElement)(h.Fragment,null,l?Object(h.createElement)("a",{className:u,href:l,target:m,rel:s},O):O,!F.RichText.isEmpty(a)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:a}));return"left"===i||"right"===i||"center"===i?Object(h.createElement)("div",null,Object(h.createElement)("figure",{className:g},y)):Object(h.createElement)("figure",{className:g},y)},migrate:D.a}];function W(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}var q=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,i=n.providerNameSlug;if(!r)return null;var l=L()("wp-block-embed",(t={},c()(t,"is-type-".concat(a),a),c()(t,"is-provider-".concat(i),i),t));return Object(h.createElement)("figure",{className:l},Object(h.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!F.RichText.isEmpty(o)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:o}))},migrate:D.a}];function U(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}var V=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes;return Object(h.createElement)(h.RawHTML,null,t.content)},migrate:D.a}];function G(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}var K=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:""}},{deprecated:{default:"1.2.0"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=n?"ol":"ul";return Object(h.createElement)(F.RichText.Content,{tagName:o,value:r,multiline:"li"})},migrate:D.a}];function $(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}var Y=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html",selector:"pre",default:""}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes.content;return Object(h.createElement)(F.RichText.Content,{tagName:"pre",value:t})},migrate:D.a}],X=n(10),Q=n(2);function J(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 Z(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 ee(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 te(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 ne(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}var re={"core/code":R,"core/embed":q,"core/html":V,"core/image":z,"core/list":K,"core/preformatted":Y,"core/pullquote":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,i=r.textColor,l=r.customTextColor,s=r.value,u=r.citation,p=r.className;if(Object(X.includes)(p,"is-style-solid-color"))(t=Object(F.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var d=Object(X.get)(Object(Q.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(F.getColorObjectByAttributeValues)(d,o).color}}var f=Object(F.getColorClassName)("color",i),m=i||l?L()("has-text-color",c()({},f,f)):void 0,b=f?void 0:{color:l};return Object(h.createElement)("figure",{className:t,style:n},Object(h.createElement)("blockquote",{className:m,style:b},Object(h.createElement)(F.RichText.Content,{value:s,multiline:!0}),!F.RichText.isEmpty(u)&&Object(h.createElement)(F.RichText.Content,{tagName:"cite",value:u})))},migrate:D.a}],"core/quote":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(h.createElement)("blockquote",{style:{textAlign:n||null}},Object(h.createElement)(F.RichText.Content,{multiline:!0,value:r}),!F.RichText.isEmpty(o)&&Object(h.createElement)(F.RichText.Content,{tagName:"cite",value:o}))},migrate:D.a}],"core/table":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(F.getColorClassName)("background-color",c),l=L()(i,{"has-fixed-layout":n,"has-background":Boolean(i)}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(h.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object(h.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope;return Object(h.createElement)(F.RichText.Content,{tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object(h.createElement)("figure",null,Object(h.createElement)("table",{className:l},Object(h.createElement)(s,{type:"head",rows:r}),Object(h.createElement)(s,{type:"body",rows:o}),Object(h.createElement)(s,{type:"foot",rows:a})))},migrate:D.a}],"core/verse":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.textAlign,r=t.content;return Object(h.createElement)(F.RichText.Content,{tagName:"pre",style:{textAlign:n},value:r})},migrate:D.a}],"core/video":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src,u=t.playsInline;return Object(h.createElement)("figure",null,s&&Object(h.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s,playsInline:u}),!F.RichText.isEmpty(r)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:r}))},migrate:D.a}]};function oe(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}var ae=function(e,t){if(!E(t))return e;var n=e.deprecated?e.deprecated:[],r=re[t]||void 0;return r?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{deprecated:n=[].concat(T()(n),T()(r))}):e},ce=n(8);function ie(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 le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(e,t){if(!E(t))return e;var n={type:"raw",priority:20,selector:'amp-story-grid-layer[data-block-name="'.concat(t,'"]'),transform:function(e){var n=e.outerHTML,r=Object(ce.getBlockAttributes)(t,n);return"amp/amp-story-text"===t&&(r.content||(r.content=e.textContent,r.tagName=e.nodeName,r.ampFitText=!1)),Object(ce.createBlock)(t,r)}},r=e.transforms?le({},e.transforms):{},o=r.from?T()(r.from):[];return"core/list"===t&&(o=o.filter((function(e){return"prefix"!==e.type}))),o.push(n),le({},e,{transforms:le({},r,{from:o})})},ue=document.createElement("div"),pe=function(e,t,n){return!e.className&&n.includes("is-style-")&&0===n.indexOf("<amp-story-grid-layer")&&(ue.innerHTML=n,ue.children[0].children.length&&ue.children[0].children[0].children.length&&ue.children[0].children[0].children[0].className.includes("is-style-")&&(e.className=ue.children[0].children[0].children[0].className)),e},de=(n(22),function(e,t,n){if(!e||!E(t.name))return e;if(n.deprecated&&v[n.deprecated]){var r=v[n.deprecated];if("function"==typeof r)return r(e,t,n)}return e}),fe=function(e){return T()(new Set(e.map((function(e){return e.parent})))).map((function(t){return e.filter((function(e){var n=e.parent,r=e.animationType;return n===t&&r})).map((function(e){var t=e.duration,n=e.delay;return(n?parseInt(n):0)+(t?parseInt(t):0)})).reduce((function(e,t){return Math.max(e,t)}),0)})).reduce((function(e,t){return e+t}),0)},me=n(17),be=function(){var e=document.querySelector(".editor-block-list__layout"),t=document.querySelector(".editor-block-navigation");if(e&&!document.getElementById("amp-story-editor")){var n=document.createElement("div");n.id="amp-story-editor";var r=document.createElement("div");if(r.id="amp-story-block-navigation",e.parentNode.replaceChild(n,e),!document.getElementById("amp-story-controls")){var o=document.createElement("div");o.id="amp-story-controls",n.appendChild(o),Object(h.render)(Object(h.createElement)(me.v,null),o)}if(n.appendChild(e),n.appendChild(r),Object(h.render)(Object(h.createElement)(me.c,null),r),!document.getElementById("amp-story-editor-carousel")){var a=document.createElement("div");a.id="amp-story-editor-carousel",n.appendChild(a),Object(h.render)(Object(h.createElement)(me.i,null),a)}}if(t){if(!document.getElementById("amp-story-shortcuts")){var c=document.createElement("div");c.id="amp-story-shortcuts",t.parentNode.parentNode.insertBefore(c,t.parentNode.nextSibling),Object(h.render)(Object(h.createElement)(me.s,null),c)}if(!document.getElementById("amp-story-media-inserter")){var i=document.createElement("div");i.id="amp-story-media-inserter",t.parentNode.parentNode.insertBefore(i,t.parentNode.nextSibling),Object(h.render)(Object(h.createElement)(me.l,null),i)}var l=document.createElement("div");l.id="amp-story-inserter";var s=t.parentNode.parentNode.querySelector(".block-editor-inserter").parentNode;s.parentNode.replaceChild(l,s),Object(h.render)(Object(h.createElement)(me.k,{position:"bottom right"}),l)}var u=document.querySelector(".block-editor-writing-flow__click-redirect");u&&u.remove()},ge=n(53),he=n(1),Oe=Object(Q.select)("core/block-editor"),ye=Oe.getBlocksByClientId,ve=Oe.getBlockOrder,je=Oe.getBlock,ke=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,we=Object(he._x)("words","Word count type. Do not translate!","amp"),Ee=function(e){var t=je(e);if(t&&"amp/amp-story-text"===t.name){var n=!ye(ve(e)).filter((function(t){return t.clientId!==e})).some((function(e){return"h1"===e.attributes.tagName})),r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.fontSize,r=e.customFontSize,o=e.positionTop,a=e.type,c=e.content,i=void 0===c?"":c;if(a&&"auto"!==a)return a;if(o>80)return"p";if("huge"===n||r&&r>40)return t?"h1":"h2";if("large"===n||r&&r>24)return"h2";var l=Object(ge.count)(i,we,{});return 4>=l?t?"h1":"h2":10>=l?"h2":"p"}(t.attributes,n);t.attributes.tagName!==r&&ke(e,{tagName:r})}},_e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!n)if("x"===e)n=i.z;else{if("y"!==e)return 0;n=i.x}return Number((t/n*100).toFixed(2))},Se=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n||("x"===e?n=i.z:"y"===e&&(n=i.x)),Math.round(t/100*n)},xe=n(14),Pe=function(){var e=Object(xe.f)().width,t=Math.max(696,e);return{width:t,height:1/.75*t}},Ce=function(e,t){var n=t.filter(Boolean);if(!n)return e;if(1===n.length)e.backgroundColor=n[0].color;else{var r=n.map((function(e){return e.color||"transparent"})).join(", ");e.backgroundImage="linear-gradient(to bottom, ".concat(r,")")}return e},Ie=function(e){var t,n=e.className,r=e.ampFitText,o=e.backgroundColor,a=e.textColor,i=e.customBackgroundColor,l=e.customTextColor,s=e.opacity,u=Object(F.getColorClassName)("color",a),p=Object(F.getColorClassName)("background-color",o),d=s&&s<100;return L()(n,(t={"amp-text-content":!r,"has-text-color":a||l,"has-background":o||i},c()(t,u,u),c()(t,p,d?void 0:p),t))},Be=function(e){var t=e.align,n=e.fontSize,r=e.customFontSize,o=e.ampFitText,a=e.backgroundColor,c=e.textColor,l=e.customBackgroundColor,s=e.customTextColor,u=e.opacity,p=Object(F.getColorClassName)("color",c),d=Object(Q.select)("core/block-editor").getSettings(),f=d.colors,m=d.fontSizes,b=n?Object(F.getFontSize)(m,n,r).size:r,g=b&&(b/i.z*100).toFixed(2)+"vw";return{backgroundColor:Object(xe.d)(f,Object(F.getColorObjectByAttributeValues)(f,a,l),l,u),color:p?void 0:s,fontSize:o?void 0:g,textAlign:t||void 0}};function Ae(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 Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De=function(e){var t=e.tagName;return[{attributes:Te({},{align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var n=e.attributes,r=n.ampFitText,o=Ie(n),a=Be(n);if(!r)return Object(h.createElement)(F.RichText.Content,{tagName:t,style:a,className:o,value:"{content}"});var c=t;return Object(h.createElement)(c,{style:a,className:o},Object(h.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},"{content}"))},migrate:D.a}]},Ne=function(e){var t=e.attribute,n=e.placeholder,r=e.tagName,o=void 0===r?"p":r,a=e.isEditable,c=void 0!==a&&a;return{supports:{anchor:!0,reusable:!0},attributes:{align:{type:"string"}},save:Object(me.I)({tagName:o}),edit:Object(me.H)({attribute:t,placeholder:n,tagName:o,isEditable:c}),deprecated:De({tagName:o})}},Re=Object(Q.select)("core/block-editor").getBlock,Me=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,Le=function(e){var t=Re(e);if(t){var n="core/image"===t.name,r="core/video"===t.name;if(n||r){var o=t.attributes;(!o.ampShowImageCaption&&n||!o.ampShowCaption&&r)&&o.caption&&0!==o.caption.length&&Me(e,{caption:""})}}},Fe=Object(Q.select)("core/block-editor"),He=Fe.getBlock,ze=Fe.getBlockRootClientId,We=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,qe=function(e){var t=He(e);if(t&&i.b.includes(t.name)){var n=He(ze(e));if(0===t.attributes.positionTop&&n){var r=Object(ce.createBlock)(t.name);if(Object(X.every)(r.attributes,(function(e,n){return e===t.attributes[n]}))){var o=n.innerBlocks.filter((function(e){return i.c.includes(e.name)})).map((function(e){return e.attributes.positionTop})).reduce((function(e,t){return Math.max(e,t)}),0);We(e,{positionTop:o>75?0:o+10})}}}},Ue=Object(Q.select)("core/block-editor"),Ve=Ue.getBlock,Ge=Ue.getBlocksByClientId,Ke=Ue.getBlockOrder,$e=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,Ye=function(e){var t=Ve(e);if(t&&i.d.includes(t.name)&&"media"===t.attributes.autoAdvanceAfter){var n=Ge(Ke(e));if(!(t.attributes.autoAdvanceAfterMedia&&n.find((function(e){return e.attributes.anchor===t.attributes.autoAdvanceAfterMedia})))){var r=n.find((function(e){var t=e.name;return i.r.includes(t)})),o=r?r.attributes.anchor:"";t.attributes.autoAdvanceAfterMedia!==o&&$e(e,{autoAdvanceAfterMedia:o})}}},Xe=n(20),Qe=function(e,t,n,r,o){if(!e.offsetHeight||!e.offsetWidth)return!1;for(e.classList.toggle("is-measuring"),r++;r-o>1;){var a=Math.floor((o+r)/2);e.style.fontSize=a+"px";var c=e.offsetHeight,i=e.offsetWidth;c>t||i>n?r=a:o=a}return e.style.fontSize=o+"px",e.classList.toggle("is-measuring"),o},Je=function(e){var t=e.name,n=e.clientId;switch(t){case"amp/amp-story-text":return document.querySelector("#block-".concat(n," .block-editor-rich-text__editable"));case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var r=t.replace("/","-");return document.querySelector("#block-".concat(n," .wp-block-").concat(r));default:return null}},Ze=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,et=function(e){var t=e.name,n=e.clientId,r=e.attributes,o=r.width,a=r.height,c=r.ampFitText,i=r.content,l=r.autoFontSize;if(c)switch(t){case"amp/amp-story-text":var s=Je(e);if(s&&i.length){var u=Qe(s,a,o,Xe.c,Xe.f);u&&l!==u&&Ze(n,{autoFontSize:u})}break;case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var p=Je(e);if(p){var d=Qe(p,a,o,Xe.c,Xe.f);d&&l!==d&&Ze(n,{autoFontSize:d})}}},tt=n(32),nt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,rt=function(e){var t=e.name,n=e.clientId,r=e.attributes,o=r.width,a=r.height,c=r.ampFitText,i=r.content,l=r.rotationAngle,s=r.positionLeft,u=r.positionTop,p=r.isPasted;if(!c){var d,f;switch(t){case"amp/amp-story-text":var m=Je(e);m&&i.length&&(d=m.scrollHeight>a?m.scrollHeight:null,f=m.scrollWidth>o?m.scrollWidth:null);break;case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var b=Je(e);b&&(b.classList.toggle("is-measuring"),d=b.offsetHeight>a?b.offsetHeight:null,f=b.offsetWidth>o?b.offsetWidth:null,b.classList.toggle("is-measuring"))}if((l||p)&&(f||d)){var g=f?f-o:0,h=d?d-a:0,O=Object(tt.b)({direction:"bottomRight",angle:l,isText:"amp/amp-story-text"===t,oldWidth:o,oldHeight:a,newWidth:o+g,newHeight:a+h,oldPositionLeft:s,oldPositionTop:u}),y=O.left,v=O.top,j={positionLeft:Number(_e("x",y).toFixed(2)),positionTop:Number(_e("y",v).toFixed(2))};d&&(j.height=d),f&&(j.width=f),nt(n,j)}}},ot=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,at=function(e){if(e){var t=e.attributes;t.deprecated&&"migrated"===t.deprecated&&ot(e.clientId,{deprecated:null})}},ct=Object(Q.select)("core").getMedia,it=Object(Q.select)("core/block-editor").getBlock,lt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,st=function(e){var t=it(e);if(t){var n=t.name,r=t.attributes;if("core/image"===n){var o=r.width,a=r.height;if(!o&&!a&&r.id>0){var c=ct(r.id);if(c&&c.media_details){var l=c.media_details,s=l.height,u=l.width,p=1;(i.z<u||i.x<s)&&(p=Math.max(u/i.z,s/i.x)),lt(e,{width:Math.round(u/p),height:Math.round(s/p)})}}}}},ut=Object(Q.select)("amp/story").getAnimatedBlocks,pt=Object(Q.dispatch)("amp/story"),dt=pt.addAnimation,ft=pt.changeAnimationType,mt=pt.changeAnimationDuration,bt=pt.changeAnimationDelay,gt=Object(Q.select)("core/block-editor"),ht=gt.getBlocksByClientId,Ot=gt.getBlockRootClientId,yt=gt.getClientIdsWithDescendants,vt=function e(t,n,r){var o,a=t.attributes.ampAnimationAfter;(a&&(o=r.find((function(e){return e.attributes.anchor===a}))),o)&&((ut()[n]||[]).find((function(e){return e.id===o.clientId}))||e(o,n,r));dt(n,t.clientId,o?o.clientId:void 0)},jt=function(){var e=ut();if(Object(X.isEqual)({},e)){var t=ht(yt()),n=!0,r=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var i=a.value,l=Ot(i.clientId);if(l){var s=i.attributes,u=s.ampAnimationType,p=s.ampAnimationDuration,d=s.ampAnimationDelay;vt(i,l,t),ft(l,i.clientId,u),mt(l,i.clientId,p?parseInt(String(p).replace("ms","")):void 0),bt(l,i.clientId,d?parseInt(String(d).replace("ms","")):void 0)}}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}},kt=function(e,t,n,r,o,a){return r&&o?Object(he.sprintf)(Object(he.__)("Block %s is the only block, and cannot be moved","amp"),e):a>0&&!o?Object(he.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
2
Object(he.__)("Move %1$s block from position %2$d down to position %3$d","amp"),e,t,n):a>0&&o?Object(he.sprintf)(Object(he.__)("Block %s is at the end of the content and can’t be moved down","amp"),e):a<0&&!r?Object(he.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
3
- Object(he.__)("Move %1$s block from position %2$d up to position %3$d","amp"),e,t,n):a<0&&r?Object(he.sprintf)(Object(he.__)("Block %s is at the beginning of the content and can’t be moved up","amp"),e):void 0},wt=n(34),Et=n.n(wt),_t=n(11),St=n.n(_t),xt=n(37),Pt=n.n(xt),Ct=n(33),It=Object(Q.select)("core/block-editor").getSettings,Bt=Object(Q.dispatch)("core").saveMedia,At=function(e){var t=document.createElement("video");return t.muted=!0,t.crossOrigin="anonymous",t.preload="metadata",t.currentTime=.5,new Promise((function(n,r){t.addEventListener("error",r),t.addEventListener("canplay",(function(){var e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight,e.getContext("2d").drawImage(t,0,0,e.width,e.height),e.toBlob(n,"image/jpeg")})),t.src=e}))},Tt=function(){var e=Pt()(Et.a.mark((function e(t){var n,r,o,a,c;return Et.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.src,o=It(),a=o.__experimentalMediaUpload,e.next=4,At(r);case 4:return c=e.sent,e.abrupt("return",new Promise((function(e,t){a({filesList:[c],onFileChange:function(t){var r=St()(t,1)[0],o=r.id,a=r.url;n&&o&&(Bt({id:n,featured_media:o}),Bt({id:o,meta:{amp_is_poster:!0}})),Object(Ct.isBlobURL)(a)||e(r)},onError:t})})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Dt=function(e){if(!e)return null;var t=e.name,n=e.clientId;return E(t)?document.querySelector('.amp-page-child-block[data-block="'.concat(n,'"]')):null},Nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector('[data-block="'.concat(e,'"]'))},Rt=function(e){var t=e.name,n=e.clientId;return"amp/amp-story-page"===t?Nt(n):_(t)?document.querySelector("amp-story-cta-button-".concat(n)):document.querySelector("#block-".concat(n))},Mt=function(e,t){var n=Dt(e);n&&t&&(n.classList.remove("story-animation-init-".concat(t)),n.classList.remove("story-animation-".concat(t)),n.style.removeProperty("--animation-offset-x"),n.style.removeProperty("--animation-offset-y"),n.style.removeProperty("--animation-scale-start"),n.style.removeProperty("--animation-scale-end"),n.style.removeProperty("--animation-duration"),n.style.removeProperty("--animation-delay"))},Lt=function(e,t){var n=t.getBoundingClientRect(),r=n.left,o=n.top,a=e.getBoundingClientRect();return{top:a.top-o,right:a.right-r,bottom:a.bottom-o,left:a.left-r}},Ft=Object(Q.select)("core/block-editor").getBlockRootClientId,Ht=function(e,t){if(e<=i.z||t<=i.x){var n=i.z>e?i.z/e:1,r=i.x>t?i.x/t:1;return 1.25*Math.max(n,r)}return 1},zt=function(e,t){var n=Dt(e);if(n&&t){Mt(e,t);var r=function(e,t){var n,r,o,a=Dt(e),c=Rt(e),l=Ft(e.clientId),s=Nt(l),u=c.offsetWidth,p=c.offsetHeight,d=Lt(a,s),f=d.top,m=d.left;switch(t){case"fly-in-left":case"rotate-in-left":case"whoosh-in-left":n=-(m+u);break;case"fly-in-right":case"rotate-in-right":case"whoosh-in-right":n=i.z+m+u;break;case"fly-in-top":r=-(f+p);break;case"fly-in-bottom":r=i.x+f+p;break;case"drop":r=Math.max(160,f+p);break;case"pan-left":case"pan-right":o=Ht(u,p),n=i.z-u*o,r=(i.x-p*o)/2;break;case"pan-down":case"pan-up":n=-u*(o=Ht(u,p))/2,r=i.x-p*o;break;default:n=0}return{offsetX:n,offsetY:r,scalingFactor:o}}(e,t),o=r.offsetX,a=r.offsetY,c=r.scalingFactor;o&&n.style.setProperty("--animation-offset-x","".concat(o,"px")),a&&n.style.setProperty("--animation-offset-y","".concat(a,"px")),c&&(n.style.setProperty("--animation-scale-start",c),n.style.setProperty("--animation-scale-end",c)),n.classList.add("story-animation-init-".concat(t))}},Wt=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},a=Dt(e);if(a&&t){var c=i.f[t]||0;a.classList.remove("story-animation-init-".concat(t)),a.style.setProperty("--animation-duration","".concat(n||c,"ms")),a.style.setProperty("--animation-delay","".concat(r||0,"ms")),a.classList.add("story-animation-".concat(t)),a.addEventListener("animationend",o,{once:!0})}else o()},qt=n(54),Ut=n.n(qt),Vt=function(){return Ut()().replace(/^\d/,"a")},Gt=Object(Q.select)("core/block-editor").getBlock,Kt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,$t=function(e){var t=Gt(e);t&&(t.attributes.anchor||Kt(t.clientId,{anchor:Vt()}))},Yt=function(e){if(!e||!e.url)return{mediaUrl:void 0,mediaId:void 0,mediaType:void 0,mediaAlt:void 0,poster:void 0};var t;if(e.media_type)t=e.media_type===i.C?i.C:i.p;else{if(e.type!==i.p&&e.type!==i.C)return{mediaUrl:void 0,mediaId:void 0,mediaType:void 0,mediaAlt:void 0,poster:void 0};t=e.type}var n=e.alt||e.title,r=e.url,o=i.C===t&&e.image&&e.image.src!==e.icon?e.image.src:void 0;return{mediaUrl:r,mediaId:e.id,mediaType:t,mediaAlt:n,poster:o}},Xt=n(55),Qt=n.n(Xt),Jt=function(e,t,n){if("core/video"!==t.name||!e.props.children||!n.ampAriaLabel)return e;var r="figure"===e.type,o=Array.isArray(e.props.children)?e.props.children:[e.props.children],a=["amp-video","video"].includes(o[0].type);if(!r||!a)return e;var c=e,i=Qt()(o),l=i[0],s=i.slice(1),u=Object(h.cloneElement)(l,{"aria-label":n.ampAriaLabel},l.props.children);return h.cloneElement.apply(void 0,[c,{},u].concat(T()(s)))},Zt=Object(Q.select)("core/block-editor"),en=Zt.getBlocksByClientId,tn=Zt.getBlockOrder,nn=function(e,t){return en(tn(e)).find((function(e){return e.name===t}))},rn=function(e){return nn(e,"amp/amp-story-cta")},on=function(e){return nn(e,"amp/amp-story-page-attachment")},an=Object(Q.select)("core/block-editor").getBlock,cn=function(e){var t=an(e);return!!t&&"amp/amp-story-page"===t.name},ln=function(e){var t=document.createElement("textarea");t.setAttribute("readonly",""),t.style={position:"absolute",left:"-9999px"},t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},sn=function(e){var t=e.url;return Object(X.has)(e,["media_details","sizes",i.q,"source_url"])?t=e.media_details.sizes[i.q].source_url:Object(X.has)(e,["media_details","sizes","large","source_url"])&&(t=e.media_details.sizes.large.source_url),t},un=function(e){var t=document.querySelector(e);if(t){var n=document.createRange();n.selectNodeContents(t),n.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(n)}},pn=function(e){return{autoAdvanceAfter:e.amp_story_auto_advance_after,autoAdvanceAfterDuration:e.amp_story_auto_advance_after_duration}},dn=function(e){var t={srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t},fn=function(e){var t=Object(Q.useSelect)((function(e){return e("core/block-editor").getBlockOrder()}),[]),n=Object(Q.useSelect)((function(t){return t("core/block-editor").getBlock(e)}),[e]),r=Object(Q.useSelect)((function(e){return e("amp/story").getCurrentPage()}),[]),o=t.findIndex((function(e){return e===r})),a=Object(Q.useDispatch)("amp/story").setCurrentPage,c=Object(Q.useDispatch)("core/block-editor"),i=c.selectBlock,l=c.removeBlock,s=c.insertBlock,u=c.updateBlockAttributes;return{getPageByOffset:function(e){var n=o+e;return n>=0&&n<t.length?t[n]:null},moveBlockToPage:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(e);var o=Object(ce.cloneBlock)(n);s(o,null,t),null!==r&&u(o.clientId,r),a(t),i(o.clientId)}}},mn=function(){var e=Object(Q.useSelect)((function(e){return e("core/block-editor")}),[]),t=e.getBlockListSettings,n=e.canInsertBlockType;return function(e,r){var o=t(r),a=n(e,r)&&o&&o.allowedBlocks.includes(e);return Boolean(a)}},bn=function(){var e=Object(Q.useDispatch)("core/notices").createErrorNotice;return function(t){var n=Object(ce.getBlockType)(t),r=Object(he.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
4
- Object(he.__)("Unable to paste %s block.","amp"),n.title);e(r,{type:"snackbar",isDismissible:!0})}};n.d(t,"C",(function(){return o})),n.d(t,"S",(function(){return u})),n.d(t,"n",(function(){return p})),n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return B})),n.d(t,"f",(function(){return ae})),n.d(t,"h",(function(){return se})),n.d(t,"g",(function(){return pe})),n.d(t,"Z",(function(){return de})),n.d(t,"w",(function(){return fe})),n.d(t,"P",(function(){return be})),n.d(t,"I",(function(){return Ee})),n.d(t,"r",(function(){return _e})),n.d(t,"s",(function(){return Se})),n.d(t,"p",(function(){return Pe})),n.d(t,"c",(function(){return Ce})),n.d(t,"m",(function(){return Ie})),n.d(t,"v",(function(){return Be})),n.d(t,"o",(function(){return Ne})),n.d(t,"F",(function(){return Le})),n.d(t,"G",(function(){return qe})),n.d(t,"J",(function(){return Ye})),n.d(t,"L",(function(){return et})),n.d(t,"K",(function(){return rt})),n.d(t,"E",(function(){return at})),n.d(t,"H",(function(){return st})),n.d(t,"D",(function(){return jt})),n.d(t,"k",(function(){return kt})),n.d(t,"V",(function(){return Tt})),n.d(t,"R",(function(){return zt})),n.d(t,"U",(function(){return Wt})),n.d(t,"Q",(function(){return Mt})),n.d(t,"B",(function(){return $t})),n.d(t,"O",(function(){return Yt})),n.d(t,"d",(function(){return Jt})),n.d(t,"l",(function(){return rn})),n.d(t,"q",(function(){return on})),n.d(t,"A",(function(){return cn})),n.d(t,"e",(function(){return ln})),n.d(t,"t",(function(){return sn})),n.d(t,"x",(function(){return Vt})),n.d(t,"T",(function(){return un})),n.d(t,"i",(function(){return Nt})),n.d(t,"z",(function(){return E})),n.d(t,"M",(function(){return pn})),n.d(t,"N",(function(){return dn})),n.d(t,"j",(function(){return Rt})),n.d(t,"u",(function(){return Lt})),n.d(t,"y",(function(){return _})),n.d(t,"Y",(function(){return fn})),n.d(t,"X",(function(){return mn})),n.d(t,"W",(function(){return bn}))},function(e,t,n){"use strict";n.d(t,"z",(function(){return c})),n.d(t,"x",(function(){return i})),n.d(t,"y",(function(){return l})),n.d(t,"A",(function(){return s})),n.d(t,"t",(function(){return u})),n.d(t,"s",(function(){return p})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"h",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"g",(function(){return g})),n.d(t,"i",(function(){return h})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return y})),n.d(t,"o",(function(){return v})),n.d(t,"p",(function(){return j})),n.d(t,"C",(function(){return k})),n.d(t,"u",(function(){return w})),n.d(t,"r",(function(){return E})),n.d(t,"q",(function(){return _})),n.d(t,"f",(function(){return S})),n.d(t,"e",(function(){return x})),n.d(t,"w",(function(){return P})),n.d(t,"v",(function(){return C})),n.d(t,"B",(function(){return I})),n.d(t,"m",(function(){return B})),n.d(t,"n",(function(){return A})),n.d(t,"l",(function(){return T})),n.d(t,"k",(function(){return D}));var r=n(15),o=n.n(r),a=n(1),c=328,i=553,l=Math.floor(i/5),s=50,u=40,p={default:30,"core/pullquote":180,"core/table":100,"core/code":45},d=["amp/amp-story-page","core/block","core/template"],f=["core/code","core/embed","core/image","core/list","core/preformatted","core/pullquote","core/quote","core/table","core/verse","core/video","amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title","core/html","core/block","core/template"],m=["amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],b=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],g=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title","amp/amp-story-cta","amp/amp-story-page-attachment"],h=["core/code","core/embed","core/image","core/list","core/pullquote","core/quote","core/table","core/video","amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],O=[].concat(f,["amp/amp-story-cta","amp/amp-story-page-attachment"]),y=[].concat(d,o()(O)),v=["amp/amp-story-cta","amp/amp-story-page-attachment"],j="image",k="video",w=[j],E=["core/video","core/audio"],_="amp_story_page",S={drop:1600,"fade-in":400,"fly-in-bottom":400,"fly-in-left":400,"fly-in-right":400,"fly-in-top":400,pulse:400,"rotate-in-left":600,"rotate-in-right":600,"twirl-in":1e3,"whoosh-in-left":400,"whoosh-in-right":400,"pan-left":1e3,"pan-right":1e3,"pan-down":1e3,"pan-up":1e3,"zoom-in":1e3,"zoom-out":1e3},x=[{value:"",label:Object(a.__)("None","amp")},{value:"drop",label:Object(a.__)("Drop","amp")},{value:"fade-in",label:Object(a.__)("Fade In","amp")},{value:"fly-in-bottom",label:Object(a.__)("Fly In Bottom","amp")},{value:"fly-in-left",label:Object(a.__)("Fly In Left","amp")},{value:"fly-in-right",label:Object(a.__)("Fly In Right","amp")},{value:"fly-in-top",label:Object(a.__)("Fly In Top","amp")},{value:"pulse",label:Object(a.__)("Pulse","amp")},{value:"rotate-in-left",label:Object(a.__)("Rotate In Left","amp")},{value:"rotate-in-right",label:Object(a.__)("Rotate In Right","amp")},{value:"twirl-in",label:Object(a.__)("Twirl In","amp")},{value:"whoosh-in-left",label:Object(a.__)("Whoosh In Left","amp")},{value:"whoosh-in-right",label:Object(a.__)("Whoosh In Right","amp")},{value:"pan-left",label:Object(a.__)("Pan Left","amp")},{value:"pan-right",label:Object(a.__)("Pan Right","amp")},{value:"pan-down",label:Object(a.__)("Pan Down","amp")},{value:"pan-up",label:Object(a.__)("Pan Up","amp")},{value:"zoom-in",label:Object(a.__)("Zoom In","amp")},{value:"zoom-out",label:Object(a.__)("Zoom Out","amp")}],P=["left","bottomLeft","topLeft"],C=["top","topRight","topLeft"],I=7,B=[-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90,105,120,135,150,165,180],A=10,T=8,D=8},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){e.exports=n(64)()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){var r=n(43),o=n(62),a=n(44);e.exports=function(e,t){return r(e)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"i",(function(){return g})),n.d(t,"f",(function(){return h})),n.d(t,"m",(function(){return O})),n.d(t,"d",(function(){return v})),n.d(t,"c",(function(){return j})),n.d(t,"g",(function(){return k})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return E})),n.d(t,"k",(function(){return _})),n.d(t,"h",(function(){return S})),n.d(t,"j",(function(){return x})),n.d(t,"e",(function(){return C})),n.d(t,"l",(function(){return I}));var r=n(34),o=n.n(r),a=n(37),c=n.n(a),i=n(11),l=n.n(i),s=n(10),u=n(1),p=n(7),d=n(20),f=window.ampStoriesEditorSettings,m=(void 0===f?{}:f).allowedVideoMimeTypes,b=void 0===m?["video/mp4"]:m,g=function(e,t){if(!e||!e.width||!e.height)return!1;var n=t.width,r=t.height;return e.width>=n&&e.height>=r},h=function(){var e=d.e;return{width:e,height:e*(9/16)}},O=function(e,t,n){if(!e)return n?[Object(u.__)("Selecting a featured image is required.","amp")]:[Object(u.__)("Selecting a featured image is recommended for an optimal user experience.","amp")];var r=[];if(["image/png","image/gif","image/jpeg"].includes(e.mime_type)||r.push(
5
/* translators: 1: .jpg, 2: .png. 3: .gif */
6
Object(u.sprintf)(Object(u.__)("The featured image must be in %1$s, %2$s, or %3$s format.","amp"),".jpg",".png",".gif")),!g(e.media_details,t)){var o=t.width,a=t.height;r.push(
7
/* translators: 1: minimum width, 2: minimum height. */
8
- Object(u.sprintf)(Object(u.__)("The featured image should have a size of at least %1$s by %2$s pixels.","amp"),Math.ceil(o),Math.ceil(a)))}return 0===r.length?null:r},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(!e)return[];3===(e=e.replace("#","")).length&&(e="".concat(e.charAt(0)).concat(e.charAt(0)).concat(e.charAt(1)).concat(e.charAt(1)).concat(e.charAt(2)).concat(e.charAt(2)));var n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return[n,r,o,(t=Math.min(100,Math.max(0,t)))/100]},v=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=t?Object(p.getColorObjectByColorValue)(e,t.color)||Object(p.getColorObjectByAttributeValues)(e,t.slug,t.color||n):{color:n};if(o&&o.color){var a=y(o.color,r),c=l()(a,4),i=c[0],s=c[1],u=c[2],d=c[3];return"rgba(".concat(i,", ").concat(s,", ").concat(u,", ").concat(d,")")}},j=function(e,t){return e&&t?e>t?"landscape":t>e?"portrait":"square":null},k=function(e){var t=Object(s.template)("<p>".concat(e,"</p>"),{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});return function(e){return t(e)}},w=function(e,t){if(e){var n=Object(s.get)(this,["options","allowedTypes"],null),r=this.get("select");n&&e.get("type")&&!function(e,t){var n=e.get("type"),r=e.get("mime");return!(!t.includes(n)&&!t.includes(r))&&!("video"===n&&!b.includes(r))}(e,n)?(this.secondary.set(d.b,new t({mimeType:e.get("mime")})),r&&r.model&&r.model.set("disabled",!0)):(this.secondary.unset(d.b),r&&r.model&&r.model.set("disabled",!1))}},E=function(e,t){e&&(("video"===Object(s.get)(e,["media_type"],null)||"video"===Object(s.get)(e,["attributes","type"],null))&&x(S(e))?this.secondary.set(d.a,new t({actualVideoMegabytesPerSecond:Math.round(S(e)/d.d),maxVideoMegabytesPerSecond:d.g})):this.secondary.unset(d.a))},_=function(){return Boolean(this.secondary.get(d.b))&&Boolean(this.secondary.get(d.a))},S=function(e){return Object(s.has)(e,["media_details","filesize"])&&Object(s.has)(e,["media_details","length"])?e.media_details.filesize/e.media_details.length:Object(s.has)(e,["attributes","filesizeInBytes"])&&Object(s.has)(e,["attributes","fileLength"])?e.attributes.filesizeInBytes/P(e.attributes.fileLength):null},x=function(e){return e>d.g*d.d},P=function(e){var t=e.split(":");return Object(s.reduce)(t,(function(e,n,r){var o=isNaN(parseInt(n))?0:parseInt(n),a=t.length-1-r;return e+Math.pow(60,a)*o}),0)},C=function(){var e=c()(o.a.mark((function e(t){var n,r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=window,r=n.fetch,e.next=3,r(t,{method:"head"});case 3:return a=e.sent,e.abrupt("return",Number(a.headers.get("content-length")));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(e){var t=e.url,n=e.id,r=e.width,o=e.height,a=e.onSelect,c=e.dispatchImage,i={};i.url=t,i.thumbnail_url=t,i.timestamp=Object(s.now)(),n&&(i.attachment_id=n),r&&(i.width=r),o&&(i.height=o),a(i),c(n)}},function(e,t,n){var r=n(68),o=n(45),a=n(69);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";var r=n(0),o=(n(22),n(9),n(5)),a=n(2),c=n(1),i=n(4),l=n(21),s=n.n(l);var u=function(e){var t=e.value,n=void 0===t?"":t,o=e.options,a=e.onChange,i={value:"",label:Object(c.__)("Immediately","amp")};return Object(r.createElement)(Rt,{value:n,options:o,defaultOption:i,onChange:function(e){var t=e.value,n=e.block;return a(""===t?void 0:n.clientId)},label:Object(c.__)("Begin after","amp"),id:"amp-stories-animation-order-picker",ariaLabel:function(e){var t=e.value,n=e.blockType;return t?Object(c.sprintf)(Object(c.__)("Begin after: %s","amp"),n.title):Object(c.__)("Begin immediately","amp")},renderToggle:function(e){return Object(r.createElement)(_,s()({},e,{displayIcon:!1,alignIcon:"right"}))},renderOption:function(e){return Object(r.createElement)("span",{className:"components-preview-picker__dropdown-label"},Object(r.createElement)(_,s()({},e,{alignIcon:"right"})))}})},p=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M15 15H5V5h10v10z"}))};p.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20"};var d=function(e){var t=e.clientId,n=e.page,l=e.animatedBlocks,s=e.onAnimationTypeChange,d=e.onAnimationDurationChange,f=e.onAnimationDelayChange,m=e.onAnimationAfterChange,b=e.animationType,g=e.animationDuration,h=e.animationDelay,O=e.animationAfter,y=Object(a.useSelect)((function(e){var r=(0,e("core/block-editor").getBlock)(t);return{isImageBlock:r&&"core/image"===r.name,isPlayingAnimation:e("amp/story").isPlayingAnimation(n,t)}}),[t,n]),v=y.isImageBlock,j=y.isPlayingAnimation,k=Object(a.useDispatch)("amp/story"),w=k.playAnimation,E=k.stopAnimation,_=Object(r.useCallback)((function(){return w(n,t)}),[n,t,w]),S=Object(r.useCallback)((function(){return E(n,t)}),[n,t,E]),x=i.f[b]||0,P=i.e.filter((function(e){return!(e.value.startsWith("pan-")&&!v)}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.SelectControl,{label:Object(c.__)("Animation Type","amp"),value:b,options:P,onChange:function(e){s(e),d(i.f[e]||0),f(0)}}),b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Duration (ms)","amp"),value:g,onChange:d,min:"0",max:"5000",placeholder:x,initialPosition:x}),Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Delay (ms)","amp"),value:h||0,onChange:f,min:"0",max:"5000"}),Object(r.createElement)(u,{value:O,options:l(),onChange:m}),Object(r.createElement)(o.IconButton,{icon:j?p({width:20,height:20}):"controls-play",className:"is-button is-default",onClick:j?S:_},j?Object(c.__)("Stop Animation","amp"):Object(c.__)("Play Animation","amp"))))},f=n(3),m=n(11),b=n.n(m),g=n(13),h=n.n(g),O=function(e){var t=e.block,n=e.isSelected,i=e.onClick,l=e.unMovableBlock,s=t.clientId,u=Object(r.useState)(!1),p=b()(u,2),d=p[0],f=p[1],m=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlockRootClientId)(s)}),[s]),g=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlockOrder)(m)}),[m]),O=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlocksByClientId)(g).map((function(e){return e.clientId})).reverse()}),[g]),y=Object(a.useDispatch)("core/block-editor").moveBlockToPosition,v=function(e){return O.indexOf(e)},j=function(e,t){var n=function(e){var t={srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),r=n.srcClientId,o=n.srcIndex,a=n.type;if("block"===a&&r!==s){var c,i,l,u=v(s),p=function(e){if(s){var t=v(s);return"top"===e.y?t:t+1}}(t);c=r,i=o<u?p-1:p,l=g.length-1-i,y(c,m,m,l)}},k="block-navigation-item-".concat(s);if(l)return Object(r.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(r.createElement)(o.Button,{className:h()("components-button editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":n}),onClick:i,id:k},Object(r.createElement)(_,{block:t,accessibilityText:n&&Object(c.__)("(selected block)","amp")})));var w={type:"block",srcIndex:v(s),srcClientId:s};return Object(r.createElement)("div",{className:h()("editor-block-navigation__item block-editor-block-navigation__item",{"block-editor-block-navigation__item-is-dragging":d})},Object(r.createElement)(o.Draggable,{elementId:k,transferData:w,onDragStart:function(){return f(!0)},onDragEnd:function(){return f(!1)}},(function(e){var a=e.onDraggableStart,l=e.onDraggableEnd;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.DropZone,{className:d?"is-dragging-block":void 0,onDrop:j}),Object(r.createElement)("div",{className:"block-navigation__placeholder"}),Object(r.createElement)(o.Button,{className:h()("components-button editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":n}),onClick:i,id:k,onDragStart:a,onDragEnd:l,draggable:!0},Object(r.createElement)(_,{block:t,accessibilityText:n&&Object(c.__)("(selected block)","amp")})))})))};n(73);function y(e){var t=e.blocks,n=e.selectedBlockClientId,c=e.unMovableBlock,i=Object(a.useDispatch)("core/block-editor").selectBlock;return Object(r.createElement)(r.Fragment,null,t.length>0&&Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},t.map((function(e){var t=e.clientId===n;return Object(r.createElement)("li",{key:e.clientId},Object(r.createElement)(O,{block:e,isSelected:t,onClick:function(){return i(e.clientId)}}))})))),c&&Object(r.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list editor-block-navigation__list__static",role:"list"},Object(r.createElement)("li",{key:c.clientId},Object(r.createElement)(O,{block:c,isSelected:c.clientId===n,onClick:function(){return i(c.clientId)}}))))}var v=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor"),r=n.getBlockOrder,o=n.getBlocksByClientId,a=n.getSelectedBlockClientId,c=t()?o(r(t())):[];return{blocks:c.filter((function(e){var t=e.name;return Object(f.z)(t)})).reverse(),unMovableBlock:c.find((function(e){var t=e.name;return!Object(f.z)(t)})),selectedBlockClientId:a()}}),[]),t=e.blocks,n=e.unMovableBlock,i=e.selectedBlockClientId;if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;var l=t.length>0||n;return Object(r.createElement)(o.NavigableMenu,{role:"presentation",className:"block-editor-block-navigation__container"},Object(r.createElement)("p",{className:"block-editor-block-navigation__label"},Object(c.__)("Elements","amp")),l&&Object(r.createElement)(y,{blocks:t,selectedBlockClientId:i,unMovableBlock:n}),!l&&Object(r.createElement)("p",{className:"block-editor-block-navigation__paragraph"},Object(c.__)("No elements added to this page yet.","amp")))},j=n(8),k=n(7),w=function(e){var t=e.clientId,n=e.name,a=e.attributes,c=e.innerBlocks,i=void 0===c?[]:c,l=Object(j.createBlock)(n,a,i);return Object(r.createElement)(o.Disabled,{className:"block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(r.createElement)(k.BlockEdit,{name:n,focus:!1,clientId:t,isLocked:!0,insertBlocksAfter:!1,attributes:l.attributes,setAttributes:function(){}}))},E=n(36),_=function(e){var t=e.block,n=e.label,o=e.displayIcon,i=void 0===o||o,l=e.alignIcon,s=void 0===l?"left":l,u=e.accessibilityText,p=void 0!==u&&u,d=Object(a.useSelect)((function(e){if(!t)return{content:n,icon:null};var r=n,o=t.attributes,a=t.name,i=e("core/editor").getEditedPostAttribute,l=e("core"),s=l.getAuthors,u=l.getMedia,p=Object(j.getBlockType)(a);r=p.title;var d="";switch(a){case"core/image":if(o.url&&(d=o.url.slice(o.url.lastIndexOf("/")).slice(1,30)).length>0&&(r=d),o.id){var f=u(o.id);f&&(r=f.caption.raw||f.title.raw||r)}break;case"amp/amp-story-text":o.content.length>0&&(d=o.content.replace(/<br>/g," ").replace(/<[^<>]+>/g,"").slice(0,30)),r=d.length>0?d:p.title;break;case"amp/amp-story-post-author":var m=s().find((function(e){return e.id===i("author")}));r=m?m.name:Object(c.__)("Post Author","amp");break;case"amp/amp-story-post-date":var b=i("date"),g=Object(E.__experimentalGetSettings)().formats.date,h=b||new Date;r=Object(E.dateI18n)(g,h);break;case"amp/amp-story-post-title":r=i("title")||p.title}return{content:r,icon:p.icon}}),[n,t]),f=d.content,m=d.icon;return Object(r.createElement)(r.Fragment,null,i&&"left"===s&&Object(r.createElement)(k.BlockIcon,{icon:m}),f.length>20?"".concat(f.substr(0,20),"…"):f,p&&Object(r.createElement)("span",{className:"screen-reader-text"},p),i&&"right"===s&&Object(r.createElement)(k.BlockIcon,{icon:m}))},S=n(16),x=function(e){var t=e.blockClass,n=e.blockElementId,o=e.clientId,a=e.hasOverlay,c=e.isDraggable,i=e.isSelected,l=e.name,s=e.toggleIsEditing,u=e.toggleOverlay,p=e.text,d=e.textStyle,f=e.textWrapperClass,m=e.placeholder;return Object(r.createElement)(wt,{clientId:o,blockName:l,blockElementId:n,isDraggable:c,isMovable:!0},Object(r.createElement)("div",{role:"textbox",tabIndex:"-1",className:h()("is-not-editing","editor-rich-text","block-editor-rich-text",t),onClick:function(){i&&s(!0)},onMouseDown:function(e){1<e.detail&&e.preventDefault()},onKeyDown:function(e){e.stopPropagation(),S.ENTER===e.keyCode&&i&&(u(!1),s(!0))}},a&&Object(r.createElement)("div",{role:"textbox",tabIndex:"-1",className:"amp-overlay",onClick:function(e){u(!1),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation(),S.ENTER===e.keyCode&&i&&(u(!1),s(!0))}}),Object(r.createElement)("div",{role:"textbox",className:f,style:d},p&&p.length?Object(r.createElement)(r.RawHTML,null,p):Object(r.createElement)("span",{className:"amp-text-placeholder"},m))))},P=function(e){var t=e.pages,n=e.currentPage,i=e.onClick,l=function(e){return Object(c.sprintf)(Object(c.__)("Go to page %s","amp"),e)},s=Object(r.useState)(null),u=b()(s,2),p=u[0],d=u[1],m=Object(a.useDispatch)("core/block-editor").moveBlockToPosition,g=Object(a.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockIndex;
9
- /* translators: %s: Page number */return Object(r.createElement)("ul",{className:"amp-story-editor-carousel-item-list"},t.map((function(e,t){var a,s=e.clientId,u=h()("amp-story-editor-carousel-item",{"amp-story-editor-carousel-item--active":s===n}),b="amp-story-editor-carousel-item-".concat(s),O={type:"indicator",srcIndex:g(s),srcClientId:s},y=function(e,t){var n=Object(f.N)(e),r=n.srcClientId,o=n.srcIndex;if("indicator"===n.type&&!(r===s)){var a=function(e){var t=g(s);if(void 0!==s)return"left"===e.x?t:t+1}(t);a>o&&a--,m(r,"","",a)}},v=s===p,j=s===n,k=Object(r.createElement)(o.Button,{onClick:function(e){e.preventDefault(),i(s)}},Object(r.createElement)("span",{className:"indicator-page-number"},t+1),Object(r.createElement)("span",{className:"screen-reader-text"},(a=t+1,Object(c.sprintf)(Object(c.__)("Page %s","amp"),a))));return Object(r.createElement)(o.Draggable,{key:s,elementId:b,transferData:O,onDragStart:function(){d(s)},onDragEnd:function(){d(null)}},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)("li",{className:u},Object(r.createElement)("div",{onDragStart:n,onDragEnd:a,draggable:!0,className:"amp-story-editor-carousel-item-wrapper",id:b},j?k:Object(r.createElement)(o.Tooltip,{text:l(t+1)},k)),Object(r.createElement)(o.DropZone,{className:h()("",{"is-dragging-indicator":v}),onDrop:y}))}))})))},C=(n(74),function(){var e=Object(a.useSelect)((function(e){return e("amp/story").getCurrentPage()}),[]),t=Object(a.useSelect)((function(t){var n=t("core/block-editor"),r=n.getSettings,o=n.getBlockOrder,a=n.getBlocksByClientId,c=n.getAdjacentBlockClientId,i=t("amp/story").isReordering,l=a(o()),s=l.findIndex((function(t){return t.clientId===e}));return{pages:l,currentIndex:Math.max(0,s),previousPage:e?c(e,-1):null,nextPage:e?c(e,1):null,isReordering:i(),isRTL:r().isRTL}}),[e]),n=t.pages,l=t.currentIndex,s=t.previousPage,u=t.nextPage,p=t.isReordering,d=t.isRTL,f=Object(r.useRef)(null);Object(r.useEffect)((function(){f.current=document.querySelector("#amp-story-controls + .block-editor-block-list__layout")}),[]),Object(r.useEffect)((function(){if(p)f.current.style.display="none";else{f.current.style.display="";var e=(l+.5)*(i.A+i.z),t=d?-1:1;f.current.style.transform="translateX(calc(".concat(50*t,"% - ").concat(1,"px - ").concat(t*e,"px))")}}),[l,p,f,d]);var m=Object(a.useDispatch)("amp/story").setCurrentPage,b=Object(a.useDispatch)("core/block-editor").selectBlock,g=function(e){m(e),b(e)};return p?Object(r.createElement)(xe,null):Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("div",{className:"amp-story-editor-carousel-navigation"},Object(r.createElement)(o.IconButton,{icon:d?"arrow-right-alt2":"arrow-left-alt2",label:Object(c.__)("Previous Page","amp"),onClick:function(e){e.preventDefault(),g(s)},disabled:null===s}),Object(r.createElement)(P,{pages:n,currentPage:e,onClick:g}),Object(r.createElement)(o.IconButton,{icon:d?"arrow-left-alt2":"arrow-right-alt2",label:Object(c.__)("Next Page","amp"),onClick:function(e){e.preventDefault(),g(u)},disabled:null===u})))}),I=n(24),B=n.n(I),A=n(28),T=n.n(A),D=n(25),N=n.n(D),R=n(26),M=n.n(R),L=n(18),F=n.n(L),H=n(27),z=n.n(H),W=n(10);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(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 G(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function K(e){return G(e)}function $(e){return G(e,!0)}function Y(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,c=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=c.clientLeft||a.clientLeft||0,top:r-=c.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=K(r),t.top+=$(r),t}var X,Q=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+quot;),"i"),J=/^(top|right|bottom|left)#x2F;,Z="currentStyle",ee="runtimeStyle",te="left",ne="px";function re(e,t){for(var n=0;n<e.length;n++)t(e[n])}function oe(e){return"border-box"===X(e,"boxSizing")}"undefined"!=typeof window&&(X=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,a=n||o.defaultView.getComputedStyle(e,null);return a&&(r=a.getPropertyValue(t)||a[t]),r}:function(e,t){var n=e[Z]&&e[Z][t];if(Q.test(n)&&!J.test(t)){var r=e.style,o=r[te],a=e[ee][te];e[ee][te]=e[Z][te],r[te]="fontSize"===t?"1em":n||0,n=r.pixelLeft+ne,r[te]=o,e[ee][te]=a}return""===n?"auto":n});var ae=["margin","border","padding"],ce=-1,ie=2,le=1;function se(e,t,n){var r,o,a,c=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var i=void 0;i="border"===r?"".concat(r+n[a],"Width"):r+n[a],c+=parseFloat(X(e,i))||0}return c}function ue(e){return null!=e&&e==e.window}var pe={};function de(e,t,n){if(ue(e))return"width"===t?pe.viewportWidth(e):pe.viewportHeight(e);if(9===e.nodeType)return"width"===t?pe.docWidth(e):pe.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,a=(X(e),oe(e)),c=0;(null==o||o<=0)&&(o=void 0,(null==(c=X(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===n&&(n=a?le:ce);var i=void 0!==o||a,l=o||c;if(n===ce)return i?l-se(e,["border","padding"],r):c;if(i){var s=n===ie?-se(e,["border"],r):se(e,["margin"],r);return l+(n===le?0:s)}return c+se(e,ae.slice(n),r)}re(["Width","Height"],(function(e){pe["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],pe["viewport".concat(e)](n))},pe["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var fe={position:"absolute",visibility:"hidden",display:"block"};function me(e){var t,n=arguments;return 0!==e.offsetWidth?t=de.apply(void 0,n):function(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}(e,fe,(function(){t=de.apply(void 0,n)})),t}function be(e,t,n){var r=n;if("object"!==q(t))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):X(e,t);for(var o in t)t.hasOwnProperty(o)&&be(e,o,t[o])}re(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);pe["outer".concat(t)]=function(t,n){return t&&me(t,e,n?0:le)};var n="width"===e?["Left","Right"]:["Top","Bottom"];pe[e]=function(t,r){if(void 0===r)return t&&me(t,e,ce);if(t){X(t);return oe(t)&&(r+=se(t,["padding","border"],n)),be(t,e,r)}}}));var ge=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(n,!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return Y(e);!function(e,t){"static"===be(e,"position")&&(e.style.position="relative");var n,r,o=Y(e),a={};for(r in t)t.hasOwnProperty(r)&&(n=parseFloat(be(e,r))||0,a[r]=n+t[r]-o[r]);be(e,a)}(e,t)},isWindow:ue,each:re,css:be,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var r in e)e.hasOwnProperty(r)&&(t.overflow[r]=e.overflow[r]);return t},scrollLeft:function(e,t){if(ue(e)){if(void 0===t)return K(e);window.scrollTo(t,$(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(ue(e)){if(void 0===t)return $(e);window.scrollTo(K(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},pe);var he=function(e,t,n){n=n||{},9===t.nodeType&&(t=ge.getWindow(t));var r=n.allowHorizontalScroll,o=n.onlyScrollIfNeeded,a=n.alignWithTop,c=n.alignWithLeft,i=n.offsetTop||0,l=n.offsetLeft||0,s=n.offsetBottom||0,u=n.offsetRight||0;r=void 0===r||r;var p,d,f,m,b,g,h,O,y,v,j=ge.isWindow(t),k=ge.offset(e),w=ge.outerHeight(e),E=ge.outerWidth(e);j?(h=t,v=ge.height(h),y=ge.width(h),O={left:ge.scrollLeft(h),top:ge.scrollTop(h)},b={left:k.left-O.left-l,top:k.top-O.top-i},g={left:k.left+E-(O.left+y)+u,top:k.top+w-(O.top+v)+s},m=O):(p=ge.offset(t),d=t.clientHeight,f=t.clientWidth,m={left:t.scrollLeft,top:t.scrollTop},b={left:k.left-(p.left+(parseFloat(ge.css(t,"borderLeftWidth"))||0))-l,top:k.top-(p.top+(parseFloat(ge.css(t,"borderTopWidth"))||0))-i},g={left:k.left+E-(p.left+f+(parseFloat(ge.css(t,"borderRightWidth"))||0))+u,top:k.top+w-(p.top+d+(parseFloat(ge.css(t,"borderBottomWidth"))||0))+s}),b.top<0||g.top>0?!0===a?ge.scrollTop(t,m.top+b.top):!1===a?ge.scrollTop(t,m.top+g.top):b.top<0?ge.scrollTop(t,m.top+b.top):ge.scrollTop(t,m.top+g.top):o||((a=void 0===a||!!a)?ge.scrollTop(t,m.top+b.top):ge.scrollTop(t,m.top+g.top)),r&&(b.left<0||g.left>0?!0===c?ge.scrollLeft(t,m.left+b.left):!1===c?ge.scrollLeft(t,m.left+g.left):b.left<0?ge.scrollLeft(t,m.left+b.left):ge.scrollLeft(t,m.left+g.left):o||((c=void 0===c||!!c)?ge.scrollLeft(t,m.left+b.left):ge.scrollLeft(t,m.left+g.left)))},Oe=n(12),ye=n(38),ve=n.n(ye),je=n(39),ke=n(56),we=(n(75),function(e){return e.stopPropagation()}),Ee=function(e){function t(e){var n;B()(this,t),n=N()(this,M()(t).call(this,e));var o=e.autocompleteRef;return n.onChange=n.onChange.bind(F()(n)),n.onKeyDown=n.onKeyDown.bind(F()(n)),n.autocompleteRef=o||Object(r.createRef)(),n.inputRef=Object(r.createRef)(),n.updateSuggestions=Object(W.throttle)(n.updateSuggestions.bind(F()(n)),200),n.suggestionNodes=[],n.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null},n}return z()(t,e),T()(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,r=t.selectedSuggestion;n&&null!==r&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,he(this.suggestionNodes[r],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){e.scrollingIntoView=!1}),100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.isStillMounted=!1}},{key:"componentDidMount",value:function(){this.isStillMounted=!0}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"fetchPostSuggestions",value:function(e){var t=this,n=this.props.searchablePostTypes||["post"],r=this.suggestionsRequest=ve()({path:Object(je.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,subtype:n.join(",")})}).then((function(e){t.isStillMounted&&t.suggestionsRequest===r&&(t.setState({suggestions:Object(W.map)(e,(function(e){return{id:e.id,title:Object(ke.decodeEntities)(e.title)||Object(c.__)("(no title)","amp"),postType:e.subtype}})),loading:!1}),Boolean(e.length)?t.props.debouncedSpeak(Object(c.sprintf)(Object(c._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"amp"),e.length),"assertive"):t.props.debouncedSpeak(Object(c.__)("No results.","amp"),"assertive"))})).catch((function(){t.isStillMounted&&t.suggestionsRequest===r&&t.setState({loading:!1})}))}},{key:"updateSuggestions",value:function(e){e.length<2?this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1}):(this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0}),this.fetchPostSuggestions(e))}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.updateSuggestions(t)}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,a=t.loading;if(n&&o.length&&!a){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case S.UP:e.stopPropagation(),e.preventDefault();var l=r?r-1:o.length-1;this.setState({selectedSuggestion:l});break;case S.DOWN:e.stopPropagation(),e.preventDefault();var s=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:s});break;case S.TAB:null!==this.state.selectedSuggestion&&(this.selectPost(i),this.props.speak(Object(c.__)("Post selected.","amp")));break;case S.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectPost(i));break;case S.ESCAPE:e.stopPropagation(),e.preventDefault(),this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}else switch(e.keyCode){case S.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case S.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectPost",value:function(e){this.props.onSelect(e.id,e.postType),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectPost(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.autoFocus,a=void 0===n||n,i=t.value,l=void 0===i?"":i,s=t.instanceId,u=t.className,p=t.id,d=void 0===p?"post-selector":p,f=t.placeholder,m=t.labelText,b=this.state,g=b.showSuggestions,O=b.suggestions,y=b.selectedSuggestion,v=b.loading,j="block-editor-post-input-suggestions-".concat(s),k="block-editor-post-input-suggestion-".concat(s);return Object(r.createElement)("div",{className:h()("editor-post-input block-editor-post-input",u)},m&&Object(r.createElement)("label",{htmlFor:d},m),Object(r.createElement)("input",{id:d,type:"text","aria-label":Object(c.__)("Post search","amp"),required:!0,value:l,onChange:this.onChange,onInput:we,onClick:we,placeholder:f||Object(c.__)("Type to search","amp"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":g,"aria-autocomplete":"list","aria-owns":j,"aria-activedescendant":null!==y?"".concat(k,"-").concat(y):void 0,ref:this.inputRef,autoFocus:a}),v&&Object(r.createElement)(o.Spinner,null),g&&Boolean(O.length)&&Object(r.createElement)(o.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(r.createElement)("div",{className:h()("editor-post-input__suggestions","block-editor-post-input__suggestions","".concat(u,"__suggestions")),id:j,ref:this.autocompleteRef,role:"listbox"},O.map((function(t,n){return Object(r.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"".concat(k,"-").concat(n),ref:e.bindSuggestionNode(n),className:h()("editor-post-input__suggestion block-editor-post-input__suggestion",{"is-selected":n===y}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===y},t.title)})))))}}]),t}(r.Component),_e=Object(Oe.compose)(Oe.withSafeTimeout,o.withSpokenMessages,Oe.withInstanceId)(Ee),Se=function(e){var t=e.page,n=t.clientId,c=Object(a.useSelect)((function(e){return(0,e("amp/story").getBlockIndex)(n)}),[n]),i=Object(a.useDispatch)("amp/story").movePageToPosition,l=Object(r.useState)(!1),s=b()(l,2),u=s[0],p=s[1],d=function(e,t){var r=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),o=r.srcClientId,a=r.srcIndex,l=r.type;if("block"===l&&o!==n){var s=function(e){if(void 0!==c)return"right"===e.x?c+1:c}(t);i(o,a<c?s-1:s)}},f="reorder-page-".concat(n),m={type:"block",srcIndex:c,srcClientId:n};return Object(r.createElement)("div",{className:"amp-story-reorderer-item"},Object(r.createElement)(o.Draggable,{elementId:f,transferData:m,onDragStart:function(){return p(!0)},onDragEnd:function(){return p(!1)}},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.DropZone,{className:u?"is-dragging-page":void 0,onDrop:d}),Object(r.createElement)("div",{className:"amp-story-reorderer-item-page",id:f},Object(r.createElement)("div",{className:"amp-story-page-preview",onDragStart:n,onDragEnd:a,draggable:!0},Object(r.createElement)(w,t))))})))},xe=(n(76),Object(a.withSelect)((function(e){return{pages:(0,e("core/block-editor").getBlocksByClientId)((0,e("amp/story").getBlockOrder)())}}))((function(e){var t=e.pages;return Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("div",{className:"amp-story-reorderer"},t.map((function(e){return Object(r.createElement)(Se,{key:"page-".concat(e.clientId),page:e})}))))}))),Pe=(n(77),function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M14 0h10v2H14V0zm0 7h10v2H14V7zm0 7h10v2H14v-2zm-2 1l-5 4v-3.069C3.06 15.436 0 12.072 0 8c0-4.411 3.589-8 8-8h3v2H8C4.691 2 2 4.691 2 8c0 2.967 2.167 5.431 5 5.91V11l5 4z",fill:"#555D66"}))});Pe.defaultProps={width:"24",height:"19",viewBox:"0 0 24 19",xmlns:"http://www.w3.org/2000/svg"};var Ce=function(){var e=Object(a.useSelect)((function(e){return{isReordering:e("amp/story").isReordering(),blockOrder:e("core/block-editor").getBlockOrder()}}),[]),t=e.isReordering,n=e.blockOrder,i=Object(a.useDispatch)("core/block-editor").clearSelectedBlock,l=Object(a.useDispatch)("amp/story"),s=l.startReordering,u=l.saveOrder,p=l.resetOrder;return t?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.IconButton,{className:"amp-story-controls-reorder-cancel",onClick:function(){return p(n)},icon:"no-alt"},Object(c.__)("Cancel","amp")),Object(r.createElement)(o.Button,{className:"amp-story-controls-reorder-save",onClick:u,isLarge:!0,isPrimary:!0},Object(c.__)("Save Changes","amp"))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(_t,null),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-reorder",icon:Pe({width:24,height:19}),label:Object(c.__)("Reorder Pages","amp"),onClick:function(){i(),s(n)}}))},Ie=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor").getBlockOrder;return{currentPage:t(),index:n(t()).length}}),[]),t=e.currentPage,n=e.index,c=Object(f.X)(),i=Object(a.useDispatch)("core/block-editor").insertBlock,l=Object(r.useCallback)((function(e){var r=Object(j.createBlock)(e,{});i(r,n,t)}),[t,n,i]);if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;return["amp/amp-story-text","amp/amp-story-cta"].map((function(e){if(!c(e,t))return null;var n=Object(j.getBlockType)(e);return Object(r.createElement)(o.IconButton,{key:e,icon:Object(r.createElement)(k.BlockIcon,{icon:n.icon}),onClick:function(){return l(e)},label:n.title,labelPosition:"bottom"})}))},Be=n(6),Ae=n.n(Be),Te=function(e){var t=e.srcBlockName,n=e.srcClientId,c=Object(f.y)(t),l=Object(a.useDispatch)("core/block-editor").updateBlockAttributes;return Object(r.createElement)(o.DropZone,{className:"editor-block-drop-zone",key:n,onDrop:function(e){var t,r,o,a;if(c){r="amp-story-cta-button-".concat(n),o="clone-amp-story-cta-button-".concat(n);var s="#block-".concat(n," .editor-block-list__block-edit");a=document.querySelector(s)}else r="block-".concat(n),o="clone-block-".concat(n),a=document.querySelector('div[data-amp-selected="parent"] .editor-inner-blocks');var u=document.getElementById(r),p=document.getElementById(o);if(u&&p&&a){c||(p.parentNode.style.visibility="hidden",p.parentNode.style.transform="none");var d=p.getBoundingClientRect(),m=a.getBoundingClientRect(),b=c?"btnPositionLeft":"positionLeft",g=c?"btnPositionTop":"positionTop",h=i.x;c&&(h=i.y),l(n,(t={},Ae()(t,b,Object(f.r)("x",d.left-m.left)),Ae()(t,g,Object(f.r)("y",d.top-m.top,h)),t))}else e.preventDefault()}})},De=n(15),Ne=n.n(De),Re=n(57),Me=n.n(Re)()((function(e,t,n){var r="function"==typeof t?t(e):t,o=r.reduce((function(t,n,o){return Math.abs(n-e)<Math.abs(r[t]-e)?o:t}),0),a=Math.abs(r[o]-e);return 0===n||a<n?r[o]:null})),Le=n(42),Fe=n.n(Le);function He(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 ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=function(e,t){return function(n,r,o){if((r=Math.round(r))<e||r>t)return!0;var a;if(n.hasOwnProperty(r)){if(a=o,n[r].find((function(e){return Fe()(a[0],e[0])&&Fe()(a[1],e[1])})))return!0;n[r].push(o)}else n[r]=[o];return n[r]=n[r].sort(),!0}},qe=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Proxy(ze(Ae()({},t/2,[e(t/2)]),n?Ae()({0:[e(0)]},t,[e(t)]):{}),{set:We(0,t)})},Ue=function(e,t,n,r){var o=b()(n,2),a=o[0],c=o[1],i=b()(r,2),l=i[0],s=i[1];return function(n){return function(r,o){var i=qe(e,t),u=qe(e,t,!1),p=!0,d=!1,f=void 0;try{for(var m,b=n[Symbol.iterator]();!(p=(m=b.next()).done);p=!0){var g=m.value,h=g[a],O=g[c],y=(h+O)/2,v=Math.min(r,g[l]),j=Math.max(o,g[s]);i[h]=e(h,v,j),i[O]=e(O,v,j),u[y]=e(y,v,j)}}catch(e){d=!0,f=e}finally{try{p||null==b.return||b.return()}finally{if(d)throw f}}return[i,u]}}},Ve=Ue((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.x;return[[e,t],[e,n]]}),i.z,["left","right"],["top","bottom"]),Ge=Ue((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.z;return[[t,e],[n,e]]}),i.x,["top","bottom"],["left","right"]),Ke=n(29),$e=n.n(Ke);function Ye(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 Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qe,Je,Ze=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e){var t=e.value,n=e.matcher,r=$e()(e,["value","matcher"]),o=n(t);return o?Xe({value:o,distance:Math.abs(o-t)},r):null})).filter(Boolean).reduce((function(e,t){return t.distance<e.distance?t:e}),{distance:Number.MAX_VALUE,value:null})},et=function(e,t,n,r,o){var a=Object.keys(e),c=Object.keys(t),i=(n+r)/2,l=function(e){return function(t){return Me(t,e,o)}},s=Ze({value:n,matcher:l(a),isEdgeTarget:!0},{value:r,matcher:l(a),isEdgeTarget:!0},{value:i,matcher:l(c),isEdgeTarget:!1}),u=s.value,p=s.isEdgeTarget;return u?p?e[u]:t[u]:[]},tt=n(58),nt=n.n(tt),rt=(n(88),Object(r.createContext)()),ot=function(e){var t=e.children,n=Object(r.useState)([]),a=b()(n,2),c=a[0],l=a[1],s=nt()(l,10),u={setSnapLines:s,clearSnapLines:function(){return s([])}};return Object(r.createElement)(rt.Provider,{value:u},t,Boolean(c.length)&&Object(r.createElement)(o.SVG,{viewBox:"0 0 ".concat(i.z," ").concat(i.x),className:"amp-story-page-snap-lines"},c.map((function(e,t){var n=b()(e,2),o=b()(n[0],2),a=o[0],c=o[1],i=b()(n[1],2),l=i[0],s=i[1];return Object(r.createElement)("line",{key:t,x1:a,y1:c,x2:l,y2:s})}))))},at=Object(Oe.createHigherOrderComponent)((function(e){return function(t){return Object(r.createElement)(rt.Consumer,null,(function(n){return Object(r.createElement)(e,s()({},t,n))}))}}),"withSnapContext"),ct=Object(a.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlocksByClientId,a=r.getBlockRootClientId,c=r.getBlock,i=r.getBlockOrder,l=e("amp/story").getCurrentPage,s=a(n),u={horizontalTargets:function(){return[]},verticalTargets:function(){return[]},parentBlockElement:null};if(l()!==s)return u;var p=Object(f.j)(c(s));if(!p)return u;var d=o(i(s)).filter((function(e){return e.clientId!==n})).map(f.j).filter(Boolean).map((function(e){return Object(f.u)(e,p)}));return{horizontalTargets:Ve(d),verticalTargets:Ge(d),parentBlockElement:p}})),it=Object(Oe.compose)(ct,at),lt=Object(Oe.createHigherOrderComponent)(it,"withSnapTargets"),st=i.z+i.A,ut=window,pt=ut.Image,dt=ut.navigator,ft="components-draggable__clone",mt=function(){return/Chrome/i.test(dt.userAgent)},bt=function(){return Ne()(document.getElementById("editor").querySelectorAll("iframe")).length>0},gt=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o))),Ae()(F()(n),"onDragEnd",(function(e){var t=n.props,r=t.clearHighlight,o=t.dropElementByOffset,a=t.blockName,c=t.setTimeout,l=t.clearSnapLines,s=t.isRTL,u=t.onDragEnd,p=void 0===u?W.noop:u;if(e&&e.preventDefault(),r(),0!==n.pageOffset){var d,m,b,g,h=parseInt(n.cloneWrapper.style.top),O=parseInt(n.cloneWrapper.style.left)+(s?1:-1)*(n.pageOffset*st);Object(f.y)(a)?(m=i.y,b="btnPositionLeft",g="btnPositionTop"):(m=i.x,b="positionLeft",g="positionTop");var y=(d={},Ae()(d,b,Object(f.r)("x",O,i.z)),Ae()(d,g,Object(f.r)("y",h,m)),d);o(n.pageOffset,y)}n.resetDragState(),l(),c(p)})),Ae()(F()(n),"onDragOver",(function(e){var t=n.props,r=t.blockName,o=t.setSnapLines,a=t.clearSnapLines,c=t.parentBlockElement,l=t.horizontalTargets,s=t.verticalTargets,u=t.setHighlightByOffset,p=t.isRTL,d=parseInt(n.cloneWrapper.style.top)+e.clientY-n.cursorTop,m=parseInt(n.cloneWrapper.style.left)+e.clientX-n.cursorLeft;if(d!==Je||m!==Qe){var g=Object(f.y)(r)?n.cloneWrapper.querySelector(".amp-story-cta-button"):n.cloneWrapper.querySelector(".wp-block"),h=Object(f.u)(g,c),O=h.top,y=h.right,v=h.bottom,j=h.left;if(!e.getModifierState("Alt")){var k=l(O,v),w=b()(k,2),E=w[0],_=w[1],S=s(j,y),x=b()(S,2),P=x[0],C=x[1];o([].concat(Ne()(et(E,_,j,y,i.k)),Ne()(et(P,C,O,v,i.k))))}else a();Object(f.y)(r)?n.cloneWrapper.style.top=d>=0?"".concat(d,"px"):"0px":n.cloneWrapper.style.top="".concat(d,"px"),n.cloneWrapper.style.left="".concat(m,"px"),n.cursorLeft=e.clientX,n.cursorTop=e.clientY,Je=d,Qe=m;var I=parseInt(n.cloneWrapper.style.left)+n.cursorLeftInsideElement,B=I>st,A=I<-i.A;n.pageOffset=0,(A||B)&&(n.pageOffset=A?-Math.ceil((-i.A-I)/st):Math.ceil((I-st)/st),p&&(n.pageOffset*=-1)),u(n.pageOffset)}})),Ae()(F()(n),"onDrop",(function(){n.onDragEnd(null)})),Ae()(F()(n),"onDragStart",(function(e){var t=n.props,r=t.blockName,o=t.elementId,a=t.transferData,c=t.onDragStart,l=void 0===c?W.noop:c,s=t.clearSnapLines,u=Object(f.y)(r),p=u?document.getElementById(o):document.getElementById(o).parentNode;if(p)if(p.closest('div[data-type="amp/amp-story-page"]')){var d=new pt;d.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",e.dataTransfer.setDragImage(d,0,0),e.dataTransfer.setData("text",JSON.stringify(a));var m=p.parentNode;n.cloneWrapper=document.createElement("div"),n.cloneWrapper.classList.add(ft),n.cloneWrapper.style.width="".concat(p.clientWidth,"px"),n.cloneWrapper.style.height="".concat(p.clientHeight,"px");var b=p.cloneNode(!0);n.cloneWrapper.style.transform=b.style.transform;var g=u?i.y:i.x,h=Object(f.s)("y",parseInt(b.style.top),g),O=Object(f.s)("x",parseInt(b.style.left),i.z);n.cloneWrapper.style.top="".concat(h,"px"),n.cloneWrapper.style.left="".concat(O,"px");var y=Object(f.u)(m,document.documentElement).left+O;n.cursorLeftInsideElement=e.clientX-y,b.id="clone-".concat(o),b.style.top=0,b.style.left=0,b.style.transform="none",Ne()(b.querySelectorAll("iframe")).forEach((function(e){return e.parentNode.removeChild(e)})),n.cloneWrapper.appendChild(b),m.appendChild(n.cloneWrapper),n.cursorLeft=e.clientX,n.cursorTop=e.clientY,document.body.classList.add("is-dragging-components-draggable"),document.addEventListener("dragover",n.onDragOver),mt()&&bt()&&(n.isChromeAndHasIframes=!0,document.addEventListener("drop",n.onDrop)),s(),n.props.setTimeout(l)}else e.preventDefault();else e.preventDefault()})),Ae()(F()(n),"resetDragState",(function(){document.removeEventListener("dragover",n.onDragOver),n.cloneWrapper&&n.cloneWrapper.parentNode&&(n.cloneWrapper.parentNode.removeChild(n.cloneWrapper),n.cloneWrapper=null),n.isChromeAndHasIframes&&(n.isChromeAndHasIframes=!1,document.removeEventListener("drop",n.onDrop)),document.body.classList.remove("is-dragging-components-draggable")})),n.isChromeAndHasIframes=!1,n}return z()(t,e),T()(t,[{key:"componentDidMount",value:function(){document.querySelectorAll('.block-editor-block-list__block[data-type="core/image"] img').forEach((function(e){e.setAttribute("draggable","false")}))}},{key:"componentWillUnmount",value:function(){this.resetDragState()}},{key:"render",value:function(){return(0,this.props.children)({onDraggableStart:this.onDragStart,onDraggableEnd:this.onDragEnd})}}]),t}(r.Component),ht=Object(Oe.compose)(lt,Oe.withSafeTimeout,Object(a.withSelect)((function(e){return{isRTL:e("core/block-editor").getSettings().isRTL}})))(gt),Ot=function(e){var t=e.children,n=e.clientId,o=e.blockName,c=e.blockElementId,i=e.onDragStart,l=e.onDragEnd,s=Object(a.useSelect)((function(e){return e("core/block-editor").getBlockRootClientId(n)}),[n]).rootClientId,u={type:"block",srcIndex:Object(a.useSelect)((function(e){return e("core/block-editor").getBlockIndex(n,s)}),[n,s]).index,srcRootClientId:s,srcClientId:n},p=Object(f.Y)(n),d=p.moveBlockToPage,m=p.getPageByOffset,b=Object(f.X)(),g=Object(r.useRef)({pageId:null,element:null,classes:[]}),h=function(){var e;g.current.element&&(e=g.current.element.classList).remove.apply(e,Ne()(g.current.classes));g.current={pageId:null,element:null,classes:[]}};return Object(r.createElement)(ht,{blockName:o,elementId:c,transferData:u,onDragStart:i,onDragEnd:l,clientId:n,clearHighlight:h,setHighlightByOffset:function(e){var t=m(e);if(t!==g.current.pageId&&(h(),t)){var n,r=0===e||b(o,t),a=["amp-page-draggable-hover","amp-page-draggable-hover-".concat(o.replace(/\W/g,"-")),r?"amp-page-draggable-hover-droppable":"amp-page-draggable-hover-undroppable"],c=document.getElementById("block-".concat(t));(n=c.classList).add.apply(n,a),g.current={element:c,pageId:t,classes:a}}},dropElementByOffset:function(e,t){var n=m(e);n&&b(o,n)&&d(n,t)}},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})}))},yt=function(e){var t=e.children,n=e.blockName,o=e.className,a=e.onDragStart,c=e.onDragEnd,i=e.blockElementId,l=e.clientId;return Object(r.createElement)(Ot,{clientId:l,blockElementId:i,blockName:n,onDragStart:a,onDragEnd:c},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)("div",{className:o,"aria-hidden":"true",onDragStart:n,onDragEnd:a,draggable:!0},t)}))},vt=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o))),Ae()(F()(n),"proxyEvent",(function(e){var t=Boolean(e.nativeEvent._blockHandled);e.nativeEvent._blockHandled=!0;var r=n.eventMap[e.type];t&&(r+="Handled"),n.props[r]&&n.props[r](e)})),n.eventMap={},n}return z()(t,e),T()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,o=void 0===n?[]:n,a=t.forwardedRef,c=$e()(t,["childHandledEvents","forwardedRef"]),i=Object(W.reduce)([].concat(Ne()(o),Ne()(Object.keys(c))),(function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?#x2F;);if(r){Boolean(r[2])&&delete c[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t}),{});return Object(r.createElement)("div",s()({ref:a},c,i))}}]),t}(r.Component),jt=function(e,t){return Object(r.createElement)(vt,s()({},e,{forwardedRef:t}))};jt.displayName="IgnoreNestedEvents";var kt=Object(r.forwardRef)(jt),wt=(n(89),function(e){var t=e.children,n=e.blockName,o=e.isDraggable,a=e.isMovable,c=e.onDragStart,i=e.clientId,l=e.blockElementId;return a&&o?Object(r.createElement)(kt,{childHandledEvents:["onDragStart","onMouseDown"],className:"block-mover"},Object(r.createElement)("div",null,Object(r.createElement)(yt,{children:t,clientId:i,blockElementId:l,blockName:n,onDragStart:c}))):t}),Et=(n(90),function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M9 7h7v2H9v7H7V9H0V7h7V0h2v7z",fill:"#FFF"}))});Et.defaultProps={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};var _t=function(){var e=Object(a.useDispatch)("core/block-editor").insertBlock;return Object(r.createElement)("div",{className:"block-editor-inserter"},Object(r.createElement)(o.IconButton,{icon:Et({width:16,height:16}),label:Object(c.__)("Insert Blank Page","amp"),onClick:function(){e(Object(j.createBlock)("amp/amp-story-page"))},className:"editor-inserter__amp-inserter"}))},St=n(59),xt=n.n(St),Pt=function(e){var t=e.length,n=e.queryLength,o=e.minQueryLength,a=e.selectedOption,c=e.selectedOptionIndex,i=e.tQueryTooShort,l=e.tNoResults,s=e.tSelectedOption,u=e.tResults,p=n<o,d=0===t,f=a?s(a,t,c):"",m=null;return m=p?i(o):d?l():u(t,f),Object(r.createElement)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},m,p&&",".repeat(n))},Ct=(n(92),n(93),function(e){function t(){return B()(this,t),N()(this,M()(t).apply(this,arguments))}return z()(t,e),T()(t,[{key:"handleInputBlur",value:function(){}},{key:"handleClearClick",value:function(){this.state.query="",this.forceUpdate(),this.props.onConfirm(null)}},{key:"render",value:function(){var e=this,t=this.props,n=t.cssNamespace,a=t.displayMenu,i=t.id,l=t.minLength,s=t.name,u=t.placeholder,p=t.required,d=t.tNoResults,f=t.tStatusQueryTooShort,m=t.tStatusSelectedOption,b=t.tStatusResults,g=t.ariaLabelBy,h=this.state,O=h.focused,y=h.hovered,v=h.menuOpen,j=h.options,k=h.query,w=h.selected,E=this.hasAutoselect(),_=-1===O,S=0===j.length,x=k?k.length:0,P=0!==x,C=x>=l,I=this.props.showNoOptionsFound&&_&&S&&P&&C,B="".concat(n,"__wrapper"),A="".concat(n,"__input"),T=null!==O?" ".concat(A,"--focused"):"",D=this.props.showAllValues?" ".concat(A,"--show-all-values"):" ".concat(A,"--default"),N=-1!==O&&null!==O,R="".concat(n,"__menu"),M="".concat(R,"--").concat(a),L=v||I,F="".concat(R,"--").concat(L?"visible":"hidden"),H="".concat(n,"__option"),z="".concat(n,"__hint"),W=this.templateInputValue(j[w]),q=W&&0===W.toLowerCase().indexOf(k.toLowerCase())&&E?k+W.substr(x):"";return Object(r.createElement)("div",{className:B,onKeyDown:this.handleKeyDown,role:"combobox",tabIndex:"-1","aria-expanded":v?"true":"false"},Object(r.createElement)(Pt,{length:j.length,queryLength:x,minQueryLength:l,selectedOption:this.templateInputValue(j[w]),selectedOptionIndex:w,tQueryTooShort:f,tNoResults:d,tSelectedOption:m,tResults:b}),q&&Object(r.createElement)("span",null,Object(r.createElement)("input",{className:z,readOnly:!0,tabIndex:"-1",value:q})),Object(r.createElement)("input",{"aria-activedescendant":N?"".concat(i,"__option--").concat(O):"","aria-owns":"".concat(i,"__listbox"),autoComplete:"off",className:"".concat(A).concat(T).concat(D),id:i,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,name:s,placeholder:u,ref:function(t){e.elementReferences[-1]=t},type:"text",required:p,value:k}),k&&!v&&C&&Object(r.createElement)(o.IconButton,{icon:"no",label:Object(c.__)("Clear Font","amp"),onClick:function(t){return e.handleClearClick(t)},className:"autocomplete__icon"}),Object(r.createElement)("ul",{className:"".concat(R," ").concat(M," ").concat(F),onMouseLeave:function(t){return e.handleListMouseLeave(t)},id:"".concat(i,"__listbox"),"aria-labelledby":g,role:"listbox"},j.map((function(t,n){var o=(-1===O?w===n:O===n)&&null===y?" ".concat(H,"--focused"):"",a=n%2?" ".concat(H,"--odd"):"";return Object(r.createElement)("li",{"aria-selected":O===n,className:"".concat(H).concat(o).concat(a),dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)},id:"".concat(i,"__option--").concat(n),key:n,onBlur:function(t){return e.handleOptionBlur(t,n)},onClick:function(t){return e.handleOptionClick(t,n)},onKeyDown:function(t){return e.handleOptionClick(t,n)},onMouseEnter:function(t){return e.handleOptionMouseEnter(t,n)},ref:function(t){e.elementReferences[n]=t},role:"option",tabIndex:"-1"})})),I&&Object(r.createElement)("li",{className:"".concat(H," ").concat(H,"--no-results"),role:"option",tabIndex:"-1"},d())))}}]),t}(xt.a));var It=Object(Oe.withInstanceId)((function(e){var t=e.fonts,n=void 0===t?[]:t,a=e.onChange,i=void 0===a?function(){}:a,l=e.value,s=void 0===l?"":l,u=e.instanceId,p=n,d="amp-stories-font-family-picker-".concat(u);return Object(r.createElement)(o.BaseControl,{label:Object(c.__)("Font Family","amp"),id:d,help:Object(c.__)("Type to search for fonts","amp")},Object(r.createElement)(Ct,{id:d,name:d,source:function(e,t){t(e?p.filter((function(t){return-1!==t.name.toLowerCase().indexOf(e.toLowerCase())})):[])},templates:{suggestion:function(e){Object(f.C)(e.name);var t=e.fallbacks?", "+e.fallbacks.join(", "):"";return e&&"<span style='font-family: ".concat(e.name).concat(t,"'>").concat(e.name,"</span>")},inputValue:function(e){return e&&e.name}},ariaLabelBy:"".concat(d,"__help"),minLength:2,onConfirm:i,showAllValues:!1,confirmOnBlur:!1,defaultValue:s||"",dropdownArrow:function(){return""},preserveNullOptions:!0,placeholder:Object(c.__)("None","amp"),displayMenu:"overlay",tNoResults:function(){return Object(c.__)("No font found","amp")},tStatusQueryTooShort:function(e){// translators: %d: the number characters required to initiate a font search.
10
return Object(c.sprintf)(Object(c.__)("Type in %s or more characters for results","amp"),e)},tStatusSelectedOption:function(e,t){// translators: 1: the index of the selected result. 2: The total number of results.
11
return Object(c.sprintf)(Object(c.__)("%s (1 of %s) is selected","amp"),e,t)},tStatusResults:function(e,t){return Object(c.sprintf)(// translators: %d: The total number of results.
12
- Object(c._n)("%d font is available. %s","%d fonts are available. %s",e,"amp"),e,t)}}))})),Bt=(n(94),function(e){var t=e.angle,n=e.initialAngle,a=e.blockElementId,i=e.className,l=e.speak,s=e.onRotateStart,u=e.onRotate,p=e.onRotateStop,d=e.snap,f=e.snapGap,m=e.children,g=Object(r.useState)(!1),O=b()(g,2),y=O[0],v=O[1],j=Object(r.useState)(t),k=b()(j,2),w=k[0],E=k[1],_=Object(r.useRef)(null);Object(r.useEffect)((function(){_.current=document.getElementById(a)}),[a]),Object(r.useEffect)((function(){_.current.style.transform="rotate(".concat(w,"deg)")}),[w]),Object(r.useEffect)((function(){_.current.classList.toggle("is-rotating",y)}),[y]);var x=Object(r.useCallback)((function(e){if(y){e.preventDefault();var t=e.keyCode;if(S.ESCAPE===t)v(!1),E(n),p&&p(e,n);else if(S.LEFT===t||S.RIGHT===t){var r=S.LEFT===t?w-30:w+30;r>360?r-=360:r<=-360&&(r+=360)
13
/* translators: %s: degrees */,l(Object(c.sprintf)(Object(c.__)("Rotating block by %s degrees","amp"),r)),E(r),u&&u(e,r)}else S.ENTER===t&&(
14
/* translators: %s: degrees */
15
- l(Object(c.sprintf)(Object(c.__)("Saving block rotation of %s degrees","amp"),w)),p&&p(e))}}),[w,n,u,p,y,l]),P=Object(r.useCallback)((function(e){if(y){e.preventDefault();var t=_.current.getBoundingClientRect(),n=t.top,r=t.left+t.width/2,o=n+t.height/2,a=e.clientX-r,c=e.clientY-o,i=180/Math.PI,l=Math.ceil(-i*Math.atan2(a,c));if(!e.getModifierState("Alt")){var s=Me(l,d,f);null!==s&&(l=s)}w!==l&&(E(l),u&&u(e,l))}}),[w,y,d,f,u]),C=Object(r.useCallback)((function(e){y&&(e.preventDefault(),v(!1),p&&p(e,w))}),[w,y,p]);return Object(r.useEffect)((function(){return document.addEventListener("mousemove",P),document.addEventListener("mouseup",C),document.addEventListener("keyUp",x),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",C),document.removeEventListener("keyUp",x)}}),[P,C,x]),Object(r.createElement)("div",{className:h()(i,{"is-rotating":y})},Object(r.createElement)("div",{className:"rotatable-box-wrap"},Object(r.createElement)(o.Button,{role:"switch","aria-checked":y,onMouseDown:function(e){y||(e.button&&2===e.button||(e.preventDefault(),v(!0),s&&s(e)))},className:"rotatable-box-wrap__handle"},Object(r.createElement)("span",{className:"screen-reader-text"},Object(c.__)("Rotate Block","amp")))),m)});Bt.defaultProps={angle:0,initialAngle:0,snapGap:0};var At=Object(o.withSpokenMessages)(Bt),Tt=(n(95),function(e,t){function n(n){e.current&&!e.current.contains(n.target)&&t()}Object(r.useEffect)((function(){return e.current&&e.current.innerHTML&&document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}),Dt="amp-story-right-click-menu__popover block-editor-block-settings-menu__popover editor-block-settings-menu__popover",Nt=function(e){var t=e.clientIds,n=e.clientX,l=e.clientY,s=e.insidePercentageX,u=e.insidePercentageY,p=Object(r.useState)(!0),d=b()(p,2),m=d[0],g=d[1],O=Object(a.useSelect)((function(e){return e("core/block-editor")}),[]),y=O.getBlock,v=O.getBlockOrder,k=O.getBlockRootClientId,w=O.getSettings,E=Object(a.useSelect)((function(e){return e("amp/story")}),[]),_=E.getCopiedMarkup,S=E.getCurrentPage,x=Object(a.useDispatch)("core/block-editor"),P=x.removeBlock,C=x.insertBlock,I=x.updateBlockAttributes,B=Object(a.useDispatch)("amp/story").setCopiedMarkup,A=w(),T=A.__experimentalCanUserUseUnfilteredHTML,D=A.isRTL,N=Object(f.X)(),R=Object(f.W)(),M=function(e){var t=y(e),n=Object(j.serialize)(t);B(n),Object(f.e)(n)},L=function(e,t){var n=Object(j.pasteHandler)({HTML:"",plainText:e,mode:"BLOCKS",tagName:null,canUserUseUnfilteredHTML:T}),r=function(e){var t;Object(f.A)(e)?t=y(e).clientId:t=k(e);return t}(t);if(r&&n.length){var o=v(r);n.forEach((function(e){N(e.name,r)?C(e,o.length,r).then((function(e){e.blocks.forEach((function(e){i.c.includes(e.name)&&I(e.clientId,{positionTop:u,positionLeft:s})}))})).catch((function(){R(e.name)})):R(e.name)}))}},F=function(e){var t=y(e);if(!i.o.includes(t.name)){var n,r;if(Object(f.A)(e))n="",r=Q.indexOf(e)+1;else n=k(e),r=null;var o=Object(j.cloneBlock)(t);C(o,r,n)}};Object(r.useEffect)((function(){g(!0)}),[t,n,l]);var H=Object(W.castArray)(t)[0],z=y(H),q=function(){g(!1)},U=Object(r.useRef)(null),V=Object(f.Y)(H),G=V.moveBlockToPage,K=V.getPageByOffset;Tt(U,q);var $={top:l,left:n},Y=D?"bottom right":"bottom left",X=[],Q=v(),J=Q.length,Z=J>1,ee=Object(f.A)(H);if(ee||(X=[{name:Object(c.__)("Copy Block","amp"),blockAction:M,params:[H],icon:"admin-page",className:"right-click-copy"},{name:Object(c.__)("Cut Block","amp"),blockAction:function(e){M(e),P(e)},params:[H],icon:"clipboard",className:"right-click-cut"}]),z&&!i.o.includes(z.name)&&(ee?X.push({name:Object(c.__)("Duplicate Page","amp"),blockAction:F,params:[H],icon:"admin-page",className:"right-click-duplicate-page"}):X.push({name:Object(c.__)("Duplicate Block","amp"),blockAction:F,params:[H],icon:"admin-page",className:"right-click-duplicate"})),z&&!ee&&Z){var te=S(),ne=Q.indexOf(te);if(ne>0){var re=K(-1);N(z.name,re)&&X.push({name:Object(c.__)("Send block to previous page","amp"),blockAction:G,params:[re],icon:D?"arrow-right-alt":"arrow-left-alt",className:"right-click-previous-page"})}if(ne<J-1){var oe=K(1);N(z.name,oe)&&X.push({name:Object(c.__)("Send block to next page","amp"),blockAction:G,params:[oe],icon:D?"arrow-left-alt":"arrow-right-alt",className:"right-click-next-page"})}}return ee?Z&&X.push({name:Object(c.__)("Remove Page","amp"),blockAction:P,params:[H],icon:"trash",className:"right-click-remove-page"}):X.push({name:Object(c.__)("Remove Block","amp"),blockAction:P,params:[H],icon:"trash",className:"right-click-remove"}),_().length&&X.push({name:Object(c.__)("Paste","amp"),blockAction:function(e){var t=window.navigator;if(t.clipboard&&t.clipboard.readText)t.clipboard.readText().then((function(t){L(t,e)})).catch((function(){var t=_();L(t,e)}));else{var n=_();L(n,e)}},params:[H,u,s],icon:"pressthis",className:"right-click-paste"}),Object(r.createElement)("div",{ref:U,className:"amp-right-click-menu__container",style:$},m&&Object(r.createElement)(o.Popover,{className:Dt,position:Y,onClose:q,focusOnMount:"firstElement"},Object(r.createElement)(o.NavigableMenu,{role:"menu"},X.map((function(e){return Object(r.createElement)(o.MenuGroup,{key:"action-".concat(e.name)},Object(r.createElement)(o.MenuItem,{className:h()(e.className,"editor-block-settings-menu__control block-editor-block-settings-menu__control"),onClick:function(){q(),e.blockAction.apply(e,Ne()(e.params))},icon:e.icon},e.name))})))))};n(96);var Rt=function(e){var t=e.value,n=e.options,a=e.defaultOption,c=e.onChange,i=e.label,l=e.id,s=e.renderToggle,u=e.renderOption,p=e.ariaLabel,d=n.find((function(e){return t&&e.value===t}))||a;return Object(r.createElement)(o.BaseControl,{label:i,id:l},Object(r.createElement)("div",{className:"components-preview-picker__buttons"},Object(r.createElement)(o.Dropdown,{className:"components-preview-picker__dropdown",contentClassName:"components-preview-picker__dropdown-content",position:"bottom",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(r.createElement)(o.Button,{className:"components-preview-picker__selector",isLarge:!0,onClick:n,"aria-expanded":t,"aria-label":p(d),id:l},s(d))},renderContent:function(){return Object(r.createElement)(o.NavigableMenu,null,[a].concat(Ne()(n)).map((function(e){var t=e.value===d.value;return Object(r.createElement)(o.Button,{key:e.value,onClick:function(){return c(e)},role:"menuitemradio","aria-checked":t},t&&Object(r.createElement)(o.Dashicon,{icon:"saved"}),u(e))})))}})))};var Mt=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,a=e.isDisabled,c=e.title,i=e.className,l=$e()(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),u=t?{backgroundColor:t.background,color:t.foreground}:{},p=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(r.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(r.createElement)("button",s()({className:h()("editor-block-types-list__item block-editor-block-types-list__item",i,{"editor-block-types-list__item-has-children block-editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),o()},disabled:a,"aria-label":c},l),Object(r.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:u},Object(r.createElement)(k.BlockIcon,{icon:t,showColors:!0}),n&&Object(r.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:p})),Object(r.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},c)))};var Lt,Ft,Ht,zt,Wt,qt,Ut,Vt=function(e){var t=e.items,n=e.onSelect,o=e.onHover,a=void 0===o?function(){}:o,c=e.children;return(Object(r.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map((function(e){return Object(r.createElement)(Mt,{key:e.id,className:Object(j.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),a(null)},onFocus:function(){return a(e)},onMouseEnter:function(){return a(e)},onMouseLeave:function(){return a(null)},onBlur:function(){return a(null)},isDisabled:e.isDisabled,title:e.title})})),c))},Gt=function(e){return e.stopPropagation()},Kt=function(e,t){var n=$t(t),r=function(e){return-1!==$t(e).indexOf(n)},o=Object(j.getCategories)();return e.filter((function(e){var t=Object(W.find)(o,{slug:e.category});return r(e.title)||Object(W.some)(e.keywords,r)||t&&r(t.title)}))},$t=function(e){return e=(e=(e=(e=Object(W.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Yt=function(e){function t(){var e,n;B()(this,t);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(a))),Ae()(F()(n),"onChangeSearchInput",(function(e){n.filter(e.target.value)})),Ae()(F()(n),"onHover",(function(e){n.setState({hoveredItem:e});var t=n.props,r=t.showInsertionPoint,o=t.hideInsertionPoint;e?r():o()})),n.state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},n.panels={},n.inserterResults=Object(r.createRef)(),n}return z()(t,e),T()(t,[{key:"componentDidMount",value:function(){this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(W.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(Ne()(t.state.openPanels),[e])}),t.props.setTimeout((function(){he(t.panels[e],t.inserterResults.current,{alignWithTop:!0})})))}}},{key:"filterOpenPanels",value:function(e,t,n,r){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var o=[];return r.length>0&&o.push("reusable"),n.length>0&&(o=o.concat(Object.keys(t))),o}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,r=t.items,o=t.rootChildBlocks,a=Kt(r,e),i=Object(W.filter)(a,(function(e){var t=e.name;return Object(W.includes)(o,t)})),l=[];if(!e){var s=this.props.maxSuggestedItems||9;l=Object(W.filter)(r,(function(e){return e.utility>0})).slice(0,s)}var u=Object(W.filter)(a,{category:"reusable"}),p=function(e){return Object(W.findIndex)(Object(j.getCategories)(),(function(t){return t.slug===e.category}))},d=Object(W.flow)((function(e){return Object(W.filter)(e,(function(e){return"reusable"!==e.category}))}),(function(e){return Object(W.sortBy)(e,p)}),(function(e){return Object(W.groupBy)(e,"category")}))(a);this.setState({hoveredItem:null,childItems:i,filterValue:e,suggestedItems:l,reusableItems:u,itemsPerCategory:d,openPanels:this.filterOpenPanels(e,d,a,u)});var f=Object.keys(d).reduce((function(e,t){return e+d[t].length}),0),m=Object(c.sprintf)(Object(c._n)("%d result found.","%d results found.",f,"amp"),f);n(m)}},{key:"onKeyDown",value:function(e){Object(W.includes)([S.LEFT,S.DOWN,S.RIGHT,S.UP,S.BACKSPACE,S.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,a=t.onSelect,i=this.state,l=i.hoveredItem,s=i.itemsPerCategory,u=i.openPanels,p=i.reusableItems,d=i.suggestedItems,f=function(e){return-1!==u.indexOf(e)};return Object(r.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu amp__block-editor-inserter__menu",onKeyPress:Gt,onKeyDown:this.onKeyDown},Object(r.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(c.__)("Search for an element","amp")),Object(r.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:Object(c.__)("Search for an element","amp"),className:"editor-inserter__search block-editor-inserter__search amp__block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(r.createElement)("div",{className:"editor-inserter__results amp__block-editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(c.__)("Available block types","amp")},Boolean(d.length)&&Object(r.createElement)(o.PanelBody,{title:Object(c._x)("Most Used","blocks","amp"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(r.createElement)(Vt,{items:d,onSelect:a,onHover:this.onHover})),Object(W.map)(Object(j.getCategories)(),(function(t){var n=s[t.slug];return n&&n.length?Object(r.createElement)(o.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(r.createElement)(Vt,{items:n,onSelect:a,onHover:e.onHover})):null})),Boolean(p.length)&&Object(r.createElement)(o.PanelBody,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:Object(c.__)("Reusable","amp"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(r.createElement)(Vt,{items:p,onSelect:a,onHover:this.onHover}),Object(r.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(je.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(c.__)("Manage All Reusable Blocks","amp"))),Object(W.isEmpty)(d)&&Object(W.isEmpty)(p)&&Object(W.isEmpty)(s)&&Object(r.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(c.__)("No blocks found.","amp"))),l&&Object(j.isReusableBlock)(l)&&Object(r.createElement)(w,{name:l.name,attributes:l.initialAttributes}))}}]),t}(r.Component),Xt=Object(Oe.compose)(Object(a.withSelect)((function(e,t){var n=t.clientId,r=t.isAppender,o=t.rootClientId,a=e("core/block-editor"),c=a.getInserterItems,l=a.getBlockName,s=a.getBlockRootClientId,u=a.getBlockSelectionEnd,p=a.canInsertBlockType,d=a.getBlockListSettings,f=e("core/blocks").getChildBlockNames,m=e("amp/story").getCurrentPage,b=o;if(!b&&!n&&!r){var g=u();g&&(b=s(g)||void 0)}b||(b=m());var h=l(b),O=[].concat(Ne()(c()),Ne()(c(b))).filter((function(e){var t=e.name;return!!i.d.includes(t)||function(e,t){var n=d(t),r=p(e,t)&&n&&n.allowedBlocks.includes(e);return Boolean(r)}(t,m())}));return{rootChildBlocks:f(h),items:Ne()(new Set(O)),destinationRootClientId:b,currentPage:m()}})),Object(a.withDispatch)((function(e,t,n){var r=n.select;return{showInsertionPoint:function(){},hideInsertionPoint:function(){},onSelect:function(n){var o=e("core/block-editor"),a=o.replaceBlocks,c=o.insertBlock,l=r("core/block-editor").getSelectedBlock,s=t.isAppender,u=n.name,p=n.initialAttributes,d=l(),f=Object(j.createBlock)(u,p);if(!s&&d&&Object(j.isUnmodifiedDefaultBlock)(d))a(d.clientId,f);else{var m=i.d.includes(u)?void 0:t.destinationRootClientId;c(f,function(e){var n=r("core/block-editor"),o=n.getBlockIndex,a=n.getBlockSelectionEnd,c=n.getBlockOrder,l=t.clientId,s=t.destinationRootClientId,u=t.isAppender,p=t.currentPage;if(l)return o(l,s);if(i.d.includes(e))return c().indexOf(p)+1;var d=a();return!u&&d?o(d,s)+1:c(s).length}(u),m)}t.onSelect()}}})),o.withSpokenMessages,Oe.withInstanceId,Oe.withSafeTimeout)(Yt),Qt=(n(97),function(e){var t=e.onToggle,n=e.disabled,a=e.isOpen;return Object(r.createElement)(o.IconButton,{icon:"insert",label:Object(c.__)("Add element","amp"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":a,disabled:n})}),Jt=function(e){var t=e.position,n=e.rootClientId,i=e.clientId,l=e.isAppender;if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;return Object(r.createElement)(o.Dropdown,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:t,onToggle:function(t){e.onToggle&&e.onToggle(t)},expandOnMobile:!0,headerTitle:Object(c.__)("Add element","amp"),renderToggle:function(t){var n=t.onToggle,r=t.isOpen;return(e.renderToggle||Qt)({onToggle:n,isOpen:r})},renderContent:function(e){var t=e.onClose;return Object(r.createElement)(Xt,{onSelect:t,rootClientId:n,clientId:i,isAppender:l})}})},Zt={position:"bottom right"},en=function(e,t,n){var r,o=wp.media({title:e,button:{text:Object(c.__)("Select","amp")},multiple:!1,library:{type:t}});o.on("select",(function(){r=o.state().get("selection").first().toJSON(),n(r)})),o.open()},tn=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor"),r=n.getBlock,o=n.getBlockOrder,a=e("amp/story").getSettings,c=t(),i=r(c);return{currentPage:c,blockOrder:o(c),mediaType:i&&i.attributes.mediaType?i.attributes.mediaType:"",allowedVideoMimeTypes:a().allowedVideoMimeTypes}}),[]),t=e.currentPage,n=e.blockOrder,l=e.mediaType,s=e.allowedVideoMimeTypes,u=Object(f.X)(),p=Object(a.useDispatch)("core/block-editor"),d=p.insertBlock,m=p.updateBlockAttributes,b=p.selectBlock,g=Object(r.useCallback)((function(e){var r=n.length,o=Object(j.createBlock)(e,{});d(o,r,t)}),[n,t,d]),h=Object(r.useCallback)((function(e){if(t){var n=Object(f.O)(e);m(t,n),b(t)}}),[t,b,m]);if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;for(var O="image"===l?Object(c.__)("Update Background Image","amp"):Object(c.__)("Insert Background Image","amp"),y="video"===l?Object(c.__)("Update Background Video","amp"):Object(c.__)("Insert Background Video","amp"),v=[{title:O,icon:Object(r.createElement)(k.BlockIcon,{icon:"format-image"}),onClick:function(){return en(Object(c.__)("Select or Upload Media","amp"),i.p,h)}},{title:y,icon:Object(r.createElement)(k.BlockIcon,{icon:"media-video"}),onClick:function(){return en(Object(c.__)("Select or Upload Media","amp"),s,h)}}],w=function(){var e=_[E];if(!u(e,t))return"continue";var n=Object(j.getBlockType)(e),o={title:Object(c.sprintf)(Object(c.__)("Insert %s","amp"),n.title),onClick:function(){return g(e)},icon:Object(r.createElement)(k.BlockIcon,{icon:n.icon})};v.unshift(o)},E=0,_=["core/video","core/image"];E<_.length;E++)w();return Object(r.createElement)(o.DropdownMenu,{icon:"admin-media",label:Object(c.__)("Insert Media","amp"),className:"amp-story-media-inserter-dropdown",controls:v,hasArrowIndicator:!0,popoverProps:Zt,toggleProps:{labelPosition:"bottom"}})},nn=(n(98),n(32)),rn=0,on=0,an=null,cn=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o)))).state={isResizing:!1},n}return z()(t,e),T()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.angle,a=t.blockName,c=t.ampFitText,l=t.hasTextContent,u=t.minWidth,p=t.minHeight,d=t.onResizeStart,m=t.onResizeStop,g=t.children,O=$e()(t,["angle","blockName","ampFitText","hasTextContent","minWidth","minHeight","onResizeStart","onResizeStop","children"]),y=this.props,v=y.width,j=y.height,k=this.state.isResizing,w="core/image"===a,E="amp/amp-story-text"===a,_=(O.clientId,O.snapGap,O.horizontalTargets),S=O.verticalTargets,x=O.setSnapLines,P=O.clearSnapLines,C=O.parentBlockElement,I=$e()(O,["clientId","snapGap","horizontalTargets","verticalTargets","setSnapLines","clearSnapLines","parentBlockElement"]);return Object(r.createElement)(o.ResizableBox,s()({},I,{className:h()("amp-story-resize-container",{"is-resizing":k}),size:{height:j,width:v},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},onResizeStop:function(t,r){var o=Object(nn.c)(t,n,rn,on,r),a=o.deltaW,c=o.deltaH,i=v+a,l=j+c;qt&&(qt.style.height="100%"),i=i<Lt?Lt:i,l=l<Ft?Ft:l;var s=parseFloat(an.style.top),u=parseFloat(an.style.left),p=Number(s.toFixed(2)),d=Number(u.toFixed(2));e.setState({isResizing:!1}),P(),m({width:parseInt(i),height:parseInt(l),positionTop:p,positionLeft:d})},onResizeStart:function(t,n,r){rn=t.clientX,on=t.clientY,Lt=v,Ft=j,an=r.closest(".wp-block").parentNode,Ht=an.style.top,zt=an.style.left,w&&(Wt=an.querySelector("figure .components-resizable-box__container")),Ut=c?null:Object(nn.a)(a,an),c&&E?qt=an.querySelector(".with-line-height"):(qt&&(qt.style.lineHeight="initial"),qt=null),e.setState({isResizing:!0}),P(),d()},onResize:function(e,t,r){var o=Object(nn.c)(e,n,rn,on,t),a=o.deltaW,s=o.deltaH;!w||v||j||(v=an.clientWidth,j=an.clientHeight);var d=Math.max(u,v+a),m=Math.max(p,j+s),g=!1;if(Ut&&(0>a||0>s)&&l){n&&(Ut.style.width=d+"px",Ut.style.height=m+"px"),E&&(Ut.style.height="auto");var h=Ut.scrollWidth,O=Ut.scrollHeight;(d<h||m<O)&&(g=!0,d=Lt,m=Ft),n&&(E?E&&!c&&(Ut.style.width="100%"):(Ut.style.width="initial",Ut.style.height="100%")),E&&(Ut.style.height="")}if(!g){var y=Object(nn.b)({direction:t,angle:n,isText:E,oldWidth:v,oldHeight:j,newWidth:d,newHeight:m,oldPositionLeft:zt,oldPositionTop:Ht});an.style.left=Object(f.r)("x",y.left)+"%",an.style.top=Object(f.r)("y",y.top)+"%"}r.style.width=d+"px",r.style.height=m+"px";var k=Object(f.u)(an.querySelector(".wp-block"),C),I=k.top,B=k.right,A=k.bottom,T=k.left;if(!e.getModifierState("Alt")){var D=_(I,A),N=b()(D,2),R=N[0],M=N[1],L=S(T,B),F=b()(L,2),H=F[0],z=F[1];x([].concat(Ne()(et(R,M,T,B,i.l)),Ne()(et(H,z,I,A,i.l))))}else P();Lt=d,Ft=m,qt&&(c&&(qt.style.lineHeight=m+"px"),qt.style.height=m+"px"),Wt&&w&&(Wt.style.width=d+"px",Wt.style.height=m+"px")}}),g)}}]),t}(r.Component);cn.defaultProps={snapGap:0};var ln=lt(cn),sn=n(14),un=function(e){var t,n=e.attribute,o=e.attributes,i=e.setAttributes,l=e.className,s=e.fontSize,u=e.backgroundColor,p=e.customBackgroundColor,d=e.textColor,m=e.tagName,b=o.height,g=o.width,O=o.ampFitText,y=o.ampFontFamily,v=o.align,j=o.opacity,w=o.autoFontSize,_=Object(a.useSelect)((function(e){var t,r=e("core/editor").getEditedPostAttribute,o=e("core").getAuthors,a=e("core/block-editor").getSettings,i=r(n),l=!1;switch(n){case"date":var s=Object(E.__experimentalGetSettings)().formats.date,u=i||new Date;t=Object(E.dateI18n)(s,u);break;case"author":var p=o().find((function(e){return e.id===i}));t=p?p.name:Object(c.__)("Anonymous","amp"),l=!p;break;default:t=i}return{content:t,placeholder:x,colors:a().colors,isLoading:l}}),[n]),S=_.content,x=_.placeholder,P=_.colors,C=_.isLoading;Object(r.useEffect)((function(){O&&!C&&Object(f.L)(e)}),[O,y,g,b,S,C,e]),Object(r.useEffect)((function(){O||Object(f.K)(e)}),[O,s,y,S,e]);var I=s&&s.size&&s.size+"px",B=Object(sn.d)(P,u,p,j),A=m;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(k.BlockControls,null,Object(r.createElement)(k.AlignmentToolbar,{value:v,onChange:function(e){return i({align:e})}})),Object(r.createElement)(A,{style:{backgroundColor:B,color:d.color,fontSize:O?w+"px":I,textAlign:v},className:h()(l,(t={"has-text-color":d.color,"has-background":u.color},Ae()(t,u.class,u.class),Ae()(t,d.class,d.class),Ae()(t,s.class,s.class),Ae()(t,"is-empty",!S),Ae()(t,"is-amp-fit-text",O),t))},S||x))},pn=function(e){var t=e.attribute,n=e.tagName,o=e.isEditable;return function(e){return Object(r.createElement)(un,s()({attribute:t,tagName:n,isEditable:o},e))}},dn=function(e){var t=e.tagName;return function(e){var n=e.attributes,o=n.ampFitText,a=Object(f.m)(n),c=Object(f.v)(n);if(!o)return Object(r.createElement)(k.RichText.Content,{tagName:t,style:c,className:a,value:"{content}"});var i=t;return Object(r.createElement)(i,{style:c,className:a},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},"{content}"))}},fn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(3 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})),Object(r.createElement)("path",{d:"M20.808 7.145c1.41 1.74 1.283 4.365-1.165 6.348.44-1.348.575-2.628-1.011-4.586L17 10.229l.517-4.923 4.923.517-1.632 1.322z"}))};fn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var mn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(7.65 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})),Object(r.createElement)("path",{d:"M3.632 17.653c-1.41-1.74-1.283-4.365 1.165-6.348-.44 1.348-.575 2.628 1.011 4.586l1.632-1.322-.517 4.923L2 18.975l1.632-1.322z"}))};mn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var bn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(5.65 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})))};bn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var gn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(6 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z"}),Object(r.createElement)("rect",{opacity:".3",width:"9",height:"9",rx:"1"})))};gn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var hn=window,On=hn.getComputedStyle,yn=hn.ampStoriesFonts,vn=Object(o.withFallbackStyles)((function(e,t){var n=t.textColor,r=t.backgroundColor,o=t.fontSize,a=t.customFontSize,c=e.querySelector('[contenteditable="true"]'),i=c?On(c):null;return{fallbackBackgroundColor:r||!i?void 0:i.backgroundColor,fallbackTextColor:n||!i?void 0:i.color,fallbackFontSize:o||a||!i?void 0:parseInt(i.fontSize)||void 0}})),jn=Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getSelectedBlockClientId,o=n.getBlockRootClientId,a=n.getBlock,c=n.getBlockOrder,i=n.getBlockIndex,l=e("amp/story"),s=l.getAnimatedBlocks,u=l.isValidAnimationPredecessor,p=r(),d=o(p),m=(s()[d]||[]).find((function(e){return e.id===t.clientId})),b=o(t.clientId),g=c(b),h=i(t.clientId,b);return{currentBlockPosition:g.length-1-h+1,numberOfBlocks:g.length,isFirst:0===h,isLast:Object(f.l)(b)?h===g.length-2:h===g.length-1,parentBlock:a(b),rootClientId:b,animationAfter:m?m.parent:void 0,getAnimatedBlocks:function(){return(s()[d]||[]).filter((function(e){return e.id!==p})).filter((function(e){var t=e.id,n=a(t);return n&&n.attributes.ampAnimationType&&u(d,p,t)})).map((function(e){var t=e.id,n=a(t);return{value:t,label:n.name,block:n,blockType:Object(j.getBlockType)(n.name)}}))}}})),kn=Object(a.withDispatch)((function(e,t,n){var r=t.clientId,o=t.rootClientId,a=t.toggleSelection,c=(0,n.select)("core/block-editor"),i=c.getSelectedBlockClientId,l=c.getBlockRootClientId,s=c.getBlockOrder,u=e("core/block-editor"),p=u.moveBlocksDown,d=u.moveBlocksUp,f=u.moveBlockToPosition,m=u.selectBlock,b=i(),g=l(b),h=e("amp/story"),O=h.addAnimation,y=h.changeAnimationType,v=h.changeAnimationDuration,j=h.changeAnimationDelay;return{onAnimationTypeChange:function(e){y(g,b,e)},onAnimationOrderChange:function(e){O(g,b,e)},onAnimationDurationChange:function(e){v(g,b,e)},onAnimationDelayChange:function(e){j(g,b,e)},startBlockActions:function(){return a(!1)},stopBlockActions:function(){a(!0),m(r)},bringForward:function(){return p(r,o)},sendBackward:function(){return d(r,o)},moveFront:function(){var e=s(o).length-1;f(r,o,o,e)},moveBack:function(){f(r,o,o,0)}}})),wn=Object(Oe.compose)(Object(k.withColors)("backgroundColor",{textColor:"color"}),Object(k.withFontSizes)("fontSize"),vn,jn,kn),En=Object(Oe.createHigherOrderComponent)((function(e){return wn((function(t){var n=t.clientId,a=t.rootClientId,l=t.name,s=t.attributes,u=t.isLast,p=t.isFirst,m=t.currentBlockPosition,b=t.numberOfBlocks,g=t.fontSize,h=t.setFontSize,O=t.setAttributes,y=t.backgroundColor,v=t.setBackgroundColor,w=t.textColor,E=t.setTextColor,_=t.fallbackBackgroundColor,S=t.fallbackTextColor,x=t.onAnimationTypeChange,P=t.onAnimationOrderChange,C=t.onAnimationDurationChange,I=t.onAnimationDelayChange,B=t.getAnimatedBlocks,A=t.animationAfter,T=t.startBlockActions,D=t.stopBlockActions,N=t.bringForward,R=t.sendBackward,M=t.moveFront,L=t.moveBack;if(!i.b.includes(l))return Object(r.createElement)(e,t);var F,H=Object(j.getBlockType)(l),z="core/image"===l,W="core/video"===l,q="amp/amp-story-text"===l,U="amp/amp-story-page-attachment"===l,V=i.h.includes(l),G=i.j.includes(l),K=i.g.includes(l),$=i.i.includes(l),Y=s.ampFontFamily,X=s.ampFitText,Q=s.content,J=s.height,Z=s.width,ee=s.opacity,te=s.type,ne=s.ampAnimationType,re=s.ampAnimationDuration,oe=s.ampAnimationDelay,ae=s.rotationAngle,ce=z&&(!s.url||!s.url.length);if("core/table"===l){var ie=s.body.length;s.foot&&s.foot.length&&ie++,s.head&&s.head.length&&ie++,F=45*ie}else F=i.s[l]||i.s.default;var le=parseInt(String(re).replace("ms","")),se=parseInt(String(oe).replace("ms","")),ue=W?"ampShowCaption":"ampShowImageCaption",pe=q&&Q.length>0||V;return Object(r.createElement)(r.Fragment,null,!Object(f.z)(l)&&Object(r.createElement)(e,t),Object(f.z)(l)&&!ce&&amp;&Object(r.createElement)(ln,{width:Z,height:J,angle:ae,hasTextContent:pe,minHeight:F,minWidth:i.t,onResizeStop:function(e){O(e),D()},blockName:l,clientId:n,ampFitText:X,onResizeStart:function(){T()},snapGap:i.l},Object(r.createElement)(At,{blockElementId:"block-".concat(n),initialAngle:ae,className:"amp-story-editor__rotate-container",angle:ae,onRotateStart:function(){T()},onRotateStop:function(e,t){O({rotationAngle:t}),D()},snap:i.m,snapGap:i.n},q&&Object(r.createElement)(e,t),!q&&Object(r.createElement)(wt,{clientId:t.clientId,blockName:l,blockElementId:"block-".concat(t.clientId),isDraggable:!t.isPartOfMultiSelection,isMovable:Object(f.z)(l)},Object(r.createElement)(e,t)))),Object(f.z)(l)&&(!$||ce)&&Object(r.createElement)(At,{blockElementId:"block-".concat(n),initialAngle:ae,className:"amp-story-editor__rotate-container",angle:ae,onRotateStart:function(){T()},onRotateStop:function(e,t){O({rotationAngle:t}),D()},snap:i.m,snapGap:i.n},Object(r.createElement)(wt,{clientId:t.clientId,blockName:l,blockElementId:"block-".concat(t.clientId),isDraggable:!t.isPartOfMultiSelection,isMovable:Object(f.z)(l)},Object(r.createElement)(e,t))),!(u&&p)&&Object(f.z)(l)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{className:"amp-story-order-controls",title:Object(c.__)("Block Position","amp")},Object(r.createElement)("div",{className:"amp-story-order-controls-wrap"},Object(r.createElement)(o.IconButton,{className:"amp-story-controls-bring-front",onClick:M,icon:bn({width:24,height:24}),label:Object(c.__)("Send to front","amp"),"aria-describedby":"amp-story-controls-bring-front-description-".concat(n),"aria-disabled":u},Object(c.__)("Front","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-bring-forward",onClick:N,icon:fn({width:24,height:24}),label:Object(c.__)("Send Forward","amp"),"aria-describedby":"amp-story-controls-bring-forward-description-".concat(n),"aria-disabled":u},Object(c.__)("Forward","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-send-backwards",onClick:R,icon:mn({width:24,height:24}),label:Object(c.__)("Send Backward","amp"),"aria-describedby":"amp-story-controls-send-backward-description-".concat(n),"aria-disabled":p},Object(c.__)("Backward","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-send-back",onClick:L,icon:gn({width:24,height:24}),label:Object(c.__)("Send to back","amp"),"aria-describedby":"amp-story-controls-send-back-description-".concat(n),"aria-disabled":p},Object(c.__)("Back","amp"))),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-bring-front-description-".concat(n)},Object(f.k)(H&&H.title,m,1,p,u,-1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-bring-forward-description-".concat(n)},Object(f.k)(H&&H.title,m,m-1,p,u,-1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-send-backward-description-".concat(n)},Object(f.k)(H&&H.title,m,m+1,p,u,1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-send-back-description-".concat(n)},Object(f.k)(H&&H.title,m,b,p,u,1)))),G&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Text Settings","amp")},Object(r.createElement)(It,{fonts:yn,value:Y,onChange:function(e){e?(Object(f.C)(e.name),O({ampFontFamily:e.name})):O({ampFontFamily:""})}}),Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Automatically fit text to container","amp"),checked:X,onChange:function(){O({ampFitText:!X})}}),!X&&Object(r.createElement)(k.FontSizePicker,{value:g.size,onChange:h}),q&&Object(r.createElement)(o.SelectControl,{label:Object(c.__)("Select text type","amp"),value:te,onChange:function(e){return O({type:e})},options:[{value:"auto",label:Object(c.__)("Automatic","amp")},{value:"p",label:Object(c.__)("Paragraph","amp")},{value:"h1",label:Object(c.__)("Heading 1","amp")},{value:"h2",label:Object(c.__)("Heading 2","amp")}]}))),K&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(k.PanelColorSettings,{title:Object(c.__)("Color Settings","amp"),colorSettings:[{value:y.color,onChange:v,label:Object(c.__)("Background Color","amp")},{value:w.color,onChange:E,label:Object(c.__)("Text Color","amp")}]},Object(r.createElement)(k.ContrastChecker,{textColor:w.color,backgroundColor:y.color,fallbackTextColor:S,fallbackBackgroundColor:_,fontSize:g.size}),!U&&y.color&&Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Opacity","amp"),value:ee,onChange:function(e){return O({opacity:e})},min:5,max:100,step:5}))),Object(f.z)(l)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Animation","amp")},Object(r.createElement)(d,{clientId:n,page:a,animatedBlocks:B,animationType:ne,animationDuration:le,animationDelay:se,animationAfter:A,onAnimationTypeChange:x,onAnimationDurationChange:C,onAnimationDelayChange:I,onAnimationAfterChange:P}))),(z||W)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Story Settings","amp")},Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Display Caption","amp"),checked:s[ue],onChange:function(){t.setAttributes(Ae()({},ue,!s[ue])),s[ue]||t.setAttributes({caption:""})},help:Object(c.__)("Note: If you turn this off, the current caption text will be removed.","amp")}))))}))}),"withAmpStorySettings"),_n=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){var n,r=e("core/block-editor").getBlockAttributes;return t.block&&t.block.attributes?n=t.block.attributes:r&&(n=r(t.clientId)),{attributes:n}})),"withAttributes"),Sn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){return{blockName:(0,e("core/block-editor").getBlockName)(t.clientId)}})),"withBlockName"),xn=n(35),Pn=window.wp,Cn=Pn.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),n=this.imgSelect.getOptions();return Math.abs(t.width-n.minWidth)<10&&(t.width=n.minWidth),Math.abs(t.height-n.minHeight)<10&&(t.height=n.minHeight),t.dst_width=t.width,t.dst_height=t.height,Pn.ajax.post("crop-image",{nonce:e.get("nonces").edit,id:e.get("id"),context:"featured-image",cropDetails:t})}}),In=window.wp,Bn=function(e){Object(a.dispatch)("core/editor").editPost({featured_media:e})},An=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.width,o=t.height,a=n.width,i=n.height;return function(e){function t(){var e,n;B()(this,t);for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(i))),Ae()(F()(n),"initFeaturedImage",(function(){var e=Object(xn.c)(xn.b);n.frame=new e({allowedTypes:n.props.allowedTypes,button:{text:Object(c.__)("Select","amp"),close:!1},states:[new In.media.controller.Library({title:Object(c.__)("Choose image","amp"),library:In.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:r,suggestedHeight:o}),new Cn({imgSelectOptions:n.calculateImageSelectOptions,control:F()(n)})]}),In.media.frame=n.frame,n.frame.on("select",n.onSelectImage,F()(n)),n.frame.on("cropped",n.onCropped,F()(n)),n.frame.on("skippedcrop",n.onSkippedCrop,F()(n)),n.frame.on("close",(function(){n.initFeaturedImage()}),F()(n))})),"editor-post-featured-image__media-modal"===n.props.modalClass&&n.initFeaturedImage(),n}return z()(t,e),T()(t,[{key:"calculateImageSelectOptions",value:function(e,t){var n=e.get("width"),c=e.get("height"),l=a&&n>=a&&c>=i&&Object(sn.c)(n,c)===Object(sn.c)(a,i),s=l?parseInt(a):parseInt(r),u=l?parseInt(i):parseInt(o),p=s/u,d=s,f=u;t.set("canSkipCrop",!0),n/c>p?s=(u=c)*p:u=(s=n)/p;var m=(n-s)/2,b=(c-u)/2;return{aspectRatio:s+":"+u,handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:n,imageHeight:c,minWidth:d>s?s:d,minHeight:f>u?u:f,x1:m,y1:b,x2:s+m,y2:u+b}}},{key:"onSelectImage",value:function(){var e=this.frame.state().get("selection").first().toJSON();if(r===e.width&&o===e.height||a&&a===e.width&&i===e.height){var t=e.url,n=e.id,c=e.width,l=e.height,s=this.props.onSelect;Object(sn.l)({url:t,id:n,width:c,height:l,onSelect:s,dispatchImage:Bn}),this.frame.close()}else this.frame.setState("cropper")}},{key:"doAllowCrop",value:function(e){return e.width&&e.height&&e.width>=r&&e.height>=o}},{key:"mustBeCropped",value:function(e,t,n,r){return!(e===n&&t===r||n<=e)}},{key:"onCropped",value:function(e){var t=e.url,n=e.id,r=e.width,o=e.height,a=this.props.onSelect;Object(sn.l)({url:t,id:n,width:r,height:o,onSelect:a,dispatchImage:Bn})}},{key:"onSkippedCrop",value:function(e){var t=e.get("url"),n=e.get("width"),r=e.get("height"),o=e.id,a=this.props.onSelect;Object(sn.l)({url:t,id:o,width:n,height:r,onSelect:a,dispatchImage:Bn})}}]),t}(e)},Tn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){return{hasSelectedInnerBlock:(0,e("core/block-editor").hasSelectedInnerBlock)(t.clientId,!0)}})),"withHasSelectedInnerBlock"),Dn=Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockOrder;if(""!==(0,n.getBlockRootClientId)(t.clientId))return{pageNumber:void 0};var o=e("amp/story").isReordering;return{pageNumber:r().indexOf(t.clientId)+1,isReordering:o()}})),Nn=Object(Oe.createHigherOrderComponent)((function(e){return Dn((function(t){var n=t.name,o=t.pageNumber,a=t.isReordering;return i.d.includes(n)&&o?a?Object(r.createElement)(e,t):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"amp-story-page-number"},
16
/* translators: %s: Page number */
17
- Object(c.sprintf)(Object(c.__)("Page %s","amp"),o)),Object(r.createElement)(e,t)):Object(r.createElement)(e,t)}))}),"withPageNumber"),Rn=Object(a.withSelect)((function(e){var t=e("amp/story"),n=t.isReordering,o=t.getCurrentPage,a=e("core/block-editor"),c=a.getSelectedBlockClientIds,i=a.hasMultiSelection,l=(0,a.getSettings)().isRTL;return{handleEvent:function(e){var t="contextmenu"===e.type,n=c();if(0!==n.length){var a=window.getSelection().toString();if(!i()&&!a.length){var s=document.querySelector(".edit-post-layout");if(!document.getElementById("amp-story-right-click-menu")){var u=document.createElement("div");u.id="amp-story-right-click-menu",s.appendChild(u)}var p=s.getBoundingClientRect(),d=document.querySelector(".edit-post-header"),m=0;d&&(m=d.clientHeight);var b=0,g=0;if(t)b=e.clientX,g=e.clientY;else{var h=e.target.getBoundingClientRect();b=h.left+h.width/2,g=h.top+h.height/2}var O=b-(l?p.right:p.left),y=g-p.top-m,v=o(),j=0,k=0,w=Object(f.i)(v);if(w){var E=w.getBoundingClientRect(),_=b-E.left,S=g-E.top;k=Object(f.r)("x",_),j=Object(f.r)("y",S)}Object(r.render)(Object(r.createElement)(Nt,{clientIds:n,clientX:O,clientY:y,insidePercentageX:k,insidePercentageY:j}),document.getElementById("amp-story-right-click-menu")),e.preventDefault()}}},isReordering:n()}})),Mn=Object(Oe.createHigherOrderComponent)((function(e){return Rn((function(t){var n=t.name,a=t.handleEvent,c=t.isReordering;return"amp/amp-story-page"===n||i.b.includes(n)?c?Object(r.createElement)(e,t):Object(r.createElement)(o.KeyboardShortcuts,{shortcuts:{"shift+f10":a}},Object(r.createElement)("div",{onContextMenu:a},Object(r.createElement)(e,t))):Object(r.createElement)(e,t)}))}),"withContextMenu"),Ln=function(e){return Object(a.withSelect)((function(e,t){var n=(0,e("core/editor").getEditedPostAttribute)("featured_media"),r="core/image"===t.name||"amp/amp-story-page"===t.name;if(!n&&r&&t.attributes){var o=e("core/block-editor").getSelectedBlock,c=t.attributes.mediaId||t.attributes.id,i=o();if(c&&i&&i.attributes){var l=i.attributes.mediaId||i.attributes.id;if(l&&l===c){var s=e("core").getMedia,u=Object(a.dispatch)("core/editor").editPost,p=s(c);p&&p.media_details&&Object(sn.i)(p.media_details,Object(sn.f)())&&Object(sn.i)(p.media_details,Object(f.p)())&&u({featured_media:c})}}}}))(e)},Fn=function(e){return function(t){return"core/video"===t.name?Object(r.createElement)(qn,t):Object(r.createElement)(e,t)}},Hn=n(33),zn=n(20),Wn=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)(o.Path,{d:"M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"})),qn=Object(Oe.compose)([o.withNotices,Oe.withInstanceId])((function(e){var t=e.instanceId,n=e.isSelected,l=e.className,s=e.attributes,u=e.setAttributes,p=e.noticeUI,d=e.noticeOperations,m=s.caption,g=s.loop,O=s.id,y=s.poster,v=s.src,j=s.width,w=s.height,E=s.ampAriaLabel,_=Object(r.useState)(!v),S=b()(_,2),x=S[0],P=S[1],C=Object(r.useState)(null),I=b()(C,2),B=I[0],A=I[1],T=Object(r.useState)(null),D=b()(T,2),N=D[0],R=D[1],M=Object(r.useState)(!1),L=b()(M,2),F=L[0],H=L[1],z=function(){return P(!0)},W=Object(r.useRef)(null),q=Object(a.useSelect)((function(e){var t,n=e("core").getMedia,r=e("amp/story").getSettings,o=O?n(O):void 0;return o&&o.featured_media&&!y&&(t=n(o.featured_media)),{media:o,videoFeaturedImage:t,allowedVideoMimeTypes:r().allowedVideoMimeTypes}}),[O,y]),U=q.media,V=q.videoFeaturedImage,G=q.allowedVideoMimeTypes,K=Object(a.useSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}}),[]).mediaUpload;Object(r.useEffect)((function(){if(!O&&Object(Hn.isBlobURL)(v)){var e=Object(Hn.getBlobByURL)(v);e&&K({filesList:[e],onFileChange:function(e){var t=b()(e,1)[0],n=t.id,r=t.url;R(null),A(null),u({id:n,src:r})},onError:function(e){P(!0),d.createErrorNotice(e)},allowedTypes:G})}v&&!Object(Hn.isBlobURL)(v)&&Object(sn.e)(v).then(A)}),[]),Object(r.useEffect)((function(){W.current&&W.current.load()}),[y]),Object(r.useEffect)((function(){v&&!Object(Hn.isBlobURL)(v)&&Object(sn.e)(v).then(A)}),[v]),Object(r.useEffect)((function(){if(!E&&U){var e=U.alt_text||U.title&&U.title.raw||"";u({ampAriaLabel:e})}V?u({poster:V.source_url}):!U||U.featured_media||F||(H(!0),Object(f.V)({id:O,src:v}).then((function(e){u({poster:Object(f.t)(e)}),H(!1)})).catch((function(){return H(!1)})))}),[U,E,O,F,u,v,V]);if(x)return Object(r.createElement)(k.MediaPlaceholder,{icon:Object(r.createElement)(k.BlockIcon,{icon:Wn}),className:l,onSelect:function(e){if(!e||!e.url)return u({src:void 0,id:void 0,poster:void 0}),void z();u({src:e.url,id:e.id,poster:void 0}),P(!1),R(null),A(null)},onSelectURL:function(e){e!==v&&(u({src:e,id:void 0,poster:void 0}),H(!0),Object(f.V)({src:e}).then((function(e){u({poster:Object(f.t)(e)}),H(!1)})).catch((function(){return H(!1)}))),P(!1),R(null),A(null)},accept:G.join(","),allowedTypes:G,value:s,notices:p,onError:function(e){d.removeAllNotices(),d.createErrorNotice(e)}});var $,Y=N&&B?B/N:0,X="video-block__poster-image-".concat(t),Q=Y?Object(sn.j)(Y):null;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(k.BlockControls,null,Object(r.createElement)(o.Toolbar,null,Object(r.createElement)(o.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(c.__)("Edit video","amp"),onClick:z,icon:"edit"}))),Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Video Settings","amp")},Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Loop","amp"),onChange:($="loop",function(e){return u(Ae()({},$,e))}),checked:g}),Object(r.createElement)(o.TextControl,{label:Object(c.__)("Assistive Text","amp"),help:Object(c.__)("Used to inform visually impaired users about the video content.","amp"),value:E,onChange:function(e){return u({ampAriaLabel:e})}}),(!F||y)&&Object(r.createElement)(k.MediaUploadCheck,null,Object(r.createElement)(o.BaseControl,{id:X,label:Object(c.__)("Poster Image","amp"),className:"editor-video-poster-control"},!y&&Object(r.createElement)(o.Notice,{status:"error",isDismissible:!1},Object(c.__)("A poster image must be set.","amp")),Object(r.createElement)(k.MediaUpload,{title:Object(c.__)("Select Poster Image","amp"),onSelect:function(e){u({poster:e.url})},allowedTypes:i.u,render:function(e){var t=e.open;return Object(r.createElement)(o.Button,{id:X,className:h()("video-block__poster-image",{"editor-post-featured-image__toggle":!y,"editor-post-featured-image__preview":y}),onClick:t,"aria-label":y?Object(c.__)("Replace Poster Image","amp"):null},y&&Object(r.createElement)(o.ResponsiveWrapper,{naturalWidth:j,naturalHeight:w},Object(r.createElement)("img",{src:y,alt:""})),!y&&Object(c.__)("Set Poster Image","amp"))}}))),Q&&Object(r.createElement)(o.Notice,{status:"warning",isDismissible:!1},Object(c.sprintf)(
18
/* translators: %d: the number of recommended megabytes per second */
19
Object(c.__)("A video size of less than %d MB per second is recommended.","amp"),zn.g)," ",Object(c.sprintf)(
20
/* translators: %d: the number of actual megabytes per second */
21
- Object(c.__)("The selected video is %d MB per second.","amp"),Math.round(Y/zn.d))))),Object(r.createElement)("figure",{className:"wp-block-video"},Object(r.createElement)("video",{autoPlay:!0,muted:!0,"aria-label":E,loop:g,controls:!g,poster:y,ref:W,src:v,onLoadedMetadata:function(e){R(Math.round(e.currentTarget.duration))}}),(!k.RichText.isEmpty(m)||n)&&Object(r.createElement)(k.RichText,{tagName:"figcaption",placeholder:Object(c.__)("Write caption…","amp"),value:m,onChange:function(e){return u({caption:e})},inlineToolbar:!0})))})),Un=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e){return{isReordering:(0,e("amp/story").isReordering)()}})),"withIsReordering"),Vn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e){return{selectedBlock:(0,e("core/block-editor").getSelectedBlock)()}})),"withSelectedBlock"),Gn=Object(Oe.createHigherOrderComponent)((function(e){return function(t){return"amp/amp-story-page"!==t.name?Object(r.createElement)(e,t):Object(r.createElement)(ot,null,Object(r.createElement)(e,t))}}),"withSnapLines");function Kn(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 $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yn=Object(Oe.compose)(_n,Sn,Tn),Xn=function(e){return Yn((function(t){var n,o=t.clientId,a=t.blockName,c=t.hasSelectedInnerBlock,l=t.attributes;if(-1===i.a.indexOf(a))return Object(r.createElement)(e,t);if(c&&"amp/amp-story-page"===a)return n=$n({},t.wrapperProps,{"data-amp-selected":"parent"}),Object(r.createElement)(e,s()({},t,{wrapperProps:n}));var u="core/image"===a&&!l.ampShowImageCaption||"core/video"===a&&!l.ampShowCaption;if(n=$n({},t.wrapperProps,{"data-amp-caption":u?"noCaption":void 0,"data-font-family":l.ampFontFamily||void 0}),i.b.includes(a)){var p={transform:"scale(var(--preview-scale)) translateX(var(--preview-translateX)) translateY(var(--preview-translateY)) rotate(".concat(l.rotationAngle||0,"deg)")};Object(f.y)(a)&&(p.transform="scale(var(--preview-scale))"),n=$n({},n,{style:$n({},n.style,{},p)});var d={top:"".concat(l.positionTop,"%"),left:"".concat(l.positionLeft,"%")};return Object(r.createElement)("div",{className:"amp-page-child-block","data-block":o,"data-type":a,style:d},Object(r.createElement)(e,s()({},t,{wrapperProps:n,enableAnimation:!1})))}return Object(r.createElement)(e,s()({},t,{wrapperProps:n,enableAnimation:!1}))}))};function Qn(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 Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zn=function(e){return Object(a.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlockRootClientId,o=e("amp/story"),a=o.getCurrentPage,c=o.isPlayingAnimation,i=a()===n;return{isActivePage:i,isTopLevelBlock:""===r(n),isPlayingAnimation:i&&c()}}))((function(t){var n=t.isTopLevelBlock,o=t.isActivePage,c=t.isPlayingAnimation;if(!n)return Object(r.createElement)(e,t);var i=Jn({},t,{className:Jn({},t.className,{"amp-page-active":n&&o,"amp-page-inactive":n&&!o,"amp-page-is-animating":c,"amp-page-block":!0}),isLocked:!o}),l=Object(a.dispatch)("amp/story").setCurrentPage,u=Object(a.dispatch)("core/block-editor").selectBlock;return o?Object(r.createElement)(e,i):Object(r.createElement)(e,s()({},i,{onSelect:function(){l(t.clientId),u(t.clientId)}}))}))},er=Object(Oe.compose)(Sn,Tn,Vn,Un),tr=function(){return er((function(e){var t=e.blockName,n=e.hasSelectedInnerBlock,o=e.isReordering,a=e.selectedBlock;return o?null:"amp/amp-story-page"===t&&n&&a?Object(r.createElement)(Te,{srcClientId:a.clientId,srcBlockName:a.name}):null}))},nr=Object(Oe.compose)(Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockRootClientId,o=n.getBlock,a=n.getBlockOrder,c=n.getBlocksByClientId;if(!Object(f.y)(t.name))return{};var i=o(r(t.clientId));if(!i)return{};var l=0===a().indexOf(i.clientId),s=c(a(i.clientId)).find((function(e){return e.name===t.name})),u=s&&s.clientId!==t.clientId;return{isInvalid:l||u,originalBlockClientId:u&&s.clientId}})),Object(a.withDispatch)((function(e,t){var n=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(n)}}}))),rr=Object(Oe.createHigherOrderComponent)((function(e){return nr((function(t){var n=t.isInvalid,a=t.originalBlockClientId,i=t.selectFirst,l=$e()(t,["isInvalid","originalBlockClientId","selectFirst"]);if(!n||!Object(f.y)(l.name))return Object(r.createElement)(e,l);var s=Object(j.getBlockType)(l.name),u=[Object(r.createElement)(o.Button,{key:"remove",isLarge:!0,onClick:function(){return l.onReplace([])}},Object(c.__)("Remove","amp"))];return a&&u.unshift(Object(r.createElement)(o.Button,{key:"find-original",isLarge:!0,onClick:i},Object(c.__)("Find original","amp"))),Object(r.createElement)(k.Warning,{actions:u},Object(r.createElement)("strong",null,"".concat(s.title,": ")),a?Object(c.__)("This block can only be used once per page.","amp"):Object(c.__)("This block can not be used on the first page.","amp"))}))}),"withCallToActionValidation");n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"h",(function(){return x})),n.d(t,"i",(function(){return C})),n.d(t,"n",(function(){return _e})),n.d(t,"p",(function(){return xe})),n.d(t,"v",(function(){return Ce})),n.d(t,"s",(function(){return Ie})),n.d(t,"t",(function(){return Te})),n.d(t,"u",(function(){return wt})),n.d(t,"m",(function(){return _t})),n.d(t,"b",(function(){return Ct})),n.d(t,"j",(function(){return It})),n.d(t,"r",(function(){return At})),n.d(t,"f",(function(){return Nt})),n.d(t,"o",(function(){return Rt})),n.d(t,"k",(function(){return Jt})),n.d(t,"l",(function(){return tn})),n.d(t,"q",(function(){return ln})),n.d(t,"H",(function(){return pn})),n.d(t,"I",(function(){return dn})),n.d(t,"x",(function(){return En})),n.d(t,"y",(function(){return _n})),n.d(t,"z",(function(){return Sn})),n.d(t,"C",(function(){return An})),n.d(t,"F",(function(){return Tn})),n.d(t,"J",(function(){return Nn})),n.d(t,"B",(function(){return Mn})),n.d(t,"E",(function(){return Ln})),n.d(t,"D",(function(){return Fn})),n.d(t,"g",(function(){return qn})),n.d(t,"G",(function(){return Un})),n.d(t,"K",(function(){return Vn})),n.d(t,"L",(function(){return Gn})),n.d(t,"N",(function(){return Xn})),n.d(t,"w",(function(){return Zn})),n.d(t,"M",(function(){return tr})),n.d(t,"A",(function(){return rr}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),o=n.n(r);function a(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}var c=function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{deprecated:"migrated"})}},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return s}));var r=6,o=72,a=1200,c=1e6,i=1,l="select-file-type-error",s="select-file-size-error"},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(66),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(67);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(78);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(4),o=n(3),a=function(e){return e*Math.PI/180},c=function(e,t,n,o,c){var i=e.clientY-o,l=e.clientX-n,s=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}(l,i),u=Math.atan2(i,l)-a(t),p=c.toLowerCase().includes("left")||c.toLowerCase().includes("right"),d=c.toLowerCase().includes("top")||c.toLowerCase().includes("bottom"),f=p?s*Math.cos(u):0,m=d?s*Math.sin(u):0;return{deltaW:r.w.includes(c)?-f:f,deltaH:r.v.includes(c)?-m:m}},i=function(e,t){if(!(r.j.includes(e)||"core/code"===e))return null;switch(e){case"amp/amp-story-text":return t.querySelector(".block-editor-rich-text__editable.editor-rich-text__editable");case"amp/amp-story-post-title":return t.querySelector(".wp-block-amp-amp-story-post-title");case"amp/amp-story-post-author":return t.querySelector(".wp-block-amp-amp-story-post-author");case"amp/amp-story-post-date":return t.querySelector(".wp-block-amp-amp-story-post-date");case"core/code":return t.querySelector(".wp-block-code");default:return null}},l=function(e,t,n,r){var o,a,c=-e/2,i=t/2;return"topRight"===r||"bottomLeft"===r?(o=i*-Math.sin(n)+c*Math.cos(n),a=i*Math.cos(n)-c*-Math.sin(n)):(o=i*Math.sin(n)+c*Math.cos(n),a=i*Math.cos(n)-c*Math.sin(n)),{left:o-c,top:a-i}},s=function(e){var t,n,c=e.direction,i=e.angle,s=e.isText,u=e.oldWidth,p=e.oldHeight,d=e.newWidth,f=e.newHeight,m=e.oldPositionLeft,b=e.oldPositionTop,g=d-u,h=f-p,O=a(i);s?(t=l(u-2*r.B,p-2*r.B,O,c),n=l(d-2*r.B,f-2*r.B,O,c)):(t=l(u,p,O,c),n=l(d,f,O,c));var y={left:n.left-t.left,top:n.top-t.top};return function(e,t,n){switch(e){case"topRight":return{left:t.left-n.left,top:t.top-n.top};case"bottomLeft":return{left:t.left+n.left,top:t.top+n.top};case"left":case"topLeft":case"top":return{left:t.left+n.left,top:t.top-n.top};default:return{left:t.left-n.left,top:t.top+n.top}}}(c,function(e,t,n,r,a){var c=Object(o.s)("x",parseFloat(t)),i=Object(o.s)("y",parseFloat(n));switch(e){case"topRight":return{left:c,top:i-a};case"bottomLeft":return{left:c-r,top:i};case"left":case"topLeft":case"top":return{left:c-r,top:i-a};default:return{left:c,top:i}}}(c,m,b,g,h),y)}},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(6),o=n.n(r),a=n(10),c=n(1),i=n(14);function l(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}var s,u=window.wp,p=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:(s=Object(c.sprintf)(
22
/* translators: 1: image width in pixels. 2: image height in pixels. 3: required minimum width in pixels. 4: required minimum height in pixels. */
23
Object(c.__)("The selected image is too small (%1$s by %2$s pixels). It should have a size of at least %3$s by %4$s pixels.","amp"),"{{width}}","{{height}}","{{minWidth}}","{{minHeight}}"),Object(i.g)(s))}),d=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:function(){var e=Object(c.sprintf)(
24
/* translators: 1: the selected file type. */
25
Object(c.__)("The selected file mime type, %1$s, is not allowed.","amp"),"{{mimeType}}");return Object(i.g)(e)}()}),f=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:function(){var e=Object(c.sprintf)(
26
/* translators: 1: the recommended max MB per second for videos. 2: the actual MB per second of the video. */
27
- Object(c.__)("A video size of less than %1$s MB per second is recommended. The selected video is %2$s MB per second.","amp"),"{{maxVideoMegabytesPerSecond}}","{{actualVideoMegabytesPerSecond}}");return Object(i.g)(e)}()}),m=u.media.view.Toolbar.Select.extend({refresh:function(){u.media.view.Toolbar.Select.prototype.refresh.call(this);var e=this.controller.state(),t=e.get("selection").models[0],n=e.collection.get("library").get("suggestedWidth"),r=e.collection.get("library").get("suggestedHeight");!t||"image"!==t.get("type")||!t.get("width")||t.get("width")>=n&&t.get("height")>=r?this.secondary.unset("select-error"):this.secondary.set("select-error",new p({minWidth:n,minHeight:r,width:t.get("width"),height:t.get("height")})),i.b.call(this,t,d)}}),b=u.media.view.Toolbar.Select.extend({refresh:function(){u.media.view.Toolbar.Select.prototype.refresh.call(this);var e=this.controller.state().get("selection").models[0];i.b.call(this,e,d),i.a.call(this,e,f);var t=this.$el.parents(".media-frame");t&&t.toggleClass("has-two-notices",i.k.call(this))}}),g=function(e){return u.media.view.MediaFrame.Select.extend({createSelectToolbar:function(t,n){(n=n||this.options.button||{}).controller=this,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{allowedTypes:Object(a.get)(this,["options","allowedTypes"],null)}),t.view=new e(n)}})}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){function n(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var c=e.apply(t,r);function i(e){n(c,o,a,i,l,"next",e)}function l(e){n(c,o,a,i,l,"throw",e)}i(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(0),o=(n(9),n(5)),a=n(31),c=n(2),i=n(1),l=n(14),s=Object(c.withSelect)((function(e){var t=e("core/editor").getCurrentPost(),n=e("core/editor").getEditedPostAttribute("featured_media"),r=t.featured_media||n;return{featuredMedia:r?e("core").getMedia(r):null}}))((function(e){var t=e.featuredMedia,n=e.dimensions,c=e.required,s=Object(l.m)(t,n,c);return s?Object(r.createElement)(a.PluginPrePublishPanel,{title:Object(i.__)("Featured Image","amp"),initialOpen:"true"},Object(r.createElement)(o.Notice,{status:c?"warning":"notice",isDismissible:!1},s.map((function(e,t){return Object(r.createElement)("p",{key:"error-".concat(t)},e)})))):null})),u=n(12),p=(Object(u.createHigherOrderComponent)((function(e){return function(t){var n=t.media,a=Object(l.m)(n,Object(l.f)(),!1);return a?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.Notice,{status:"notice",isDismissible:!1},a.map((function(e,t){return Object(r.createElement)("p",{key:"error-".concat(t)},e)}))),Object(r.createElement)(e,t)):Object(r.createElement)(e,t)}}),"withFeaturedImageNotice"),n(24)),d=n.n(p),f=n(25),m=n.n(f),b=n(26),g=n.n(b),h=n(18),O=n.n(h),y=n(27),v=n.n(y),j=n(6),k=n.n(j),w=n(10),E=n(35),_=window.wp,S=function(e){return function(e){function t(){var e,n;d()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=m()(this,(e=g()(t)).call.apply(e,[this].concat(o))),k()(O()(n),"initFileTypeMedia",(function(){var e=Object(E.c)(E.a),t=n.onSelect,r=Object(w.isEqual)(["video"],n.props.allowedTypes)?"video/mp4":n.props.allowedTypes;n.frame=new e({allowedTypes:n.props.allowedTypes,button:{text:Object(i.__)("Select","amp"),close:!1},states:[new _.media.controller.Library({title:Object(i.__)("Select or Upload Media","amp"),library:_.media.query({type:r}),multiple:!1,date:!1,priority:20})]}),_.media.frame=n.frame,n.frame.on("close",(function(){n.initFileTypeMedia()}),O()(n)),n.frame.on("select",(function(){t&&t(),n.frame.close()}),O()(n))})),("story-background-media"===n.props.id||Object(w.isEqual)(["video/mp4"],n.props.allowedTypes))&&n.initFileTypeMedia(),n}return v()(t,e),t}(e)};n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return S}))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getAnimatedBlocks",(function(){return p})),n.d(r,"getAnimatedBlocksPerPage",(function(){return d})),n.d(r,"getAnimationEntry",(function(){return f})),n.d(r,"getAnimationSuccessors",(function(){return m})),n.d(r,"isPlayingAnimation",(function(){return b})),n.d(r,"isValidAnimationPredecessor",(function(){return g})),n.d(r,"getCurrentPage",(function(){return h})),n.d(r,"getBlockOrder",(function(){return O})),n.d(r,"getBlockIndex",(function(){return y})),n.d(r,"isReordering",(function(){return v})),n.d(r,"getCopiedMarkup",(function(){return j})),n.d(r,"getSettings",(function(){return k}));var o={};n.r(o),n.d(o,"addAnimation",(function(){return S})),n.d(o,"changeAnimationType",(function(){return x})),n.d(o,"changeAnimationDuration",(function(){return P})),n.d(o,"changeAnimationDelay",(function(){return C})),n.d(o,"playAnimation",(function(){return I})),n.d(o,"finishAnimation",(function(){return B})),n.d(o,"stopAnimation",(function(){return A})),n.d(o,"setCurrentPage",(function(){return T})),n.d(o,"startReordering",(function(){return D})),n.d(o,"movePageToPosition",(function(){return N})),n.d(o,"saveOrder",(function(){return R})),n.d(o,"resetOrder",(function(){return M})),n.d(o,"setCopiedMarkup",(function(){return L})),n.d(o,"clearCopiedMarkup",(function(){return F}));var a=n(6),c=n.n(a),i=n(2),l=n(15),s=n.n(l),u=Object.freeze({stopped:1,prepared:2,playing:3,finished:4});function p(e){return e.animations&&e.animations.animationOrder?e.animations.animationOrder:{}}function d(e,t){return p(e)&&p(e)[t]?e.animations.animationOrder[t]:[]}function f(e,t,n){return d(e,t).find((function(e){return e.id===n}))}function m(e,t,n){return d(e,t).filter((function(e){return e.parent===n}))}function b(e,t,n){if(t&&n){var r=f(e,t,n);return!(!r||!r.status)&&r.status!==u.stopped}if(t)return Boolean(d(e,t).find((function(e){var t=e.status;return t&&t!==u.stopped})));for(var o=0,a=Object.keys(p(e));o<a.length;o++){if(b(e,a[o]))return!0}return!1}function g(e,t,n,r){if(e.animations=e.animations||{},e.animations.animationOrder=e.animations.animationOrder||{},void 0===r)return!0;var o=e.animations.animationOrder[t]||[],a=function(e){return o.find((function(t){return t.id===e}))};if(!a(r))return!1;return!function(e,t){for(var n=t;void 0!==n;){if(n===e)return!0;var r=a(n);n=r?r.parent:void 0}return!1}(n,r)}function h(e){return e.currentPage}function O(e){return e.blocks.order||[]}function y(e,t){return e.blocks.order?e.blocks.order.indexOf(t):null}function v(e){return e.blocks.isReordering||!1}function j(e){return e.copiedMarkup||""}function k(e){return e.editorSettings||window.ampStoriesEditorSettings||{}}function w(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(i.combineReducers)({animations:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.predecessor,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))},s=g({animations:e},r,o,a)?a:void 0;return-1!==l(o)?i[l(o)].parent=s:i.push({id:o,parent:s}),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_TYPE":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.animationType,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};if(-1!==l(o)){if(i[l(o)].animationType=a,!a){var s=i[l(o)].parent,u=i.filter((function(e){return e.parent===o}));for(var p in u)-1!==l(p)&&(i[l(p)].parent=s.parent)}}else i.push({id:o,animationType:a});return E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_DURATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.duration,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};return-1!==l(o)&&(i[l(o)].duration=a),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_DELAY":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.delay,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};return-1!==l(o)&&(i[l(o)].delay=a),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"PLAY_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return o?-1!==i(o)&&(a[i(o)].status=u.playing):a.forEach((function(e,t){a[t]=E({},e,{status:void 0===e.parent?u.playing:u.prepared})})),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);case"FINISH_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return-1!==i(o)&&(a[i(o)].status=u.finished),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);case"STOP_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return o?-1!==i(o)&&(a[i(o)].status=u.stopped):a.forEach((function(e,t){a[t]=E({},e,{status:u.stopped})})),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);default:return e}},currentPage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=t.page;switch(t.type){case"SET_CURRENT_PAGE":return n;default:return e}},blocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.order;switch(t.type){case"START_REORDERING":return E({},e,{order:n,isReordering:!0});case"STOP_REORDERING":return E({},e,{isReordering:!1});case"MOVE_PAGE":var r=t.page,o=t.index,a=e.order.indexOf(r),c=s()(e.order);return c.splice.apply(c,[o,0].concat(s()(c.splice(a,1)))),E({},e,{order:c});case"RESET_ORDER":return E({},e,{order:n,isReordering:!1});default:return e}},copiedMarkup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_COPIED_MARKUP":var n=t.markup;return"string"==typeof n?n:e;case"CLEAR_COPIED_MARKUP":return""===e?e:"";default:return e}}});function S(e,t,n){return{type:"ADD_ANIMATION",page:e,item:t,predecessor:n}}function x(e,t,n){return{type:"CHANGE_ANIMATION_TYPE",page:e,item:t,animationType:n}}function P(e,t,n){return{type:"CHANGE_ANIMATION_DURATION",page:e,item:t,duration:n}}function C(e,t,n){return{type:"CHANGE_ANIMATION_DELAY",page:e,item:t,delay:n}}function I(e,t){return{type:"PLAY_ANIMATION",page:e,item:t}}function B(e,t){return{type:"FINISH_ANIMATION",page:e,item:t}}function A(e,t){return{type:"STOP_ANIMATION",page:e,item:t}}function T(e){return{type:"SET_CURRENT_PAGE",page:e}}function D(e){return{type:"START_REORDERING",order:e}}function N(e,t){return{type:"MOVE_PAGE",page:e,index:t}}function R(){return{type:"STOP_REORDERING"}}function M(e){return{type:"RESET_ORDER",order:e}}function L(e){return{type:"SET_COPIED_MARKUP",markup:e}}function F(){return{type:"CLEAR_COPIED_MARKUP"}}var H=n(51),z=n.n(H),W=n(52),q=n.n(W),U=n(10),V=n(3),G={PLAY_ANIMATION:function(e,t){var n=t.getState,r=t.dispatch,o=Object(i.select)("core/block-editor").getBlock,a=n(),c=e.page,l=e.item;if(l){var s=f(a,c,l),u=s.id,p=s.animationType,b=o(u);Object(V.R)(b,p)}else d(a,c).forEach((function(e){var t=e.id,n=e.animationType,r=o(t);Object(V.R)(r,n)}));(l?[f(a,c,l)]:m(a,c,void 0)).forEach((function(e){var t=e.id,n=e.animationType,a=e.duration,i=e.delay,l=o(t);Object(V.U)(l,n,a?parseInt(a):0,i?parseInt(i):0,(function(){return r(B(c,t))}))}))},STOP_ANIMATION:function(e,t){var n=t.getState,r=Object(i.select)("core/block-editor").getBlock,o=n(),a=e.page,c=e.item;(c?[f(o,a,c)]:d(o,a)).forEach((function(e){var t=e.id,n=e.animationType,o=r(t);o&&n&&Object(V.Q)(o,n)}))},FINISH_ANIMATION:function(e,t){var n=t.getState,r=t.dispatch,o=n(),a=e.page,c=e.item;(m(o,a,c).filter((function(e){var t=e.status;return t&&t===u.prepared})).forEach((function(e){r(I(a,e.id))})),d(o,a).find((function(e){var t=e.status;return t&&(t===u.prepared||t===u.playing)})))||d(o,a).forEach((function(e){var t=e.id;r(A(a,t))}))},SET_CURRENT_PAGE:function(e,t){var n=t.getState,r=t.dispatch,o=n();Object.keys(p(o)).forEach((function(e){r(A(e))}))}};var K=function(e){var t,n=[z()(G),q.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=U.flowRight.apply(void 0,s()(t))(e.dispatch),e.dispatch=r,e};function $(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}var Y=Object(i.registerStore)("amp/story",{reducer:_,selectors:r,actions:o,initialState:{animations:{animationOrder:{}},editorSettings:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},window.ampStoriesEditorSettings),blocks:{order:[],isReordering:!1},copiedMarkup:""}});K(Y);t.a=Y},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(80),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){var r=n(47).Symbol;e.exports=r},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,a,c=n[r.type],i=t(r);if(c)for(o=0;o<c.length;o++)(a=c[o](r,e))&&e.dispatch(a);return i}}}).effects=n,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){var r=n(71),o=n(72);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var c=(e=e||{}).random||(e.rng||r)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,t)for(var i=0;i<16;++i)t[a+i]=c[i];return t||o(c)}},function(e,t,n){var r=n(43),o=n(45),a=n(44);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){e.exports=function(e,t){var n,r,o,a=0;function c(){var t,c,i=r,l=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(c=0;c<l;c++)if(i.args[c]!==arguments[c]){i=i.next;continue e}return i!==r&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(t=new Array(l),c=0;c<l;c++)t[c]=arguments[c];return i={args:t,val:e.apply(null,t)},r?(r.prev=i,i.next=r):o=i,a===n?(o=o.prev).next=null:a++,r=i,i.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,a=0},c}},function(e,t,n){var r=n(46),o=n(79),a=n(82),c="Expected a function",i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,p,d,f,m,b=0,g=!1,h=!1,O=!0;if("function"!=typeof e)throw new TypeError(c);function y(t){var n=s,r=u;return s=u=void 0,b=t,d=e.apply(r,n)}function v(e){var n=e-m;return void 0===m||n>=t||n<0||h&&e-b>=p}function j(){var e=o();if(v(e))return k(e);f=setTimeout(j,function(e){var n=t-(e-m);return h?l(n,p-(e-b)):n}(e))}function k(e){return f=void 0,O&&s?y(e):(s=u=void 0,d)}function w(){var e=o(),n=v(e);if(s=arguments,u=this,m=e,n){if(void 0===f)return function(e){return b=e,f=setTimeout(j,t),g?y(e):d}(m);if(h)return clearTimeout(f),f=setTimeout(j,t),y(m)}return void 0===f&&(f=setTimeout(j,t)),d}return t=a(t)||0,r(n)&&(g=!!n.leading,p=(h="maxWait"in n)?i(a(n.maxWait)||0,t):p,O="trailing"in n?!!n.trailing:O),w.cancel=function(){void 0!==f&&clearTimeout(f),b=0,s=m=u=f=void 0},w.flush=function(){return void 0===f?d:k(o())},w}},function(e,t,n){e.exports=n(91)},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";n.r(t);var r=n(11),o=n.n(r),a=n(10),c=n(23),i=n(1),l=n(49),s=n.n(l),u=n(2),p=n(50),d=n(30),f=n(8),m=(n(63),n(40)),b=n(17),g=n(3),h=n(4),O=n(41),y=Object(u.select)("core/block-editor"),v=y.getSelectedBlock,j=y.getBlocksByClientId,k=y.getClientIdsWithDescendants,w=y.getBlockRootClientId,E=y.getBlockOrder,_=y.getBlock,S=y.getBlocks,x=y.getBlockAttributes,P=Object(u.dispatch)("core/block-editor"),C=P.moveBlockToPosition,I=P.updateBlockAttributes,B=Object(u.select)("core/edit-post").isFeatureActive,A=Object(u.dispatch)("core/edit-post").toggleFeature,T=Object(u.select)("amp/story"),D=T.isReordering,N=T.getBlockOrder,R=T.getCurrentPage,M=T.getAnimatedBlocks,L=Object(u.dispatch)("amp/story").setCurrentPage;s()((function(){Object(f.setDefaultBlockName)("amp/amp-story-page");var e=Object(f.getBlockTypes)().filter((function(e){var t=e.name;return!h.a.includes(t)})),t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var c=o.value;Object(f.unregisterBlockType)(c.name)}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}var l=j(k()),s=l.find((function(e){return"amp/amp-story-page"===e.name}));L(s?s.clientId:void 0);var u=!0,p=!1,d=void 0;try{for(var m,b=l[Symbol.iterator]();!(u=(m=b.next()).done);u=!0){var O=m.value;O.attributes.ampFontFamily&&Object(g.C)(O.attributes.ampFontFamily),Object(g.E)(O)}}catch(e){p=!0,d=e}finally{try{u||null==b.return||b.return()}finally{if(p)throw d}}B("fixedToolbar")||A("fixedToolbar"),Object(g.P)();for(var y=0,v=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"];y<v.length;y++){var w=v[y];Object(f.registerBlockStyle)(w,{name:"rounded",label:Object(i.__)("Rounded","amp")})}Object(f.registerBlockStyle)("amp/amp-story-text",{name:"half-rounded",label:Object(i.__)("Half Rounded","amp")}),Object(f.registerBlockStyle)("core/image",{name:"rounded",label:Object(i.__)("Rounded","amp")}),Object(f.registerBlockStyle)("core/quote",{name:"white",label:Object(i.__)("White","amp")}),Object(f.unregisterBlockStyle)("core/quote","large")}));var F,H=E(),z=k();Object(u.subscribe)((function(){Object(g.D)();var e=Object(f.getDefaultBlockName)(),t=v();if(t?"amp/amp-story-page"===t.name&&"amp/amp-story-page"!==e?Object(f.setDefaultBlockName)("amp/amp-story-page"):"amp/amp-story-page"!==t.name&&"amp/amp-story-text"!==e&&Object(f.setDefaultBlockName)("amp/amp-story-text"):"amp/amp-story-page"!==e&&Object(f.setDefaultBlockName)("amp/amp-story-page"),F!==t){var n=document.querySelector(".edit-post-layout");n&&n.setAttribute("data-block-name",t?t.name:"")}F=t;var r=E(),o=r.find((function(e){return!H.includes(e)}));if(H.filter((function(e){return!r.includes(e)})).includes(R())){var a=Math.max(0,H.indexOf(R())-1);L((H=r)[a])}H=r,o&&L(o);var c=!0,i=!1,l=void 0;try{for(var s,u=z[Symbol.iterator]();!(c=(s=u.next()).done);c=!0){var p=s.value;Object(g.G)(p),Object(g.F)(p),Object(g.J)(p),Object(g.I)(p),Object(g.H)(p)}}catch(e){i=!0,l=e}finally{try{c||null==u.return||u.return()}finally{if(i)throw l}}z=k()})),O.a.subscribe((function(){var e=E(),t=N();if(!D()&&t.length>0&&e!==t){var n=!0,r=!1,c=void 0;try{for(var i,l=t.entries()[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var s=o()(i.value,2),u=s[0],p=s[1];C(p,"","",u)}}catch(e){r=!0,c=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw c}}}var d=M(),f=function(e){if(!d.hasOwnProperty(e)||!_(e))return"continue";var t=x(e),n=d[e].filter((function(t){var n=t.id;return e===w(n)})),r=Object(g.w)(n),o=Math.ceil(r/1e3);"time"===t.autoAdvanceAfter?o>t.autoAdvanceAfterDuration&&I(e,{autoAdvanceAfterDuration:o}):I(e,{autoAdvanceAfterDuration:o});var a=!0,c=!1,i=void 0;try{for(var l,s=n[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var u=l.value,p=u.id,f=u.parent,m=u.animationType,b=u.duration,h=u.delay;Object(g.B)(f);var O=f?_(f):void 0;I(p,{ampAnimationAfter:O?O.attributes.anchor:void 0,ampAnimationType:m,ampAnimationDuration:b?"".concat(b,"ms"):void 0,ampAnimationDelay:h?"".concat(h,"ms"):void 0})}}catch(e){c=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw i}}};for(var m in d)f(m);var b,h=S(),O=!0,y=!1,v=void 0;try{for(var j,k=h[Symbol.iterator]();!(O=(j=k.next()).done);O=!0){var P=j.value;b=P,Object(a.has)(b,["attributes","anchor"])&&b.attributes.anchor!==b.clientId&&I(b.clientId,{anchor:b.clientId})}}catch(e){y=!0,v=e}finally{try{O||null==k.return||k.return()}finally{if(y)throw v}}}));var W=n(99);W.keys().forEach((function(e){var t=W(e),n=t.name,r=t.render,o=t.icon,a=t.isActive;(void 0===a||a)&&Object(p.registerPlugin)(n,{render:r,icon:o})})),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/setBlockParent",g.S),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/addAttributes",g.a),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/filterBlockTransforms",g.h),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/deprecateCoreBlocks",g.f),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addStorySettings",b.x),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addPageNumber",b.J),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/contextMenuHandler",b.B),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addEditFeaturedImage",b.E),Object(c.addFilter)("editor.BlockEdit","ampEditorBlocks/addVideoBlockPreview",b.D,9),Object(c.addFilter)("editor.BlockEdit","ampEditorBlocks/withSnapLines",b.L),Object(c.addFilter)("editor.BlockListBlock","ampStoryEditorBlocks/withActivePageState",b.w),Object(c.addFilter)("editor.BlockListBlock","ampStoryEditorBlocks/addWrapperProps",b.N),Object(c.addFilter)("editor.MediaUpload","ampStoryEditorBlocks/addEnforcedFileType",(function(e){return Object(m.b)(e)})),Object(c.addFilter)("editor.MediaUpload","ampStoryEditorBlocks/addCroppedFeaturedImage",(function(e){return Object(b.C)(e,Object(g.p)())})),Object(c.addFilter)("blocks.getSaveContent.extraProps","ampStoryEditorBlocks/addExtraAttributes",g.b),Object(c.addFilter)("blocks.getSaveElement","ampStoryEditorBlocks/wrapBlocksInGridLayer",g.Z),Object(c.addFilter)("blocks.getSaveElement","ampStoryEditorBlocks/addVideoAriaLabel",g.d),Object(c.addFilter)("editor.BlockDropZone","ampStoryEditorBlocks/withStoryBlockDropZone",b.M),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/withCallToActionValidation",b.A),Object(c.addFilter)("blocks.getBlockAttributes","ampStoryEditorBlocks/filterBlockAttributes",g.g);var q=n(104);q.keys().forEach((function(e){var t=q(e),n=t.name,r=t.settings;Object(f.registerBlockType)(n,r)}));var U=n(115);U.keys().sort((function(e,t){return e.priority>t.priority?1:-1})).forEach((function(e){var t=U(e),n=t.name,r=t.settings;Object(d.registerFormatType)(n,r)}))},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}},function(e,t,n){},function(e,t,n){"use strict";var r=n(65);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){!function(){e.exports=this.wp.coreData}()},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(47);e.exports=function(){return r.Date.now()}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(81))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(46),o=n(83),a=NaN,c=/^\s+|\s+#x2F;g,i=/^[-+]0x[0-9a-f]+#x2F;i,l=/^0b[01]+#x2F;i,s=/^0o[0-7]+#x2F;i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?a:+e}},function(e,t,n){var r=n(84),o=n(87),a="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==a}},function(e,t,n){var r=n(48),o=n(85),a=n(86),c="[object Null]",i="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?i:c:l&&l in Object(e)?o(e):a(e)}},function(e,t,n){var r=n(48),o=Object.prototype,a=o.hasOwnProperty,c=o.toString,i=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,i),n=e[i];try{e[i]=void 0;var r=!0}catch(e){}var o=c.call(e);return r&&(t?e[i]=n:delete e[i]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r;window,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=31)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(0),o=n(5),a=n(6),c=n(14),i=n(16),l="prototype",s=function(e,t,n){var u,p,d,f,m=e&s.F,b=e&s.G,g=e&s.S,h=e&s.P,O=e&s.B,y=b?r:g?r[t]||(r[t]={}):(r[t]||{})[l],v=b?o:o[t]||(o[t]={}),j=v[l]||(v[l]={});for(u in b&&(n=t),n)d=((p=!m&&y&&void 0!==y[u])?y:n)[u],f=O&&p?i(d,r):h&&"function"==typeof d?i(Function.call,d):d,y&&c(y,u,d,e&s.U),v[u]!=d&&a(v,u,f),h&&j[u]!=d&&(j[u]=d)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(7),o=n(35);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(8),o=n(33),a=n(34),c=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(t,n){t.exports=e},function(e,t,n){var r=n(2),o=n(0).document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(0),o=n(6),a=n(15),c=n(9)("src"),i="toString",l=Function[i],s=(""+l).split(i);n(5).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,i){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,c)||o(n,c,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:i?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,i,(function(){return"function"==typeof this&&this[c]||l.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(17);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37),o=n(26);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(10),o=n(11);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(19),o=n(22),a=n(38);e.exports=function(e){return function(t,n,c){var i,l=r(t),s=o(l.length),u=a(c,s);if(e&&n!=n){for(;u<s;)if((i=l[u++])!=i)return!0}else for(;u<s;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(23),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){var r=n(25)("keys"),o=n(9);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(5),o=n(0),a="__core-js_shared__",c=o[a]||(o[a]={});(e.exports=function(e,t){return c[e]||(c[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(11);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(25)("wks"),o=n(9),a=n(0).Symbol,c="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=c&&a[e]||(c?a:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(32),n(28),n(45),n(50),n(51),n(52),n(55);var r=n(12),o=c(n(57)),a=c(n(58));function c(e){return e&&e.__esModule?e:{default:e}}function i(){return(i=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 l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s,u={13:"enter",27:"escape",32:"space",38:"up",40:"down"},p=((s=document.createElement("x")).style.cssText="pointer-events:auto","auto"===s.style.pointerEvents);function d(){return!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(e){function t(t){var n;return(n=e.call(this,t)||this).elementReferences={},n.state={focused:null,hovered:null,clicked:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,selected:null},n.handleComponentBlur=n.handleComponentBlur.bind(l(l(n))),n.handleKeyDown=n.handleKeyDown.bind(l(l(n))),n.handleUpArrow=n.handleUpArrow.bind(l(l(n))),n.handleDownArrow=n.handleDownArrow.bind(l(l(n))),n.handleEnter=n.handleEnter.bind(l(l(n))),n.handlePrintableKey=n.handlePrintableKey.bind(l(l(n))),n.handleListMouseLeave=n.handleListMouseLeave.bind(l(l(n))),n.handleOptionBlur=n.handleOptionBlur.bind(l(l(n))),n.handleOptionClick=n.handleOptionClick.bind(l(l(n))),n.handleOptionFocus=n.handleOptionFocus.bind(l(l(n))),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(l(l(n))),n.handleInputBlur=n.handleInputBlur.bind(l(l(n))),n.handleInputChange=n.handleInputChange.bind(l(l(n))),n.handleInputFocus=n.handleInputFocus.bind(l(l(n))),n.pollInputElement=n.pollInputElement.bind(l(l(n))),n.getDirectInputChanges=n.getDirectInputChanges.bind(l(l(n))),n}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.componentDidMount=function(){this.pollInputElement()},n.componentWillUnmount=function(){clearTimeout(this.$pollInput),clearTimeout(this.$blurInput)},n.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){e.pollInputElement()}),100)},n.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},n.componentDidUpdate=function(e,t){var n=this.state,r=n.focused,o=n.clicked,a=null===r,c=t.focused!==r;(c&&!a||null!==o)&&this.elementReferences[r].focus();var i=-1===r,l=c&&null===t.focused;if(i&&l){var s=this.elementReferences[r];s.setSelectionRange(0,s.value.length)}},n.hasAutoselect=function(){return!d()&&this.props.autoselect},n.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},n.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},n.handleComponentBlur=function(e){var t,n=this.state,r=n.options,o=n.query,a=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(r[a])):t=o,this.setState({focused:null,clicked:null,menuOpen:e.menuOpen||!1,query:t,selected:null})},n.handleListMouseLeave=function(e){this.setState({hovered:null})},n.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,o=n.clicked,a=n.menuOpen,c=n.options,i=n.selected,l=null===e.relatedTarget&&null===o,s=e.relatedTarget===this.elementReferences[-1],u=r!==t&&-1!==r;if(!u&&l||!u&&!s){var p=a&&d();this.handleComponentBlur({menuOpen:p,query:this.templateInputValue(c[i])})}},n.handleInputBlur=function(e){var t=this,n=this.state,r=n.focused,o=n.menuOpen,a=n.options,c=n.query,i=n.selected,l=-1!==r;if(clearTimeout(this.$blurInput),!l){var s=o&&d(),u=d()?c:this.templateInputValue(a[i]);this.$blurInput=setTimeout((function(){return t.handleComponentBlur({menuOpen:s,query:u})}),200)}},n.handleInputChange=function(e){var t=this,n=this.props,r=n.minLength,o=n.source,a=n.showAllValues,c=this.hasAutoselect(),i=e.target.value,l=0===i.length,s=this.state.query.length!==i.length,u=i.length>=r;this.setState({query:i}),a||!l&&s&&u?o(i,(function(e){var n=0<e.length;t.setState({menuOpen:n,options:e,selected:c&&n?0:-1})})):!l&&u||this.setState({menuOpen:!1,options:[]})},n.handleInputClick=function(e){this.handleInputChange(e)},n.handleInputFocus=function(e){this.setState({focused:-1})},n.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},n.handleOptionMouseEnter=function(e,t){d()||this.setState({hovered:t})},n.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);clearTimeout(this.$blurInput),this.props.onConfirm(n),this.setState({focused:-1,clicked:t,hovered:null,menuOpen:!1,query:r,selected:-1}),this.forceUpdate()},n.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},n.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",(function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,a=n.selected;a!==o.length-1&&r&&this.handleOptionFocus(a+1)}},n.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",(function(e){t.setState({menuOpen:!0,options:e})}))),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},n.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},n.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},n.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},n.render=function(){var e,t=this,n=this.props,a=n.cssNamespace,c=n.displayMenu,l=n.id,s=n.minLength,u=n.name,d=n.placeholder,f=n.required,m=n.showAllValues,b=n.tNoResults,g=n.tStatusQueryTooShort,h=n.tStatusNoResults,O=n.tStatusSelectedOption,y=n.tStatusResults,v=n.dropdownArrow,j=this.state,k=j.focused,w=j.hovered,E=j.menuOpen,_=j.options,S=j.query,x=j.selected,P=this.hasAutoselect(),C=-1===k,I=0===_.length,B=0!==S.length,A=S.length>=s,T=this.props.showNoOptionsFound&&C&&I&&B&&A,D=a+"__wrapper",N=a+"__input",R=null!==k?" "+N+"--focused":"",M=this.props.showAllValues?" "+N+"--show-all-values":" "+N+"--default",L=a+"__dropdown-arrow-down",F=-1!==k&&null!==k,H=a+"__menu",z=H+"--"+c,W=H+"--"+(E||T?"visible":"hidden"),q=a+"__option",U=a+"__hint",V=this.templateInputValue(_[x]),G=V&&0===V.toLowerCase().indexOf(S.toLowerCase())&&P?S+V.substr(S.length):"",K=p&&G;return m&&"string"==typeof(e=v({className:L}))&&(e=(0,r.createElement)("div",{className:a+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,r.createElement)("div",{className:D,onKeyDown:this.handleKeyDown,role:"combobox","aria-expanded":E?"true":"false"},(0,r.createElement)(o.default,{length:_.length,queryLength:S.length,minQueryLength:s,selectedOption:this.templateInputValue(_[x]),selectedOptionIndex:x,tQueryTooShort:g,tNoResults:h,tSelectedOption:O,tResults:y}),K&&(0,r.createElement)("span",null,(0,r.createElement)("input",{className:U,readonly:!0,tabIndex:"-1",value:G})),(0,r.createElement)("input",i({"aria-activedescendant":!!F&&l+"__option--"+k,"aria-owns":l+"__listbox",autoComplete:"off",className:""+N+R+M,id:l,onClick:function(e){return t.handleInputClick(e)},onBlur:this.handleInputBlur},function(e){return{onChange:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:u,placeholder:d,ref:function(e){t.elementReferences[-1]=e},type:"text",role:"textbox",required:f,value:S})),e,(0,r.createElement)("ul",{className:H+" "+z+" "+W,onMouseLeave:function(e){return t.handleListMouseLeave(e)},id:l+"__listbox",role:"listbox"},_.map((function(e,n){var o=(-1===k?x===n:k===n)&&null===w?" "+q+"--focused":"",a=n%2?" "+q+"--odd":"";return(0,r.createElement)("li",{"aria-selected":k===n,className:""+q+o+a,dangerouslySetInnerHTML:{__html:t.templateSuggestion(e)},id:l+"__option--"+n,key:n,onBlur:function(e){return t.handleOptionBlur(e,n)},onClick:function(e){return t.handleOptionClick(e,n)},onMouseEnter:function(e){return t.handleOptionMouseEnter(e,n)},ref:function(e){t.elementReferences[n]=e},role:"option",tabIndex:"-1"})})),T&&(0,r.createElement)("li",{className:q+" "+q+"--no-results"},b())))},t}(r.Component);(t.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},dropdownArrow:a.default}},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(36)})},function(e,t,n){e.exports=!n(3)&&!n(4)((function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(18),o=n(40),a=n(41),c=n(27),i=n(10),l=Object.assign;e.exports=!l||n(4)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=c(e),l=arguments.length,s=1,u=o.f,p=a.f;s<l;)for(var d,f=i(arguments[s++]),m=u?r(f).concat(u(f)):r(f),b=m.length,g=0;g<b;)p.call(f,d=m[g++])&&(n[d]=f[d]);return n}:l},function(e,t,n){var r=n(15),o=n(19),a=n(21)(!1),c=n(24)("IE_PROTO");e.exports=function(e,t){var n,i=o(e),l=0,s=[];for(n in i)n!=c&&r(i,n)&&s.push(n);for(;t.length>l;)r(i,n=t[l++])&&(~a(s,n)||s.push(n));return s}},function(e,t,n){var r=n(23),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(8),o=n(43),a=n(26),c=n(24)("IE_PROTO"),i=function(){},l="prototype",s=function(){var e,t=n(13)("iframe"),r=a.length;for(t.style.display="none",n(44).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s[l][a[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(i[l]=r(e),n=new i,i[l]=null,n[c]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(7),o=n(8),a=n(18);e.exports=n(3)?Object.defineProperties:function(e,t){o(e);for(var n,c=a(t),i=c.length,l=0;l<i;)r.f(e,n=c[l++],t[n]);return e}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r=n(1),o=n(46)(1);r(r.P+r.F*!n(30)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(16),o=n(10),a=n(27),c=n(22),i=n(47);e.exports=function(e,t){var n=1==e,l=2==e,s=3==e,u=4==e,p=6==e,d=5==e||p,f=t||i;return function(t,i,m){for(var b,g,h=a(t),O=o(h),y=r(i,m,3),v=c(O.length),j=0,k=n?f(t,v):l?f(t,0):void 0;j<v;j++)if((d||j in O)&&(g=y(b=O[j],j,h),e))if(n)k[j]=g;else if(g)switch(e){case 3:return!0;case 5:return b;case 6:return j;case 2:k.push(b)}else if(u)return!1;return p?-1:s||u?u:k}}},function(e,t,n){var r=n(48);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(2),o=n(49),a=n(29)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(20);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(1),o=n(21)(!1),a=[].indexOf,c=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(c||!n(30)(a)),"Array",{indexOf:function(e){return c?a.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(7).f,o=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(53)})},function(e,t,n){"use strict";var r=n(17),o=n(2),a=n(54),c=[].slice,i={};e.exports=Function.bind||function(e){var t=r(this),n=c.call(arguments,1),l=function(){var r=n.concat(c.call(arguments));return this instanceof l?function(e,t,n){if(!(t in i)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";i[t]=Function("F,a","return new F("+r.join(",")+")")}return i[t](e,n)}(t,r.length,r):a(t,r,e)};return o(t.prototype)&&(l.prototype=t.prototype),l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(56)("match",1,(function(e,t,n){return[function(n){"use strict";var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]}))},function(e,t,n){"use strict";var r=n(6),o=n(14),a=n(4),c=n(11),i=n(29);e.exports=function(e,t,n){var l=i(e),s=n(c,l,""[e]),u=s[0],p=s[1];a((function(){var t={};return t[l]=function(){return 7},7!=""[e](t)}))&&(o(String.prototype,e,u),r(RegExp.prototype,l,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(28);var r=n(12),o=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={bump:!1},t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){e.queryLength!==this.props.queryLength&&this.setState((function(e){return{bump:!e.bump}}))},n.render=function(){var e,t=this.props,n=t.length,o=t.queryLength,a=t.minQueryLength,c=t.selectedOption,i=t.selectedOptionIndex,l=t.tQueryTooShort,s=t.tNoResults,u=t.tSelectedOption,p=t.tResults,d=this.state.bump,f=o<a,m=0===n,b=c?u(c,n,i):"";return e=f?l(a):m?s():p(n,b),(0,r.createElement)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},e,(0,r.createElement)("span",null,d?",":",,"))},t}(r.Component);(t.default=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results."},tNoResults:function(){return"No search results."},tSelectedOption:function(e,t,n){return e+" ("+(n+1)+" of "+t+") is selected."},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(12);t.default=function(e){var t=e.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))}}])},e.exports=r(n(22))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r={"./export.js":100,"./pre-publish-panel.js":101,"./story-settings-panel.js":102,"./template-menu-item.js":103};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=99},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return f})),n.d(t,"icon",(function(){return m})),n.d(t,"render",(function(){return g}));var r=n(0),o=n(10),a=(n(22),n(31)),c=n(2),i=n(1),l=window,s=l.ampStoriesExport,u=l.fetch,p=l.FormData,d=l.URL,f="amp-story-export",m="media-archive",b=function(){var e=Object(c.useDispatch)("core/notices"),t=e.createErrorNotice,n=e.createSuccessNotice,l=e.removeNotice,f=Object(c.useSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostId;return{hasPublishAction:Object(o.get)(n(),["_links","wp:action-publish"],!1),postId:r()}}),[]),m=f.hasPublishAction,b=f.postId;if(!m)return null;var g="amp-story-export__success-snackbar",h="amp-story-export__error-notice",O=Object(i.__)("Could not generate story archive.","amp"),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l(g),t(e?e.message:O,{id:h})};return Object(r.createElement)(a.PluginMoreMenuItem,{onClick:function(){var e=new p;e.append("action",s.action),e.append("_wpnonce",s.nonce),e.append("post_ID",b),l(h),n(Object(i.__)("Generating story archive…","amp"),{id:g,type:"snackbar"}),u(s.ajaxUrl,{method:"POST",body:e}).then((function(e){e.ok?e.blob().then((function(t){var n=(e.headers.get("Content-Disposition")||"").match(/"(.*?)"/);if(n){l(g);var r=document.createElement("a"),o=d.createObjectURL(t);r.addEventListener("click",(function e(){setTimeout((function(){d.revokeObjectURL(o),r.removeEventListener("click",e)}),150)}),!1),r.href=o,r.download=n[1],r.click()}else y()})).catch(y):e.json().then((function(e){y(e.data&&e.data.errorMessage?new Error(e.data.errorMessage):null)})).catch(y)})).catch(y)}},Object(i.__)("Export Story","amp"))},g=function(){return Object(r.createElement)(b,null)}},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return c})),n.d(t,"render",(function(){return i}));var r=n(0),o=n(40),a=n(3),c="amp-story-pre-publish-panel",i=function(){return Object(r.createElement)(o.a,{dimensions:Object(a.p)(),required:!0})}},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return m})),n.d(t,"icon",(function(){return b})),n.d(t,"render",(function(){return g}));var r=n(6),o=n.n(r),a=n(0),c=n(31),i=n(1),l=n(2),s=n(5),u=n(3);function p(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){var e=Object(l.useSelect)((function(e){var t=e("core/editor").getEditedPostAttribute,n=(0,e("amp/story").getSettings)().storySettings;return{meta:t("meta"),autoAdvanceAfterOptions:n.autoAdvanceAfterOptions||{}}}),[]),t=e.meta,n=e.autoAdvanceAfterOptions,r=Object(l.useDispatch)("core/editor").editPost,o=Object(a.useCallback)((function(e){r({meta:d({},t,{},e)})}),[t,r]),c=Object(u.M)(t),p=c.autoAdvanceAfter,f=c.autoAdvanceAfterDuration,m=n.find((function(e){return e.value===p}))||{};return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(i.__)("These settings are applied to new pages.","amp")),Object(a.createElement)(s.SelectControl,{label:Object(i.__)("Advance to next page","amp"),help:m.description||"",value:p,options:n,onChange:function(e){return o({amp_story_auto_advance_after:e})},className:"amp-story-settings-advance-after"}),"time"===p&&Object(a.createElement)(s.RangeControl,{label:Object(i.__)("Time in seconds","amp"),value:f?parseInt(f):0,onChange:function(e){return o({amp_story_auto_advance_after_duration:e})},min:0,max:100,className:"amp-story-settings-advance-after-duration"}))},m="amp-story-settings-panel",b="book",g=function(){return Object(a.createElement)(c.PluginDocumentSettingPanel,{name:m,className:m,title:Object(i.__)("Story Settings","amp")},Object(a.createElement)(f,null))}},function(e,t,n){"use strict";n.r(t),n.d(t,"isActive",(function(){return u})),n.d(t,"name",(function(){return p})),n.d(t,"render",(function(){return d}));var r=n(0),o=n(31),a=n(1),c=n(2),i=n(8),l=n(10),s=function(){var e=Object(c.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlock,r=Object(c.dispatch)("core/block-editor"),o=r.__experimentalReceiveReusableBlocks,s=r.__experimentalSaveReusableBlock,u=n(t());if("amp/amp-story-page"===u.name){var p=Object(i.cloneBlock)(u),d={id:Object(l.uniqueId)("reusable"),clientId:p.clientId,title:Object(a.__)("Template","amp")};o([{reusableBlock:d,parsedBlock:p}]),s(d.id)}},u=!1,p="amp-story",d=function(){return Object(r.createElement)(o.PluginBlockSettingsMenuItem,{allowedBlocks:["amp/amp-story-page"],icon:"welcome-add-page",label:Object(a.__)("Save as Template","amp"),role:"menuitem",onClick:s})}},function(e,t,n){var r={"./amp-story-cta/index.js":120,"./amp-story-page-attachment/index.js":119,"./amp-story-page/index.js":118,"./amp-story-post-author/index.js":108,"./amp-story-post-date/index.js":110,"./amp-story-post-title/index.js":112,"./amp-story-text/index.js":121};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=104},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return l})),n.d(t,"settings",(function(){return s}));var r=n(6),o=n.n(r),a=n(1),c=n(3);n(109);function i(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}var l="amp/amp-story-post-author",s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(a.__)("Story Author","amp"),description:Object(a.__)("Display the name of the story’s author. Modify by changing the author in the document settings.","amp"),category:"common",icon:"admin-users",keywords:[Object(a.__)("post","amp"),Object(a.__)("author","amp"),Object(a.__)("name","amp"),Object(a.__)("byline","amp")]},Object(c.o)({tagName:"div",attribute:"author",isEditable:!1}))},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return l})),n.d(t,"settings",(function(){return s}));var r=n(6),o=n.n(r),a=n(1),c=n(3);n(111);function i(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}var l="amp/amp-story-post-date",s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(a.__)("Story Date","amp"),description:Object(a.__)("Display the publish date of the story. Modify by changing the date in the document settings.","amp"),category:"common",icon:"clock",keywords:[Object(a.__)("publish date","amp")]},Object(c.o)({tagName:"div",attribute:"date",isEditable:!1}))},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return s})),n.d(t,"settings",(function(){return u}));var r=n(6),o=n.n(r),a=n(0),c=n(1),i=n(3);n(113);function l(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}var s="amp/amp-story-post-title",u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(c.__)("Story Title","amp"),description:Object(c.__)("Display the story title. Modify by changing the overall title of the document.","amp"),category:"common",icon:Object(a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{d:"M5 4v3h5.5v12h3V7H19V4z"}),Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"})),keywords:[Object(c.__)("post","amp"),Object(c.__)("title","amp")]},Object(i.o)({tagName:"h1",attribute:"title",placeholder:Object(c.__)("Add story title…","amp"),isEditable:!0}))},function(e,t,n){},function(e,t,n){},function(e,t,n){var r={"./background-color/index.js":122,"./text-color/index.js":123};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=115},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=(n(22),n(1)),a=n(8),c=n(6),i=n.n(c),l=(n(9),n(7)),s=n(3),u=n(4);function p(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}var d=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{anchor:{source:"attribute",selector:"amp-story-page",attribute:"id"},mediaAlt:{type:"string"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:'amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',attribute:"src"},mediaType:{type:"string"},poster:{type:"string"},focalPoint:{type:"object"},autoAdvanceAfter:{type:"string"},autoAdvanceAfterDuration:{type:"number"},autoAdvanceAfterMedia:{type:"string"},backgroundColors:{default:"[]"},overlayOpacity:{default:100}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,o=n.anchor,a=n.focalPoint,c=n.overlayOpacity,i=n.mediaUrl,p=n.mediaType,d=n.poster,f=n.autoAdvanceAfter,m=n.autoAdvanceAfterDuration,b=n.autoAdvanceAfterMedia,g=JSON.parse(n.backgroundColors);["auto","time"].includes(f)&&m?t=parseInt(m)+"s":"media"===f&&(t=b);var h={};0<g.length&&((h=Object(s.c)(h,g)).opacity=c/100);var O={objectPosition:u.p===p&&a?"".concat(100*a.x,"% ").concat(100*a.y,"%"):"initial"};return Object(r.createElement)("amp-story-page",{style:{backgroundColor:"#ffffff"},id:o,"auto-advance-after":t},i&&Object(r.createElement)("amp-story-grid-layer",{template:"fill"},u.p===p&&Object(r.createElement)("amp-img",{layout:"fill",src:i,style:O}),u.C===p&&Object(r.createElement)("amp-video",{layout:"fill",src:i,poster:d,muted:!0,autoplay:!0,loop:!0})),Object(r.createElement)("amp-story-grid-layer",{template:"fill",style:h}),Object(r.createElement)(l.InnerBlocks.Content,null))}}],f=n(11),m=n.n(f),b=n(15),g=n.n(b),h=n(2),O=n(60);var y=Object(h.withDispatch)((function(e,t,n){var r=n.select,o=r("core/block-editor"),c=o.getBlocksByClientId,i=o.getSelectedBlockClientIds,l=o.hasMultiSelection,u=r("amp/story").getCurrentPage,p=e("amp/story"),d=p.clearCopiedMarkup,f=p.setCopiedMarkup,m=e("core/block-editor"),b=m.removeBlock,g=m.selectBlock;return{onCopy:function(e){var t=i();if(0!==t.length)if(l()||!Object(O.documentHasSelection)()){var n=!0,r=!1,o=void 0;try{for(var p,m=t[Symbol.iterator]();!(n=(p=m.next()).done);n=!0){var h=p.value;if(Object(s.A)(h))return void d()}}catch(e){r=!0,o=e}finally{try{n||null==m.return||m.return()}finally{if(r)throw o}}var y=c(t),v=Object(a.serialize)(y),j="cut"===e.type;f(v).then((function(){if(Object(s.e)(v),j){var e=u(),n=!0,r=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var i=a.value;g(e),b(i)}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}}))}else d();else d()}}}))((function(e){var t=e.children,n=e.onCopy,o=e.clientId,c=e.isSelected,i=Object(h.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSettings,r=t.getBlockOrder;return{canUserUseUnfilteredHTML:n().__experimentalCanUserUseUnfilteredHTML,getCopiedMarkupState:e("amp/story").getCopiedMarkup,blocksOnPage:r(o)}}),[o]),l=i.canUserUseUnfilteredHTML,u=i.getCopiedMarkupState,p=i.blocksOnPage,d=Object(h.useDispatch)("core/block-editor").insertBlock,f=Object(s.X)(),m=Object(s.W)();return Object(r.createElement)("div",{onCopy:n,onPaste:function(e){if(c){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){n=u(),r=u()}}e.preventDefault();var i=Object(a.pasteHandler)({HTML:r,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:l});o&&i.length&&i.forEach((function(e){f(e.name,o)?d(e,p.length,o):m(e.name)}))}},onCut:n},t)})),v=(n(107),n(5)),j=function(e){var t=e.backgroundColors,n=e.setAttributes,a=e.overlayOpacity,c=e.hasMedia,i=t.some((function(e){return e&&Object.values(e).some(Boolean)})),s=function(e,r){t[r]={color:e},n({backgroundColors:JSON.stringify(t),overlayOpacity:!i&&100===a&&c?50:a})};return Object(r.createElement)(l.PanelColorSettings,{title:Object(o.__)("Color Settings","amp"),colorSettings:function(){if(!t.length)return[{value:void 0,onChange:function(e){s(e,0)},label:Object(o.__)("Background Color","amp")}];var e=[],n=t.length>1;return t.forEach((function(t,r){e[r]={value:t?t.color:void 0,onChange:function(e){s(e,r)},
28
/* translators: %s: color number */
29
- label:n?Object(o.sprintf)(Object(o.__)("Color %s","amp"),r+1):Object(o.__)("Background Color","amp")}})),e}()},Object(r.createElement)("p",null,t.length<2&&Object(r.createElement)(v.Button,{onClick:function(){return s(null,1)},isSmall:!0},Object(o.__)("Add Gradient","amp")),t.length>1&&Object(r.createElement)(v.Button,{onClick:function(){return e=t.length-1,t.splice(e,1),void n({backgroundColors:JSON.stringify(t)});var e},isLink:!0,isDestructive:!0},Object(o.__)("Remove Gradient","amp"))),i&&Object(r.createElement)(v.RangeControl,{label:Object(o.__)("Opacity","amp"),value:a,onChange:function(e){return n({overlayOpacity:e})},min:0,max:100,step:5,required:!0}))},k=function(e){var t=e.autoAdvanceAfter,n=e.autoAdvanceAfterDuration,a=e.autoAdvanceAfterOptions,c=e.setAttributes,i=e.clientId,l=Object(h.useSelect)((function(e){var t=e("core/block-editor").getBlockRootClientId,n=((0,e("amp/story").getAnimatedBlocks)()[i]||[]).filter((function(e){var n=e.id;return i===t(n)})),r=Object(s.w)(n);return Math.ceil(r/1e3)}),[i]),u=a.find((function(e){return e.value===t}))||{};return Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Page Settings","amp")},Object(r.createElement)(v.SelectControl,{label:Object(o.__)("Advance to next page","amp"),help:u.description||"",value:t,options:a,onChange:function(e){c({autoAdvanceAfter:e}),"auto"===e&&c({autoAdvanceAfterDuration:l})}}),"time"===t&&Object(r.createElement)(v.RangeControl,{label:Object(o.__)("Time in seconds","amp"),value:n?parseInt(n):0,onChange:function(e){return c({autoAdvanceAfterDuration:e})},min:Math.max(l,1),initialPosition:l,help:l>1?Object(o.__)("A minimum time is enforced because there are animated blocks on this page.","amp"):void 0}))},w=n(10),E=n(13),_=n.n(E),S=n(14),x=n(20),P=function(e){var t=e.allowedBackgroundMediaTypes,n=e.media,a=e.mediaId,c=e.mediaType,i=e.mediaAlt,p=e.mediaUrl,d=e.poster,f=e.focalPoint,b=e.videoFeaturedImage,g=e.setAttributes,h=Object(r.createElement)("p",null,Object(o.__)("To edit the background image or video, you need permission to upload media.","amp")),O=u.C===c&&Object(S.j)(Object(S.h)(n)),y=u.C===c?Object(S.h)(n):null,j=Object(r.useState)(!1),k=m()(j,2),E=k[0],P=k[1];return Object(r.useEffect)((function(){u.C===c&&(d||(b?g({poster:b.source_url}):!n||n.featured_media||E||(P(!0),Object(s.V)({id:a,src:p}).then((function(e){g({poster:Object(s.t)(e)}),P(!1)})).catch((function(){return P(!1)})))))}),[n,a,c,p,d,b,E,g]),Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Background Media","amp")},Object(r.createElement)(r.Fragment,null,O&&Object(r.createElement)(v.Notice,{status:"warning",isDismissible:!1},Object(o.sprintf)(
30
/* translators: %d: the number of recommended megabytes per second */
31
- Object(o.__)("A video size of less than %d MB per second is recommended.","amp"),x.g),y&&" "+Object(o.sprintf)(
32
/* translators: %d: the number of actual megabytes per second */
33
- Object(o.__)("The selected video is %d MB per second.","amp"),Math.round(y/x.d))),Object(r.createElement)(v.BaseControl,null,Object(r.createElement)(l.MediaUploadCheck,{fallback:h},Object(r.createElement)(l.MediaUpload,{onSelect:function(e){var t=Object(s.O)(e);g(t)},allowedTypes:t,value:a,render:function(e){var t=e.open;return Object(r.createElement)(v.Button,{isDefault:!0,isLarge:!0,onClick:t,className:"editor-amp-story-page-background"},p?Object(o.__)("Change Media","amp"):Object(o.__)("Select Media","amp"))},id:"story-background-media"}),p&&Object(r.createElement)(v.Button,{onClick:function(){return g({mediaUrl:void 0,mediaId:void 0,mediaType:void 0})},isLink:!0,isDestructive:!0},Object(o._x)("Remove","background media","amp")))),u.C===c&&(!E||d)&&Object(r.createElement)(l.MediaUploadCheck,null,Object(r.createElement)(v.BaseControl,{id:"editor-amp-story-page-poster",label:Object(o.__)("Poster Image","amp"),help:Object(o.sprintf)(
34
/* translators: 1: 720p. 2: 720w. 3: 1280h */
35
- Object(o.__)("The recommended dimensions for a poster image are: %1$s (%2$s x %3$s)","amp"),"720p","720w","1080h")},!d&&Object(r.createElement)(v.Notice,{status:"error",isDismissible:!1},Object(o.__)("A poster image must be set.","amp")),Object(r.createElement)(l.MediaUpload,{title:Object(o.__)("Select Poster Image","amp"),onSelect:function(e){var t=Object(w.has)(e,["sizes",u.q,"url"])?e.sizes[u.q].url:e.url;g({poster:t})},allowedTypes:u.u,modalClass:"editor-amp-story-background-video-poster__media-modal",render:function(e){var t=e.open;return Object(r.createElement)(v.Button,{id:"editor-amp-story-page-poster",className:_()("editor-amp-story-page-background",{"editor-post-featured-image__toggle":!d,"editor-post-featured-image__preview":d}),onClick:t,"aria-label":d?Object(o.__)("Replace Poster Image","amp"):null},d&&Object(r.createElement)(v.ResponsiveWrapper,{naturalWidth:960,naturalHeight:1280},Object(r.createElement)("img",{src:d,alt:""})),!d&&Object(o.__)("Set Poster Image","amp"))}}))),u.p===c&&p&&v.FocalPointPicker&&Object(r.createElement)(v.FocalPointPicker,{label:Object(o.__)("Focal Point Picker","amp"),url:p,value:f,onChange:function(e){return g({focalPoint:e})}}),c&&Object(r.createElement)(v.TextControl,{label:Object(o.__)("Assistive Text","amp"),help:Object(o.__)("This text is used to inform visually impaired users about the background content.","amp"),value:i,onChange:function(e){return g({mediaAlt:e})}})))},C=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M15 15H5V5h10v10z"}))};C.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20"};var I=function(e){var t=e.clientId,n=Object(h.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("amp/story").getAnimatedBlocksPerPage;return{isPlayingAnimation:e("amp/story").isPlayingAnimation(t),animatedBlocks:r(t).filter((function(e){var t=e.id;return e.animationType&&n(t)}))}}),[t]),a=n.isPlayingAnimation,c=n.animatedBlocks,i=Object(h.useDispatch)("amp/story"),l=i.playAnimation,s=i.stopAnimation,u=Object(r.useCallback)((function(){return l(t)}),[t,l]),p=Object(r.useCallback)((function(){return s(t)}),[t,s]);if(!c.length)return null;var d=a?Object(o.__)("Stop All Animations","amp"):Object(o.sprintf)(Object(o._n)("Play %s Animation","Play %s Animations",c.length,"amp"),c.length);return Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Animation","amp")},Object(r.createElement)(v.IconButton,{icon:a?C({width:20,height:20}):"controls-play",className:"is-button is-default",onClick:a?p:u},d))},B=function(e){var t=e.clientId,n=Object(h.useDispatch)("core/block-editor").removeBlock,a=Object(h.useSelect)((function(e){return e("core/block-editor").getBlockOrder()}),[]),c=Object(r.useCallback)((function(){return n(t)}),[t,n]);return a.length<2?null:Object(r.createElement)(v.PanelBody,{className:"editor-amp-story-remove-page"},Object(r.createElement)(v.Button,{isLink:!0,isDestructive:!0,onClick:c},Object(o.__)("Remove","amp")))},A=function(e){var t=e.attributes,n=e.clientId,a=e.isSelected,c=e.setAttributes,p=t.anchor,d=t.mediaId,f=t.mediaType,b=t.mediaUrl,O=t.mediaAlt,v=t.focalPoint,w=void 0===v?{x:.5,y:.5}:v,E=t.overlayOpacity,_=t.poster,S=t.autoAdvanceAfter,x=t.autoAdvanceAfterDuration,C=t.backgroundColors,A=Object(h.useDispatch)("core/block-editor"),T=A.moveBlockToPosition,D=A.removeBlocks,N=Object(h.useDispatch)("core/notices").createErrorNotice,R=Object(h.useSelect)((function(e){var t,r=e("core").getMedia,o=e("core/block-editor"),a=o.getBlockOrder,c=o.getBlocksByClientId,i=e("amp/story").getSettings,l=d?r(d):void 0;u.C===f&&l&&l.featured_media&&!_&&(t=r(l.featured_media));var p=(0,e("core/editor").getEditedPostAttribute)("meta")||{},m=i().storySettings,b=a(n);return{media:l,videoFeaturedImage:t,immovableBlocks:c(b).filter((function(e){var t=e.name;return!u.c.includes(t)})),pagesOrder:a(),childrenOrder:b,storySettingsAttributes:Object(s.M)(p),autoAdvanceAfterOptions:m.autoAdvanceAfterOptions,allowedVideoMimeTypes:i().allowedVideoMimeTypes}}),[n,d,f,_]),M=R.media,L=R.videoFeaturedImage,F=R.pagesOrder,H=R.childrenOrder,z=R.immovableBlocks,W=R.storySettingsAttributes,q=R.autoAdvanceAfterOptions,U=R.allowedVideoMimeTypes,V=[u.p].concat(g()(U)),G=!(0===F.indexOf(n))&&!Object(s.l)(n)&&!Object(s.q)(n),K=!Object(s.l)(n)&&!Object(s.q)(n),$=u.c;G&&($=[].concat(g()($),["amp/amp-story-cta"])),K&&($=[].concat(g()($),["amp/amp-story-page-attachment"])),Object(r.useEffect)((function(){p||c({anchor:Object(s.x)()})}),[p,c]),Object(r.useEffect)((function(){W&&Object.entries(W).forEach((function(e){var n=m()(e,2),r=n[0],o=n[1];t.hasOwnProperty(r)||c(i()({},r,o))}))}),[W,c,t]);var Y=Object(r.useRef)();Object(r.useEffect)((function(){Y.current&&Y.current.load()}),[f,b]),Object(r.useEffect)((function(){if(z.length>1){var e=z.slice(0,-1).map((function(e){return e.clientId}));D(e),N(Object(o.__)("Action canceled. Only one block of this type is allowed per page.","amp"),{type:"snackbar",isDismissible:!0})}}),[H,n,N,z,D]),Object(r.useEffect)((function(){if(!(H.length<=1)&&1===z.length){var e=z[0];H[H.length-1]!==e.clientId&&T(e.clientId,n,n,H.length-1)}}),[H,n,T,z]);var X={backgroundImage:u.p===f&&b?"url(".concat(b,")"):void 0,backgroundPosition:u.p===f?"".concat(100*w.x,"% ").concat(100*w.y,"%"):void 0,backgroundRepeat:"no-repeat",backgroundSize:"cover"};u.C===f&&_&&(X.backgroundImage="url(".concat(_,")"));var Q={width:"100%",height:"100%",position:"absolute"},J=JSON.parse(C);return(Q=Object(s.c)(Q,J)).opacity=E/100,Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)(B,{clientId:n}),Object(r.createElement)(j,{backgroundColors:J,setAttributes:c,overlayOpacity:E,hasMedia:Boolean(b)}),Object(r.createElement)(P,{allowedBackgroundMediaTypes:V,media:M,mediaId:d,mediaType:f,mediaAlt:O,mediaUrl:b,poster:_,focalPoint:w,videoFeaturedImage:L,setAttributes:c}),Object(r.createElement)(k,{autoAdvanceAfter:S,autoAdvanceAfterDuration:x,autoAdvanceAfterOptions:q,clientId:n,setAttributes:c}),Object(r.createElement)(I,{clientId:n})),Object(r.createElement)(y,{clientId:n,isSelected:a},Object(r.createElement)("div",{style:X},u.C===f&&M&&Object(r.createElement)("div",{className:"editor-amp-story-page-video-wrap"},Object(r.createElement)("video",{autoPlay:!0,muted:!0,loop:!0,className:"editor-amp-story-page-video",poster:_,ref:Y},Object(r.createElement)("source",{src:b,type:M.mime_type}))),J.length>0&&Object(r.createElement)("div",{style:Q}),Object(r.createElement)(l.InnerBlocks,{allowedBlocks:$}))))},T=function(e){var t,n=e.attributes,o=n.anchor,a=n.focalPoint,c=n.overlayOpacity,i=n.mediaId,p=n.mediaUrl,d=n.mediaType,f=n.mediaAlt,m=n.poster,b=n.autoAdvanceAfter,g=n.autoAdvanceAfterDuration,h=n.autoAdvanceAfterMedia,O=JSON.parse(n.backgroundColors);["auto","time"].includes(b)&&g?t=parseInt(g)+"s":"media"===b&&(t=h);var y={};0<O.length&&((y=Object(s.c)(y,O)).opacity=c/100);var v=u.p===d&&a?"".concat(100*a.x,"% ").concat(100*a.y,"%"):"initial";return Object(r.createElement)("amp-story-page",{style:{backgroundColor:"#ffffff"},id:o,"auto-advance-after":t},p&&Object(r.createElement)("amp-story-grid-layer",{template:"fill"},u.p===d&&Object(r.createElement)("img",{layout:"fill",src:p,alt:f,className:i?"wp-image-".concat(i):null,"object-position":v}),u.C===d&&Object(r.createElement)("amp-video",{layout:"fill","aria-label":f,src:p,poster:m,muted:!0,autoplay:!0,loop:!0})),Object(r.createElement)("amp-story-grid-layer",{template:"fill",style:y}),Object(r.createElement)(l.InnerBlocks.Content,null))};n.d(t,"name",(function(){return N})),n.d(t,"settings",(function(){return R}));var D=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{fill:"#181D21"},Object(r.createElement)("path",{d:"M18.4 21H5.6V3h7.8l5 4.9V21zM7.1 19.5h9.8V8.6l-4-4.1H7.1v15z"}),Object(r.createElement)("path",{d:"M11.5 5.4v4.3h4.4"})))};D.defaultProps={viewBox:"0 0 24 24"};var N="amp/amp-story-page",R={title:Object(o.__)("Page","amp"),category:"layout",icon:D({width:24,height:24}),attributes:{anchor:{source:"attribute",selector:"amp-story-page",attribute:"id"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:'amp-story-grid-layer[template="fill"] > img, amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',attribute:"src"},mediaType:{type:"string"},mediaAlt:{type:"string"},poster:{type:"string"},focalPoint:{type:"object"},autoAdvanceAfter:{type:"string"},autoAdvanceAfterDuration:{type:"number"},autoAdvanceAfterMedia:{type:"string"},backgroundColors:{default:"[]"},overlayOpacity:{default:100}},supports:{reusable:!0},edit:A,save:T,deprecated:d,transforms:{from:[{type:"raw",priority:20,selector:"amp-story-page",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(N,t);return Object(a.createBlock)(N,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),a=n.n(o),c=n(11),i=n.n(c),l=n(0),s=(n(9),n(13)),u=n.n(s),p=n(2),d=(n(106),n(14)),f=(n(22),n(7)),m=n(16),b=function(e){var t=e.setAttributes,n=e.toggleAttachment,o=e.openText;return Object(l.createElement)("div",{className:"open-attachment-wrapper"},Object(l.createElement)("span",{role:"button",tabIndex:"0",onClick:function(){n(!0)},onKeyDown:function(e){m.ENTER!==e.keyCode&&m.SPACE!==e.keyCode||(n(!0),e.stopPropagation())},className:"amp-story-page-open-attachment-icon"},Object(l.createElement)("span",{className:"amp-story-page-open-attachment-bar amp-story-page-open-attachment-bar-left"}),Object(l.createElement)("span",{className:"amp-story-page-open-attachment-bar amp-story-page-open-attachment-bar-right"})),Object(l.createElement)("div",{className:"amp-story-page-attachment__text"},Object(l.createElement)(f.RichText,{value:o,tagName:"div",onChange:function(e){return t({openText:e})},placeholder:Object(r.__)("Swipe Up","amp")})))},g=n(38),h=n.n(g),O=n(5),y=n(17),v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];function r(r){e.current&&e.current.contains(r.target)&&(t&&t(),n&&e.current.click())}Object(l.useEffect)((function(){return e.current&&document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}}))},j=function(e){var t=Object(l.useState)(null),n=i()(t,2),o=n[0],a=n[1],c=Object(l.useState)(!1),s=i()(c,2),u=s[0],d=s[1],b=Object(l.useState)(""),g=i()(b,2),j=g[0],k=g[1],w=Object(l.useState)(!1),E=i()(w,2),_=E[0],S=E[1],x=Object(l.useRef)(null),P=Object(l.useRef)(!0),C=e.attributes,I=e.setAttributes,B=e.toggleAttachment,A=C.attachmentClass,T=C.postId,D=C.postType,N=C.title,R=C.wrapperStyle,M=Object(p.useSelect)((function(e){return(0,e("amp/story").getSettings)().allowedPageAttachmentPostTypes}),[]),L=Object(l.useCallback)((function(){var e=M[D]||"".concat(D,"s");if(P.current=!0,T){S(!0);var t=x.current=h()({path:"/wp/v2/".concat(e,"/").concat(T)}).then((function(e){P.current&&x.current===t&&(a(e),d(!1),S(!1))})).catch((function(){P.current&&x.current===t&&(a(null),d(!0),S(!1))}))}}),[T,D,M]);Object(l.useEffect)((function(){return function(){P.current=!1}}),[]),Object(l.useEffect)((function(){L()}),[L]);var F=Object(l.useRef)(null),H=Object(l.useRef)(null);return v(H,(function(){B(!1)})),v(F,null,!0),Object(l.createElement)("div",{className:"attachment-container"},Object(l.createElement)("div",{className:"attachment-wrapper"},Object(l.createElement)("div",{className:"attachment-header"},Object(l.createElement)("span",{tabIndex:"0",className:"amp-story-page-attachment-close-button",role:"button",onKeyDown:function(e){m.ENTER!==e.keyCode&&m.SPACE!==e.keyCode||(B(!1),e.stopPropagation())},ref:H}),Object(l.createElement)("div",{className:"amp-story-page-attachment-title"},Object(l.createElement)(f.RichText,{value:N,tagName:"div",onChange:function(e){return I({title:e})},placeholder:Object(r.__)("Write Title","amp"),onClick:function(e){return e.stopPropagation()}})),T&&Object(l.createElement)(O.Button,{className:"remove-attachment-post",onClick:function(e){e.stopPropagation(),d(!1),I({postId:null}),a(null)},isLink:!0,isDestructive:!0,ref:F},Object(r.__)("Remove Post","amp"))),Object(l.createElement)("div",{className:A,style:R},_&&Object(l.createElement)(O.Spinner,null),!_&&o&&o.content&&Object(l.createElement)(l.RawHTML,null,"<h2>".concat(o.title.rendered,"</h2>").concat(o.content.rendered)),!_&&(!T||u)&&Object(l.createElement)(l.Fragment,null,u&&Object(l.createElement)("div",null,Object(l.createElement)("p",{className:"failed-message"},Object(r.__)("The selected post failed to load, please select a new post or try loading again.","amp"),Object(l.createElement)(O.Button,{className:"refetch-attachment-post",onClick:function(e){e.stopPropagation(),L()},isLink:!0},Object(r.__)(" Try again","amp")))),Object(l.createElement)(y.n,{labelText:Object(r.__)("Attachment Content","amp"),placeholder:Object(r.__)("Search for content ...","amp"),value:j,onSelect:function(e,t){I({postId:e,postType:t}),k("")},onChange:function(e){return k(e)},searchablePostTypes:Object.keys(M)})))))},k=function(e){var t=e.attributes,n=e.setAttributes,r=e.backgroundColor,o=e.customBackgroundColor,c=e.textColor,s=t.opacity,f=t.openText,m=Object(l.useState)(!1),g=i()(m,2),h=g[0],O=g[1],y=Object(p.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]);return Object(l.useEffect)((function(){var e=Object(d.d)(y,r,o,s),t=u()("amp-page-attachment-content",a()({"has-text-color":c.color},c.class,c.class)),i={wrapperStyle:{color:c.color,backgroundColor:e}};i.attachmentClass=t,n(i)}),[y,r,o,s,c,n]),h?Object(l.createElement)(j,{setAttributes:n,attributes:t,toggleAttachment:O}):Object(l.createElement)(b,{setAttributes:n,toggleAttachment:O,openText:f})};n.d(t,"name",(function(){return E})),n.d(t,"settings",(function(){return _}));var w={postId:{type:"number"},postType:{type:"string",default:"post"},title:{type:"string"},openText:{type:"string",default:Object(r.__)("Swipe Up","amp")},wrapperStyle:{default:{}},attachmentClass:{type:"string",default:"amp-page-attachment-content"}},E="amp/amp-story-page-attachment",_={title:Object(r.__)("Page Attachment","amp"),description:Object(r.__)("Attach additional content to a story page.","amp"),icon:"media-document",category:"layout",keywords:[Object(r.__)("attachment","amp"),Object(r.__)("content","amp"),Object(r.__)("embed","amp")],attributes:w,edit:k,save:function(){return null}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=(n(22),n(1)),a=n(8),c=n(6),i=n.n(c),l=n(11),s=n.n(l),u=n(13),p=n.n(u),d=(n(9),n(5)),f=n(7),m=n(2),b=(n(105),n(3)),g=n(14),h=n(17),O=n(4),y=function(e){var t=e.attributes,n=e.backgroundColor,a=e.className,c=e.clientId,l=e.fontSize,u=e.isSelected,y=e.name,v=e.setAttributes,j=e.textColor,k=t.anchor,w=t.text,E=t.url,_=t.customBackgroundColor,S=t.opacity,x=t.btnPositionTop,P=t.btnPositionLeft,C=t.btnWidth,I=t.btnHeight,B=Object(r.useRef)(null);Object(r.useEffect)((function(){B.current=document.querySelector("#amp-story-cta-button-".concat(c," .wp-block-amp-amp-story-cta"))}),[c]);var A=Object(r.useCallback)((function(){if(B.current){var e=Object(b.r)("x",B.current.clientWidth-48),t=Object(b.r)("y",B.current.clientHeight-14,O.y);v({btnWidth:e,btnHeight:t})}}),[v]),T=Object(r.useState)(!1),D=s()(T,2),N=D[0],R=D[1],M=Object(r.useState)(!0),L=s()(M,2),F=L[0],H=L[1];Object(r.useEffect)((function(){k||v({anchor:Object(b.x)()})}),[k,v]),Object(r.useEffect)((function(){u||(R(!1),H(!0))}),[u]),Object(r.useEffect)((function(){N&&Object(b.T)(".is-selected .amp-block-story-cta__link")}),[N]),Object(r.useEffect)((function(){w&&w.length&&!C&&!I&&A()}),[C,I,w,A]);var z=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]),W=Object(g.d)(z,n,_,S),q=Object(o.__)("Add text…","amp"),U=p()("amp-block-story-cta__link",i()({"has-background":n.color,"has-text-color":j.color},j.class,j.class)),V={color:j.color,fontSize:l.size?l.size+"px":void 0};return Object(r.createElement)("div",{className:"amp-story-cta-button",id:"amp-story-cta-button-".concat(c),style:{top:"".concat(x,"%"),left:"".concat(P,"%")}},Object(r.createElement)("div",{className:a,style:{backgroundColor:W}},N?Object(r.createElement)(f.RichText,{placeholder:q,value:w,onChange:function(e){v({text:e}),A()},className:U,style:V}):Object(r.createElement)(h.h,{blockElementId:"amp-story-cta-button-".concat(c),clientId:c,name:y,isDraggable:!0,isEditing:N,isSelected:u,hasOverlay:F,toggleIsEditing:R,toggleOverlay:H,text:w,textStyle:V,textWrapperClass:U,placeholder:q})),u&&N&&Object(r.createElement)("form",{className:"amp-block-story-cta__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(r.createElement)(d.Dashicon,{icon:"admin-links"}),Object(r.createElement)(f.URLInput,{value:E,onChange:function(e){return v({url:e})},autoFocus:!1}),Object(r.createElement)(d.IconButton,{icon:"editor-break",label:Object(o.__)("Apply","amp"),type:"submit"})))};function v(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}var j=function(e){var t=e.attributes,n=t.anchor,o=t.btnPositionLeft,a=t.btnPositionTop,c=t.btnWidth,l=t.btnHeight,s=t.text,u=t.url,p=Object(b.m)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{className:"amp-block-story-cta__link"})),d=Object(b.v)(t);return d.top=a?"".concat(a,"%"):void 0,d.left=o?"".concat(o,"%"):void 0,d.width=c?"".concat(c,"%"):void 0,d.height=l?"".concat(l,"%"):void 0,d.display="flex",Object(r.createElement)("amp-story-cta-layer",{id:n||Object(b.x)()},Object(r.createElement)("div",{className:"amp-cta-button-wrapper"},Object(r.createElement)("a",{className:p,href:u,style:d},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-cta-content"},Object(r.createElement)(r.RawHTML,null,s)))))},k=n(10);function w(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},text:{type:"string",source:"html",selector:"a"},customTextColor:{type:"string",default:"#ffffff"},customBackgroundColor:{type:"string",default:"#32373c"},btnPositionTop:{type:"number",default:0},btnPositionLeft:{type:"number",default:30},btnWidth:{type:"number"},btnHeight:{type:"number"}},S=[{attributes:E({align:{type:"string",default:"center"}},_),supports:{align:!0,alignWide:!1},save:function(e){var t=e.attributes,n=t.anchor,o=t.url,a=t.text,c=Object(b.m)(E({},t,{className:"amp-block-story-cta__link"})),i=Object(b.v)(t);return Object(r.createElement)("amp-story-cta-layer",{id:n},Object(r.createElement)(f.RichText.Content,{tagName:"a",className:c,href:o,style:i,value:a}))},migrate:function(e){return E({},Object(k.omit)(e,"align"),{btnPositionTop:0,btnPositionLeft:30})}},{attributes:E({},_),save:function(e){var t=e.attributes,n=t.anchor,o=t.btnPositionLeft,a=t.btnPositionTop,c=t.text,i=t.url,l=Object(b.m)(E({},t,{className:"amp-block-story-cta__link"})),s=Object(b.v)(t);return s.top=a?"".concat(a,"%"):void 0,s.left=o?"".concat(o,"%"):void 0,Object(r.createElement)("amp-story-cta-layer",{id:n||Object(b.x)()},Object(r.createElement)(f.RichText.Content,{tagName:"a",className:l,href:i,style:s,value:c}))}}];n.d(t,"name",(function(){return P})),n.d(t,"settings",(function(){return C}));var x=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M7 14v2H5a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v5a3.001 3.001 0 0 1-2 2.83V8a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h2z"}),Object(r.createElement)("path",{d:"M18.31 15.442a.563.563 0 0 0-.202-.636l-6.631-4.808a.562.562 0 0 0-.891.415l-.58 8.17a.564.564 0 0 0 .359.565c.236.1.49.018.644-.175l1.646-2.074 1.632 3.5a.561.561 0 0 0 .748.273L16.477 20a.562.562 0 0 0 .272-.748l-1.633-3.5 2.647.072a.563.563 0 0 0 .548-.382z"}))};x.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var P="amp/amp-story-cta",C={title:Object(o.__)("Call to Action","amp"),description:Object(o.__)("Prompt visitors to take action with a button-style link.","amp"),icon:x,category:"layout",keywords:[Object(o.__)("cta","amp"),Object(o.__)("button","amp")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},text:{type:"string",source:"html",selector:".amp-cta-content"},customTextColor:{type:"string",default:"#ffffff"},customBackgroundColor:{type:"string",default:"#32373c"},btnPositionTop:{type:"number",default:0},btnPositionLeft:{type:"number",default:5},btnWidth:{type:"number"},btnHeight:{type:"number"}},edit:y,save:j,deprecated:S,transforms:{from:[{type:"raw",priority:20,selector:"amp-story-cta-layer",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(P,t);return Object(a.createBlock)(P,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),a=n(8),c=n(6),i=n.n(c),l=n(11),s=n.n(l),u=n(13),p=n.n(u),d=(n(9),n(7)),f=n(2),m=n(3),b=n(14),g=(n(114),n(17));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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e){var t,n=e.attributes,a=e.setAttributes,c=e.className,l=e.clientId,u=e.fontSize,h=e.isPartOfMultiSelection,y=e.isSelected,v=e.backgroundColor,j=e.customBackgroundColor,k=e.textColor,w=e.name,E=n.placeholder,_=n.content,S=n.align,x=n.ampFontFamily,P=n.ampFitText,C=n.autoFontSize,I=n.width,B=n.height,A=n.opacity,T=n.isPasted,D=Object(r.useState)(!1),N=s()(D,2),R=N[0],M=N[1],L=Object(r.useState)(!0),F=s()(L,2),H=F[0],z=F[1];Object(r.useEffect)((function(){R&&Object(m.T)(".is-selected .wp-block-amp-amp-story-text")}),[R]),Object(r.useEffect)((function(){P&&Object(m.L)(e)}),[P,x,I,B,_,e]),Object(r.useEffect)((function(){P&&!T||Object(m.K)(e),T&&a({isPasted:!1})}),[P,u,x,_,T,e,a]),Object(r.useEffect)((function(){y||(M(!1),z(!0))}),[y]);var W=u&&u.size?"".concat(u.size,"px"):void 0,q=Object(f.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]),U={backgroundColor:Object(b.d)(q,v,j,A)};P&&_.length&&(U.lineHeight=B+"px");var V=[],G="wp-block-amp-story-text-wrapper";n.className&&n.className.length&&n.className.split(" ").forEach((function(e){e.includes("is-style")&&V.push(e)}));V.length&&(G+=" "+V.join(" "));var K=(t={"has-text-color":k.color},i()(t,k.class,k.class),i()(t,u.class,P?void 0:u.class),i()(t,"is-amp-fit-text",P),t),$={color:k.color,fontSize:P?"".concat(C,"px"):W,textAlign:S,position:P&&_.length?"static":void 0};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.BlockControls,null,Object(r.createElement)(d.AlignmentToolbar,{value:S,onChange:function(e){return a({align:e})}})),Object(r.createElement)("div",{className:p()(G,{"with-line-height":P,"is-empty-draggable-text":!R&&!_.length}),style:U},R?Object(r.createElement)("div",{className:"wp-block-amp-story-text"},Object(r.createElement)(d.RichText,{tagName:"p",value:_,onChange:function(e){return a({content:e})},onReplace:function(t){(t=t.filter((function(e){return void 0!==e}))).length&&e.onReplace(t.map((function(e,t){return 0===t&&e.name===w?O({},e,{attributes:O({},n,{},e.attributes)}):e})))},onSplit:function(){},style:$,className:p()(c,K),placeholder:E||Object(o.__)("Write text…","amp")})):Object(r.createElement)(g.h,{blockClass:"wp-block-amp-story-text",blockElementId:"block-".concat(l),clientId:l,name:w,isEditing:R,isDraggable:!h,isSelected:y,hasOverlay:H,toggleIsEditing:M,toggleOverlay:z,text:_,textStyle:$,textWrapperClass:p()(c+" block-editor-rich-text__editable editor-rich-text__editable",K),placeholder:E||Object(o.__)("Write text…","amp")})))},v=function(e){var t=e.attributes,n=t.content,o=t.ampFitText,a=t.tagName,c=Object(m.m)(t),i=Object(m.v)(t);if(!o)return Object(r.createElement)(d.RichText.Content,{tagName:a,style:i,className:c,value:n,format:"string"});var l=a;return i.display="flex",Object(r.createElement)(l,{style:i,className:c},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},Object(r.createElement)(r.RawHTML,null,n)))},j=n(19);function k(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}var w=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{placeholder:{type:"string"},content:{type:"string",source:"html",selector:".amp-text-content",default:""},type:{type:"string",default:"auto"},tagName:{type:"string",default:"p"},align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.content,o=t.ampFitText,a=t.tagName,c=Object(m.m)(t),i=Object(m.v)(t);if(!o)return Object(r.createElement)(d.RichText.Content,{tagName:a,style:i,className:c,value:n,format:"string"});var l=a;return i.display="flex",Object(r.createElement)(l,{style:i,className:c},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},Object(r.createElement)(r.RawHTML,null,n)))},migrate:j.a}];n.d(t,"name",(function(){return E})),n.d(t,"settings",(function(){return _}));var E="amp/amp-story-text",_={title:Object(o.__)("Text","amp"),description:Object(o.__)("Add free-form text to your story.","amp"),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"})),category:"common",keywords:[Object(o.__)("title","amp"),Object(o.__)("heading","amp"),Object(o.__)("paragraph","amp")],supports:{anchor:!0,reusable:!0,className:!0},attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:".amp-text-content",default:""},type:{type:"string",default:"auto"},tagName:{type:"string",default:"p"},align:{type:"string"},isPasted:{type:"boolean",default:!1}},edit:y,save:v,deprecated:w,transforms:{from:[{type:"raw",priority:20,selector:"p,h1,h2",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(E,t);return n.content||(n.content=e.textContent,n.tagName=e.nodeName,n.ampFitText=!1,n.isPasted=!0),Object(a.createBlock)(E,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),a=(n(22),n(9),n(7)),c=n(5),i=n(30),l=(n(116),function(e){return Object(o.createElement)("svg",e,Object(o.createElement)("path",{d:"M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"}))});l.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};var s=function(e){var t,n=e.isActive,s=e.value,u=e.onChange;if(n){var d=Object(i.getActiveFormat)(s,p).attributes.style;t=d.replace(new RegExp("^background-color:\\s*"),"")}return Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.Dropdown,{position:"bottom right",renderToggle:function(e){var n=e.isOpen,a=e.onToggle;return Object(o.createElement)(c.IconButton,{icon:l({width:16,height:16,viewBox:"0 0 24 24"}),tooltip:Object(r.__)("Highlight Color","amp"),onClick:a,"aria-expanded":n},Object(o.createElement)("span",{className:"components-background-color-indicator",style:{backgroundColor:t}}))},renderContent:function(){return Object(o.createElement)("div",{className:"components-background-color-popover-content"},Object(o.createElement)(a.ColorPalette,{value:t,onChange:function(e){u(e?Object(i.applyFormat)(s,{type:p,attributes:{style:"background-color:".concat(e)}}):Object(i.removeFormat)(s,p))}}))}})))};n.d(t,"priority",(function(){return u})),n.d(t,"name",(function(){return p})),n.d(t,"settings",(function(){return d}));var u=20,p="amp/background-color",d={title:Object(r.__)("Inline Background Color","amp"),tagName:"span",className:"amp-background-color",attributes:{style:"style"},edit:s}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),a=(n(9),n(7)),c=n(5),i=n(30),l=(n(117),function(e){var t,n=e.isActive,l=e.value,s=e.onChange;if(n){var p=Object(i.getActiveFormat)(l,u).attributes.style;t=p.replace(new RegExp("^color:\\s*"),"")}return Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.Dropdown,{position:"bottom right",renderToggle:function(e){var n=e.isOpen,a=e.onToggle;return Object(o.createElement)(c.IconButton,{icon:"editor-textcolor",tooltip:Object(r.__)("Text Color","amp"),onClick:a,"aria-expanded":n},Object(o.createElement)("span",{className:"components-text-color-indicator",style:{backgroundColor:t}}))},renderContent:function(){return Object(o.createElement)("div",{className:"components-text-color-popover-content"},Object(o.createElement)(a.ColorPalette,{value:t,onChange:function(e){s(e?Object(i.applyFormat)(l,{type:u,attributes:{style:"color:".concat(e)}}):Object(i.removeFormat)(l,u))}}))}})))});n.d(t,"priority",(function(){return s})),n.d(t,"name",(function(){return u})),n.d(t,"settings",(function(){return p}));var s=10,u="amp/text-color",p={title:Object(r.__)("Inline Text Color","amp"),tagName:"span",className:"amp-text-color",attributes:{style:"style"},edit:l}}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=61)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";n(70),n(41);var r=window.ampStoriesFonts,o=function(e){if(e&&void 0!==r){var t=r.find((function(t){return t.name===e}));if(t){var n=t.handle,o=t.src;if(n&&o)if(!document.getElementById(n)){var a=document.createElement("link");a.id=n,a.href=o,a.rel="stylesheet",a.type="text/css",a.media="all",a.crossOrigin="anonymous",document.head.appendChild(a)}}}},a=n(6),c=n.n(a),i=n(4);function l(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t=e.name;return i.d.includes(t)?"amp/amp-story-page"!==t?s({},e,{parent:[""]}):e:s({},e,{parent:["amp/amp-story-page"]})},p=function(e){switch(e){case"core/quote":case"core/video":case"core/embed":return 200;case"core/pullquote":return 250;case"core/table":return 100;case"amp/amp-story-post-author":case"amp/amp-story-post-date":return 50;case"amp/amp-story-post-title":return 100;default:return 60}};function d(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={"1.2.0":function(e,t,n){var r={},o=f({},e);if(o.id=n.anchor||Vt(),n.rotationAngle){var a=o.style?o.style:{};a=f({},a,{transform:"rotate(".concat(parseInt(n.rotationAngle),"deg)")}),r.style=a}return n.ampFontFamily&&(r["data-font-family"]=n.ampFontFamily),f({},o,{},r)}},b=n(21),g=n.n(b),h=n(0);function O(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={"1.2.0":function(e,t,n){var r=n.ampAnimationType,o=n.ampAnimationDelay,a=n.ampAnimationDuration,c=n.ampAnimationAfter,i=n.positionTop,l=n.positionLeft,s=n.width,u=n.height,p={};void 0!==i&&void 0!==l&&(p=y({},p,{position:"absolute",top:"".concat(i||0,"%"),left:"".concat(l||0,"%")})),void 0!==s&&void 0!==u&&(p=y({},p,{width:s?"".concat(_e("x",s),"%"):"0%",height:u?"".concat(_e("y",u),"%"):"0%"}));var d={};return r&&(d["animate-in"]=r,o&&(d["animate-in-delay"]=parseInt(o)+"ms"),a&&(d["animate-in-duration"]=parseInt(a)+"ms"),c&&(d["animate-in-after"]=c)),Object(h.createElement)("amp-story-grid-layer",{template:"vertical","data-block-name":t.name},Object(h.createElement)("div",g()({className:"amp-story-block-wrapper",style:p},d),e))}};function j(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w={"1.2.0":function(e,t){var n="core/image"===t,r="core/video"===t,o=i.j.includes(t),a=i.i.includes(t)&&!n,c={anchor:{type:"string",source:"attribute",attribute:"id",selector:"amp-story-grid-layer .amp-story-block-wrapper > *, amp-story-cta-layer"},ampAnimationType:{type:"string"},addedAttributes:{type:"number",default:0},ampAnimationAfter:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},ampFontFamily:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},opacity:{type:"number",default:100}};return o&&(c.autoFontSize={type:"number",default:36},c.ampFitText={type:"boolean",default:!0}),E(t)&&(c.positionTop={default:0,type:"number"},c.positionLeft={default:5,type:"number"},a&&(c.height={type:"number",default:p(t)},c.width={type:"number",default:250}),c.rotationAngle={type:"number",default:0},c.ampAnimationType={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in"},c.ampAnimationDelay={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-delay",default:0},c.ampAnimationDuration={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-duration",default:0},c.ampAnimationAfter={source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-after"}),n&&(c.ampShowImageCaption={type:"boolean",default:!1}),r&&(c.ampShowCaption={type:"boolean",default:!1},c.autoplay=k({},e.attributes.autoplay,{default:!0}),c.playsInline=k({},e.attributes.playsInline,{default:!1}),c.loop=k({},e.attributes.loop,{default:!0}),c.controls=k({},e.attributes.controls,{default:!1})),Object.keys(c).forEach((function(t){void 0===c[t].default&&void 0!==e.attributes[t]&&void 0!==e.attributes[t].default&&(c[t].default=e.attributes[t].default)})),k({},e,{attributes:k({},e.attributes,{},c),supports:k({},e.supports,{anchor:!1})})}},E=function(e){return i.c.includes(e)},_=function(e){return"amp/amp-story-cta"===e};function S(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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){if(!i.b.includes(t)||"core/template"===t)return e;if(e.attributes.deprecated&&w[e.attributes.deprecated.default]){var n=w[e.attributes.deprecated.default];if("function"==typeof n)return n(e,t)}var r="core/image"===t,o="core/video"===t,a=i.j.includes(t),c=i.i.includes(t)&&!r,l={addedAttributes:{type:"number",default:0},fontSize:{type:"string"},customFontSize:{type:"number"},ampFontFamily:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},opacity:{type:"number",default:100}};return a&&(l.autoFontSize={type:"number",default:36},l.ampFitText={type:"boolean",default:!0}),_(t)&&(l.anchor={type:"string",source:"attribute",attribute:"id",selector:"amp-story-cta-layer"}),E(t)&&(l.anchor={type:"string"},l.positionTop={default:0,type:"number"},l.positionLeft={default:5,type:"number"},c&&(l.height={type:"number",default:p(t)},l.width={type:"number",default:250}),l.rotationAngle={type:"number",default:0},l.ampAnimationType={type:"string"},l.ampAnimationDelay={default:0},l.ampAnimationDuration={default:0},l.ampAnimationAfter={type:"string"}),r&&(l.ampShowImageCaption={type:"boolean",default:!1}),o&&(l.ampShowCaption={type:"boolean",default:!1},l.ampAriaLabel={type:"string",default:""},l.autoplay=P({},e.attributes.autoplay,{default:!0}),l.playsInline=P({},e.attributes.playsInline,{default:!1}),l.loop=P({},e.attributes.loop,{default:!0}),l.controls=P({},e.attributes.controls,{default:!1})),Object.keys(l).forEach((function(t){void 0===l[t].default&&void 0!==e.attributes[t]&&void 0!==e.attributes[t].default&&(l[t].default=e.attributes[t].default)})),P({},e,{attributes:P({},e.attributes,{},l),supports:P({},e.supports,{anchor:!1,align:!1,alignWide:!1})})};function C(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e,t,n){var r={};if(!i.b.includes(t.name))return e;if(n.deprecated&&m[n.deprecated]){var o=m[n.deprecated];if("function"==typeof o)return o(e,t,n)}if(n.rotationAngle){var a=e.style?e.style:{};a=I({},a,{transform:"rotate(".concat(parseInt(n.rotationAngle),"deg)")}),r.style=a}return n.ampFontFamily&&(r["data-font-family"]=n.ampFontFamily),I({},e,{},r)},A=n(15),T=n.n(A),D=(n(9),n(19));function N(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}var R=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"text",selector:"code"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes;return Object(h.createElement)("pre",null,Object(h.createElement)("code",null,t.content))},migrate:D.a}],M=n(13),L=n.n(M),F=n(7);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}var z=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"},rotationAngle:{type:"number",default:0},ampAnimationType:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in"},ampAnimationDelay:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-delay",default:0},ampAnimationDuration:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-duration",default:0},ampAnimationAfter:{source:"attribute",selector:".amp-story-block-wrapper",attribute:"animate-in-after"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"amp-story-grid-layer .amp-story-block-wrapper, amp-story-cta-layer"},positionTop:{default:0,type:"number"},positionLeft:{default:5,type:"number"},ampShowImageCaption:{type:"boolean",default:!1},sizeSlug:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.alt,a=n.caption,i=n.align,l=n.href,s=n.rel,u=n.linkClass,p=n.width,d=n.height,f=n.id,m=n.linkTarget,b=n.sizeSlug,g=L()((t={},c()(t,"align".concat(i),i),c()(t,"size-".concat(b),b),c()(t,"is-resized",p||d),t)),O=Object(h.createElement)("img",{src:r,alt:o,className:f?"wp-image-".concat(f):null,width:p,height:d}),y=Object(h.createElement)(h.Fragment,null,l?Object(h.createElement)("a",{className:u,href:l,target:m,rel:s},O):O,!F.RichText.isEmpty(a)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:a}));return"left"===i||"right"===i||"center"===i?Object(h.createElement)("div",null,Object(h.createElement)("figure",{className:g},y)):Object(h.createElement)("figure",{className:g},y)},migrate:D.a}];function W(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}var q=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{url:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption"},type:{type:"string"},providerNameSlug:{type:"string"},allowResponsive:{type:"boolean",default:!0}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,r=n.url,o=n.caption,a=n.type,i=n.providerNameSlug;if(!r)return null;var l=L()("wp-block-embed",(t={},c()(t,"is-type-".concat(a),a),c()(t,"is-provider-".concat(i),i),t));return Object(h.createElement)("figure",{className:l},Object(h.createElement)("div",{className:"wp-block-embed__wrapper"},"\n".concat(r,"\n")),!F.RichText.isEmpty(o)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:o}))},migrate:D.a}];function U(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}var V=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes;return Object(h.createElement)(h.RawHTML,null,t.content)},migrate:D.a}];function G(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}var K=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{ordered:{type:"boolean",default:!1},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",default:""}},{deprecated:{default:"1.2.0"}}),supports:{className:!1},save:function(e){var t=e.attributes,n=t.ordered,r=t.values,o=n?"ol":"ul";return Object(h.createElement)(F.RichText.Content,{tagName:o,value:r,multiline:"li"})},migrate:D.a}];function $(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}var Y=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html",selector:"pre",default:""}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes.content;return Object(h.createElement)(F.RichText.Content,{tagName:"pre",value:t})},migrate:D.a}],X=n(10),Q=n(2);function J(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 Z(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 ee(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 te(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 ne(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}var re={"core/code":R,"core/embed":q,"core/html":V,"core/image":z,"core/list":K,"core/preformatted":Y,"core/pullquote":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n,r=e.attributes,o=r.mainColor,a=r.customMainColor,i=r.textColor,l=r.customTextColor,s=r.value,u=r.citation,p=r.className;if(Object(X.includes)(p,"is-style-solid-color"))(t=Object(F.getColorClassName)("background-color",o))||(n={backgroundColor:a});else if(a)n={borderColor:a};else if(o){var d=Object(X.get)(Object(Q.select)("core/block-editor").getSettings(),["colors"],[]);n={borderColor:Object(F.getColorObjectByAttributeValues)(d,o).color}}var f=Object(F.getColorClassName)("color",i),m=i||l?L()("has-text-color",c()({},f,f)):void 0,b=f?void 0:{color:l};return Object(h.createElement)("figure",{className:t,style:n},Object(h.createElement)("blockquote",{className:m,style:b},Object(h.createElement)(F.RichText.Content,{value:s,multiline:!0}),!F.RichText.isEmpty(u)&&Object(h.createElement)(F.RichText.Content,{tagName:"cite",value:u})))},migrate:D.a}],"core/quote":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.align,r=t.value,o=t.citation;return Object(h.createElement)("blockquote",{style:{textAlign:n||null}},Object(h.createElement)(F.RichText.Content,{multiline:!0,value:r}),!F.RichText.isEmpty(o)&&Object(h.createElement)(F.RichText.Content,{tagName:"cite",value:o}))},migrate:D.a}],"core/table":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:{content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}}}}}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.hasFixedLayout,r=t.head,o=t.body,a=t.foot,c=t.backgroundColor;if(!r.length&&!o.length&&!a.length)return null;var i=Object(F.getColorClassName)("background-color",c),l=L()(i,{"has-fixed-layout":n,"has-background":Boolean(i)}),s=function(e){var t=e.type,n=e.rows;if(!n.length)return null;var r="t".concat(t);return Object(h.createElement)(r,null,n.map((function(e,t){var n=e.cells;return Object(h.createElement)("tr",{key:t},n.map((function(e,t){var n=e.content,r=e.tag,o=e.scope;return Object(h.createElement)(F.RichText.Content,{tagName:r,value:n,key:t,scope:"th"===r?o:void 0})})))})))};return Object(h.createElement)("figure",null,Object(h.createElement)("table",{className:l},Object(h.createElement)(s,{type:"head",rows:r}),Object(h.createElement)(s,{type:"body",rows:o}),Object(h.createElement)(s,{type:"foot",rows:a})))},migrate:D.a}],"core/verse":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.textAlign,r=t.content;return Object(h.createElement)(F.RichText.Content,{tagName:"pre",style:{textAlign:n},value:r})},migrate:D.a}],"core/video":[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{autoplay:{type:"boolean",source:"attribute",selector:"video",attribute:"autoplay"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",source:"attribute",selector:"video",attribute:"controls",default:!0},id:{type:"number"},loop:{type:"boolean",source:"attribute",selector:"video",attribute:"loop"},muted:{type:"boolean",source:"attribute",selector:"video",attribute:"muted"},poster:{type:"string",source:"attribute",selector:"video",attribute:"poster"},preload:{type:"string",source:"attribute",selector:"video",attribute:"preload",default:"metadata"},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},playsInline:{type:"boolean",source:"attribute",selector:"video",attribute:"playsinline"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.autoplay,r=t.caption,o=t.controls,a=t.loop,c=t.muted,i=t.poster,l=t.preload,s=t.src,u=t.playsInline;return Object(h.createElement)("figure",null,s&&Object(h.createElement)("video",{autoPlay:n,controls:o,loop:a,muted:c,poster:i,preload:"metadata"!==l?l:void 0,src:s,playsInline:u}),!F.RichText.isEmpty(r)&&Object(h.createElement)(F.RichText.Content,{tagName:"figcaption",value:r}))},migrate:D.a}]};function oe(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}var ae=function(e,t){if(!E(t))return e;var n=e.deprecated?e.deprecated:[],r=re[t]||void 0;return r?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{deprecated:n=[].concat(T()(n),T()(r))}):e},ce=n(8);function ie(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 le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(e,t){if(!E(t))return e;var n={type:"raw",priority:20,selector:'amp-story-grid-layer[data-block-name="'.concat(t,'"]'),transform:function(e){var n=e.outerHTML,r=Object(ce.getBlockAttributes)(t,n);return"amp/amp-story-text"===t&&(r.content||(r.content=e.textContent,r.tagName=e.nodeName,r.ampFitText=!1)),Object(ce.createBlock)(t,r)}},r=e.transforms?le({},e.transforms):{},o=r.from?T()(r.from):[];return"core/list"===t&&(o=o.filter((function(e){return"prefix"!==e.type}))),o.push(n),le({},e,{transforms:le({},r,{from:o})})},ue=document.createElement("div"),pe=function(e,t,n){return!e.className&&n.includes("is-style-")&&0===n.indexOf("<amp-story-grid-layer")&&(ue.innerHTML=n,ue.children[0].children.length&&ue.children[0].children[0].children.length&&ue.children[0].children[0].children[0].className.includes("is-style-")&&(e.className=ue.children[0].children[0].children[0].className)),e},de=(n(22),function(e,t,n){if(!e||!E(t.name))return e;if(n.deprecated&&v[n.deprecated]){var r=v[n.deprecated];if("function"==typeof r)return r(e,t,n)}return e}),fe=function(e){return T()(new Set(e.map((function(e){return e.parent})))).map((function(t){return e.filter((function(e){var n=e.parent,r=e.animationType;return n===t&&r})).map((function(e){var t=e.duration,n=e.delay;return(n?parseInt(n):0)+(t?parseInt(t):0)})).reduce((function(e,t){return Math.max(e,t)}),0)})).reduce((function(e,t){return e+t}),0)},me=n(17),be=function(){var e=document.querySelector(".editor-block-list__layout"),t=document.querySelector(".editor-block-navigation");if(e&&!document.getElementById("amp-story-editor")){var n=document.createElement("div");n.id="amp-story-editor";var r=document.createElement("div");if(r.id="amp-story-block-navigation",e.parentNode.replaceChild(n,e),!document.getElementById("amp-story-controls")){var o=document.createElement("div");o.id="amp-story-controls",n.appendChild(o),Object(h.render)(Object(h.createElement)(me.v,null),o)}if(n.appendChild(e),n.appendChild(r),Object(h.render)(Object(h.createElement)(me.c,null),r),!document.getElementById("amp-story-editor-carousel")){var a=document.createElement("div");a.id="amp-story-editor-carousel",n.appendChild(a),Object(h.render)(Object(h.createElement)(me.i,null),a)}}if(t){if(!document.getElementById("amp-story-shortcuts")){var c=document.createElement("div");c.id="amp-story-shortcuts",t.parentNode.parentNode.insertBefore(c,t.parentNode.nextSibling),Object(h.render)(Object(h.createElement)(me.s,null),c)}if(!document.getElementById("amp-story-media-inserter")){var i=document.createElement("div");i.id="amp-story-media-inserter",t.parentNode.parentNode.insertBefore(i,t.parentNode.nextSibling),Object(h.render)(Object(h.createElement)(me.l,null),i)}var l=document.createElement("div");l.id="amp-story-inserter";var s=t.parentNode.parentNode.querySelector(".block-editor-inserter").parentNode;s.parentNode.replaceChild(l,s),Object(h.render)(Object(h.createElement)(me.k,{position:"bottom right"}),l)}var u=document.querySelector(".block-editor-writing-flow__click-redirect");u&&u.remove()},ge=n(53),he=n(1),Oe=Object(Q.select)("core/block-editor"),ye=Oe.getBlocksByClientId,ve=Oe.getBlockOrder,je=Oe.getBlock,ke=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,we=Object(he._x)("words","Word count type. Do not translate!","amp"),Ee=function(e){var t=je(e);if(t&&"amp/amp-story-text"===t.name){var n=!ye(ve(e)).filter((function(t){return t.clientId!==e})).some((function(e){return"h1"===e.attributes.tagName})),r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.fontSize,r=e.customFontSize,o=e.positionTop,a=e.type,c=e.content,i=void 0===c?"":c;if(a&&"auto"!==a)return a;if(o>80)return"p";if("huge"===n||r&&r>40)return t?"h1":"h2";if("large"===n||r&&r>24)return"h2";var l=Object(ge.count)(i,we,{});return 4>=l?t?"h1":"h2":10>=l?"h2":"p"}(t.attributes,n);t.attributes.tagName!==r&&ke(e,{tagName:r})}},_e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!n)if("x"===e)n=i.z;else{if("y"!==e)return 0;n=i.x}return Number((t/n*100).toFixed(2))},Se=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n||("x"===e?n=i.z:"y"===e&&(n=i.x)),Math.round(t/100*n)},Pe=n(14),xe=function(){var e=Object(Pe.f)().width,t=Math.max(696,e);return{width:t,height:1/.75*t}},Ce=function(e,t){var n=t.filter(Boolean);if(!n)return e;if(1===n.length)e.backgroundColor=n[0].color;else{var r=n.map((function(e){return e.color||"transparent"})).join(", ");e.backgroundImage="linear-gradient(to bottom, ".concat(r,")")}return e},Ie=function(e){var t,n=e.className,r=e.ampFitText,o=e.backgroundColor,a=e.textColor,i=e.customBackgroundColor,l=e.customTextColor,s=e.opacity,u=Object(F.getColorClassName)("color",a),p=Object(F.getColorClassName)("background-color",o),d=s&&s<100;return L()(n,(t={"amp-text-content":!r,"has-text-color":a||l,"has-background":o||i},c()(t,u,u),c()(t,p,d?void 0:p),t))},Be=function(e){var t=e.align,n=e.fontSize,r=e.customFontSize,o=e.ampFitText,a=e.backgroundColor,c=e.textColor,l=e.customBackgroundColor,s=e.customTextColor,u=e.opacity,p=Object(F.getColorClassName)("color",c),d=Object(Q.select)("core/block-editor").getSettings(),f=d.colors,m=d.fontSizes,b=n?Object(F.getFontSize)(m,n,r).size:r,g=b&&(b/i.z*100).toFixed(2)+"vw";return{backgroundColor:Object(Pe.d)(f,Object(F.getColorObjectByAttributeValues)(f,a,l),l,u),color:p?void 0:s,fontSize:o?void 0:g,textAlign:t||void 0}};function Ae(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 Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De=function(e){var t=e.tagName;return[{attributes:Te({},{align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var n=e.attributes,r=n.ampFitText,o=Ie(n),a=Be(n);if(!r)return Object(h.createElement)(F.RichText.Content,{tagName:t,style:a,className:o,value:"{content}"});var c=t;return Object(h.createElement)(c,{style:a,className:o},Object(h.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},"{content}"))},migrate:D.a}]},Ne=function(e){var t=e.attribute,n=e.placeholder,r=e.tagName,o=void 0===r?"p":r,a=e.isEditable,c=void 0!==a&&a;return{supports:{anchor:!0,reusable:!0},attributes:{align:{type:"string"}},save:Object(me.I)({tagName:o}),edit:Object(me.H)({attribute:t,placeholder:n,tagName:o,isEditable:c}),deprecated:De({tagName:o})}},Re=Object(Q.select)("core/block-editor").getBlock,Me=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,Le=function(e){var t=Re(e);if(t){var n="core/image"===t.name,r="core/video"===t.name;if(n||r){var o=t.attributes;(!o.ampShowImageCaption&&n||!o.ampShowCaption&&r)&&o.caption&&0!==o.caption.length&&Me(e,{caption:""})}}},Fe=Object(Q.select)("core/block-editor"),He=Fe.getBlock,ze=Fe.getBlockRootClientId,We=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,qe=function(e){var t=He(e);if(t&&i.b.includes(t.name)){var n=He(ze(e));if(0===t.attributes.positionTop&&n){var r=Object(ce.createBlock)(t.name);if(Object(X.every)(r.attributes,(function(e,n){return e===t.attributes[n]}))){var o=n.innerBlocks.filter((function(e){return i.c.includes(e.name)})).map((function(e){return e.attributes.positionTop})).reduce((function(e,t){return Math.max(e,t)}),0);We(e,{positionTop:o>75?0:o+10})}}}},Ue=Object(Q.select)("core/block-editor"),Ve=Ue.getBlock,Ge=Ue.getBlocksByClientId,Ke=Ue.getBlockOrder,$e=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,Ye=function(e){var t=Ve(e);if(t&&i.d.includes(t.name)&&"media"===t.attributes.autoAdvanceAfter){var n=Ge(Ke(e));if(!(t.attributes.autoAdvanceAfterMedia&&n.find((function(e){return e.attributes.anchor===t.attributes.autoAdvanceAfterMedia})))){var r=n.find((function(e){var t=e.name;return i.r.includes(t)})),o=r?r.attributes.anchor:"";t.attributes.autoAdvanceAfterMedia!==o&&$e(e,{autoAdvanceAfterMedia:o})}}},Xe=n(20),Qe=function(e,t,n,r,o){if(!e.offsetHeight||!e.offsetWidth)return!1;for(e.classList.toggle("is-measuring"),r++;r-o>1;){var a=Math.floor((o+r)/2);e.style.fontSize=a+"px";var c=e.offsetHeight,i=e.offsetWidth;c>t||i>n?r=a:o=a}return e.style.fontSize=o+"px",e.classList.toggle("is-measuring"),o},Je=function(e){var t=e.name,n=e.clientId;switch(t){case"amp/amp-story-text":return document.querySelector("#block-".concat(n," .block-editor-rich-text__editable"));case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var r=t.replace("/","-");return document.querySelector("#block-".concat(n," .wp-block-").concat(r));default:return null}},Ze=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,et=function(e){var t=e.name,n=e.clientId,r=e.attributes,o=r.width,a=r.height,c=r.ampFitText,i=r.content,l=r.autoFontSize;if(c)switch(t){case"amp/amp-story-text":var s=Je(e);if(s&&i.length){var u=Qe(s,a,o,Xe.c,Xe.f);u&&l!==u&&Ze(n,{autoFontSize:u})}break;case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var p=Je(e);if(p){var d=Qe(p,a,o,Xe.c,Xe.f);d&&l!==d&&Ze(n,{autoFontSize:d})}}},tt=n(32),nt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,rt=function(e){var t=e.name,n=e.clientId,r=e.attributes,o=r.width,a=r.height,c=r.ampFitText,i=r.content,l=r.rotationAngle,s=r.positionLeft,u=r.positionTop,p=r.isPasted;if(!c){var d,f;switch(t){case"amp/amp-story-text":var m=Je(e);m&&i.length&&(d=m.scrollHeight>a?m.scrollHeight:null,f=m.scrollWidth>o?m.scrollWidth:null);break;case"amp/amp-story-post-title":case"amp/amp-story-post-author":case"amp/amp-story-post-date":var b=Je(e);b&&(b.classList.toggle("is-measuring"),d=b.offsetHeight>a?b.offsetHeight:null,f=b.offsetWidth>o?b.offsetWidth:null,b.classList.toggle("is-measuring"))}if((l||p)&&(f||d)){var g=f?f-o:0,h=d?d-a:0,O=Object(tt.b)({direction:"bottomRight",angle:l,isText:"amp/amp-story-text"===t,oldWidth:o,oldHeight:a,newWidth:o+g,newHeight:a+h,oldPositionLeft:s,oldPositionTop:u}),y=O.left,v=O.top,j={positionLeft:Number(_e("x",y).toFixed(2)),positionTop:Number(_e("y",v).toFixed(2))};d&&(j.height=d),f&&(j.width=f),nt(n,j)}}},ot=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,at=function(e){if(e){var t=e.attributes;t.deprecated&&"migrated"===t.deprecated&&ot(e.clientId,{deprecated:null})}},ct=Object(Q.select)("core").getMedia,it=Object(Q.select)("core/block-editor").getBlock,lt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,st=function(e){var t=it(e);if(t){var n=t.name,r=t.attributes;if("core/image"===n){var o=r.width,a=r.height;if(!o&&!a&&r.id>0){var c=ct(r.id);if(c&&c.media_details){var l=c.media_details,s=l.height,u=l.width,p=1;(i.z<u||i.x<s)&&(p=Math.max(u/i.z,s/i.x)),lt(e,{width:Math.round(u/p),height:Math.round(s/p)})}}}}},ut=Object(Q.select)("amp/story").getAnimatedBlocks,pt=Object(Q.dispatch)("amp/story"),dt=pt.addAnimation,ft=pt.changeAnimationType,mt=pt.changeAnimationDuration,bt=pt.changeAnimationDelay,gt=Object(Q.select)("core/block-editor"),ht=gt.getBlocksByClientId,Ot=gt.getBlockRootClientId,yt=gt.getClientIdsWithDescendants,vt=function e(t,n,r){var o,a=t.attributes.ampAnimationAfter;(a&&(o=r.find((function(e){return e.attributes.anchor===a}))),o)&&((ut()[n]||[]).find((function(e){return e.id===o.clientId}))||e(o,n,r));dt(n,t.clientId,o?o.clientId:void 0)},jt=function(){var e=ut();if(Object(X.isEqual)({},e)){var t=ht(yt()),n=!0,r=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var i=a.value,l=Ot(i.clientId);if(l){var s=i.attributes,u=s.ampAnimationType,p=s.ampAnimationDuration,d=s.ampAnimationDelay;vt(i,l,t),ft(l,i.clientId,u),mt(l,i.clientId,p?parseInt(String(p).replace("ms","")):void 0),bt(l,i.clientId,d?parseInt(String(d).replace("ms","")):void 0)}}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}},kt=function(e,t,n,r,o,a){return r&&o?Object(he.sprintf)(Object(he.__)("Block %s is the only block, and cannot be moved","amp"),e):a>0&&!o?Object(he.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
2
Object(he.__)("Move %1$s block from position %2$d down to position %3$d","amp"),e,t,n):a>0&&o?Object(he.sprintf)(Object(he.__)("Block %s is at the end of the content and can’t be moved down","amp"),e):a<0&&!r?Object(he.sprintf)(// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position
3
+ Object(he.__)("Move %1$s block from position %2$d up to position %3$d","amp"),e,t,n):a<0&&r?Object(he.sprintf)(Object(he.__)("Block %s is at the beginning of the content and can’t be moved up","amp"),e):void 0},wt=n(34),Et=n.n(wt),_t=n(11),St=n.n(_t),Pt=n(37),xt=n.n(Pt),Ct=n(33),It=Object(Q.select)("core/block-editor").getSettings,Bt=Object(Q.dispatch)("core").saveMedia,At=function(e){var t=document.createElement("video");return t.muted=!0,t.crossOrigin="anonymous",t.preload="metadata",t.currentTime=.5,new Promise((function(n,r){t.addEventListener("error",r),t.addEventListener("canplay",(function(){var e=document.createElement("canvas");e.width=t.videoWidth,e.height=t.videoHeight,e.getContext("2d").drawImage(t,0,0,e.width,e.height),e.toBlob(n,"image/jpeg")})),t.src=e}))},Tt=function(){var e=xt()(Et.a.mark((function e(t){var n,r,o,a,c;return Et.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.src,o=It(),a=o.__experimentalMediaUpload,e.next=4,At(r);case 4:return c=e.sent,e.abrupt("return",new Promise((function(e,t){a({filesList:[c],onFileChange:function(t){var r=St()(t,1)[0],o=r.id,a=r.url;n&&o&&(Bt({id:n,featured_media:o}),Bt({id:o,meta:{amp_is_poster:!0}})),Object(Ct.isBlobURL)(a)||e(r)},onError:t})})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Dt=function(e){if(!e)return null;var t=e.name,n=e.clientId;return E(t)?document.querySelector('.amp-page-child-block[data-block="'.concat(n,'"]')):null},Nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector('[data-block="'.concat(e,'"]'))},Rt=function(e){var t=e.name,n=e.clientId;return"amp/amp-story-page"===t?Nt(n):_(t)?document.querySelector("amp-story-cta-button-".concat(n)):document.querySelector("#block-".concat(n))},Mt=function(e,t){var n=Dt(e);n&&t&&(n.classList.remove("story-animation-init-".concat(t)),n.classList.remove("story-animation-".concat(t)),n.style.removeProperty("--animation-offset-x"),n.style.removeProperty("--animation-offset-y"),n.style.removeProperty("--animation-scale-start"),n.style.removeProperty("--animation-scale-end"),n.style.removeProperty("--animation-duration"),n.style.removeProperty("--animation-delay"))},Lt=function(e,t){var n=t.getBoundingClientRect(),r=n.left,o=n.top,a=e.getBoundingClientRect();return{top:a.top-o,right:a.right-r,bottom:a.bottom-o,left:a.left-r}},Ft=Object(Q.select)("core/block-editor").getBlockRootClientId,Ht=function(e,t){if(e<=i.z||t<=i.x){var n=i.z>e?i.z/e:1,r=i.x>t?i.x/t:1;return 1.25*Math.max(n,r)}return 1},zt=function(e,t){var n=Dt(e);if(n&&t){Mt(e,t);var r=function(e,t){var n,r,o,a=Dt(e),c=Rt(e),l=Ft(e.clientId),s=Nt(l),u=c.offsetWidth,p=c.offsetHeight,d=Lt(a,s),f=d.top,m=d.left;switch(t){case"fly-in-left":case"rotate-in-left":case"whoosh-in-left":n=-(m+u);break;case"fly-in-right":case"rotate-in-right":case"whoosh-in-right":n=i.z+m+u;break;case"fly-in-top":r=-(f+p);break;case"fly-in-bottom":r=i.x+f+p;break;case"drop":r=Math.max(160,f+p);break;case"pan-left":case"pan-right":o=Ht(u,p),n=i.z-u*o,r=(i.x-p*o)/2;break;case"pan-down":case"pan-up":n=-u*(o=Ht(u,p))/2,r=i.x-p*o;break;default:n=0}return{offsetX:n,offsetY:r,scalingFactor:o}}(e,t),o=r.offsetX,a=r.offsetY,c=r.scalingFactor;o&&n.style.setProperty("--animation-offset-x","".concat(o,"px")),a&&n.style.setProperty("--animation-offset-y","".concat(a,"px")),c&&(n.style.setProperty("--animation-scale-start",c),n.style.setProperty("--animation-scale-end",c)),n.classList.add("story-animation-init-".concat(t))}},Wt=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},a=Dt(e);if(a&&t){var c=i.f[t]||0;a.classList.remove("story-animation-init-".concat(t)),a.style.setProperty("--animation-duration","".concat(n||c,"ms")),a.style.setProperty("--animation-delay","".concat(r||0,"ms")),a.classList.add("story-animation-".concat(t)),a.addEventListener("animationend",o,{once:!0})}else o()},qt=n(54),Ut=n.n(qt),Vt=function(){return Ut()().replace(/^\d/,"a")},Gt=Object(Q.select)("core/block-editor").getBlock,Kt=Object(Q.dispatch)("core/block-editor").updateBlockAttributes,$t=function(e){var t=Gt(e);t&&(t.attributes.anchor||Kt(t.clientId,{anchor:Vt()}))},Yt=function(e){if(!e||!e.url)return{mediaUrl:void 0,mediaId:void 0,mediaType:void 0,mediaAlt:void 0,poster:void 0};var t;if(e.media_type)t=e.media_type===i.C?i.C:i.p;else{if(e.type!==i.p&&e.type!==i.C)return{mediaUrl:void 0,mediaId:void 0,mediaType:void 0,mediaAlt:void 0,poster:void 0};t=e.type}var n=e.alt||e.title,r=e.url,o=i.C===t&&e.image&&e.image.src!==e.icon?e.image.src:void 0;return{mediaUrl:r,mediaId:e.id,mediaType:t,mediaAlt:n,poster:o}},Xt=n(55),Qt=n.n(Xt),Jt=function(e,t,n){if("core/video"!==t.name||!e.props.children||!n.ampAriaLabel)return e;var r="figure"===e.type,o=Array.isArray(e.props.children)?e.props.children:[e.props.children],a=["amp-video","video"].includes(o[0].type);if(!r||!a)return e;var c=e,i=Qt()(o),l=i[0],s=i.slice(1),u=Object(h.cloneElement)(l,{"aria-label":n.ampAriaLabel},l.props.children);return h.cloneElement.apply(void 0,[c,{},u].concat(T()(s)))},Zt=Object(Q.select)("core/block-editor"),en=Zt.getBlocksByClientId,tn=Zt.getBlockOrder,nn=function(e,t){return en(tn(e)).find((function(e){return e.name===t}))},rn=function(e){return nn(e,"amp/amp-story-cta")},on=function(e){return nn(e,"amp/amp-story-page-attachment")},an=Object(Q.select)("core/block-editor").getBlock,cn=function(e){var t=an(e);return!!t&&"amp/amp-story-page"===t.name},ln=function(e){var t=document.createElement("textarea");t.setAttribute("readonly",""),t.style={position:"absolute",left:"-9999px"},t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},sn=function(e){var t=e.url;return Object(X.has)(e,["media_details","sizes",i.q,"source_url"])?t=e.media_details.sizes[i.q].source_url:Object(X.has)(e,["media_details","sizes","large","source_url"])&&(t=e.media_details.sizes.large.source_url),t},un=function(e){var t=document.querySelector(e);if(t){var n=document.createRange();n.selectNodeContents(t),n.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(n)}},pn=function(e){return{autoAdvanceAfter:e.amp_story_auto_advance_after,autoAdvanceAfterDuration:e.amp_story_auto_advance_after_duration}},dn=function(e){var t={srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t},fn=function(e){var t=Object(Q.useSelect)((function(e){return e("core/block-editor").getBlockOrder()}),[]),n=Object(Q.useSelect)((function(t){return t("core/block-editor").getBlock(e)}),[e]),r=Object(Q.useSelect)((function(e){return e("amp/story").getCurrentPage()}),[]),o=t.findIndex((function(e){return e===r})),a=Object(Q.useDispatch)("amp/story").setCurrentPage,c=Object(Q.useDispatch)("core/block-editor"),i=c.selectBlock,l=c.removeBlock,s=c.insertBlock,u=c.updateBlockAttributes;return{getPageByOffset:function(e){var n=o+e;return n>=0&&n<t.length?t[n]:null},moveBlockToPage:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;l(e);var o=Object(ce.cloneBlock)(n);s(o,null,t),null!==r&&u(o.clientId,r),a(t),i(o.clientId)}}},mn=function(){var e=Object(Q.useSelect)((function(e){return e("core/block-editor")}),[]),t=e.getBlockListSettings,n=e.canInsertBlockType;return function(e,r){var o=t(r),a=n(e,r)&&o&&o.allowedBlocks.includes(e);return Boolean(a)}},bn=function(){var e=Object(Q.useDispatch)("core/notices").createErrorNotice;return function(t){var n=Object(ce.getBlockType)(t),r=Object(he.sprintf)(// translators: %s: Type of block (i.e. Text, Image etc)
4
+ Object(he.__)("Unable to paste %s block.","amp"),n.title);e(r,{type:"snackbar",isDismissible:!0})}};n.d(t,"C",(function(){return o})),n.d(t,"S",(function(){return u})),n.d(t,"n",(function(){return p})),n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return B})),n.d(t,"f",(function(){return ae})),n.d(t,"h",(function(){return se})),n.d(t,"g",(function(){return pe})),n.d(t,"Z",(function(){return de})),n.d(t,"w",(function(){return fe})),n.d(t,"P",(function(){return be})),n.d(t,"I",(function(){return Ee})),n.d(t,"r",(function(){return _e})),n.d(t,"s",(function(){return Se})),n.d(t,"p",(function(){return xe})),n.d(t,"c",(function(){return Ce})),n.d(t,"m",(function(){return Ie})),n.d(t,"v",(function(){return Be})),n.d(t,"o",(function(){return Ne})),n.d(t,"F",(function(){return Le})),n.d(t,"G",(function(){return qe})),n.d(t,"J",(function(){return Ye})),n.d(t,"L",(function(){return et})),n.d(t,"K",(function(){return rt})),n.d(t,"E",(function(){return at})),n.d(t,"H",(function(){return st})),n.d(t,"D",(function(){return jt})),n.d(t,"k",(function(){return kt})),n.d(t,"V",(function(){return Tt})),n.d(t,"R",(function(){return zt})),n.d(t,"U",(function(){return Wt})),n.d(t,"Q",(function(){return Mt})),n.d(t,"B",(function(){return $t})),n.d(t,"O",(function(){return Yt})),n.d(t,"d",(function(){return Jt})),n.d(t,"l",(function(){return rn})),n.d(t,"q",(function(){return on})),n.d(t,"A",(function(){return cn})),n.d(t,"e",(function(){return ln})),n.d(t,"t",(function(){return sn})),n.d(t,"x",(function(){return Vt})),n.d(t,"T",(function(){return un})),n.d(t,"i",(function(){return Nt})),n.d(t,"z",(function(){return E})),n.d(t,"M",(function(){return pn})),n.d(t,"N",(function(){return dn})),n.d(t,"j",(function(){return Rt})),n.d(t,"u",(function(){return Lt})),n.d(t,"y",(function(){return _})),n.d(t,"Y",(function(){return fn})),n.d(t,"X",(function(){return mn})),n.d(t,"W",(function(){return bn}))},function(e,t,n){"use strict";n.d(t,"z",(function(){return c})),n.d(t,"x",(function(){return i})),n.d(t,"y",(function(){return l})),n.d(t,"A",(function(){return s})),n.d(t,"t",(function(){return u})),n.d(t,"s",(function(){return p})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"h",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"g",(function(){return g})),n.d(t,"i",(function(){return h})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return y})),n.d(t,"o",(function(){return v})),n.d(t,"p",(function(){return j})),n.d(t,"C",(function(){return k})),n.d(t,"u",(function(){return w})),n.d(t,"r",(function(){return E})),n.d(t,"q",(function(){return _})),n.d(t,"f",(function(){return S})),n.d(t,"e",(function(){return P})),n.d(t,"w",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"B",(function(){return I})),n.d(t,"m",(function(){return B})),n.d(t,"n",(function(){return A})),n.d(t,"l",(function(){return T})),n.d(t,"k",(function(){return D}));var r=n(15),o=n.n(r),a=n(1),c=328,i=553,l=Math.floor(i/5),s=50,u=40,p={default:30,"core/pullquote":180,"core/table":100,"core/code":45},d=["amp/amp-story-page","core/block","core/template"],f=["core/code","core/embed","core/image","core/list","core/preformatted","core/pullquote","core/quote","core/table","core/verse","core/video","amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title","core/html","core/block","core/template"],m=["amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],b=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],g=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title","amp/amp-story-cta","amp/amp-story-page-attachment"],h=["core/code","core/embed","core/image","core/list","core/pullquote","core/quote","core/table","core/video","amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"],O=[].concat(f,["amp/amp-story-cta","amp/amp-story-page-attachment"]),y=[].concat(d,o()(O)),v=["amp/amp-story-cta","amp/amp-story-page-attachment"],j="image",k="video",w=[j],E=["core/video","core/audio"],_="amp_story_page",S={drop:1600,"fade-in":400,"fly-in-bottom":400,"fly-in-left":400,"fly-in-right":400,"fly-in-top":400,pulse:400,"rotate-in-left":600,"rotate-in-right":600,"twirl-in":1e3,"whoosh-in-left":400,"whoosh-in-right":400,"pan-left":1e3,"pan-right":1e3,"pan-down":1e3,"pan-up":1e3,"zoom-in":1e3,"zoom-out":1e3},P=[{value:"",label:Object(a.__)("None","amp")},{value:"drop",label:Object(a.__)("Drop","amp")},{value:"fade-in",label:Object(a.__)("Fade In","amp")},{value:"fly-in-bottom",label:Object(a.__)("Fly In Bottom","amp")},{value:"fly-in-left",label:Object(a.__)("Fly In Left","amp")},{value:"fly-in-right",label:Object(a.__)("Fly In Right","amp")},{value:"fly-in-top",label:Object(a.__)("Fly In Top","amp")},{value:"pulse",label:Object(a.__)("Pulse","amp")},{value:"rotate-in-left",label:Object(a.__)("Rotate In Left","amp")},{value:"rotate-in-right",label:Object(a.__)("Rotate In Right","amp")},{value:"twirl-in",label:Object(a.__)("Twirl In","amp")},{value:"whoosh-in-left",label:Object(a.__)("Whoosh In Left","amp")},{value:"whoosh-in-right",label:Object(a.__)("Whoosh In Right","amp")},{value:"pan-left",label:Object(a.__)("Pan Left","amp")},{value:"pan-right",label:Object(a.__)("Pan Right","amp")},{value:"pan-down",label:Object(a.__)("Pan Down","amp")},{value:"pan-up",label:Object(a.__)("Pan Up","amp")},{value:"zoom-in",label:Object(a.__)("Zoom In","amp")},{value:"zoom-out",label:Object(a.__)("Zoom Out","amp")}],x=["left","bottomLeft","topLeft"],C=["top","topRight","topLeft"],I=7,B=[-180,-165,-150,-135,-120,-105,-90,-75,-60,-45,-30,-15,0,15,30,45,60,75,90,105,120,135,150,165,180],A=10,T=8,D=8},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){e.exports=n(64)()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){var r=n(43),o=n(62),a=n(44);e.exports=function(e,t){return r(e)||o(e,t)||a()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"i",(function(){return g})),n.d(t,"f",(function(){return h})),n.d(t,"m",(function(){return O})),n.d(t,"d",(function(){return v})),n.d(t,"c",(function(){return j})),n.d(t,"g",(function(){return k})),n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return E})),n.d(t,"k",(function(){return _})),n.d(t,"h",(function(){return S})),n.d(t,"j",(function(){return P})),n.d(t,"e",(function(){return C})),n.d(t,"l",(function(){return I}));var r=n(34),o=n.n(r),a=n(37),c=n.n(a),i=n(11),l=n.n(i),s=n(10),u=n(1),p=n(7),d=n(20),f=window.ampStoriesEditorSettings,m=(void 0===f?{}:f).allowedVideoMimeTypes,b=void 0===m?["video/mp4"]:m,g=function(e,t){if(!e||!e.width||!e.height)return!1;var n=t.width,r=t.height;return e.width>=n&&e.height>=r},h=function(){var e=d.e;return{width:e,height:e*(9/16)}},O=function(e,t,n){if(!e)return n?[Object(u.__)("Selecting a featured image is required.","amp")]:[Object(u.__)("Selecting a featured image is recommended for an optimal user experience.","amp")];var r=[];if(["image/png","image/gif","image/jpeg"].includes(e.mime_type)||r.push(
5
/* translators: 1: .jpg, 2: .png. 3: .gif */
6
Object(u.sprintf)(Object(u.__)("The featured image must be in %1$s, %2$s, or %3$s format.","amp"),".jpg",".png",".gif")),!g(e.media_details,t)){var o=t.width,a=t.height;r.push(
7
/* translators: 1: minimum width, 2: minimum height. */
8
+ Object(u.sprintf)(Object(u.__)("The featured image should have a size of at least %1$s by %2$s pixels.","amp"),Math.ceil(o),Math.ceil(a)))}return 0===r.length?null:r},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(!e)return[];3===(e=e.replace("#","")).length&&(e="".concat(e.charAt(0)).concat(e.charAt(0)).concat(e.charAt(1)).concat(e.charAt(1)).concat(e.charAt(2)).concat(e.charAt(2)));var n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),o=parseInt(e.substring(4,6),16);return[n,r,o,(t=Math.min(100,Math.max(0,t)))/100]},v=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=t?Object(p.getColorObjectByColorValue)(e,t.color)||Object(p.getColorObjectByAttributeValues)(e,t.slug,t.color||n):{color:n};if(o&&o.color){var a=y(o.color,r),c=l()(a,4),i=c[0],s=c[1],u=c[2],d=c[3];return"rgba(".concat(i,", ").concat(s,", ").concat(u,", ").concat(d,")")}},j=function(e,t){return e&&t?e>t?"landscape":t>e?"portrait":"square":null},k=function(e){var t=Object(s.template)("<p>".concat(e,"</p>"),{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g});return function(e){return t(e)}},w=function(e,t){if(e){var n=Object(s.get)(this,["options","allowedTypes"],null),r=this.get("select");n&&e.get("type")&&!function(e,t){var n=e.get("type"),r=e.get("mime");return!(!t.includes(n)&&!t.includes(r))&&!("video"===n&&!b.includes(r))}(e,n)?(this.secondary.set(d.b,new t({mimeType:e.get("mime")})),r&&r.model&&r.model.set("disabled",!0)):(this.secondary.unset(d.b),r&&r.model&&r.model.set("disabled",!1))}},E=function(e,t){e&&(("video"===Object(s.get)(e,["media_type"],null)||"video"===Object(s.get)(e,["attributes","type"],null))&&P(S(e))?this.secondary.set(d.a,new t({actualVideoMegabytesPerSecond:Math.round(S(e)/d.d),maxVideoMegabytesPerSecond:d.g})):this.secondary.unset(d.a))},_=function(){return Boolean(this.secondary.get(d.b))&&Boolean(this.secondary.get(d.a))},S=function(e){return Object(s.has)(e,["media_details","filesize"])&&Object(s.has)(e,["media_details","length"])?e.media_details.filesize/e.media_details.length:Object(s.has)(e,["attributes","filesizeInBytes"])&&Object(s.has)(e,["attributes","fileLength"])?e.attributes.filesizeInBytes/x(e.attributes.fileLength):null},P=function(e){return e>d.g*d.d},x=function(e){var t=e.split(":");return Object(s.reduce)(t,(function(e,n,r){var o=isNaN(parseInt(n))?0:parseInt(n),a=t.length-1-r;return e+Math.pow(60,a)*o}),0)},C=function(){var e=c()(o.a.mark((function e(t){var n,r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=window,r=n.fetch,e.next=3,r(t,{method:"head"});case 3:return a=e.sent,e.abrupt("return",Number(a.headers.get("content-length")));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(e){var t=e.url,n=e.id,r=e.width,o=e.height,a=e.onSelect,c=e.dispatchImage,i={};i.url=t,i.thumbnail_url=t,i.timestamp=Object(s.now)(),n&&(i.attachment_id=n),r&&(i.width=r),o&&(i.height=o),a(i),c(n)}},function(e,t,n){var r=n(68),o=n(45),a=n(69);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t,n){"use strict";var r=n(0),o=(n(22),n(9),n(5)),a=n(2),c=n(1),i=n(4),l=n(21),s=n.n(l);var u=function(e){var t=e.value,n=void 0===t?"":t,o=e.options,a=e.onChange,i={value:"",label:Object(c.__)("Immediately","amp")};return Object(r.createElement)(Rt,{value:n,options:o,defaultOption:i,onChange:function(e){var t=e.value,n=e.block;return a(""===t?void 0:n.clientId)},label:Object(c.__)("Begin after","amp"),id:"amp-stories-animation-order-picker",ariaLabel:function(e){var t=e.value,n=e.blockType;return t?Object(c.sprintf)(Object(c.__)("Begin after: %s","amp"),n.title):Object(c.__)("Begin immediately","amp")},renderToggle:function(e){return Object(r.createElement)(_,s()({},e,{displayIcon:!1,alignIcon:"right"}))},renderOption:function(e){return Object(r.createElement)("span",{className:"components-preview-picker__dropdown-label"},Object(r.createElement)(_,s()({},e,{alignIcon:"right"})))}})},p=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M15 15H5V5h10v10z"}))};p.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20"};var d=function(e){var t=e.clientId,n=e.page,l=e.animatedBlocks,s=e.onAnimationTypeChange,d=e.onAnimationDurationChange,f=e.onAnimationDelayChange,m=e.onAnimationAfterChange,b=e.animationType,g=e.animationDuration,h=e.animationDelay,O=e.animationAfter,y=Object(a.useSelect)((function(e){var r=(0,e("core/block-editor").getBlock)(t);return{isImageBlock:r&&"core/image"===r.name,isPlayingAnimation:e("amp/story").isPlayingAnimation(n,t)}}),[t,n]),v=y.isImageBlock,j=y.isPlayingAnimation,k=Object(a.useDispatch)("amp/story"),w=k.playAnimation,E=k.stopAnimation,_=Object(r.useCallback)((function(){return w(n,t)}),[n,t,w]),S=Object(r.useCallback)((function(){return E(n,t)}),[n,t,E]),P=i.f[b]||0,x=i.e.filter((function(e){return!(e.value.startsWith("pan-")&&!v)}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.SelectControl,{label:Object(c.__)("Animation Type","amp"),value:b,options:x,onChange:function(e){s(e),d(i.f[e]||0),f(0)}}),b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Duration (ms)","amp"),value:g,onChange:d,min:"0",max:"5000",placeholder:P,initialPosition:P}),Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Delay (ms)","amp"),value:h||0,onChange:f,min:"0",max:"5000"}),Object(r.createElement)(u,{value:O,options:l(),onChange:m}),Object(r.createElement)(o.IconButton,{icon:j?p({width:20,height:20}):"controls-play",className:"is-button is-default",onClick:j?S:_},j?Object(c.__)("Stop Animation","amp"):Object(c.__)("Play Animation","amp"))))},f=n(3),m=n(11),b=n.n(m),g=n(13),h=n.n(g),O=function(e){var t=e.block,n=e.isSelected,i=e.onClick,l=e.unMovableBlock,s=t.clientId,u=Object(r.useState)(!1),p=b()(u,2),d=p[0],f=p[1],m=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlockRootClientId)(s)}),[s]),g=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlockOrder)(m)}),[m]),O=Object(a.useSelect)((function(e){return(0,e("core/block-editor").getBlocksByClientId)(g).map((function(e){return e.clientId})).reverse()}),[g]),y=Object(a.useDispatch)("core/block-editor").moveBlockToPosition,v=function(e){return O.indexOf(e)},j=function(e,t){var n=function(e){var t={srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),r=n.srcClientId,o=n.srcIndex,a=n.type;if("block"===a&&r!==s){var c,i,l,u=v(s),p=function(e){if(s){var t=v(s);return"top"===e.y?t:t+1}}(t);c=r,i=o<u?p-1:p,l=g.length-1-i,y(c,m,m,l)}},k="block-navigation-item-".concat(s);if(l)return Object(r.createElement)("div",{className:"editor-block-navigation__item block-editor-block-navigation__item"},Object(r.createElement)(o.Button,{className:h()("components-button editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":n}),onClick:i,id:k},Object(r.createElement)(_,{block:t,accessibilityText:n&&Object(c.__)("(selected block)","amp")})));var w={type:"block",srcIndex:v(s),srcClientId:s};return Object(r.createElement)("div",{className:h()("editor-block-navigation__item block-editor-block-navigation__item",{"block-editor-block-navigation__item-is-dragging":d})},Object(r.createElement)(o.Draggable,{elementId:k,transferData:w,onDragStart:function(){return f(!0)},onDragEnd:function(){return f(!1)}},(function(e){var a=e.onDraggableStart,l=e.onDraggableEnd;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.DropZone,{className:d?"is-dragging-block":void 0,onDrop:j}),Object(r.createElement)("div",{className:"block-navigation__placeholder"}),Object(r.createElement)(o.Button,{className:h()("components-button editor-block-navigation__item-button block-editor-block-navigation__item-button",{"is-selected":n}),onClick:i,id:k,onDragStart:a,onDragEnd:l,draggable:!0},Object(r.createElement)(_,{block:t,accessibilityText:n&&Object(c.__)("(selected block)","amp")})))})))};n(73);function y(e){var t=e.blocks,n=e.selectedBlockClientId,c=e.unMovableBlock,i=Object(a.useDispatch)("core/block-editor").selectBlock;return Object(r.createElement)(r.Fragment,null,t.length>0&&Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list",role:"list"},t.map((function(e){var t=e.clientId===n;return Object(r.createElement)("li",{key:e.clientId},Object(r.createElement)(O,{block:e,isSelected:t,onClick:function(){return i(e.clientId)}}))})))),c&&Object(r.createElement)("ul",{className:"editor-block-navigation__list block-editor-block-navigation__list editor-block-navigation__list__static",role:"list"},Object(r.createElement)("li",{key:c.clientId},Object(r.createElement)(O,{block:c,isSelected:c.clientId===n,onClick:function(){return i(c.clientId)}}))))}var v=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor"),r=n.getBlockOrder,o=n.getBlocksByClientId,a=n.getSelectedBlockClientId,c=t()?o(r(t())):[];return{blocks:c.filter((function(e){var t=e.name;return Object(f.z)(t)})).reverse(),unMovableBlock:c.find((function(e){var t=e.name;return!Object(f.z)(t)})),selectedBlockClientId:a()}}),[]),t=e.blocks,n=e.unMovableBlock,i=e.selectedBlockClientId;if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;var l=t.length>0||n;return Object(r.createElement)(o.NavigableMenu,{role:"presentation",className:"block-editor-block-navigation__container"},Object(r.createElement)("p",{className:"block-editor-block-navigation__label"},Object(c.__)("Elements","amp")),l&&Object(r.createElement)(y,{blocks:t,selectedBlockClientId:i,unMovableBlock:n}),!l&&Object(r.createElement)("p",{className:"block-editor-block-navigation__paragraph"},Object(c.__)("No elements added to this page yet.","amp")))},j=n(8),k=n(7),w=function(e){var t=e.clientId,n=e.name,a=e.attributes,c=e.innerBlocks,i=void 0===c?[]:c,l=Object(j.createBlock)(n,a,i);return Object(r.createElement)(o.Disabled,{className:"block-editor-block-preview__content editor-styles-wrapper","aria-hidden":!0},Object(r.createElement)(k.BlockEdit,{name:n,focus:!1,clientId:t,isLocked:!0,insertBlocksAfter:!1,attributes:l.attributes,setAttributes:function(){}}))},E=n(36),_=function(e){var t=e.block,n=e.label,o=e.displayIcon,i=void 0===o||o,l=e.alignIcon,s=void 0===l?"left":l,u=e.accessibilityText,p=void 0!==u&&u,d=Object(a.useSelect)((function(e){if(!t)return{content:n,icon:null};var r=n,o=t.attributes,a=t.name,i=e("core/editor").getEditedPostAttribute,l=e("core"),s=l.getAuthors,u=l.getMedia,p=Object(j.getBlockType)(a);r=p.title;var d="";switch(a){case"core/image":if(o.url&&(d=o.url.slice(o.url.lastIndexOf("/")).slice(1,30)).length>0&&(r=d),o.id){var f=u(o.id);f&&(r=f.caption.raw||f.title.raw||r)}break;case"amp/amp-story-text":o.content.length>0&&(d=o.content.replace(/<br>/g," ").replace(/<[^<>]+>/g,"").slice(0,30)),r=d.length>0?d:p.title;break;case"amp/amp-story-post-author":var m=s().find((function(e){return e.id===i("author")}));r=m?m.name:Object(c.__)("Post Author","amp");break;case"amp/amp-story-post-date":var b=i("date"),g=Object(E.__experimentalGetSettings)().formats.date,h=b||new Date;r=Object(E.dateI18n)(g,h);break;case"amp/amp-story-post-title":r=i("title")||p.title}return{content:r,icon:p.icon}}),[n,t]),f=d.content,m=d.icon;return Object(r.createElement)(r.Fragment,null,i&&"left"===s&&Object(r.createElement)(k.BlockIcon,{icon:m}),f.length>20?"".concat(f.substr(0,20),"…"):f,p&&Object(r.createElement)("span",{className:"screen-reader-text"},p),i&&"right"===s&&Object(r.createElement)(k.BlockIcon,{icon:m}))},S=n(16),P=function(e){var t=e.blockClass,n=e.blockElementId,o=e.clientId,a=e.hasOverlay,c=e.isDraggable,i=e.isSelected,l=e.name,s=e.toggleIsEditing,u=e.toggleOverlay,p=e.text,d=e.textStyle,f=e.textWrapperClass,m=e.placeholder;return Object(r.createElement)(wt,{clientId:o,blockName:l,blockElementId:n,isDraggable:c,isMovable:!0},Object(r.createElement)("div",{role:"textbox",tabIndex:"-1",className:h()("is-not-editing","editor-rich-text","block-editor-rich-text",t),onClick:function(){i&&s(!0)},onMouseDown:function(e){1<e.detail&&e.preventDefault()},onKeyDown:function(e){e.stopPropagation(),S.ENTER===e.keyCode&&i&&(u(!1),s(!0))}},a&&Object(r.createElement)("div",{role:"textbox",tabIndex:"-1",className:"amp-overlay",onClick:function(e){u(!1),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation(),S.ENTER===e.keyCode&&i&&(u(!1),s(!0))}}),Object(r.createElement)("div",{role:"textbox",className:f,style:d},p&&p.length?Object(r.createElement)(r.RawHTML,null,p):Object(r.createElement)("span",{className:"amp-text-placeholder"},m))))},x=function(e){var t=e.pages,n=e.currentPage,i=e.onClick,l=function(e){return Object(c.sprintf)(Object(c.__)("Go to page %s","amp"),e)},s=Object(r.useState)(null),u=b()(s,2),p=u[0],d=u[1],m=Object(a.useDispatch)("core/block-editor").moveBlockToPosition,g=Object(a.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockIndex;
9
+ /* translators: %s: Page number */return Object(r.createElement)("ul",{className:"amp-story-editor-carousel-item-list"},t.map((function(e,t){var a,s=e.clientId,u=h()("amp-story-editor-carousel-item",{"amp-story-editor-carousel-item--active":s===n}),b="amp-story-editor-carousel-item-".concat(s),O={type:"indicator",srcIndex:g(s),srcClientId:s},y=function(e,t){var n=Object(f.N)(e),r=n.srcClientId,o=n.srcIndex;if("indicator"===n.type&&!(r===s)){var a=function(e){var t=g(s);if(void 0!==s)return"left"===e.x?t:t+1}(t);a>o&&a--,m(r,"","",a)}},v=s===p,j=s===n,k=Object(r.createElement)(o.Button,{onClick:function(e){e.preventDefault(),i(s)}},Object(r.createElement)("span",{className:"indicator-page-number"},t+1),Object(r.createElement)("span",{className:"screen-reader-text"},(a=t+1,Object(c.sprintf)(Object(c.__)("Page %s","amp"),a))));return Object(r.createElement)(o.Draggable,{key:s,elementId:b,transferData:O,onDragStart:function(){d(s)},onDragEnd:function(){d(null)}},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)("li",{className:u},Object(r.createElement)("div",{onDragStart:n,onDragEnd:a,draggable:!0,className:"amp-story-editor-carousel-item-wrapper",id:b},j?k:Object(r.createElement)(o.Tooltip,{text:l(t+1)},k)),Object(r.createElement)(o.DropZone,{className:h()("",{"is-dragging-indicator":v}),onDrop:y}))}))})))},C=(n(74),function(){var e=Object(a.useSelect)((function(e){return e("amp/story").getCurrentPage()}),[]),t=Object(a.useSelect)((function(t){var n=t("core/block-editor"),r=n.getSettings,o=n.getBlockOrder,a=n.getBlocksByClientId,c=n.getAdjacentBlockClientId,i=t("amp/story").isReordering,l=a(o()),s=l.findIndex((function(t){return t.clientId===e}));return{pages:l,currentIndex:Math.max(0,s),previousPage:e?c(e,-1):null,nextPage:e?c(e,1):null,isReordering:i(),isRTL:r().isRTL}}),[e]),n=t.pages,l=t.currentIndex,s=t.previousPage,u=t.nextPage,p=t.isReordering,d=t.isRTL,f=Object(r.useRef)(null);Object(r.useEffect)((function(){f.current=document.querySelector("#amp-story-controls + .block-editor-block-list__layout")}),[]),Object(r.useEffect)((function(){if(p)f.current.style.display="none";else{f.current.style.display="";var e=(l+.5)*(i.A+i.z),t=d?-1:1;f.current.style.transform="translateX(calc(".concat(50*t,"% - ").concat(1,"px - ").concat(t*e,"px))")}}),[l,p,f,d]);var m=Object(a.useDispatch)("amp/story").setCurrentPage,b=Object(a.useDispatch)("core/block-editor").selectBlock,g=function(e){m(e),b(e)};return p?Object(r.createElement)(Pe,null):Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("div",{className:"amp-story-editor-carousel-navigation"},Object(r.createElement)(o.IconButton,{icon:d?"arrow-right-alt2":"arrow-left-alt2",label:Object(c.__)("Previous Page","amp"),onClick:function(e){e.preventDefault(),g(s)},disabled:null===s}),Object(r.createElement)(x,{pages:n,currentPage:e,onClick:g}),Object(r.createElement)(o.IconButton,{icon:d?"arrow-left-alt2":"arrow-right-alt2",label:Object(c.__)("Next Page","amp"),onClick:function(e){e.preventDefault(),g(u)},disabled:null===u})))}),I=n(24),B=n.n(I),A=n(28),T=n.n(A),D=n(25),N=n.n(D),R=n(26),M=n.n(R),L=n(18),F=n.n(L),H=n(27),z=n.n(H),W=n(10);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V(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 G(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function K(e){return G(e)}function $(e){return G(e,!0)}function Y(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,c=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=c.clientLeft||a.clientLeft||0,top:r-=c.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=K(r),t.top+=$(r),t}var X,Q=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+quot;),"i"),J=/^(top|right|bottom|left)#x2F;,Z="currentStyle",ee="runtimeStyle",te="left",ne="px";function re(e,t){for(var n=0;n<e.length;n++)t(e[n])}function oe(e){return"border-box"===X(e,"boxSizing")}"undefined"!=typeof window&&(X=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,a=n||o.defaultView.getComputedStyle(e,null);return a&&(r=a.getPropertyValue(t)||a[t]),r}:function(e,t){var n=e[Z]&&e[Z][t];if(Q.test(n)&&!J.test(t)){var r=e.style,o=r[te],a=e[ee][te];e[ee][te]=e[Z][te],r[te]="fontSize"===t?"1em":n||0,n=r.pixelLeft+ne,r[te]=o,e[ee][te]=a}return""===n?"auto":n});var ae=["margin","border","padding"],ce=-1,ie=2,le=1;function se(e,t,n){var r,o,a,c=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var i=void 0;i="border"===r?"".concat(r+n[a],"Width"):r+n[a],c+=parseFloat(X(e,i))||0}return c}function ue(e){return null!=e&&e==e.window}var pe={};function de(e,t,n){if(ue(e))return"width"===t?pe.viewportWidth(e):pe.viewportHeight(e);if(9===e.nodeType)return"width"===t?pe.docWidth(e):pe.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,a=(X(e),oe(e)),c=0;(null==o||o<=0)&&(o=void 0,(null==(c=X(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===n&&(n=a?le:ce);var i=void 0!==o||a,l=o||c;if(n===ce)return i?l-se(e,["border","padding"],r):c;if(i){var s=n===ie?-se(e,["border"],r):se(e,["margin"],r);return l+(n===le?0:s)}return c+se(e,ae.slice(n),r)}re(["Width","Height"],(function(e){pe["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],pe["viewport".concat(e)](n))},pe["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var fe={position:"absolute",visibility:"hidden",display:"block"};function me(e){var t,n=arguments;return 0!==e.offsetWidth?t=de.apply(void 0,n):function(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}(e,fe,(function(){t=de.apply(void 0,n)})),t}function be(e,t,n){var r=n;if("object"!==q(t))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):X(e,t);for(var o in t)t.hasOwnProperty(o)&&be(e,o,t[o])}re(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);pe["outer".concat(t)]=function(t,n){return t&&me(t,e,n?0:le)};var n="width"===e?["Left","Right"]:["Top","Bottom"];pe[e]=function(t,r){if(void 0===r)return t&&me(t,e,ce);if(t){X(t);return oe(t)&&(r+=se(t,["padding","border"],n)),be(t,e,r)}}}));var ge=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(n,!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return Y(e);!function(e,t){"static"===be(e,"position")&&(e.style.position="relative");var n,r,o=Y(e),a={};for(r in t)t.hasOwnProperty(r)&&(n=parseFloat(be(e,r))||0,a[r]=n+t[r]-o[r]);be(e,a)}(e,t)},isWindow:ue,each:re,css:be,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var r in e)e.hasOwnProperty(r)&&(t.overflow[r]=e.overflow[r]);return t},scrollLeft:function(e,t){if(ue(e)){if(void 0===t)return K(e);window.scrollTo(t,$(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(ue(e)){if(void 0===t)return $(e);window.scrollTo(K(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},pe);var he=function(e,t,n){n=n||{},9===t.nodeType&&(t=ge.getWindow(t));var r=n.allowHorizontalScroll,o=n.onlyScrollIfNeeded,a=n.alignWithTop,c=n.alignWithLeft,i=n.offsetTop||0,l=n.offsetLeft||0,s=n.offsetBottom||0,u=n.offsetRight||0;r=void 0===r||r;var p,d,f,m,b,g,h,O,y,v,j=ge.isWindow(t),k=ge.offset(e),w=ge.outerHeight(e),E=ge.outerWidth(e);j?(h=t,v=ge.height(h),y=ge.width(h),O={left:ge.scrollLeft(h),top:ge.scrollTop(h)},b={left:k.left-O.left-l,top:k.top-O.top-i},g={left:k.left+E-(O.left+y)+u,top:k.top+w-(O.top+v)+s},m=O):(p=ge.offset(t),d=t.clientHeight,f=t.clientWidth,m={left:t.scrollLeft,top:t.scrollTop},b={left:k.left-(p.left+(parseFloat(ge.css(t,"borderLeftWidth"))||0))-l,top:k.top-(p.top+(parseFloat(ge.css(t,"borderTopWidth"))||0))-i},g={left:k.left+E-(p.left+f+(parseFloat(ge.css(t,"borderRightWidth"))||0))+u,top:k.top+w-(p.top+d+(parseFloat(ge.css(t,"borderBottomWidth"))||0))+s}),b.top<0||g.top>0?!0===a?ge.scrollTop(t,m.top+b.top):!1===a?ge.scrollTop(t,m.top+g.top):b.top<0?ge.scrollTop(t,m.top+b.top):ge.scrollTop(t,m.top+g.top):o||((a=void 0===a||!!a)?ge.scrollTop(t,m.top+b.top):ge.scrollTop(t,m.top+g.top)),r&&(b.left<0||g.left>0?!0===c?ge.scrollLeft(t,m.left+b.left):!1===c?ge.scrollLeft(t,m.left+g.left):b.left<0?ge.scrollLeft(t,m.left+b.left):ge.scrollLeft(t,m.left+g.left):o||((c=void 0===c||!!c)?ge.scrollLeft(t,m.left+b.left):ge.scrollLeft(t,m.left+g.left)))},Oe=n(12),ye=n(38),ve=n.n(ye),je=n(39),ke=n(56),we=(n(75),function(e){return e.stopPropagation()}),Ee=function(e){function t(e){var n;B()(this,t),n=N()(this,M()(t).call(this,e));var o=e.autocompleteRef;return n.onChange=n.onChange.bind(F()(n)),n.onKeyDown=n.onKeyDown.bind(F()(n)),n.autocompleteRef=o||Object(r.createRef)(),n.inputRef=Object(r.createRef)(),n.updateSuggestions=Object(W.throttle)(n.updateSuggestions.bind(F()(n)),200),n.suggestionNodes=[],n.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null},n}return z()(t,e),T()(t,[{key:"componentDidUpdate",value:function(){var e=this,t=this.state,n=t.showSuggestions,r=t.selectedSuggestion;n&&null!==r&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,he(this.suggestionNodes[r],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){e.scrollingIntoView=!1}),100))}},{key:"componentWillUnmount",value:function(){delete this.suggestionsRequest,this.isStillMounted=!1}},{key:"componentDidMount",value:function(){this.isStillMounted=!0}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"fetchPostSuggestions",value:function(e){var t=this,n=this.props.searchablePostTypes||["post"],r=this.suggestionsRequest=ve()({path:Object(je.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,subtype:n.join(",")})}).then((function(e){t.isStillMounted&&t.suggestionsRequest===r&&(t.setState({suggestions:Object(W.map)(e,(function(e){return{id:e.id,title:Object(ke.decodeEntities)(e.title)||Object(c.__)("(no title)","amp"),postType:e.subtype}})),loading:!1}),Boolean(e.length)?t.props.debouncedSpeak(Object(c.sprintf)(Object(c._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"amp"),e.length),"assertive"):t.props.debouncedSpeak(Object(c.__)("No results.","amp"),"assertive"))})).catch((function(){t.isStillMounted&&t.suggestionsRequest===r&&t.setState({loading:!1})}))}},{key:"updateSuggestions",value:function(e){e.length<2?this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1}):(this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0}),this.fetchPostSuggestions(e))}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.updateSuggestions(t)}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,a=t.loading;if(n&&o.length&&!a){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case S.UP:e.stopPropagation(),e.preventDefault();var l=r?r-1:o.length-1;this.setState({selectedSuggestion:l});break;case S.DOWN:e.stopPropagation(),e.preventDefault();var s=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:s});break;case S.TAB:null!==this.state.selectedSuggestion&&(this.selectPost(i),this.props.speak(Object(c.__)("Post selected.","amp")));break;case S.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectPost(i));break;case S.ESCAPE:e.stopPropagation(),e.preventDefault(),this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}else switch(e.keyCode){case S.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case S.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectPost",value:function(e){this.props.onSelect(e.id,e.postType),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectPost(e),this.inputRef.current.focus()}},{key:"render",value:function(){var e=this,t=this.props,n=t.autoFocus,a=void 0===n||n,i=t.value,l=void 0===i?"":i,s=t.instanceId,u=t.className,p=t.id,d=void 0===p?"post-selector":p,f=t.placeholder,m=t.labelText,b=this.state,g=b.showSuggestions,O=b.suggestions,y=b.selectedSuggestion,v=b.loading,j="block-editor-post-input-suggestions-".concat(s),k="block-editor-post-input-suggestion-".concat(s);return Object(r.createElement)("div",{className:h()("editor-post-input block-editor-post-input",u)},m&&Object(r.createElement)("label",{htmlFor:d},m),Object(r.createElement)("input",{id:d,type:"text","aria-label":Object(c.__)("Post search","amp"),required:!0,value:l,onChange:this.onChange,onInput:we,onClick:we,placeholder:f||Object(c.__)("Type to search","amp"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":g,"aria-autocomplete":"list","aria-owns":j,"aria-activedescendant":null!==y?"".concat(k,"-").concat(y):void 0,ref:this.inputRef,autoFocus:a}),v&&Object(r.createElement)(o.Spinner,null),g&&Boolean(O.length)&&Object(r.createElement)(o.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(r.createElement)("div",{className:h()("editor-post-input__suggestions","block-editor-post-input__suggestions","".concat(u,"__suggestions")),id:j,ref:this.autocompleteRef,role:"listbox"},O.map((function(t,n){return Object(r.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:"".concat(k,"-").concat(n),ref:e.bindSuggestionNode(n),className:h()("editor-post-input__suggestion block-editor-post-input__suggestion",{"is-selected":n===y}),onClick:function(){return e.handleOnClick(t)},"aria-selected":n===y},t.title)})))))}}]),t}(r.Component),_e=Object(Oe.compose)(Oe.withSafeTimeout,o.withSpokenMessages,Oe.withInstanceId)(Ee),Se=function(e){var t=e.page,n=t.clientId,c=Object(a.useSelect)((function(e){return(0,e("amp/story").getBlockIndex)(n)}),[n]),i=Object(a.useDispatch)("amp/story").movePageToPosition,l=Object(r.useState)(!1),s=b()(l,2),u=s[0],p=s[1],d=function(e,t){var r=function(e){var t={srcRootClientId:null,srcClientId:null,srcIndex:null,type:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("text")))}catch(e){return t}return t}(e),o=r.srcClientId,a=r.srcIndex,l=r.type;if("block"===l&&o!==n){var s=function(e){if(void 0!==c)return"right"===e.x?c+1:c}(t);i(o,a<c?s-1:s)}},f="reorder-page-".concat(n),m={type:"block",srcIndex:c,srcClientId:n};return Object(r.createElement)("div",{className:"amp-story-reorderer-item"},Object(r.createElement)(o.Draggable,{elementId:f,transferData:m,onDragStart:function(){return p(!0)},onDragEnd:function(){return p(!1)}},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.DropZone,{className:u?"is-dragging-page":void 0,onDrop:d}),Object(r.createElement)("div",{className:"amp-story-reorderer-item-page",id:f},Object(r.createElement)("div",{className:"amp-story-page-preview",onDragStart:n,onDragEnd:a,draggable:!0},Object(r.createElement)(w,t))))})))},Pe=(n(76),Object(a.withSelect)((function(e){return{pages:(0,e("core/block-editor").getBlocksByClientId)((0,e("amp/story").getBlockOrder)())}}))((function(e){var t=e.pages;return Object(r.createElement)(o.DropZoneProvider,null,Object(r.createElement)("div",{className:"amp-story-reorderer"},t.map((function(e){return Object(r.createElement)(Se,{key:"page-".concat(e.clientId),page:e})}))))}))),xe=(n(77),function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M14 0h10v2H14V0zm0 7h10v2H14V7zm0 7h10v2H14v-2zm-2 1l-5 4v-3.069C3.06 15.436 0 12.072 0 8c0-4.411 3.589-8 8-8h3v2H8C4.691 2 2 4.691 2 8c0 2.967 2.167 5.431 5 5.91V11l5 4z",fill:"#555D66"}))});xe.defaultProps={width:"24",height:"19",viewBox:"0 0 24 19",xmlns:"http://www.w3.org/2000/svg"};var Ce=function(){var e=Object(a.useSelect)((function(e){return{isReordering:e("amp/story").isReordering(),blockOrder:e("core/block-editor").getBlockOrder()}}),[]),t=e.isReordering,n=e.blockOrder,i=Object(a.useDispatch)("core/block-editor").clearSelectedBlock,l=Object(a.useDispatch)("amp/story"),s=l.startReordering,u=l.saveOrder,p=l.resetOrder;return t?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.IconButton,{className:"amp-story-controls-reorder-cancel",onClick:function(){return p(n)},icon:"no-alt"},Object(c.__)("Cancel","amp")),Object(r.createElement)(o.Button,{className:"amp-story-controls-reorder-save",onClick:u,isLarge:!0,isPrimary:!0},Object(c.__)("Save Changes","amp"))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(_t,null),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-reorder",icon:xe({width:24,height:19}),label:Object(c.__)("Reorder Pages","amp"),onClick:function(){i(),s(n)}}))},Ie=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor").getBlockOrder;return{currentPage:t(),index:n(t()).length}}),[]),t=e.currentPage,n=e.index,c=Object(f.X)(),i=Object(a.useDispatch)("core/block-editor").insertBlock,l=Object(r.useCallback)((function(e){var r=Object(j.createBlock)(e,{});i(r,n,t)}),[t,n,i]);if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;return["amp/amp-story-text","amp/amp-story-cta"].map((function(e){if(!c(e,t))return null;var n=Object(j.getBlockType)(e);return Object(r.createElement)(o.IconButton,{key:e,icon:Object(r.createElement)(k.BlockIcon,{icon:n.icon}),onClick:function(){return l(e)},label:n.title,labelPosition:"bottom"})}))},Be=n(6),Ae=n.n(Be),Te=function(e){var t=e.srcBlockName,n=e.srcClientId,c=Object(f.y)(t),l=Object(a.useDispatch)("core/block-editor").updateBlockAttributes;return Object(r.createElement)(o.DropZone,{className:"editor-block-drop-zone",key:n,onDrop:function(e){var t,r,o,a;if(c){r="amp-story-cta-button-".concat(n),o="clone-amp-story-cta-button-".concat(n);var s="#block-".concat(n," .editor-block-list__block-edit");a=document.querySelector(s)}else r="block-".concat(n),o="clone-block-".concat(n),a=document.querySelector('div[data-amp-selected="parent"] .editor-inner-blocks');var u=document.getElementById(r),p=document.getElementById(o);if(u&&p&&a){c||(p.parentNode.style.visibility="hidden",p.parentNode.style.transform="none");var d=p.getBoundingClientRect(),m=a.getBoundingClientRect(),b=c?"btnPositionLeft":"positionLeft",g=c?"btnPositionTop":"positionTop",h=i.x;c&&(h=i.y),l(n,(t={},Ae()(t,b,Object(f.r)("x",d.left-m.left)),Ae()(t,g,Object(f.r)("y",d.top-m.top,h)),t))}else e.preventDefault()}})},De=n(15),Ne=n.n(De),Re=n(57),Me=n.n(Re)()((function(e,t,n){var r="function"==typeof t?t(e):t,o=r.reduce((function(t,n,o){return Math.abs(n-e)<Math.abs(r[t]-e)?o:t}),0),a=Math.abs(r[o]-e);return 0===n||a<n?r[o]:null})),Le=n(42),Fe=n.n(Le);function He(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 ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var We=function(e,t){return function(n,r,o){if((r=Math.round(r))<e||r>t)return!0;var a;if(n.hasOwnProperty(r)){if(a=o,n[r].find((function(e){return Fe()(a[0],e[0])&&Fe()(a[1],e[1])})))return!0;n[r].push(o)}else n[r]=[o];return n[r]=n[r].sort(),!0}},qe=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Proxy(ze(Ae()({},t/2,[e(t/2)]),n?Ae()({0:[e(0)]},t,[e(t)]):{}),{set:We(0,t)})},Ue=function(e,t,n,r){var o=b()(n,2),a=o[0],c=o[1],i=b()(r,2),l=i[0],s=i[1];return function(n){return function(r,o){var i=qe(e,t),u=qe(e,t,!1),p=!0,d=!1,f=void 0;try{for(var m,b=n[Symbol.iterator]();!(p=(m=b.next()).done);p=!0){var g=m.value,h=g[a],O=g[c],y=(h+O)/2,v=Math.min(r,g[l]),j=Math.max(o,g[s]);i[h]=e(h,v,j),i[O]=e(O,v,j),u[y]=e(y,v,j)}}catch(e){d=!0,f=e}finally{try{p||null==b.return||b.return()}finally{if(d)throw f}}return[i,u]}}},Ve=Ue((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.x;return[[e,t],[e,n]]}),i.z,["left","right"],["top","bottom"]),Ge=Ue((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.z;return[[t,e],[n,e]]}),i.x,["top","bottom"],["left","right"]),Ke=n(29),$e=n.n(Ke);function Ye(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 Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qe,Je,Ze=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e){var t=e.value,n=e.matcher,r=$e()(e,["value","matcher"]),o=n(t);return o?Xe({value:o,distance:Math.abs(o-t)},r):null})).filter(Boolean).reduce((function(e,t){return t.distance<e.distance?t:e}),{distance:Number.MAX_VALUE,value:null})},et=function(e,t,n,r,o){var a=Object.keys(e),c=Object.keys(t),i=(n+r)/2,l=function(e){return function(t){return Me(t,e,o)}},s=Ze({value:n,matcher:l(a),isEdgeTarget:!0},{value:r,matcher:l(a),isEdgeTarget:!0},{value:i,matcher:l(c),isEdgeTarget:!1}),u=s.value,p=s.isEdgeTarget;return u?p?e[u]:t[u]:[]},tt=n(58),nt=n.n(tt),rt=(n(88),Object(r.createContext)()),ot=function(e){var t=e.children,n=Object(r.useState)([]),a=b()(n,2),c=a[0],l=a[1],s=nt()(l,10),u={setSnapLines:s,clearSnapLines:function(){return s([])}};return Object(r.createElement)(rt.Provider,{value:u},t,Boolean(c.length)&&Object(r.createElement)(o.SVG,{viewBox:"0 0 ".concat(i.z," ").concat(i.x),className:"amp-story-page-snap-lines"},c.map((function(e,t){var n=b()(e,2),o=b()(n[0],2),a=o[0],c=o[1],i=b()(n[1],2),l=i[0],s=i[1];return Object(r.createElement)("line",{key:t,x1:a,y1:c,x2:l,y2:s})}))))},at=Object(Oe.createHigherOrderComponent)((function(e){return function(t){return Object(r.createElement)(rt.Consumer,null,(function(n){return Object(r.createElement)(e,s()({},t,n))}))}}),"withSnapContext"),ct=Object(a.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlocksByClientId,a=r.getBlockRootClientId,c=r.getBlock,i=r.getBlockOrder,l=e("amp/story").getCurrentPage,s=a(n),u={horizontalTargets:function(){return[]},verticalTargets:function(){return[]},parentBlockElement:null};if(l()!==s)return u;var p=Object(f.j)(c(s));if(!p)return u;var d=o(i(s)).filter((function(e){return e.clientId!==n})).map(f.j).filter(Boolean).map((function(e){return Object(f.u)(e,p)}));return{horizontalTargets:Ve(d),verticalTargets:Ge(d),parentBlockElement:p}})),it=Object(Oe.compose)(ct,at),lt=Object(Oe.createHigherOrderComponent)(it,"withSnapTargets"),st=i.z+i.A,ut=window,pt=ut.Image,dt=ut.navigator,ft="components-draggable__clone",mt=function(){return/Chrome/i.test(dt.userAgent)},bt=function(){return Ne()(document.getElementById("editor").querySelectorAll("iframe")).length>0},gt=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o))),Ae()(F()(n),"onDragEnd",(function(e){var t=n.props,r=t.clearHighlight,o=t.dropElementByOffset,a=t.blockName,c=t.setTimeout,l=t.clearSnapLines,s=t.isRTL,u=t.onDragEnd,p=void 0===u?W.noop:u;if(e&&e.preventDefault(),r(),0!==n.pageOffset){var d,m,b,g,h=parseInt(n.cloneWrapper.style.top),O=parseInt(n.cloneWrapper.style.left)+(s?1:-1)*(n.pageOffset*st);Object(f.y)(a)?(m=i.y,b="btnPositionLeft",g="btnPositionTop"):(m=i.x,b="positionLeft",g="positionTop");var y=(d={},Ae()(d,b,Object(f.r)("x",O,i.z)),Ae()(d,g,Object(f.r)("y",h,m)),d);o(n.pageOffset,y)}n.resetDragState(),l(),c(p)})),Ae()(F()(n),"onDragOver",(function(e){var t=n.props,r=t.blockName,o=t.setSnapLines,a=t.clearSnapLines,c=t.parentBlockElement,l=t.horizontalTargets,s=t.verticalTargets,u=t.setHighlightByOffset,p=t.isRTL,d=parseInt(n.cloneWrapper.style.top)+e.clientY-n.cursorTop,m=parseInt(n.cloneWrapper.style.left)+e.clientX-n.cursorLeft;if(d!==Je||m!==Qe){var g=Object(f.y)(r)?n.cloneWrapper.querySelector(".amp-story-cta-button"):n.cloneWrapper.querySelector(".wp-block"),h=Object(f.u)(g,c),O=h.top,y=h.right,v=h.bottom,j=h.left;if(!e.getModifierState("Alt")){var k=l(O,v),w=b()(k,2),E=w[0],_=w[1],S=s(j,y),P=b()(S,2),x=P[0],C=P[1];o([].concat(Ne()(et(E,_,j,y,i.k)),Ne()(et(x,C,O,v,i.k))))}else a();Object(f.y)(r)?n.cloneWrapper.style.top=d>=0?"".concat(d,"px"):"0px":n.cloneWrapper.style.top="".concat(d,"px"),n.cloneWrapper.style.left="".concat(m,"px"),n.cursorLeft=e.clientX,n.cursorTop=e.clientY,Je=d,Qe=m;var I=parseInt(n.cloneWrapper.style.left)+n.cursorLeftInsideElement,B=I>st,A=I<-i.A;n.pageOffset=0,(A||B)&&(n.pageOffset=A?-Math.ceil((-i.A-I)/st):Math.ceil((I-st)/st),p&&(n.pageOffset*=-1)),u(n.pageOffset)}})),Ae()(F()(n),"onDrop",(function(){n.onDragEnd(null)})),Ae()(F()(n),"onDragStart",(function(e){var t=n.props,r=t.blockName,o=t.elementId,a=t.transferData,c=t.onDragStart,l=void 0===c?W.noop:c,s=t.clearSnapLines,u=Object(f.y)(r),p=u?document.getElementById(o):document.getElementById(o).parentNode;if(p)if(p.closest('div[data-type="amp/amp-story-page"]')){var d=new pt;d.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",e.dataTransfer.setDragImage(d,0,0),e.dataTransfer.setData("text",JSON.stringify(a));var m=p.parentNode;n.cloneWrapper=document.createElement("div"),n.cloneWrapper.classList.add(ft),n.cloneWrapper.style.width="".concat(p.clientWidth,"px"),n.cloneWrapper.style.height="".concat(p.clientHeight,"px");var b=p.cloneNode(!0);n.cloneWrapper.style.transform=b.style.transform;var g=u?i.y:i.x,h=Object(f.s)("y",parseInt(b.style.top),g),O=Object(f.s)("x",parseInt(b.style.left),i.z);n.cloneWrapper.style.top="".concat(h,"px"),n.cloneWrapper.style.left="".concat(O,"px");var y=Object(f.u)(m,document.documentElement).left+O;n.cursorLeftInsideElement=e.clientX-y,b.id="clone-".concat(o),b.style.top=0,b.style.left=0,b.style.transform="none",Ne()(b.querySelectorAll("iframe")).forEach((function(e){return e.parentNode.removeChild(e)})),n.cloneWrapper.appendChild(b),m.appendChild(n.cloneWrapper),n.cursorLeft=e.clientX,n.cursorTop=e.clientY,document.body.classList.add("is-dragging-components-draggable"),document.addEventListener("dragover",n.onDragOver),mt()&&bt()&&(n.isChromeAndHasIframes=!0,document.addEventListener("drop",n.onDrop)),s(),n.props.setTimeout(l)}else e.preventDefault();else e.preventDefault()})),Ae()(F()(n),"resetDragState",(function(){document.removeEventListener("dragover",n.onDragOver),n.cloneWrapper&&n.cloneWrapper.parentNode&&(n.cloneWrapper.parentNode.removeChild(n.cloneWrapper),n.cloneWrapper=null),n.isChromeAndHasIframes&&(n.isChromeAndHasIframes=!1,document.removeEventListener("drop",n.onDrop)),document.body.classList.remove("is-dragging-components-draggable")})),n.isChromeAndHasIframes=!1,n}return z()(t,e),T()(t,[{key:"componentDidMount",value:function(){document.querySelectorAll('.block-editor-block-list__block[data-type="core/image"] img').forEach((function(e){e.setAttribute("draggable","false")}))}},{key:"componentWillUnmount",value:function(){this.resetDragState()}},{key:"render",value:function(){return(0,this.props.children)({onDraggableStart:this.onDragStart,onDraggableEnd:this.onDragEnd})}}]),t}(r.Component),ht=Object(Oe.compose)(lt,Oe.withSafeTimeout,Object(a.withSelect)((function(e){return{isRTL:e("core/block-editor").getSettings().isRTL}})))(gt),Ot=function(e){var t=e.children,n=e.clientId,o=e.blockName,c=e.blockElementId,i=e.onDragStart,l=e.onDragEnd,s=Object(a.useSelect)((function(e){return e("core/block-editor").getBlockRootClientId(n)}),[n]).rootClientId,u={type:"block",srcIndex:Object(a.useSelect)((function(e){return e("core/block-editor").getBlockIndex(n,s)}),[n,s]).index,srcRootClientId:s,srcClientId:n},p=Object(f.Y)(n),d=p.moveBlockToPage,m=p.getPageByOffset,b=Object(f.X)(),g=Object(r.useRef)({pageId:null,element:null,classes:[]}),h=function(){var e;g.current.element&&(e=g.current.element.classList).remove.apply(e,Ne()(g.current.classes));g.current={pageId:null,element:null,classes:[]}};return Object(r.createElement)(ht,{blockName:o,elementId:c,transferData:u,onDragStart:i,onDragEnd:l,clientId:n,clearHighlight:h,setHighlightByOffset:function(e){var t=m(e);if(t!==g.current.pageId&&(h(),t)){var n,r=0===e||b(o,t),a=["amp-page-draggable-hover","amp-page-draggable-hover-".concat(o.replace(/\W/g,"-")),r?"amp-page-draggable-hover-droppable":"amp-page-draggable-hover-undroppable"],c=document.getElementById("block-".concat(t));(n=c.classList).add.apply(n,a),g.current={element:c,pageId:t,classes:a}}},dropElementByOffset:function(e,t){var n=m(e);n&&b(o,n)&&d(n,t)}},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})}))},yt=function(e){var t=e.children,n=e.blockName,o=e.className,a=e.onDragStart,c=e.onDragEnd,i=e.blockElementId,l=e.clientId;return Object(r.createElement)(Ot,{clientId:l,blockElementId:i,blockName:n,onDragStart:a,onDragEnd:c},(function(e){var n=e.onDraggableStart,a=e.onDraggableEnd;return Object(r.createElement)("div",{className:o,"aria-hidden":"true",onDragStart:n,onDragEnd:a,draggable:!0},t)}))},vt=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o))),Ae()(F()(n),"proxyEvent",(function(e){var t=Boolean(e.nativeEvent._blockHandled);e.nativeEvent._blockHandled=!0;var r=n.eventMap[e.type];t&&(r+="Handled"),n.props[r]&&n.props[r](e)})),n.eventMap={},n}return z()(t,e),T()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,o=void 0===n?[]:n,a=t.forwardedRef,c=$e()(t,["childHandledEvents","forwardedRef"]),i=Object(W.reduce)([].concat(Ne()(o),Ne()(Object.keys(c))),(function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?#x2F;);if(r){Boolean(r[2])&&delete c[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t}),{});return Object(r.createElement)("div",s()({ref:a},c,i))}}]),t}(r.Component),jt=function(e,t){return Object(r.createElement)(vt,s()({},e,{forwardedRef:t}))};jt.displayName="IgnoreNestedEvents";var kt=Object(r.forwardRef)(jt),wt=(n(89),function(e){var t=e.children,n=e.blockName,o=e.isDraggable,a=e.isMovable,c=e.onDragStart,i=e.clientId,l=e.blockElementId;return a&&o?Object(r.createElement)(kt,{childHandledEvents:["onDragStart","onMouseDown"],className:"block-mover"},Object(r.createElement)("div",null,Object(r.createElement)(yt,{children:t,clientId:i,blockElementId:l,blockName:n,onDragStart:c}))):t}),Et=(n(90),function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M9 7h7v2H9v7H7V9H0V7h7V0h2v7z",fill:"#FFF"}))});Et.defaultProps={width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};var _t=function(){var e=Object(a.useDispatch)("core/block-editor").insertBlock;return Object(r.createElement)("div",{className:"block-editor-inserter"},Object(r.createElement)(o.IconButton,{icon:Et({width:16,height:16}),label:Object(c.__)("Insert Blank Page","amp"),onClick:function(){e(Object(j.createBlock)("amp/amp-story-page"))},className:"editor-inserter__amp-inserter"}))},St=n(59),Pt=n.n(St),xt=function(e){var t=e.length,n=e.queryLength,o=e.minQueryLength,a=e.selectedOption,c=e.selectedOptionIndex,i=e.tQueryTooShort,l=e.tNoResults,s=e.tSelectedOption,u=e.tResults,p=n<o,d=0===t,f=a?s(a,t,c):"",m=null;return m=p?i(o):d?l():u(t,f),Object(r.createElement)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},m,p&&",".repeat(n))},Ct=(n(92),n(93),function(e){function t(){return B()(this,t),N()(this,M()(t).apply(this,arguments))}return z()(t,e),T()(t,[{key:"handleInputBlur",value:function(){}},{key:"handleClearClick",value:function(){this.state.query="",this.forceUpdate(),this.props.onConfirm(null)}},{key:"render",value:function(){var e=this,t=this.props,n=t.cssNamespace,a=t.displayMenu,i=t.id,l=t.minLength,s=t.name,u=t.placeholder,p=t.required,d=t.tNoResults,f=t.tStatusQueryTooShort,m=t.tStatusSelectedOption,b=t.tStatusResults,g=t.ariaLabelBy,h=this.state,O=h.focused,y=h.hovered,v=h.menuOpen,j=h.options,k=h.query,w=h.selected,E=this.hasAutoselect(),_=-1===O,S=0===j.length,P=k?k.length:0,x=0!==P,C=P>=l,I=this.props.showNoOptionsFound&&_&&S&&x&&C,B="".concat(n,"__wrapper"),A="".concat(n,"__input"),T=null!==O?" ".concat(A,"--focused"):"",D=this.props.showAllValues?" ".concat(A,"--show-all-values"):" ".concat(A,"--default"),N=-1!==O&&null!==O,R="".concat(n,"__menu"),M="".concat(R,"--").concat(a),L=v||I,F="".concat(R,"--").concat(L?"visible":"hidden"),H="".concat(n,"__option"),z="".concat(n,"__hint"),W=this.templateInputValue(j[w]),q=W&&0===W.toLowerCase().indexOf(k.toLowerCase())&&E?k+W.substr(P):"";return Object(r.createElement)("div",{className:B,onKeyDown:this.handleKeyDown,role:"combobox",tabIndex:"-1","aria-expanded":v?"true":"false"},Object(r.createElement)(xt,{length:j.length,queryLength:P,minQueryLength:l,selectedOption:this.templateInputValue(j[w]),selectedOptionIndex:w,tQueryTooShort:f,tNoResults:d,tSelectedOption:m,tResults:b}),q&&Object(r.createElement)("span",null,Object(r.createElement)("input",{className:z,readOnly:!0,tabIndex:"-1",value:q})),Object(r.createElement)("input",{"aria-activedescendant":N?"".concat(i,"__option--").concat(O):"","aria-owns":"".concat(i,"__listbox"),autoComplete:"off",className:"".concat(A).concat(T).concat(D),id:i,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,name:s,placeholder:u,ref:function(t){e.elementReferences[-1]=t},type:"text",required:p,value:k}),k&&!v&&C&&Object(r.createElement)(o.IconButton,{icon:"no",label:Object(c.__)("Clear Font","amp"),onClick:function(t){return e.handleClearClick(t)},className:"autocomplete__icon"}),Object(r.createElement)("ul",{className:"".concat(R," ").concat(M," ").concat(F),onMouseLeave:function(t){return e.handleListMouseLeave(t)},id:"".concat(i,"__listbox"),"aria-labelledby":g,role:"listbox"},j.map((function(t,n){var o=(-1===O?w===n:O===n)&&null===y?" ".concat(H,"--focused"):"",a=n%2?" ".concat(H,"--odd"):"";return Object(r.createElement)("li",{"aria-selected":O===n,className:"".concat(H).concat(o).concat(a),dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)},id:"".concat(i,"__option--").concat(n),key:n,onBlur:function(t){return e.handleOptionBlur(t,n)},onClick:function(t){return e.handleOptionClick(t,n)},onKeyDown:function(t){return e.handleOptionClick(t,n)},onMouseEnter:function(t){return e.handleOptionMouseEnter(t,n)},ref:function(t){e.elementReferences[n]=t},role:"option",tabIndex:"-1"})})),I&&Object(r.createElement)("li",{className:"".concat(H," ").concat(H,"--no-results"),role:"option",tabIndex:"-1"},d())))}}]),t}(Pt.a));var It=Object(Oe.withInstanceId)((function(e){var t=e.fonts,n=void 0===t?[]:t,a=e.onChange,i=void 0===a?function(){}:a,l=e.value,s=void 0===l?"":l,u=e.instanceId,p=n,d="amp-stories-font-family-picker-".concat(u);return Object(r.createElement)(o.BaseControl,{label:Object(c.__)("Font Family","amp"),id:d,help:Object(c.__)("Type to search for fonts","amp")},Object(r.createElement)(Ct,{id:d,name:d,source:function(e,t){t(e?p.filter((function(t){return-1!==t.name.toLowerCase().indexOf(e.toLowerCase())})):[])},templates:{suggestion:function(e){Object(f.C)(e.name);var t=e.fallbacks?", "+e.fallbacks.join(", "):"";return e&&"<span style='font-family: ".concat(e.name).concat(t,"'>").concat(e.name,"</span>")},inputValue:function(e){return e&&e.name}},ariaLabelBy:"".concat(d,"__help"),minLength:2,onConfirm:i,showAllValues:!1,confirmOnBlur:!1,defaultValue:s||"",dropdownArrow:function(){return""},preserveNullOptions:!0,placeholder:Object(c.__)("None","amp"),displayMenu:"overlay",tNoResults:function(){return Object(c.__)("No font found","amp")},tStatusQueryTooShort:function(e){// translators: %d: the number characters required to initiate a font search.
10
return Object(c.sprintf)(Object(c.__)("Type in %s or more characters for results","amp"),e)},tStatusSelectedOption:function(e,t){// translators: 1: the index of the selected result. 2: The total number of results.
11
return Object(c.sprintf)(Object(c.__)("%s (1 of %s) is selected","amp"),e,t)},tStatusResults:function(e,t){return Object(c.sprintf)(// translators: %d: The total number of results.
12
+ Object(c._n)("%d font is available. %s","%d fonts are available. %s",e,"amp"),e,t)}}))})),Bt=(n(94),function(e){var t=e.angle,n=e.initialAngle,a=e.blockElementId,i=e.className,l=e.speak,s=e.onRotateStart,u=e.onRotate,p=e.onRotateStop,d=e.snap,f=e.snapGap,m=e.children,g=Object(r.useState)(!1),O=b()(g,2),y=O[0],v=O[1],j=Object(r.useState)(t),k=b()(j,2),w=k[0],E=k[1],_=Object(r.useRef)(null);Object(r.useEffect)((function(){_.current=document.getElementById(a)}),[a]),Object(r.useEffect)((function(){_.current.style.transform="rotate(".concat(w,"deg)")}),[w]),Object(r.useEffect)((function(){_.current.classList.toggle("is-rotating",y)}),[y]);var P=Object(r.useCallback)((function(e){if(y){e.preventDefault();var t=e.keyCode;if(S.ESCAPE===t)v(!1),E(n),p&&p(e,n);else if(S.LEFT===t||S.RIGHT===t){var r=S.LEFT===t?w-30:w+30;r>360?r-=360:r<=-360&&(r+=360)
13
/* translators: %s: degrees */,l(Object(c.sprintf)(Object(c.__)("Rotating block by %s degrees","amp"),r)),E(r),u&&u(e,r)}else S.ENTER===t&&(
14
/* translators: %s: degrees */
15
+ l(Object(c.sprintf)(Object(c.__)("Saving block rotation of %s degrees","amp"),w)),p&&p(e))}}),[w,n,u,p,y,l]),x=Object(r.useCallback)((function(e){if(y){e.preventDefault();var t=_.current.getBoundingClientRect(),n=t.top,r=t.left+t.width/2,o=n+t.height/2,a=e.clientX-r,c=e.clientY-o,i=180/Math.PI,l=Math.ceil(-i*Math.atan2(a,c));if(!e.getModifierState("Alt")){var s=Me(l,d,f);null!==s&&(l=s)}w!==l&&(E(l),u&&u(e,l))}}),[w,y,d,f,u]),C=Object(r.useCallback)((function(e){y&&(e.preventDefault(),v(!1),p&&p(e,w))}),[w,y,p]);return Object(r.useEffect)((function(){return document.addEventListener("mousemove",x),document.addEventListener("mouseup",C),document.addEventListener("keyUp",P),function(){document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",C),document.removeEventListener("keyUp",P)}}),[x,C,P]),Object(r.createElement)("div",{className:h()(i,{"is-rotating":y})},Object(r.createElement)("div",{className:"rotatable-box-wrap"},Object(r.createElement)(o.Button,{role:"switch","aria-checked":y,onMouseDown:function(e){y||(e.button&&2===e.button||(e.preventDefault(),v(!0),s&&s(e)))},className:"rotatable-box-wrap__handle"},Object(r.createElement)("span",{className:"screen-reader-text"},Object(c.__)("Rotate Block","amp")))),m)});Bt.defaultProps={angle:0,initialAngle:0,snapGap:0};var At=Object(o.withSpokenMessages)(Bt),Tt=(n(95),function(e,t){function n(n){e.current&&!e.current.contains(n.target)&&t()}Object(r.useEffect)((function(){return e.current&&e.current.innerHTML&&document.addEventListener("mousedown",n),function(){document.removeEventListener("mousedown",n)}}))}),Dt="amp-story-right-click-menu__popover block-editor-block-settings-menu__popover editor-block-settings-menu__popover",Nt=function(e){var t=e.clientIds,n=e.clientX,l=e.clientY,s=e.insidePercentageX,u=e.insidePercentageY,p=Object(r.useState)(!0),d=b()(p,2),m=d[0],g=d[1],O=Object(a.useSelect)((function(e){return e("core/block-editor")}),[]),y=O.getBlock,v=O.getBlockOrder,k=O.getBlockRootClientId,w=O.getSettings,E=Object(a.useSelect)((function(e){return e("amp/story")}),[]),_=E.getCopiedMarkup,S=E.getCurrentPage,P=Object(a.useDispatch)("core/block-editor"),x=P.removeBlock,C=P.insertBlock,I=P.updateBlockAttributes,B=Object(a.useDispatch)("amp/story").setCopiedMarkup,A=w(),T=A.__experimentalCanUserUseUnfilteredHTML,D=A.isRTL,N=Object(f.X)(),R=Object(f.W)(),M=function(e){var t=y(e),n=Object(j.serialize)(t);B(n),Object(f.e)(n)},L=function(e,t){var n=Object(j.pasteHandler)({HTML:"",plainText:e,mode:"BLOCKS",tagName:null,canUserUseUnfilteredHTML:T}),r=function(e){var t;Object(f.A)(e)?t=y(e).clientId:t=k(e);return t}(t);if(r&&n.length){var o=v(r);n.forEach((function(e){N(e.name,r)?C(e,o.length,r).then((function(e){e.blocks.forEach((function(e){i.c.includes(e.name)&&I(e.clientId,{positionTop:u,positionLeft:s})}))})).catch((function(){R(e.name)})):R(e.name)}))}},F=function(e){var t=y(e);if(!i.o.includes(t.name)){var n,r;if(Object(f.A)(e))n="",r=Q.indexOf(e)+1;else n=k(e),r=null;var o=Object(j.cloneBlock)(t);C(o,r,n)}};Object(r.useEffect)((function(){g(!0)}),[t,n,l]);var H=Object(W.castArray)(t)[0],z=y(H),q=function(){g(!1)},U=Object(r.useRef)(null),V=Object(f.Y)(H),G=V.moveBlockToPage,K=V.getPageByOffset;Tt(U,q);var $={top:l,left:n},Y=D?"bottom right":"bottom left",X=[],Q=v(),J=Q.length,Z=J>1,ee=Object(f.A)(H);if(ee||(X=[{name:Object(c.__)("Copy Block","amp"),blockAction:M,params:[H],icon:"admin-page",className:"right-click-copy"},{name:Object(c.__)("Cut Block","amp"),blockAction:function(e){M(e),x(e)},params:[H],icon:"clipboard",className:"right-click-cut"}]),z&&!i.o.includes(z.name)&&(ee?X.push({name:Object(c.__)("Duplicate Page","amp"),blockAction:F,params:[H],icon:"admin-page",className:"right-click-duplicate-page"}):X.push({name:Object(c.__)("Duplicate Block","amp"),blockAction:F,params:[H],icon:"admin-page",className:"right-click-duplicate"})),z&&!ee&&Z){var te=S(),ne=Q.indexOf(te);if(ne>0){var re=K(-1);N(z.name,re)&&X.push({name:Object(c.__)("Send block to previous page","amp"),blockAction:G,params:[re],icon:D?"arrow-right-alt":"arrow-left-alt",className:"right-click-previous-page"})}if(ne<J-1){var oe=K(1);N(z.name,oe)&&X.push({name:Object(c.__)("Send block to next page","amp"),blockAction:G,params:[oe],icon:D?"arrow-left-alt":"arrow-right-alt",className:"right-click-next-page"})}}return ee?Z&&X.push({name:Object(c.__)("Remove Page","amp"),blockAction:x,params:[H],icon:"trash",className:"right-click-remove-page"}):X.push({name:Object(c.__)("Remove Block","amp"),blockAction:x,params:[H],icon:"trash",className:"right-click-remove"}),_().length&&X.push({name:Object(c.__)("Paste","amp"),blockAction:function(e){var t=window.navigator;if(t.clipboard&&t.clipboard.readText)t.clipboard.readText().then((function(t){L(t,e)})).catch((function(){var t=_();L(t,e)}));else{var n=_();L(n,e)}},params:[H,u,s],icon:"pressthis",className:"right-click-paste"}),Object(r.createElement)("div",{ref:U,className:"amp-right-click-menu__container",style:$},m&&Object(r.createElement)(o.Popover,{className:Dt,position:Y,onClose:q,focusOnMount:"firstElement"},Object(r.createElement)(o.NavigableMenu,{role:"menu"},X.map((function(e){return Object(r.createElement)(o.MenuGroup,{key:"action-".concat(e.name)},Object(r.createElement)(o.MenuItem,{className:h()(e.className,"editor-block-settings-menu__control block-editor-block-settings-menu__control"),onClick:function(){q(),e.blockAction.apply(e,Ne()(e.params))},icon:e.icon},e.name))})))))};n(96);var Rt=function(e){var t=e.value,n=e.options,a=e.defaultOption,c=e.onChange,i=e.label,l=e.id,s=e.renderToggle,u=e.renderOption,p=e.ariaLabel,d=n.find((function(e){return t&&e.value===t}))||a;return Object(r.createElement)(o.BaseControl,{label:i,id:l},Object(r.createElement)("div",{className:"components-preview-picker__buttons"},Object(r.createElement)(o.Dropdown,{className:"components-preview-picker__dropdown",contentClassName:"components-preview-picker__dropdown-content",position:"bottom",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(r.createElement)(o.Button,{className:"components-preview-picker__selector",isLarge:!0,onClick:n,"aria-expanded":t,"aria-label":p(d),id:l},s(d))},renderContent:function(){return Object(r.createElement)(o.NavigableMenu,null,[a].concat(Ne()(n)).map((function(e){var t=e.value===d.value;return Object(r.createElement)(o.Button,{key:e.value,onClick:function(){return c(e)},role:"menuitemradio","aria-checked":t},t&&Object(r.createElement)(o.Dashicon,{icon:"saved"}),u(e))})))}})))};var Mt=function(e){var t=e.icon,n=e.hasChildBlocksWithInserterSupport,o=e.onClick,a=e.isDisabled,c=e.title,i=e.className,l=$e()(e,["icon","hasChildBlocksWithInserterSupport","onClick","isDisabled","title","className"]),u=t?{backgroundColor:t.background,color:t.foreground}:{},p=t&&t.shadowColor?{backgroundColor:t.shadowColor}:{};return Object(r.createElement)("li",{className:"editor-block-types-list__list-item block-editor-block-types-list__list-item"},Object(r.createElement)("button",s()({className:h()("editor-block-types-list__item block-editor-block-types-list__item",i,{"editor-block-types-list__item-has-children block-editor-block-types-list__item-has-children":n}),onClick:function(e){e.preventDefault(),o()},disabled:a,"aria-label":c},l),Object(r.createElement)("span",{className:"editor-block-types-list__item-icon block-editor-block-types-list__item-icon",style:u},Object(r.createElement)(k.BlockIcon,{icon:t,showColors:!0}),n&&Object(r.createElement)("span",{className:"editor-block-types-list__item-icon-stack block-editor-block-types-list__item-icon-stack",style:p})),Object(r.createElement)("span",{className:"editor-block-types-list__item-title block-editor-block-types-list__item-title"},c)))};var Lt,Ft,Ht,zt,Wt,qt,Ut,Vt=function(e){var t=e.items,n=e.onSelect,o=e.onHover,a=void 0===o?function(){}:o,c=e.children;return(Object(r.createElement)("ul",{role:"list",className:"editor-block-types-list block-editor-block-types-list"},t&&t.map((function(e){return Object(r.createElement)(Mt,{key:e.id,className:Object(j.getBlockMenuDefaultClassName)(e.id),icon:e.icon,hasChildBlocksWithInserterSupport:e.hasChildBlocksWithInserterSupport,onClick:function(){n(e),a(null)},onFocus:function(){return a(e)},onMouseEnter:function(){return a(e)},onMouseLeave:function(){return a(null)},onBlur:function(){return a(null)},isDisabled:e.isDisabled,title:e.title})})),c))},Gt=function(e){return e.stopPropagation()},Kt=function(e,t){var n=$t(t),r=function(e){return-1!==$t(e).indexOf(n)},o=Object(j.getCategories)();return e.filter((function(e){var t=Object(W.find)(o,{slug:e.category});return r(e.title)||Object(W.some)(e.keywords,r)||t&&r(t.title)}))},$t=function(e){return e=(e=(e=(e=Object(W.deburr)(e)).replace(/^\//,"")).toLowerCase()).trim()},Yt=function(e){function t(){var e,n;B()(this,t);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(a))),Ae()(F()(n),"onChangeSearchInput",(function(e){n.filter(e.target.value)})),Ae()(F()(n),"onHover",(function(e){n.setState({hoveredItem:e});var t=n.props,r=t.showInsertionPoint,o=t.hideInsertionPoint;e?r():o()})),n.state={childItems:[],filterValue:"",hoveredItem:null,suggestedItems:[],reusableItems:[],itemsPerCategory:{},openPanels:["suggested"]},n.panels={},n.inserterResults=Object(r.createRef)(),n}return z()(t,e),T()(t,[{key:"componentDidMount",value:function(){this.filter()}},{key:"componentDidUpdate",value:function(e){e.items!==this.props.items&&this.filter(this.state.filterValue)}},{key:"bindPanel",value:function(e){var t=this;return function(n){t.panels[e]=n}}},{key:"onTogglePanel",value:function(e){var t=this;return function(){-1!==t.state.openPanels.indexOf(e)?t.setState({openPanels:Object(W.without)(t.state.openPanels,e)}):(t.setState({openPanels:[].concat(Ne()(t.state.openPanels),[e])}),t.props.setTimeout((function(){he(t.panels[e],t.inserterResults.current,{alignWithTop:!0})})))}}},{key:"filterOpenPanels",value:function(e,t,n,r){if(e===this.state.filterValue)return this.state.openPanels;if(!e)return["suggested"];var o=[];return r.length>0&&o.push("reusable"),n.length>0&&(o=o.concat(Object.keys(t))),o}},{key:"filter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.debouncedSpeak,r=t.items,o=t.rootChildBlocks,a=Kt(r,e),i=Object(W.filter)(a,(function(e){var t=e.name;return Object(W.includes)(o,t)})),l=[];if(!e){var s=this.props.maxSuggestedItems||9;l=Object(W.filter)(r,(function(e){return e.utility>0})).slice(0,s)}var u=Object(W.filter)(a,{category:"reusable"}),p=function(e){return Object(W.findIndex)(Object(j.getCategories)(),(function(t){return t.slug===e.category}))},d=Object(W.flow)((function(e){return Object(W.filter)(e,(function(e){return"reusable"!==e.category}))}),(function(e){return Object(W.sortBy)(e,p)}),(function(e){return Object(W.groupBy)(e,"category")}))(a);this.setState({hoveredItem:null,childItems:i,filterValue:e,suggestedItems:l,reusableItems:u,itemsPerCategory:d,openPanels:this.filterOpenPanels(e,d,a,u)});var f=Object.keys(d).reduce((function(e,t){return e+d[t].length}),0),m=Object(c.sprintf)(Object(c._n)("%d result found.","%d results found.",f,"amp"),f);n(m)}},{key:"onKeyDown",value:function(e){Object(W.includes)([S.LEFT,S.DOWN,S.RIGHT,S.UP,S.BACKSPACE,S.ENTER],e.keyCode)&&e.stopPropagation()}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,a=t.onSelect,i=this.state,l=i.hoveredItem,s=i.itemsPerCategory,u=i.openPanels,p=i.reusableItems,d=i.suggestedItems,f=function(e){return-1!==u.indexOf(e)};return Object(r.createElement)("div",{className:"editor-inserter__menu block-editor-inserter__menu amp__block-editor-inserter__menu",onKeyPress:Gt,onKeyDown:this.onKeyDown},Object(r.createElement)("label",{htmlFor:"block-editor-inserter__search-".concat(n),className:"screen-reader-text"},Object(c.__)("Search for an element","amp")),Object(r.createElement)("input",{id:"block-editor-inserter__search-".concat(n),type:"search",placeholder:Object(c.__)("Search for an element","amp"),className:"editor-inserter__search block-editor-inserter__search amp__block-editor-inserter__search",autoFocus:!0,onChange:this.onChangeSearchInput}),Object(r.createElement)("div",{className:"editor-inserter__results amp__block-editor-inserter__results block-editor-inserter__results",ref:this.inserterResults,tabIndex:"0",role:"region","aria-label":Object(c.__)("Available block types","amp")},Boolean(d.length)&&Object(r.createElement)(o.PanelBody,{title:Object(c._x)("Most Used","blocks","amp"),opened:f("suggested"),onToggle:this.onTogglePanel("suggested"),ref:this.bindPanel("suggested")},Object(r.createElement)(Vt,{items:d,onSelect:a,onHover:this.onHover})),Object(W.map)(Object(j.getCategories)(),(function(t){var n=s[t.slug];return n&&n.length?Object(r.createElement)(o.PanelBody,{key:t.slug,title:t.title,icon:t.icon,opened:f(t.slug),onToggle:e.onTogglePanel(t.slug),ref:e.bindPanel(t.slug)},Object(r.createElement)(Vt,{items:n,onSelect:a,onHover:e.onHover})):null})),Boolean(p.length)&&Object(r.createElement)(o.PanelBody,{className:"editor-inserter__reusable-blocks-panel block-editor-inserter__reusable-blocks-panel",title:Object(c.__)("Reusable","amp"),opened:f("reusable"),onToggle:this.onTogglePanel("reusable"),icon:"controls-repeat",ref:this.bindPanel("reusable")},Object(r.createElement)(Vt,{items:p,onSelect:a,onHover:this.onHover}),Object(r.createElement)("a",{className:"editor-inserter__manage-reusable-blocks block-editor-inserter__manage-reusable-blocks",href:Object(je.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(c.__)("Manage All Reusable Blocks","amp"))),Object(W.isEmpty)(d)&&Object(W.isEmpty)(p)&&Object(W.isEmpty)(s)&&Object(r.createElement)("p",{className:"editor-inserter__no-results block-editor-inserter__no-results"},Object(c.__)("No blocks found.","amp"))),l&&Object(j.isReusableBlock)(l)&&Object(r.createElement)(w,{name:l.name,attributes:l.initialAttributes}))}}]),t}(r.Component),Xt=Object(Oe.compose)(Object(a.withSelect)((function(e,t){var n=t.clientId,r=t.isAppender,o=t.rootClientId,a=e("core/block-editor"),c=a.getInserterItems,l=a.getBlockName,s=a.getBlockRootClientId,u=a.getBlockSelectionEnd,p=a.canInsertBlockType,d=a.getBlockListSettings,f=e("core/blocks").getChildBlockNames,m=e("amp/story").getCurrentPage,b=o;if(!b&&!n&&!r){var g=u();g&&(b=s(g)||void 0)}b||(b=m());var h=l(b),O=[].concat(Ne()(c()),Ne()(c(b))).filter((function(e){var t=e.name;return!!i.d.includes(t)||function(e,t){var n=d(t),r=p(e,t)&&n&&n.allowedBlocks.includes(e);return Boolean(r)}(t,m())}));return{rootChildBlocks:f(h),items:Ne()(new Set(O)),destinationRootClientId:b,currentPage:m()}})),Object(a.withDispatch)((function(e,t,n){var r=n.select;return{showInsertionPoint:function(){},hideInsertionPoint:function(){},onSelect:function(n){var o=e("core/block-editor"),a=o.replaceBlocks,c=o.insertBlock,l=r("core/block-editor").getSelectedBlock,s=t.isAppender,u=n.name,p=n.initialAttributes,d=l(),f=Object(j.createBlock)(u,p);if(!s&&d&&Object(j.isUnmodifiedDefaultBlock)(d))a(d.clientId,f);else{var m=i.d.includes(u)?void 0:t.destinationRootClientId;c(f,function(e){var n=r("core/block-editor"),o=n.getBlockIndex,a=n.getBlockSelectionEnd,c=n.getBlockOrder,l=t.clientId,s=t.destinationRootClientId,u=t.isAppender,p=t.currentPage;if(l)return o(l,s);if(i.d.includes(e))return c().indexOf(p)+1;var d=a();return!u&&d?o(d,s)+1:c(s).length}(u),m)}t.onSelect()}}})),o.withSpokenMessages,Oe.withInstanceId,Oe.withSafeTimeout)(Yt),Qt=(n(97),function(e){var t=e.onToggle,n=e.disabled,a=e.isOpen;return Object(r.createElement)(o.IconButton,{icon:"insert",label:Object(c.__)("Add element","amp"),labelPosition:"bottom",onClick:t,className:"editor-inserter__toggle block-editor-inserter__toggle","aria-haspopup":"true","aria-expanded":a,disabled:n})}),Jt=function(e){var t=e.position,n=e.rootClientId,i=e.clientId,l=e.isAppender;if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;return Object(r.createElement)(o.Dropdown,{className:"editor-inserter block-editor-inserter",contentClassName:"editor-inserter__popover block-editor-inserter__popover",position:t,onToggle:function(t){e.onToggle&&e.onToggle(t)},expandOnMobile:!0,headerTitle:Object(c.__)("Add element","amp"),renderToggle:function(t){var n=t.onToggle,r=t.isOpen;return(e.renderToggle||Qt)({onToggle:n,isOpen:r})},renderContent:function(e){var t=e.onClose;return Object(r.createElement)(Xt,{onSelect:t,rootClientId:n,clientId:i,isAppender:l})}})},Zt={position:"bottom right"},en=function(e,t,n){var r,o=wp.media({title:e,button:{text:Object(c.__)("Select","amp")},multiple:!1,library:{type:t}});o.on("select",(function(){r=o.state().get("selection").first().toJSON(),n(r)})),o.open()},tn=function(){var e=Object(a.useSelect)((function(e){var t=e("amp/story").getCurrentPage,n=e("core/block-editor"),r=n.getBlock,o=n.getBlockOrder,a=e("amp/story").getSettings,c=t(),i=r(c);return{currentPage:c,blockOrder:o(c),mediaType:i&&i.attributes.mediaType?i.attributes.mediaType:"",allowedVideoMimeTypes:a().allowedVideoMimeTypes}}),[]),t=e.currentPage,n=e.blockOrder,l=e.mediaType,s=e.allowedVideoMimeTypes,u=Object(f.X)(),p=Object(a.useDispatch)("core/block-editor"),d=p.insertBlock,m=p.updateBlockAttributes,b=p.selectBlock,g=Object(r.useCallback)((function(e){var r=n.length,o=Object(j.createBlock)(e,{});d(o,r,t)}),[n,t,d]),h=Object(r.useCallback)((function(e){if(t){var n=Object(f.O)(e);m(t,n),b(t)}}),[t,b,m]);if(Object(a.useSelect)((function(e){return e("amp/story").isReordering()}),[]))return null;for(var O="image"===l?Object(c.__)("Update Background Image","amp"):Object(c.__)("Insert Background Image","amp"),y="video"===l?Object(c.__)("Update Background Video","amp"):Object(c.__)("Insert Background Video","amp"),v=[{title:O,icon:Object(r.createElement)(k.BlockIcon,{icon:"format-image"}),onClick:function(){return en(Object(c.__)("Select or Upload Media","amp"),i.p,h)}},{title:y,icon:Object(r.createElement)(k.BlockIcon,{icon:"media-video"}),onClick:function(){return en(Object(c.__)("Select or Upload Media","amp"),s,h)}}],w=function(){var e=_[E];if(!u(e,t))return"continue";var n=Object(j.getBlockType)(e),o={title:Object(c.sprintf)(Object(c.__)("Insert %s","amp"),n.title),onClick:function(){return g(e)},icon:Object(r.createElement)(k.BlockIcon,{icon:n.icon})};v.unshift(o)},E=0,_=["core/video","core/image"];E<_.length;E++)w();return Object(r.createElement)(o.DropdownMenu,{icon:"admin-media",label:Object(c.__)("Insert Media","amp"),className:"amp-story-media-inserter-dropdown",controls:v,hasArrowIndicator:!0,popoverProps:Zt,toggleProps:{labelPosition:"bottom"}})},nn=(n(98),n(32)),rn=0,on=0,an=null,cn=function(e){function t(){var e,n;B()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=N()(this,(e=M()(t)).call.apply(e,[this].concat(o)))).state={isResizing:!1},n}return z()(t,e),T()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.angle,a=t.blockName,c=t.ampFitText,l=t.hasTextContent,u=t.minWidth,p=t.minHeight,d=t.onResizeStart,m=t.onResizeStop,g=t.children,O=$e()(t,["angle","blockName","ampFitText","hasTextContent","minWidth","minHeight","onResizeStart","onResizeStop","children"]),y=this.props,v=y.width,j=y.height,k=this.state.isResizing,w="core/image"===a,E="amp/amp-story-text"===a,_=(O.clientId,O.snapGap,O.horizontalTargets),S=O.verticalTargets,P=O.setSnapLines,x=O.clearSnapLines,C=O.parentBlockElement,I=$e()(O,["clientId","snapGap","horizontalTargets","verticalTargets","setSnapLines","clearSnapLines","parentBlockElement"]);return Object(r.createElement)(o.ResizableBox,s()({},I,{className:h()("amp-story-resize-container",{"is-resizing":k}),size:{height:j,width:v},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},onResizeStop:function(t,r){var o=Object(nn.c)(t,n,rn,on,r),a=o.deltaW,c=o.deltaH,i=v+a,l=j+c;qt&&(qt.style.height="100%"),i=i<Lt?Lt:i,l=l<Ft?Ft:l;var s=parseFloat(an.style.top),u=parseFloat(an.style.left),p=Number(s.toFixed(2)),d=Number(u.toFixed(2));e.setState({isResizing:!1}),x(),m({width:parseInt(i),height:parseInt(l),positionTop:p,positionLeft:d})},onResizeStart:function(t,n,r){rn=t.clientX,on=t.clientY,Lt=v,Ft=j,an=r.closest(".wp-block").parentNode,Ht=an.style.top,zt=an.style.left,w&&(Wt=an.querySelector("figure .components-resizable-box__container")),Ut=c?null:Object(nn.a)(a,an),c&&E?qt=an.querySelector(".with-line-height"):(qt&&(qt.style.lineHeight="initial"),qt=null),e.setState({isResizing:!0}),x(),d()},onResize:function(e,t,r){var o=Object(nn.c)(e,n,rn,on,t),a=o.deltaW,s=o.deltaH;!w||v||j||(v=an.clientWidth,j=an.clientHeight);var d=Math.max(u,v+a),m=Math.max(p,j+s),g=!1;if(Ut&&(0>a||0>s)&&l){n&&(Ut.style.width=d+"px",Ut.style.height=m+"px"),E&&(Ut.style.height="auto");var h=Ut.scrollWidth,O=Ut.scrollHeight;(d<h||m<O)&&(g=!0,d=Lt,m=Ft),n&&(E?E&&!c&&(Ut.style.width="100%"):(Ut.style.width="initial",Ut.style.height="100%")),E&&(Ut.style.height="")}if(!g){var y=Object(nn.b)({direction:t,angle:n,isText:E,oldWidth:v,oldHeight:j,newWidth:d,newHeight:m,oldPositionLeft:zt,oldPositionTop:Ht});an.style.left=Object(f.r)("x",y.left)+"%",an.style.top=Object(f.r)("y",y.top)+"%"}r.style.width=d+"px",r.style.height=m+"px";var k=Object(f.u)(an.querySelector(".wp-block"),C),I=k.top,B=k.right,A=k.bottom,T=k.left;if(!e.getModifierState("Alt")){var D=_(I,A),N=b()(D,2),R=N[0],M=N[1],L=S(T,B),F=b()(L,2),H=F[0],z=F[1];P([].concat(Ne()(et(R,M,T,B,i.l)),Ne()(et(H,z,I,A,i.l))))}else x();Lt=d,Ft=m,qt&&(c&&(qt.style.lineHeight=m+"px"),qt.style.height=m+"px"),Wt&&w&&(Wt.style.width=d+"px",Wt.style.height=m+"px")}}),g)}}]),t}(r.Component);cn.defaultProps={snapGap:0};var ln=lt(cn),sn=n(14),un=function(e){var t,n=e.attribute,o=e.attributes,i=e.setAttributes,l=e.className,s=e.fontSize,u=e.backgroundColor,p=e.customBackgroundColor,d=e.textColor,m=e.tagName,g=e.isSelected,O=o.height,y=o.width,v=o.ampFitText,j=o.ampFontFamily,w=o.align,_=o.opacity,S=o.autoFontSize,P=Object(a.useSelect)((function(e){var t,r=e("core/editor").getEditedPostAttribute,o=e("core").getAuthors,a=e("core/block-editor").getSettings,i=r(n),l=!1;switch(n){case"date":var s=Object(E.__experimentalGetSettings)().formats.date,u=i||new Date;t=Object(E.dateI18n)(s,u);break;case"author":var p=o().find((function(e){return e.id===i}));t=p?p.name:Object(c.__)("Anonymous","amp"),l=!p;break;default:t=i}return{content:t,placeholder:C,colors:a().colors,isLoading:l}}),[n]),x=P.content,C=P.placeholder,I=P.colors,B=P.isLoading,A=Object(r.useState)(!1),T=b()(A,2),D=T[0],N=T[1];Object(r.useEffect)((function(){!g&&D&&N(!1)}),[g,D]);var R=Object(r.useCallback)((function(){g&&!D&&N(!0)}),[g,D]);Object(r.useEffect)((function(){v&&!B&&Object(f.L)(e)}),[v,j,y,O,x,B,e]),Object(r.useEffect)((function(){v||Object(f.K)(e)}),[v,s,j,x,e]);var M=s&&s.size&&s.size+"px",L=Object(sn.d)(I,u,p,_),F=m;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(k.BlockControls,null,Object(r.createElement)(k.AlignmentToolbar,{value:w,onChange:function(e){return i({align:e})}})),Object(r.createElement)(F,{onClick:R,style:{backgroundColor:L,color:d.color,fontSize:v?S+"px":M,textAlign:w},className:h()(l,(t={"has-text-color":d.color,"has-background":u.color},Ae()(t,u.class,u.class),Ae()(t,d.class,d.class),Ae()(t,s.class,s.class),Ae()(t,"is-empty",!x),Ae()(t,"is-amp-fit-text",v),Ae()(t,"is-editing",D),t))},x||C))},pn=function(e){var t=e.attribute,n=e.tagName,o=e.isEditable;return function(e){return Object(r.createElement)(un,s()({attribute:t,tagName:n,isEditable:o},e))}},dn=function(e){var t=e.tagName;return function(e){var n=e.attributes,o=n.ampFitText,a=Object(f.m)(n),c=Object(f.v)(n);if(!o)return Object(r.createElement)(k.RichText.Content,{tagName:t,style:c,className:a,value:"{content}"});var i=t;return Object(r.createElement)(i,{style:c,className:a},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},"{content}"))}},fn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(3 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})),Object(r.createElement)("path",{d:"M20.808 7.145c1.41 1.74 1.283 4.365-1.165 6.348.44-1.348.575-2.628-1.011-4.586L17 10.229l.517-4.923 4.923.517-1.632 1.322z"}))};fn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var mn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(7.65 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})),Object(r.createElement)("path",{d:"M3.632 17.653c-1.41-1.74-1.283-4.365 1.165-6.348-.44 1.348-.575 2.628 1.011 4.586l1.632-1.322-.517 4.923L2 18.975l1.632-1.322z"}))};mn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var bn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(5.65 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z",opacity:".3"}),Object(r.createElement)("rect",{width:"9",height:"9",rx:"1"})))};bn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var gn=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{transform:"translate(6 5)"},Object(r.createElement)("path",{d:"M11.2 4h.8a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-.8c0-.11.09-.2.2-.2H10a1 1 0 0 0 1-1V4.2c0-.11.09-.2.2-.2z"}),Object(r.createElement)("rect",{opacity:".3",width:"9",height:"9",rx:"1"})))};gn.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var hn=window,On=hn.getComputedStyle,yn=hn.ampStoriesFonts,vn=Object(o.withFallbackStyles)((function(e,t){var n=t.textColor,r=t.backgroundColor,o=t.fontSize,a=t.customFontSize,c=e.querySelector('[contenteditable="true"]'),i=c?On(c):null;return{fallbackBackgroundColor:r||!i?void 0:i.backgroundColor,fallbackTextColor:n||!i?void 0:i.color,fallbackFontSize:o||a||!i?void 0:parseInt(i.fontSize)||void 0}})),jn=Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getSelectedBlockClientId,o=n.getBlockRootClientId,a=n.getBlock,c=n.getBlockOrder,i=n.getBlockIndex,l=e("amp/story"),s=l.getAnimatedBlocks,u=l.isValidAnimationPredecessor,p=r(),d=o(p),m=(s()[d]||[]).find((function(e){return e.id===t.clientId})),b=o(t.clientId),g=c(b),h=i(t.clientId,b);return{currentBlockPosition:g.length-1-h+1,numberOfBlocks:g.length,isFirst:0===h,isLast:Object(f.l)(b)?h===g.length-2:h===g.length-1,parentBlock:a(b),rootClientId:b,animationAfter:m?m.parent:void 0,getAnimatedBlocks:function(){return(s()[d]||[]).filter((function(e){return e.id!==p})).filter((function(e){var t=e.id,n=a(t);return n&&n.attributes.ampAnimationType&&u(d,p,t)})).map((function(e){var t=e.id,n=a(t);return{value:t,label:n.name,block:n,blockType:Object(j.getBlockType)(n.name)}}))}}})),kn=Object(a.withDispatch)((function(e,t,n){var r=t.clientId,o=t.rootClientId,a=t.toggleSelection,c=(0,n.select)("core/block-editor"),i=c.getSelectedBlockClientId,l=c.getBlockRootClientId,s=c.getBlockOrder,u=e("core/block-editor"),p=u.moveBlocksDown,d=u.moveBlocksUp,f=u.moveBlockToPosition,m=u.selectBlock,b=i(),g=l(b),h=e("amp/story"),O=h.addAnimation,y=h.changeAnimationType,v=h.changeAnimationDuration,j=h.changeAnimationDelay;return{onAnimationTypeChange:function(e){y(g,b,e)},onAnimationOrderChange:function(e){O(g,b,e)},onAnimationDurationChange:function(e){v(g,b,e)},onAnimationDelayChange:function(e){j(g,b,e)},startBlockActions:function(){return a(!1)},stopBlockActions:function(){a(!0),m(r)},bringForward:function(){return p(r,o)},sendBackward:function(){return d(r,o)},moveFront:function(){var e=s(o).length-1;f(r,o,o,e)},moveBack:function(){f(r,o,o,0)}}})),wn=Object(Oe.compose)(Object(k.withColors)("backgroundColor",{textColor:"color"}),Object(k.withFontSizes)("fontSize"),vn,jn,kn),En=Object(Oe.createHigherOrderComponent)((function(e){return wn((function(t){var n=t.clientId,a=t.rootClientId,l=t.name,s=t.attributes,u=t.isLast,p=t.isFirst,m=t.currentBlockPosition,b=t.numberOfBlocks,g=t.fontSize,h=t.setFontSize,O=t.setAttributes,y=t.backgroundColor,v=t.setBackgroundColor,w=t.textColor,E=t.setTextColor,_=t.fallbackBackgroundColor,S=t.fallbackTextColor,P=t.onAnimationTypeChange,x=t.onAnimationOrderChange,C=t.onAnimationDurationChange,I=t.onAnimationDelayChange,B=t.getAnimatedBlocks,A=t.animationAfter,T=t.startBlockActions,D=t.stopBlockActions,N=t.bringForward,R=t.sendBackward,M=t.moveFront,L=t.moveBack;if(!i.b.includes(l))return Object(r.createElement)(e,t);var F,H=Object(j.getBlockType)(l),z="core/image"===l,W="core/video"===l,q="amp/amp-story-text"===l,U="amp/amp-story-page-attachment"===l,V=i.h.includes(l),G=i.j.includes(l),K=i.g.includes(l),$=i.i.includes(l),Y=s.ampFontFamily,X=s.ampFitText,Q=s.content,J=s.height,Z=s.width,ee=s.opacity,te=s.type,ne=s.ampAnimationType,re=s.ampAnimationDuration,oe=s.ampAnimationDelay,ae=s.rotationAngle,ce=z&&(!s.url||!s.url.length);if("core/table"===l){var ie=s.body.length;s.foot&&s.foot.length&&ie++,s.head&&s.head.length&&ie++,F=45*ie}else F=i.s[l]||i.s.default;var le=parseInt(String(re).replace("ms","")),se=parseInt(String(oe).replace("ms","")),ue=W?"ampShowCaption":"ampShowImageCaption",pe=q&&Q.length>0||V;return Object(r.createElement)(r.Fragment,null,!Object(f.z)(l)&&Object(r.createElement)(e,t),Object(f.z)(l)&&!ce&&amp;&Object(r.createElement)(ln,{width:Z,height:J,angle:ae,hasTextContent:pe,minHeight:F,minWidth:i.t,onResizeStop:function(e){O(e),D()},blockName:l,clientId:n,ampFitText:X,onResizeStart:function(){T()},snapGap:i.l},Object(r.createElement)(At,{blockElementId:"block-".concat(n),initialAngle:ae,className:"amp-story-editor__rotate-container",angle:ae,onRotateStart:function(){T()},onRotateStop:function(e,t){O({rotationAngle:t}),D()},snap:i.m,snapGap:i.n},q&&Object(r.createElement)(e,t),!q&&Object(r.createElement)(wt,{clientId:t.clientId,blockName:l,blockElementId:"block-".concat(t.clientId),isDraggable:!t.isPartOfMultiSelection,isMovable:Object(f.z)(l)},Object(r.createElement)(e,t)))),Object(f.z)(l)&&(!$||ce)&&Object(r.createElement)(At,{blockElementId:"block-".concat(n),initialAngle:ae,className:"amp-story-editor__rotate-container",angle:ae,onRotateStart:function(){T()},onRotateStop:function(e,t){O({rotationAngle:t}),D()},snap:i.m,snapGap:i.n},Object(r.createElement)(wt,{clientId:t.clientId,blockName:l,blockElementId:"block-".concat(t.clientId),isDraggable:!t.isPartOfMultiSelection,isMovable:Object(f.z)(l)},Object(r.createElement)(e,t))),!(u&&p)&&Object(f.z)(l)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{className:"amp-story-order-controls",title:Object(c.__)("Block Position","amp")},Object(r.createElement)("div",{className:"amp-story-order-controls-wrap"},Object(r.createElement)(o.IconButton,{className:"amp-story-controls-bring-front",onClick:M,icon:bn({width:24,height:24}),label:Object(c.__)("Send to front","amp"),"aria-describedby":"amp-story-controls-bring-front-description-".concat(n),"aria-disabled":u},Object(c.__)("Front","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-bring-forward",onClick:N,icon:fn({width:24,height:24}),label:Object(c.__)("Send Forward","amp"),"aria-describedby":"amp-story-controls-bring-forward-description-".concat(n),"aria-disabled":u},Object(c.__)("Forward","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-send-backwards",onClick:R,icon:mn({width:24,height:24}),label:Object(c.__)("Send Backward","amp"),"aria-describedby":"amp-story-controls-send-backward-description-".concat(n),"aria-disabled":p},Object(c.__)("Backward","amp")),Object(r.createElement)(o.IconButton,{className:"amp-story-controls-send-back",onClick:L,icon:gn({width:24,height:24}),label:Object(c.__)("Send to back","amp"),"aria-describedby":"amp-story-controls-send-back-description-".concat(n),"aria-disabled":p},Object(c.__)("Back","amp"))),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-bring-front-description-".concat(n)},Object(f.k)(H&&H.title,m,1,p,u,-1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-bring-forward-description-".concat(n)},Object(f.k)(H&&H.title,m,m-1,p,u,-1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-send-backward-description-".concat(n)},Object(f.k)(H&&H.title,m,m+1,p,u,1)),Object(r.createElement)("span",{className:"amp-story-controls-description",id:"amp-story-controls-send-back-description-".concat(n)},Object(f.k)(H&&H.title,m,b,p,u,1)))),G&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Text Settings","amp")},Object(r.createElement)(It,{fonts:yn,value:Y,onChange:function(e){e?(Object(f.C)(e.name),O({ampFontFamily:e.name})):O({ampFontFamily:""})}}),Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Automatically fit text to container","amp"),checked:X,onChange:function(){O({ampFitText:!X})}}),!X&&Object(r.createElement)(k.FontSizePicker,{value:g.size,onChange:h}),q&&Object(r.createElement)(o.SelectControl,{label:Object(c.__)("Select text type","amp"),value:te,onChange:function(e){return O({type:e})},options:[{value:"auto",label:Object(c.__)("Automatic","amp")},{value:"p",label:Object(c.__)("Paragraph","amp")},{value:"h1",label:Object(c.__)("Heading 1","amp")},{value:"h2",label:Object(c.__)("Heading 2","amp")}]}))),K&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(k.PanelColorSettings,{title:Object(c.__)("Color Settings","amp"),colorSettings:[{value:y.color,onChange:v,label:Object(c.__)("Background Color","amp")},{value:w.color,onChange:E,label:Object(c.__)("Text Color","amp")}]},Object(r.createElement)(k.ContrastChecker,{textColor:w.color,backgroundColor:y.color,fallbackTextColor:S,fallbackBackgroundColor:_,fontSize:g.size}),!U&&y.color&&Object(r.createElement)(o.RangeControl,{label:Object(c.__)("Opacity","amp"),value:ee,onChange:function(e){return O({opacity:e})},min:5,max:100,step:5}))),Object(f.z)(l)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Animation","amp")},Object(r.createElement)(d,{clientId:n,page:a,animatedBlocks:B,animationType:ne,animationDuration:le,animationDelay:se,animationAfter:A,onAnimationTypeChange:P,onAnimationDurationChange:C,onAnimationDelayChange:I,onAnimationAfterChange:x}))),(z||W)&&Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Story Settings","amp")},Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Display Caption","amp"),checked:s[ue],onChange:function(){t.setAttributes(Ae()({},ue,!s[ue])),s[ue]||t.setAttributes({caption:""})},help:Object(c.__)("Note: If you turn this off, the current caption text will be removed.","amp")}))))}))}),"withAmpStorySettings"),_n=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){var n,r=e("core/block-editor").getBlockAttributes;return t.block&&t.block.attributes?n=t.block.attributes:r&&(n=r(t.clientId)),{attributes:n}})),"withAttributes"),Sn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){return{blockName:(0,e("core/block-editor").getBlockName)(t.clientId)}})),"withBlockName"),Pn=n(35),xn=window.wp,Cn=xn.media.controller.Cropper.extend({doCrop:function(e){var t=e.get("cropDetails"),n=this.imgSelect.getOptions();return Math.abs(t.width-n.minWidth)<10&&(t.width=n.minWidth),Math.abs(t.height-n.minHeight)<10&&(t.height=n.minHeight),t.dst_width=t.width,t.dst_height=t.height,xn.ajax.post("crop-image",{nonce:e.get("nonces").edit,id:e.get("id"),context:"featured-image",cropDetails:t})}}),In=window.wp,Bn=function(e){Object(a.dispatch)("core/editor").editPost({featured_media:e})},An=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.width,o=t.height,a=n.width,i=n.height;return function(e){function t(){var e,n;B()(this,t);for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];return n=N()(this,(e=M()(t)).call.apply(e,[this].concat(i))),Ae()(F()(n),"initFeaturedImage",(function(){var e=Object(Pn.c)(Pn.b);n.frame=new e({allowedTypes:n.props.allowedTypes,button:{text:Object(c.__)("Select","amp"),close:!1},states:[new In.media.controller.Library({title:Object(c.__)("Choose image","amp"),library:In.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:r,suggestedHeight:o}),new Cn({imgSelectOptions:n.calculateImageSelectOptions,control:F()(n)})]}),In.media.frame=n.frame,n.frame.on("select",n.onSelectImage,F()(n)),n.frame.on("cropped",n.onCropped,F()(n)),n.frame.on("skippedcrop",n.onSkippedCrop,F()(n)),n.frame.on("close",(function(){n.initFeaturedImage()}),F()(n))})),"editor-post-featured-image__media-modal"===n.props.modalClass&&n.initFeaturedImage(),n}return z()(t,e),T()(t,[{key:"calculateImageSelectOptions",value:function(e,t){var n=e.get("width"),c=e.get("height"),l=a&&n>=a&&c>=i&&Object(sn.c)(n,c)===Object(sn.c)(a,i),s=l?parseInt(a):parseInt(r),u=l?parseInt(i):parseInt(o),p=s/u,d=s,f=u;t.set("canSkipCrop",!0),n/c>p?s=(u=c)*p:u=(s=n)/p;var m=(n-s)/2,b=(c-u)/2;return{aspectRatio:s+":"+u,handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:n,imageHeight:c,minWidth:d>s?s:d,minHeight:f>u?u:f,x1:m,y1:b,x2:s+m,y2:u+b}}},{key:"onSelectImage",value:function(){var e=this.frame.state().get("selection").first().toJSON();if(r===e.width&&o===e.height||a&&a===e.width&&i===e.height){var t=e.url,n=e.id,c=e.width,l=e.height,s=this.props.onSelect;Object(sn.l)({url:t,id:n,width:c,height:l,onSelect:s,dispatchImage:Bn}),this.frame.close()}else this.frame.setState("cropper")}},{key:"doAllowCrop",value:function(e){return e.width&&e.height&&e.width>=r&&e.height>=o}},{key:"mustBeCropped",value:function(e,t,n,r){return!(e===n&&t===r||n<=e)}},{key:"onCropped",value:function(e){var t=e.url,n=e.id,r=e.width,o=e.height,a=this.props.onSelect;Object(sn.l)({url:t,id:n,width:r,height:o,onSelect:a,dispatchImage:Bn})}},{key:"onSkippedCrop",value:function(e){var t=e.get("url"),n=e.get("width"),r=e.get("height"),o=e.id,a=this.props.onSelect;Object(sn.l)({url:t,id:o,width:n,height:r,onSelect:a,dispatchImage:Bn})}}]),t}(e)},Tn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e,t){return{hasSelectedInnerBlock:(0,e("core/block-editor").hasSelectedInnerBlock)(t.clientId,!0)}})),"withHasSelectedInnerBlock"),Dn=Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockOrder;if(""!==(0,n.getBlockRootClientId)(t.clientId))return{pageNumber:void 0};var o=e("amp/story").isReordering;return{pageNumber:r().indexOf(t.clientId)+1,isReordering:o()}})),Nn=Object(Oe.createHigherOrderComponent)((function(e){return Dn((function(t){var n=t.name,o=t.pageNumber,a=t.isReordering;return i.d.includes(n)&&o?a?Object(r.createElement)(e,t):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"amp-story-page-number"},
16
/* translators: %s: Page number */
17
+ Object(c.sprintf)(Object(c.__)("Page %s","amp"),o)),Object(r.createElement)(e,t)):Object(r.createElement)(e,t)}))}),"withPageNumber"),Rn=Object(a.withSelect)((function(e){var t=e("amp/story"),n=t.isReordering,o=t.getCurrentPage,a=e("core/block-editor"),c=a.getSelectedBlockClientIds,i=a.hasMultiSelection,l=(0,a.getSettings)().isRTL;return{handleEvent:function(e){var t="contextmenu"===e.type,n=c();if(0!==n.length){var a=window.getSelection().toString();if(!i()&&!a.length){var s=document.querySelector(".edit-post-layout");if(!document.getElementById("amp-story-right-click-menu")){var u=document.createElement("div");u.id="amp-story-right-click-menu",s.appendChild(u)}var p=document.querySelector(".edit-post-header");if(!Boolean(p.compareDocumentPosition(e.target)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var d=s.getBoundingClientRect(),m=0;p&&(m=p.clientHeight);var b=0,g=0;if(t)b=e.clientX,g=e.clientY;else{var h=e.target.getBoundingClientRect();b=h.left+h.width/2,g=h.top+h.height/2}var O=b-(l?d.right:d.left),y=g-d.top-m,v=o(),j=0,k=0,w=Object(f.i)(v);if(w){var E=w.getBoundingClientRect(),_=b-E.left,S=g-E.top;k=Object(f.r)("x",_),j=Object(f.r)("y",S)}Object(r.render)(Object(r.createElement)(Nt,{clientIds:n,clientX:O,clientY:y,insidePercentageX:k,insidePercentageY:j}),document.getElementById("amp-story-right-click-menu")),e.preventDefault()}}}},isReordering:n()}})),Mn=Object(Oe.createHigherOrderComponent)((function(e){return Rn((function(t){var n=t.name,a=t.handleEvent,c=t.isReordering;return"amp/amp-story-page"===n||i.b.includes(n)?c?Object(r.createElement)(e,t):Object(r.createElement)(o.KeyboardShortcuts,{shortcuts:{"shift+f10":a}},Object(r.createElement)("div",{onContextMenu:a},Object(r.createElement)(e,t))):Object(r.createElement)(e,t)}))}),"withContextMenu"),Ln=function(e){return Object(a.withSelect)((function(e,t){var n=(0,e("core/editor").getEditedPostAttribute)("featured_media"),r="core/image"===t.name||"amp/amp-story-page"===t.name;if(!n&&r&&t.attributes){var o=e("core/block-editor").getSelectedBlock,c=t.attributes.mediaId||t.attributes.id,i=o();if(c&&i&&i.attributes){var l=i.attributes.mediaId||i.attributes.id;if(l&&l===c){var s=e("core").getMedia,u=Object(a.dispatch)("core/editor").editPost,p=s(c);p&&p.media_details&&Object(sn.i)(p.media_details,Object(sn.f)())&&Object(sn.i)(p.media_details,Object(f.p)())&&u({featured_media:c})}}}}))(e)},Fn=function(e){return function(t){return"core/video"===t.name?Object(r.createElement)(qn,t):Object(r.createElement)(e,t)}},Hn=n(33),zn=n(20),Wn=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)(o.Path,{d:"M4 6.47L5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"})),qn=Object(Oe.compose)([o.withNotices,Oe.withInstanceId])((function(e){var t=e.instanceId,n=e.isSelected,l=e.className,s=e.attributes,u=e.setAttributes,p=e.noticeUI,d=e.noticeOperations,m=s.caption,g=s.loop,O=s.id,y=s.poster,v=s.src,j=s.width,w=s.height,E=s.ampAriaLabel,_=Object(r.useState)(!v),S=b()(_,2),P=S[0],x=S[1],C=Object(r.useState)(null),I=b()(C,2),B=I[0],A=I[1],T=Object(r.useState)(null),D=b()(T,2),N=D[0],R=D[1],M=Object(r.useState)(!1),L=b()(M,2),F=L[0],H=L[1],z=function(){return x(!0)},W=Object(r.useRef)(null),q=Object(a.useSelect)((function(e){var t,n=e("core").getMedia,r=e("amp/story").getSettings,o=O?n(O):void 0;return o&&o.featured_media&&!y&&(t=n(o.featured_media)),{media:o,videoFeaturedImage:t,allowedVideoMimeTypes:r().allowedVideoMimeTypes}}),[O,y]),U=q.media,V=q.videoFeaturedImage,G=q.allowedVideoMimeTypes,K=Object(a.useSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().__experimentalMediaUpload}}),[]).mediaUpload;Object(r.useEffect)((function(){if(!O&&Object(Hn.isBlobURL)(v)){var e=Object(Hn.getBlobByURL)(v);e&&K({filesList:[e],onFileChange:function(e){var t=b()(e,1)[0],n=t.id,r=t.url;R(null),A(null),u({id:n,src:r})},onError:function(e){x(!0),d.createErrorNotice(e)},allowedTypes:G})}v&&!Object(Hn.isBlobURL)(v)&&Object(sn.e)(v).then(A)}),[]),Object(r.useEffect)((function(){W.current&&W.current.load()}),[y]),Object(r.useEffect)((function(){v&&!Object(Hn.isBlobURL)(v)&&Object(sn.e)(v).then(A)}),[v]),Object(r.useEffect)((function(){if(!E&&U){var e=U.alt_text||U.title&&U.title.raw||"";u({ampAriaLabel:e})}V?u({poster:V.source_url}):!U||U.featured_media||F||(H(!0),Object(f.V)({id:O,src:v}).then((function(e){u({poster:Object(f.t)(e)}),H(!1)})).catch((function(){return H(!1)})))}),[U,E,O,F,u,v,V]);if(P)return Object(r.createElement)(k.MediaPlaceholder,{icon:Object(r.createElement)(k.BlockIcon,{icon:Wn}),className:l,onSelect:function(e){if(!e||!e.url)return u({src:void 0,id:void 0,poster:void 0}),void z();u({src:e.url,id:e.id,poster:void 0}),x(!1),R(null),A(null)},onSelectURL:function(e){e!==v&&(u({src:e,id:void 0,poster:void 0}),H(!0),Object(f.V)({src:e}).then((function(e){u({poster:Object(f.t)(e)}),H(!1)})).catch((function(){return H(!1)}))),x(!1),R(null),A(null)},accept:G.join(","),allowedTypes:G,value:s,notices:p,onError:function(e){d.removeAllNotices(),d.createErrorNotice(e)}});var $,Y=N&&B?B/N:0,X="video-block__poster-image-".concat(t),Q=Y?Object(sn.j)(Y):null;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(k.BlockControls,null,Object(r.createElement)(o.Toolbar,null,Object(r.createElement)(o.IconButton,{className:"components-icon-button components-toolbar__control",label:Object(c.__)("Edit video","amp"),onClick:z,icon:"edit"}))),Object(r.createElement)(k.InspectorControls,null,Object(r.createElement)(o.PanelBody,{title:Object(c.__)("Video Settings","amp")},Object(r.createElement)(o.ToggleControl,{label:Object(c.__)("Loop","amp"),onChange:($="loop",function(e){return u(Ae()({},$,e))}),checked:g}),Object(r.createElement)(o.TextControl,{label:Object(c.__)("Assistive Text","amp"),help:Object(c.__)("Used to inform visually impaired users about the video content.","amp"),value:E,onChange:function(e){return u({ampAriaLabel:e})}}),(!F||y)&&Object(r.createElement)(k.MediaUploadCheck,null,Object(r.createElement)(o.BaseControl,{id:X,label:Object(c.__)("Poster Image","amp"),className:"editor-video-poster-control"},!y&&Object(r.createElement)(o.Notice,{status:"error",isDismissible:!1},Object(c.__)("A poster image must be set.","amp")),Object(r.createElement)(k.MediaUpload,{title:Object(c.__)("Select Poster Image","amp"),onSelect:function(e){u({poster:e.url})},allowedTypes:i.u,render:function(e){var t=e.open;return Object(r.createElement)(o.Button,{id:X,className:h()("video-block__poster-image",{"editor-post-featured-image__toggle":!y,"editor-post-featured-image__preview":y}),onClick:t,"aria-label":y?Object(c.__)("Replace Poster Image","amp"):null},y&&Object(r.createElement)(o.ResponsiveWrapper,{naturalWidth:j,naturalHeight:w},Object(r.createElement)("img",{src:y,alt:""})),!y&&Object(c.__)("Set Poster Image","amp"))}}))),Q&&Object(r.createElement)(o.Notice,{status:"warning",isDismissible:!1},Object(c.sprintf)(
18
/* translators: %d: the number of recommended megabytes per second */
19
Object(c.__)("A video size of less than %d MB per second is recommended.","amp"),zn.g)," ",Object(c.sprintf)(
20
/* translators: %d: the number of actual megabytes per second */
21
+ Object(c.__)("The selected video is %d MB per second.","amp"),Math.round(Y/zn.d))))),Object(r.createElement)("figure",{className:"wp-block-video"},Object(r.createElement)("video",{autoPlay:!0,muted:!0,"aria-label":E,loop:g,controls:!g,poster:y,ref:W,src:v,onLoadedMetadata:function(e){R(Math.round(e.currentTarget.duration))}}),(!k.RichText.isEmpty(m)||n)&&Object(r.createElement)(k.RichText,{tagName:"figcaption",placeholder:Object(c.__)("Write caption…","amp"),value:m,onChange:function(e){return u({caption:e})},inlineToolbar:!0})))})),Un=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e){return{isReordering:(0,e("amp/story").isReordering)()}})),"withIsReordering"),Vn=Object(Oe.createHigherOrderComponent)(Object(a.withSelect)((function(e){return{selectedBlock:(0,e("core/block-editor").getSelectedBlock)()}})),"withSelectedBlock"),Gn=Object(Oe.createHigherOrderComponent)((function(e){return function(t){return"amp/amp-story-page"!==t.name?Object(r.createElement)(e,t):Object(r.createElement)(ot,null,Object(r.createElement)(e,t))}}),"withSnapLines");function Kn(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 $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yn=Object(Oe.compose)(_n,Sn,Tn),Xn=function(e){return Yn((function(t){var n,o=t.clientId,a=t.blockName,c=t.hasSelectedInnerBlock,l=t.attributes;if(-1===i.a.indexOf(a))return Object(r.createElement)(e,t);if(c&&"amp/amp-story-page"===a)return n=$n({},t.wrapperProps,{"data-amp-selected":"parent"}),Object(r.createElement)(e,s()({},t,{wrapperProps:n}));var u="core/image"===a&&!l.ampShowImageCaption||"core/video"===a&&!l.ampShowCaption;if(n=$n({},t.wrapperProps,{"data-amp-caption":u?"noCaption":void 0,"data-font-family":l.ampFontFamily||void 0}),i.b.includes(a)){var p={transform:"scale(var(--preview-scale)) translateX(var(--preview-translateX)) translateY(var(--preview-translateY)) rotate(".concat(l.rotationAngle||0,"deg)")};Object(f.y)(a)&&(p.transform="scale(var(--preview-scale))"),n=$n({},n,{style:$n({},n.style,{},p)});var d={top:"".concat(l.positionTop,"%"),left:"".concat(l.positionLeft,"%")};return Object(r.createElement)("div",{className:"amp-page-child-block","data-block":o,"data-type":a,style:d},Object(r.createElement)(e,s()({},t,{wrapperProps:n,enableAnimation:!1})))}return Object(r.createElement)(e,s()({},t,{wrapperProps:n,enableAnimation:!1}))}))};function Qn(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 Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(n,!0).forEach((function(t){Ae()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zn=function(e){return Object(a.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlockRootClientId,o=e("amp/story"),a=o.getCurrentPage,c=o.isPlayingAnimation,i=a()===n;return{isActivePage:i,isTopLevelBlock:""===r(n),isPlayingAnimation:i&&c()}}))((function(t){var n=t.isTopLevelBlock,o=t.isActivePage,c=t.isPlayingAnimation;if(!n)return Object(r.createElement)(e,t);var i=Jn({},t,{className:Jn({},t.className,{"amp-page-active":n&&o,"amp-page-inactive":n&&!o,"amp-page-is-animating":c,"amp-page-block":!0}),isLocked:!o}),l=Object(a.dispatch)("amp/story").setCurrentPage,u=Object(a.dispatch)("core/block-editor").selectBlock;return o?Object(r.createElement)(e,i):Object(r.createElement)(e,s()({},i,{onSelect:function(){l(t.clientId),u(t.clientId)}}))}))},er=Object(Oe.compose)(Sn,Tn,Vn,Un),tr=function(){return er((function(e){var t=e.blockName,n=e.hasSelectedInnerBlock,o=e.isReordering,a=e.selectedBlock;return o?null:"amp/amp-story-page"===t&&n&&a?Object(r.createElement)(Te,{srcClientId:a.clientId,srcBlockName:a.name}):null}))},nr=Object(Oe.compose)(Object(a.withSelect)((function(e,t){var n=e("core/block-editor"),r=n.getBlockRootClientId,o=n.getBlock,a=n.getBlockOrder,c=n.getBlocksByClientId;if(!Object(f.y)(t.name))return{};var i=o(r(t.clientId));if(!i)return{};var l=0===a().indexOf(i.clientId),s=c(a(i.clientId)).find((function(e){return e.name===t.name})),u=s&&s.clientId!==t.clientId;return{isInvalid:l||u,originalBlockClientId:u&&s.clientId}})),Object(a.withDispatch)((function(e,t){var n=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(n)}}}))),rr=Object(Oe.createHigherOrderComponent)((function(e){return nr((function(t){var n=t.isInvalid,a=t.originalBlockClientId,i=t.selectFirst,l=$e()(t,["isInvalid","originalBlockClientId","selectFirst"]);if(!n||!Object(f.y)(l.name))return Object(r.createElement)(e,l);var s=Object(j.getBlockType)(l.name),u=[Object(r.createElement)(o.Button,{key:"remove",isLarge:!0,onClick:function(){return l.onReplace([])}},Object(c.__)("Remove","amp"))];return a&&u.unshift(Object(r.createElement)(o.Button,{key:"find-original",isLarge:!0,onClick:i},Object(c.__)("Find original","amp"))),Object(r.createElement)(k.Warning,{actions:u},Object(r.createElement)("strong",null,"".concat(s.title,": ")),a?Object(c.__)("This block can only be used once per page.","amp"):Object(c.__)("This block can not be used on the first page.","amp"))}))}),"withCallToActionValidation");n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return _})),n.d(t,"h",(function(){return P})),n.d(t,"i",(function(){return C})),n.d(t,"n",(function(){return _e})),n.d(t,"p",(function(){return Pe})),n.d(t,"v",(function(){return Ce})),n.d(t,"s",(function(){return Ie})),n.d(t,"t",(function(){return Te})),n.d(t,"u",(function(){return wt})),n.d(t,"m",(function(){return _t})),n.d(t,"b",(function(){return Ct})),n.d(t,"j",(function(){return It})),n.d(t,"r",(function(){return At})),n.d(t,"f",(function(){return Nt})),n.d(t,"o",(function(){return Rt})),n.d(t,"k",(function(){return Jt})),n.d(t,"l",(function(){return tn})),n.d(t,"q",(function(){return ln})),n.d(t,"H",(function(){return pn})),n.d(t,"I",(function(){return dn})),n.d(t,"x",(function(){return En})),n.d(t,"y",(function(){return _n})),n.d(t,"z",(function(){return Sn})),n.d(t,"C",(function(){return An})),n.d(t,"F",(function(){return Tn})),n.d(t,"J",(function(){return Nn})),n.d(t,"B",(function(){return Mn})),n.d(t,"E",(function(){return Ln})),n.d(t,"D",(function(){return Fn})),n.d(t,"g",(function(){return qn})),n.d(t,"G",(function(){return Un})),n.d(t,"K",(function(){return Vn})),n.d(t,"L",(function(){return Gn})),n.d(t,"N",(function(){return Xn})),n.d(t,"w",(function(){return Zn})),n.d(t,"M",(function(){return tr})),n.d(t,"A",(function(){return rr}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),o=n.n(r);function a(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}var c=function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{deprecated:"migrated"})}},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return s}));var r=6,o=72,a=1200,c=1e6,i=1,l="select-file-type-error",s="select-file-size-error"},function(e,t){function n(){return e.exports=n=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},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(66),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(67);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(78);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t){!function(){e.exports=this.wp.richText}()},function(e,t){!function(){e.exports=this.wp.editPost}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(4),o=n(3),a=function(e){return e*Math.PI/180},c=function(e,t,n,o,c){var i=e.clientY-o,l=e.clientX-n,s=function(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}(l,i),u=Math.atan2(i,l)-a(t),p=c.toLowerCase().includes("left")||c.toLowerCase().includes("right"),d=c.toLowerCase().includes("top")||c.toLowerCase().includes("bottom"),f=p?s*Math.cos(u):0,m=d?s*Math.sin(u):0;return{deltaW:r.w.includes(c)?-f:f,deltaH:r.v.includes(c)?-m:m}},i=function(e,t){if(!(r.j.includes(e)||"core/code"===e))return null;switch(e){case"amp/amp-story-text":return t.querySelector(".block-editor-rich-text__editable.editor-rich-text__editable");case"amp/amp-story-post-title":return t.querySelector(".wp-block-amp-amp-story-post-title");case"amp/amp-story-post-author":return t.querySelector(".wp-block-amp-amp-story-post-author");case"amp/amp-story-post-date":return t.querySelector(".wp-block-amp-amp-story-post-date");case"core/code":return t.querySelector(".wp-block-code");default:return null}},l=function(e,t,n,r){var o,a,c=-e/2,i=t/2;return"topRight"===r||"bottomLeft"===r?(o=i*-Math.sin(n)+c*Math.cos(n),a=i*Math.cos(n)-c*-Math.sin(n)):(o=i*Math.sin(n)+c*Math.cos(n),a=i*Math.cos(n)-c*Math.sin(n)),{left:o-c,top:a-i}},s=function(e){var t,n,c=e.direction,i=e.angle,s=e.isText,u=e.oldWidth,p=e.oldHeight,d=e.newWidth,f=e.newHeight,m=e.oldPositionLeft,b=e.oldPositionTop,g=d-u,h=f-p,O=a(i);s?(t=l(u-2*r.B,p-2*r.B,O,c),n=l(d-2*r.B,f-2*r.B,O,c)):(t=l(u,p,O,c),n=l(d,f,O,c));var y={left:n.left-t.left,top:n.top-t.top};return function(e,t,n){switch(e){case"topRight":return{left:t.left-n.left,top:t.top-n.top};case"bottomLeft":return{left:t.left+n.left,top:t.top+n.top};case"left":case"topLeft":case"top":return{left:t.left+n.left,top:t.top-n.top};default:return{left:t.left-n.left,top:t.top+n.top}}}(c,function(e,t,n,r,a){var c=Object(o.s)("x",parseFloat(t)),i=Object(o.s)("y",parseFloat(n));switch(e){case"topRight":return{left:c,top:i-a};case"bottomLeft":return{left:c-r,top:i};case"left":case"topLeft":case"top":return{left:c-r,top:i-a};default:return{left:c,top:i}}}(c,m,b,g,h),y)}},function(e,t){!function(){e.exports=this.wp.blob}()},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(6),o=n.n(r),a=n(10),c=n(1),i=n(14);function l(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}var s,u=window.wp,p=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:(s=Object(c.sprintf)(
22
/* translators: 1: image width in pixels. 2: image height in pixels. 3: required minimum width in pixels. 4: required minimum height in pixels. */
23
Object(c.__)("The selected image is too small (%1$s by %2$s pixels). It should have a size of at least %3$s by %4$s pixels.","amp"),"{{width}}","{{height}}","{{minWidth}}","{{minHeight}}"),Object(i.g)(s))}),d=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:function(){var e=Object(c.sprintf)(
24
/* translators: 1: the selected file type. */
25
Object(c.__)("The selected file mime type, %1$s, is not allowed.","amp"),"{{mimeType}}");return Object(i.g)(e)}()}),f=u.media.View.extend({className:"notice notice-warning notice-alt inline",template:function(){var e=Object(c.sprintf)(
26
/* translators: 1: the recommended max MB per second for videos. 2: the actual MB per second of the video. */
27
+ Object(c.__)("A video size of less than %1$s MB per second is recommended. The selected video is %2$s MB per second.","amp"),"{{maxVideoMegabytesPerSecond}}","{{actualVideoMegabytesPerSecond}}");return Object(i.g)(e)}()}),m=u.media.view.Toolbar.Select.extend({refresh:function(){u.media.view.Toolbar.Select.prototype.refresh.call(this);var e=this.controller.state(),t=e.get("selection").models[0],n=e.collection.get("library").get("suggestedWidth"),r=e.collection.get("library").get("suggestedHeight");!t||"image"!==t.get("type")||!t.get("width")||t.get("width")>=n&&t.get("height")>=r?this.secondary.unset("select-error"):this.secondary.set("select-error",new p({minWidth:n,minHeight:r,width:t.get("width"),height:t.get("height")})),i.b.call(this,t,d)}}),b=u.media.view.Toolbar.Select.extend({refresh:function(){u.media.view.Toolbar.Select.prototype.refresh.call(this);var e=this.controller.state().get("selection").models[0];i.b.call(this,e,d),i.a.call(this,e,f);var t=this.$el.parents(".media-frame");t&&t.toggleClass("has-two-notices",i.k.call(this))}}),g=function(e){return u.media.view.MediaFrame.Select.extend({createSelectToolbar:function(t,n){(n=n||this.options.button||{}).controller=this,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{allowedTypes:Object(a.get)(this,["options","allowedTypes"],null)}),t.view=new e(n)}})}},function(e,t){!function(){e.exports=this.wp.date}()},function(e,t){function n(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var c=e.apply(t,r);function i(e){n(c,o,a,i,l,"next",e)}function l(e){n(c,o,a,i,l,"throw",e)}i(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t,n){"use strict";var r=n(0),o=(n(9),n(5)),a=n(31),c=n(2),i=n(1),l=n(14),s=Object(c.withSelect)((function(e){var t=e("core/editor").getCurrentPost(),n=e("core/editor").getEditedPostAttribute("featured_media"),r=t.featured_media||n;return{featuredMedia:r?e("core").getMedia(r):null}}))((function(e){var t=e.featuredMedia,n=e.dimensions,c=e.required,s=Object(l.m)(t,n,c);return s?Object(r.createElement)(a.PluginPrePublishPanel,{title:Object(i.__)("Featured Image","amp"),initialOpen:"true"},Object(r.createElement)(o.Notice,{status:c?"warning":"notice",isDismissible:!1},s.map((function(e,t){return Object(r.createElement)("p",{key:"error-".concat(t)},e)})))):null})),u=n(12),p=(Object(u.createHigherOrderComponent)((function(e){return function(t){var n=t.media,a=Object(l.m)(n,Object(l.f)(),!1);return a?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.Notice,{status:"notice",isDismissible:!1},a.map((function(e,t){return Object(r.createElement)("p",{key:"error-".concat(t)},e)}))),Object(r.createElement)(e,t)):Object(r.createElement)(e,t)}}),"withFeaturedImageNotice"),n(24)),d=n.n(p),f=n(25),m=n.n(f),b=n(26),g=n.n(b),h=n(18),O=n.n(h),y=n(27),v=n.n(y),j=n(6),k=n.n(j),w=n(10),E=n(35),_=window.wp,S=function(e){return function(e){function t(){var e,n;d()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=m()(this,(e=g()(t)).call.apply(e,[this].concat(o))),k()(O()(n),"initFileTypeMedia",(function(){var e=Object(E.c)(E.a),t=n.onSelect,r=Object(w.isEqual)(["video"],n.props.allowedTypes)?"video/mp4":n.props.allowedTypes;n.frame=new e({allowedTypes:n.props.allowedTypes,button:{text:Object(i.__)("Select","amp"),close:!1},states:[new _.media.controller.Library({title:Object(i.__)("Select or Upload Media","amp"),library:_.media.query({type:r}),multiple:!1,date:!1,priority:20})]}),_.media.frame=n.frame,n.frame.on("close",(function(){n.initFileTypeMedia()}),O()(n)),n.frame.on("select",(function(){t&&t(),n.frame.close()}),O()(n))})),("story-background-media"===n.props.id||Object(w.isEqual)(["video/mp4"],n.props.allowedTypes))&&n.initFileTypeMedia(),n}return v()(t,e),t}(e)};n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return S}))},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"getAnimatedBlocks",(function(){return p})),n.d(r,"getAnimatedBlocksPerPage",(function(){return d})),n.d(r,"getAnimationEntry",(function(){return f})),n.d(r,"getAnimationSuccessors",(function(){return m})),n.d(r,"isPlayingAnimation",(function(){return b})),n.d(r,"isValidAnimationPredecessor",(function(){return g})),n.d(r,"getCurrentPage",(function(){return h})),n.d(r,"getBlockOrder",(function(){return O})),n.d(r,"getBlockIndex",(function(){return y})),n.d(r,"isReordering",(function(){return v})),n.d(r,"getCopiedMarkup",(function(){return j})),n.d(r,"getSettings",(function(){return k}));var o={};n.r(o),n.d(o,"addAnimation",(function(){return S})),n.d(o,"changeAnimationType",(function(){return P})),n.d(o,"changeAnimationDuration",(function(){return x})),n.d(o,"changeAnimationDelay",(function(){return C})),n.d(o,"playAnimation",(function(){return I})),n.d(o,"finishAnimation",(function(){return B})),n.d(o,"stopAnimation",(function(){return A})),n.d(o,"setCurrentPage",(function(){return T})),n.d(o,"startReordering",(function(){return D})),n.d(o,"movePageToPosition",(function(){return N})),n.d(o,"saveOrder",(function(){return R})),n.d(o,"resetOrder",(function(){return M})),n.d(o,"setCopiedMarkup",(function(){return L})),n.d(o,"clearCopiedMarkup",(function(){return F}));var a=n(6),c=n.n(a),i=n(2),l=n(15),s=n.n(l),u=Object.freeze({stopped:1,prepared:2,playing:3,finished:4});function p(e){return e.animations&&e.animations.animationOrder?e.animations.animationOrder:{}}function d(e,t){return p(e)&&p(e)[t]?e.animations.animationOrder[t]:[]}function f(e,t,n){return d(e,t).find((function(e){return e.id===n}))}function m(e,t,n){return d(e,t).filter((function(e){return e.parent===n}))}function b(e,t,n){if(t&&n){var r=f(e,t,n);return!(!r||!r.status)&&r.status!==u.stopped}if(t)return Boolean(d(e,t).find((function(e){var t=e.status;return t&&t!==u.stopped})));for(var o=0,a=Object.keys(p(e));o<a.length;o++){if(b(e,a[o]))return!0}return!1}function g(e,t,n,r){if(e.animations=e.animations||{},e.animations.animationOrder=e.animations.animationOrder||{},void 0===r)return!0;var o=e.animations.animationOrder[t]||[],a=function(e){return o.find((function(t){return t.id===e}))};if(!a(r))return!1;return!function(e,t){for(var n=t;void 0!==n;){if(n===e)return!0;var r=a(n);n=r?r.parent:void 0}return!1}(n,r)}function h(e){return e.currentPage}function O(e){return e.blocks.order||[]}function y(e,t){return e.blocks.order?e.blocks.order.indexOf(t):null}function v(e){return e.blocks.isReordering||!1}function j(e){return e.copiedMarkup||""}function k(e){return e.editorSettings||window.ampStoriesEditorSettings||{}}function w(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(i.combineReducers)({animations:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.predecessor,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))},s=g({animations:e},r,o,a)?a:void 0;return-1!==l(o)?i[l(o)].parent=s:i.push({id:o,parent:s}),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_TYPE":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.animationType,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};if(-1!==l(o)){if(i[l(o)].animationType=a,!a){var s=i[l(o)].parent,u=i.filter((function(e){return e.parent===o}));for(var p in u)-1!==l(p)&&(i[l(p)].parent=s.parent)}}else i.push({id:o,animationType:a});return E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_DURATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.duration,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};return-1!==l(o)&&(i[l(o)].duration=a),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"CHANGE_ANIMATION_DELAY":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=t.delay,i=n[r]||[],l=function(e){return i.findIndex((function(t){return t.id===e}))};return-1!==l(o)&&(i[l(o)].delay=a),E({},e,{animationOrder:E({},n,c()({},r,i))})}(e,t);case"PLAY_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return o?-1!==i(o)&&(a[i(o)].status=u.playing):a.forEach((function(e,t){a[t]=E({},e,{status:void 0===e.parent?u.playing:u.prepared})})),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);case"FINISH_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return-1!==i(o)&&(a[i(o)].status=u.finished),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);case"STOP_ANIMATION":return function(e,t){var n=E({},e.animationOrder),r=t.page,o=t.item,a=n[r]||[],i=function(e){return a.findIndex((function(t){return t.id===e}))};return o?-1!==i(o)&&(a[i(o)].status=u.stopped):a.forEach((function(e,t){a[t]=E({},e,{status:u.stopped})})),E({},e,{animationOrder:E({},n,c()({},r,a))})}(e,t);default:return e}},currentPage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=t.page;switch(t.type){case"SET_CURRENT_PAGE":return n;default:return e}},blocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.order;switch(t.type){case"START_REORDERING":return E({},e,{order:n,isReordering:!0});case"STOP_REORDERING":return E({},e,{isReordering:!1});case"MOVE_PAGE":var r=t.page,o=t.index,a=e.order.indexOf(r),c=s()(e.order);return c.splice.apply(c,[o,0].concat(s()(c.splice(a,1)))),E({},e,{order:c});case"RESET_ORDER":return E({},e,{order:n,isReordering:!1});default:return e}},copiedMarkup:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_COPIED_MARKUP":var n=t.markup;return"string"==typeof n?n:e;case"CLEAR_COPIED_MARKUP":return""===e?e:"";default:return e}}});function S(e,t,n){return{type:"ADD_ANIMATION",page:e,item:t,predecessor:n}}function P(e,t,n){return{type:"CHANGE_ANIMATION_TYPE",page:e,item:t,animationType:n}}function x(e,t,n){return{type:"CHANGE_ANIMATION_DURATION",page:e,item:t,duration:n}}function C(e,t,n){return{type:"CHANGE_ANIMATION_DELAY",page:e,item:t,delay:n}}function I(e,t){return{type:"PLAY_ANIMATION",page:e,item:t}}function B(e,t){return{type:"FINISH_ANIMATION",page:e,item:t}}function A(e,t){return{type:"STOP_ANIMATION",page:e,item:t}}function T(e){return{type:"SET_CURRENT_PAGE",page:e}}function D(e){return{type:"START_REORDERING",order:e}}function N(e,t){return{type:"MOVE_PAGE",page:e,index:t}}function R(){return{type:"STOP_REORDERING"}}function M(e){return{type:"RESET_ORDER",order:e}}function L(e){return{type:"SET_COPIED_MARKUP",markup:e}}function F(){return{type:"CLEAR_COPIED_MARKUP"}}var H=n(51),z=n.n(H),W=n(52),q=n.n(W),U=n(10),V=n(3),G={PLAY_ANIMATION:function(e,t){var n=t.getState,r=t.dispatch,o=Object(i.select)("core/block-editor").getBlock,a=n(),c=e.page,l=e.item;if(l){var s=f(a,c,l),u=s.id,p=s.animationType,b=o(u);Object(V.R)(b,p)}else d(a,c).forEach((function(e){var t=e.id,n=e.animationType,r=o(t);Object(V.R)(r,n)}));(l?[f(a,c,l)]:m(a,c,void 0)).forEach((function(e){var t=e.id,n=e.animationType,a=e.duration,i=e.delay,l=o(t);Object(V.U)(l,n,a?parseInt(a):0,i?parseInt(i):0,(function(){return r(B(c,t))}))}))},STOP_ANIMATION:function(e,t){var n=t.getState,r=Object(i.select)("core/block-editor").getBlock,o=n(),a=e.page,c=e.item;(c?[f(o,a,c)]:d(o,a)).forEach((function(e){var t=e.id,n=e.animationType,o=r(t);o&&n&&Object(V.Q)(o,n)}))},FINISH_ANIMATION:function(e,t){var n=t.getState,r=t.dispatch,o=n(),a=e.page,c=e.item;(m(o,a,c).filter((function(e){var t=e.status;return t&&t===u.prepared})).forEach((function(e){r(I(a,e.id))})),d(o,a).find((function(e){var t=e.status;return t&&(t===u.prepared||t===u.playing)})))||d(o,a).forEach((function(e){var t=e.id;r(A(a,t))}))},SET_CURRENT_PAGE:function(e,t){var n=t.getState,r=t.dispatch,o=n();Object.keys(p(o)).forEach((function(e){r(A(e))}))}};var K=function(e){var t,n=[z()(G),q.a],r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:e.getState,dispatch:function(){return r.apply(void 0,arguments)}};return t=n.map((function(e){return e(o)})),r=U.flowRight.apply(void 0,s()(t))(e.dispatch),e.dispatch=r,e};function $(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}var Y=Object(i.registerStore)("amp/story",{reducer:_,selectors:r,actions:o,initialState:{animations:{animationOrder:{}},editorSettings:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(n,!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},window.ampStoriesEditorSettings),blocks:{order:[],isReordering:!1},copiedMarkup:""}});K(Y);t.a=Y},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(80),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){var r=n(47).Symbol;e.exports=r},function(e,t){!function(){e.exports=this.wp.domReady}()},function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,a,c=n[r.type],i=t(r);if(c)for(o=0;o<c.length;o++)(a=c[o](r,e))&&e.dispatch(a);return i}}}).effects=n,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.dispatch;return function(e){return function(n){return Array.isArray(n)?n.filter(Boolean).map(t):e(n)}}}},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){var r=n(71),o=n(72);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var c=(e=e||{}).random||(e.rng||r)();if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,t)for(var i=0;i<16;++i)t[a+i]=c[i];return t||o(c)}},function(e,t,n){var r=n(43),o=n(45),a=n(44);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){e.exports=function(e,t){var n,r,o,a=0;function c(){var t,c,i=r,l=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(c=0;c<l;c++)if(i.args[c]!==arguments[c]){i=i.next;continue e}return i!==r&&(i===o&&(o=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(t=new Array(l),c=0;c<l;c++)t[c]=arguments[c];return i={args:t,val:e.apply(null,t)},r?(r.prev=i,i.next=r):o=i,a===n?(o=o.prev).next=null:a++,r=i,i.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,a=0},c}},function(e,t,n){var r=n(46),o=n(79),a=n(82),c="Expected a function",i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,u,p,d,f,m,b=0,g=!1,h=!1,O=!0;if("function"!=typeof e)throw new TypeError(c);function y(t){var n=s,r=u;return s=u=void 0,b=t,d=e.apply(r,n)}function v(e){var n=e-m;return void 0===m||n>=t||n<0||h&&e-b>=p}function j(){var e=o();if(v(e))return k(e);f=setTimeout(j,function(e){var n=t-(e-m);return h?l(n,p-(e-b)):n}(e))}function k(e){return f=void 0,O&&s?y(e):(s=u=void 0,d)}function w(){var e=o(),n=v(e);if(s=arguments,u=this,m=e,n){if(void 0===f)return function(e){return b=e,f=setTimeout(j,t),g?y(e):d}(m);if(h)return clearTimeout(f),f=setTimeout(j,t),y(m)}return void 0===f&&(f=setTimeout(j,t)),d}return t=a(t)||0,r(n)&&(g=!!n.leading,p=(h="maxWait"in n)?i(a(n.maxWait)||0,t):p,O="trailing"in n?!!n.trailing:O),w.cancel=function(){void 0!==f&&clearTimeout(f),b=0,s=m=u=f=void 0},w.flush=function(){return void 0===f?d:k(o())},w}},function(e,t,n){e.exports=n(91)},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";n.r(t);var r=n(11),o=n.n(r),a=n(10),c=n(23),i=n(1),l=n(49),s=n.n(l),u=n(2),p=n(50),d=n(30),f=n(8),m=(n(63),n(40)),b=n(17),g=n(3),h=n(4),O=n(41),y=Object(u.select)("core/block-editor"),v=y.getSelectedBlock,j=y.getBlocksByClientId,k=y.getClientIdsWithDescendants,w=y.getBlockRootClientId,E=y.getBlockOrder,_=y.getBlock,S=y.getBlocks,P=y.getBlockAttributes,x=Object(u.dispatch)("core/block-editor"),C=x.moveBlockToPosition,I=x.updateBlockAttributes,B=Object(u.select)("core/edit-post").isFeatureActive,A=Object(u.dispatch)("core/edit-post").toggleFeature,T=Object(u.select)("amp/story"),D=T.isReordering,N=T.getBlockOrder,R=T.getCurrentPage,M=T.getAnimatedBlocks,L=Object(u.dispatch)("amp/story").setCurrentPage;s()((function(){Object(f.setDefaultBlockName)("amp/amp-story-page");var e=Object(f.getBlockTypes)().filter((function(e){var t=e.name;return!h.a.includes(t)})),t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var c=o.value;Object(f.unregisterBlockType)(c.name)}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}var l=j(k()),s=l.find((function(e){return"amp/amp-story-page"===e.name}));L(s?s.clientId:void 0);var u=!0,p=!1,d=void 0;try{for(var m,b=l[Symbol.iterator]();!(u=(m=b.next()).done);u=!0){var O=m.value;O.attributes.ampFontFamily&&Object(g.C)(O.attributes.ampFontFamily),Object(g.E)(O)}}catch(e){p=!0,d=e}finally{try{u||null==b.return||b.return()}finally{if(p)throw d}}B("fixedToolbar")||A("fixedToolbar"),Object(g.P)();for(var y=0,v=["amp/amp-story-text","amp/amp-story-post-author","amp/amp-story-post-date","amp/amp-story-post-title"];y<v.length;y++){var w=v[y];Object(f.registerBlockStyle)(w,{name:"rounded",label:Object(i.__)("Rounded","amp")})}Object(f.registerBlockStyle)("amp/amp-story-text",{name:"half-rounded",label:Object(i.__)("Half Rounded","amp")}),Object(f.registerBlockStyle)("core/image",{name:"rounded",label:Object(i.__)("Rounded","amp")}),Object(f.registerBlockStyle)("core/quote",{name:"white",label:Object(i.__)("White","amp")}),Object(f.unregisterBlockStyle)("core/quote","large")}));var F,H=E(),z=k();Object(u.subscribe)((function(){Object(g.D)();var e=Object(f.getDefaultBlockName)(),t=v();if(t?"amp/amp-story-page"===t.name&&"amp/amp-story-page"!==e?Object(f.setDefaultBlockName)("amp/amp-story-page"):"amp/amp-story-page"!==t.name&&"amp/amp-story-text"!==e&&Object(f.setDefaultBlockName)("amp/amp-story-text"):"amp/amp-story-page"!==e&&Object(f.setDefaultBlockName)("amp/amp-story-page"),F!==t){var n=document.querySelector(".edit-post-layout");n&&n.setAttribute("data-block-name",t?t.name:"")}F=t;var r=E(),o=r.find((function(e){return!H.includes(e)}));if(H.filter((function(e){return!r.includes(e)})).includes(R())){var a=Math.max(0,H.indexOf(R())-1);L((H=r)[a])}H=r,o&&L(o);var c=!0,i=!1,l=void 0;try{for(var s,u=z[Symbol.iterator]();!(c=(s=u.next()).done);c=!0){var p=s.value;Object(g.G)(p),Object(g.F)(p),Object(g.J)(p),Object(g.I)(p),Object(g.H)(p)}}catch(e){i=!0,l=e}finally{try{c||null==u.return||u.return()}finally{if(i)throw l}}z=k()})),O.a.subscribe((function(){var e=E(),t=N();if(!D()&&t.length>0&&e!==t){var n=!0,r=!1,c=void 0;try{for(var i,l=t.entries()[Symbol.iterator]();!(n=(i=l.next()).done);n=!0){var s=o()(i.value,2),u=s[0],p=s[1];C(p,"","",u)}}catch(e){r=!0,c=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw c}}}var d=M(),f=function(e){if(!d.hasOwnProperty(e)||!_(e))return"continue";var t=P(e),n=d[e].filter((function(t){var n=t.id;return e===w(n)})),r=Object(g.w)(n),o=Math.ceil(r/1e3);"time"===t.autoAdvanceAfter?o>t.autoAdvanceAfterDuration&&I(e,{autoAdvanceAfterDuration:o}):I(e,{autoAdvanceAfterDuration:o});var a=!0,c=!1,i=void 0;try{for(var l,s=n[Symbol.iterator]();!(a=(l=s.next()).done);a=!0){var u=l.value,p=u.id,f=u.parent,m=u.animationType,b=u.duration,h=u.delay;Object(g.B)(f);var O=f?_(f):void 0;I(p,{ampAnimationAfter:O?O.attributes.anchor:void 0,ampAnimationType:m,ampAnimationDuration:b?"".concat(b,"ms"):void 0,ampAnimationDelay:h?"".concat(h,"ms"):void 0})}}catch(e){c=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(c)throw i}}};for(var m in d)f(m);var b,h=S(),O=!0,y=!1,v=void 0;try{for(var j,k=h[Symbol.iterator]();!(O=(j=k.next()).done);O=!0){var x=j.value;b=x,Object(a.has)(b,["attributes","anchor"])&&b.attributes.anchor!==b.clientId&&I(b.clientId,{anchor:b.clientId})}}catch(e){y=!0,v=e}finally{try{O||null==k.return||k.return()}finally{if(y)throw v}}}));var W=n(99);W.keys().forEach((function(e){var t=W(e),n=t.name,r=t.render,o=t.icon,a=t.isActive;(void 0===a||a)&&Object(p.registerPlugin)(n,{render:r,icon:o})})),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/setBlockParent",g.S),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/addAttributes",g.a),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/filterBlockTransforms",g.h),Object(c.addFilter)("blocks.registerBlockType","ampStoryEditorBlocks/deprecateCoreBlocks",g.f),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addStorySettings",b.x),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addPageNumber",b.J),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/contextMenuHandler",b.B),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/addEditFeaturedImage",b.E),Object(c.addFilter)("editor.BlockEdit","ampEditorBlocks/addVideoBlockPreview",b.D,9),Object(c.addFilter)("editor.BlockEdit","ampEditorBlocks/withSnapLines",b.L),Object(c.addFilter)("editor.BlockListBlock","ampStoryEditorBlocks/withActivePageState",b.w),Object(c.addFilter)("editor.BlockListBlock","ampStoryEditorBlocks/addWrapperProps",b.N),Object(c.addFilter)("editor.MediaUpload","ampStoryEditorBlocks/addEnforcedFileType",(function(e){return Object(m.b)(e)})),Object(c.addFilter)("editor.MediaUpload","ampStoryEditorBlocks/addCroppedFeaturedImage",(function(e){return Object(b.C)(e,Object(g.p)())})),Object(c.addFilter)("blocks.getSaveContent.extraProps","ampStoryEditorBlocks/addExtraAttributes",g.b),Object(c.addFilter)("blocks.getSaveElement","ampStoryEditorBlocks/wrapBlocksInGridLayer",g.Z),Object(c.addFilter)("blocks.getSaveElement","ampStoryEditorBlocks/addVideoAriaLabel",g.d),Object(c.addFilter)("editor.BlockDropZone","ampStoryEditorBlocks/withStoryBlockDropZone",b.M),Object(c.addFilter)("editor.BlockEdit","ampStoryEditorBlocks/withCallToActionValidation",b.A),Object(c.addFilter)("blocks.getBlockAttributes","ampStoryEditorBlocks/filterBlockAttributes",g.g);var q=n(104);q.keys().forEach((function(e){var t=q(e),n=t.name,r=t.settings;Object(f.registerBlockType)(n,r)}));var U=n(115);U.keys().sort((function(e,t){return e.priority>t.priority?1:-1})).forEach((function(e){var t=U(e),n=t.name,r=t.settings;Object(d.registerFormatType)(n,r)}))},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}},function(e,t,n){},function(e,t,n){"use strict";var r=n(65);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){!function(){e.exports=this.wp.coreData}()},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(47);e.exports=function(){return r.Date.now()}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(81))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(46),o=n(83),a=NaN,c=/^\s+|\s+#x2F;g,i=/^[-+]0x[0-9a-f]+#x2F;i,l=/^0b[01]+#x2F;i,s=/^0o[0-7]+#x2F;i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?a:+e}},function(e,t,n){var r=n(84),o=n(87),a="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==a}},function(e,t,n){var r=n(48),o=n(85),a=n(86),c="[object Null]",i="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?i:c:l&&l in Object(e)?o(e):a(e)}},function(e,t,n){var r=n(48),o=Object.prototype,a=o.hasOwnProperty,c=o.toString,i=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,i),n=e[i];try{e[i]=void 0;var r=!0}catch(e){}var o=c.call(e);return r&&(t?e[i]=n:delete e[i]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r;window,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=31)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(0),o=n(5),a=n(6),c=n(14),i=n(16),l="prototype",s=function(e,t,n){var u,p,d,f,m=e&s.F,b=e&s.G,g=e&s.S,h=e&s.P,O=e&s.B,y=b?r:g?r[t]||(r[t]={}):(r[t]||{})[l],v=b?o:o[t]||(o[t]={}),j=v[l]||(v[l]={});for(u in b&&(n=t),n)d=((p=!m&&y&&void 0!==y[u])?y:n)[u],f=O&&p?i(d,r):h&&"function"==typeof d?i(Function.call,d):d,y&&c(y,u,d,e&s.U),v[u]!=d&&a(v,u,f),h&&j[u]!=d&&(j[u]=d)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(7),o=n(35);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(8),o=n(33),a=n(34),c=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),o)try{return c(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(2);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(20);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(t,n){t.exports=e},function(e,t,n){var r=n(2),o=n(0).document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(0),o=n(6),a=n(15),c=n(9)("src"),i="toString",l=Function[i],s=(""+l).split(i);n(5).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,i){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,c)||o(n,c,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:i?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,i,(function(){return"function"==typeof this&&this[c]||l.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(17);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(37),o=n(26);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(10),o=n(11);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(19),o=n(22),a=n(38);e.exports=function(e){return function(t,n,c){var i,l=r(t),s=o(l.length),u=a(c,s);if(e&&n!=n){for(;u<s;)if((i=l[u++])!=i)return!0}else for(;u<s;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(23),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){var r=n(25)("keys"),o=n(9);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(5),o=n(0),a="__core-js_shared__",c=o[a]||(o[a]={});(e.exports=function(e,t){return c[e]||(c[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(39)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(11);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(42)})},function(e,t,n){var r=n(25)("wks"),o=n(9),a=n(0).Symbol,c="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=c&&a[e]||(c?a:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(32),n(28),n(45),n(50),n(51),n(52),n(55);var r=n(12),o=c(n(57)),a=c(n(58));function c(e){return e&&e.__esModule?e:{default:e}}function i(){return(i=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 l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s,u={13:"enter",27:"escape",32:"space",38:"up",40:"down"},p=((s=document.createElement("x")).style.cssText="pointer-events:auto","auto"===s.style.pointerEvents);function d(){return!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var f=function(e){function t(t){var n;return(n=e.call(this,t)||this).elementReferences={},n.state={focused:null,hovered:null,clicked:null,menuOpen:!1,options:t.defaultValue?[t.defaultValue]:[],query:t.defaultValue,selected:null},n.handleComponentBlur=n.handleComponentBlur.bind(l(l(n))),n.handleKeyDown=n.handleKeyDown.bind(l(l(n))),n.handleUpArrow=n.handleUpArrow.bind(l(l(n))),n.handleDownArrow=n.handleDownArrow.bind(l(l(n))),n.handleEnter=n.handleEnter.bind(l(l(n))),n.handlePrintableKey=n.handlePrintableKey.bind(l(l(n))),n.handleListMouseLeave=n.handleListMouseLeave.bind(l(l(n))),n.handleOptionBlur=n.handleOptionBlur.bind(l(l(n))),n.handleOptionClick=n.handleOptionClick.bind(l(l(n))),n.handleOptionFocus=n.handleOptionFocus.bind(l(l(n))),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(l(l(n))),n.handleInputBlur=n.handleInputBlur.bind(l(l(n))),n.handleInputChange=n.handleInputChange.bind(l(l(n))),n.handleInputFocus=n.handleInputFocus.bind(l(l(n))),n.pollInputElement=n.pollInputElement.bind(l(l(n))),n.getDirectInputChanges=n.getDirectInputChanges.bind(l(l(n))),n}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.componentDidMount=function(){this.pollInputElement()},n.componentWillUnmount=function(){clearTimeout(this.$pollInput),clearTimeout(this.$blurInput)},n.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){e.pollInputElement()}),100)},n.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},n.componentDidUpdate=function(e,t){var n=this.state,r=n.focused,o=n.clicked,a=null===r,c=t.focused!==r;(c&&!a||null!==o)&&this.elementReferences[r].focus();var i=-1===r,l=c&&null===t.focused;if(i&&l){var s=this.elementReferences[r];s.setSelectionRange(0,s.value.length)}},n.hasAutoselect=function(){return!d()&&this.props.autoselect},n.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},n.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},n.handleComponentBlur=function(e){var t,n=this.state,r=n.options,o=n.query,a=n.selected;this.props.confirmOnBlur?(t=e.query||o,this.props.onConfirm(r[a])):t=o,this.setState({focused:null,clicked:null,menuOpen:e.menuOpen||!1,query:t,selected:null})},n.handleListMouseLeave=function(e){this.setState({hovered:null})},n.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,o=n.clicked,a=n.menuOpen,c=n.options,i=n.selected,l=null===e.relatedTarget&&null===o,s=e.relatedTarget===this.elementReferences[-1],u=r!==t&&-1!==r;if(!u&&l||!u&&!s){var p=a&&d();this.handleComponentBlur({menuOpen:p,query:this.templateInputValue(c[i])})}},n.handleInputBlur=function(e){var t=this,n=this.state,r=n.focused,o=n.menuOpen,a=n.options,c=n.query,i=n.selected,l=-1!==r;if(clearTimeout(this.$blurInput),!l){var s=o&&d(),u=d()?c:this.templateInputValue(a[i]);this.$blurInput=setTimeout((function(){return t.handleComponentBlur({menuOpen:s,query:u})}),200)}},n.handleInputChange=function(e){var t=this,n=this.props,r=n.minLength,o=n.source,a=n.showAllValues,c=this.hasAutoselect(),i=e.target.value,l=0===i.length,s=this.state.query.length!==i.length,u=i.length>=r;this.setState({query:i}),a||!l&&s&&u?o(i,(function(e){var n=0<e.length;t.setState({menuOpen:n,options:e,selected:c&&n?0:-1})})):!l&&u||this.setState({menuOpen:!1,options:[]})},n.handleInputClick=function(e){this.handleInputChange(e)},n.handleInputFocus=function(e){this.setState({focused:-1})},n.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},n.handleOptionMouseEnter=function(e,t){d()||this.setState({hovered:t})},n.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);clearTimeout(this.$blurInput),this.props.onConfirm(n),this.setState({focused:-1,clicked:t,hovered:null,menuOpen:!1,query:r,selected:-1}),this.forceUpdate()},n.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;-1!==r&&n&&this.handleOptionFocus(r-1)},n.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",(function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,o=n.options,a=n.selected;a!==o.length-1&&r&&this.handleOptionFocus(a+1)}},n.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&""===this.state.query&&(e.preventDefault(),this.props.source("",(function(e){t.setState({menuOpen:!0,options:e})}))),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},n.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),0<=this.state.selected&&this.handleOptionClick(e,this.state.selected))},n.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},n.handleKeyDown=function(e){switch(u[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:(function(e){return 47<e&&e<58||32===e||8===e||64<e&&e<91||95<e&&e<112||185<e&&e<193||218<e&&e<223})(e.keyCode)&&this.handlePrintableKey(e)}},n.render=function(){var e,t=this,n=this.props,a=n.cssNamespace,c=n.displayMenu,l=n.id,s=n.minLength,u=n.name,d=n.placeholder,f=n.required,m=n.showAllValues,b=n.tNoResults,g=n.tStatusQueryTooShort,h=n.tStatusNoResults,O=n.tStatusSelectedOption,y=n.tStatusResults,v=n.dropdownArrow,j=this.state,k=j.focused,w=j.hovered,E=j.menuOpen,_=j.options,S=j.query,P=j.selected,x=this.hasAutoselect(),C=-1===k,I=0===_.length,B=0!==S.length,A=S.length>=s,T=this.props.showNoOptionsFound&&C&&I&&B&&A,D=a+"__wrapper",N=a+"__input",R=null!==k?" "+N+"--focused":"",M=this.props.showAllValues?" "+N+"--show-all-values":" "+N+"--default",L=a+"__dropdown-arrow-down",F=-1!==k&&null!==k,H=a+"__menu",z=H+"--"+c,W=H+"--"+(E||T?"visible":"hidden"),q=a+"__option",U=a+"__hint",V=this.templateInputValue(_[P]),G=V&&0===V.toLowerCase().indexOf(S.toLowerCase())&&x?S+V.substr(S.length):"",K=p&&G;return m&&"string"==typeof(e=v({className:L}))&&(e=(0,r.createElement)("div",{className:a+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:e}})),(0,r.createElement)("div",{className:D,onKeyDown:this.handleKeyDown,role:"combobox","aria-expanded":E?"true":"false"},(0,r.createElement)(o.default,{length:_.length,queryLength:S.length,minQueryLength:s,selectedOption:this.templateInputValue(_[P]),selectedOptionIndex:P,tQueryTooShort:g,tNoResults:h,tSelectedOption:O,tResults:y}),K&&(0,r.createElement)("span",null,(0,r.createElement)("input",{className:U,readonly:!0,tabIndex:"-1",value:G})),(0,r.createElement)("input",i({"aria-activedescendant":!!F&&l+"__option--"+k,"aria-owns":l+"__listbox",autoComplete:"off",className:""+N+R+M,id:l,onClick:function(e){return t.handleInputClick(e)},onBlur:this.handleInputBlur},function(e){return{onChange:e}}(this.handleInputChange),{onFocus:this.handleInputFocus,name:u,placeholder:d,ref:function(e){t.elementReferences[-1]=e},type:"text",role:"textbox",required:f,value:S})),e,(0,r.createElement)("ul",{className:H+" "+z+" "+W,onMouseLeave:function(e){return t.handleListMouseLeave(e)},id:l+"__listbox",role:"listbox"},_.map((function(e,n){var o=(-1===k?P===n:k===n)&&null===w?" "+q+"--focused":"",a=n%2?" "+q+"--odd":"";return(0,r.createElement)("li",{"aria-selected":k===n,className:""+q+o+a,dangerouslySetInnerHTML:{__html:t.templateSuggestion(e)},id:l+"__option--"+n,key:n,onBlur:function(e){return t.handleOptionBlur(e,n)},onClick:function(e){return t.handleOptionClick(e,n)},onMouseEnter:function(e){return t.handleOptionMouseEnter(e,n)},ref:function(e){t.elementReferences[n]=e},role:"option",tabIndex:"-1"})})),T&&(0,r.createElement)("li",{className:q+" "+q+"--no-results"},b())))},t}(r.Component);(t.default=f).defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},dropdownArrow:a.default}},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(36)})},function(e,t,n){e.exports=!n(3)&&!n(4)((function(){return 7!=Object.defineProperty(n(13)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(18),o=n(40),a=n(41),c=n(27),i=n(10),l=Object.assign;e.exports=!l||n(4)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=c(e),l=arguments.length,s=1,u=o.f,p=a.f;s<l;)for(var d,f=i(arguments[s++]),m=u?r(f).concat(u(f)):r(f),b=m.length,g=0;g<b;)p.call(f,d=m[g++])&&(n[d]=f[d]);return n}:l},function(e,t,n){var r=n(15),o=n(19),a=n(21)(!1),c=n(24)("IE_PROTO");e.exports=function(e,t){var n,i=o(e),l=0,s=[];for(n in i)n!=c&&r(i,n)&&s.push(n);for(;t.length>l;)r(i,n=t[l++])&&(~a(s,n)||s.push(n));return s}},function(e,t,n){var r=n(23),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t){e.exports=!1},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(8),o=n(43),a=n(26),c=n(24)("IE_PROTO"),i=function(){},l="prototype",s=function(){var e,t=n(13)("iframe"),r=a.length;for(t.style.display="none",n(44).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s[l][a[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(i[l]=r(e),n=new i,i[l]=null,n[c]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(7),o=n(8),a=n(18);e.exports=n(3)?Object.defineProperties:function(e,t){o(e);for(var n,c=a(t),i=c.length,l=0;l<i;)r.f(e,n=c[l++],t[n]);return e}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r=n(1),o=n(46)(1);r(r.P+r.F*!n(30)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(16),o=n(10),a=n(27),c=n(22),i=n(47);e.exports=function(e,t){var n=1==e,l=2==e,s=3==e,u=4==e,p=6==e,d=5==e||p,f=t||i;return function(t,i,m){for(var b,g,h=a(t),O=o(h),y=r(i,m,3),v=c(O.length),j=0,k=n?f(t,v):l?f(t,0):void 0;j<v;j++)if((d||j in O)&&(g=y(b=O[j],j,h),e))if(n)k[j]=g;else if(g)switch(e){case 3:return!0;case 5:return b;case 6:return j;case 2:k.push(b)}else if(u)return!1;return p?-1:s||u?u:k}}},function(e,t,n){var r=n(48);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(2),o=n(49),a=n(29)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(20);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(1),o=n(21)(!1),a=[].indexOf,c=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(c||!n(30)(a)),"Array",{indexOf:function(e){return c?a.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(7).f,o=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(53)})},function(e,t,n){"use strict";var r=n(17),o=n(2),a=n(54),c=[].slice,i={};e.exports=Function.bind||function(e){var t=r(this),n=c.call(arguments,1),l=function(){var r=n.concat(c.call(arguments));return this instanceof l?function(e,t,n){if(!(t in i)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";i[t]=Function("F,a","return new F("+r.join(",")+")")}return i[t](e,n)}(t,r.length,r):a(t,r,e)};return o(t.prototype)&&(l.prototype=t.prototype),l}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){n(56)("match",1,(function(e,t,n){return[function(n){"use strict";var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]}))},function(e,t,n){"use strict";var r=n(6),o=n(14),a=n(4),c=n(11),i=n(29);e.exports=function(e,t,n){var l=i(e),s=n(c,l,""[e]),u=s[0],p=s[1];a((function(){var t={};return t[l]=function(){return 7},7!=""[e](t)}))&&(o(String.prototype,e,u),r(RegExp.prototype,l,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,n(28);var r=n(12),o=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={bump:!1},t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e);var n=t.prototype;return n.componentWillReceiveProps=function(e){e.queryLength!==this.props.queryLength&&this.setState((function(e){return{bump:!e.bump}}))},n.render=function(){var e,t=this.props,n=t.length,o=t.queryLength,a=t.minQueryLength,c=t.selectedOption,i=t.selectedOptionIndex,l=t.tQueryTooShort,s=t.tNoResults,u=t.tSelectedOption,p=t.tResults,d=this.state.bump,f=o<a,m=0===n,b=c?u(c,n,i):"";return e=f?l(a):m?s():p(n,b),(0,r.createElement)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},e,(0,r.createElement)("span",null,d?",":",,"))},t}(r.Component);(t.default=o).defaultProps={tQueryTooShort:function(e){return"Type in "+e+" or more characters for results."},tNoResults:function(){return"No search results."},tSelectedOption:function(e,t,n){return e+" ("+(n+1)+" of "+t+") is selected."},tResults:function(e,t){return e+" "+(1===e?"result":"results")+" "+(1===e?"is":"are")+" available. "+t}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(12);t.default=function(e){var t=e.className;return(0,r.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:t,focusable:"false"},(0,r.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,r.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))}}])},e.exports=r(n(22))},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r={"./export.js":100,"./pre-publish-panel.js":101,"./story-settings-panel.js":102,"./template-menu-item.js":103};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=99},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return f})),n.d(t,"icon",(function(){return m})),n.d(t,"render",(function(){return g}));var r=n(0),o=n(10),a=(n(22),n(31)),c=n(2),i=n(1),l=window,s=l.ampStoriesExport,u=l.fetch,p=l.FormData,d=l.URL,f="amp-story-export",m="media-archive",b=function(){var e=Object(c.useDispatch)("core/notices"),t=e.createErrorNotice,n=e.createSuccessNotice,l=e.removeNotice,f=Object(c.useSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostId;return{hasPublishAction:Object(o.get)(n(),["_links","wp:action-publish"],!1),postId:r()}}),[]),m=f.hasPublishAction,b=f.postId;if(!m)return null;var g="amp-story-export__success-snackbar",h="amp-story-export__error-notice",O=Object(i.__)("Could not generate story archive.","amp"),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l(g),t(e?e.message:O,{id:h})};return Object(r.createElement)(a.PluginMoreMenuItem,{onClick:function(){var e=new p;e.append("action",s.action),e.append("_wpnonce",s.nonce),e.append("post_ID",b),l(h),n(Object(i.__)("Generating story archive…","amp"),{id:g,type:"snackbar"}),u(s.ajaxUrl,{method:"POST",body:e}).then((function(e){e.ok?e.blob().then((function(t){var n=(e.headers.get("Content-Disposition")||"").match(/"(.*?)"/);if(n){l(g);var r=document.createElement("a"),o=d.createObjectURL(t);r.addEventListener("click",(function e(){setTimeout((function(){d.revokeObjectURL(o),r.removeEventListener("click",e)}),150)}),!1),r.href=o,r.download=n[1],r.click()}else y()})).catch(y):e.json().then((function(e){y(e.data&&e.data.errorMessage?new Error(e.data.errorMessage):null)})).catch(y)})).catch(y)}},Object(i.__)("Export Story","amp"))},g=function(){return Object(r.createElement)(b,null)}},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return c})),n.d(t,"render",(function(){return i}));var r=n(0),o=n(40),a=n(3),c="amp-story-pre-publish-panel",i=function(){return Object(r.createElement)(o.a,{dimensions:Object(a.p)(),required:!0})}},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return m})),n.d(t,"icon",(function(){return b})),n.d(t,"render",(function(){return g}));var r=n(6),o=n.n(r),a=n(0),c=n(31),i=n(1),l=n(2),s=n(5),u=n(3);function p(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){var e=Object(l.useSelect)((function(e){var t=e("core/editor").getEditedPostAttribute,n=(0,e("amp/story").getSettings)().storySettings;return{meta:t("meta"),autoAdvanceAfterOptions:n.autoAdvanceAfterOptions||{}}}),[]),t=e.meta,n=e.autoAdvanceAfterOptions,r=Object(l.useDispatch)("core/editor").editPost,o=Object(a.useCallback)((function(e){r({meta:d({},t,{},e)})}),[t,r]),c=Object(u.M)(t),p=c.autoAdvanceAfter,f=c.autoAdvanceAfterDuration,m=n.find((function(e){return e.value===p}))||{};return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(i.__)("These settings are applied to new pages.","amp")),Object(a.createElement)(s.SelectControl,{label:Object(i.__)("Advance to next page","amp"),help:m.description||"",value:p,options:n,onChange:function(e){return o({amp_story_auto_advance_after:e})},className:"amp-story-settings-advance-after"}),"time"===p&&Object(a.createElement)(s.RangeControl,{label:Object(i.__)("Time in seconds","amp"),value:f?parseInt(f):0,onChange:function(e){return o({amp_story_auto_advance_after_duration:e})},min:0,max:100,className:"amp-story-settings-advance-after-duration"}))},m="amp-story-settings-panel",b="book",g=function(){return Object(a.createElement)(c.PluginDocumentSettingPanel,{name:m,className:m,title:Object(i.__)("Story Settings","amp")},Object(a.createElement)(f,null))}},function(e,t,n){"use strict";n.r(t),n.d(t,"isActive",(function(){return u})),n.d(t,"name",(function(){return p})),n.d(t,"render",(function(){return d}));var r=n(0),o=n(31),a=n(1),c=n(2),i=n(8),l=n(10),s=function(){var e=Object(c.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlock,r=Object(c.dispatch)("core/block-editor"),o=r.__experimentalReceiveReusableBlocks,s=r.__experimentalSaveReusableBlock,u=n(t());if("amp/amp-story-page"===u.name){var p=Object(i.cloneBlock)(u),d={id:Object(l.uniqueId)("reusable"),clientId:p.clientId,title:Object(a.__)("Template","amp")};o([{reusableBlock:d,parsedBlock:p}]),s(d.id)}},u=!1,p="amp-story",d=function(){return Object(r.createElement)(o.PluginBlockSettingsMenuItem,{allowedBlocks:["amp/amp-story-page"],icon:"welcome-add-page",label:Object(a.__)("Save as Template","amp"),role:"menuitem",onClick:s})}},function(e,t,n){var r={"./amp-story-cta/index.js":120,"./amp-story-page-attachment/index.js":119,"./amp-story-page/index.js":118,"./amp-story-post-author/index.js":108,"./amp-story-post-date/index.js":110,"./amp-story-post-title/index.js":112,"./amp-story-text/index.js":121};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=104},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return l})),n.d(t,"settings",(function(){return s}));var r=n(6),o=n.n(r),a=n(1),c=n(3);n(109);function i(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}var l="amp/amp-story-post-author",s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(a.__)("Story Author","amp"),description:Object(a.__)("Display the name of the story’s author. Modify by changing the author in the document settings.","amp"),category:"common",icon:"admin-users",keywords:[Object(a.__)("post","amp"),Object(a.__)("author","amp"),Object(a.__)("name","amp"),Object(a.__)("byline","amp")]},Object(c.o)({tagName:"div",attribute:"author",isEditable:!1}))},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return l})),n.d(t,"settings",(function(){return s}));var r=n(6),o=n.n(r),a=n(1),c=n(3);n(111);function i(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}var l="amp/amp-story-post-date",s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(a.__)("Story Date","amp"),description:Object(a.__)("Display the publish date of the story. Modify by changing the date in the document settings.","amp"),category:"common",icon:"clock",keywords:[Object(a.__)("publish date","amp")]},Object(c.o)({tagName:"div",attribute:"date",isEditable:!1}))},function(e,t,n){},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return s})),n.d(t,"settings",(function(){return u}));var r=n(6),o=n.n(r),a=n(0),c=n(1),i=n(3);n(113);function l(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}var s="amp/amp-story-post-title",u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(n,!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({title:Object(c.__)("Story Title","amp"),description:Object(c.__)("Display the story title. Modify by changing the overall title of the document.","amp"),category:"common",icon:Object(a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{d:"M5 4v3h5.5v12h3V7H19V4z"}),Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"})),keywords:[Object(c.__)("post","amp"),Object(c.__)("title","amp")]},Object(i.o)({tagName:"h1",attribute:"title",placeholder:Object(c.__)("Add story title…","amp"),isEditable:!0}))},function(e,t,n){},function(e,t,n){},function(e,t,n){var r={"./background-color/index.js":122,"./text-color/index.js":123};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=115},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=(n(22),n(1)),a=n(8),c=n(6),i=n.n(c),l=(n(9),n(7)),s=n(3),u=n(4);function p(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}var d=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{anchor:{source:"attribute",selector:"amp-story-page",attribute:"id"},mediaAlt:{type:"string"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:'amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',attribute:"src"},mediaType:{type:"string"},poster:{type:"string"},focalPoint:{type:"object"},autoAdvanceAfter:{type:"string"},autoAdvanceAfterDuration:{type:"number"},autoAdvanceAfterMedia:{type:"string"},backgroundColors:{default:"[]"},overlayOpacity:{default:100}},{deprecated:{default:"1.2.0"}}),save:function(e){var t,n=e.attributes,o=n.anchor,a=n.focalPoint,c=n.overlayOpacity,i=n.mediaUrl,p=n.mediaType,d=n.poster,f=n.autoAdvanceAfter,m=n.autoAdvanceAfterDuration,b=n.autoAdvanceAfterMedia,g=JSON.parse(n.backgroundColors);["auto","time"].includes(f)&&m?t=parseInt(m)+"s":"media"===f&&(t=b);var h={};0<g.length&&((h=Object(s.c)(h,g)).opacity=c/100);var O={objectPosition:u.p===p&&a?"".concat(100*a.x,"% ").concat(100*a.y,"%"):"initial"};return Object(r.createElement)("amp-story-page",{style:{backgroundColor:"#ffffff"},id:o,"auto-advance-after":t},i&&Object(r.createElement)("amp-story-grid-layer",{template:"fill"},u.p===p&&Object(r.createElement)("amp-img",{layout:"fill",src:i,style:O}),u.C===p&&Object(r.createElement)("amp-video",{layout:"fill",src:i,poster:d,muted:!0,autoplay:!0,loop:!0})),Object(r.createElement)("amp-story-grid-layer",{template:"fill",style:h}),Object(r.createElement)(l.InnerBlocks.Content,null))}}],f=n(11),m=n.n(f),b=n(15),g=n.n(b),h=n(2),O=n(60);var y=Object(h.withDispatch)((function(e,t,n){var r=n.select,o=r("core/block-editor"),c=o.getBlocksByClientId,i=o.getSelectedBlockClientIds,l=o.hasMultiSelection,u=r("amp/story").getCurrentPage,p=e("amp/story"),d=p.clearCopiedMarkup,f=p.setCopiedMarkup,m=e("core/block-editor"),b=m.removeBlock,g=m.selectBlock;return{onCopy:function(e){var t=i();if(0!==t.length)if(l()||!Object(O.documentHasSelection)()){var n=!0,r=!1,o=void 0;try{for(var p,m=t[Symbol.iterator]();!(n=(p=m.next()).done);n=!0){var h=p.value;if(Object(s.A)(h))return void d()}}catch(e){r=!0,o=e}finally{try{n||null==m.return||m.return()}finally{if(r)throw o}}var y=c(t),v=Object(a.serialize)(y),j="cut"===e.type;f(v).then((function(){if(Object(s.e)(v),j){var e=u(),n=!0,r=!1,o=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var i=a.value;g(e),b(i)}}catch(e){r=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw o}}}}))}else d();else d()}}}))((function(e){var t=e.children,n=e.onCopy,o=e.clientId,c=e.isSelected,i=Object(h.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSettings,r=t.getBlockOrder;return{canUserUseUnfilteredHTML:n().__experimentalCanUserUseUnfilteredHTML,getCopiedMarkupState:e("amp/story").getCopiedMarkup,blocksOnPage:r(o)}}),[o]),l=i.canUserUseUnfilteredHTML,u=i.getCopiedMarkupState,p=i.blocksOnPage,d=Object(h.useDispatch)("core/block-editor").insertBlock,f=Object(s.X)(),m=Object(s.W)();return Object(r.createElement)("div",{onCopy:n,onPaste:function(e){if(c){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){n=u(),r=u()}}e.preventDefault();var i=Object(a.pasteHandler)({HTML:r,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:l});o&&i.length&&i.forEach((function(e){f(e.name,o)?d(e,p.length,o):m(e.name)}))}},onCut:n},t)})),v=(n(107),n(5)),j=function(e){var t=e.backgroundColors,n=e.setAttributes,a=e.overlayOpacity,c=e.hasMedia,i=t.some((function(e){return e&&Object.values(e).some(Boolean)})),s=function(e,r){t[r]={color:e},n({backgroundColors:JSON.stringify(t),overlayOpacity:!i&&100===a&&c?50:a})};return Object(r.createElement)(l.PanelColorSettings,{title:Object(o.__)("Color Settings","amp"),colorSettings:function(){if(!t.length)return[{value:void 0,onChange:function(e){s(e,0)},label:Object(o.__)("Background Color","amp")}];var e=[],n=t.length>1;return t.forEach((function(t,r){e[r]={value:t?t.color:void 0,onChange:function(e){s(e,r)},
28
/* translators: %s: color number */
29
+ label:n?Object(o.sprintf)(Object(o.__)("Color %s","amp"),r+1):Object(o.__)("Background Color","amp")}})),e}()},Object(r.createElement)("p",null,t.length<2&&Object(r.createElement)(v.Button,{onClick:function(){return s(null,1)},isSmall:!0},Object(o.__)("Add Gradient","amp")),t.length>1&&Object(r.createElement)(v.Button,{onClick:function(){return e=t.length-1,t.splice(e,1),void n({backgroundColors:JSON.stringify(t)});var e},isLink:!0,isDestructive:!0},Object(o.__)("Remove Gradient","amp"))),i&&Object(r.createElement)(v.RangeControl,{label:Object(o.__)("Opacity","amp"),value:a,onChange:function(e){return n({overlayOpacity:e})},min:0,max:100,step:5,required:!0}))},k=function(e){var t=e.autoAdvanceAfter,n=e.autoAdvanceAfterDuration,a=e.autoAdvanceAfterOptions,c=e.setAttributes,i=e.clientId,l=Object(h.useSelect)((function(e){var t=e("core/block-editor").getBlockRootClientId,n=((0,e("amp/story").getAnimatedBlocks)()[i]||[]).filter((function(e){var n=e.id;return i===t(n)})),r=Object(s.w)(n);return Math.ceil(r/1e3)}),[i]),u=a.find((function(e){return e.value===t}))||{};return Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Page Settings","amp")},Object(r.createElement)(v.SelectControl,{label:Object(o.__)("Advance to next page","amp"),help:u.description||"",value:t,options:a,onChange:function(e){c({autoAdvanceAfter:e}),"auto"===e&&c({autoAdvanceAfterDuration:l})}}),"time"===t&&Object(r.createElement)(v.RangeControl,{label:Object(o.__)("Time in seconds","amp"),value:n?parseInt(n):0,onChange:function(e){return c({autoAdvanceAfterDuration:e})},min:Math.max(l,1),initialPosition:l,help:l>1?Object(o.__)("A minimum time is enforced because there are animated blocks on this page.","amp"):void 0}))},w=n(10),E=n(13),_=n.n(E),S=n(14),P=n(20),x=function(e){var t=e.allowedBackgroundMediaTypes,n=e.media,a=e.mediaId,c=e.mediaType,i=e.mediaAlt,p=e.mediaUrl,d=e.poster,f=e.focalPoint,b=e.videoFeaturedImage,g=e.setAttributes,h=Object(r.createElement)("p",null,Object(o.__)("To edit the background image or video, you need permission to upload media.","amp")),O=u.C===c&&Object(S.j)(Object(S.h)(n)),y=u.C===c?Object(S.h)(n):null,j=Object(r.useState)(!1),k=m()(j,2),E=k[0],x=k[1];return Object(r.useEffect)((function(){u.C===c&&(d||(b?g({poster:b.source_url}):!n||n.featured_media||E||(x(!0),Object(s.V)({id:a,src:p}).then((function(e){g({poster:Object(s.t)(e)}),x(!1)})).catch((function(){return x(!1)})))))}),[n,a,c,p,d,b,E,g]),Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Background Media","amp")},Object(r.createElement)(r.Fragment,null,O&&Object(r.createElement)(v.Notice,{status:"warning",isDismissible:!1},Object(o.sprintf)(
30
/* translators: %d: the number of recommended megabytes per second */
31
+ Object(o.__)("A video size of less than %d MB per second is recommended.","amp"),P.g),y&&" "+Object(o.sprintf)(
32
/* translators: %d: the number of actual megabytes per second */
33
+ Object(o.__)("The selected video is %d MB per second.","amp"),Math.round(y/P.d))),Object(r.createElement)(v.BaseControl,null,Object(r.createElement)(l.MediaUploadCheck,{fallback:h},Object(r.createElement)(l.MediaUpload,{onSelect:function(e){var t=Object(s.O)(e);g(t)},allowedTypes:t,value:a,render:function(e){var t=e.open;return Object(r.createElement)(v.Button,{isDefault:!0,isLarge:!0,onClick:t,className:"editor-amp-story-page-background"},p?Object(o.__)("Change Media","amp"):Object(o.__)("Select Media","amp"))},id:"story-background-media"}),p&&Object(r.createElement)(v.Button,{onClick:function(){return g({mediaUrl:void 0,mediaId:void 0,mediaType:void 0})},isLink:!0,isDestructive:!0},Object(o._x)("Remove","background media","amp")))),u.C===c&&(!E||d)&&Object(r.createElement)(l.MediaUploadCheck,null,Object(r.createElement)(v.BaseControl,{id:"editor-amp-story-page-poster",label:Object(o.__)("Poster Image","amp"),help:Object(o.sprintf)(
34
/* translators: 1: 720p. 2: 720w. 3: 1280h */
35
+ Object(o.__)("The recommended dimensions for a poster image are: %1$s (%2$s x %3$s)","amp"),"720p","720w","1080h")},!d&&Object(r.createElement)(v.Notice,{status:"error",isDismissible:!1},Object(o.__)("A poster image must be set.","amp")),Object(r.createElement)(l.MediaUpload,{title:Object(o.__)("Select Poster Image","amp"),onSelect:function(e){var t=Object(w.has)(e,["sizes",u.q,"url"])?e.sizes[u.q].url:e.url;g({poster:t})},allowedTypes:u.u,modalClass:"editor-amp-story-background-video-poster__media-modal",render:function(e){var t=e.open;return Object(r.createElement)(v.Button,{id:"editor-amp-story-page-poster",className:_()("editor-amp-story-page-background",{"editor-post-featured-image__toggle":!d,"editor-post-featured-image__preview":d}),onClick:t,"aria-label":d?Object(o.__)("Replace Poster Image","amp"):null},d&&Object(r.createElement)(v.ResponsiveWrapper,{naturalWidth:960,naturalHeight:1280},Object(r.createElement)("img",{src:d,alt:""})),!d&&Object(o.__)("Set Poster Image","amp"))}}))),u.p===c&&p&&v.FocalPointPicker&&Object(r.createElement)(v.FocalPointPicker,{label:Object(o.__)("Focal Point Picker","amp"),url:p,value:f,onChange:function(e){return g({focalPoint:e})}}),c&&Object(r.createElement)(v.TextControl,{label:Object(o.__)("Assistive Text","amp"),help:Object(o.__)("This text is used to inform visually impaired users about the background content.","amp"),value:i,onChange:function(e){return g({mediaAlt:e})}})))},C=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M15 15H5V5h10v10z"}))};C.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20"};var I=function(e){var t=e.clientId,n=Object(h.useSelect)((function(e){var n=e("core/block-editor").getBlock,r=e("amp/story").getAnimatedBlocksPerPage;return{isPlayingAnimation:e("amp/story").isPlayingAnimation(t),animatedBlocks:r(t).filter((function(e){var t=e.id;return e.animationType&&n(t)}))}}),[t]),a=n.isPlayingAnimation,c=n.animatedBlocks,i=Object(h.useDispatch)("amp/story"),l=i.playAnimation,s=i.stopAnimation,u=Object(r.useCallback)((function(){return l(t)}),[t,l]),p=Object(r.useCallback)((function(){return s(t)}),[t,s]);if(!c.length)return null;var d=a?Object(o.__)("Stop All Animations","amp"):Object(o.sprintf)(Object(o._n)("Play %s Animation","Play %s Animations",c.length,"amp"),c.length);return Object(r.createElement)(v.PanelBody,{title:Object(o.__)("Animation","amp")},Object(r.createElement)(v.IconButton,{icon:a?C({width:20,height:20}):"controls-play",className:"is-button is-default",onClick:a?p:u},d))},B=function(e){var t=e.clientId,n=Object(h.useDispatch)("core/block-editor").removeBlock,a=Object(h.useSelect)((function(e){return e("core/block-editor").getBlockOrder()}),[]),c=Object(r.useCallback)((function(){return n(t)}),[t,n]);return a.length<2?null:Object(r.createElement)(v.PanelBody,{className:"editor-amp-story-remove-page"},Object(r.createElement)(v.Button,{isLink:!0,isDestructive:!0,onClick:c},Object(o.__)("Remove","amp")))},A=function(e){var t=e.attributes,n=e.clientId,a=e.isSelected,c=e.setAttributes,p=t.anchor,d=t.mediaId,f=t.mediaType,b=t.mediaUrl,O=t.mediaAlt,v=t.focalPoint,w=void 0===v?{x:.5,y:.5}:v,E=t.overlayOpacity,_=t.poster,S=t.autoAdvanceAfter,P=t.autoAdvanceAfterDuration,C=t.backgroundColors,A=Object(h.useDispatch)("core/block-editor"),T=A.moveBlockToPosition,D=A.removeBlocks,N=Object(h.useDispatch)("core/notices").createErrorNotice,R=Object(h.useSelect)((function(e){var t,r=e("core").getMedia,o=e("core/block-editor"),a=o.getBlockOrder,c=o.getBlocksByClientId,i=e("amp/story").getSettings,l=d?r(d):void 0;u.C===f&&l&&l.featured_media&&!_&&(t=r(l.featured_media));var p=(0,e("core/editor").getEditedPostAttribute)("meta")||{},m=i().storySettings,b=a(n);return{media:l,videoFeaturedImage:t,immovableBlocks:c(b).filter((function(e){var t=e.name;return!u.c.includes(t)})),pagesOrder:a(),childrenOrder:b,storySettingsAttributes:Object(s.M)(p),autoAdvanceAfterOptions:m.autoAdvanceAfterOptions,allowedVideoMimeTypes:i().allowedVideoMimeTypes}}),[n,d,f,_]),M=R.media,L=R.videoFeaturedImage,F=R.pagesOrder,H=R.childrenOrder,z=R.immovableBlocks,W=R.storySettingsAttributes,q=R.autoAdvanceAfterOptions,U=R.allowedVideoMimeTypes,V=[u.p].concat(g()(U)),G=!(0===F.indexOf(n))&&!Object(s.l)(n)&&!Object(s.q)(n),K=!Object(s.l)(n)&&!Object(s.q)(n),$=u.c;G&&($=[].concat(g()($),["amp/amp-story-cta"])),K&&($=[].concat(g()($),["amp/amp-story-page-attachment"])),Object(r.useEffect)((function(){p||c({anchor:Object(s.x)()})}),[p,c]),Object(r.useEffect)((function(){W&&Object.entries(W).forEach((function(e){var n=m()(e,2),r=n[0],o=n[1];t.hasOwnProperty(r)||c(i()({},r,o))}))}),[W,c,t]);var Y=Object(r.useRef)();Object(r.useEffect)((function(){Y.current&&Y.current.load()}),[f,b]),Object(r.useEffect)((function(){if(z.length>1){var e=z.slice(0,-1).map((function(e){return e.clientId}));D(e),N(Object(o.__)("Action canceled. Only one block of this type is allowed per page.","amp"),{type:"snackbar",isDismissible:!0})}}),[H,n,N,z,D]),Object(r.useEffect)((function(){if(!(H.length<=1)&&1===z.length){var e=z[0];H[H.length-1]!==e.clientId&&T(e.clientId,n,n,H.length-1)}}),[H,n,T,z]);var X={backgroundImage:u.p===f&&b?"url(".concat(b,")"):void 0,backgroundPosition:u.p===f?"".concat(100*w.x,"% ").concat(100*w.y,"%"):void 0,backgroundRepeat:"no-repeat",backgroundSize:"cover"};u.C===f&&_&&(X.backgroundImage="url(".concat(_,")"));var Q={width:"100%",height:"100%",position:"absolute"},J=JSON.parse(C);return(Q=Object(s.c)(Q,J)).opacity=E/100,Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)(B,{clientId:n}),Object(r.createElement)(j,{backgroundColors:J,setAttributes:c,overlayOpacity:E,hasMedia:Boolean(b)}),Object(r.createElement)(x,{allowedBackgroundMediaTypes:V,media:M,mediaId:d,mediaType:f,mediaAlt:O,mediaUrl:b,poster:_,focalPoint:w,videoFeaturedImage:L,setAttributes:c}),Object(r.createElement)(k,{autoAdvanceAfter:S,autoAdvanceAfterDuration:P,autoAdvanceAfterOptions:q,clientId:n,setAttributes:c}),Object(r.createElement)(I,{clientId:n})),Object(r.createElement)(y,{clientId:n,isSelected:a},Object(r.createElement)("div",{style:X},u.C===f&&M&&Object(r.createElement)("div",{className:"editor-amp-story-page-video-wrap"},Object(r.createElement)("video",{autoPlay:!0,muted:!0,loop:!0,className:"editor-amp-story-page-video",poster:_,ref:Y},Object(r.createElement)("source",{src:b,type:M.mime_type}))),J.length>0&&Object(r.createElement)("div",{style:Q}),Object(r.createElement)(l.InnerBlocks,{allowedBlocks:$}))))},T=function(e){var t,n=e.attributes,o=n.anchor,a=n.focalPoint,c=n.overlayOpacity,i=n.mediaId,p=n.mediaUrl,d=n.mediaType,f=n.mediaAlt,m=n.poster,b=n.autoAdvanceAfter,g=n.autoAdvanceAfterDuration,h=n.autoAdvanceAfterMedia,O=JSON.parse(n.backgroundColors);["auto","time"].includes(b)&&g?t=parseInt(g)+"s":"media"===b&&(t=h);var y={};0<O.length&&((y=Object(s.c)(y,O)).opacity=c/100);var v=u.p===d&&a?"".concat(100*a.x,"% ").concat(100*a.y,"%"):"initial";return Object(r.createElement)("amp-story-page",{style:{backgroundColor:"#ffffff"},id:o,"auto-advance-after":t},p&&Object(r.createElement)("amp-story-grid-layer",{template:"fill"},u.p===d&&Object(r.createElement)("img",{layout:"fill",src:p,alt:f,className:i?"wp-image-".concat(i):null,"object-position":v}),u.C===d&&Object(r.createElement)("amp-video",{layout:"fill","aria-label":f,src:p,poster:m,muted:!0,autoplay:!0,loop:!0})),Object(r.createElement)("amp-story-grid-layer",{template:"fill",style:y}),Object(r.createElement)(l.InnerBlocks.Content,null))};n.d(t,"name",(function(){return N})),n.d(t,"settings",(function(){return R}));var D=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("g",{fill:"#181D21"},Object(r.createElement)("path",{d:"M18.4 21H5.6V3h7.8l5 4.9V21zM7.1 19.5h9.8V8.6l-4-4.1H7.1v15z"}),Object(r.createElement)("path",{d:"M11.5 5.4v4.3h4.4"})))};D.defaultProps={viewBox:"0 0 24 24"};var N="amp/amp-story-page",R={title:Object(o.__)("Page","amp"),category:"layout",icon:D({width:24,height:24}),attributes:{anchor:{source:"attribute",selector:"amp-story-page",attribute:"id"},mediaId:{type:"number"},mediaUrl:{type:"string",source:"attribute",selector:'amp-story-grid-layer[template="fill"] > img, amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',attribute:"src"},mediaType:{type:"string"},mediaAlt:{type:"string"},poster:{type:"string"},focalPoint:{type:"object"},autoAdvanceAfter:{type:"string"},autoAdvanceAfterDuration:{type:"number"},autoAdvanceAfterMedia:{type:"string"},backgroundColors:{default:"[]"},overlayOpacity:{default:100}},supports:{reusable:!0},edit:A,save:T,deprecated:d,transforms:{from:[{type:"raw",priority:20,selector:"amp-story-page",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(N,t);return Object(a.createBlock)(N,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),a=n.n(o),c=n(11),i=n.n(c),l=n(0),s=(n(9),n(13)),u=n.n(s),p=n(2),d=(n(106),n(14)),f=(n(22),n(7)),m=n(16),b=function(e){var t=e.setAttributes,n=e.toggleAttachment,o=e.openText;return Object(l.createElement)("div",{className:"open-attachment-wrapper"},Object(l.createElement)("span",{role:"button",tabIndex:"0",onClick:function(){n(!0)},onKeyDown:function(e){m.ENTER!==e.keyCode&&m.SPACE!==e.keyCode||(n(!0),e.stopPropagation())},className:"amp-story-page-open-attachment-icon"},Object(l.createElement)("span",{className:"amp-story-page-open-attachment-bar amp-story-page-open-attachment-bar-left"}),Object(l.createElement)("span",{className:"amp-story-page-open-attachment-bar amp-story-page-open-attachment-bar-right"})),Object(l.createElement)("div",{className:"amp-story-page-attachment__text"},Object(l.createElement)(f.RichText,{value:o,tagName:"div",onChange:function(e){return t({openText:e})},placeholder:Object(r.__)("Swipe Up","amp")})))},g=n(38),h=n.n(g),O=n(5),y=n(17),v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];function r(r){e.current&&e.current.contains(r.target)&&(t&&t(),n&&e.current.click())}Object(l.useEffect)((function(){return e.current&&document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}}))},j=function(e){var t=Object(l.useState)(null),n=i()(t,2),o=n[0],a=n[1],c=Object(l.useState)(!1),s=i()(c,2),u=s[0],d=s[1],b=Object(l.useState)(""),g=i()(b,2),j=g[0],k=g[1],w=Object(l.useState)(!1),E=i()(w,2),_=E[0],S=E[1],P=Object(l.useRef)(null),x=Object(l.useRef)(!0),C=e.attributes,I=e.setAttributes,B=e.toggleAttachment,A=C.attachmentClass,T=C.postId,D=C.postType,N=C.title,R=C.wrapperStyle,M=Object(p.useSelect)((function(e){return(0,e("amp/story").getSettings)().allowedPageAttachmentPostTypes}),[]),L=Object(l.useCallback)((function(){var e=M[D]||"".concat(D,"s");if(x.current=!0,T){S(!0);var t=P.current=h()({path:"/wp/v2/".concat(e,"/").concat(T)}).then((function(e){x.current&&P.current===t&&(a(e),d(!1),S(!1))})).catch((function(){x.current&&P.current===t&&(a(null),d(!0),S(!1))}))}}),[T,D,M]);Object(l.useEffect)((function(){return function(){x.current=!1}}),[]),Object(l.useEffect)((function(){L()}),[L]);var F=Object(l.useRef)(null),H=Object(l.useRef)(null);return v(H,(function(){B(!1)})),v(F,null,!0),Object(l.createElement)("div",{className:"attachment-container"},Object(l.createElement)("div",{className:"attachment-wrapper"},Object(l.createElement)("div",{className:"attachment-header"},Object(l.createElement)("span",{tabIndex:"0",className:"amp-story-page-attachment-close-button",role:"button",onKeyDown:function(e){m.ENTER!==e.keyCode&&m.SPACE!==e.keyCode||(B(!1),e.stopPropagation())},ref:H}),Object(l.createElement)("div",{className:"amp-story-page-attachment-title"},Object(l.createElement)(f.RichText,{value:N,tagName:"div",onChange:function(e){return I({title:e})},placeholder:Object(r.__)("Write Title","amp"),onClick:function(e){return e.stopPropagation()}})),T&&Object(l.createElement)(O.Button,{className:"remove-attachment-post",onClick:function(e){e.stopPropagation(),d(!1),I({postId:null}),a(null)},isLink:!0,isDestructive:!0,ref:F},Object(r.__)("Remove Post","amp"))),Object(l.createElement)("div",{className:A,style:R},_&&Object(l.createElement)(O.Spinner,null),!_&&o&&o.content&&Object(l.createElement)(l.RawHTML,null,"<h2>".concat(o.title.rendered,"</h2>").concat(o.content.rendered)),!_&&(!T||u)&&Object(l.createElement)(l.Fragment,null,u&&Object(l.createElement)("div",null,Object(l.createElement)("p",{className:"failed-message"},Object(r.__)("The selected post failed to load, please select a new post or try loading again.","amp"),Object(l.createElement)(O.Button,{className:"refetch-attachment-post",onClick:function(e){e.stopPropagation(),L()},isLink:!0},Object(r.__)(" Try again","amp")))),Object(l.createElement)(y.n,{labelText:Object(r.__)("Attachment Content","amp"),placeholder:Object(r.__)("Search for content ...","amp"),value:j,onSelect:function(e,t){I({postId:e,postType:t}),k("")},onChange:function(e){return k(e)},searchablePostTypes:Object.keys(M)})))))},k=function(e){var t=e.attributes,n=e.setAttributes,r=e.backgroundColor,o=e.customBackgroundColor,c=e.textColor,s=t.opacity,f=t.openText,m=Object(l.useState)(!1),g=i()(m,2),h=g[0],O=g[1],y=Object(p.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]);return Object(l.useEffect)((function(){var e=Object(d.d)(y,r,o,s),t=u()("amp-page-attachment-content",a()({"has-text-color":c.color},c.class,c.class)),i={wrapperStyle:{color:c.color,backgroundColor:e}};i.attachmentClass=t,n(i)}),[y,r,o,s,c,n]),h?Object(l.createElement)(j,{setAttributes:n,attributes:t,toggleAttachment:O}):Object(l.createElement)(b,{setAttributes:n,toggleAttachment:O,openText:f})};n.d(t,"name",(function(){return E})),n.d(t,"settings",(function(){return _}));var w={postId:{type:"number"},postType:{type:"string",default:"post"},title:{type:"string"},openText:{type:"string",default:Object(r.__)("Swipe Up","amp")},wrapperStyle:{default:{}},attachmentClass:{type:"string",default:"amp-page-attachment-content"}},E="amp/amp-story-page-attachment",_={title:Object(r.__)("Page Attachment","amp"),description:Object(r.__)("Attach additional content to a story page.","amp"),icon:"media-document",category:"layout",keywords:[Object(r.__)("attachment","amp"),Object(r.__)("content","amp"),Object(r.__)("embed","amp")],attributes:w,edit:k,save:function(){return null}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=(n(22),n(1)),a=n(8),c=n(6),i=n.n(c),l=n(11),s=n.n(l),u=n(13),p=n.n(u),d=(n(9),n(5)),f=n(7),m=n(2),b=(n(105),n(3)),g=n(14),h=n(17),O=n(4),y=function(e){var t=e.attributes,n=e.backgroundColor,a=e.className,c=e.clientId,l=e.fontSize,u=e.isSelected,y=e.name,v=e.setAttributes,j=e.textColor,k=t.anchor,w=t.text,E=t.url,_=t.customBackgroundColor,S=t.opacity,P=t.btnPositionTop,x=t.btnPositionLeft,C=t.btnWidth,I=t.btnHeight,B=Object(r.useRef)(null);Object(r.useEffect)((function(){B.current=document.querySelector("#amp-story-cta-button-".concat(c," .wp-block-amp-amp-story-cta"))}),[c]);var A=Object(r.useCallback)((function(){if(B.current){var e=Object(b.r)("x",B.current.clientWidth-48),t=Object(b.r)("y",B.current.clientHeight-14,O.y);v({btnWidth:e,btnHeight:t})}}),[v]),T=Object(r.useState)(!1),D=s()(T,2),N=D[0],R=D[1],M=Object(r.useState)(!0),L=s()(M,2),F=L[0],H=L[1];Object(r.useEffect)((function(){k||v({anchor:Object(b.x)()})}),[k,v]),Object(r.useEffect)((function(){u||(R(!1),H(!0))}),[u]),Object(r.useEffect)((function(){N&&Object(b.T)(".is-selected .amp-block-story-cta__link")}),[N]),Object(r.useEffect)((function(){w&&w.length&&!C&&!I&&A()}),[C,I,w,A]);var z=Object(m.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]),W=Object(g.d)(z,n,_,S),q=Object(o.__)("Add text…","amp"),U=p()("amp-block-story-cta__link",i()({"has-background":n.color,"has-text-color":j.color},j.class,j.class)),V={color:j.color,fontSize:l.size?l.size+"px":void 0};return Object(r.createElement)("div",{className:"amp-story-cta-button",id:"amp-story-cta-button-".concat(c),style:{top:"".concat(P,"%"),left:"".concat(x,"%")}},Object(r.createElement)("div",{className:a,style:{backgroundColor:W}},N?Object(r.createElement)(f.RichText,{placeholder:q,value:w,onChange:function(e){v({text:e}),A()},className:U,style:V}):Object(r.createElement)(h.h,{blockElementId:"amp-story-cta-button-".concat(c),clientId:c,name:y,isDraggable:!0,isEditing:N,isSelected:u,hasOverlay:F,toggleIsEditing:R,toggleOverlay:H,text:w,textStyle:V,textWrapperClass:U,placeholder:q})),u&&N&&Object(r.createElement)("form",{className:"amp-block-story-cta__inline-link",onSubmit:function(e){return e.preventDefault()}},Object(r.createElement)(d.Dashicon,{icon:"admin-links"}),Object(r.createElement)(f.URLInput,{value:E,onChange:function(e){return v({url:e})},autoFocus:!1}),Object(r.createElement)(d.IconButton,{icon:"editor-break",label:Object(o.__)("Apply","amp"),type:"submit"})))};function v(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}var j=function(e){var t=e.attributes,n=t.anchor,o=t.btnPositionLeft,a=t.btnPositionTop,c=t.btnWidth,l=t.btnHeight,s=t.text,u=t.url,p=Object(b.m)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{className:"amp-block-story-cta__link"})),d=Object(b.v)(t);return d.top=a?"".concat(a,"%"):void 0,d.left=o?"".concat(o,"%"):void 0,d.width=c?"".concat(c,"%"):void 0,d.height=l?"".concat(l,"%"):void 0,d.display="flex",Object(r.createElement)("amp-story-cta-layer",{id:n||Object(b.x)()},Object(r.createElement)("div",{className:"amp-cta-button-wrapper"},Object(r.createElement)("a",{className:p,href:u,style:d},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-cta-content"},Object(r.createElement)(r.RawHTML,null,s)))))},k=n(10);function w(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _={url:{type:"string",source:"attribute",selector:"a",attribute:"href"},text:{type:"string",source:"html",selector:"a"},customTextColor:{type:"string",default:"#ffffff"},customBackgroundColor:{type:"string",default:"#32373c"},btnPositionTop:{type:"number",default:0},btnPositionLeft:{type:"number",default:30},btnWidth:{type:"number"},btnHeight:{type:"number"}},S=[{attributes:E({align:{type:"string",default:"center"}},_),supports:{align:!0,alignWide:!1},save:function(e){var t=e.attributes,n=t.anchor,o=t.url,a=t.text,c=Object(b.m)(E({},t,{className:"amp-block-story-cta__link"})),i=Object(b.v)(t);return Object(r.createElement)("amp-story-cta-layer",{id:n},Object(r.createElement)(f.RichText.Content,{tagName:"a",className:c,href:o,style:i,value:a}))},migrate:function(e){return E({},Object(k.omit)(e,"align"),{btnPositionTop:0,btnPositionLeft:30})}},{attributes:E({},_),save:function(e){var t=e.attributes,n=t.anchor,o=t.btnPositionLeft,a=t.btnPositionTop,c=t.text,i=t.url,l=Object(b.m)(E({},t,{className:"amp-block-story-cta__link"})),s=Object(b.v)(t);return s.top=a?"".concat(a,"%"):void 0,s.left=o?"".concat(o,"%"):void 0,Object(r.createElement)("amp-story-cta-layer",{id:n||Object(b.x)()},Object(r.createElement)(f.RichText.Content,{tagName:"a",className:l,href:i,style:s,value:c}))}}];n.d(t,"name",(function(){return x})),n.d(t,"settings",(function(){return C}));var P=function(e){return Object(r.createElement)("svg",e,Object(r.createElement)("path",{d:"M7 14v2H5a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v5a3.001 3.001 0 0 1-2 2.83V8a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h2z"}),Object(r.createElement)("path",{d:"M18.31 15.442a.563.563 0 0 0-.202-.636l-6.631-4.808a.562.562 0 0 0-.891.415l-.58 8.17a.564.564 0 0 0 .359.565c.236.1.49.018.644-.175l1.646-2.074 1.632 3.5a.561.561 0 0 0 .748.273L16.477 20a.562.562 0 0 0 .272-.748l-1.633-3.5 2.647.072a.563.563 0 0 0 .548-.382z"}))};P.defaultProps={width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"};var x="amp/amp-story-cta",C={title:Object(o.__)("Call to Action","amp"),description:Object(o.__)("Prompt visitors to take action with a button-style link.","amp"),icon:P,category:"layout",keywords:[Object(o.__)("cta","amp"),Object(o.__)("button","amp")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},text:{type:"string",source:"html",selector:".amp-cta-content"},customTextColor:{type:"string",default:"#ffffff"},customBackgroundColor:{type:"string",default:"#32373c"},btnPositionTop:{type:"number",default:0},btnPositionLeft:{type:"number",default:5},btnWidth:{type:"number"},btnHeight:{type:"number"}},edit:y,save:j,deprecated:S,transforms:{from:[{type:"raw",priority:20,selector:"amp-story-cta-layer",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(x,t);return Object(a.createBlock)(x,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),a=n(8),c=n(6),i=n.n(c),l=n(11),s=n.n(l),u=n(13),p=n.n(u),d=(n(9),n(7)),f=n(2),m=n(3),b=n(14),g=(n(114),n(17));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 O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e){var t,n=e.attributes,a=e.setAttributes,c=e.className,l=e.clientId,u=e.fontSize,h=e.isPartOfMultiSelection,y=e.isSelected,v=e.backgroundColor,j=e.customBackgroundColor,k=e.textColor,w=e.name,E=n.placeholder,_=n.content,S=n.align,P=n.ampFontFamily,x=n.ampFitText,C=n.autoFontSize,I=n.width,B=n.height,A=n.opacity,T=n.isPasted,D=Object(r.useState)(!1),N=s()(D,2),R=N[0],M=N[1],L=Object(r.useState)(!0),F=s()(L,2),H=F[0],z=F[1];Object(r.useEffect)((function(){R&&Object(m.T)(".is-selected .wp-block-amp-amp-story-text")}),[R]),Object(r.useEffect)((function(){x&&Object(m.L)(e)}),[x,P,I,B,_,e]),Object(r.useEffect)((function(){x&&!T||Object(m.K)(e),T&&a({isPasted:!1})}),[x,u,P,_,T,e,a]),Object(r.useEffect)((function(){y||(M(!1),z(!0))}),[y]);var W=u&&u.size?"".concat(u.size,"px"):void 0,q=Object(f.useSelect)((function(e){return(0,e("core/block-editor").getSettings)().colors}),[]),U={backgroundColor:Object(b.d)(q,v,j,A)};x&&_.length&&(U.lineHeight=B+"px");var V=[],G="wp-block-amp-story-text-wrapper";n.className&&n.className.length&&n.className.split(" ").forEach((function(e){e.includes("is-style")&&V.push(e)}));V.length&&(G+=" "+V.join(" "));var K=(t={"has-text-color":k.color},i()(t,k.class,k.class),i()(t,u.class,x?void 0:u.class),i()(t,"is-amp-fit-text",x),t),$={color:k.color,fontSize:x?"".concat(C,"px"):W,textAlign:S,position:x&&_.length?"static":void 0};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.BlockControls,null,Object(r.createElement)(d.AlignmentToolbar,{value:S,onChange:function(e){return a({align:e})}})),Object(r.createElement)("div",{className:p()(G,{"with-line-height":x,"is-empty-draggable-text":!R&&!_.length}),style:U},R?Object(r.createElement)("div",{className:"wp-block-amp-story-text"},Object(r.createElement)(d.RichText,{tagName:"p",value:_,onChange:function(e){return a({content:e})},onReplace:function(t){(t=t.filter((function(e){return void 0!==e}))).length&&e.onReplace(t.map((function(e,t){return 0===t&&e.name===w?O({},e,{attributes:O({},n,{},e.attributes)}):e})))},onSplit:function(){},style:$,className:p()(c,K),placeholder:E||Object(o.__)("Write text…","amp")})):Object(r.createElement)(g.h,{blockClass:"wp-block-amp-story-text",blockElementId:"block-".concat(l),clientId:l,name:w,isEditing:R,isDraggable:!h,isSelected:y,hasOverlay:H,toggleIsEditing:M,toggleOverlay:z,text:_,textStyle:$,textWrapperClass:p()(c+" block-editor-rich-text__editable editor-rich-text__editable",K),placeholder:E||Object(o.__)("Write text…","amp")})))},v=function(e){var t=e.attributes,n=t.content,o=t.ampFitText,a=t.tagName,c=Object(m.m)(t),i=Object(m.v)(t);if(!o)return Object(r.createElement)(d.RichText.Content,{tagName:a,style:i,className:c,value:n,format:"string"});var l=a;return i.display="flex",Object(r.createElement)(l,{style:i,className:c},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},Object(r.createElement)(r.RawHTML,null,n)))},j=n(19);function k(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}var w=[{attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(n,!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{placeholder:{type:"string"},content:{type:"string",source:"html",selector:".amp-text-content",default:""},type:{type:"string",default:"auto"},tagName:{type:"string",default:"p"},align:{type:"string"}},{deprecated:{default:"1.2.0"}}),save:function(e){var t=e.attributes,n=t.content,o=t.ampFitText,a=t.tagName,c=Object(m.m)(t),i=Object(m.v)(t);if(!o)return Object(r.createElement)(d.RichText.Content,{tagName:a,style:i,className:c,value:n,format:"string"});var l=a;return i.display="flex",Object(r.createElement)(l,{style:i,className:c},Object(r.createElement)("amp-fit-text",{layout:"flex-item",className:"amp-text-content"},Object(r.createElement)(r.RawHTML,null,n)))},migrate:j.a}];n.d(t,"name",(function(){return E})),n.d(t,"settings",(function(){return _}));var E="amp/amp-story-text",_={title:Object(o.__)("Text","amp"),description:Object(o.__)("Add free-form text to your story.","amp"),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M11 5v7H9.5C7.6 12 6 10.4 6 8.5S7.6 5 9.5 5H11m8-2H9.5C6.5 3 4 5.5 4 8.5S6.5 14 9.5 14H11v7h2V5h2v16h2V5h2V3z"})),category:"common",keywords:[Object(o.__)("title","amp"),Object(o.__)("heading","amp"),Object(o.__)("paragraph","amp")],supports:{anchor:!0,reusable:!0,className:!0},attributes:{placeholder:{type:"string"},content:{type:"string",source:"html",selector:".amp-text-content",default:""},type:{type:"string",default:"auto"},tagName:{type:"string",default:"p"},align:{type:"string"},isPasted:{type:"boolean",default:!1}},edit:y,save:v,deprecated:w,transforms:{from:[{type:"raw",priority:20,selector:"p,h1,h2",transform:function(e){var t=e.outerHTML,n=Object(a.getBlockAttributes)(E,t);return n.content||(n.content=e.textContent,n.tagName=e.nodeName,n.ampFitText=!1,n.isPasted=!0),Object(a.createBlock)(E,n)}}]}}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),a=(n(22),n(9),n(7)),c=n(5),i=n(30),l=(n(116),function(e){return Object(o.createElement)("svg",e,Object(o.createElement)("path",{d:"M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"}))});l.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};var s=function(e){var t,n=e.isActive,s=e.value,u=e.onChange;if(n){var d=Object(i.getActiveFormat)(s,p).attributes.style;t=d.replace(new RegExp("^background-color:\\s*"),"")}return Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.Dropdown,{position:"bottom right",renderToggle:function(e){var n=e.isOpen,a=e.onToggle;return Object(o.createElement)(c.IconButton,{icon:l({width:16,height:16,viewBox:"0 0 24 24"}),tooltip:Object(r.__)("Highlight Color","amp"),onClick:a,"aria-expanded":n},Object(o.createElement)("span",{className:"components-background-color-indicator",style:{backgroundColor:t}}))},renderContent:function(){return Object(o.createElement)("div",{className:"components-background-color-popover-content"},Object(o.createElement)(a.ColorPalette,{value:t,onChange:function(e){u(e?Object(i.applyFormat)(s,{type:p,attributes:{style:"background-color:".concat(e)}}):Object(i.removeFormat)(s,p))}}))}})))};n.d(t,"priority",(function(){return u})),n.d(t,"name",(function(){return p})),n.d(t,"settings",(function(){return d}));var u=20,p="amp/background-color",d={title:Object(r.__)("Inline Background Color","amp"),tagName:"span",className:"amp-background-color",attributes:{style:"style"},edit:s}},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),a=(n(9),n(7)),c=n(5),i=n(30),l=(n(117),function(e){var t,n=e.isActive,l=e.value,s=e.onChange;if(n){var p=Object(i.getActiveFormat)(l,u).attributes.style;t=p.replace(new RegExp("^color:\\s*"),"")}return Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.Dropdown,{position:"bottom right",renderToggle:function(e){var n=e.isOpen,a=e.onToggle;return Object(o.createElement)(c.IconButton,{icon:"editor-textcolor",tooltip:Object(r.__)("Text Color","amp"),onClick:a,"aria-expanded":n},Object(o.createElement)("span",{className:"components-text-color-indicator",style:{backgroundColor:t}}))},renderContent:function(){return Object(o.createElement)("div",{className:"components-text-color-popover-content"},Object(o.createElement)(a.ColorPalette,{value:t,onChange:function(e){s(e?Object(i.applyFormat)(l,{type:u,attributes:{style:"color:".concat(e)}}):Object(i.removeFormat)(l,u))}}))}})))});n.d(t,"priority",(function(){return s})),n.d(t,"name",(function(){return u})),n.d(t,"settings",(function(){return p}));var s=10,u="amp/text-color",p={title:Object(r.__)("Inline Text Color","amp"),tagName:"span",className:"amp-text-color",attributes:{style:"style"},edit:l}}]);
back-compat/templates-v0-3/single.php CHANGED
@@ -5,12 +5,18 @@
5
* @package AMP
6
*/
7
8
?>
9
<!doctype html>
10
<html amp <?php language_attributes(); ?>>
11
<head>
12
<meta charset="utf-8">
13
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
14
<?php do_action( 'amp_post_template_head', $this ); ?>
15
16
<style amp-custom>
5
* @package AMP
6
*/
7
8
+ /**
9
+ * Context.
10
+ *
11
+ * @var AMP_Post_Template $this
12
+ */
13
+
14
?>
15
<!doctype html>
16
<html amp <?php language_attributes(); ?>>
17
<head>
18
<meta charset="utf-8">
19
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
20
<?php do_action( 'amp_post_template_head', $this ); ?>
21
22
<style amp-custom>
includes/admin/functions.php CHANGED
@@ -101,7 +101,6 @@ function amp_add_customizer_link() {
101
$menu_slug = add_query_arg(
102
[
103
'autofocus[panel]' => AMP_Template_Customizer::PANEL_ID,
104
- 'url' => rawurlencode( amp_admin_get_preview_permalink() ),
105
'return' => rawurlencode( admin_url() ),
106
],
107
'customize.php'
101
$menu_slug = add_query_arg(
102
[
103
'autofocus[panel]' => AMP_Template_Customizer::PANEL_ID,
104
'return' => rawurlencode( admin_url() ),
105
],
106
'customize.php'
includes/amp-helper-functions.php CHANGED
@@ -1295,7 +1295,7 @@ function amp_add_admin_bar_view_link( $wp_admin_bar ) {
1295
'href' => esc_url( $href ),
1296
];
1297
1298
- $wp_admin_bar->add_menu( $parent );
1299
}
1300
1301
/**
1295
'href' => esc_url( $href ),
1296
];
1297
1298
+ $wp_admin_bar->add_node( $parent );
1299
}
1300
1301
/**
includes/options/class-amp-options-manager.php CHANGED
@@ -400,9 +400,11 @@ class AMP_Options_Manager {
400
add_settings_error(
401
self::OPTION_NAME,
402
$code,
403
- sprintf(
404
- $error,
405
- isset( $post_type->label ) ? $post_type->label : $post_type->name
406
)
407
);
408
}
@@ -550,10 +552,13 @@ class AMP_Options_Manager {
550
if ( ! wp_using_ext_object_cache() && 'toplevel_page_' . self::OPTION_NAME === get_current_screen()->id ) {
551
printf(
552
'<div class="notice notice-warning"><p>%s</p></div>',
553
- sprintf(
554
- /* translators: %s: Persistent object cache support URL */
555
- __( 'The AMP plugin performs at its best when persistent object cache is enabled. <a href="%s">More details</a>', 'amp' ), // phpcs:ignore WordPress.Security.EscapeOutput
556
- esc_url( __( 'https://codex.wordpress.org/Class_Reference/WP_Object_Cache#Persistent_Caching', 'amp' ) )
557
)
558
);
559
}
@@ -575,10 +580,13 @@ class AMP_Options_Manager {
575
576
printf(
577
'<div class="notice notice-warning is-dismissible"><p>%s</p></div>',
578
- sprintf(
579
- /* translators: %s: post-processor cache support URL */
580
- __( 'The AMP plugin&lsquo;s post-processor cache was disabled due to the detection of highly-variable content. <a href="%s">More details</a>', 'amp' ), // phpcs:ignore WordPress.Security.EscapeOutput
581
- esc_url( __( 'https://github.com/ampproject/amp-wp/wiki/Post-Processor-Cache', 'amp' ) )
582
)
583
);
584
}
@@ -607,10 +615,13 @@ class AMP_Options_Manager {
607
608
printf(
609
'<div class="notice notice-warning"><p>%s</p></div>',
610
- sprintf(
611
- /* translators: %s: path to the conflicting library */
612
- __( 'A conflicting version of PHP-CSS-Parser appears to be installed by another plugin or theme (located in %s). Because of this, CSS processing will be limited, and tree shaking will not be available.', 'amp' ), // phpcs:ignore WordPress.Security.EscapeOutput
613
- '<code>' . esc_html( $source_dir ) . '</code>'
614
)
615
);
616
} catch ( ReflectionException $e ) {
400
add_settings_error(
401
self::OPTION_NAME,
402
$code,
403
+ esc_html(
404
+ sprintf(
405
+ $error,
406
+ isset( $post_type->label ) ? $post_type->label : $post_type->name
407
+ )
408
)
409
);
410
}
552
if ( ! wp_using_ext_object_cache() && 'toplevel_page_' . self::OPTION_NAME === get_current_screen()->id ) {
553
printf(
554
'<div class="notice notice-warning"><p>%s</p></div>',
555
+ wp_kses(
556
+ sprintf(
557
+ /* translators: %s: Persistent object cache support URL */
558
+ __( 'The AMP plugin performs at its best when persistent object cache is enabled. <a href="%s">More details</a>', 'amp' ),
559
+ esc_url( __( 'https://codex.wordpress.org/Class_Reference/WP_Object_Cache#Persistent_Caching', 'amp' ) )
560
+ ),
561
+ [ 'a' => [ 'href' => true ] ]
562
)
563
);
564
}
580
581
printf(
582
'<div class="notice notice-warning is-dismissible"><p>%s</p></div>',
583
+ wp_kses(
584
+ sprintf(
585
+ /* translators: %s: post-processor cache support URL */
586
+ __( 'The AMP plugin&lsquo;s post-processor cache was disabled due to the detection of highly-variable content. <a href="%s">More details</a>', 'amp' ),
587
+ esc_url( __( 'https://github.com/ampproject/amp-wp/wiki/Post-Processor-Cache', 'amp' ) )
588
+ ),
589
+ [ 'a' => [ 'href' => true ] ]
590
)
591
);
592
}
615
616
printf(
617
'<div class="notice notice-warning"><p>%s</p></div>',
618
+ wp_kses(
619
+ sprintf(
620
+ /* translators: %s: path to the conflicting library */
621
+ __( 'A conflicting version of PHP-CSS-Parser appears to be installed by another plugin or theme (located in %s). Because of this, CSS processing will be limited, and tree shaking will not be available.', 'amp' ),
622
+ '<code>' . esc_html( $source_dir ) . '</code>'
623
+ ),
624
+ [ 'code' => [] ]
625
)
626
);
627
} catch ( ReflectionException $e ) {
includes/sanitizers/class-amp-base-sanitizer.php CHANGED
@@ -487,7 +487,6 @@ abstract class AMP_Base_Sanitizer {
487
$should_remove = $this->should_sanitize_validation_error( $validation_error, compact( 'node' ) );
488
if ( $should_remove ) {
489
$element->removeAttributeNode( $node );
490
- $this->clean_up_after_attribute_removal( $element, $node, $validation_error );
491
}
492
return $should_remove;
493
}
@@ -552,8 +551,8 @@ abstract class AMP_Base_Sanitizer {
552
}
553
}
554
555
- // Capture script contents.
556
- if ( 'script' === $node->nodeName && ! $node->hasAttribute( 'src' ) ) {
557
$error['text'] = $node->textContent;
558
}
559
@@ -591,12 +590,10 @@ abstract class AMP_Base_Sanitizer {
591
*
592
* @since 1.3
593
*
594
- * @param DOMElement $element The node for which he attribute was
595
- * removed.
596
- * @param DOMAttr $attribute The attribute that was removed.
597
- * @param array $validation_error Validation error details.
598
*/
599
- protected function clean_up_after_attribute_removal( $element, $attribute, $validation_error ) {
600
static $attributes_tied_to_href = [ 'target', 'download', 'rel', 'rev', 'hreflang', 'type' ];
601
602
if ( 'href' === $attribute->nodeName ) {
487
$should_remove = $this->should_sanitize_validation_error( $validation_error, compact( 'node' ) );
488
if ( $should_remove ) {
489
$element->removeAttributeNode( $node );
490
}
491
return $should_remove;
492
}
551
}
552
}
553
554
+ // Capture element contents.
555
+ if ( ( 'script' === $node->nodeName && ! $node->hasAttribute( 'src' ) ) || 'style' === $node->nodeName ) {
556
$error['text'] = $node->textContent;
557
}
558
590
*
591
* @since 1.3
592
*
593
+ * @param DOMElement $element The node for which the attribute was removed.
594
+ * @param DOMAttr $attribute The attribute that was removed.
595
*/
596
+ protected function clean_up_after_attribute_removal( $element, $attribute ) {
597
static $attributes_tied_to_href = [ 'target', 'download', 'rel', 'rev', 'hreflang', 'type' ];
598
599
if ( 'href' === $attribute->nodeName ) {
includes/sanitizers/class-amp-core-theme-sanitizer.php CHANGED
@@ -1594,7 +1594,7 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
1594
public function add_twentytwenty_modals() {
1595
$modals = $this->xpath->query( "//*[ @class and contains( concat( ' ', normalize-space( @class ), ' ' ), ' cover-modal ' ) ]" );
1596
1597
- if ( false === $modals || 0 === $modals->count() ) {
1598
return;
1599
}
1600
@@ -1672,7 +1672,7 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
1672
$toggles = $this->xpath->query( '//*[ @data-toggle-target ]' );
1673
$body_id = AMP_DOM_Utils::get_element_id( $this->get_body_node(), 'body' );
1674
1675
- if ( false === $toggles || 0 === $toggles->count() ) {
1676
return;
1677
}
1678
1594
public function add_twentytwenty_modals() {
1595
$modals = $this->xpath->query( "//*[ @class and contains( concat( ' ', normalize-space( @class ), ' ' ), ' cover-modal ' ) ]" );
1596
1597
+ if ( false === $modals || 0 === $modals->length ) {
1598
return;
1599
}
1600
1672
$toggles = $this->xpath->query( '//*[ @data-toggle-target ]' );
1673
$body_id = AMP_DOM_Utils::get_element_id( $this->get_body_node(), 'body' );
1674
1675
+ if ( false === $toggles || 0 === $toggles->length ) {
1676
return;
1677
}
1678
includes/sanitizers/class-amp-iframe-sanitizer.php CHANGED
@@ -217,6 +217,11 @@ class AMP_Iframe_Sanitizer extends AMP_Base_Sanitizer {
217
}
218
break;
219
220
default:
221
$out[ $name ] = $value;
222
break;
217
}
218
break;
219
220
+ case 'mozallowfullscreen':
221
+ case 'webkitallowfullscreen':
222
+ // Omit these since amp-iframe will add them if needed if the `allowfullscreen` attribute is present.
223
+ break;
224
+
225
default:
226
$out[ $name ] = $value;
227
break;
includes/sanitizers/class-amp-style-sanitizer.php CHANGED
@@ -2375,8 +2375,10 @@ class AMP_Style_Sanitizer extends AMP_Base_Sanitizer {
2375
$ruleset->removeRule( $property->getRule() );
2376
} else {
2377
$error = [
2378
- 'code' => 'illegal_css_important',
2379
- 'type' => AMP_Validation_Error_Taxonomy::CSS_ERROR_TYPE,
2380
];
2381
$sanitized = $this->should_sanitize_validation_error( $error );
2382
if ( $sanitized ) {
2375
$ruleset->removeRule( $property->getRule() );
2376
} else {
2377
$error = [
2378
+ 'code' => 'illegal_css_important',
2379
+ 'type' => AMP_Validation_Error_Taxonomy::CSS_ERROR_TYPE,
2380
+ 'property_name' => $property->getRule(),
2381
+ 'property_value' => $property->getValue(),
2382
];
2383
$sanitized = $this->should_sanitize_validation_error( $error );
2384
if ( $sanitized ) {
includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -583,8 +583,24 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
583
foreach ( $node->attributes as $attribute ) {
584
$validation_error['element_attributes'][ $attribute->nodeName ] = $attribute->nodeValue;
585
}
586
foreach ( $disallowed_attributes as $disallowed_attribute ) {
587
- $this->remove_invalid_attribute( $node, $disallowed_attribute, $validation_error );
588
}
589
}
590
583
foreach ( $node->attributes as $attribute ) {
584
$validation_error['element_attributes'][ $attribute->nodeName ] = $attribute->nodeValue;
585
}
586
+ $removed_attributes = [];
587
foreach ( $disallowed_attributes as $disallowed_attribute ) {
588
+ if ( $this->remove_invalid_attribute( $node, $disallowed_attribute, $validation_error ) ) {
589
+ $removed_attributes[] = $disallowed_attribute;
590
+ }
591
+ }
592
+
593
+ /*
594
+ * Only run cleanup after the fact to prevent a scenario where invalid markup is kept and so the attribute
595
+ * is actually not removed. This prevents a "DOMException: Not Found Error" from happening when calling
596
+ * remove_invalid_attribute() since clean_up_after_attribute_removal() can end up removing invalid link
597
+ * attributes (like 'target') when there is an invalid 'href' attribute, but if the 'target' attribute is
598
+ * itself invalid, then if clean_up_after_attribute_removal() is called inside of remove_invalid_attribute()
599
+ * it can cause a subsequent invocation of remove_invalid_attribute() to try to remove an invalid
600
+ * attribute that has already been removed from the DOM.
601
+ */
602
+ foreach ( $removed_attributes as $removed_attribute ) {
603
+ $this->clean_up_after_attribute_removal( $node, $removed_attribute );
604
}
605
}
606
includes/validation/class-amp-validated-url-post-type.php CHANGED
@@ -1097,19 +1097,15 @@ class AMP_Validated_URL_Post_Type {
1097
}
1098
}
1099
if ( isset( $sources['theme'] ) && empty( $sources['embed'] ) ) {
1100
- $output[] = '<div class="source">';
1101
- $output[] = '<span class="dashicons dashicons-admin-appearance"></span>';
1102
- $themes = array_unique( $sources['theme'] );
1103
- foreach ( $themes as $theme_slug ) {
1104
$theme_obj = wp_get_theme( $theme_slug );
1105
if ( ! $theme_obj->errors() ) {
1106
$theme_name = $theme_obj->get( 'Name' );
1107
} else {
1108
$theme_name = $theme_slug;
1109
}
1110
- $output[] = sprintf( '<strong>%s</strong>', esc_html( $theme_name ) );
1111
}
1112
- $output[] = '</div>';
1113
}
1114
if ( isset( $sources['core'] ) ) {
1115
$core_sources = array_unique( $sources['core'] );
@@ -1358,13 +1354,14 @@ class AMP_Validated_URL_Post_Type {
1358
}
1359
1360
// @todo Update this to use the method which will be developed in PR #1429 AMP_Validation_Error_Taxonomy::get_term_error() .
1361
- $description = json_decode( $error->description, true );
1362
- $sanitization = AMP_Validation_Error_Taxonomy::get_validation_error_sanitization( $description );
1363
- $status_text = AMP_Validation_Error_Taxonomy::get_status_text_with_icon( $sanitization );
1364
- $error_code = isset( $description['code'] ) ? $description['code'] : 'error';
1365
- $error_title = AMP_Validation_Error_Taxonomy::get_error_title_from_code( $error_code );
1366
$validation_error = json_decode( $error->description, true );
1367
- $accept_all_url = wp_nonce_url(
1368
add_query_arg(
1369
[
1370
'action' => AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION,
@@ -1373,7 +1370,7 @@ class AMP_Validated_URL_Post_Type {
1373
),
1374
AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION
1375
);
1376
- $reject_all_url = wp_nonce_url(
1377
add_query_arg(
1378
[
1379
'action' => AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_REJECT_ACTION,
@@ -1400,6 +1397,7 @@ class AMP_Validated_URL_Post_Type {
1400
);
1401
}
1402
if ( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACK_REJECTED_STATUS !== $sanitization['term_status'] ) {
1403
if ( amp_is_canonical() ) {
1404
$info .= __( 'Keeping invalid markup means that any URL on which it occurs will not be served as AMP.', 'amp' );
1405
} else {
@@ -1432,12 +1430,7 @@ class AMP_Validated_URL_Post_Type {
1432
</div>
1433
<?php
1434
1435
- $heading = sprintf(
1436
- '%s: <code>%s</code>%s',
1437
- esc_html( $error_title ),
1438
- esc_html( $description['node_name'] ),
1439
- wp_kses_post( $status_text )
1440
- );
1441
?>
1442
<script type="text/javascript">
1443
jQuery( function( $ ) {
@@ -2256,7 +2249,7 @@ class AMP_Validated_URL_Post_Type {
2256
if ( $url ) {
2257
$actions['view'] = sprintf(
2258
'<a href="%s">%s</a>',
2259
- esc_url( add_query_arg( AMP_Validation_Manager::VALIDATE_QUERY_VAR, '', $url ) ),
2260
esc_html__( 'View', 'amp' )
2261
);
2262
}
1097
}
1098
}
1099
if ( isset( $sources['theme'] ) && empty( $sources['embed'] ) ) {
1100
+ foreach ( array_unique( $sources['theme'] ) as $theme_slug ) {
1101
$theme_obj = wp_get_theme( $theme_slug );
1102
if ( ! $theme_obj->errors() ) {
1103
$theme_name = $theme_obj->get( 'Name' );
1104
} else {
1105
$theme_name = $theme_slug;
1106
}
1107
+ $output[] = sprintf( '<strong class="source"><span class="dashicons dashicons-admin-appearance"></span>%s</strong>', esc_html( $theme_name ) );
1108
}
1109
}
1110
if ( isset( $sources['core'] ) ) {
1111
$core_sources = array_unique( $sources['core'] );
1354
}
1355
1356
// @todo Update this to use the method which will be developed in PR #1429 AMP_Validation_Error_Taxonomy::get_term_error() .
1357
$validation_error = json_decode( $error->description, true );
1358
+ if ( ! is_array( $validation_error ) ) {
1359
+ $validation_error = [];
1360
+ }
1361
+ $sanitization = AMP_Validation_Error_Taxonomy::get_validation_error_sanitization( $validation_error );
1362
+ $status_text = AMP_Validation_Error_Taxonomy::get_status_text_with_icon( $sanitization );
1363
+ $error_title = AMP_Validation_Error_Taxonomy::get_error_title_from_code( $validation_error );
1364
+ $accept_all_url = wp_nonce_url(
1365
add_query_arg(
1366
[
1367
'action' => AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION,
1370
),
1371
AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION
1372
);
1373
+ $reject_all_url = wp_nonce_url(
1374
add_query_arg(
1375
[
1376
'action' => AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_REJECT_ACTION,
1397
);
1398
}
1399
if ( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACK_REJECTED_STATUS !== $sanitization['term_status'] ) {
1400
+ $info .= ' ';
1401
if ( amp_is_canonical() ) {
1402
$info .= __( 'Keeping invalid markup means that any URL on which it occurs will not be served as AMP.', 'amp' );
1403
} else {
1430
</div>
1431
<?php
1432
1433
+ $heading = wp_kses_post( $error_title ) . ' ' . wp_kses_post( $status_text );
1434
?>
1435
<script type="text/javascript">
1436
jQuery( function( $ ) {
2249
if ( $url ) {
2250
$actions['view'] = sprintf(
2251
'<a href="%s">%s</a>',
2252
+ esc_url( $url ),
2253
esc_html__( 'View', 'amp' )
2254
);
2255
}
includes/validation/class-amp-validation-error-taxonomy.php CHANGED
@@ -758,7 +758,7 @@ class AMP_Validation_Error_Taxonomy {
758
);
759
add_filter( 'terms_clauses', [ __CLASS__, 'filter_terms_clauses_for_description_search' ], 10, 3 );
760
add_action( 'admin_notices', [ __CLASS__, 'add_admin_notices' ] );
761
- add_filter( 'tag_row_actions', [ __CLASS__, 'filter_tag_row_actions' ], 10, 2 );
762
if ( get_taxonomy( self::TAXONOMY_SLUG )->show_in_menu ) {
763
add_action( 'admin_menu', [ __CLASS__, 'add_admin_menu_validation_error_item' ] );
764
}
@@ -1622,69 +1622,67 @@ class AMP_Validation_Error_Taxonomy {
1622
public static function filter_tag_row_actions( $actions, WP_Term $tag ) {
1623
global $pagenow;
1624
1625
- if ( self::TAXONOMY_SLUG === $tag->taxonomy ) {
1626
- $term_id = $tag->term_id;
1627
- $term = get_term( $tag->term_id ); // We don't want filter=display given by $tag.
1628
-
1629
- /*
1630
- * Hide deletion link since a validation error should only be removed once
1631
- * it no longer has an occurrence on the site. When a validated URL is re-checked
1632
- * and it no longer has this validation error, then the count will be decremented.
1633
- * When a validation error term no longer has a count, then it is hidden from the
1634
- * list table. A cron job could periodically delete terms that have no counts.
1635
- */
1636
- unset( $actions['delete'] );
1637
-
1638
- if ( 'post.php' === $pagenow ) {
1639
- $actions['details'] = sprintf(
1640
- '<button type="button" aria-label="%s" class="single-url-detail-toggle button-link">%s</button>',
1641
- esc_attr__( 'Toggle error details', 'amp' ),
1642
- esc_html__( 'Details', 'amp' )
1643
- );
1644
- } else {
1645
- $actions['details'] = sprintf(
1646
'<a href="%s">%s</a>',
1647
- admin_url(
1648
- add_query_arg(
1649
- [
1650
- self::TAXONOMY_SLUG => $term->name,
1651
- 'post_type' => AMP_Validated_URL_Post_Type::POST_TYPE_SLUG,
1652
- ],
1653
- 'edit.php'
1654
- )
1655
),
1656
- esc_html__( 'Details', 'amp' )
1657
);
1658
}
1659
-
1660
- // Only add the 'Remove' and 'Keep' links to the index page, not the individual URL page.
1661
- if ( 'edit-tags.php' === $pagenow ) {
1662
- $sanitization = self::get_validation_error_sanitization( json_decode( $term->description, true ) );
1663
-
1664
- if ( self::VALIDATION_ERROR_ACK_ACCEPTED_STATUS !== $sanitization['status'] ) {
1665
- $actions[ self::VALIDATION_ERROR_ACCEPT_ACTION ] = sprintf(
1666
- '<a href="%s">%s</a>',
1667
- wp_nonce_url(
1668
- add_query_arg( array_merge( [ 'action' => self::VALIDATION_ERROR_ACCEPT_ACTION ], compact( 'term_id' ) ) ),
1669
- self::VALIDATION_ERROR_ACCEPT_ACTION
1670
- ),
1671
- esc_html(
1672
- self::VALIDATION_ERROR_NEW_ACCEPTED_STATUS === $sanitization['term_status'] ? __( 'Confirm removed', 'amp' ) : __( 'Remove', 'amp' )
1673
- )
1674
- );
1675
- }
1676
- if ( self::VALIDATION_ERROR_ACK_REJECTED_STATUS !== $sanitization['status'] ) {
1677
- $actions[ self::VALIDATION_ERROR_REJECT_ACTION ] = sprintf(
1678
- '<a href="%s">%s</a>',
1679
- wp_nonce_url(
1680
- add_query_arg( array_merge( [ 'action' => self::VALIDATION_ERROR_REJECT_ACTION ], compact( 'term_id' ) ) ),
1681
- self::VALIDATION_ERROR_REJECT_ACTION
1682
- ),
1683
- esc_html(
1684
- self::VALIDATION_ERROR_NEW_REJECTED_STATUS === $sanitization['term_status'] ? __( 'Confirm kept', 'amp' ) : __( 'Keep', 'amp' )
1685
- )
1686
- );
1687
- }
1688
}
1689
}
1690
return $actions;
@@ -1810,7 +1808,7 @@ class AMP_Validation_Error_Taxonomy {
1810
'<button type="button" aria-label="%s" class="single-url-detail-toggle">',
1811
esc_attr__( 'Toggle error details', 'amp' )
1812
);
1813
- $content .= self::get_error_title_from_code( $validation_error['code'] );
1814
} else {
1815
$content .= '<p>';
1816
$content .= sprintf(
@@ -1824,20 +1822,10 @@ class AMP_Validation_Error_Taxonomy {
1824
'edit.php'
1825
)
1826
),
1827
- esc_html( self::get_error_title_from_code( $validation_error['code'] ) )
1828
);
1829
}
1830
1831
- if ( self::INVALID_ELEMENT_CODE === $validation_error['code'] || 'duplicate_element' === $validation_error['code'] ) {
1832
- $content .= sprintf( ': <code>&lt;%s&gt;</code>', esc_html( $validation_error['node_name'] ) );
1833
- } elseif ( self::INVALID_ATTRIBUTE_CODE === $validation_error['code'] ) {
1834
- $content .= sprintf( ': <code>%s</code>', esc_html( $validation_error['node_name'] ) );
1835
- } elseif ( 'illegal_css_at_rule' === $validation_error['code'] ) {
1836
- $content .= sprintf( ': <code>@%s</code>', esc_html( $validation_error['at_rule'] ) );
1837
- } elseif ( 'invalid_processing_instruction' === $validation_error['code'] ) {
1838
- $content .= sprintf( ': <code>&lt;%s%s&hellip;%s&gt;</code>', '?', esc_html( $validation_error['node_name'] ), '?' );
1839
- }
1840
-
1841
if ( 'post.php' === $pagenow ) {
1842
$content .= '</button>';
1843
} else {
@@ -2149,7 +2137,7 @@ class AMP_Validation_Error_Taxonomy {
2149
if ( $is_element_attributes && empty( $value ) ) {
2150
continue;
2151
}
2152
- if ( in_array( $key, [ 'code', 'type' ], true ) ) {
2153
continue; // Handled above.
2154
}
2155
?>
@@ -2157,6 +2145,38 @@ class AMP_Validation_Error_Taxonomy {
2157
<dd class="detailed">
2158
<?php if ( in_array( $key, [ 'node_name', 'parent_name' ], true ) ) : ?>
2159
<code><?php echo esc_html( $value ); ?></code>
2160
<?php elseif ( 'sources' === $key ) : ?>
2161
<?php self::render_sources( $value ); ?>
2162
<?php elseif ( $is_element_attributes ) : ?>
@@ -2585,7 +2605,7 @@ class AMP_Validation_Error_Taxonomy {
2585
<code><?php echo esc_html( '{closure}' === $value ? $value : $value . '()' ); ?></code>
2586
<?php elseif ( 'shortcode' === $key || 'handle' === $key ) : ?>
2587
<code><?php echo esc_html( $value ); ?></code>
2588
- <?php elseif ( 'block_name' ) : ?>
2589
<?php
2590
$block_title = self::get_block_title( $value );
2591
if ( $block_title ) {
@@ -2828,33 +2848,103 @@ class AMP_Validation_Error_Taxonomy {
2828
}
2829
2830
/**
2831
- * Get Error Title from Code
2832
*
2833
- * @param string $error_code Error code.
2834
*
2835
- * @return string
2836
*/
2837
- public static function get_error_title_from_code( $error_code ) {
2838
- switch ( $error_code ) {
2839
case self::INVALID_ELEMENT_CODE:
2840
- return __( 'Invalid element', 'amp' );
2841
case self::INVALID_ATTRIBUTE_CODE: