!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:60,"react-dom":"react-dom","react-redux":19}],3:[function(require,module,exports){"uses
$(".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&&(isColla
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("style",origStyle);varstyles=newContentEl.find("style").detach();styles.length&&$(document).find("head").append(styles),contentEl.replaceWith(new
return!1},enqueueCallback:function(publicInstance,callback){},enqueueForceUpdate:function(publicInstance){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance,completeState){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance,partialState){warnNoop(publicInstance,"setState")}});module.exports=ReactNoopUpdateQueue},{"fbjs/lib/warning":58}],41:[function(require,module,exports){"use strict";varReactPropTypeLocationNames={};module.exports=ReactPropTypeLocationNames},{}],42:[function(require,module,exports){"use strict";varkeyMirror=require("fbjs/lib/keyMirror"),ReactPropTypeLocations=keyMirror({prop:null,context:null,childContext:null});module.exports=ReactPropTypeLocations},{"fbjs/lib/keyMirror":56}],43:[function(require,module,exports){"use strict";functionis(x,y){returnx===y?0!==x||1/x===1/y:x!==x&&y!==y}functionPropTypeError(message){this.message=message,this.stack=""}functioncreateChainableTypeChecker(validate){functioncheckType(isRequired,props,propName,componentName,location,propFullName,secret){componentName=componentName||ANONYMOUS,propFullName=propFullName||propName;if(null==props[propName]){varlocationName=ReactPropTypeLocationNames[location];returnisRequired?newPropTypeError("Required "+locationName+" `"+propFullName+"` was not specified in "+("`"+componentName+"`.")):null}returnvalidate(props,propName,componentName,location,propFullName)}varchainedCheckType=checkType.bind(null,!1);returnchainedCheckType.isRequired=checkType.bind(null,!0),chainedCheckType}functioncreatePrimitiveTypeChecker(expectedType){functionvalidate(props,propName,componentName,location,propFullName,secret){varpropValue=props[propName],propType=getPropType(propValue);if(propType!==expectedType){varlocationName=ReactPropTypeLocationNames[location],preciseType=getPreciseType(propValue);returnnewPropTypeError("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+preciseType+"` supplied to `"+componentName+"`, expected ")+("`"+expectedType+"`."))}returnnull}returncreateChainableTypeChecker(validate)}functioncreateAnyTypeChecker(){returncreateChainableTypeChecker(emptyFunction.thatReturns(null))}functioncreateArrayOfTypeChecker(typeChecker){functionvalidate(props,propName,componentName,location,propFullName){if("function"!=typeoftypeChecker)returnnewPropTypeError("Property `"+propFullName+"` of component `"+componentName+"` has invalid PropType notation inside arrayOf.");varpropValue=props[propName];if(!Array.isArray(propValue)){varlocationName=ReactPropTypeLocationNames[location],propType=getPropType(propValue);returnnewPropTypeError("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an array."))}for(vari=0;i<propValue.length;i++){varerror=typeChecker(propValue,i,componentName,location,propFullName+"["+i+"]",ReactPropTypesSecret);if(errorinstanceofError)returnerror}returnnull}returncreateChainableTypeChecker(validate)}functioncreateElementTypeChecker(){functionvalidate(props,propName,componentName,location,propFullName){varpropValue=props[propName];if(!ReactElement.isValidElement(propValue)){varlocationName=ReactPropTypeLocationNames[location],propType=getPropType(propValue);returnnewPropTypeError("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected a single ReactElement."))}returnnull}returncreateChainableTypeChecker(validate)}functioncreateInstanceTypeChecker(expectedClass){functionvalidate(props,propName,componentName,location,propFullName){if(!(props[propName]instanceofexpectedClass)){varlocationName=ReactPropTypeLocationNames[location],expectedClassName=expectedClass.name||ANONYMOUS,actualClassName=getClassName(props[propName]);returnnewPropTypeError("Invalid "+locationName+" `"+propFullName+"` of type "+("`"+actualClassName+"` supplied to `"+componentName+"`, expected ")+("instance of `"+expectedClassName+"`."))}returnnull}returncreateChainableTypeChecker(validate)}functioncreateEnumTypeChecker(exp