!functione(t,n,r){functions(o,u){if(!n[o]){if(!t[o]){vara="function"==typeofrequire&&require;if(!u&&a)returna(o,!0);if(i)returni(o,!0);varf=newError("Cannot find module '"+o+"'");throwf.code="MODULE_NOT_FOUND",f}varl=n[o]={exports:{}};t[o][0].call(l.exports,function(e){varn=t[o][1][e];returns(n?n:e)},l,l.exports,e,t,n,r)}returnn[o].exports}for(vari="function"==typeofrequire&&require,o=0;o<r.length;o++)s(r[o]);returns}({1:[function(require,module,exports){"use strict";require("../legacy/LeftAndMain.Layout.js"),require("../legacy/LeftAndMain.js"),require("../legacy/LeftAndMain.ActionTabSet.js"),require("../legacy/LeftAndMain.Panel.js"),require("../legacy/LeftAndMain.Tree.js"),require("../legacy/LeftAndMain.Content.js"),require("../legacy/LeftAndMain.EditForm.js"),require("../legacy/LeftAndMain.Menu.js"),require("../legacy/LeftAndMain.Preview.js"),require("../legacy/LeftAndMain.BatchActions.js"),require("../legacy/LeftAndMain.FieldHelp.js"),require("../legacy/LeftAndMain.FieldDescriptionToggle.js"),require("../legacy/LeftAndMain.TreeDropdownField.js"),require("../legacy/AddToCampaignForm.js")},{"../legacy/AddToCampaignForm.js":2,"../legacy/LeftAndMain.ActionTabSet.js":3,"../legacy/LeftAndMain.BatchActions.js":4,"../legacy/LeftAndMain.Content.js":5,"../legacy/LeftAndMain.EditForm.js":6,"../legacy/LeftAndMain.FieldDescriptionToggle.js":7,"../legacy/LeftAndMain.FieldHelp.js":8,"../legacy/LeftAndMain.Layout.js":9,"../legacy/LeftAndMain.Menu.js":10,"../legacy/LeftAndMain.Panel.js":11,"../legacy/LeftAndMain.Preview.js":12,"../legacy/LeftAndMain.Tree.js":13,"../legacy/LeftAndMain.TreeDropdownField.js":14,"../legacy/LeftAndMain.js":15}],2:[function(require,module,exports){"use strict";function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{"default":obj}}var_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_reactRedux=require("react-redux"),_FormBuilderModal=require("components/FormBuilderModal/FormBuilderModal"),_FormBuilderModal2=_interopRequireDefault(_FormBuilderModal);_jQuery2["default"].entwine("ss",function($){$(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function(){vardialog=$("#add-to-campaign__dialog-wrapper");returndialog.length||(dialog=$('<div id="add-to-campaign__dialog-wrapper" />'),$("body").append(dialog)),dialog.open(),!1}}),$("#add-to-campaign__dialog-wrapper").entwine({open:function(){this._renderModal()},close:function(){this._clearModal()},_renderModal:function(){var_this=this,handleHide=function(){return_this._clearModal()},handleSubmit=function(){return_this._handleSubmitModal.apply(_this,arguments)},id=$("form.cms-edit-form :input[name=ID]").val(),store=window.ss.store,sectionConfig=store.getState().config.sections["SilverStripe\\CMS\\Controllers\\CMSPageEditController"],modalSchemaUrl=sectionConfig.form.AddToCampaignForm.schemaUrl+"/"+id;_reactDom2["default"].render(_react2["default"].createElement(_reactRedux.Provider,{store:store},_react2["default"].createElement(_FormBuilderModal2["default"],{show:!0,handleSubmit:handleSubmit,handleHide:handleHide,schemaUrl:modalSchemaUrl,bodyClassName:"add-to-campaign__dialog",responseClassBad:"add-to-campaign__response add-to-campaign__response--error",responseClassGood:"add-to-campaign__response add-to-campaign__response--good"})),this[0])},_clearModal:function(){_reactDom2["default"].unmountComponentAtNode(this[0])},_handleSubmitModal:function(event,fieldValues,submitFn){returnevent.preventDefault(),fieldValues.Campaign?submitFn():(alert(_i18n2["default"]._t("AddToCampaigns.ErrorCampaignNotSelected","There was no campaign selected to be added to")),null)}})})},{"components/FormBuilderModal/FormBuilderModal":"components/FormBuilderModal/FormBuilderModal",i18n:"i18n",jQuery:"jQuery",react:184,"react-dom":"react-dom","react-redux":19}],3:[function(require,module,exports){"use
}),$(".cms-menu-list .toggle").entwine({onclick:function(e){e.preventDefault(),$(this).toogleFlyout(!0)}}),$(".cms-menu-list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){varparent=this.getMenuItem();parent&&parent.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){varparent=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),parent){varparentSiblings=parent.siblings();parent.addClass("current"),parentSiblings.removeClass("current").close(),parentSiblings.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),$(".cms-menu-list *").entwine({getMenu:function(){returnthis.parents(".cms-menu-list:first")}}),$(".cms-menu-list li *").entwine({getMenuItem:function(){returnthis.parents("li:first")}}),$(".cms-menu-list li a").entwine({onclick:function(e){varisExternal=$.path.isExternal(this.attr("href"));if(!(e.which>1||isExternal)&&"_blank"!=this.attr("target")){e.preventDefault();varitem=this.getMenuItem(),url=this.attr("href");isExternal||(url=$("base").attr("href")+url);varchildren=item.find("li");children.length?children.first().find("a").click():document.location.href=url,item.select()}}}),$(".cms-menu-list li .toggle-children").entwine({onclick:function(e){varli=this.closest("li");returnli.toggle(),!1}}),$(".cms .profile-link").entwine({onclick:function(){return$(".cms-container").loadPanel(this.attr("href")),$(".cms-menu-list li").removeClass("current").close(),!1}}),$(".cms-menu .sticky-toggle").entwine({onadd:function(){varisSticky=!!$(".cms-menu").getPersistedStickyState();this.toggleCSS(isSticky),this.toggleIndicator(isSticky),this._super()},toggleCSS:function(isSticky){this[isSticky?"addClass":"removeClass"]("active")},toggleIndicator:function(isSticky){this.next(".sticky-status-indicator").text(isSticky?"fixed":"auto")},onclick:function(){var$menu=this.closest(".cms-menu"),persistedCollapsedState=$menu.getPersistedCollapsedState(),persistedStickyState=$menu.getPersistedStickyState(),newStickyState=void0===persistedStickyState?!this.hasClass("active"):!persistedStickyState;void0===persistedCollapsedState?$menu.setPersistedCollapsedState($menu.hasClass("collapsed")):void0!==persistedCollapsedState&&newStickyState===!1&&$menu.clearPersistedCollapsedState(),$menu.setPersistedStickyState(newStickyState),this.toggleCSS(newStickyState),this.toggleIndicator(newStickyState),this._super()}})})},{jQuery:"jQuery"}],11:[function(require,module,exports){"use strict";function_interopRequireDefault(obj){returnobj&&obj.__esModule?obj:{"default":obj}}var_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$.entwine.warningLevel=$.entwine.WARN_LEVEL_BESTPRACTISE,$(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){returnvoid0!==$.cookie&&void0!==this.attr("id")},getPersistedCollapsedState:function(){varisCollapsed,cookieValue;returnthis.canSetCookie()&&(cookieValue=$.cookie("cms-panel-collapsed-"+this.attr("id")),void0!==cookieValue&&null!==cookieValue&&(isCollapsed="true"===cookieValue)),isCollapsed},setPersistedCollapsedState:function(newState){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),newState,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){varisCollapsed=this.getPersistedCollapsedState();returnvoid0===isCollapsed&&(isCo
varself=this,fragments=historyState.pjax||"Content",headers={},fragmentsArr=fragments.split(","),contentEls=this._findFragments(fragmentsArr);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){varlastState=this.getLastState();returnthis.setPauseState(!0),lastState&&lastState.path?window.ss.router.show(lastState.path):window.ss.router.back(),voidthis.setPauseState(!1)}if(this.setLastState(historyState),contentEls.length<fragmentsArr.length&&(fragments="Content",fragmentsArr=["Content"],contentEls=this._findFragments(fragmentsArr)),this.trigger("beforestatechange",{state:historyState,element:contentEls}),headers["X-Pjax"]=fragments,"undefined"!=typeofhistoryState.__forceReferer){varurl=historyState.__forceReferer;try{url=decodeURI(url)}catch(e){}finally{headers["X-Backurl"]=encodeURI(url)}}contentEls.addClass("loading");varpromise=$.ajax({headers:headers,url:historyState.path||document.URL}).done(function(data,status,xhr){varels=self.handleAjaxResponse(data,status,xhr,historyState);self.trigger("afterstatechange",{data:data,status:status,xhr:xhr,element:els,state:historyState})}).always(function(){self.setStateChangeXHR(null),contentEls.removeClass("loading")});returnthis.setStateChangeXHR(promise),promise}},loadFragment:function(url,pjaxFragments){varxhr,self=this,headers={},baseUrl=$("base").attr("href"),fragmentXHR=this.getFragmentXHR();return"undefined"!=typeoffragmentXHR[pjaxFragments]&&null!==fragmentXHR[pjaxFragments]&&(fragmentXHR[pjaxFragments].abort(),fragmentXHR[pjaxFragments]=null),url=$.path.isAbsoluteUrl(url)?url:$.path.makeUrlAbsolute(url,baseUrl),headers["X-Pjax"]=pjaxFragments,xhr=$.ajax({headers:headers,url:url,success:function(data,status,xhr){varelements=self.handleAjaxResponse(data,status,xhr,null);self.trigger("afterloadfragment",{data:data,status:status,xhr:xhr,elements:elements})},error:function(xhr,status,_error){self.trigger("loadfragmenterror",{xhr:xhr,status:status,error:_error})},complete:function(){varfragmentXHR=self.getFragmentXHR();"undefined"!=typeoffragmentXHR[pjaxFragments]&&null!==fragmentXHR[pjaxFragments]&&(fragmentXHR[pjaxFragments]=null)}}),fragmentXHR[pjaxFragments]=xhr,xhr},handleAjaxResponse:function(data,status,xhr,state){varurl,guessFragment,fragment,$data;if(xhr.getResponseHeader("X-Reload")&&xhr.getResponseHeader("X-ControllerURL")){varbaseUrl=$("base").attr("href"),rawURL=xhr.getResponseHeader("X-ControllerURL"),url=$.path.isAbsoluteUrl(rawURL)?rawURL:$.path.makeUrlAbsolute(rawURL,baseUrl);returnvoid(document.location.href=url)}if(data){vartitle=xhr.getResponseHeader("X-Title");title&&(document.title=decodeURIComponent(title.replace(/\+/g," ")));varnewContentEls,newFragments={};xhr.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?newFragments=data:(fragment=document.createDocumentFragment(),jQuery.clean([data],document,fragment,[]),$data=$(jQuery.merge([],fragment.childNodes)),guessFragment="Content",$data.is("form")&&!$data.is("[data-pjax-fragment~=Content]")&&(guessFragment="CurrentForm"),newFragments[guessFragment]=$data),this.setRedrawSuppression(!0);try{$.each(newFragments,function(newFragment,html){varcontentEl=$("[data-pjax-fragment]").filter(function(){return-1!=$.inArray(newFragment,$(this).data("pjaxFragment").split(" "))}),newContentEl=$(html);if(newContentEls?newContentEls.add(newContentEl):newContentEls=newContentEl,newContentEl.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';varorigStyle=contentEl.attr("style"),origParent=contentEl.parent(),origParentLayoutApplied="undefined"!=typeoforigParent.data("jlayout"),layoutClasses=["east","west","center","north","south","column-hidden"],elemClasses=contentEl.attr("class"),origLayoutClasses=[];elemClasses&&(origLayoutClasses=$.grep(elemClasses.split(" "),function(val){return$.inArray(val,layoutClasses)>=0})),newContentEl.removeClass(layoutClasses.join(" ")).addClass(origLayoutClasses.join(" ")),origStyle&&newContentEl.attr("st
}}varBeforeInputEventPlugin=require("./BeforeInputEventPlugin"),ChangeEventPlugin=require("./ChangeEventPlugin"),ClientReactRootIndex=require("./ClientReactRootIndex"),DefaultEventPluginOrder=require("./DefaultEventPluginOrder"),EnterLeaveEventPlugin=require("./EnterLeaveEventPlugin"),ExecutionEnvironment=require("fbjs/lib/ExecutionEnvironment"),HTMLDOMPropertyConfig=require("./HTMLDOMPropertyConfig"),ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin"),ReactComponentBrowserEnvironment=require("./ReactComponentBrowserEnvironment"),ReactDefaultBatchingStrategy=require("./ReactDefaultBatchingStrategy"),ReactDOMComponent=require("./ReactDOMComponent"),ReactDOMTextComponent=require("./ReactDOMTextComponent"),ReactEventListener=require("./ReactEventListener"),ReactInjection=require("./ReactInjection"),ReactInstanceHandles=require("./ReactInstanceHandles"),ReactMount=require("./ReactMount"),ReactReconcileTransaction=require("./ReactReconcileTransaction"),SelectEventPlugin=require("./SelectEventPlugin"),ServerReactRootIndex=require("./ServerReactRootIndex"),SimpleEventPlugin=require("./SimpleEventPlugin"),SVGDOMPropertyConfig=require("./SVGDOMPropertyConfig"),alreadyInjected=!1;module.exports={inject:inject}},{"./BeforeInputEventPlugin":30,"./ChangeEventPlugin":34,"./ClientReactRootIndex":35,"./DefaultEventPluginOrder":40,"./EnterLeaveEventPlugin":41,"./HTMLDOMPropertyConfig":48,"./ReactBrowserComponentMixin":53,"./ReactComponentBrowserEnvironment":59,"./ReactDOMComponent":65,"./ReactDOMTextComponent":74,"./ReactDefaultBatchingStrategy":76,"./ReactDefaultPerf":78,"./ReactEventListener":86,"./ReactInjection":87,"./ReactInstanceHandles":89,"./ReactMount":93,"./ReactReconcileTransaction":103,"./SVGDOMPropertyConfig":113,"./SelectEventPlugin":114,"./ServerReactRootIndex":115,"./SimpleEventPlugin":116,"fbjs/lib/ExecutionEnvironment":158}],78:[function(require,module,exports){"use strict";functionroundFloat(val){returnMath.floor(100*val)/100}functionaddValue(obj,key,val){obj[key]=(obj[key]||0)+val}varDOMProperty=require("./DOMProperty"),ReactDefaultPerfAnalysis=require("./ReactDefaultPerfAnalysis"),ReactMount=require("./ReactMount"),ReactPerf=require("./ReactPerf"),performanceNow=require("fbjs/lib/performanceNow"),ReactDefaultPerf={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){ReactDefaultPerf._injected||ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure),ReactDefaultPerf._allMeasurements.length=0,ReactPerf.enableMeasure=!0},stop:function(){ReactPerf.enableMeasure=!1},getLastMeasurements:function(){returnReactDefaultPerf._allMeasurements},printExclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;varsummary=ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);console.table(summary.map(function(item){return{"Component class name":item.componentName,"Total inclusive time (ms)":roundFloat(item.inclusive),"Exclusive mount time (ms)":roundFloat(item.exclusive),"Exclusive render time (ms)":roundFloat(item.render),"Mount time per instance (ms)":roundFloat(item.exclusive/item.count),"Render time per instance (ms)":roundFloat(item.render/item.count),Instances:item.count}}))},printInclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;varsummary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);console.table(summary.map(function(item){return{"Owner > component":item.componentName,"Inclusive time (ms)":roundFloat(item.time),Instances:item.count}})),console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(measurements){varsummary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements,!0);returnsummary.map(function(item){return{"Owner > component":item.componentName,"Wasted time (ms)":item.time,Instances:item.count}})},printWasted:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements,console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements)),console.log("Total time:",ReactDefaultPerf