text: !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n("./client/src/boot/registerComponents.js"),a=r(o),i=n("./client/src/boot/registerTransforms.js"),l=r(i);window.document.addEventListener("DOMContentLoaded",function(){(0,a.default)(),(0,l.default)()})},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=r(o),i=n("./client/src/components/ElementEditor/Element.js"),l=r(i),u=n("./client/src/components/ElementEditor/ElementActions.js"),c=r(u),s=n("./client/src/components/ElementEditor/ElementEditor.js"),d=r(s),f=n("./client/src/components/ElementEditor/ElementList.js"),p=r(f),m=n("./client/src/components/ElementEditor/Toolbar.js"),y=r(m),b=n("./client/src/components/ElementEditor/AddNewButton.js"),g=r(b),v=n("./client/src/components/ElementEditor/Header.js"),h=r(v),E=n("./client/src/components/ElementEditor/Content.js"),_=r(E),O=n("./client/src/components/ElementEditor/Summary.js"),T=r(O),j=n("./client/src/components/ElementEditor/InlineEditForm.js"),I=r(j),w=n("./client/src/components/ElementEditor/AddElementPopover.js"),D=r(w),k=n("./client/src/components/ElementEditor/HoverBar.js"),S=r(k),P=n("./client/src/components/ElementEditor/DragPositionIndicator.js"),A=r(P),C=n("./client/src/components/TextCheckboxGroupField/TextCheckboxGroupField.js"),N=r(C);t.default=function(){a.default.component.registerMany({ElementEditor:d.default,ElementToolbar:y.default,ElementAddNewButton:g.default,ElementList:p.default,Element:l.default,ElementActions:c.default,ElementHeader:h.default,ElementContent:_.default,ElementSummary:T.default,ElementInlineEditForm:I.default,AddElementPopover:D.default,HoverBar:S.default,DragPositionIndicator:A.default,TextCheckboxGroupField:N.default})}},"./client/src/boot/registerTransforms.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=r(o),i=n("./client/src/state/history/readOneBlockQuery.js"),l=r(i),u=n("./client/src/components/HistoricElementView/HistoricElementView.js"),c=r(u),s=n("./client/src/state/history/revertToBlockVersionMutation.js"),d=r(s),f=n("./client/src/state/editor/readBlocksForAreaQuery.js"),p=r(f),m=n("./client/src/state/editor/addElementMutation.js"),y=r(m),b=n("./client/src/components/ElementActions/ArchiveAction.js"),g=r(b),v=n("./client/src/components/ElementActions/PublishAction.js"),h=r(v),E=n("./client/src/components/ElementActions/SaveAction.js"),_=r(E),O=n("./client/src/components/ElementActions/UnpublishAction.js"),T=r(O);t.default=function(){a.default.transform("elemental-fieldgroup",function(e){e.component("FieldGroup.HistoryViewer.VersionDetail",c.default,"HistoricElement")},{after:"field-holders"}),a.default.transform("elements-history",function(e){e.component("HistoryViewer.Form_ItemEditForm",l.default,"ElementHistoryViewer")}),a.default.transform("blocks-history-revert",function(e){e.component("HistoryViewerToolbar.VersionedAdmin.HistoryViewer.Element.HistoryViewerVersionDetail",d.default,"BlockRevertMutation")}),a.default.transform("cms-element-editor",function(e){e.component("ElementList",p.default,"PageElements")}),a.default.transform("cms-element-adder",function(e){e.component("AddElementPopover",y.default,"ElementAddButton")}),a.default.transform("element-actions",function(e){e.component("ElementActions",_.default,"ElementActionsWithSave"),e.component("ElementActions",h.default,"ElementActionsWithPublish"),e.component("ElementActions",T.default,"ElementActionsWithUnpublish"),e.component("ElementActions",g.default,"ElementActionsWithArchive")})}},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./client/src/legacy/ElementEditor/entwine.js"),n("./client/src/boot/index.js")},"./client/src/components/ElementActions/AbstractAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),i=r(a),l=n(1),u=r(l),c=n(7),s=r(c),d=n(10),f=n("./client/src/types/elementTypeType.js"),p=function(e){var t=e.className,n=e.title,r=o({className:(0,s.default)(t,"dropdown-item")},e);return i.default.createElement(d.DropdownItem,r,n)};p.propTypes={disabled:u.default.bool,className:u.default.string,onClick:u.default.func,title:u.default.string,name:u.default.string,type:f.elementTypeType,active:u.default.bool},p.defaultProps={disabled:!1},t.default=p},"./client/src/components/ElementActions/ArchiveAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(0),a=r(o),i=n(4),l=n("./client/src/components/ElementActions/AbstractAction.js"),u=r(l),c=n("./client/src/state/editor/archiveBlockMutation.js"),s=r(c),d=n(3),f=r(d),p=function(e){return function(t){var n=function(e){e.stopPropagation();var n=t.element.ID,r=t.isPublished,o=t.actions.handleArchiveBlock,a=f.default._t("ElementArchiveAction.CONFIRM_DELETE","Are you sure you want to send this block to the archive?");r&&(a=f.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(function(){var e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))})},r={title:f.default._t("ElementArchiveAction.ARCHIVE","Archive"),className:"element-editor__actions-archive",onClick:n,toggle:t.toggle};return a.default.createElement(e,t,t.children,a.default.createElement(u.default,r))}};t.Component=p,t.default=(0,i.compose)(s.default,p)},"./client/src/components/ElementActions/PublishAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=(0,h.loadElementFormStateName)(t.element.ID),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(function(e){return e.name==="element."+n})}}function a(e,t){var n=(0,h.loadElementFormStateName)(t.element.ID);return{reinitialiseForm:function(t){e((0,E.initialize)("element."+n,t))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var i=n(0),l=r(i),u=n(4),c=n("./client/src/components/ElementActions/AbstractAction.js"),s=r(c),d=n("./client/src/state/editor/publishBlockMutation.js"),f=r(d),p=n(3),m=r(p),y=n(13),b=r(y),g=n(8),v=n("./client/src/state/editor/loadElementSchemaValue.js"),h=n("./client/src/state/editor/loadElementFormStateName.js"),E=n(11),_=function(e,t,n){var r=m.default.inject(m.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:e}),o=m.default.inject(m.default._t("ElementPublishAction.SUCCESS_NOTIFICATION","Published '{title}' successfully"),{title:t||r}),a=m.default.inject(m.default._t("ElementPublishAction.ERROR_NOTIFICATION","Error publishing '{title}'"),{title:t||r});window.jQuery.noticeAdd({text:n?o:a,stay:!1,type:n?"success":"error"})},O=function(e,t,n){return b.default.createEndpointFetcher({url:(0,v.loadElementSchemaValue)("saveUrl",e),method:(0,v.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,v.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:n}})(t).then(function(){return window.ss.apolloClient.queryManager.reFetchObservableQueries()}).then(function(e){var t=window.jQuery(".cms-preview");return t.entwine("ss.preview")._loadUrl(t.find("iframe").attr("src")),e}).then(function(t){var n=t[0]&&t[0].data.readOneElementalArea.Elements.edges.find(function(t){return t.node.ID===e});return n&&n.node.Version})},T=function(e){return function(t){var n=t.element,r=t.formDirty,o=function(e){e.stopPropagation();var n=t.element,o=n.ID,a=n.Title,i=n.Version,l=t.type,u=t.securityId,c=t.formData,s=t.actions.handlePublishBlock,d=t.reinitialiseForm,f=new Promise(function(e){return e(i)});r&&(f=O(o,c,u).then(function(e){return d(c),e})),f.then(function(e){return s(o,"DRAFT","LIVE",e)}).then(function(){return _(l.title,a,!0)}).catch(function(){return _(l.title,a,!1)})},a={title:m.default._t("ElementPublishAction.PUBLISH","Publish"),className:"element-editor__actions-publish",onClick:o,toggle:t.toggle};return l.default.createElement(e,t,t.children,(r||!n.IsLiveVersion)&&l.default.createElement(s.default,a))}};t.Component=T,t.default=(0,u.compose)(f.default,(0,g.connect)(o,a),T)},"./client/src/components/ElementActions/SaveAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=(0,g.loadElementFormStateName)(t.element.ID),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 a(e,t){var n=(0,g.loadElementFormStateName)(t.element.ID);return{reinitialiseForm:function(t){e((0,v.initialize)("element."+n,t))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var i=n(0),l=r(i),u=n(4),c=n(8),s=n("./client/src/components/ElementActions/AbstractAction.js"),d=r(s),f=n(13),p=r(f),m=n(3),y=r(m),b=n("./client/src/state/editor/loadElementSchemaValue.js"),g=n("./client/src/state/editor/loadElementFormStateName.js"),v=n(11),h=function(e){return function(t){var n=function(e){e.stopPropagation();var n=t.element,r=t.type,o=t.securityId,a=t.formData,i=t.reinitialiseForm,l=window,u=l.jQuery,c=y.default.inject(y.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:r.title}),s={url:(0,b.loadElementSchemaValue)("saveUrl",n.ID),method:(0,b.loadElementSchemaValue)("saveMethod"),payloadFormat:(0,b.loadElementSchemaValue)("payloadFormat"),defaultData:{SecurityID:o}};p.default.createEndpointFetcher(s)(a).then(function(){window.ss.apolloClient.queryManager.reFetchObservableQueries(),i(a);var e=u(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"));var t=a?a["PageElements_"+n.ID+"_Title"]:null;u.noticeAdd({text:y.default.inject(y.default._t("ElementSaveAction.SUCCESS_NOTIFICATION","Saved '{title}' successfully"),{title:t||c}),stay:!1,type:"success"})}).catch(function(){u.noticeAdd({text:y.default.inject(y.default._t("ElementSaveAction.ERROR_NOTIFICATION","Error saving '{title}'"),{title:n.Title||c}),stay:!1,type:"error"})})},r={title:y.default._t("ElementSaveAction.SAVE","Save"),className:"element-editor__actions-save",onClick:n};return l.default.createElement(e,t,t.children,l.default.createElement(d.default,r))}};t.Component=h,t.default=(0,u.compose)((0,c.connect)(o,a),h)},"./client/src/components/ElementActions/UnpublishAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(0),a=r(o),i=n(4),l=n("./client/src/components/ElementActions/AbstractAction.js"),u=r(l),c=n("./client/src/state/editor/unpublishBlockMutation.js"),s=r(c),d=n(3),f=r(d),p=function(e){return function(t){var n=t.element,r=t.type,o=t.actions.handleUnpublishBlock,i=function(e){e.stopPropagation();var t=window,a=t.jQuery,i=f.default.inject(f.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:r.title});o&&o(n.ID).then(function(){var e=a(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src")),a.noticeAdd({text:f.default.inject(f.default._t("ElementUnpublishAction.SUCCESS_NOTIFICATION","Removed '{title}' from the published page"),{title:n.Title||i}),stay:!1,type:"success"})}).catch(function(){a.noticeAdd({text:f.default.inject(f.default._t("ElementUnpublishAction.ERROR_NOTIFICATION","Error unpublishing '{title}'"),{title:n.Title||i}),stay:!1,type:"error"})})},l={title:f.default._t("ElementUnpublishAction.UNPUBLISH","Unpublish"),className:"element-editor__actions-unpublish",onClick:i,toggle:t.toggle};return a.default.createElement(e,t,t.children,n.IsPublished&&a.default.createElement(u.default,l))}};t.Component=p,t.default=(0,i.compose)(s.default,p)},"./client/src/components/ElementEditor/AddElementPopover.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n(7),p=r(f),m=n(2),y=n("./client/src/types/elementTypeType.js"),b=n(3),g=r(b),v=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleToggle=n.handleToggle.bind(n),n}return i(t,e),l(t,[{key:"getElementButtonClickHandler",value:function(e){var t=this;return function(n){var r=t.props,o=r.actions.handleAddElementToArea,a=r.insertAfterElement;n.preventDefault(),o(e.class,a).then(function(){var e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}),t.handleToggle()}}},{key:"handleToggle",value:function(){(0,this.props.toggle)()}},{key:"render",value:function(){var e=this,t=this.props,n=t.PopoverOptionSetComponent,r=t.elementTypes,o=t.container,a=t.extraClass,i=t.isOpen,l=t.placement,u=t.target,s=(0,p.default)("element-editor-add-element",a),d=r.map(function(t){return{content:t.title,key:t.name,className:(0,p.default)(t.icon,"btn--icon-xl","element-editor-add-element__button"),onClick:e.getElementButtonClickHandler(t)}});return c.default.createElement(n,{buttons:d,searchPlaceholder:g.default._t("ElementAddElementPopover.SEARCH_BLOCKS","Search blocks"),extraClass:s,container:o,isOpen:i,placement:l,target:u,toggle:this.handleToggle})}}]),t}(u.Component);v.propTypes={container:d.default.oneOfType([d.default.string,d.default.func,d.default.object]),elementTypes:d.default.arrayOf(y.elementTypeType).isRequired,extraClass:d.default.oneOfType([d.default.string,d.default.array,d.default.object]),isOpen:d.default.bool.isRequired,placement:d.default.string,target:d.default.oneOfType([d.default.string,d.default.func,d.default.object]).isRequired,toggle:d.default.func.isRequired,areaId:d.default.number.isRequired,insertAfterElement:d.default.oneOfType([d.default.number,d.default.string])},t.default=(0,m.inject)(["PopoverOptionSet"],function(e){return{PopoverOptionSetComponent:e}},function(){return"ElementEditor"})(v)},"./client/src/components/ElementEditor/AddNewButton.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n(10),p=n(3),m=r(p),y=n("./client/src/types/elementTypeType.js"),b=n(2),g=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggle=n.toggle.bind(n),n.state={popoverOpen:!1},n}return i(t,e),l(t,[{key:"toggle",value:function(){this.setState({popoverOpen:!this.state.popoverOpen})}},{key:"render",value:function(){var e=this.props,t=e.AddElementPopoverComponent,n=e.elementTypes,r=e.areaId,o={id:"ElementalArea"+r+"_AddButton",color:"primary",onClick:this.toggle,className:"font-icon-plus"};return c.default.createElement("div",null,c.default.createElement(f.Button,o,m.default._t("ElementAddNewButton.ADD_BLOCK","Add block")),c.default.createElement(t,{placement:"bottom-start",target:o.id,isOpen:this.state.popoverOpen,elementTypes:n,toggle:this.toggle,areaId:r,insertAfterElement:0}))}}]),t}(u.Component);g.defaultProps={},g.propTypes={elementTypes:d.default.arrayOf(y.elementTypeType).isRequired,areaId:d.default.number.isRequired},t.Component=g,t.default=(0,b.inject)(["AddElementPopover"],function(e){return{AddElementPopoverComponent:e}},function(){return"ElementEditor.ElementList.AddNewButton"})(g)},"./client/src/components/ElementEditor/Content.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=(0,b.loadElementFormStateName)(t.id);return{formDirty:(0,g.isDirty)("element."+n,h.default)(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),d=n(1),f=r(d),p=n(2),m=n(4),y=n(8),b=n("./client/src/state/editor/loadElementFormStateName.js"),g=n(11),v=n(16),h=r(v),E=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.fileUrl,r=e.fileTitle,o=e.content,a=e.previewExpanded,i=e.InlineEditFormComponent,l=e.SummaryComponent,u=e.activeTab,c=e.onFormInit,d=e.handleLoadingError,f=e.formDirty;return s.default.createElement("div",{className:"element-editor-content"},!a&&s.default.createElement(l,{content:o,fileUrl:n,fileTitle:r}),a&&s.default.createElement(i,{extraClass:{"element-editor-editform--collapsed":!a},onClick:function(e){return e.stopPropagation()},elementId:t,activeTab:u,onFormInit:c,handleLoadingError:d}),f&&s.default.createElement("input",{type:"hidden",name:"change-tracker",className:"element-form-dirty-state",value:"1"}))}}]),t}(c.PureComponent);E.propTypes={id:f.default.string,content:f.default.string,fileUrl:f.default.string,fileTitle:f.default.string,previewExpanded:f.default.bool,SummaryComponent:f.default.oneOfType([f.default.node,f.default.func]),InlineEditFormComponent:f.default.oneOfType([f.default.node,f.default.func]),handleLoadingError:f.default.func},E.defaultProps={},t.Component=E,t.default=(0,m.compose)((0,p.inject)(["ElementSummary","ElementInlineEditForm"],function(e,t){return{SummaryComponent:e,InlineEditFormComponent:t}},function(){return"ElementEditor.ElementList.Element"}),(0,y.connect)(l))(E)},"./client/src/components/ElementEditor/DragPositionIndicator.js":function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"render",value:function(){return u.default.createElement("div",{className:"elemental-editor-drag-indicator"},u.default.createElement("div",{className:"elemental-editor-drag-indicator__ball"}))}}]),t}(l.PureComponent);t.default=c},"./client/src/components/ElementEditor/Element.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=t.element.ID,r=(0,T.loadElementFormStateName)(n),o=(0,j.loadElementSchemaValue)("schemaUrl",n),a=function(e){return"Tabs"===e.component},i=e.form&&e.form.formSchemas[o]&&e.form.formSchemas[o].schema&&e.form.formSchemas[o].schema.fields.find(a),l=i&&i.id,u="element."+r+"__"+l;return{tabSetName:l,activeTab:e.tabs&&e.tabs.fields&&e.tabs.fields[u]&&e.tabs.fields[u].activeTab}}function u(e,t){var n=(0,T.loadElementFormStateName)(t.element.ID);return{onActivateTab:function(t,r){e(w.activateTab("element."+n+"__"+t,r))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),d=r(s),f=n(1),p=r(f),m=n("./client/src/types/elementType.js"),y=n("./client/src/types/elementTypeType.js"),b=n(4),g=n(2),v=n(3),h=r(v),E=n(7),_=r(E),O=n(8),T=n("./client/src/state/editor/loadElementFormStateName.js"),j=n("./client/src/state/editor/loadElementSchemaValue.js"),I=n(19),w=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(I),D=n(9),k=n(14),S=n("./client/src/lib/dragHelpers.js"),P=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleKeyUp=n.handleKeyUp.bind(n),n.handleExpand=n.handleExpand.bind(n),n.handleLoadingError=n.handleLoadingError.bind(n),n.handleTabClick=n.handleTabClick.bind(n),n.updateFormTab=n.updateFormTab.bind(n),n.state={previewExpanded:!1,initialTab:"",loadingError:!1},n}return i(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this.props.connectDragPreview;e&&e((0,k.getEmptyImage)(),{captureDraggingState:!0})}},{key:"getVersionedStateClassName",value:function(){var e=this.props.element;return e.IsPublished?e.IsPublished&&!e.IsLiveVersion?"element-editor__element--modified":"element-editor__element--published":"element-editor__element--draft"}},{key:"handleLoadingError",value:function(){this.setState({loadingError:!0})}},{key:"updateFormTab",value:function(e){var t=this.props,n=t.tabSetName,r=t.onActivateTab,o=this.state.initialTab;o||this.setState({initialTab:e}),e||o?r(n,e||o):r(n,"Main")}},{key:"handleTabClick",value:function(e){var t=this.props.activeTab,n=this.state.loadingError;e===t||n||(this.setState({previewExpanded:!0}),this.updateFormTab(e))}},{key:"handleExpand",value:function(e){var t=this.props,n=t.type,r=t.link,o=this.state.loadingError;return"button"===e.target.type?void e.stopPropagation():n.inlineEditable&&!o?void this.setState({previewExpanded:!this.state.previewExpanded}):void(window.location=r)}},{key:"handleKeyUp",value:function(e){var t=e.target.nodeName;" "!==e.key&&"Enter"!==e.key||["input","textarea"].includes(t.toLowerCase())||this.handleExpand(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.element,r=t.type,o=t.areaId,a=t.HeaderComponent,i=t.ContentComponent,l=t.link,u=t.activeTab,c=t.connectDragSource,s=t.connectDropTarget,f=t.isDragging,p=t.isOver,m=t.onDragEnd,y=this.state.previewExpanded;if(!n.ID)return null;var b=h.default.inject(h.default._t("ElementalElement.TITLE","Edit this {type} block"),{type:r.title}),g=(0,_.default)("element-editor__element",{"element-editor__element--expandable":r.inlineEditable,"element-editor__element--dragging":f,"element-editor__element--dragged-over":p},this.getVersionedStateClassName()),v=s(d.default.createElement("div",{className:g,onClick:this.handleExpand,onKeyUp:this.handleKeyUp,role:"button",tabIndex:0,title:b,key:n.ID},d.default.createElement(a,{element:n,type:r,areaId:o,expandable:r.inlineEditable,link:l,previewExpanded:y,handleEditTabsClick:this.handleTabClick,activeTab:u,disableTooltip:f,onDragEnd:m}),d.default.createElement(i,{id:n.ID,fileUrl:n.BlockSchema.fileURL,fileTitle:n.BlockSchema.fileTitle,content:n.BlockSchema.content,previewExpanded:y&&!f,activeTab:u,onFormInit:function(){return e.updateFormTab(u)},handleLoadingError:this.handleLoadingError})));return y?v:c(v)}}]),t}(s.Component);P.propTypes={element:m.elementType,type:y.elementTypeType.isRequired,areaId:p.default.number.isRequired,link:p.default.string.isRequired,activeTab:p.default.string,tabSetName:p.default.string,onActivateTab:p.default.func,connectDragSource:p.default.func.isRequired,connectDragPreview:p.default.func.isRequired,connectDropTarget:p.default.func.isRequired,isDragging:p.default.bool.isRequired,isOver:p.default.bool.isRequired,onDragOver:p.default.func,onDragEnd:p.default.func,onDragStart:p.default.func},P.defaultProps={element:null},t.Component=P;var A={drop:function(e,t,n){return{target:e.element.ID,dropSpot:(0,S.isOverTop)(t,n)?"top":"bottom"}},hover:function(e,t,n){var r=e.element,o=e.onDragOver;o&&o(r,(0,S.isOverTop)(t,n))}};t.default=(0,b.compose)((0,D.DropTarget)("element",A,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}}),(0,D.DragSource)("element",S.elementDragSource,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}}),(0,O.connect)(l,u),(0,g.inject)(["ElementHeader","ElementContent"],function(e,t){return{HeaderComponent:e,ContentComponent:t}},function(){return"ElementEditor.ElementList.Element"}))(P)},"./client/src/components/ElementEditor/ElementActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n(4),p=n(10),m=n(2),y=n("./client/src/types/elementType.js"),b=n("./client/src/types/elementTypeType.js"),g=n("./client/src/components/ElementActions/AbstractAction.js"),v=r(g),h=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleEditTabsClick=n.handleEditTabsClick.bind(n),n}return i(t,e),l(t,[{key:"handleEditTabsClick",value:function(e){(0,this.props.handleEditTabsClick)(e.target.name)}},{key:"renderEditTabs",value:function(){var e=this,t=this.props,n=t.editTabs,r=t.activeTab,o=t.type;return n&&n.length?n.map(function(t){var n=t.name,a=t.title;return c.default.createElement(v.default,{key:n,name:n,title:a,type:o,onClick:e.handleEditTabsClick,active:n===r})}):null}},{key:"renderDivider",value:function(){var e=this.props,t=e.children,n=e.editTabs;return n&&n.length&&c.default.Children.count(t)?c.default.createElement(p.DropdownItem,{divider:!0,role:"separator"}):null}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.id,r=e.ActionMenuComponent,o=["element-editor-header__actions-toggle","btn","btn-sm","btn--no-text","font-icon-dot-3"];return c.default.createElement(r,{id:"element-editor-actions-"+n,className:"element-editor-header__actions-dropdown",dropdownMenuProps:{right:!0},dropdownToggleClassNames:o},this.renderEditTabs(),this.renderDivider(),t)}}]),t}(u.Component);h.propTypes={element:y.elementType,type:b.elementTypeType.isRequired,areaId:d.default.number.isRequired,activeTab:d.default.string,editTabs:d.default.arrayOf(d.default.shape({title:d.default.string,name:d.default.string})),handleEditTabsClick:d.default.func.isRequired},h.defaultProps={editTabs:[]},t.Component=h,t.default=(0,f.compose)((0,m.inject)(["ActionMenu"],function(e){return{ActionMenuComponent:e}},function(){return"ElementEditor.ElementList.Element"}))(h)},"./client/src/components/ElementEditor/ElementDragPreview.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n("./client/src/components/ElementEditor/Header.js"),p=r(f),m=n(9),y=n("./client/src/types/elementType.js"),b=n("./client/src/types/elementTypeType.js"),g=n("./client/src/state/editor/elementConfig.js"),v=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.isDragging,n=e.element,r=e.elementTypes,o=e.currentOffset;if(!t||!o)return null;var a=o.x,i=o.y,l="translate("+a+"px, "+i+"px)",u={transform:l,WebkitTransform:l},s=(0,g.getElementTypeConfig)(n.BlockSchema.typeName,r);return c.default.createElement("div",{className:"element-editor-drag-preview",style:u},c.default.createElement(p.default,{element:n,type:s,simple:!0}))}}]),t}(u.Component);v.propTypes={element:y.elementType,elementTypes:d.default.arrayOf(b.elementTypeType),isDragging:d.default.bool,currentOffset:d.default.shape({x:d.default.number.isRequired,y:d.default.number.isRequired})},t.default=(0,m.DragLayer)(function(e){return{element:e.getItem(),currentOffset:e.getSourceClientOffset(),isDragging:e.isDragging()}})(v)},"./client/src/components/ElementEditor/ElementEditor.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=(0,h.loadElementFormStateName)("[0-9]+"),n=e.form.formState.element;return n?{formState:Object.keys(n).filter(function(e){return e.match(t)}).reduce(function(e,t){return c({},e,o({},t,n[t].values))},{})}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),f=r(d),p=n(1),m=r(p),y=n(2),b=n(4),g=n("./client/src/types/elementTypeType.js"),v=n(8),h=n("./client/src/state/editor/loadElementFormStateName.js"),E=n(9),_=n("./client/src/state/editor/sortBlockMutation.js"),O=r(_),T=n("./client/src/components/ElementEditor/ElementDragPreview.js"),j=r(T),I=n(21),w=r(I),D=function(e){function t(e){a(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={dragTargetElementId:null,dragSpot:null},n.handleDragOver=n.handleDragOver.bind(n),n.handleDragEnd=n.handleDragEnd.bind(n),n}return l(t,e),s(t,[{key:"handleDragOver",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=!!e&&e.ID;this.setState({dragTargetElementId:n,dragSpot:!1===t?"bottom":"top"})}},{key:"handleDragEnd",value:function(e,t){var n=this.props;(0,n.actions.handleSortBlock)(e,t,n.areaId).then(function(){var e=window.jQuery(".cms-preview");e.entwine("ss.preview")._loadUrl(e.find("iframe").attr("src"))}),this.setState({dragTargetElementId:null,dragSpot:null})}},{key:"render",value:function(){var e=this.props,t=e.fieldName,n=e.formState,r=e.ToolbarComponent,o=e.ListComponent,a=e.areaId,i=e.elementTypes,l=e.isDraggingOver,u=e.connectDropTarget,c=e.allowedElements,s=this.state,d=s.dragTargetElementId,p=s.dragSpot,m=c.map(function(e){return i.find(function(t){return t.class===e})});return u(f.default.createElement("div",{className:"element-editor"},f.default.createElement(r,{elementTypes:m,areaId:a,onDragOver:this.handleDragOver}),f.default.createElement(o,{allowedElementTypes:m,elementTypes:i,areaId:a,onDragOver:this.handleDragOver,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd,dragSpot:p,isDraggingOver:l,dragTargetElementId:d}),f.default.createElement(j.default,{elementTypes:i}),f.default.createElement("input",{name:t,type:"hidden",value:JSON.stringify(n)||"",className:"no-change-track"})))}}]),t}(d.PureComponent);D.propTypes={fieldName:m.default.string,elementTypes:m.default.arrayOf(g.elementTypeType).isRequired,allowedElements:m.default.arrayOf(m.default.string).isRequired,areaId:m.default.number.isRequired,actions:m.default.shape({handleSortBlock:m.default.func})},t.Component=D,t.default=(0,b.compose)(w.default,(0,E.DropTarget)("element",{},function(e,t){return{connectDropTarget:e.dropTarget(),isDraggingOver:t.isOver()}}),(0,v.connect)(u),(0,y.inject)(["ElementToolbar","ElementList"],function(e,t){return{ToolbarComponent:e,ListComponent:t}},function(){return"ElementEditor"}),O.default)(D)},"./client/src/components/ElementEditor/ElementList.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),d=n(1),f=r(d),p=n("./client/src/types/elementType.js"),m=n("./client/src/types/elementTypeType.js"),y=n(4),b=n(2),g=n(7),v=r(g),h=n(3),E=r(h),_=n(9),O=n("./client/src/lib/dragHelpers.js"),T=n("./client/src/state/editor/elementConfig.js"),j=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),u(t,[{key:"getDragIndicatorIndex",value:function(){var e=this.props,t=e.dragTargetElementId,n=e.draggedItem,r=e.blocks,o=e.dragSpot;return(0,O.getDragIndicatorIndex)(r.map(function(e){return e.ID}),t,n&&n.ID,o)}},{key:"renderBlocks",value:function(){var e=this.props,t=e.ElementComponent,n=e.HoverBarComponent,r=e.DragIndicatorComponent,o=e.blocks,a=e.allowedElementTypes,i=e.elementTypes,l=e.areaId,u=e.onDragEnd,c=e.onDragOver,d=e.onDragStart,f=e.isDraggingOver;if(!o)return null;if(o&&!o.length)return s.default.createElement("div",null,E.default._t("ElementList.ADD_BLOCKS","Add blocks to place your content"));var p=o.map(function(e){return s.default.createElement("div",{key:e.ID},s.default.createElement(t,{element:e,areaId:l,type:(0,T.getElementTypeConfig)(e.BlockSchema.typeName,i),link:e.BlockSchema.actions.edit,onDragOver:c,onDragEnd:u,onDragStart:d}),f||s.default.createElement(n,{areaId:l,elementId:e.ID,elementTypes:a}))});p=[s.default.createElement(n,{key:0,areaId:l,elementId:0,elementTypes:a})].concat(p);var m=this.getDragIndicatorIndex();return f&&null!==m&&p.splice(m,0,s.default.createElement(r,{key:"DropIndicator"})),p}},{key:"renderLoading",value:function(){var e=this.props,t=e.loading,n=e.LoadingComponent;return t?s.default.createElement(n,null):null}},{key:"render",value:function(){var e=this.props.blocks,t=(0,v.default)("elemental-editor-list",{"elemental-editor-list--empty":!e||!e.length});return this.props.connectDropTarget(s.default.createElement("div",{className:t},this.renderLoading(),this.renderBlocks()))}}]),t}(c.Component);j.propTypes={blocks:f.default.arrayOf(p.elementType),elementTypes:f.default.arrayOf(m.elementTypeType).isRequired,allowedElementTypes:f.default.arrayOf(m.elementTypeType).isRequired,loading:f.default.bool,areaId:f.default.number.isRequired,dragTargetElementId:f.default.oneOfType([f.default.string,f.default.bool]),onDragOver:f.default.func,onDragStart:f.default.func,onDragEnd:f.default.func},j.defaultProps={blocks:[],loading:!1},t.Component=j;var I={drop:function(e,t){var n=e.blocks,r=t.getDropResult();if(!r)return{};var o=(0,O.getDragIndicatorIndex)(n.map(function(e){return e.ID}),r.target,t.getItem(),r.dropSpot),a=n[o-1]?n[o-1].ID:"0";return l({},r,{dropAfterID:a})}};t.default=(0,y.compose)((0,_.DropTarget)("element",I,function(e,t){return{connectDropTarget:e.dropTarget(),draggedItem:t.getItem()}}),(0,b.inject)(["Element","Loading","HoverBar","DragPositionIndicator"],function(e,t,n,r){return{ElementComponent:e,LoadingComponent:t,HoverBarComponent:n,DragIndicatorComponent:r}},function(){return"ElementEditor.ElementList"}))(j)},"./client/src/components/ElementEditor/Header.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=(0,T.loadElementFormStateName)(t.element.ID);return{formDirty:(0,j.isDirty)("element."+n,D.default)(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),d=n(1),f=r(d),p=n(10),m=n("./client/src/types/elementType.js"),y=n("./client/src/types/elementTypeType.js"),b=n(4),g=n(8),v=n(2),h=n(3),E=r(h),_=n(7),O=r(_),T=n("./client/src/state/editor/loadElementFormStateName.js"),j=n(11),I=n(9),w=n(16),D=r(w),k=n("./client/src/lib/dragHelpers.js"),S=n(14),P=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggle=n.toggle.bind(n),n.state={tooltipOpen:!1},n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this.props.connectDragPreview;e&&e((0,S.getEmptyImage)(),{captureDraggingState:!0})}},{key:"componentDidUpdate",value:function(){var e=this.state.tooltipOpen,t=this.props.disableTooltip;e&&t&&this.setState({tooltipOpen:!1})}},{key:"toggle",value:function(){this.setState({tooltipOpen:!this.state.tooltipOpen})}},{key:"renderVersionedStateMessage",value:function(){var e=this.props,t=e.element,n=t.IsLiveVersion,r=t.IsPublished,o=e.formDirty;if(!o&&r&&n)return null;var a="",i=["element-editor-header__version-state"];return o?(a=E.default._t("ElementHeader.STATE_UNSAVED","Item has unsaved changes"),i.push("element-editor-header__version-state--unsaved")):r?n||(a=E.default._t("ElementHeader.STATE_MODIFIED","Item has unpublished changes"),i.push("element-editor-header__version-state--modified")):(a=E.default._t("ElementHeader.STATE_DRAFT","Item has not been published yet"),i.push("element-editor-header__version-state--draft")),s.default.createElement("span",{className:(0,O.default)(i),title:a})}},{key:"render",value:function(){var e=this.props,t=e.connectDragSource,n=e.element,r=e.type,o=e.areaId,a=e.previewExpanded,i=e.simple,l=e.disableTooltip,u=e.activeTab,c=e.expandable,d=e.ElementActionsComponent,f=e.handleEditTabsClick,m=E.default.inject(E.default._t("ElementHeader.NOTITLE","Untitled {type} block"),{type:r.title}),y=(0,O.default)({"element-editor-header__title":!0,"element-editor-header__title--none":!n.Title}),b=E.default._t("ElementHeader.EXPAND","Show editable fields"),g=(0,O.default)("element-editor-header",{"element-editor-header--simple":i}),v=(0,O.default)("element-editor-header__expand",{"font-icon-right-open-big":!c,"font-icon-up-open-big":c&&a,"font-icon-down-open-big":c&&!a}),h="element-icon-"+n.ID,_=s.default.createElement("div",{className:g},s.default.createElement("div",{className:"element-editor-header__drag-handle"},s.default.createElement("i",{className:"font-icon-drag-handle"})),s.default.createElement("div",{className:"element-editor-header__info"},s.default.createElement("div",{className:"element-editor-header__icon-container"},s.default.createElement("i",{className:r.icon,id:h}),this.renderVersionedStateMessage(),!i&&s.default.createElement(p.Tooltip,{placement:"top",isOpen:this.state.tooltipOpen&&!l,target:h,toggle:this.toggle},r.title)),s.default.createElement("h3",{className:y},n.Title||m)),!i&&s.default.createElement("div",{className:"element-editor-header__actions"},c&&s.default.createElement("div",{role:"none",onClick:function(e){return e.stopPropagation()}},s.default.createElement(d,{element:n,type:r,areaId:o,activeTab:u,editTabs:r.editTabs,handleEditTabsClick:f})),s.default.createElement("i",{className:v,title:b})));return a?t(_):_}}]),t}(c.Component);P.propTypes={element:m.elementType.isRequired,type:y.elementTypeType.isRequired,areaId:f.default.number,activeTab:f.default.string,simple:f.default.bool,ElementActionsComponent:f.default.oneOfType([f.default.node,f.default.func]),previewExpanded:f.default.bool,disableTooltip:f.default.bool,formDirty:f.default.bool,connectDragSource:f.default.func.isRequired,connectDragPreview:f.default.func.isRequired,onDragEnd:f.default.func},P.defaultProps={expandable:!0},t.Component=P,t.default=(0,b.compose)((0,I.DragSource)("element",k.elementDragSource,function(e){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}),(0,g.connect)(l),(0,v.inject)(["ElementActions"],function(e){return{ElementActionsComponent:e}},function(){return"ElementEditor.ElementList.Element"}))(P)},"./client/src/components/ElementEditor/HoverBar.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.AddElementPopoverComponent,n=e.elementTypes,r=e.elementId,o=e.areaId,a=e.popoverOpen,i=e.onToggle,l=E("-line")+" font-icon-plus-circled",u=h.default._t("ElementAddNewButton.ADD_BLOCK","Add block"),c={className:E("-area",{"-area--focus":a}),onClick:i,"aria-label":u,title:u,id:"AddBlockHoverBarArea_"+r};return d.default.createElement("div",{className:E(""),id:"AddBlockHoverBar_"+r},d.default.createElement("button",c,d.default.createElement("span",{className:E("-area-inner")},d.default.createElement("span",{className:l}))),d.default.createElement(t,{placement:"bottom",target:"AddBlockHoverBarArea_"+r,isOpen:a,elementTypes:n,toggle:i,container:"#AddBlockHoverBar_"+r,areaId:o,insertAfterElement:r}))}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),d=r(s),f=n(1),p=r(f),m=n("./client/src/lib/prefixClassNames.js"),y=r(m),b=n(2),g=n("./client/src/types/elementTypeType.js"),v=n(3),h=r(v),E=(0,y.default)("element-editor__hover-bar"),_=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.toggle=n.toggle.bind(n),n.state={popoverOpen:!1},n}return i(t,e),c(t,[{key:"toggle",value:function(){this.setState({popoverOpen:!this.state.popoverOpen})}},{key:"render",value:function(){var e=u({},this.state,this.props,{onToggle:this.toggle});return d.default.createElement(l,e)}}]),t}(s.Component);_.propTypes={elementTypes:p.default.arrayOf(g.elementTypeType).isRequired,elementId:p.default.oneOfType([p.default.string,p.default.number]).isRequired,areaId:p.default.oneOfType([p.default.number,p.default.string]).isRequired},t.Component=_,t.default=(0,b.inject)(["AddElementPopover"],function(e){return{AddElementPopoverComponent:e}},function(){return"ElementEditor.ElementList.HoverBar"})(_)},"./client/src/components/ElementEditor/InlineEditForm.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=(0,E.loadElementFormStateName)(t.elementId);return{formHasState:e.form.formState&&e.form.formState.element&&!!e.form.formState.element[n]}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),d=n(1),f=r(d),p=n(7),m=r(p),y=n(18),b=r(y),g=n("./client/src/state/editor/loadElementSchemaValue.js"),v=n(3),h=r(v),E=n("./client/src/state/editor/loadElementFormStateName.js"),_=n(8),O=function(e){function t(e){o(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleLoadingError=n.handleLoadingError.bind(n),n.state={loadingError:null},n}return i(t,e),u(t,[{key:"handleLoadingError",value:function(){var e=window,t=e.jQuery,n=this.props.handleLoadingError;this.setState({loadingError:!0}),t.noticeAdd({text:h.default.inject(h.default._t("ElementEditForm.ERROR_NOTIFICATION","Error displaying the edit form for this block")),stay:!0,type:"notice"}),n()}},{key:"render",value:function(){var e=this.props,t=e.elementId,n=e.extraClass,r=e.onClick,o=e.onFormInit,a=e.formHasState,i=this.state.loadingError,l=(0,m.default)("element-editor-editform",n),u=(0,g.loadElementSchemaValue)("schemaUrl",t),c={formTag:"div",schemaUrl:u,identifier:"element",refetchSchemaOnMount:!a,onLoadingError:this.handleLoadingError};return i&&(c.loading=!1),"function"==typeof o&&(c.onReduxFormInit=o),s.default.createElement("div",{className:l,onClick:r,role:"presentation"},s.default.createElement(b.default,c))}}]),t}(c.PureComponent);O.propTypes={extraClass:f.default.oneOfType([f.default.string,f.default.object]),onClick:f.default.func,elementId:f.default.string,handleLoadingError:f.default.func},t.default=(0,_.connect)(l)(O)},"./client/src/components/ElementEditor/Summary.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n(3),p=r(f),m=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.fileUrl,n=e.fileTitle,r=e.content,o=p.default._t("ElementSummary.NO_PREVIEW","No preview available");return c.default.createElement("div",{className:"element-editor-summary"},t&&c.default.createElement("img",{className:"element-editor-summary__thumbnail-image",src:t,alt:n}),(r||!t)&&c.default.createElement("p",{className:"element-editor-summary__content"},r||o))}}]),t}(u.PureComponent);m.defaultProps={},m.propTypes={content:d.default.string,fileUrl:d.default.string,fileTitle:d.default.string},t.default=m},"./client/src/components/ElementEditor/Toolbar.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(1),d=r(s),f=n(2),p=n("./client/src/types/elementTypeType.js"),m=n(9),y=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.AddNewButtonComponent,n=e.elementTypes,r=e.areaId;return(0,e.connectDropTarget)(c.default.createElement("div",{className:"element-editor__toolbar"},c.default.createElement(t,{elementTypes:n,areaId:r})))}}]),t}(u.PureComponent);y.defaultProps={},y.propTypes={elementTypes:d.default.arrayOf(p.elementTypeType).isRequired,areaId:d.default.number.isRequired,AddNewButtonComponent:d.default.oneOfType([d.default.node,d.default.func]).isRequired,connectDropTarget:d.default.func.isRequired,onDragOver:d.default.func,onDragDrop:d.default.func};var b={hover:function(e){var t=e.onDragOver;t&&t()}};t.default=(0,m.DropTarget)("element",b,function(e){return{connectDropTarget:e.dropTarget()}})((0,f.inject)(["ElementAddNewButton"],function(e){return{AddNewButtonComponent:e}},function(){return"ElementEditor.ElementToolbar"})(y))},"./client/src/components/HistoricElementView/HistoricElementView.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;return void 0!==i?i.call(r):void 0},c=n(0),s=r(c),d=n(3),f=r(d),p=n(7),m=r(p),y=function(e){return function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"getClassName",value:function(){var e=[u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getClassName",this).call(this)];return this.props.data.ElementID&&e.unshift("elemental-area__element--historic-inner"),(0,m.default)(e)}},{key:"render",value:function(){var e=this.getLegend(),n=this.props.data.tag||"div",r=this.getClassName(),o=this.props.data;return o.ElementID?s.default.createElement(n,{className:r},e,s.default.createElement("div",{className:"elemental-preview elemental-preview--historic"},o.ElementEditLink&&s.default.createElement("a",{className:"elemental-preview__link",href:o.ElementEditLink},s.default.createElement("span",{className:"elemental-preview__link-text"},f.default._t("HistoricElementView.VIEW_BLOCK_HISTORY","Block history")),s.default.createElement("i",{className:"font-icon-angle-right btn--icon-lg elemental-preview__link-caret"})),s.default.createElement("div",{className:"elemental-preview__icon"},s.default.createElement("i",{className:o.ElementIcon})),s.default.createElement("div",{className:"elemental-preview__detail"},s.default.createElement("h3",null,o.ElementTitle," ",s.default.createElement("small",null,o.ElementType)))),this.props.children):u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"render",this).call(this)}}]),t}(e)};t.default=y},"./client/src/components/TextCheckboxGroupField/TextCheckboxGroupField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),a=r(o),i=n(10),l=n(17),u=r(l),c=function(e){var t=e.children,n=a.default.Children.toArray(a.default.Children.map(t,function(t,n){var r={noHolder:!0};return 0===n&&(r.id=e.id),a.default.cloneElement(t,r)}));return e.readOnly?a.default.createElement("div",{className:"text-checkbox-group-field--read-only"},n):1===n.length?n[0]:a.default.createElement(i.InputGroup,{className:"text-checkbox-group-field"},n[0],a.default.createElement(i.InputGroupAddon,{addonType:"append"},a.default.createElement(i.InputGroupText,null,n[1])))};t.default=(0,u.default)(c)},"./client/src/legacy/ElementEditor/entwine.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a=n(20),i=r(a),l=n(0),u=r(l),c=n(15),s=r(c),d=n(2),f=n("./client/src/state/editor/elementConfig.js"),p=n(11),m=function(){window.ss.apolloClient.resetStore(),setTimeout(function(){var e=window.ss.store;e&&e.dispatch(p.destroy.apply(void 0,o(Object.keys(e.getState().form.formState.element||{}).map(function(e){return"element."+e}))))},0)};i.default.entwine("ss",function(e){e(".js-injector-boot .element-editor__container").entwine({onmatch:function(){var e={},t=(0,d.loadComponent)("ElementEditor",e),n=this.data("schema"),r=(0,f.getConfig)().elementTypes,o={fieldName:this.attr("name"),areaId:n["elemental-area-id"],allowedElements:n["allowed-elements"],elementTypes:r};s.default.render(u.default.createElement(t,o),this[0])},onunmatch:function(){m(),s.default.unmountComponentAtNode(this[0])},"from .cms-edit-form":{onaftersubmitform:function(){m()}}}),e(".js-injector-boot .element-editor__container .element-form-dirty-state").entwine({onmatch:function(){e(".cms-edit-form").trigger("change")},onunmatch:function(){e(".cms-edit-form").trigger("change")}}),e(".cms-edit-form").entwine({getChangeTrackerOptions:function(){var t=void 0===this.entwineData("ChangeTrackerOptions"),n=this._super();return t&&(n=e.extend({},n),n.ignoreFieldSelector+=", .elementalarea :input:not(.element-form-dirty-state)",this.setChangeTrackerOptions(n)),n}})})},"./client/src/lib/dragHelpers.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementDragSource=t.getDragIndicatorIndex=t.isOverTop=void 0;var r=n(15);t.isOverTop=function(e,t){var n=e.getClientOffset(),o=(0,r.findDOMNode)(t).getBoundingClientRect();return n.y<o.y+o.height/2},t.getDragIndicatorIndex=function(e,t,n,r){if(null===t||!n)return null;var o=t?e.findIndex(function(e){return e===t}):0,a=e.findIndex(function(e){return e===n});return"bottom"===r&&(o+=1),a===o||a+1===o?null:o},t.elementDragSource={beginDrag:function(e){return e.element},endDrag:function(e,t){var n=e.onDragEnd;n&&t.getDropResult()&&n(t.getItem().ID,t.getDropResult().dropAfterID)}}},"./client/src/lib/prefixClassNames.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(7),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=function(e){return function(){for(var t=arguments.length,n=Array(t),l=0;l<t;l++)n[l]=arguments[l];var c=function(t){return""+e+t},s=n.map(function(e){return!(!e&&""!==e)&&("object"===(void 0===e?"undefined":i(e))?Array.isArray(e)?e.map(c):Object.entries(e).reduce(function(e,t){var n=a(t,2),r=n[0],i=n[1];return Object.assign({},e,o({},c(r),i))},{}):c(e))});return u.default.apply(void 0,r(s))}};t.default=c},"./client/src/state/editor/addElementMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation AddElementToArea($className: String!, $elementalAreaID: ID!, $afterElementID: ID) {\n  addElementToArea(\n    ClassName: $className,\n    ElementalAreaID: $elementalAreaID,\n    AfterElementID: $afterElementID\n  ) {\n    ID\n  }\n}\n"],["\nmutation AddElementToArea($className: String!, $elementalAreaID: ID!, $afterElementID: ID) {\n  addElementToArea(\n    ClassName: $className,\n    ElementalAreaID: $elementalAreaID,\n    AfterElementID: $afterElementID\n  ) {\n    ID\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=n("./client/src/state/editor/readBlocksForAreaQuery.js"),c=(0,l.default)(o),s={props:function(e){var t=e.mutate,n=e.ownProps,o=n.actions,a=n.areaId;return{actions:r({},o,{handleAddElementToArea:function(e,n){return t({variables:{className:e,elementalAreaID:a,afterElementID:n}})}})}},options:function(e){var t=e.areaId;return{refetchQueries:[{query:u.query,variables:u.config.options({areaId:t}).variables}]}}};t.mutation=c,t.config=s,t.default=(0,a.graphql)(c,s)},"./client/src/state/editor/archiveBlockMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation ArchiveBlock($blockId: ID!) {\n  deleteBlock(IDs: [$blockId]) {\n    ID\n  }\n}\n"],["\nmutation ArchiveBlock($blockId: ID!) {\n  deleteBlock(IDs: [$blockId]) {\n    ID\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=n("./client/src/state/editor/readBlocksForAreaQuery.js"),c=(0,l.default)(o),s={props:function(e){var t=e.mutate,n=e.ownProps.actions;return{actions:r({},n,{handleArchiveBlock:function(e){return t({variables:{blockId:e}})}})}},options:function(e){var t=e.areaId;return{refetchQueries:[{query:u.query,variables:u.config.options({areaId:t}).variables}]}}};t.mutation=c,t.config=s,t.default=(0,a.graphql)(c,s)},"./client/src/state/editor/elementConfig.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementTypeConfig=t.getConfig=void 0;var r=n(12),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=t.getConfig=function(){return o.default.getSection("DNADesign\\Elemental\\Controllers\\ElementalAreaController")};t.getElementTypeConfig=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(Array.isArray(t)?t:a().elementTypes).find(function(t){return t.class===e||t.name===e})}},"./client/src/state/editor/loadElementFormStateName.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementFormStateName=void 0;var r=n(12),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.loadElementFormStateName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=o.default.getSection("DNADesign\\Elemental\\Controllers\\ElementalAreaController"),n=t.form.elementForm.formNameTemplate;return e?n.replace("{id}",e):n}},"./client/src/state/editor/loadElementSchemaValue.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadElementSchemaValue=void 0;var r=n(12),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.loadElementSchemaValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=o.default.getSection("DNADesign\\Elemental\\Controllers\\ElementalAreaController"),r=n.form.elementForm[e]||"";return t?r+"/"+t:r}},"./client/src/state/editor/publishBlockMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation PublishBlock($blockId:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) {\n  copyBlockToStage(Input: {\n    ID: $blockId\n    FromVersion: $fromVersion\n    FromStage: $fromStage\n    ToStage: $toStage\n  }) {\n    ID\n  }\n}\n"],["\nmutation PublishBlock($blockId:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) {\n  copyBlockToStage(Input: {\n    ID: $blockId\n    FromVersion: $fromVersion\n    FromStage: $fromStage\n    ToStage: $toStage\n  }) {\n    ID\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=n("./client/src/state/editor/readBlocksForAreaQuery.js"),c=(0,l.default)(o),s={props:function(e){var t=e.mutate,n=e.ownProps.actions;return{actions:r({},n,{handlePublishBlock:function(e,n,r,o){return t({variables:{blockId:e,fromStage:n,toStage:r,fromVersion:o}})}})}},options:function(e){var t=e.areaId;return{refetchQueries:[{query:u.query,variables:u.config.options({areaId:t}).variables}]}}};t.mutation=c,t.config=s,t.default=(0,a.graphql)(c,s)},"./client/src/state/editor/readBlocksForAreaQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.query=void 0;var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nquery ReadBlocksForArea($id:ID!) {\n  readOneElementalArea(ID: $id, Versioning: {\n    Mode: DRAFT\n  }){\n    Elements {\n      pageInfo {\n        totalCount\n      }\n      edges {\n        node {\n          ID\n          Title\n          BlockSchema\n          IsLiveVersion\n          IsPublished\n          Version\n        }\n      }\n    }\n  }\n}\n"],["\nquery ReadBlocksForArea($id:ID!) {\n  readOneElementalArea(ID: $id, Versioning: {\n    Mode: DRAFT\n  }){\n    Elements {\n      pageInfo {\n        totalCount\n      }\n      edges {\n        node {\n          ID\n          Title\n          BlockSchema\n          IsLiveVersion\n          IsPublished\n          Version\n        }\n      }\n    }\n  }\n}\n"]),o=n(6),a=n(5),i=function(e){return e&&e.__esModule?e:{default:e}}(a),l=(0,i.default)(r),u={options:function(e){return{variables:{id:e.areaId}}},props:function(e){var t=e.data,n=t.error,r=t.readOneElementalArea,o=t.loading,a=null;r&&(a=r.Elements.edges.map(function(e){return e.node}));var i=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:o||!a,blocks:a,graphQLErrors:i}}};t.query=l,t.config=u,t.default=(0,o.graphql)(l,u)},"./client/src/state/editor/sortBlockMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation SortBlockMutation($blockId:ID!, $afterBlockId:ID!) {\n  sortBlock(\n    ID: $blockId\n    AfterBlockID: $afterBlockId\n  ) {\n    ID\n    IsLiveVersion\n    IsPublished\n  }\n}\n"],["\nmutation SortBlockMutation($blockId:ID!, $afterBlockId:ID!) {\n  sortBlock(\n    ID: $blockId\n    AfterBlockID: $afterBlockId\n  ) {\n    ID\n    IsLiveVersion\n    IsPublished\n  }\n}\n"]),i=n(6),l=n(5),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n("./client/src/state/editor/readBlocksForAreaQuery.js"),s=(0,u.default)(a),d={props:function(e){var t=e.mutate,n=e.ownProps.actions;return{actions:r({},n,{handleSortBlock:function(e,n,r){return t({variables:{blockId:e,afterBlockId:n},optimisticResponse:{sortBlock:{ID:e,IsLiveVersion:!1,__typename:"Block"}},update:function(t,a){var i=a.data.sortBlock,l=c.config.options({areaId:r}).variables,u=t.readQuery({query:c.query,variables:l}),s=JSON.parse(JSON.stringify(u)),d=s.readOneElementalArea.Elements.edges,f=d.findIndex(function(t){return t.node.ID===e}),p=d[f];if(Object.entries(i).forEach(function(e){var t=o(e,2),n=t[0],r=t[1];"__typename"!==n&&(p[n]=r)}),d.splice(f,1),n){var m=d.findIndex(function(e){return e.node.ID===n}),y=d.slice(m+1);d=d.slice(0,m+1),d.push(p),d=d.concat(y)}else d.unshift(p);s.readOneElementalArea.Elements.edges=d,t.writeQuery({query:c.query,data:s,variables:l})}})}})}}};t.mutation=s,t.config=d,t.default=(0,i.graphql)(s,d)},"./client/src/state/editor/unpublishBlockMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation UnpublishBlock($blockId:ID!) {\n  unpublishBlock(\n    ID: $blockId\n      ) {\n    ID\n  }\n}\n"],["\nmutation UnpublishBlock($blockId:ID!) {\n  unpublishBlock(\n    ID: $blockId\n      ) {\n    ID\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=n("./client/src/state/editor/readBlocksForAreaQuery.js"),c=(0,l.default)(o),s={props:function(e){var t=e.mutate,n=e.ownProps.actions;return{actions:r({},n,{handleUnpublishBlock:function(e,n,r,o){return t({variables:{blockId:e,fromStage:n,toStage:r,fromVersion:o}})}})}},options:function(e){var t=e.areaId;return{refetchQueries:[{query:u.query,variables:u.config.options({areaId:t}).variables}]}}};t.mutation=c,t.config=s,t.default=(0,a.graphql)(c,s)},"./client/src/state/history/readOneBlockQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.query=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nquery ReadHistoryViewerBlock ($block_id: ID!, $limit: Int!, $offset: Int!) {\n  readOneBlock(\n    Versioning: {\n      Mode: LATEST\n    },\n    ID: $block_id\n  ) {\n    ID\n    Versions (limit: $limit, offset: $offset, sortBy: {\n      field: Version\n      direction: DESC\n    }) {\n      pageInfo {\n        totalCount\n      }\n      edges {\n        node {\n          Version\n          AbsoluteLink\n          Author {\n            FirstName\n            Surname\n          }\n          Publisher {\n            FirstName\n            Surname\n          }\n          Published\n          LiveVersion\n          LatestDraftVersion\n          LastEdited\n        }\n      }\n    }\n  }\n}\n"],["\nquery ReadHistoryViewerBlock ($block_id: ID!, $limit: Int!, $offset: Int!) {\n  readOneBlock(\n    Versioning: {\n      Mode: LATEST\n    },\n    ID: $block_id\n  ) {\n    ID\n    Versions (limit: $limit, offset: $offset, sortBy: {\n      field: Version\n      direction: DESC\n    }) {\n      pageInfo {\n        totalCount\n      }\n      edges {\n        node {\n          Version\n          AbsoluteLink\n          Author {\n            FirstName\n            Surname\n          }\n          Publisher {\n            FirstName\n            Surname\n          }\n          Published\n          LiveVersion\n          LatestDraftVersion\n          LastEdited\n        }\n      }\n    }\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=(0,l.default)(o),c={options:function(e){var t=e.recordId,n=e.limit;return{variables:{limit:n,offset:((e.page||1)-1)*n,block_id:t}}},props:function(e){var t=e.data,n=t.error,o=t.refetch,a=t.readOneBlock,i=t.loading,l=e.ownProps,u=l.actions,c=void 0===u?{versions:{}}:u,s=l.limit,d=l.recordId,f=a||null,p=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:i||!f,versions:f,graphQLErrors:p,actions:r({},c,{versions:r({},f,{goToPage:function(e){o({offset:((e||1)-1)*s,limit:s,block_id:d})}})})}}};t.query=u,t.config=c,t.default=(0,a.graphql)(u,c)},"./client/src/state/history/revertToBlockVersionMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\nmutation revertBlockToVersion($id:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) {\n  copyBlockToStage(Input: {\n    ID: $id\n    FromVersion: $fromVersion\n    FromStage: $fromStage\n    ToStage: $toStage\n  }) {\n    ID\n  }\n}\n"],["\nmutation revertBlockToVersion($id:ID!, $fromStage:VersionedStage!, $toStage:VersionedStage!, $fromVersion:Int!) {\n  copyBlockToStage(Input: {\n    ID: $id\n    FromVersion: $fromVersion\n    FromStage: $fromStage\n    ToStage: $toStage\n  }) {\n    ID\n  }\n}\n"]),a=n(6),i=n(5),l=function(e){return e&&e.__esModule?e:{default:e}}(i),u=(0,l.default)(o),c={props:function(e){var t=e.mutate,n=e.ownProps.actions;return{actions:r({},n,{revertToVersion:function(e,n,r,o){return t({variables:{id:e,fromVersion:n,fromStage:r,toStage:o}})}})}},options:{refetchQueries:["ReadHistoryViewerBlock"]}};t.mutation=u,t.config=c,t.default=(0,a.graphql)(u,c)},"./client/src/types/elementType.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementType=void 0;var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.shape({ID:o.default.string.isRequired,Title:o.default.string,BlockSchema:o.default.object,InlineEditable:o.default.bool,IsPublished:o.default.bool,IsLiveVersion:o.default.bool,Version:o.default.number});t.elementType=a},"./client/src/types/elementTypeType.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementTypeType=void 0;var r=n(1),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.shape({name:o.default.string,title:o.default.string,icon:o.default.string,inlineEditable:o.default.boolean,editTabs:o.default.arrayOf(o.default.shape({title:o.default.string,name:o.default.string})),config:o.default.object});t.elementTypeType=a},0:function(e,t){e.exports=React},1:function(e,t){e.exports=PropTypes},10:function(e,t){e.exports=Reactstrap},11:function(e,t){e.exports=ReduxForm},12:function(e,t){e.exports=Config},13:function(e,t){e.exports=Backend},14:function(e,t){e.exports=ReactDNDHtml5Backend},15:function(e,t){e.exports=ReactDom},16:function(e,t){e.exports=getFormState},17:function(e,t){e.exports=FieldHolder},18:function(e,t){e.exports=FormBuilderLoader},19:function(e,t){e.exports=TabsActions},2:function(e,t){e.exports=Injector},20:function(e,t){e.exports=jQuery},21:function(e,t){e.exports=withDragDropContext},3:function(e,t){e.exports=i18n},4:function(e,t){e.exports=Redux},5:function(e,t){e.exports=GraphQLTag},6:function(e,t){e.exports=ReactApollo},7:function(e,t){e.exports=classnames},8:function(e,t){e.exports=ReactRedux},9:function(e,t){e.exports=ReactDND}});