From 95e62380799f5a8d61f5eaa1dd13253fb000e47d Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 3 Apr 2023 14:26:29 +1200 Subject: [PATCH] MNT Update dev JS --- client/dist/js/bundle.js | 20 ++++++++++---------- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 89068cda..a178c531 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1,4 +1,4 @@ -!function(){"use strict";var e,t,n={7274:function(e,t,n){var r=a(n(9521)),o=a(n(4437));function a(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,r.default)(),(0,o.default)()}))},9521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=b(n(6648)),o=b(n(176)),a=b(n(7328)),i=b(n(2111)),l=b(n(6249)),u=b(n(8792)),s=b(n(4415)),c=b(n(9397)),d=b(n(8947)),f=b(n(9097)),p=b(n(9192)),m=b(n(79)),h=b(n(8544)),v=b(n(9475)),y=b(n(5515));function b(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({ElementEditor:i.default,ElementToolbar:u.default,ElementAddNewButton:s.default,ElementList:l.default,Element:o.default,ElementActions:a.default,ElementHeader:c.default,ElementContent:d.default,ElementSummary:f.default,ElementInlineEditForm:p.default,AddElementPopover:m.default,HoverBar:h.default,DragPositionIndicator:v.default,TextCheckboxGroupField:y.default})}},4437:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=m(n(6648)),o=m(n(2939)),a=m(n(9405)),i=m(n(9650)),l=m(n(2806)),u=m(n(1637)),s=m(n(7867)),c=m(n(6380)),d=m(n(4566)),f=m(n(9355)),p=m(n(6095));function m(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.transform("elemental-fieldgroup",(e=>{e.component("FieldGroup.HistoryViewer.VersionDetail",a.default,"HistoricElement")}),{after:"field-holders"}),r.default.transform("elements-history",(e=>{e.component("HistoryViewer.Form_ItemEditForm",o.default,"ElementHistoryViewer")})),r.default.transform("blocks-history-revert",(e=>{e.component("HistoryViewerToolbar.VersionedAdmin.HistoryViewer.Element.HistoryViewerVersionDetail",i.default,"BlockRevertMutation")})),r.default.transform("cms-element-editor",(e=>{e.component("ElementList",l.default,"PageElements")})),r.default.transform("cms-element-adder",(e=>{e.component("AddElementPopover",u.default,"ElementAddButton")})),r.default.transform("element-actions",(e=>{e.component("ElementActions",f.default,"ElementActionsWithSave"),e.component("ElementActions",d.default,"ElementActionsWithPublish"),e.component("ElementActions",p.default,"ElementActionsWithUnpublish"),e.component("ElementActions",c.default,"ElementActionsWithDuplicate"),e.component("ElementActions",s.default,"ElementActionsWithArchive")}))}},3363:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(7363)),o=u(n(7086)),a=u(n(7820)),i=n(8127),l=n(7286);function u(e){return e&&e.__esModule?e:{default:e}}const s=e=>{const{className:t,title:n,label:o}=e,l={className:(0,a.default)(t,"dropdown-item"),...e};return r.default.createElement(i.DropdownItem,l,o||n)};s.propTypes={disabled:o.default.bool,className:o.default.string,onClick:o.default.func,title:o.default.string,name:o.default.string,type:l.elementTypeType,active:o.default.bool,label:o.default.string},s.defaultProps={disabled:!1};var c=s;t.default=c},7867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=u(n(7363)),o=n(2827),a=u(n(3363)),i=u(n(2409)),l=u(n(4754));function u(e){return e&&e.__esModule?e:{default:e}}const s=e=>t=>{const n=void 0!==t.element.canDelete&&!t.element.canDelete,o=l.default._t("ElementArchiveAction.ARCHIVE","Archive"),i={label:o,title:n?l.default._t("ElementArchiveAction.ARCHIVE_PERMISSION_DENY","Archive, insufficient permissions"):o,disabled:n,className:"element-editor__actions-archive",onClick:e=>{e.stopPropagation();const{element:{id:n},isPublished:r,actions:{handleArchiveBlock:o}}=t;let a=l.default._t("ElementArchiveAction.CONFIRM_DELETE","Are you sure you want to send this block to the archive?");r&&(a=l.default._t("ElementArchiveAction.CONFIRM_DELETE_AND_UNPUBLISH","Warning: This block will be unpublished before being sent to the archive. Are you sure you want to proceed?")),o&&window.confirm(a)&&o(n).then((()=>{const e=window.jQuery(".cms-preview");e&&"function"==typeof e.entwine&&e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,r.default.createElement(a.default,i))};t.Component=s;var c=(0,o.compose)(i.default,s);t.default=c},6380:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=u(n(7363)),o=n(2827),a=u(n(3363)),i=u(n(8046)),l=u(n(4754));function u(e){return e&&e.__esModule?e:{default:e}}const s=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const n=void 0!==t.element.canCreate&&!t.element.canCreate,o=l.default._t("ElementArchiveAction.DUPLICATE","Duplicate"),i={label:o,title:n?l.default._t("ElementArchiveAction.DUPLICATE_PERMISSION_DENY","Duplicate, insufficient permissions"):o,disabled:n,className:"element-editor__actions-duplicate",onClick:e=>{e.stopPropagation();const{element:{id:n},actions:{handleDuplicateBlock:r}}=t;r&&r(n).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,r.default.createElement(a.default,i))};t.Component=s;var c=(0,o.compose)(i.default,s);t.default=c},4566:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(7363)),o=n(2827),a=p(n(3363)),i=p(n(6426)),l=p(n(4754)),u=p(n(5159)),s=n(1624),c=n(9536),d=n(920),f=n(5762);function p(e){return e&&e.__esModule?e:{default:e}}const m=(e,t,n)=>{const r=l.default.inject(l.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:e}),o=l.default.inject(l.default._t("ElementPublishAction.SUCCESS_NOTIFICATION","Published '{title}' successfully"),{title:t||r}),a=l.default.inject(l.default._t("ElementPublishAction.ERROR_NOTIFICATION","Error publishing '{title}'"),{title:t||r});window.jQuery.noticeAdd({text:n?o:a,stay:!1,type:n?"success":"error"})},h=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const{element:n,formDirty:o}=t,i=void 0!==t.element.canPublish&&!t.element.canPublish,s=l.default._t("ElementArchiveAction.PUBLISH","Publish"),d={label:s,title:i?l.default._t("ElementArchiveAction.PUBLISH_PERMISSION_DENY","Publish, insufficient permissions"):s,disabled:i,className:"element-editor__actions-publish",onClick:e=>{e.stopPropagation();const{element:{id:n,title:r},type:a,securityId:i,formData:l,actions:{handlePublishBlock:s},reinitialiseForm:d}=t;let f=new Promise((e=>e()));o&&(f=((e,t,n)=>u.default.createEndpointFetcher({url:(0,c.loadElementSchemaValue)("saveUrl",e),method:(0,c.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,c.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:n}})(t).then((()=>window.ss.apolloClient.queryManager.reFetchObservableQueries())).then((e=>{const t=window.jQuery(".cms-preview");return t.entwine("ss.preview")._loadUrl(t.find("iframe").attr("src")),e})).then((t=>{const n=t[0]&&t[0].data.readOneElementalArea.elements.find((t=>t.id===e));return n&&n.version})))(n,l,i).then((e=>(d(l),e)))),f.then((()=>s(n))).then((()=>m(a.title,r,!0))).catch((()=>m(a.title,r,!1)))},toggle:t.toggle};return r.default.createElement(e,t,t.children,(o||!n.isLiveVersion)&&r.default.createElement(a.default,d))};t.Component=h;var v=(0,o.compose)(i.default,(0,s.connect)((function(e,t){const n=(0,d.loadElementFormStateName)(t.element.id);let r=null;return e.form.formState.element&&e.form.formState.element[n]&&(r=e.form.formState.element[n].values),{formData:r,securityId:e.config.SecurityID,formDirty:e.unsavedForms.find((e=>e.name===`element.${n}`))}}),(function(e,t){const n=(0,d.loadElementFormStateName)(t.element.id);return{reinitialiseForm(t){e((0,f.initialize)(`element.${n}`,t))}}})),h);t.default=v},9355:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=f(n(7363)),o=n(2827),a=n(1624),i=f(n(3363)),l=f(n(5159)),u=f(n(4754)),s=n(9536),c=n(920),d=n(5762);function f(e){return e&&e.__esModule?e:{default:e}}const p=e=>t=>{if(!t.expandable||t.type.broken)return r.default.createElement(e,t);const n={title:u.default._t("ElementSaveAction.SAVE","Save"),className:"element-editor__actions-save",onClick:e=>{e.stopPropagation();const{element:n,type:r,securityId:o,formData:a,reinitialiseForm:i}=t,{jQuery:c}=window,d=u.default.inject(u.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:r.title}),f={url:(0,s.loadElementSchemaValue)("saveUrl",n.id),method:(0,s.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,s.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:o}};l.default.createEndpointFetcher(f)(a).then((()=>{const{apolloClient:e}=window.ss;e.queryManager.reFetchObservableQueries(),i(a);const t=c(".cms-preview");t.entwine("ss.preview")._loadUrl(t.find("iframe").attr("src"));const r=a?a[`PageElements_${n.id}_Title`]:null;c.noticeAdd({text:u.default.inject(u.default._t("ElementSaveAction.SUCCESS_NOTIFICATION","Saved '{title}' successfully"),{title:r||d}),stay:!1,type:"success"})})).catch((()=>{c.noticeAdd({text:u.default.inject(u.default._t("ElementSaveAction.ERROR_NOTIFICATION","Error saving '{title}'"),{title:n.Title||d}),stay:!1,type:"error"})}))}};return r.default.createElement(e,t,t.children,r.default.createElement(i.default,n))};t.Component=p;var m=(0,o.compose)((0,a.connect)((function(e,t){const n=(0,c.loadElementFormStateName)(t.element.id);let r=null;return e.form.formState.element&&e.form.formState.element[n]&&(r=e.form.formState.element[n].values),{formData:r,securityId:e.config.SecurityID}}),(function(e,t){const n=(0,c.loadElementFormStateName)(t.element.id);return{reinitialiseForm(t){e((0,d.initialize)(`element.${n}`,t))}}})),p);t.default=m},6095:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=u(n(7363)),o=n(2827),a=u(n(3363)),i=u(n(495)),l=u(n(4754));function u(e){return e&&e.__esModule?e:{default:e}}const s=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const{element:n,type:o,actions:{handleUnpublishBlock:i}}=t,u=void 0!==t.element.canUnpublish&&!t.element.canUnpublish,s=l.default._t("ElementArchiveAction.UNPUBLISH","Unpublish"),c={label:s,title:u?l.default._t("ElementArchiveAction.UNPUBLISH_PERMISSION_DENY","Unpublish, insufficient permissions"):s,disabled:u,className:"element-editor__actions-unpublish",onClick:e=>{e.stopPropagation();const{jQuery:t}=window,r=l.default.inject(l.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:o.title});i&&i(n.id).then((()=>{const e=t(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src")),t.noticeAdd({text:l.default.inject(l.default._t("ElementUnpublishAction.SUCCESS_NOTIFICATION","Removed '{title}' from the published page"),{title:n.title||r}),stay:!1,type:"success"})})).catch((()=>{t.noticeAdd({text:l.default.inject(l.default._t("ElementUnpublishAction.ERROR_NOTIFICATION","Error unpublishing '{title}'"),{title:n.title||r}),stay:!1,type:"error"})}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,n.isPublished&&r.default.createElement(a.default,c))};t.Component=s;var c=(0,o.compose)(i.default,s);t.default=c},79:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=s(n(7086)),a=s(n(7820)),i=n(6648),l=n(7286),u=s(n(4754));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.handleToggle=this.handleToggle.bind(this)}getElementButtonClickHandler(e){return t=>{const{actions:{handleAddElementToArea:n},insertAfterElement:r}=this.props;t.preventDefault(),n(e.class,r).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))})),this.handleToggle()}}handleToggle(){const{toggle:e}=this.props;e()}render(){const{PopoverOptionSetComponent:e,elementTypes:t,container:n,extraClass:o,isOpen:i,placement:l,target:s}=this.props,c=(0,a.default)("element-editor-add-element",o),d=t.map((e=>({content:e.title,key:e.name,className:(0,a.default)(e.icon,"btn--icon-xl","element-editor-add-element__button"),onClick:this.getElementButtonClickHandler(e)})));return r.default.createElement(e,{buttons:d,searchPlaceholder:u.default._t("ElementAddElementPopover.SEARCH_BLOCKS","Search blocks"),extraClass:c,container:n,isOpen:i,placement:l,target:s,toggle:this.handleToggle})}}d.propTypes={container:o.default.oneOfType([o.default.string,o.default.func,o.default.object]),elementTypes:o.default.arrayOf(l.elementTypeType).isRequired,extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),isOpen:o.default.bool.isRequired,placement:o.default.string,target:o.default.oneOfType([o.default.string,o.default.func,o.default.object]).isRequired,toggle:o.default.func.isRequired,areaId:o.default.number.isRequired,insertAfterElement:o.default.oneOfType([o.default.number,o.default.string])};var f=(0,i.inject)(["PopoverOptionSet"],(e=>({PopoverOptionSetComponent:e})),(()=>"ElementEditor"))(d);t.default=f},4415:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=s(n(7086)),a=n(8127),i=s(n(4754)),l=n(7286),u=n(6648);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={popoverOpen:!1}}toggle(){this.setState({popoverOpen:!this.state.popoverOpen})}render(){const{AddElementPopoverComponent:e,elementTypes:t,areaId:n}=this.props,o={id:`ElementalArea${n}_AddButton`,color:"primary",onClick:this.toggle,className:"font-icon-plus"};return r.default.createElement("div",null,r.default.createElement(a.Button,o,i.default._t("ElementAddNewButton.ADD_BLOCK","Add block")),r.default.createElement(e,{placement:"bottom-start",target:o.id,isOpen:this.state.popoverOpen,elementTypes:t,toggle:this.toggle,areaId:n,insertAfterElement:0}))}}t.Component=d,d.defaultProps={},d.propTypes={elementTypes:o.default.arrayOf(l.elementTypeType).isRequired,areaId:o.default.number.isRequired};var f=(0,u.inject)(["AddElementPopover"],(e=>({AddElementPopoverComponent:e})),(()=>"ElementEditor.ElementList.AddNewButton"))(d);t.default=f},8947:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=d(n(7086)),a=n(6648),i=n(2827),l=n(1624),u=n(920),s=n(5762),c=d(n(720));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.PureComponent{render(){const{id:e,fileUrl:t,fileTitle:n,content:o,previewExpanded:a,InlineEditFormComponent:i,SummaryComponent:l,activeTab:u,onFormInit:s,handleLoadingError:c,formDirty:d,broken:f}=this.props;return r.default.createElement("div",{className:"element-editor-content"},!a&&r.default.createElement(l,{content:o,fileUrl:t,fileTitle:n,broken:f}),a&&r.default.createElement(i,{extraClass:{"element-editor-editform--collapsed":!a},onClick:e=>e.stopPropagation(),elementId:e,activeTab:u,onFormInit:s,handleLoadingError:c}),d&&r.default.createElement("input",{type:"hidden",name:"change-tracker",className:"element-form-dirty-state",value:"1"}))}}t.Component=p,p.propTypes={id:o.default.string,content:o.default.string,fileUrl:o.default.string,fileTitle:o.default.string,previewExpanded:o.default.bool,SummaryComponent:o.default.elementType,InlineEditFormComponent:o.default.elementType,handleLoadingError:o.default.func,broken:o.default.bool},p.defaultProps={};var m=(0,i.compose)((0,a.inject)(["ElementSummary","ElementInlineEditForm"],((e,t)=>({SummaryComponent:e,InlineEditFormComponent:t})),(()=>"ElementEditor.ElementList.Element")),(0,l.connect)((function(e,t){const n=(0,u.loadElementFormStateName)(t.id);return{formDirty:(0,s.isDirty)(`element.${n}`,c.default)(e)}})))(p);t.default=m},9475:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(7363));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}class a extends r.PureComponent{render(){return r.default.createElement("div",{className:"elemental-editor-drag-indicator"},r.default.createElement("div",{className:"elemental-editor-drag-indicator__ball"}))}}var i=a;t.default=i},176:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=E(n(7363)),o=b(n(7086)),a=n(5407),i=n(7286),l=n(2827),u=n(6648),s=b(n(4754)),c=b(n(7820)),d=n(1624),f=n(920),p=n(9536),m=E(n(1789)),h=n(2084),v=n(1211),y=n(8883);function b(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}class _ extends r.Component{static getDerivedStateFromError(){return{childRenderingError:!0}}constructor(e){super(e),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleExpand=this.handleExpand.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this),this.handleTabClick=this.handleTabClick.bind(this),this.updateFormTab=this.updateFormTab.bind(this),this.state={previewExpanded:!1,initialTab:"",loadingError:!1,childRenderingError:!1}}componentDidMount(){const{connectDragPreview:e}=this.props;e&&e((0,v.getEmptyImage)(),{captureDraggingState:!0})}getVersionedStateClassName(){const{element:e}=this.props,t="element-editor__element";return e.isPublished?e.isPublished&&!e.isLiveVersion?`${t}--modified`:`${t}--published`:`${t}--draft`}getLinkTitle(e){return e.broken?s.default._t("ElementalElement.ARCHIVE_BROKEN","Archive this block"):s.default.inject(s.default._t("ElementalElement.TITLE","Edit this {type} block"),{type:e.title})}getSummary(e,t){return t.broken?e.title?s.default.inject(s.default._t("ElementalElement.BROKEN_DESCRIPTION_TITLE",'This block had the title "{title}". It is broken and will not display on the front-end. You can archive it to remove it from this elemental area.'),{title:e.title}):s.default._t("ElementalElement.BROKEN_DESCRIPTION","This block is broken and will not display on the front-end. You can archive it to remove it from this elemental area."):e.blockSchema.content}handleLoadingError(){this.setState({loadingError:!0})}updateFormTab(e){const{tabSetName:t,onActivateTab:n}=this.props,{initialTab:r}=this.state;if(r||this.setState({initialTab:e}),e||r)n(t,e||r);else{n(t,"Main")}}handleTabClick(e){const{activeTab:t}=this.props,{loadingError:n}=this.state;e===t||n||(this.setState({previewExpanded:!0}),this.updateFormTab(e))}handleExpand(e){const{type:t,link:n}=this.props,{loadingError:r}=this.state;t.broken||("button"!==e.target.type?!t.inlineEditable||r?window.location=n:this.setState({previewExpanded:!this.state.previewExpanded}):e.stopPropagation())}handleKeyUp(e){const{nodeName:t}=e.target;" "!==e.key&&"Enter"!==e.key||["input","textarea"].includes(t.toLowerCase())||this.handleExpand(e)}render(){const{element:e,type:t,areaId:n,HeaderComponent:o,ContentComponent:a,link:i,activeTab:l,connectDragSource:u,connectDropTarget:d,isDragging:f,isOver:p,onDragEnd:m}=this.props,{childRenderingError:h,previewExpanded:v}=this.state;if(!e.id)return null;const y=(0,c.default)("element-editor__element",{"element-editor__element--broken":t.broken,"element-editor__element--expandable":t.inlineEditable&&!t.broken,"element-editor__element--dragging":f,"element-editor__element--dragged-over":p},this.getVersionedStateClassName()),b=d(r.default.createElement("div",{className:y,onClick:this.handleExpand,onKeyUp:this.handleKeyUp,role:"button",tabIndex:0,title:this.getLinkTitle(t),key:e.id},r.default.createElement(o,{element:e,type:t,areaId:n,expandable:t.inlineEditable,link:i,previewExpanded:v&&!h,handleEditTabsClick:this.handleTabClick,activeTab:l,disableTooltip:f,onDragEnd:m}),!h&&r.default.createElement(a,{id:e.id,fileUrl:e.blockSchema.fileURL,fileTitle:e.blockSchema.fileTitle,content:this.getSummary(e,t),previewExpanded:v&&!f,activeTab:l,onFormInit:()=>this.updateFormTab(l),handleLoadingError:this.handleLoadingError,broken:t.broken}),h&&r.default.createElement("div",{className:"alert alert-danger mt-2"},s.default._t("ElementalElement.CHILD_RENDERING_ERROR","Something went wrong with this block. Please try saving and refreshing the CMS."))));return v?b:u(b)}}t.Component=_,_.propTypes={element:a.elementType,type:i.elementTypeType.isRequired,areaId:o.default.number.isRequired,link:o.default.string.isRequired,activeTab:o.default.string,tabSetName:o.default.string,onActivateTab:o.default.func,connectDragSource:o.default.func.isRequired,connectDragPreview:o.default.func.isRequired,connectDropTarget:o.default.func.isRequired,isDragging:o.default.bool.isRequired,isOver:o.default.bool.isRequired,onDragOver:o.default.func,onDragEnd:o.default.func,onDragStart:o.default.func},_.defaultProps={element:null};const O={drop(e,t,n){const{element:r}=e;return{target:r.id,dropSpot:(0,y.isOverTop)(t,n)?"top":"bottom"}},hover(e,t,n){const{element:r,onDragOver:o}=e;o&&o(r,(0,y.isOverTop)(t,n))}};var w=(0,l.compose)((0,h.DropTarget)("element",O,((e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()}))),(0,h.DragSource)("element",y.elementDragSource,((e,t)=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}))),(0,d.connect)((function(e,t){const n=t.element.id,r=(0,f.loadElementFormStateName)(n),o=(0,p.loadElementSchemaValue)("schemaUrl",n),a=e.form&&e.form.formSchemas[o]&&e.form.formSchemas[o].schema&&e.form.formSchemas[o].schema.fields.find((e=>"Tabs"===e.component)),i=a&&a.id,l=`element.${r}__${i}`;return{tabSetName:i,activeTab:e.tabs&&e.tabs.fields&&e.tabs.fields[l]&&e.tabs.fields[l].activeTab}}),(function(e,t){const n=(0,f.loadElementFormStateName)(t.element.id);return{onActivateTab(t,r){e(m.activateTab(`element.${n}__${t}`,r))}}})),(0,u.inject)(["ElementHeader","ElementContent"],((e,t)=>({HeaderComponent:e,ContentComponent:t})),(()=>"ElementEditor.ElementList.Element")))(_);t.default=w},7328:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=d(n(7086)),a=n(2827),i=n(8127),l=n(6648),u=n(5407),s=n(7286),c=d(n(3363));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.Component{constructor(e){super(e),this.handleEditTabsClick=this.handleEditTabsClick.bind(this)}handleEditTabsClick(e){const{handleEditTabsClick:t}=this.props;t(e.target.name)}renderEditTabs(){const{editTabs:e,activeTab:t,type:n,expandable:o}=this.props;return!n.broken&&o&&e&&e.length?e.map((e=>{let{name:o,title:a}=e;return r.default.createElement(c.default,{key:o,name:o,title:a,type:n,onClick:this.handleEditTabsClick,active:o===t})})):null}renderDivider(){const{children:e,editTabs:t,expandable:n}=this.props;return n&&t&&t.length&&0!==r.default.Children.count(e)?r.default.createElement(i.DropdownItem,{divider:!0,role:"separator"}):null}render(){const{children:e,id:t,ActionMenuComponent:n}=this.props;return r.default.createElement(n,{id:`element-editor-actions-${t}`,className:"element-editor-header__actions-dropdown",dropdownMenuProps:{right:!0},dropdownToggleClassNames:["element-editor-header__actions-toggle","btn","btn-sm","btn--no-text","font-icon-dot-3"]},this.renderEditTabs(),this.renderDivider(),e)}}t.Component=p,p.propTypes={element:u.elementType,type:s.elementTypeType.isRequired,areaId:o.default.number.isRequired,activeTab:o.default.string,editTabs:o.default.arrayOf(o.default.shape({title:o.default.string,name:o.default.string})),handleEditTabsClick:o.default.func.isRequired,expandable:o.default.bool},p.defaultProps={editTabs:[],expandable:!0};var m=(0,a.compose)((0,l.inject)(["ActionMenu"],(e=>({ActionMenuComponent:e})),(()=>"ElementEditor.ElementList.Element")))(p);t.default=m},2964:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7086)),a=c(n(9397)),i=n(2084),l=n(5407),u=n(7286),s=n(3558);function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class f extends r.Component{render(){const{isDragging:e,element:t,elementTypes:n,currentOffset:o}=this.props;if(!e||!o)return null;const{x:i,y:l}=o,u=`translate(${i}px, ${l}px)`,c={transform:u,WebkitTransform:u},d=(0,s.getElementTypeConfig)(t,n);return r.default.createElement("div",{className:"element-editor-drag-preview",style:c},r.default.createElement(a.default,{element:t,type:d,simple:!0}))}}f.propTypes={element:l.elementType,elementTypes:o.default.arrayOf(u.elementTypeType),isDragging:o.default.bool,currentOffset:o.default.shape({x:o.default.number.isRequired,y:o.default.number.isRequired})};var p=(0,i.DragLayer)((e=>({element:e.getItem(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()})))(f);t.default=p},2111:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=h(n(7086)),a=n(6648),i=n(2827),l=n(7286),u=n(1624),s=n(920),c=n(2084),d=h(n(5386)),f=h(n(2964)),p=h(n(7431)),m=n(573);function h(e){return e&&e.__esModule?e:{default:e}}function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}class y extends r.PureComponent{constructor(e){super(e),this.state={dragTargetElementId:null,dragSpot:null},this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this)}handleDragOver(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=!!e&&e.id;this.setState({dragTargetElementId:n,dragSpot:!1===t?"bottom":"top"})}handleDragEnd(e,t){const{actions:{handleSortBlock:n},areaId:r}=this.props;n(e,t,r).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))})),this.setState({dragTargetElementId:null,dragSpot:null})}render(){const{fieldName:e,formState:t,ToolbarComponent:n,ListComponent:o,areaId:a,elementTypes:i,isDraggingOver:l,connectDropTarget:u,allowedElements:s}=this.props,{dragTargetElementId:c,dragSpot:d}=this.state,p=s.map((e=>i.find((t=>t.class===e))));return u(r.default.createElement("div",{className:"element-editor"},r.default.createElement(n,{elementTypes:p,areaId:a,onDragOver:this.handleDragOver}),r.default.createElement(o,{allowedElementTypes:p,elementTypes:i,areaId:a,onDragOver:this.handleDragOver,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,dragSpot:d,isDraggingOver:l,dragTargetElementId:c}),r.default.createElement(f.default,{elementTypes:i}),r.default.createElement("input",{name:e,type:"hidden",value:JSON.stringify(t)||"",className:"no-change-track"})))}}t.Component=y,y.propTypes={fieldName:o.default.string,elementTypes:o.default.arrayOf(l.elementTypeType).isRequired,allowedElements:o.default.arrayOf(o.default.string).isRequired,areaId:o.default.number.isRequired,actions:o.default.shape({handleSortBlock:o.default.func})};const b=(0,m.createSelector)([e=>{const t=e.form.formState.element;return t||{}}],(e=>{const t=(0,s.loadElementFormStateName)("[0-9]+");return Object.keys(e).filter((e=>e.match(t))).reduce(((t,n)=>({...t,[n]:e[n].values})),{})}));var g=(0,i.compose)(p.default,(0,c.DropTarget)("element",{},((e,t)=>({connectDropTarget:e.dropTarget(),isDraggingOver:t.isOver()}))),(0,u.connect)((function(e){return{formState:b(e)}})),(0,a.inject)(["ElementToolbar","ElementList"],((e,t)=>({ToolbarComponent:e,ListComponent:t})),(()=>"ElementEditor")),d.default)(y);t.default=g},6249:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=m(n(7086)),a=n(5407),i=n(7286),l=n(2827),u=n(6648),s=m(n(7820)),c=m(n(4754)),d=n(2084),f=n(8883),p=n(3558);function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class v extends r.Component{getDragIndicatorIndex(){const{dragTargetElementId:e,draggedItem:t,blocks:n,dragSpot:r}=this.props;return(0,f.getDragIndicatorIndex)(n.map((e=>e.id)),e,t&&t.id,r)}renderBlocks(){const{ElementComponent:e,HoverBarComponent:t,DragIndicatorComponent:n,blocks:o,allowedElementTypes:a,elementTypes:i,areaId:l,onDragEnd:u,onDragOver:s,onDragStart:d,isDraggingOver:f}=this.props;if(!o)return null;if(o&&!o.length)return r.default.createElement("div",null,c.default._t("ElementList.ADD_BLOCKS","Add blocks to place your content"));let m=o.map((n=>r.default.createElement("div",{key:n.id},r.default.createElement(e,{element:n,areaId:l,type:(0,p.getElementTypeConfig)(n,i),link:n.blockSchema.actions.edit,onDragOver:s,onDragEnd:u,onDragStart:d}),f||r.default.createElement(t,{key:`create-after-${n.id}`,areaId:l,elementId:n.id,elementTypes:a}))));f||(m=[r.default.createElement(t,{key:0,areaId:l,elementId:0,elementTypes:a})].concat(m));const h=this.getDragIndicatorIndex();return f&&null!==h&&m.splice(h,0,r.default.createElement(n,{key:"DropIndicator"})),m}renderLoading(){const{loading:e,LoadingComponent:t}=this.props;return e?r.default.createElement(t,null):null}render(){const{blocks:e}=this.props,t=(0,s.default)("elemental-editor-list",{"elemental-editor-list--empty":!e||!e.length});return this.props.connectDropTarget(r.default.createElement("div",{className:t},this.renderLoading(),this.renderBlocks()))}}t.Component=v,v.propTypes={blocks:o.default.arrayOf(a.elementType),elementTypes:o.default.arrayOf(i.elementTypeType).isRequired,allowedElementTypes:o.default.arrayOf(i.elementTypeType).isRequired,loading:o.default.bool,areaId:o.default.number.isRequired,dragTargetElementId:o.default.oneOfType([o.default.string,o.default.bool]),onDragOver:o.default.func,onDragStart:o.default.func,onDragEnd:o.default.func},v.defaultProps={blocks:[],loading:!1};const y={drop(e,t){const{blocks:n}=e,r=t.getDropResult();if(!r)return{};const o=(0,f.getDragIndicatorIndex)(n.map((e=>e.id)),r.target,t.getItem(),r.dropSpot),a=n[o-1]?n[o-1].id:"0";return{...r,dropAfterID:a}}};var b=(0,l.compose)((0,d.DropTarget)("element",y,((e,t)=>({connectDropTarget:e.dropTarget(),draggedItem:t.getItem()}))),(0,u.inject)(["Element","Loading","HoverBar","DragPositionIndicator"],((e,t,n,r)=>({ElementComponent:e,LoadingComponent:t,HoverBarComponent:n,DragIndicatorComponent:r})),(()=>"ElementEditor.ElementList")))(v);t.default=b},9397:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=g(n(7086)),a=n(8127),i=n(5407),l=n(7286),u=n(2827),s=n(1624),c=n(6648),d=g(n(4754)),f=g(n(7820)),p=n(920),m=n(5762),h=n(2084),v=g(n(720)),y=n(8883),b=n(1211);function g(e){return e&&e.__esModule?e:{default:e}}function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}class _ extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={tooltipOpen:!1}}componentDidMount(){const{connectDragPreview:e}=this.props;e&&e((0,b.getEmptyImage)(),{captureDraggingState:!0})}componentDidUpdate(){const{tooltipOpen:e}=this.state,{disableTooltip:t}=this.props;e&&t&&this.setState({tooltipOpen:!1})}getBlockTitle(e,t){return t.broken?d.default.inject(d.default._t("ElementHeader.BROKEN","This element is of obsolete type {type}."),{type:t.obsoleteClassName}):e.title?e.title:d.default.inject(d.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:t.title})}toggle(){this.setState({tooltipOpen:!this.state.tooltipOpen})}renderVersionedStateMessage(){const{element:{isLiveVersion:e,isPublished:t},formDirty:n}=this.props;if(!n&&t&&e)return null;let o="";const a=["element-editor-header__version-state"];return n?(o=d.default._t("ElementHeader.STATE_UNSAVED","Item has unsaved changes"),a.push("element-editor-header__version-state--unsaved")):t?e||(o=d.default._t("ElementHeader.STATE_MODIFIED","Item has unpublished changes"),a.push("element-editor-header__version-state--modified")):(o=d.default._t("ElementHeader.STATE_DRAFT","Item has not been published yet"),a.push("element-editor-header__version-state--draft")),r.default.createElement("span",{className:(0,f.default)(a),title:o})}render(){const{connectDragSource:e,element:t,type:n,areaId:o,previewExpanded:i,simple:l,disableTooltip:u,activeTab:s,expandable:c,ElementActionsComponent:p,handleEditTabsClick:m}=this.props,h=this.getBlockTitle(t,n),v=(0,f.default)({"element-editor-header__title":!0,"element-editor-header__title--none":!t.title}),y=d.default._t("ElementHeader.EXPAND","Show editable fields"),b=(0,f.default)("element-editor-header",{"element-editor-header--simple":l}),g=(0,f.default)("element-editor-header__icon-container",{"element-editor-header__icon-container--broken":n.broken}),E=(0,f.default)("element-editor-header__expand",{"font-icon-right-open-big":!c,"font-icon-up-open-big":c&&i,"font-icon-down-open-big":c&&!i}),_=`element-icon-${t.id}`,O=r.default.createElement("div",{className:b},r.default.createElement("div",{className:"element-editor-header__drag-handle"},r.default.createElement("i",{className:"font-icon-drag-handle"})),r.default.createElement("div",{className:"element-editor-header__info"},r.default.createElement("div",{className:g},r.default.createElement("i",{className:n.icon,id:_}),this.renderVersionedStateMessage(),!n.broken&&!l&&r.default.createElement(a.Tooltip,{placement:"top",isOpen:this.state.tooltipOpen&&!u,target:_,toggle:this.toggle},n.title)),r.default.createElement("h3",{className:v},h)),!l&&r.default.createElement("div",{className:"element-editor-header__actions"},r.default.createElement("div",{role:"none",onClick:e=>e.stopPropagation()},r.default.createElement(p,{element:t,type:n,areaId:o,activeTab:s,editTabs:n.editTabs,handleEditTabsClick:m,expandable:c})),!n.broken&&r.default.createElement("i",{className:E,title:y})));return i?e(O):O}}t.Component=_,_.propTypes={element:i.elementType.isRequired,type:l.elementTypeType.isRequired,areaId:o.default.number,activeTab:o.default.string,simple:o.default.bool,ElementActionsComponent:o.default.elementType,previewExpanded:o.default.bool,disableTooltip:o.default.bool,formDirty:o.default.bool,connectDragSource:o.default.func.isRequired,connectDragPreview:o.default.func.isRequired,onDragEnd:o.default.func},_.defaultProps={expandable:!0};var O=(0,u.compose)((0,h.DragSource)("element",y.elementDragSource,(e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}))),(0,s.connect)((function(e,t){const n=(0,p.loadElementFormStateName)(t.element.id);return{formDirty:(0,m.isDirty)(`element.${n}`,v.default)(e)}})),(0,c.inject)(["ElementActions"],(e=>({ElementActionsComponent:e})),(()=>"ElementEditor.ElementList.Element")))(_);t.default=O},8544:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=s(n(7086)),a=s(n(8665)),i=n(6648),l=n(7286),u=s(n(4754));function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const d=(0,a.default)("element-editor__hover-bar");function f(e){let{AddElementPopoverComponent:t,elementTypes:n,elementId:o,areaId:a,popoverOpen:i,onToggle:l}=e;const s=`${d("-line")} font-icon-plus-circled`,c=u.default._t("ElementAddNewButton.ADD_BLOCK","Add block"),f={className:d("-area",{"-area--focus":i}),onClick:l,"aria-label":c,title:c,id:`AddBlockHoverBarArea_${a}_${o}`};return r.default.createElement("div",{className:d(""),id:`AddBlockHoverBar_${a}_${o}`},r.default.createElement("button",f,r.default.createElement("span",{className:d("-area-inner")},r.default.createElement("span",{className:s}))),r.default.createElement(t,{placement:"bottom",target:`AddBlockHoverBarArea_${a}_${o}`,isOpen:i,elementTypes:n,toggle:l,container:`#AddBlockHoverBar_${a}_${o}`,areaId:a,insertAfterElement:o}))}class p extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={popoverOpen:!1}}toggle(){this.setState({popoverOpen:!this.state.popoverOpen})}render(){const e={...this.state,...this.props,onToggle:this.toggle};return r.default.createElement(f,e)}}t.Component=p,p.propTypes={elementTypes:o.default.arrayOf(l.elementTypeType).isRequired,elementId:o.default.oneOfType([o.default.string,o.default.number]).isRequired,areaId:o.default.oneOfType([o.default.number,o.default.string]).isRequired};var m=(0,i.inject)(["AddElementPopover"],(e=>({AddElementPopoverComponent:e})),(()=>"ElementEditor.ElementList.HoverBar"))(p);t.default=m},9192:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=d(n(7086)),a=d(n(7820)),i=d(n(8238)),l=n(9536),u=d(n(4754)),s=n(920),c=n(1624);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.PureComponent{constructor(e){super(e),this.handleLoadingError=this.handleLoadingError.bind(this),this.state={loadingError:null}}handleLoadingError(){const{jQuery:e}=window,{handleLoadingError:t}=this.props;this.setState({loadingError:!0}),e.noticeAdd({text:u.default.inject(u.default._t("ElementEditForm.ERROR_NOTIFICATION","Error displaying the edit form for this block")),stay:!0,type:"notice"}),t()}render(){const{elementId:e,extraClass:t,onClick:n,onFormInit:o,formHasState:u}=this.props,{loadingError:s}=this.state,c=(0,a.default)("element-editor-editform",t),d={formTag:"div",schemaUrl:(0,l.loadElementSchemaValue)("schemaUrl",e),identifier:"element",refetchSchemaOnMount:!u,onLoadingError:this.handleLoadingError};return s&&(d.loading=!1),"function"==typeof o&&(d.onReduxFormInit=o),r.default.createElement("div",{className:c,onClick:n,role:"presentation"},r.default.createElement(i.default,d))}}p.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.object]),onClick:o.default.func,elementId:o.default.string,handleLoadingError:o.default.func};var m=(0,c.connect)((function(e,t){const n=(0,s.loadElementFormStateName)(t.elementId);return{formHasState:e.form.formState&&e.form.formState.element&&!!e.form.formState.element[n]}}))(p);t.default=m},9097:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=l(n(7086)),a=l(n(7820)),i=l(n(4754));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class s extends r.PureComponent{render(){const{fileUrl:e,fileTitle:t,content:n,broken:o}=this.props,l=i.default._t("ElementSummary.NO_PREVIEW","No preview available"),u=(0,a.default)("element-editor-summary__content",{"element-editor-summary__content--broken":o});return r.default.createElement("div",{className:"element-editor-summary"},e&&r.default.createElement("img",{className:"element-editor-summary__thumbnail-image",src:e,alt:t}),(n||!e)&&r.default.createElement("p",{className:u},n||l))}}s.defaultProps={},s.propTypes={content:o.default.string,fileUrl:o.default.string,fileTitle:o.default.string,broken:o.default.bool};var c=s;t.default=c},8792:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=(r=n(7086))&&r.__esModule?r:{default:r},i=n(6648),l=n(7286),u=n(2084);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class c extends o.PureComponent{render(){const{AddNewButtonComponent:e,elementTypes:t,areaId:n,connectDropTarget:r}=this.props;return r(o.default.createElement("div",{className:"element-editor__toolbar"},o.default.createElement(e,{elementTypes:t,areaId:n})))}}c.defaultProps={},c.propTypes={elementTypes:a.default.arrayOf(l.elementTypeType).isRequired,areaId:a.default.number.isRequired,AddNewButtonComponent:a.default.elementType.isRequired,connectDropTarget:a.default.func.isRequired,onDragOver:a.default.func,onDragDrop:a.default.func};const d={hover(e){const{onDragOver:t}=e;t&&t()}};var f=(0,u.DropTarget)("element",d,(e=>({connectDropTarget:e.dropTarget()})))((0,i.inject)(["ElementAddNewButton"],(e=>({AddNewButtonComponent:e})),(()=>"ElementEditor.ElementToolbar"))(c));t.default=f},9405:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7363)),o=i(n(4754)),a=i(n(7820));function i(e){return e&&e.__esModule?e:{default:e}}var l=e=>class extends e{getClassName(){const e=[super.getClassName()];return this.props.data.ElementID&&e.unshift("elemental-area__element--historic-inner"),(0,a.default)(e)}render(){const e=this.getLegend(),t=this.props.data.tag||"div",n=this.getClassName(),{data:a}=this.props;return a.ElementID?r.default.createElement(t,{className:n},e,r.default.createElement("div",{className:"elemental-preview elemental-preview--historic"},a.ElementEditLink&&r.default.createElement("a",{className:"elemental-preview__link",href:a.ElementEditLink},r.default.createElement("span",{className:"elemental-preview__link-text"},o.default._t("HistoricElementView.VIEW_BLOCK_HISTORY","Block history")),r.default.createElement("i",{className:"font-icon-angle-right btn--icon-lg elemental-preview__link-caret"})),r.default.createElement("div",{className:"elemental-preview__icon"},r.default.createElement("i",{className:a.ElementIcon})),r.default.createElement("div",{className:"elemental-preview__detail"},r.default.createElement("h3",null,a.ElementTitle," ",r.default.createElement("small",null,a.ElementType)))),this.props.children):super.render()}};t.default=l},5515:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(7363)),o=n(8127);function a(e){return e&&e.__esModule?e:{default:e}}var i=(0,a(n(1042)).default)((e=>{const{children:t}=e,n=r.default.Children.toArray(r.default.Children.map(t,((t,n)=>{const o={noHolder:!0};return 0===n&&(o.id=e.id),r.default.cloneElement(t,o)})));return e.readOnly?r.default.createElement("div",{className:"text-checkbox-group-field--read-only"},n):1===n.length?n[0]:r.default.createElement(o.InputGroup,{className:"text-checkbox-group-field"},n[0],r.default.createElement(o.InputGroupAddon,{addonType:"append"},r.default.createElement(o.InputGroupText,null,n[1])))}));t.default=i},7489:function(e,t,n){var r=s(n(5311)),o=s(n(7363)),a=n(745),i=n(6648),l=n(3558),u=n(5762);function s(e){return e&&e.__esModule?e:{default:e}}const c=()=>{window.ss.apolloClient.resetStore(),setTimeout((()=>{const{store:e}=window.ss;e&&e.dispatch((0,u.destroy)(...Object.keys(e.getState().form.formState.element||{}).map((e=>`element.${e}`))))}),0)};r.default.entwine("ss",(e=>{e(".js-injector-boot .element-editor__container").entwine({ReactRoot:null,onmatch(){const e=(0,i.loadComponent)("ElementEditor",{}),t=this.data("schema"),n=(0,l.getConfig)().elementTypes,r={fieldName:this.attr("name"),areaId:t["elemental-area-id"],allowedElements:t["allowed-elements"],elementTypes:n};let u=this.getReactRoot();u||(u=(0,a.createRoot)(this[0]),this.setReactRoot(u)),u.render(o.default.createElement(e,r))},onunmatch(){c();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},"from .cms-edit-form":{onaftersubmitform(){c()}}}),e(".js-injector-boot .element-editor__container .element-form-dirty-state").entwine({onmatch(){e(".cms-edit-form").trigger("change")},onunmatch(){e(".cms-edit-form").trigger("change")}}),e(".cms-edit-form").entwine({getChangeTrackerOptions(){const t=void 0===this.entwineData("ChangeTrackerOptions");let n=this._super();return t&&(n=e.extend({},n),n.ignoreFieldSelector+=", .elementalarea :input:not(.element-form-dirty-state)",this.setChangeTrackerOptions(n)),n}})}))},8883:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isOverTop=t.getDragIndicatorIndex=t.elementDragSource=void 0;var r=n(394);t.isOverTop=(e,t)=>{const n=e.getClientOffset(),o=(0,r.findDOMNode)(t).getBoundingClientRect();return n.y{if(null===t||!n)return null;let o=t?e.findIndex((e=>e===t)):0;const a=e.findIndex((e=>e===n));return"bottom"===r&&(o+=1),a===o||a+1===o?null:o};const o={beginDrag(e){return e.element},endDrag(e,t){const{onDragEnd:n}=e,r=t.getDropResult();if(!n||!r||!r.dropAfterID)return;const o=t.getItem().id,{dropAfterID:a}=r;o!==a&&n(o,a)}};t.elementDragSource=o},8665:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(7820))&&r.__esModule?r:{default:r};var a=e=>function(){const t=t=>`${e}${t}`;for(var n=arguments.length,r=new Array(n),a=0;a!(!e&&""!==e)&&("object"==typeof e?Array.isArray(e)?e.map(t):Object.entries(e).reduce(((e,n)=>{let[r,o]=n;return Object.assign({},e,{[t(r)]:o})}),{}):t(e))));return(0,o.default)(...i)};t.default=a},1637:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +!function(){"use strict";var e={7274:function(e,t,n){var r=o(n(9521)),a=o(n(4437));function o(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,r.default)(),(0,a.default)()}))},9521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=y(n(6648)),a=y(n(176)),o=y(n(7328)),l=y(n(2111)),i=y(n(6249)),d=y(n(8792)),u=y(n(4415)),s=y(n(9397)),c=y(n(8947)),f=y(n(9097)),p=y(n(9192)),m=y(n(79)),g=y(n(8544)),h=y(n(9475)),v=y(n(5515));function y(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({ElementEditor:l.default,ElementToolbar:d.default,ElementAddNewButton:u.default,ElementList:i.default,Element:a.default,ElementActions:o.default,ElementHeader:s.default,ElementContent:c.default,ElementSummary:f.default,ElementInlineEditForm:p.default,AddElementPopover:m.default,HoverBar:g.default,DragPositionIndicator:h.default,TextCheckboxGroupField:v.default})}},4437:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=m(n(6648)),a=m(n(2939)),o=m(n(9405)),l=m(n(9650)),i=m(n(2806)),d=m(n(1637)),u=m(n(7867)),s=m(n(6380)),c=m(n(4566)),f=m(n(9355)),p=m(n(6095));function m(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.transform("elemental-fieldgroup",(e=>{e.component("FieldGroup.HistoryViewer.VersionDetail",o.default,"HistoricElement")}),{after:"field-holders"}),r.default.transform("elements-history",(e=>{e.component("HistoryViewer.Form_ItemEditForm",a.default,"ElementHistoryViewer")})),r.default.transform("blocks-history-revert",(e=>{e.component("HistoryViewerToolbar.VersionedAdmin.HistoryViewer.Element.HistoryViewerVersionDetail",l.default,"BlockRevertMutation")})),r.default.transform("cms-element-editor",(e=>{e.component("ElementList",i.default,"PageElements")})),r.default.transform("cms-element-adder",(e=>{e.component("AddElementPopover",d.default,"ElementAddButton")})),r.default.transform("element-actions",(e=>{e.component("ElementActions",f.default,"ElementActionsWithSave"),e.component("ElementActions",c.default,"ElementActionsWithPublish"),e.component("ElementActions",p.default,"ElementActionsWithUnpublish"),e.component("ElementActions",s.default,"ElementActionsWithDuplicate"),e.component("ElementActions",u.default,"ElementActionsWithArchive")}))}},3363:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(7363)),a=d(n(7086)),o=d(n(7820)),l=n(8127),i=n(7286);function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>{const{className:t,title:n,label:a}=e,i={className:(0,o.default)(t,"dropdown-item"),...e};return r.default.createElement(l.DropdownItem,i,a||n)};u.propTypes={disabled:a.default.bool,className:a.default.string,onClick:a.default.func,title:a.default.string,name:a.default.string,type:i.elementTypeType,active:a.default.bool,label:a.default.string},u.defaultProps={disabled:!1};var s=u;t.default=s},7867:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=d(n(7363)),a=n(2827),o=d(n(3363)),l=d(n(2409)),i=d(n(4754));function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>t=>{const n=void 0!==t.element.canDelete&&!t.element.canDelete,a=i.default._t("ElementArchiveAction.ARCHIVE","Archive"),l={label:a,title:n?i.default._t("ElementArchiveAction.ARCHIVE_PERMISSION_DENY","Archive, insufficient permissions"):a,disabled:n,className:"element-editor__actions-archive",onClick:e=>{e.stopPropagation();const{element:{id:n},isPublished:r,actions:{handleArchiveBlock:a}}=t;let o=i.default._t("ElementArchiveAction.CONFIRM_DELETE","Are you sure you want to send this block to the archive?");r&&(o=i.default._t("ElementArchiveAction.CONFIRM_DELETE_AND_UNPUBLISH","Warning: This block will be unpublished before being sent to the archive. Are you sure you want to proceed?")),a&&window.confirm(o)&&a(n).then((()=>{const e=window.jQuery(".cms-preview");e&&"function"==typeof e.entwine&&e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,r.default.createElement(o.default,l))};t.Component=u;var s=(0,a.compose)(l.default,u);t.default=s},6380:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=d(n(7363)),a=n(2827),o=d(n(3363)),l=d(n(8046)),i=d(n(4754));function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const n=void 0!==t.element.canCreate&&!t.element.canCreate,a=i.default._t("ElementArchiveAction.DUPLICATE","Duplicate"),l={label:a,title:n?i.default._t("ElementArchiveAction.DUPLICATE_PERMISSION_DENY","Duplicate, insufficient permissions"):a,disabled:n,className:"element-editor__actions-duplicate",onClick:e=>{e.stopPropagation();const{element:{id:n},actions:{handleDuplicateBlock:r}}=t;r&&r(n).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,r.default.createElement(o.default,l))};t.Component=u;var s=(0,a.compose)(l.default,u);t.default=s},4566:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(7363)),a=n(2827),o=p(n(3363)),l=p(n(6426)),i=p(n(4754)),d=p(n(5159)),u=n(1624),s=n(9536),c=n(920),f=n(5762);function p(e){return e&&e.__esModule?e:{default:e}}const m=(e,t,n)=>{const r=i.default.inject(i.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:e}),a=i.default.inject(i.default._t("ElementPublishAction.SUCCESS_NOTIFICATION","Published '{title}' successfully"),{title:t||r}),o=i.default.inject(i.default._t("ElementPublishAction.ERROR_NOTIFICATION","Error publishing '{title}'"),{title:t||r});window.jQuery.noticeAdd({text:n?a:o,stay:!1,type:n?"success":"error"})},g=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const{element:n,formDirty:a}=t,l=void 0!==t.element.canPublish&&!t.element.canPublish,u=i.default._t("ElementArchiveAction.PUBLISH","Publish"),c={label:u,title:l?i.default._t("ElementArchiveAction.PUBLISH_PERMISSION_DENY","Publish, insufficient permissions"):u,disabled:l,className:"element-editor__actions-publish",onClick:e=>{e.stopPropagation();const{element:{id:n,title:r},type:o,securityId:l,formData:i,actions:{handlePublishBlock:u},reinitialiseForm:c}=t;let f=new Promise((e=>e()));a&&(f=((e,t,n)=>d.default.createEndpointFetcher({url:(0,s.loadElementSchemaValue)("saveUrl",e),method:(0,s.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,s.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:n}})(t).then((()=>window.ss.apolloClient.queryManager.reFetchObservableQueries())).then((e=>{const t=window.jQuery(".cms-preview");return t.entwine("ss.preview")._loadUrl(t.find("iframe").attr("src")),e})).then((t=>{const n=t[0]&&t[0].data.readOneElementalArea.elements.find((t=>t.id===e));return n&&n.version})))(n,i,l).then((e=>(c(i),e)))),f.then((()=>u(n))).then((()=>m(o.title,r,!0))).catch((()=>m(o.title,r,!1)))},toggle:t.toggle};return r.default.createElement(e,t,t.children,(a||!n.isLiveVersion)&&r.default.createElement(o.default,c))};t.Component=g;var h=(0,a.compose)(l.default,(0,u.connect)((function(e,t){const n=(0,c.loadElementFormStateName)(t.element.id);let r=null;return e.form.formState.element&&e.form.formState.element[n]&&(r=e.form.formState.element[n].values),{formData:r,securityId:e.config.SecurityID,formDirty:e.unsavedForms.find((e=>e.name===`element.${n}`))}}),(function(e,t){const n=(0,c.loadElementFormStateName)(t.element.id);return{reinitialiseForm(t){e((0,f.initialize)(`element.${n}`,t))}}})),g);t.default=h},9355:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=f(n(7363)),a=n(2827),o=n(1624),l=f(n(3363)),i=f(n(5159)),d=f(n(4754)),u=n(9536),s=n(920),c=n(5762);function f(e){return e&&e.__esModule?e:{default:e}}const p=e=>t=>{if(!t.expandable||t.type.broken)return r.default.createElement(e,t);const n={title:d.default._t("ElementSaveAction.SAVE","Save"),className:"element-editor__actions-save",onClick:e=>{e.stopPropagation();const{element:n,type:r,securityId:a,formData:o,reinitialiseForm:l}=t,{jQuery:s}=window,c=d.default.inject(d.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:r.title}),f={url:(0,u.loadElementSchemaValue)("saveUrl",n.id),method:(0,u.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,u.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:a}};i.default.createEndpointFetcher(f)(o).then((()=>{const{apolloClient:e}=window.ss;e.queryManager.reFetchObservableQueries(),l(o);const t=s(".cms-preview");t.entwine("ss.preview")._loadUrl(t.find("iframe").attr("src"));const r=o?o[`PageElements_${n.id}_Title`]:null;s.noticeAdd({text:d.default.inject(d.default._t("ElementSaveAction.SUCCESS_NOTIFICATION","Saved '{title}' successfully"),{title:r||c}),stay:!1,type:"success"})})).catch((()=>{s.noticeAdd({text:d.default.inject(d.default._t("ElementSaveAction.ERROR_NOTIFICATION","Error saving '{title}'"),{title:n.Title||c}),stay:!1,type:"error"})}))}};return r.default.createElement(e,t,t.children,r.default.createElement(l.default,n))};t.Component=p;var m=(0,a.compose)((0,o.connect)((function(e,t){const n=(0,s.loadElementFormStateName)(t.element.id);let r=null;return e.form.formState.element&&e.form.formState.element[n]&&(r=e.form.formState.element[n].values),{formData:r,securityId:e.config.SecurityID}}),(function(e,t){const n=(0,s.loadElementFormStateName)(t.element.id);return{reinitialiseForm(t){e((0,c.initialize)(`element.${n}`,t))}}})),p);t.default=m},6095:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=d(n(7363)),a=n(2827),o=d(n(3363)),l=d(n(495)),i=d(n(4754));function d(e){return e&&e.__esModule?e:{default:e}}const u=e=>t=>{if(t.type.broken)return r.default.createElement(e,t);const{element:n,type:a,actions:{handleUnpublishBlock:l}}=t,d=void 0!==t.element.canUnpublish&&!t.element.canUnpublish,u=i.default._t("ElementArchiveAction.UNPUBLISH","Unpublish"),s={label:u,title:d?i.default._t("ElementArchiveAction.UNPUBLISH_PERMISSION_DENY","Unpublish, insufficient permissions"):u,disabled:d,className:"element-editor__actions-unpublish",onClick:e=>{e.stopPropagation();const{jQuery:t}=window,r=i.default.inject(i.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:a.title});l&&l(n.id).then((()=>{const e=t(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src")),t.noticeAdd({text:i.default.inject(i.default._t("ElementUnpublishAction.SUCCESS_NOTIFICATION","Removed '{title}' from the published page"),{title:n.title||r}),stay:!1,type:"success"})})).catch((()=>{t.noticeAdd({text:i.default.inject(i.default._t("ElementUnpublishAction.ERROR_NOTIFICATION","Error unpublishing '{title}'"),{title:n.title||r}),stay:!1,type:"error"})}))},toggle:t.toggle};return r.default.createElement(e,t,t.children,n.isPublished&&r.default.createElement(o.default,s))};t.Component=u;var s=(0,a.compose)(l.default,u);t.default=s},79:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=u(n(7086)),o=u(n(7820)),l=n(6648),i=n(7286),d=u(n(4754));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.handleToggle=this.handleToggle.bind(this)}getElementButtonClickHandler(e){return t=>{const{actions:{handleAddElementToArea:n},insertAfterElement:r}=this.props;t.preventDefault(),n(e.class,r).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))})),this.handleToggle()}}handleToggle(){const{toggle:e}=this.props;e()}render(){const{PopoverOptionSetComponent:e,elementTypes:t,container:n,extraClass:a,isOpen:l,placement:i,target:u}=this.props,s=(0,o.default)("element-editor-add-element",a),c=t.map((e=>({content:e.title,key:e.name,className:(0,o.default)(e.icon,"btn--icon-xl","element-editor-add-element__button"),onClick:this.getElementButtonClickHandler(e)})));return r.default.createElement(e,{buttons:c,searchPlaceholder:d.default._t("ElementAddElementPopover.SEARCH_BLOCKS","Search blocks"),extraClass:s,container:n,isOpen:l,placement:i,target:u,toggle:this.handleToggle})}}c.propTypes={container:a.default.oneOfType([a.default.string,a.default.func,a.default.object]),elementTypes:a.default.arrayOf(i.elementTypeType).isRequired,extraClass:a.default.oneOfType([a.default.string,a.default.array,a.default.object]),isOpen:a.default.bool.isRequired,placement:a.default.string,target:a.default.oneOfType([a.default.string,a.default.func,a.default.object]).isRequired,toggle:a.default.func.isRequired,areaId:a.default.number.isRequired,insertAfterElement:a.default.oneOfType([a.default.number,a.default.string])};var f=(0,l.inject)(["PopoverOptionSet"],(e=>({PopoverOptionSetComponent:e})),(()=>"ElementEditor"))(c);t.default=f},4415:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=u(n(7086)),o=n(8127),l=u(n(4754)),i=n(7286),d=n(6648);function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={popoverOpen:!1}}toggle(){this.setState({popoverOpen:!this.state.popoverOpen})}render(){const{AddElementPopoverComponent:e,elementTypes:t,areaId:n}=this.props,a={id:`ElementalArea${n}_AddButton`,color:"primary",onClick:this.toggle,className:"font-icon-plus"};return r.default.createElement("div",null,r.default.createElement(o.Button,a,l.default._t("ElementAddNewButton.ADD_BLOCK","Add block")),r.default.createElement(e,{placement:"bottom-start",target:a.id,isOpen:this.state.popoverOpen,elementTypes:t,toggle:this.toggle,areaId:n,insertAfterElement:0}))}}t.Component=c,c.defaultProps={},c.propTypes={elementTypes:a.default.arrayOf(i.elementTypeType).isRequired,areaId:a.default.number.isRequired};var f=(0,d.inject)(["AddElementPopover"],(e=>({AddElementPopoverComponent:e})),(()=>"ElementEditor.ElementList.AddNewButton"))(c);t.default=f},8947:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=c(n(7086)),o=n(6648),l=n(2827),i=n(1624),d=n(920),u=n(5762),s=c(n(720));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.PureComponent{render(){const{id:e,fileUrl:t,fileTitle:n,content:a,previewExpanded:o,InlineEditFormComponent:l,SummaryComponent:i,activeTab:d,onFormInit:u,handleLoadingError:s,formDirty:c,broken:f}=this.props;return r.default.createElement("div",{className:"element-editor-content"},!o&&r.default.createElement(i,{content:a,fileUrl:t,fileTitle:n,broken:f}),o&&r.default.createElement(l,{extraClass:{"element-editor-editform--collapsed":!o},onClick:e=>e.stopPropagation(),elementId:e,activeTab:d,onFormInit:u,handleLoadingError:s}),c&&r.default.createElement("input",{type:"hidden",name:"change-tracker",className:"element-form-dirty-state",value:"1"}))}}t.Component=p,p.propTypes={id:a.default.string,content:a.default.string,fileUrl:a.default.string,fileTitle:a.default.string,previewExpanded:a.default.bool,SummaryComponent:a.default.elementType,InlineEditFormComponent:a.default.elementType,handleLoadingError:a.default.func,broken:a.default.bool},p.defaultProps={};var m=(0,l.compose)((0,o.inject)(["ElementSummary","ElementInlineEditForm"],((e,t)=>({SummaryComponent:e,InlineEditFormComponent:t})),(()=>"ElementEditor.ElementList.Element")),(0,i.connect)((function(e,t){const n=(0,d.loadElementFormStateName)(t.id);return{formDirty:(0,u.isDirty)(`element.${n}`,s.default)(e)}})))(p);t.default=m},9475:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(r,l,i):r[l]=e[l]}r.default=e,n&&n.set(e,r);return r}(n(7363));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}class o extends r.PureComponent{render(){return r.default.createElement("div",{className:"elemental-editor-drag-indicator"},r.default.createElement("div",{className:"elemental-editor-drag-indicator__ball"}))}}var l=o;t.default=l},176:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=E(n(7363)),a=y(n(7086)),o=n(5407),l=n(7286),i=n(2827),d=n(6648),u=y(n(4754)),s=y(n(7820)),c=n(1624),f=n(920),p=n(9536),m=E(n(1789)),g=n(2084),h=n(1211),v=n(8883);function y(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}class _ extends r.Component{static getDerivedStateFromError(){return{childRenderingError:!0}}constructor(e){super(e),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleExpand=this.handleExpand.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this),this.handleTabClick=this.handleTabClick.bind(this),this.updateFormTab=this.updateFormTab.bind(this),this.state={previewExpanded:!1,initialTab:"",loadingError:!1,childRenderingError:!1}}componentDidMount(){const{connectDragPreview:e}=this.props;e&&e((0,h.getEmptyImage)(),{captureDraggingState:!0})}getVersionedStateClassName(){const{element:e}=this.props,t="element-editor__element";return e.isPublished?e.isPublished&&!e.isLiveVersion?`${t}--modified`:`${t}--published`:`${t}--draft`}getLinkTitle(e){return e.broken?u.default._t("ElementalElement.ARCHIVE_BROKEN","Archive this block"):u.default.inject(u.default._t("ElementalElement.TITLE","Edit this {type} block"),{type:e.title})}getSummary(e,t){return t.broken?e.title?u.default.inject(u.default._t("ElementalElement.BROKEN_DESCRIPTION_TITLE",'This block had the title "{title}". It is broken and will not display on the front-end. You can archive it to remove it from this elemental area.'),{title:e.title}):u.default._t("ElementalElement.BROKEN_DESCRIPTION","This block is broken and will not display on the front-end. You can archive it to remove it from this elemental area."):e.blockSchema.content}handleLoadingError(){this.setState({loadingError:!0})}updateFormTab(e){const{tabSetName:t,onActivateTab:n}=this.props,{initialTab:r}=this.state;if(r||this.setState({initialTab:e}),e||r)n(t,e||r);else{n(t,"Main")}}handleTabClick(e){const{activeTab:t}=this.props,{loadingError:n}=this.state;e===t||n||(this.setState({previewExpanded:!0}),this.updateFormTab(e))}handleExpand(e){const{type:t,link:n}=this.props,{loadingError:r}=this.state;t.broken||("button"!==e.target.type?!t.inlineEditable||r?window.location=n:this.setState({previewExpanded:!this.state.previewExpanded}):e.stopPropagation())}handleKeyUp(e){const{nodeName:t}=e.target;" "!==e.key&&"Enter"!==e.key||["input","textarea"].includes(t.toLowerCase())||this.handleExpand(e)}render(){const{element:e,type:t,areaId:n,HeaderComponent:a,ContentComponent:o,link:l,activeTab:i,connectDragSource:d,connectDropTarget:c,isDragging:f,isOver:p,onDragEnd:m}=this.props,{childRenderingError:g,previewExpanded:h}=this.state;if(!e.id)return null;const v=(0,s.default)("element-editor__element",{"element-editor__element--broken":t.broken,"element-editor__element--expandable":t.inlineEditable&&!t.broken,"element-editor__element--dragging":f,"element-editor__element--dragged-over":p},this.getVersionedStateClassName()),y=c(r.default.createElement("div",{className:v,onClick:this.handleExpand,onKeyUp:this.handleKeyUp,role:"button",tabIndex:0,title:this.getLinkTitle(t),key:e.id},r.default.createElement(a,{element:e,type:t,areaId:n,expandable:t.inlineEditable,link:l,previewExpanded:h&&!g,handleEditTabsClick:this.handleTabClick,activeTab:i,disableTooltip:f,onDragEnd:m}),!g&&r.default.createElement(o,{id:e.id,fileUrl:e.blockSchema.fileURL,fileTitle:e.blockSchema.fileTitle,content:this.getSummary(e,t),previewExpanded:h&&!f,activeTab:i,onFormInit:()=>this.updateFormTab(i),handleLoadingError:this.handleLoadingError,broken:t.broken}),g&&r.default.createElement("div",{className:"alert alert-danger mt-2"},u.default._t("ElementalElement.CHILD_RENDERING_ERROR","Something went wrong with this block. Please try saving and refreshing the CMS."))));return h?y:d(y)}}t.Component=_,_.propTypes={element:o.elementType,type:l.elementTypeType.isRequired,areaId:a.default.number.isRequired,link:a.default.string.isRequired,activeTab:a.default.string,tabSetName:a.default.string,onActivateTab:a.default.func,connectDragSource:a.default.func.isRequired,connectDragPreview:a.default.func.isRequired,connectDropTarget:a.default.func.isRequired,isDragging:a.default.bool.isRequired,isOver:a.default.bool.isRequired,onDragOver:a.default.func,onDragEnd:a.default.func,onDragStart:a.default.func},_.defaultProps={element:null};const O={drop(e,t,n){const{element:r}=e;return{target:r.id,dropSpot:(0,v.isOverTop)(t,n)?"top":"bottom"}},hover(e,t,n){const{element:r,onDragOver:a}=e;a&&a(r,(0,v.isOverTop)(t,n))}};var T=(0,i.compose)((0,g.DropTarget)("element",O,((e,t)=>({connectDropTarget:e.dropTarget(),isOver:t.isOver()}))),(0,g.DragSource)("element",v.elementDragSource,((e,t)=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}))),(0,c.connect)((function(e,t){const n=t.element.id,r=(0,f.loadElementFormStateName)(n),a=(0,p.loadElementSchemaValue)("schemaUrl",n),o=e.form&&e.form.formSchemas[a]&&e.form.formSchemas[a].schema&&e.form.formSchemas[a].schema.fields.find((e=>"Tabs"===e.component)),l=o&&o.id,i=`element.${r}__${l}`;return{tabSetName:l,activeTab:e.tabs&&e.tabs.fields&&e.tabs.fields[i]&&e.tabs.fields[i].activeTab}}),(function(e,t){const n=(0,f.loadElementFormStateName)(t.element.id);return{onActivateTab(t,r){e(m.activateTab(`element.${n}__${t}`,r))}}})),(0,d.inject)(["ElementHeader","ElementContent"],((e,t)=>({HeaderComponent:e,ContentComponent:t})),(()=>"ElementEditor.ElementList.Element")))(_);t.default=T},7328:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=c(n(7086)),o=n(2827),l=n(8127),i=n(6648),d=n(5407),u=n(7286),s=c(n(3363));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.Component{constructor(e){super(e),this.handleEditTabsClick=this.handleEditTabsClick.bind(this)}handleEditTabsClick(e){const{handleEditTabsClick:t}=this.props;t(e.target.name)}renderEditTabs(){const{editTabs:e,activeTab:t,type:n,expandable:a}=this.props;return!n.broken&&a&&e&&e.length?e.map((e=>{let{name:a,title:o}=e;return r.default.createElement(s.default,{key:a,name:a,title:o,type:n,onClick:this.handleEditTabsClick,active:a===t})})):null}renderDivider(){const{children:e,editTabs:t,expandable:n}=this.props;return n&&t&&t.length&&0!==r.default.Children.count(e)?r.default.createElement(l.DropdownItem,{divider:!0,role:"separator"}):null}render(){const{children:e,id:t,ActionMenuComponent:n}=this.props;return r.default.createElement(n,{id:`element-editor-actions-${t}`,className:"element-editor-header__actions-dropdown",dropdownMenuProps:{right:!0},dropdownToggleClassNames:["element-editor-header__actions-toggle","btn","btn-sm","btn--no-text","font-icon-dot-3"]},this.renderEditTabs(),this.renderDivider(),e)}}t.Component=p,p.propTypes={element:d.elementType,type:u.elementTypeType.isRequired,areaId:a.default.number.isRequired,activeTab:a.default.string,editTabs:a.default.arrayOf(a.default.shape({title:a.default.string,name:a.default.string})),handleEditTabsClick:a.default.func.isRequired,expandable:a.default.bool},p.defaultProps={editTabs:[],expandable:!0};var m=(0,o.compose)((0,i.inject)(["ActionMenu"],(e=>({ActionMenuComponent:e})),(()=>"ElementEditor.ElementList.Element")))(p);t.default=m},2964:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=s(n(7086)),o=s(n(9397)),l=n(2084),i=n(5407),d=n(7286),u=n(3558);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}class f extends r.Component{render(){const{isDragging:e,element:t,elementTypes:n,currentOffset:a}=this.props;if(!e||!a)return null;const{x:l,y:i}=a,d=`translate(${l}px, ${i}px)`,s={transform:d,WebkitTransform:d},c=(0,u.getElementTypeConfig)(t,n);return r.default.createElement("div",{className:"element-editor-drag-preview",style:s},r.default.createElement(o.default,{element:t,type:c,simple:!0}))}}f.propTypes={element:i.elementType,elementTypes:a.default.arrayOf(d.elementTypeType),isDragging:a.default.bool,currentOffset:a.default.shape({x:a.default.number.isRequired,y:a.default.number.isRequired})};var p=(0,l.DragLayer)((e=>({element:e.getItem(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()})))(f);t.default=p},2111:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=g(n(7086)),o=n(6648),l=n(2827),i=n(7286),d=n(1624),u=n(920),s=n(2084),c=g(n(5386)),f=g(n(2964)),p=g(n(7431)),m=n(573);function g(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class v extends r.PureComponent{constructor(e){super(e),this.state={dragTargetElementId:null,dragSpot:null},this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this)}handleDragOver(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=!!e&&e.id;this.setState({dragTargetElementId:n,dragSpot:!1===t?"bottom":"top"})}handleDragEnd(e,t){const{actions:{handleSortBlock:n},areaId:r}=this.props;n(e,t,r).then((()=>{const e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))})),this.setState({dragTargetElementId:null,dragSpot:null})}render(){const{fieldName:e,formState:t,ToolbarComponent:n,ListComponent:a,areaId:o,elementTypes:l,isDraggingOver:i,connectDropTarget:d,allowedElements:u}=this.props,{dragTargetElementId:s,dragSpot:c}=this.state,p=u.map((e=>l.find((t=>t.class===e))));return d(r.default.createElement("div",{className:"element-editor"},r.default.createElement(n,{elementTypes:p,areaId:o,onDragOver:this.handleDragOver}),r.default.createElement(a,{allowedElementTypes:p,elementTypes:l,areaId:o,onDragOver:this.handleDragOver,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,dragSpot:c,isDraggingOver:i,dragTargetElementId:s}),r.default.createElement(f.default,{elementTypes:l}),r.default.createElement("input",{name:e,type:"hidden",value:JSON.stringify(t)||"",className:"no-change-track"})))}}t.Component=v,v.propTypes={fieldName:a.default.string,elementTypes:a.default.arrayOf(i.elementTypeType).isRequired,allowedElements:a.default.arrayOf(a.default.string).isRequired,areaId:a.default.number.isRequired,actions:a.default.shape({handleSortBlock:a.default.func})};const y=(0,m.createSelector)([e=>{const t=e.form.formState.element;return t||{}}],(e=>{const t=(0,u.loadElementFormStateName)("[0-9]+");return Object.keys(e).filter((e=>e.match(t))).reduce(((t,n)=>({...t,[n]:e[n].values})),{})}));var b=(0,l.compose)(p.default,(0,s.DropTarget)("element",{},((e,t)=>({connectDropTarget:e.dropTarget(),isDraggingOver:t.isOver()}))),(0,d.connect)((function(e){return{formState:y(e)}})),(0,o.inject)(["ElementToolbar","ElementList"],((e,t)=>({ToolbarComponent:e,ListComponent:t})),(()=>"ElementEditor")),c.default)(v);t.default=b},6249:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=m(n(7086)),o=n(5407),l=n(7286),i=n(2827),d=n(6648),u=m(n(7820)),s=m(n(4754)),c=n(2084),f=n(8883),p=n(3558);function m(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}class h extends r.Component{getDragIndicatorIndex(){const{dragTargetElementId:e,draggedItem:t,blocks:n,dragSpot:r}=this.props;return(0,f.getDragIndicatorIndex)(n.map((e=>e.id)),e,t&&t.id,r)}renderBlocks(){const{ElementComponent:e,HoverBarComponent:t,DragIndicatorComponent:n,blocks:a,allowedElementTypes:o,elementTypes:l,areaId:i,onDragEnd:d,onDragOver:u,onDragStart:c,isDraggingOver:f}=this.props;if(!a)return null;if(a&&!a.length)return r.default.createElement("div",null,s.default._t("ElementList.ADD_BLOCKS","Add blocks to place your content"));let m=a.map((n=>r.default.createElement("div",{key:n.id},r.default.createElement(e,{element:n,areaId:i,type:(0,p.getElementTypeConfig)(n,l),link:n.blockSchema.actions.edit,onDragOver:u,onDragEnd:d,onDragStart:c}),f||r.default.createElement(t,{key:`create-after-${n.id}`,areaId:i,elementId:n.id,elementTypes:o}))));f||(m=[r.default.createElement(t,{key:0,areaId:i,elementId:0,elementTypes:o})].concat(m));const g=this.getDragIndicatorIndex();return f&&null!==g&&m.splice(g,0,r.default.createElement(n,{key:"DropIndicator"})),m}renderLoading(){const{loading:e,LoadingComponent:t}=this.props;return e?r.default.createElement(t,null):null}render(){const{blocks:e}=this.props,t=(0,u.default)("elemental-editor-list",{"elemental-editor-list--empty":!e||!e.length});return this.props.connectDropTarget(r.default.createElement("div",{className:t},this.renderLoading(),this.renderBlocks()))}}t.Component=h,h.propTypes={blocks:a.default.arrayOf(o.elementType),elementTypes:a.default.arrayOf(l.elementTypeType).isRequired,allowedElementTypes:a.default.arrayOf(l.elementTypeType).isRequired,loading:a.default.bool,areaId:a.default.number.isRequired,dragTargetElementId:a.default.oneOfType([a.default.string,a.default.bool]),onDragOver:a.default.func,onDragStart:a.default.func,onDragEnd:a.default.func},h.defaultProps={blocks:[],loading:!1};const v={drop(e,t){const{blocks:n}=e,r=t.getDropResult();if(!r)return{};const a=(0,f.getDragIndicatorIndex)(n.map((e=>e.id)),r.target,t.getItem(),r.dropSpot),o=n[a-1]?n[a-1].id:"0";return{...r,dropAfterID:o}}};var y=(0,i.compose)((0,c.DropTarget)("element",v,((e,t)=>({connectDropTarget:e.dropTarget(),draggedItem:t.getItem()}))),(0,d.inject)(["Element","Loading","HoverBar","DragPositionIndicator"],((e,t,n,r)=>({ElementComponent:e,LoadingComponent:t,HoverBarComponent:n,DragIndicatorComponent:r})),(()=>"ElementEditor.ElementList")))(h);t.default=y},9397:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=E(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=b(n(7086)),o=n(8127),l=n(5407),i=n(7286),d=n(2827),u=n(1624),s=n(6648),c=b(n(4754)),f=b(n(7820)),p=n(920),m=n(5762),g=n(2084),h=b(n(720)),v=n(8883),y=n(1211);function b(e){return e&&e.__esModule?e:{default:e}}function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(E=function(e){return e?n:t})(e)}class _ extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={tooltipOpen:!1}}componentDidMount(){const{connectDragPreview:e}=this.props;e&&e((0,y.getEmptyImage)(),{captureDraggingState:!0})}componentDidUpdate(){const{tooltipOpen:e}=this.state,{disableTooltip:t}=this.props;e&&t&&this.setState({tooltipOpen:!1})}getBlockTitle(e,t){return t.broken?c.default.inject(c.default._t("ElementHeader.BROKEN","This element is of obsolete type {type}."),{type:t.obsoleteClassName}):e.title?e.title:c.default.inject(c.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:t.title})}toggle(){this.setState({tooltipOpen:!this.state.tooltipOpen})}renderVersionedStateMessage(){const{element:{isLiveVersion:e,isPublished:t},formDirty:n}=this.props;if(!n&&t&&e)return null;let a="";const o=["element-editor-header__version-state"];return n?(a=c.default._t("ElementHeader.STATE_UNSAVED","Item has unsaved changes"),o.push("element-editor-header__version-state--unsaved")):t?e||(a=c.default._t("ElementHeader.STATE_MODIFIED","Item has unpublished changes"),o.push("element-editor-header__version-state--modified")):(a=c.default._t("ElementHeader.STATE_DRAFT","Item has not been published yet"),o.push("element-editor-header__version-state--draft")),r.default.createElement("span",{className:(0,f.default)(o),title:a})}render(){const{connectDragSource:e,element:t,type:n,areaId:a,previewExpanded:l,simple:i,disableTooltip:d,activeTab:u,expandable:s,ElementActionsComponent:p,handleEditTabsClick:m}=this.props,g=this.getBlockTitle(t,n),h=(0,f.default)({"element-editor-header__title":!0,"element-editor-header__title--none":!t.title}),v=c.default._t("ElementHeader.EXPAND","Show editable fields"),y=(0,f.default)("element-editor-header",{"element-editor-header--simple":i}),b=(0,f.default)("element-editor-header__icon-container",{"element-editor-header__icon-container--broken":n.broken}),E=(0,f.default)("element-editor-header__expand",{"font-icon-right-open-big":!s,"font-icon-up-open-big":s&&l,"font-icon-down-open-big":s&&!l}),_=`element-icon-${t.id}`,O=r.default.createElement("div",{className:y},r.default.createElement("div",{className:"element-editor-header__drag-handle"},r.default.createElement("i",{className:"font-icon-drag-handle"})),r.default.createElement("div",{className:"element-editor-header__info"},r.default.createElement("div",{className:b},r.default.createElement("i",{className:n.icon,id:_}),this.renderVersionedStateMessage(),!n.broken&&!i&&r.default.createElement(o.Tooltip,{placement:"top",isOpen:this.state.tooltipOpen&&!d,target:_,toggle:this.toggle},n.title)),r.default.createElement("h3",{className:h},g)),!i&&r.default.createElement("div",{className:"element-editor-header__actions"},r.default.createElement("div",{role:"none",onClick:e=>e.stopPropagation()},r.default.createElement(p,{element:t,type:n,areaId:a,activeTab:u,editTabs:n.editTabs,handleEditTabsClick:m,expandable:s})),!n.broken&&r.default.createElement("i",{className:E,title:v})));return l?e(O):O}}t.Component=_,_.propTypes={element:l.elementType.isRequired,type:i.elementTypeType.isRequired,areaId:a.default.number,activeTab:a.default.string,simple:a.default.bool,ElementActionsComponent:a.default.elementType,previewExpanded:a.default.bool,disableTooltip:a.default.bool,formDirty:a.default.bool,connectDragSource:a.default.func.isRequired,connectDragPreview:a.default.func.isRequired,onDragEnd:a.default.func},_.defaultProps={expandable:!0};var O=(0,d.compose)((0,g.DragSource)("element",v.elementDragSource,(e=>({connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}))),(0,u.connect)((function(e,t){const n=(0,p.loadElementFormStateName)(t.element.id);return{formDirty:(0,m.isDirty)(`element.${n}`,h.default)(e)}})),(0,s.inject)(["ElementActions"],(e=>({ElementActionsComponent:e})),(()=>"ElementEditor.ElementList.Element")))(_);t.default=O},8544:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=u(n(7086)),o=u(n(8665)),l=n(6648),i=n(7286),d=u(n(4754));function u(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}const c=(0,o.default)("element-editor__hover-bar");function f(e){let{AddElementPopoverComponent:t,elementTypes:n,elementId:a,areaId:o,popoverOpen:l,onToggle:i}=e;const u=`${c("-line")} font-icon-plus-circled`,s=d.default._t("ElementAddNewButton.ADD_BLOCK","Add block"),f={className:c("-area",{"-area--focus":l}),onClick:i,"aria-label":s,title:s,id:`AddBlockHoverBarArea_${o}_${a}`};return r.default.createElement("div",{className:c(""),id:`AddBlockHoverBar_${o}_${a}`},r.default.createElement("button",f,r.default.createElement("span",{className:c("-area-inner")},r.default.createElement("span",{className:u}))),r.default.createElement(t,{placement:"bottom",target:`AddBlockHoverBarArea_${o}_${a}`,isOpen:l,elementTypes:n,toggle:i,container:`#AddBlockHoverBar_${o}_${a}`,areaId:o,insertAfterElement:a}))}class p extends r.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={popoverOpen:!1}}toggle(){this.setState({popoverOpen:!this.state.popoverOpen})}render(){const e={...this.state,...this.props,onToggle:this.toggle};return r.default.createElement(f,e)}}t.Component=p,p.propTypes={elementTypes:a.default.arrayOf(i.elementTypeType).isRequired,elementId:a.default.oneOfType([a.default.string,a.default.number]).isRequired,areaId:a.default.oneOfType([a.default.number,a.default.string]).isRequired};var m=(0,l.inject)(["AddElementPopover"],(e=>({AddElementPopoverComponent:e})),(()=>"ElementEditor.ElementList.HoverBar"))(p);t.default=m},9192:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=c(n(7086)),o=c(n(7820)),l=c(n(8238)),i=n(9536),d=c(n(4754)),u=n(920),s=n(1624);function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}class p extends r.PureComponent{constructor(e){super(e),this.handleLoadingError=this.handleLoadingError.bind(this),this.state={loadingError:null}}handleLoadingError(){const{jQuery:e}=window,{handleLoadingError:t}=this.props;this.setState({loadingError:!0}),e.noticeAdd({text:d.default.inject(d.default._t("ElementEditForm.ERROR_NOTIFICATION","Error displaying the edit form for this block")),stay:!0,type:"notice"}),t()}render(){const{elementId:e,extraClass:t,onClick:n,onFormInit:a,formHasState:d}=this.props,{loadingError:u}=this.state,s=(0,o.default)("element-editor-editform",t),c={formTag:"div",schemaUrl:(0,i.loadElementSchemaValue)("schemaUrl",e),identifier:"element",refetchSchemaOnMount:!d,onLoadingError:this.handleLoadingError};return u&&(c.loading=!1),"function"==typeof a&&(c.onReduxFormInit=a),r.default.createElement("div",{className:s,onClick:n,role:"presentation"},r.default.createElement(l.default,c))}}p.propTypes={extraClass:a.default.oneOfType([a.default.string,a.default.object]),onClick:a.default.func,elementId:a.default.string,handleLoadingError:a.default.func};var m=(0,s.connect)((function(e,t){const n=(0,u.loadElementFormStateName)(t.elementId);return{formHasState:e.form.formState&&e.form.formState.element&&!!e.form.formState.element[n]}}))(p);t.default=m},9097:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),a=i(n(7086)),o=i(n(7820)),l=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class u extends r.PureComponent{render(){const{fileUrl:e,fileTitle:t,content:n,broken:a}=this.props,i=l.default._t("ElementSummary.NO_PREVIEW","No preview available"),d=(0,o.default)("element-editor-summary__content",{"element-editor-summary__content--broken":a});return r.default.createElement("div",{className:"element-editor-summary"},e&&r.default.createElement("img",{className:"element-editor-summary__thumbnail-image",src:e,alt:t}),(n||!e)&&r.default.createElement("p",{className:d},n||i))}}u.defaultProps={},u.propTypes={content:a.default.string,fileUrl:a.default.string,fileTitle:a.default.string,broken:a.default.bool};var s=u;t.default=s},8792:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=(r=n(7086))&&r.__esModule?r:{default:r},l=n(6648),i=n(7286),d=n(2084);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class s extends a.PureComponent{render(){const{AddNewButtonComponent:e,elementTypes:t,areaId:n,connectDropTarget:r}=this.props;return r(a.default.createElement("div",{className:"element-editor__toolbar"},a.default.createElement(e,{elementTypes:t,areaId:n})))}}s.defaultProps={},s.propTypes={elementTypes:o.default.arrayOf(i.elementTypeType).isRequired,areaId:o.default.number.isRequired,AddNewButtonComponent:o.default.elementType.isRequired,connectDropTarget:o.default.func.isRequired,onDragOver:o.default.func,onDragDrop:o.default.func};const c={hover(e){const{onDragOver:t}=e;t&&t()}};var f=(0,d.DropTarget)("element",c,(e=>({connectDropTarget:e.dropTarget()})))((0,l.inject)(["ElementAddNewButton"],(e=>({AddNewButtonComponent:e})),(()=>"ElementEditor.ElementToolbar"))(s));t.default=f},9405:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(7363)),a=l(n(4754)),o=l(n(7820));function l(e){return e&&e.__esModule?e:{default:e}}var i=e=>class extends e{getClassName(){const e=[super.getClassName()];return this.props.data.ElementID&&e.unshift("elemental-area__element--historic-inner"),(0,o.default)(e)}render(){const e=this.getLegend(),t=this.props.data.tag||"div",n=this.getClassName(),{data:o}=this.props;return o.ElementID?r.default.createElement(t,{className:n},e,r.default.createElement("div",{className:"elemental-preview elemental-preview--historic"},o.ElementEditLink&&r.default.createElement("a",{className:"elemental-preview__link",href:o.ElementEditLink},r.default.createElement("span",{className:"elemental-preview__link-text"},a.default._t("HistoricElementView.VIEW_BLOCK_HISTORY","Block history")),r.default.createElement("i",{className:"font-icon-angle-right btn--icon-lg elemental-preview__link-caret"})),r.default.createElement("div",{className:"elemental-preview__icon"},r.default.createElement("i",{className:o.ElementIcon})),r.default.createElement("div",{className:"elemental-preview__detail"},r.default.createElement("h3",null,o.ElementTitle," ",r.default.createElement("small",null,o.ElementType)))),this.props.children):super.render()}};t.default=i},5515:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(7363)),a=n(8127);function o(e){return e&&e.__esModule?e:{default:e}}var l=(0,o(n(1042)).default)((e=>{const{children:t}=e,n=r.default.Children.toArray(r.default.Children.map(t,((t,n)=>{const a={noHolder:!0};return 0===n&&(a.id=e.id),r.default.cloneElement(t,a)})));return e.readOnly?r.default.createElement("div",{className:"text-checkbox-group-field--read-only"},n):1===n.length?n[0]:r.default.createElement(a.InputGroup,{className:"text-checkbox-group-field"},n[0],r.default.createElement(a.InputGroupAddon,{addonType:"append"},r.default.createElement(a.InputGroupText,null,n[1])))}));t.default=l},7489:function(e,t,n){var r=u(n(5311)),a=u(n(7363)),o=n(9691),l=n(6648),i=n(3558),d=n(5762);function u(e){return e&&e.__esModule?e:{default:e}}const s=()=>{window.ss.apolloClient.resetStore(),setTimeout((()=>{const{store:e}=window.ss;e&&e.dispatch((0,d.destroy)(...Object.keys(e.getState().form.formState.element||{}).map((e=>`element.${e}`))))}),0)};r.default.entwine("ss",(e=>{e(".js-injector-boot .element-editor__container").entwine({ReactRoot:null,onmatch(){const e=(0,l.loadComponent)("ElementEditor",{}),t=this.data("schema"),n=(0,i.getConfig)().elementTypes,r={fieldName:this.attr("name"),areaId:t["elemental-area-id"],allowedElements:t["allowed-elements"],elementTypes:n};let d=this.getReactRoot();d||(d=(0,o.createRoot)(this[0]),this.setReactRoot(d)),d.render(a.default.createElement(e,r))},onunmatch(){s();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},"from .cms-edit-form":{onaftersubmitform(){s()}}}),e(".js-injector-boot .element-editor__container .element-form-dirty-state").entwine({onmatch(){e(".cms-edit-form").trigger("change")},onunmatch(){e(".cms-edit-form").trigger("change")}}),e(".cms-edit-form").entwine({getChangeTrackerOptions(){const t=void 0===this.entwineData("ChangeTrackerOptions");let n=this._super();return t&&(n=e.extend({},n),n.ignoreFieldSelector+=", .elementalarea :input:not(.element-form-dirty-state)",this.setChangeTrackerOptions(n)),n}})}))},8883:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isOverTop=t.getDragIndicatorIndex=t.elementDragSource=void 0;var r=n(394);t.isOverTop=(e,t)=>{const n=e.getClientOffset(),a=(0,r.findDOMNode)(t).getBoundingClientRect();return n.y{if(null===t||!n)return null;let a=t?e.findIndex((e=>e===t)):0;const o=e.findIndex((e=>e===n));return"bottom"===r&&(a+=1),o===a||o+1===a?null:a};const a={beginDrag(e){return e.element},endDrag(e,t){const{onDragEnd:n}=e,r=t.getDropResult();if(!n||!r||!r.dropAfterID)return;const a=t.getItem().id,{dropAfterID:o}=r;a!==o&&n(a,o)}};t.elementDragSource=a},8665:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(7820))&&r.__esModule?r:{default:r};var o=e=>function(){const t=t=>`${e}${t}`;for(var n=arguments.length,r=new Array(n),o=0;o!(!e&&""!==e)&&("object"==typeof e?Array.isArray(e)?e.map(t):Object.entries(e).reduce(((e,n)=>{let[r,a]=n;return Object.assign({},e,{[t(r)]:a})}),{}):t(e))));return(0,a.default)(...l)};t.default=o},1637:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation AddElementToArea($className: String!, $elementalAreaID: ID!, $afterElementID: ID) { addElementToArea( className: $className, @@ -8,23 +8,23 @@ mutation AddElementToArea($className: String!, $elementalAreaID: ID!, $afterElem id } } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n,areaId:r}}=e;return{actions:{...n,handleAddElementToArea:(e,n)=>t({variables:{className:e,elementalAreaID:r,afterElementID:n}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:i.query,variables:i.config.options({areaId:t}).variables}]}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},2409:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n,areaId:r}}=e;return{actions:{...n,handleAddElementToArea:(e,n)=>t({variables:{className:e,elementalAreaID:r,afterElementID:n}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:l.query,variables:l.config.options({areaId:t}).variables}]}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},2409:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation ArchiveBlock($blockId: ID!) { deleteBlocks(ids: [$blockId]) } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleArchiveBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:i.query,variables:i.config.options({areaId:t}).variables}]}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},8046:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleArchiveBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:l.query,variables:l.config.options({areaId:t}).variables}]}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},8046:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation DuplicateBlock($blockId: ID!) { duplicateBlock(id: $blockId) { id } } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleDuplicateBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:i.query,variables:i.config.options({areaId:t}).variables}]}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},3558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementTypeConfig=t.getConfig=void 0;var r,o=(r=n(4510))&&r.__esModule?r:{default:r};const a=()=>o.default.getSection("DNADesign\\Elemental\\Controllers\\ElementalAreaController");t.getConfig=a;t.getElementTypeConfig=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=e.blockSchema.typeName,r=Array.isArray(t)?t:a().elementTypes;let o=r.find((e=>e.class===n||e.name===n));return e.obsoleteClassName&&(o=Object.assign({obsoleteClassName:e.obsoleteClassName},o),Object.preventExtensions(o)),o}},920:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementFormStateName=void 0;var r,o=(r=n(4510))&&r.__esModule?r:{default:r};t.loadElementFormStateName=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="DNADesign\\Elemental\\Controllers\\ElementalAreaController",n=o.default.getSection(t),r=n.form.elementForm.formNameTemplate;return e?r.replace("{id}",e):r}},9536:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementSchemaValue=void 0;var r,o=(r=n(4510))&&r.__esModule?r:{default:r};t.loadElementSchemaValue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="DNADesign\\Elemental\\Controllers\\ElementalAreaController",r=o.default.getSection(n),a=r.form.elementForm[e]||"";return t?`${a}/${t}`:a}},6426:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleDuplicateBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:l.query,variables:l.config.options({areaId:t}).variables}]}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},3558:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getElementTypeConfig=t.getConfig=void 0;var r,a=(r=n(4510))&&r.__esModule?r:{default:r};const o=()=>a.default.getSection("DNADesign\\Elemental\\Controllers\\ElementalAreaController");t.getConfig=o;t.getElementTypeConfig=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=e.blockSchema.typeName,r=Array.isArray(t)?t:o().elementTypes;let a=r.find((e=>e.class===n||e.name===n));return e.obsoleteClassName&&(a=Object.assign({obsoleteClassName:e.obsoleteClassName},a),Object.preventExtensions(a)),a}},920:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementFormStateName=void 0;var r,a=(r=n(4510))&&r.__esModule?r:{default:r};t.loadElementFormStateName=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="DNADesign\\Elemental\\Controllers\\ElementalAreaController",n=a.default.getSection(t),r=n.form.elementForm.formNameTemplate;return e?r.replace("{id}",e):r}},9536:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementSchemaValue=void 0;var r,a=(r=n(4510))&&r.__esModule?r:{default:r};t.loadElementSchemaValue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="DNADesign\\Elemental\\Controllers\\ElementalAreaController",r=a.default.getSection(n),o=r.form.elementForm[e]||"";return t?`${o}/${t}`:o}},6426:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation PublishBlock($blockId:ID!) { publishBlock(id: $blockId) { id } } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handlePublishBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:i.query,variables:i.config.options({areaId:t}).variables}]}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},2806:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,o=n(90);const a=((r=n(1306))&&r.__esModule?r:{default:r}).default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handlePublishBlock:e=>t({variables:{blockId:e}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:l.query,variables:l.config.options({areaId:t}).variables}]}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},2806:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,a=n(3732);const o=((r=n(1306))&&r.__esModule?r:{default:r}).default` query ReadBlocksForArea($id:ID!) { readOneElementalArea(filter: { id: { eq: $id } }, versioning: { mode: DRAFT @@ -44,7 +44,7 @@ query ReadBlocksForArea($id:ID!) { } } } -`;t.query=a;const i={options(e){let{areaId:t}=e;return{variables:{id:t}}},props(e){let{data:{error:t,readOneElementalArea:n,loading:r}}=e,o=null;n&&(o=n.elements);return{loading:r||!o,blocks:o,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message))}}};t.config=i;var l=(0,o.graphql)(a,i);t.default=l},5386:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +`;t.query=o;const l={options(e){let{areaId:t}=e;return{variables:{id:t}}},props(e){let{data:{error:t,readOneElementalArea:n,loading:r}}=e,a=null;n&&(a=n.elements);return{loading:r||!a,blocks:a,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message))}}};t.config=l;var i=(0,a.graphql)(o,l);t.default=i},5386:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation SortBlockMutation($blockId:ID!, $afterBlockId:ID!) { sortBlock( id: $blockId @@ -55,7 +55,7 @@ mutation SortBlockMutation($blockId:ID!, $afterBlockId:ID!) { isPublished } } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleSortBlock:(e,n,r)=>t({variables:{blockId:e,afterBlockId:n},optimisticResponse:{sortBlock:{id:e,isLiveVersion:!1,isPublished:!1,__typename:"Block"}},update:(t,o)=>{let{data:{sortBlock:a}}=o;const l=i.config.options({areaId:r}).variables,u=t.readQuery({query:i.query,variables:l}),s=JSON.parse(JSON.stringify(u));let c=s.readOneElementalArea.elements;const d=c.findIndex((t=>t.id===e)),f=c[d];if(Object.entries(a).forEach((e=>{let[t,n]=e;"__typename"!==t&&(f[t]=n)})),c.splice(d,1),"0"===n)c.unshift(f);else{let e=c.findIndex((e=>e.id===n));-1===e&&(e=d-1);const t=c.slice(e+1);c=c.slice(0,e+1),c.push(f),c=c.concat(t)}s.readOneElementalArea.elements=c,t.writeQuery({query:i.query,data:s,variables:l})}})}}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},495:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90),a=(r=n(1306))&&r.__esModule?r:{default:r},i=n(2806);const l=a.default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleSortBlock:(e,n,r)=>t({variables:{blockId:e,afterBlockId:n},optimisticResponse:{sortBlock:{id:e,isLiveVersion:!1,isPublished:!1,__typename:"Block"}},update:(t,a)=>{let{data:{sortBlock:o}}=a;const i=l.config.options({areaId:r}).variables,d=t.readQuery({query:l.query,variables:i}),u=JSON.parse(JSON.stringify(d));let s=u.readOneElementalArea.elements;const c=s.findIndex((t=>t.id===e)),f=s[c];if(Object.entries(o).forEach((e=>{let[t,n]=e;"__typename"!==t&&(f[t]=n)})),s.splice(c,1),"0"===n)s.unshift(f);else{let e=s.findIndex((e=>e.id===n));-1===e&&(e=c-1);const t=s.slice(e+1);s=s.slice(0,e+1),s.push(f),s=s.concat(t)}u.readOneElementalArea.elements=s,t.writeQuery({query:l.query,data:u,variables:i})}})}}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},495:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732),o=(r=n(1306))&&r.__esModule?r:{default:r},l=n(2806);const i=o.default` mutation UnpublishBlock($blockId:ID!) { unpublishBlock( id: $blockId @@ -63,7 +63,7 @@ mutation UnpublishBlock($blockId:ID!) { id } } -`;t.mutation=l;const u={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleUnpublishBlock:(e,n,r,o)=>t({variables:{blockId:e,fromStage:n,toStage:r,fromVersion:o}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:i.query,variables:i.config.options({areaId:t}).variables}]}}};t.config=u;var s=(0,o.graphql)(l,u);t.default=s},2939:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,o=n(90);const a=((r=n(1306))&&r.__esModule?r:{default:r}).default` +`;t.mutation=i;const d={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,handleUnpublishBlock:(e,n,r,a)=>t({variables:{blockId:e,fromStage:n,toStage:r,fromVersion:a}})}}},options:e=>{let{areaId:t}=e;return{refetchQueries:[{query:l.query,variables:l.config.options({areaId:t}).variables}]}}};t.config=d;var u=(0,a.graphql)(i,d);t.default=u},2939:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.query=t.default=t.config=void 0;var r,a=n(3732);const o=((r=n(1306))&&r.__esModule?r:{default:r}).default` query ReadHistoryViewerBlock ($block_id: ID!, $limit: Int!, $offset: Int!) { readOneBlock( versioning: { @@ -95,7 +95,7 @@ query ReadHistoryViewerBlock ($block_id: ID!, $limit: Int!, $offset: Int!) { } } } -`;t.query=a;const i={options(e){let{recordId:t,limit:n,page:r}=e;return{variables:{limit:n,offset:((r||1)-1)*n,block_id:t}}},props(e){let{data:{error:t,refetch:n,readOneBlock:r,loading:o},ownProps:{actions:a={versions:{}},limit:i,recordId:l}}=e;const u=r||null;return{loading:o||!u,versions:u,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message)),actions:{...a,versions:{...u,goToPage(e){n({offset:((e||1)-1)*i,limit:i,block_id:l})}}}}}};t.config=i;var l=(0,o.graphql)(a,i);t.default=l},9650:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(90);const a=((r=n(1306))&&r.__esModule?r:{default:r}).default` +`;t.query=o;const l={options(e){let{recordId:t,limit:n,page:r}=e;return{variables:{limit:n,offset:((r||1)-1)*n,block_id:t}}},props(e){let{data:{error:t,refetch:n,readOneBlock:r,loading:a},ownProps:{actions:o={versions:{}},limit:l,recordId:i}}=e;const d=r||null;return{loading:a||!d,versions:d,graphQLErrors:t&&t.graphQLErrors&&t.graphQLErrors.map((e=>e.message)),actions:{...o,versions:{...d,goToPage(e){n({offset:((e||1)-1)*l,limit:l,block_id:i})}}}}}};t.config=l;var i=(0,a.graphql)(o,l);t.default=i},9650:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,a=n(3732);const o=((r=n(1306))&&r.__esModule?r:{default:r}).default` mutation revertBlockToVersion($id:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) { copyBlockToStage(input: { id: $id @@ -106,4 +106,4 @@ mutation revertBlockToVersion($id:ID!, $fromStage:VersionedStage!, $toStage:Vers id } } -`;t.mutation=a;const i={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,revertToVersion:(e,n,r,o)=>t({variables:{id:e,fromVersion:n,fromStage:r,toStage:o}})}}},options:{refetchQueries:["ReadHistoryViewerBlock"]}};t.config=i;var l=(0,o.graphql)(a,i);t.default=l},5407:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementType=void 0;var r,o=(r=n(7086))&&r.__esModule?r:{default:r};const a=o.default.shape({id:o.default.string.isRequired,title:o.default.string,blockSchema:o.default.object,inlineEditable:o.default.bool,published:o.default.bool,liveVersion:o.default.bool,version:o.default.number});t.elementType=a},7286:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementTypeType=void 0;var r,o=(r=n(7086))&&r.__esModule?r:{default:r};const a=o.default.shape({name:o.default.string,title:o.default.string,icon:o.default.string,inlineEditable:o.default.bool,editTabs:o.default.arrayOf(o.default.shape({title:o.default.string,name:o.default.string})),config:o.default.object});t.elementTypeType=a},8679:function(e,t,n){var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=u(t),h=u(n),v=0;v-1){var a=n[o];return o>0&&(n.splice(o,1),n.unshift(a)),a.value}return r}return{get:o,put:function(t,a){o(t)===r&&(n.unshift({key:t,value:a}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(c,f);function m(){var t=p.get(arguments);if(t===r){if(t=e.apply(null,arguments),d){var n=p.getEntries(),o=n.find((function(e){return d(e.value,t)}));o&&(t=o.value)}p.put(arguments,t)}return t}return m.clearCache=function(){return p.clear()},m}function i(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function l(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=c){var t=console[e]||console.log;return t.apply(console,arguments)}}}!function(e){e.debug=d("debug"),e.log=d("log"),e.warn=d("warn"),e.error=d("error")}(u||(u={}));function f(e){try{return e()}catch(e){}}var p=f((function(){return globalThis}))||f((function(){return window}))||f((function(){return self}))||f((function(){return global}))||f((function(){return f.constructor("return this")()})),m="__",h=[m,m].join("DEV");var v=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(p,h,{value:"production"!==f((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),p[h]}}();function y(e){try{return e()}catch(e){}}var b=y((function(){return globalThis}))||y((function(){return window}))||y((function(){return self}))||y((function(){return global}))||y((function(){return y.constructor("return this")()})),g=!1;function E(){g&&(delete b.process,g=!1)}!b||y((function(){return"production"}))||y((function(){return process}))||(Object.defineProperty(b,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),g=!0);class _{constructor(e,t="GraphQL request",n={line:1,column:1}){var r;"string"==typeof e||devAssert(!1,`Body must be a string. Received: ${e,formatValue(r,[])}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||devAssert(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||devAssert(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}var O;E(),__DEV__?u("boolean"==typeof v,v):u("boolean"==typeof v,38),function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(O||(O={}));var w=new Map;function T(e){var t;switch(e){case O.Query:t="Query";break;case O.Mutation:t="Mutation";break;case O.Subscription:t="Subscription"}return t}function k(e){var t,n,r=w.get(e);if(r)return r;__DEV__?u(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):u(!!e&&!!e.kind,32);for(var o=[],a=[],i=[],l=[],s=0,c=e.definitions;s=0}))||!1,F=L&&!$,B=!1,V=M.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!B&&r!==t()&&(B=!0,__DEV__&&u.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=I.useState({inst:{value:r,getSnapshot:t}}),a=o[0].inst,i=o[1];return F?I.useLayoutEffect((function(){Object.assign(a,{value:r,getSnapshot:t}),W(a)&&i({inst:a})}),[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),I.useEffect((function(){return W(a)&&i({inst:a}),e((function(){W(a)&&i({inst:a})}))}),[e]),r};function W(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(e){return!0}}var Q=Object.prototype,U=Q.toString,H=Q.hasOwnProperty,z=Function.prototype.toString,K=new Map;function G(e,t){try{return Y(e,t)}finally{K.clear()}}function Y(e,t){if(e===t)return!0;var n,r,o,a=U.call(e);if(a!==U.call(t))return!1;switch(a){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(ee(e,t))return!0;var i=J(e),l=J(t),u=i.length;if(u!==l.length)return!1;for(var s=0;s=0&&n.indexOf(r,o)===o))}return!1}function J(e){return Object.keys(e).filter(X,e)}function X(e){return void 0!==this[e]}var Z="{ [native code] }";function ee(e,t){var n=K.get(e);if(n){if(n.has(t))return!0}else K.set(e,n=new Set);return n.add(t),!1}function te(){for(var e=[],t=0;t0}var ie,le=function(e){function t(n){var r,o,a=n.graphQLErrors,i=n.clientErrors,l=n.networkError,u=n.errorMessage,s=n.extraInfo,c=e.call(this,u)||this;return c.name="ApolloError",c.graphQLErrors=a||[],c.clientErrors=i||[],c.networkError=l||null,c.message=u||(o="",(ae((r=c).graphQLErrors)||ae(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";o+="".concat(t,"\n")})),r.networkError&&(o+="".concat(r.networkError.message,"\n")),o=o.replace(/\n$/,"")),c.extraInfo=s,c.__proto__=t.prototype,c}return D(t,e),t}(Error);function ue(e){var t=(0,I.useContext)(oe()),n=e||t.client;return __DEV__?u(!!n,'Could not find "client" in the context or passed in as an option. Wrap the root component in an , or pass an ApolloClient instance in via options.'):u(!!n,31),n}function se(e){return null!==e&&"object"==typeof e}function ce(e){var t=new Set([e]);return t.forEach((function(e){se(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){se(e[n])&&t.add(e[n])}))})),e}function de(e){return __DEV__&&ce(e),e}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ie||(ie={}));var fe=Object.prototype.hasOwnProperty;function pe(e,t){return void 0===t&&(t=Object.create(null)),function(e,t){var n=(0,I.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new me(e,t,n.current));var r=n.current,o=(0,I.useState)(0),a=(o[0],o[1]);return r.forceUpdate=function(){a((function(e){return e+1}))},r}(ue(t.client),e).useQuery(t)}var me=function(){function e(e,t,n){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(x?WeakSet:Set),this.ssrDisabledResult=de({loading:!0,data:void 0,error:void 0,networkStatus:ie.loading}),this.skipStandbyResult=de({loading:!1,data:void 0,error:void 0,networkStatus:ie.ready}),this.toQueryResultCache=new(N?WeakMap:Map),P(t,O.Query);var r=n&&n.result,o=r&&r.data;o&&(this.previousData=o)}return e.prototype.forceUpdate=function(){__DEV__&&u.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(){var e=this;return new Promise((function(t){e.asyncResolveFns.add(t),e.optionsToIgnoreOnce.add(e.watchQueryOptions),e.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,I.useContext)(oe()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=V((0,I.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&G(e.data,r.data)||t.setResult(r)},r=function(a){var i=n.last;o.unsubscribe();try{n.resetLastResults(),o=n.subscribe(e,r)}finally{n.last=i}if(!fe.call(a,"graphQLErrors"))throw a;var l=t.result;(!l||l&&l.loading||!G(a,l.error))&&t.setResult({data:l&&l.data,error:a,loading:!1,networkStatus:ie.error})},o=n.subscribe(e,r);return function(){return o.unsubscribe()}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(r);var o=this.toQueryResult(r);return!o.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(o)})),this.asyncResolveFns.clear()),o},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(o)&&G(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.optionsToIgnoreOnce.delete(o),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push(te(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(ne)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,C(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var a=o.fetchPolicy,i=void 0===a?this.getDefaultFetchPolicy():a,l=o.initialFetchPolicy,u=void 0===l?i:l;Object.assign(o,{initialFetchPolicy:u,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,I.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;e.loading||Promise.resolve().then((function(){e.error?t.onError(e.error):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&u.warn(e)}))},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,C(e,["data","partial"]));return this.toQueryResultCache.set(e,t=j(j(j({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&ae(e.errors)&&(t.error=new le({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:ie.refetch}),this.observable.refetch())},e}();function he(e){var t=e.children,n=pe(e.query,C(e,["children","query"]));return n?t(n):null}he.propTypes={client:R.object,children:R.func.isRequired,fetchPolicy:R.string,notifyOnNetworkStatusChange:R.bool,onCompleted:R.func,onError:R.func,pollInterval:R.number,query:R.object.isRequired,variables:R.object,ssr:R.bool,partialRefetch:R.bool,returnPartialData:R.bool};var ve=function(){return{}},ye=function(){return!1};function be(e){return e.displayName||e.name||"Component"}function ge(e,t){for(var n={},r=0,o=e.variables;r0&&(u.variables=ge(n,i)),I.createElement(he,j({},u,{displayName:o,skip:l,query:e}),(function(e){e.client;var n,o,u=e.data,s=C(e,["client","data"]);if(t.withRef&&(a.withRef=!0,i=Object.assign({},i,{ref:a.setWrappedInstance})),l)return I.createElement(r,j({},i,{}));var d=Object.assign(s,u||{}),f=t.name||"data",p=((n={})[f]=d,n);if(t.props){var m=((o={})[f]=d,o.ownProps=i,o);p=c=t.props(m,c)}return I.createElement(r,j({},i,p))}))},i.displayName=o,i.WrappedComponent=r,i}(Ee);return A(a,r,{})}}function Oe(e){var t=function(e,t){var n=ue(null==t?void 0:t.client);P(e,O.Mutation);var r=(0,I.useState)({called:!1,loading:!1,client:n}),o=r[0],a=r[1],i=(0,I.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(i.current,{client:n,options:t,mutation:e});var l=(0,I.useCallback)((function(e){void 0===e&&(e={});var t=i.current,n=t.client,r=t.options,o=t.mutation,l=j(j({},r),{mutation:o});i.current.result.loading||l.ignoreResults||!i.current.isMounted||a(i.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:n});var u=++i.current.mutationId,s=ne(l,e);return n.mutate(s).then((function(t){var r,o,l,c=t.data,d=t.errors,f=d&&d.length>0?new le({graphQLErrors:d}):void 0;if(u===i.current.mutationId&&!s.ignoreResults){var p={called:!0,loading:!1,data:c,error:f,client:n};i.current.isMounted&&!G(i.current.result,p)&&a(i.current.result=p)}return null===(o=null===(r=i.current.options)||void 0===r?void 0:r.onCompleted)||void 0===o||o.call(r,t.data,s),null===(l=e.onCompleted)||void 0===l||l.call(e,t.data,s),t})).catch((function(t){var r,o,l,c;if(u===i.current.mutationId&&i.current.isMounted){var d={loading:!1,error:t,data:void 0,called:!0,client:n};G(i.current.result,d)||a(i.current.result=d)}if((null===(r=i.current.options)||void 0===r?void 0:r.onError)||s.onError)return null===(l=null===(o=i.current.options)||void 0===o?void 0:o.onError)||void 0===l||l.call(o,t,s),null===(c=e.onError)||void 0===c||c.call(e,t,s),{data:void 0,errors:t};throw t}))}),[]),u=(0,I.useCallback)((function(){i.current.isMounted&&a({called:!1,loading:!1,client:n})}),[]);return(0,I.useEffect)((function(){return i.current.isMounted=!0,function(){i.current.isMounted=!1}}),[]),[l,j({reset:u},o)]}(e.mutation,e),n=t[0],r=t[1];return e.children?e.children(n,r):null}function we(e,t){void 0===t&&(t={});var n=k(e),r=t.options,o=void 0===r?ve:r,a=t.alias,i=void 0===a?"Apollo":a,l=o;return"function"!=typeof l&&(l=function(){return o}),function(r){var o="".concat(i,"(").concat(be(r),")"),a=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return D(i,a),i.prototype.render=function(){var o=this.props,a=l(o);return t.withRef&&(this.withRef=!0,o=Object.assign({},o,{ref:this.setWrappedInstance})),!a.variables&&n.variables.length>0&&(a.variables=ge(n,o)),I.createElement(Oe,j({ignoreResults:!0},a,{mutation:e}),(function(e,n){var a,i,l=n.data,u=C(n,["data"]),s=Object.assign(u,l||{}),c=t.name||"mutate",d=t.name?"".concat(c,"Result"):"result",f=((a={})[c]=e,a[d]=s,a);if(t.props){var p=((i={})[c]=e,i[d]=s,i.ownProps=o,i);f=t.props(p)}return I.createElement(r,j({},o,f))}))},i.displayName=o,i.WrappedComponent=r,i}(Ee);return A(a,r,{})}}function Te(e){var t=function(e,t){var n=(0,I.useRef)(!1),r=ue(null==t?void 0:t.client);P(e,O.Subscription);var o=(0,I.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),a=o[0],i=o[1];n.current||(n.current=!0,(null==t?void 0:t.onSubscriptionData)&&__DEV__&&u.warn(t.onData?"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.":"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."),(null==t?void 0:t.onSubscriptionComplete)&&__DEV__&&u.warn(t.onComplete?"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.":"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."));var l=(0,I.useState)((function(){return(null==t?void 0:t.skip)?null:r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),s=l[0],c=l[1],d=(0,I.useRef)(!1);(0,I.useEffect)((function(){return function(){d.current=!0}}),[]);var f=(0,I.useRef)({client:r,subscription:e,options:t});return(0,I.useEffect)((function(){var n,o,a,l,u=null==t?void 0:t.shouldResubscribe;"function"==typeof u&&(u=!!u(t)),(null==t?void 0:t.skip)?(!(null==t?void 0:t.skip)!=!(null===(n=f.current.options)||void 0===n?void 0:n.skip)||d.current)&&(i({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(null),d.current=!1):(!1===u||r===f.current.client&&e===f.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(o=f.current.options)||void 0===o?void 0:o.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(a=f.current.options)||void 0===a?void 0:a.skip)&&G(null==t?void 0:t.variables,null===(l=f.current.options)||void 0===l?void 0:l.variables))&&!d.current||(i({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(r.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})),d.current=!1),Object.assign(f.current,{client:r,subscription:e,options:t})}),[r,e,t,d.current]),(0,I.useEffect)((function(){if(s){var e=s.subscribe({next:function(e){var n,o,a={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};i(a),(null===(n=f.current.options)||void 0===n?void 0:n.onData)?f.current.options.onData({client:r,data:a}):(null===(o=f.current.options)||void 0===o?void 0:o.onSubscriptionData)&&f.current.options.onSubscriptionData({client:r,subscriptionData:a})},error:function(e){var n,r;i({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables}),null===(r=null===(n=f.current.options)||void 0===n?void 0:n.onError)||void 0===r||r.call(n,e)},complete:function(){var e,t;(null===(e=f.current.options)||void 0===e?void 0:e.onComplete)?f.current.options.onComplete():(null===(t=f.current.options)||void 0===t?void 0:t.onSubscriptionComplete)&&f.current.options.onSubscriptionComplete()}});return function(){e.unsubscribe()}}}),[s]),a}(e.subscription,e);return e.children&&t?e.children(t):null}function ke(e,t){void 0===t&&(t={});var n=k(e),r=t.options,o=void 0===r?ve:r,a=t.skip,i=void 0===a?ye:a,l=t.alias,u=void 0===l?"Apollo":l,s=t.shouldResubscribe,c=o;"function"!=typeof c&&(c=function(){return o});var d,f=i;return"function"!=typeof f&&(f=function(){return i}),function(r){var o="".concat(u,"(").concat(be(r),")"),a=function(a){function i(e){var t=a.call(this,e)||this;return t.state={resubscribe:!1},t}return D(i,a),i.prototype.updateResubscribe=function(e){this.setState({resubscribe:e})},i.prototype.componentDidUpdate=function(e){var t=!(!s||!s(e,this.props));this.state.resubscribe!==t&&this.updateResubscribe(t)},i.prototype.render=function(){var a=this,i=this.props,l=f(i),u=l?Object.create(null):c(i);return!l&&!u.variables&&n.variables.length>0&&(u.variables=ge(n,i)),I.createElement(Te,j({},u,{displayName:o,skip:l,subscription:e,shouldResubscribe:this.state.resubscribe}),(function(e){var n,o,u=e.data,s=C(e,["data"]);if(t.withRef&&(a.withRef=!0,i=Object.assign({},i,{ref:a.setWrappedInstance})),l)return I.createElement(r,j({},i,{}));var c=Object.assign(s,u||{}),f=t.name||"data",p=((n={})[f]=c,n);if(t.props){var m=((o={})[f]=c,o.ownProps=i,o);p=d=t.props(m,d)}return I.createElement(r,j({},i,p))}))},i.displayName=o,i.WrappedComponent=r,i}(Ee);return A(a,r,{})}}function Pe(e,t){switch(void 0===t&&(t={}),k(e).type){case O.Mutation:return we(e,t);case O.Subscription:return ke(e,t);case O.Query:default:return _e(e,t)}}Oe.propTypes={mutation:R.object.isRequired,variables:R.object,optimisticResponse:R.oneOfType([R.object,R.func]),refetchQueries:R.oneOfType([R.arrayOf(R.oneOfType([R.string,R.object])),R.func]),awaitRefetchQueries:R.bool,update:R.func,children:R.func.isRequired,onCompleted:R.func,onError:R.func,fetchPolicy:R.string},Te.propTypes={subscription:R.object.isRequired,variables:R.object,children:R.func,onSubscriptionData:R.func,onData:R.func,onSubscriptionComplete:R.func,onComplete:R.func,shouldResubscribe:R.oneOfType([R.func,R.bool])};var Se=function(e){var t=oe();return I.createElement(t.Consumer,null,(function(t){return __DEV__?u(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an .'):u(t&&t.client,27),e.children(t.client)}))};function De(e,t){void 0===t&&(t={});var n="withApollo(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),r=function(r){function o(e){var t=r.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return D(o,r),o.prototype.getWrappedInstance=function(){return __DEV__?u(t.withRef,"To access the wrapped instance, you need to specify { withRef: true } in the options"):u(t.withRef,30),this.wrappedInstance},o.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},o.prototype.render=function(){var n=this;return I.createElement(Se,null,(function(r){var o=Object.assign({},n.props,{client:r,ref:t.withRef?n.setWrappedInstance:void 0});return I.createElement(e,j({},o))}))},o.displayName=n,o.WrappedComponent=e,o}(I.Component);return A(r,e,{})}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&r&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},o.d(a,i),a},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(7489),o(7274)}(); \ No newline at end of file +`;t.mutation=o;const l={props:e=>{let{mutate:t,ownProps:{actions:n}}=e;return{actions:{...n,revertToVersion:(e,n,r,a)=>t({variables:{id:e,fromVersion:n,fromStage:r,toStage:a}})}}},options:{refetchQueries:["ReadHistoryViewerBlock"]}};t.config=l;var i=(0,a.graphql)(o,l);t.default=i},5407:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementType=void 0;var r,a=(r=n(7086))&&r.__esModule?r:{default:r};const o=a.default.shape({id:a.default.string.isRequired,title:a.default.string,blockSchema:a.default.object,inlineEditable:a.default.bool,published:a.default.bool,liveVersion:a.default.bool,version:a.default.number});t.elementType=o},7286:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementTypeType=void 0;var r,a=(r=n(7086))&&r.__esModule?r:{default:r};const o=a.default.shape({name:a.default.string,title:a.default.string,icon:a.default.string,inlineEditable:a.default.bool,editTabs:a.default.arrayOf(a.default.shape({title:a.default.string,name:a.default.string})),config:a.default.object});t.elementTypeType=o},573:function(e,t,n){n.r(t),n.d(t,{createSelector:function(){return d},createSelectorCreator:function(){return i},createStructuredSelector:function(){return u},defaultEqualityCheck:function(){return a},defaultMemoize:function(){return o}});var r="NOT_FOUND";var a=function(e,t){return e===t};function o(e,t){var n,o,l="object"==typeof t?t:{equalityCheck:t},i=l.equalityCheck,d=void 0===i?a:i,u=l.maxSize,s=void 0===u?1:u,c=l.resultEqualityCheck,f=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,a=0;a-1){var o=n[a];return a>0&&(n.splice(a,1),n.unshift(o)),o.value}return r}return{get:a,put:function(t,o){a(t)===r&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(s,f);function m(){var t=p.get(arguments);if(t===r){if(t=e.apply(null,arguments),c){var n=p.getEntries(),a=n.find((function(e){return c(e.value,t)}));a&&(t=a.value)}p.put(arguments,t)}return t}return m.clearCache=function(){return p.clear()},m}function l(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r