Preview panel as its own component, file preview styles, no preview message.

Improved layout reusability
Moved layout styles to its own stylesheet
Added scrollable panels
This commit is contained in:
Paul Clarke 2016-04-18 16:48:07 +12:00 committed by Ingo Schommer
parent 4d43664057
commit 6cd5bf2f3f
16 changed files with 210 additions and 168 deletions

View File

@ -1,3 +1,3 @@
!function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(){h["default"].add("config",v["default"]),h["default"].add("schemas",E["default"]),h["default"].add("records",w["default"]),h["default"].add("campaign",C["default"]);var e={},t=(0,c.combineReducers)(h["default"].getAll()),r=(0,c.applyMiddleware)(l["default"],(0,p["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(m.setConfig(window.ss.config))}var a=e("jQuery"),s=o(a),c=e("redux"),u=e("redux-thunk"),l=o(u),f=e("redux-logger"),p=o(f),d=e("reducer-register"),h=o(d),y=e("state/config/actions"),m=n(y),b=e("state/config/reducer"),v=o(b),g=e("state/schema/reducer"),E=o(g),_=e("state/records/reducer"),w=o(_),O=e("state/campaign/reducer"),C=o(O),T=e("sections/campaign-admin/index");o(T);(0,s["default"])("body").entwine({onadd:function(){return i()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":31,"redux-thunk":"redux-thunk","sections/campaign-admin/index":7,"state/campaign/reducer":14,"state/config/actions":16,"state/config/reducer":17,"state/records/reducer":20,"state/schema/reducer":22}],2:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l);e("bootstrap-collapse");var p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",r="#"+t,n={id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e};return u["default"].createElement("div",{className:"accordion-group"},u["default"].createElement("h6",{className:"accordion-group__title",role:"tab",id:e},u["default"].createElement("a",{"data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t},this.props.title)),u["default"].createElement("div",n,this.props.children))},t}(f["default"]);r["default"]=p},{"bootstrap-collapse":"bootstrap-collapse",react:"react","silverstripe-component":"silverstripe-component"}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{role:"tablist","aria-multiselectable":"true"},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],4:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e="list-group-item "+this.props.className;return u["default"].createElement("a",{tabIndex:"0",className:e},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item"},u["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},u["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text))]}))},t}(f["default"]);p.propTypes={crumbs:u["default"].PropTypes.array},r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],6:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c(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):i(e,t))}function u(e,t){return{config:e.config,sectionConfig:e.config.sections[t.sectionConfigKey],campaignId:e.campaign.campaignId,view:e.campaign.view}}function l(e){return{actions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),y=e("react-redux"),m=e("silverstripe-backend"),b=o(m),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/form-action/index"),O=o(w),C=e("i18n"),T=o(C),j=e("components/north-header/index"),S=o(j),R=e("components/form-builder/index"),P=o(R),A=e("./list"),x=o(A),D=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.addCampaign=n.addCampaign.bind(n),n.createFn=n.createFn.bind(n),n.publishApi=b["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.config.SecurityID},payloadSchema:{id:{urlReplacement:":id",remove:!0}}}),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var r=!0,n=window.ss.router.resolveURLToBase(this.props.sectionConfig.campaignViewRoute);window.ss.router(n,function(e,n){r?t.props.actions.showCampaignView(e.params.id,e.params.view):n()}),window.ss.router.exit(n,function(e,t){var o=window.ss.router.routeAppliesToCurrentLocation(n);o||(r=!1),t()})},t.prototype.render=function(){var e=null;switch(this.props.view){case"show":e=this.renderItemListView();break;case"edit":e=this.renderDetailEditView();break;default:e=this.renderIndexView()}return e},t.prototype.renderIndexView=function(){var e=this.props.sectionConfig.forms.editForm.schemaUrl;return d["default"].createElement("div",{className:"cms-middle no-preview"},d["default"].createElement("div",{className:"cms-campaigns collapse in","aria-expanded":"true"},d["default"].createElement(S["default"],null,d["default"].createElement("h2",{className:"text-truncate north-header__heading"},"Campaigns")),d["default"].createElement("div",{className:"cms-middle__scrollable"},d["default"].createElement("div",{className:"content-toolbar"},d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(O["default"],{label:T["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign}))),d["default"].createElement(P["default"],{schemaUrl:e,createFn:this.createFn}))))},t.prototype.renderItemListView=function(){var e={campaignId:this.props.campaignId,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,breadcrumbs:this.getBreadcrumbs()};return d["default"].createElement(x["default"],e)},t.prototype.renderDetailEditView=function(){return d["default"].createElement("p",null,"Edit")},t.prototype.createFn=function(e,t){var r=this.props.sectionConfig.campaignViewRoute;if("GridField"===t.component){var n=f({},t,{data:f({},t.data,{handleDrillDown:function(e,t){var n=r.replace(/:type\?/,"set").replace(/:id\?/,t.ID).replace(/:view\?/,"show");window.ss.router.show(n)}})});return d["default"].createElement(e,f({key:n.name},n))}return d["default"].createElement(e,f({key:t.name},t))},t.prototype.getBreadcrumbs=function(){return[{text:"Campaigns",href:"admin/campaigns"},{text:"March release",href:"admin/campaigns/show/1"}]},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.addCampaign=function(){},t}(_["default"]);D.propTypes={sectionConfig:d["default"].PropTypes.shape({forms:d["default"].PropTypes.shape({editForm:d["default"].PropTypes.shape({schemaUrl:d["default"].PropTypes.string})})}),config:d["default"].PropTypes.shape({SecurityID:d["default"].PropTypes.string}),sectionConfigKey:d["default"].PropTypes.string.isRequired},r["default"]=(0,y.connect)(u,l)(D)},{"./list":9,"components/form-action/index":"components/form-action/index","components/form-builder/index":"components/form-builder/index","components/north-header/index":"components/north-header/index",i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-backend":"silverstripe-backend","silverstripe-component":"silverstripe-component","state/campaign/actions":13}],7:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("jQuery"),i=n(o),a=e("react"),s=n(a),c=e("react-dom"),u=n(c),l=e("react-redux"),f=e("./controller"),p=n(f);i["default"].entwine("ss",function(e){e(".cms-content.CampaignAdmin").entwine({onadd:function(){u["default"].render(s["default"].createElement(l.Provider,{store:window.store},s["default"].createElement(p["default"],{sectionConfigKey:"CampaignAdmin"})),this[0])},onremove:function(){u["default"].unmountComponentAtNode(this[0])}})})},{"./controller":6,jQuery:"jQuery",react:"react","react-dom":"react-dom","react-redux":"react-redux"}],8:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=e("i18n"),d=n(p),h=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=null,t={},r=this.props.item,n=this.props.campaign;if("open"===n.State)switch(r.ChangeType){case"created":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.DRAFT","Draft");break;case"modified":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.MODIFIED","Modified");break;case"deleted":t.className="label label-error list-group-item__status",t.Title=d["default"]._t("CampaignItem.REMOVED","Removed");break;case"none":default:t.className="label label-success list-group-item__status",t.Title=d["default"]._t("CampaignItem.NO_CHANGES","No changes")}var o=u["default"].createElement("span",{className:"list-group-item--has-links"},u["default"].createElement("i",{className:"font-icon-link"}),"3 linked items");return r.Thumbnail&&(e=u["default"].createElement("span",{className:"list-group-item__thumbnail"},u["default"].createElement("img",{src:r.Thumbnail}))),u["default"].createElement("div",null,e,u["default"].createElement("h4",{className:"list-group-item__heading"},r.Title),u["default"].createElement("span",{className:"list-group-item--is-linked"},u["default"].createElement("i",{className:"font-icon-link"})),o,t.className&&t.Title&&u["default"].createElement("span",{className:t.className},t.Title))},t}(f["default"]);h.propTypes={campaign:u["default"].PropTypes.object.isRequired,item:u["default"].PropTypes.object.isRequired},r["default"]=h},{i18n:"i18n",react:"react","silverstripe-component":"silverstripe-component"}],9:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c(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):i(e,t))}function u(e,t){var r=null;return e.records&&e.records.ChangeSet&&t.campaignId&&(r=e.records.ChangeSet[parseInt(t.campaignId,10)]),{record:r||{},campaign:e.campaign}}function l(e){return{recordActions:(0,h.bindActionCreators)(b,e),campaignActions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),y=e("react-redux"),m=e("state/records/actions"),b=n(m),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/accordion/index"),O=o(w),C=e("components/accordion/group"),T=o(C),j=e("components/accordion/item"),S=o(j),R=e("components/north-header/index"),P=o(R),A=e("components/form-action/index"),x=o(A),D=e("./item"),I=o(D),N=e("components/breadcrumb/index"),F=o(N),U=e("./preview"),L=o(U),M=e("i18n"),H=o(M),k=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.handlePublish=n.handlePublish.bind(n),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this.props.itemListViewEndpoint.replace(/:id/,this.props.campaignId);e.prototype.componentDidMount.call(this),this.props.recordActions.fetchRecord("ChangeSet","get",t)},t.prototype.render=function(){var e=this,t=1,r=this.props.campaignId,n=this.props.record,o=this.previewURLForItem(t),i=this.groupItemsForSet(),a=o?"cms-middle with-preview":"cms-middle no-preview",s=[];return Object.keys(i).forEach(function(t){var o=i[t],a=o.items.length,c=[],u=a+" "+(1===a?o.singular:o.plural),l="Set_"+r+"_Group_"+t;o.items.forEach(function(t){var r="";"none"!==t.ChangeType&&"published"!==n.State||(r="list-group-item--published"),c.push(d["default"].createElement(S["default"],{key:t.ID,className:r},d["default"].createElement(I["default"],{item:t,campaign:e.props.record})))}),s.push(d["default"].createElement(T["default"],{key:l,groupid:l,title:u},c))}),d["default"].createElement("div",{className:a},d["default"].createElement("div",{className:"cms-campaigns collapse in","aria-expanded":"true"},d["default"].createElement(P["default"],null,d["default"].createElement(F["default"],{crumbs:this.props.breadcrumbs,multiline:!0})),d["default"].createElement("div",{className:"col-md-12 campaign-items"},d["default"].createElement(O["default"],null,s)),d["default"].createElement("div",{className:"cms-south-actions"},this.renderButtonToolbar())),o&&d["default"].createElement(L["default"],{previewUrl:o}))},t.prototype.renderButtonToolbar=function(){var e=this.getItems();if(!e)return d["default"].createElement("div",{className:"btn-toolbar"});var t={};return"open"===this.props.record.State?t=f(t,{label:H["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"success",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"}):"published"===this.props.record.State&&(t=f(t,{label:H["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(x["default"],t))},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.getItems=function(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.ChangeSetItems:null},t.prototype.groupItemsForSet=function(){var e={},t=this.getItems();return t?(t.forEach(function(t){var r=t.BaseClass;e[r]||(e[r]={singular:t.Singular,plural:t.Plural,items:[]}),e[r].items.push(t)}),e):e},t.prototype.handlePublish=function(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.campaignId)},t}(_["default"]);k.propTypes={campaign:d["default"].PropTypes.shape({isPublishing:d["default"].PropTypes.bool.isRequired}),campaignActions:d["default"].PropTypes.object.isRequired,publishApi:d["default"].PropTypes.func.isRequired,record:d["default"].PropTypes.object.isRequired,recordActions:d["default"].PropTypes.object.isRequired},r["default"]=(0,y.connect)(u,l)(k)},{"./item":8,"./preview":10,"components/accordion/group":2,"components/accordion/index":3,"components/accordion/item":4,"components/breadcrumb/index":5,"components/form-action/index":"components/form-action/index","components/north-header/index":"components/north-header/index",i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/campaign/actions":13,"state/records/actions":19}],10:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{className:"pages-preview"},u["default"].createElement("iframe",{src:this.props.previewUrl}))},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],11:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=void 0,r=void 0;if(!(e.status>=200&&e.status<300))throw r=new Error(e.statusText),r.response=e,r;return t=e}Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=e("isomorphic-fetch"),u=n(c),l=e("es6-promise"),f=n(l),p=e("qs"),d=n(p),h=e("merge"),y=n(h);f["default"].polyfill();var m=function(){function e(){i(this,e),this.fetch=u["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return d["default"].stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function r(e,t){switch(e){case"application/x-www-form-urlencoded":return d["default"].parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function n(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function i(e){return e.text().then(function(t){return r(e.headers.get("Content-Type"),t)})}function a(e,t){return Object.keys(t).reduce(function(r,n){var i=e[n];return!i||i.remove!==!0&&i.querystring!==!0?s(r,o({},n,t[n])):r},{})}function c(e,r,i){var a=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],c=r,u=Object.keys(i).reduce(function(t,r){var n=e[r],c=a.setFromData===!0&&!(n&&n.remove===!0),u=n&&n.querystring===!0&&n.remove!==!0;return c||u?s(t,o({},r,i[r])):t},{});return c=n(c,t("application/x-www-form-urlencoded",u)),c=Object.keys(e).reduce(function(t,r){var n=e[r].urlReplacement;return n?t.replace(n,i[r]):t},c)}var u=this,l=s({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),f={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){f[l[e]]&&(l[e]=f[l[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r={Accept:l.responseFormat,"Content-Type":l.payloadFormat},n=y["default"].recursive({},l.defaultData,e),o=c(l.payloadSchema,l.url,n,{setFromData:"get"===l.method.toLowerCase()}),s=t(l.payloadFormat,a(l.payloadSchema,n)),f="get"===l.method.toLowerCase()?[o,r]:[o,s,r];return u[l.method].apply(u,f).then(i)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(a)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:s({},n,r),credentials:"same-origin",body:t}).then(a)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:r}).then(a)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:r}).then(a)},e}(),b=new m;r["default"]=b},{"es6-promise":24,"isomorphic-fetch":25,merge:26,qs:27}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},{}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return{type:s["default"].SET_CAMPAIGN_ACTIVE_CHANGESET,payload:{campaignId:e,view:t}}}function i(e,t){return function(r){r({type:s["default"].PUBLISH_CAMPAIGN_REQUEST,payload:{campaignId:t}}),e({id:t}).then(function(e){r({type:s["default"].PUBLISH_CAMPAIGN_SUCCESS,payload:{campaignId:t}}),r({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:"ChangeSet",data:e}})})["catch"](function(e){r({type:s["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.showCampaignView=o,r.publishCampaign=i;var a=e("./action-types"),s=n(a),c=e("state/records/action-types"),u=n(c)},{"./action-types":12,"state/records/action-types":18}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?l:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s["default"])(i({},e,{campaignId:t.payload.campaignId,view:t.payload.view}));case u["default"].PUBLISH_CAMPAIGN_REQUEST:return(0,s["default"])(i({},e,{isPublishing:!0}));case u["default"].PUBLISH_CAMPAIGN_SUCCESS:case u["default"].PUBLISH_CAMPAIGN_FAILURE:return(0,s["default"])(i({},e,{isPublishing:!1}));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c),l={campaignId:null,isPublishing:!1,view:null};r["default"]=o},{"./action-types":12,"deep-freeze":"deep-freeze"}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CONFIG:"SET_CONFIG"}},{}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:a["default"].SET_CONFIG,payload:{config:e}}}Object.defineProperty(r,"__esModule",{value:!0}),r.setConfig=o;var i=e("./action-types"),a=n(i)},{"./action-types":15}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CONFIG:return(0,s["default"])(i({},e,t.payload.config));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c);r["default"]=o},{"./action-types":15,"deep-freeze":"deep-freeze"}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={CREATE_RECORD:"CREATE_RECORD",UPDATE_RECORD:"UPDATE_RECORD",DELETE_RECORD:"DELETE_RECORD",FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},{}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=["id"];return r.reduce(function(e,r){return e.replace(":"+r,t[r])},e)}function i(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORDS_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORDS_FAILURE,payload:{error:r,recordType:e}})})}}function a(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORD_REQUEST,
payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORD_FAILURE,payload:{error:r,recordType:e}})})}}function s(e,t,r,n){var i={recordType:e,id:t};return function(a){return a({type:u["default"].DELETE_RECORD_REQUEST,payload:i}),f["default"][r.toLowerCase()](o(n,i)).then(function(){a({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(r){a({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchRecords=i,r.fetchRecord=a,r.deleteRecord=s;var c=e("./action-types"),u=n(c),l=e("silverstripe-backend.js"),f=n(l)},{"./action-types":18,"silverstripe-backend.js":11}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments[1],r=void 0,n=void 0,i=void 0;switch(t.type){case l["default"].CREATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].UPDATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].DELETE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].FETCH_RECORDS_REQUEST:return e;case l["default"].FETCH_RECORDS_FAILURE:return e;case l["default"].FETCH_RECORDS_SUCCESS:return n=t.payload.recordType,r=t.payload.data._embedded[n+"s"]||{},r=r.reduce(function(e,t){return a({},e,o({},t.id,t))},{}),(0,c["default"])(a({},e,o({},n,r)));case l["default"].FETCH_RECORD_REQUEST:return e;case l["default"].FETCH_RECORD_FAILURE:return e;case l["default"].FETCH_RECORD_SUCCESS:return n=t.payload.recordType,i=t.payload.data,(0,c["default"])(a({},e,o({},n,a({},e[n],o({},i.ID,i)))));case l["default"].DELETE_RECORD_REQUEST:return e;case l["default"].DELETE_RECORD_FAILURE:return e;case l["default"].DELETE_RECORD_SUCCESS:return n=t.payload.recordType,r=e[n],r=Object.keys(r).reduce(function(e,n){return parseInt(n,10)!==parseInt(t.payload.id,10)?a({},e,o({},n,r[n])):e},{}),(0,c["default"])(a({},e,o({},n,r)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f={};r["default"]=i},{"./action-types":18,"deep-freeze":"deep-freeze"}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={SET_SCHEMA:"SET_SCHEMA"};r["default"]=n},{}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];switch(t.type){case l["default"].SET_SCHEMA:var r=t.payload.schema.schema_url;return(0,c["default"])(a({},e,o({},r,t.payload)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};r["default"]=i;var s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f=(0,c["default"])({})},{"./action-types":21,"deep-freeze":"deep-freeze"}],23:[function(e,t,r){function n(){l=!1,s.length?u=s.concat(u):f=-1,u.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new i(e,t)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],24:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){V=e}function s(e){X=e}function c(){return function(){r.nextTick(d)}}function u(){return function(){Q(d)}}function l(){var e=0,t=new W(d),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=d,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(d,1)}}function d(){for(var e=0;J>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}J=0}function h(){try{var t=e,r=t("vertx");return Q=r.runOnLoop||r.runOnContext,u()}catch(n){return p()}}function y(e,t){var r=this,n=r._state;if(n===ie&&!e||n===ae&&!t)return this;var o=new this.constructor(b),i=r._result;if(n){var a=arguments[n-1];X(function(){I(n,o,a,i)})}else P(r,o,e,t);return o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(b);return T(r,e),r}function b(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function E(e){try{return e.then}catch(t){return se.error=t,se}}function _(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function w(e,t,r){X(function(e){var n=!1,o=_(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,R(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,R(e,o))},e)}function O(e,t){t._state===ie?S(e,t._result):t._state===ae?R(e,t._result):P(t,void 0,function(t){T(e,t)},function(t){R(e,t)})}function C(e,t,r){t.constructor===e.constructor&&r===re&&constructor.resolve===ne?O(e,t):r===se?R(e,se.error):void 0===r?S(e,t):i(r)?w(e,t,r):S(e,t)}function T(e,t){e===t?R(e,v()):o(t)?C(e,t,E(t)):S(e,t)}function j(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&X(A,e))}function R(e,t){e._state===oe&&(e._state=ae,e._result=t,X(j,e))}function P(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=r,o[i+ae]=n,0===i&&e._state&&X(A,e)}function A(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?I(r,n,o,i):o(i);e._subscribers.length=0}}function x(){this.error=null}function D(e,t){try{return e(t)}catch(r){return ce.error=r,ce}}function I(e,t,r,n){var o,a,s,c,u=i(r);if(u){if(o=D(r,n),o===ce?(c=!0,a=o.error,o=null):s=!0,t===o)return void R(t,g())}else o=n,s=!0;t._state!==oe||(u&&s?T(t,o):c?R(t,a):e===ie?S(t,o):e===ae&&R(t,o))}function N(e,t){try{t(function(t){T(e,t)},function(t){R(e,t)})}catch(r){R(e,r)}}function F(e){return new he(this,e).promise}function U(e){function t(e){T(o,e)}function r(e){R(o,e)}var n=this,o=new n(b);if(!K(e))return R(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,a=0;o._state===oe&&i>a;a++)P(n.resolve(e[a]),void 0,t,r);return o}function L(e){var t=this,r=new t(b);return R(r,e),r}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function k(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&M(),this instanceof k?N(this,e):H())}function B(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):R(this.promise,this._validationError())}function G(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(e.Promise=de)}var q;q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,V,z,K=q,J=0,X=function(e,t){te[J]=e,te[J+1]=t,J+=2,2===J&&(V?V(d):z())},Y="undefined"!=typeof window?window:void 0,$=Y||{},W=$.MutationObserver||$.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);z=Z?c():W?l():ee?f():void 0===Y&&"function"==typeof e?h():p();var re=y,ne=m,oe=void 0,ie=1,ae=2,se=new x,ce=new x,ue=F,le=U,fe=L,pe=0,de=k;k.all=ue,k.race=le,k.resolve=ne,k.reject=fe,k._setScheduler=a,k._setAsap=s,k._asap=X,k.prototype={constructor:k,then:re,"catch":function(e){return this.then(null,e)}};var he=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},B.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===ne){var o=E(e);if(o===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===de){var i=new r(b);C(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){t(e)}),t)}else this._willSettleAt(n(e),t)},B.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===ae?R(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},B.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,function(e){r._settledAt(ie,t,e)},function(e){r._settledAt(ae,t,e)})};var ye=G,me={Promise:de,polyfill:ye};"function"==typeof define&&define.amd?define(function(){return me}):"undefined"!=typeof t&&t.exports?t.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ye()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:23}],25:[function(e,t,r){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":32}],26:[function(e,t,r){!function(e){function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function n(e,t,n){var a=n[0],s=n.length;(e||"object"!==o(a))&&(a={});for(var c=0;s>c;++c){var u=n[c],l=o(u);if("object"===l)for(var f in u){var p=e?i.clone(u[f]):u[f];t?a[f]=r(a[f],p):a[f]=p}}return a}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var i=function(e){return n(e===!0,!1,arguments)},a="merge";i.recursive=function(e){return n(e===!0,!0,arguments)},i.clone=function(e){var t,r,n=e,a=o(e);if("array"===a)for(n=[],r=e.length,t=0;r>t;++t)n[t]=i.clone(e[t]);else if("object"===a){n={};for(t in e)n[t]=i.clone(e[t])}return n},e?t.exports=i:window[a]=i}("object"==typeof t&&t&&"object"==typeof t.exports&&t.exports)},{}],27:[function(e,t,r){"use strict";var n=e("./stringify"),o=e("./parse");t.exports={stringify:n,parse:o}},{"./parse":28,"./stringify":29}],28:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};o.parseValues=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a=o[i],s=-1===a.indexOf("]=")?a.indexOf("="):a.indexOf("]=")+1;if(-1===s)r[n.decode(a)]="",t.strictNullHandling&&(r[n.decode(a)]=null);else{var c=n.decode(a.slice(0,s)),u=n.decode(a.slice(s+1));Object.prototype.hasOwnProperty.call(r,c)?r[c]=[].concat(r[c]).concat(u):r[c]=u}}return r},o.parseObject=function(e,t,r){if(!e.length)return t;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(o.parseObject(e,t,r));else{n=r.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=o.parseObject(e,t,r)):n[a]=o.parseObject(e,t,r)}return n},o.parseKeys=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,s=i.exec(n),c=[];if(s[1]){if(!r.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!r.allowPrototypes)return;c.push(s[1])}for(var u=0;null!==(s=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(s[1]);return s&&c.push("["+n.slice(s.index)+"]"),o.parseObject(c,t,r)}},t.exports=function(e,t){var r=t||{};if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?o.parseValues(e,r):e,a=r.plainObjects?Object.create(null):{},s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=o.parseKeys(u,i[u],r);a=n.merge(a,l,r)}return n.compact(a)}},{"./utils":30}],29:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},strictNullHandling:!1,skipNulls:!1,encode:!0};o.stringify=function(e,t,r,i,a,s,c,u,l){var f=e;if("function"==typeof c)f=c(t,f);else if(n.isBuffer(f))f=String(f);else if(f instanceof Date)f=f.toISOString();else if(null===f){if(i)return s?n.encode(t):t;f=""}if("string"==typeof f||"number"==typeof f||"boolean"==typeof f)return s?[n.encode(t)+"="+n.encode(f)]:[t+"="+f];var p=[];if("undefined"==typeof f)return p;var d;if(Array.isArray(c))d=c;else{var h=Object.keys(f);d=u?h.sort(u):h}for(var y=0;y<d.length;++y){var m=d[y];a&&null===f[m]||(p=Array.isArray(f)?p.concat(o.stringify(f[m],r(t,m),r,i,a,s,c,u,l)):p.concat(o.stringify(f[m],t+(l?"."+m:"["+m+"]"),r,i,a,s,c,u,l)))}return p},t.exports=function(e,t){var r,n,i=e,a=t||{},s="undefined"==typeof a.delimiter?o.delimiter:a.delimiter,c="boolean"==typeof a.strictNullHandling?a.strictNullHandling:o.strictNullHandling,u="boolean"==typeof a.skipNulls?a.skipNulls:o.skipNulls,l="boolean"==typeof a.encode?a.encode:o.encode,f="function"==typeof a.sort?a.sort:null,p="undefined"==typeof a.allowDots?!1:a.allowDots;"function"==typeof a.filter?(n=a.filter,i=n("",i)):Array.isArray(a.filter)&&(r=n=a.filter);var d=[];if("object"!=typeof i||null===i)return"";var h;h=a.arrayFormat in o.arrayPrefixGenerators?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var y=o.arrayPrefixGenerators[h];r||(r=Object.keys(i)),f&&r.sort(f);for(var m=0;m<r.length;++m){var b=r[m];u&&null===i[b]||(d=d.concat(o.stringify(i[b],b,y,c,u,l,n,f,p)))}return d.join(s)}},{"./utils":30}],30:[function(e,t,r){"use strict";var n=function(){for(var e=new Array(256),t=0;256>t;++t)e[t]="%"+((16>t?"0":"")+t.toString(16)).toUpperCase();return e}();r.arrayToObject=function(e,t){for(var r=t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},r.merge=function(e,t,n){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var o=e;return Array.isArray(e)&&!Array.isArray(t)&&(o=r.arrayToObject(e,n)),Object.keys(t).reduce(function(e,o){var i=t[o];return Object.prototype.hasOwnProperty.call(e,o)?e[o]=r.merge(e[o],i,n):e[o]=i,e},o)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&57>=i||i>=65&&90>=i||i>=97&&122>=i?r+=t.charAt(o):128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:55296>i||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],o=n.indexOf(e);if(-1!==o)return n[o];if(n.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)"undefined"!=typeof e[a]&&i.push(e[a]);return i}for(var s=Object.keys(e),c=0;c<s.length;++c){var u=s[c];e[u]=r.compact(e[u],n)}return e},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],31:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t,r,i){switch("undefined"==typeof e?"undefined":o(e)){case"object":return"function"==typeof e[i]?e[i].apply(e,n(r)):e[i];case"function":return e(t);default:return e}}function a(){function e(){j.forEach(function(e,t){var r=e.started,o=e.startedTime,s=e.action,c=e.prevState,l=e.error,p=e.took,d=e.nextState,y=j[t+1];y&&(d=y.prevState,p=y.started-r);var b=_(s),v="function"==typeof f?f(function(){return d},s):f,g=u(o),E=T.title?"color: "+T.title(b)+";":null,w="action "+(m?g:"")+" "+b.type+" "+(h?"(in "+p.toFixed(2)+" ms)":"");try{v?T.title?a.groupCollapsed("%c "+w,E):a.groupCollapsed(w):T.title?a.group("%c "+w,E):a.group(w)}catch(O){a.log(w)}var C=i(n,b,[c],"prevState"),S=i(n,b,[b],"action"),R=i(n,b,[l,c],"error"),P=i(n,b,[d],"nextState");C&&(T.prevState?a[C]("%c prev state","color: "+T.prevState(c)+"; font-weight: bold",c):a[C]("prev state",c)),S&&(T.action?a[S]("%c action","color: "+T.action(b)+"; font-weight: bold",b):a[S]("action",b)),l&&R&&(T.error?a[R]("%c error","color: "+T.error(l,c)+"; font-weight: bold",l):a[R]("error",l)),P&&(T.nextState?a[P]("%c next state","color: "+T.nextState(d)+"; font-weight: bold",d):a[P]("next state",d));try{a.groupEnd()}catch(O){a.log("—— log end ——")}}),j.length=0}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.level,n=void 0===r?"log":r,o=t.logger,a=void 0===o?console:o,s=t.logErrors,c=void 0===s?!0:s,f=t.collapsed,p=t.predicate,d=t.duration,h=void 0===d?!1:d,y=t.timestamp,m=void 0===y?!0:y,b=t.transformer,v=t.stateTransformer,g=void 0===v?function(e){return e}:v,E=t.actionTransformer,_=void 0===E?function(e){return e}:E,w=t.errorTransformer,O=void 0===w?function(e){return e}:w,C=t.colors,T=void 0===C?{title:function(){return"#000000"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}}:C;if("undefined"==typeof a)return function(){return function(e){return function(t){return e(t)}}};b&&console.error("Option 'transformer' is deprecated, use stateTransformer instead");var j=[];return function(t){var r=t.getState;return function(t){return function(n){if("function"==typeof p&&!p(r,n))return t(n);var o={};j.push(o),o.started=l.now(),o.startedTime=new Date,o.prevState=g(r()),o.action=n;var i=void 0;if(c)try{i=t(n)}catch(a){o.error=O(a)}else i=t(n);if(o.took=l.now()-o.started,o.nextState=g(r()),e(),o.error)throw o.error;return i}}}}var s=function(e,t){return new Array(t+1).join(e)},c=function(e,t){return s("0",t-e.toString().length)+e},u=function(e){return"@ "+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)},l="undefined"!=typeof performance&&"function"==typeof performance.now?performance:Date;t.exports=a},{}],32:[function(e,t,r){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){this.map={},e instanceof n?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function s(e){var t=new FileReader;return t.readAsText(e),i(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},h.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function p(e){var t=new n,r=e.getAllResponseHeaders().trim().split("\n");return r.forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}function d(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof n?t.headers:new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){n.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},n.prototype["delete"]=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,n){this.map[t(e)]=[r(n)]},n.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];d.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=l,e.Response=d,e.fetch=function(e,t){return new Promise(function(r,n){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void n(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:p(a),url:o()},i="response"in a?a.response:a.responseText;r(new d(i,t))},a.onerror=function(){n(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}]},{},[1]);
!function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(){h["default"].add("config",v["default"]),h["default"].add("schemas",E["default"]),h["default"].add("records",w["default"]),h["default"].add("campaign",C["default"]);var e={},t=(0,c.combineReducers)(h["default"].getAll()),r=(0,c.applyMiddleware)(l["default"],(0,p["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(m.setConfig(window.ss.config))}var a=e("jQuery"),s=o(a),c=e("redux"),u=e("redux-thunk"),l=o(u),f=e("redux-logger"),p=o(f),d=e("reducer-register"),h=o(d),y=e("state/config/actions"),m=n(y),b=e("state/config/reducer"),v=o(b),g=e("state/schema/reducer"),E=o(g),_=e("state/records/reducer"),w=o(_),O=e("state/campaign/reducer"),C=o(O),T=e("sections/campaign-admin/index");o(T);(0,s["default"])("body").entwine({onadd:function(){return i()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":31,"redux-thunk":"redux-thunk","sections/campaign-admin/index":8,"state/campaign/reducer":14,"state/config/actions":16,"state/config/reducer":17,"state/records/reducer":20,"state/schema/reducer":22}],2:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l);e("bootstrap-collapse");var p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",r="#"+t,n={id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e};return u["default"].createElement("div",{className:"accordion-group"},u["default"].createElement("h6",{className:"accordion-group__title",role:"tab",id:e},u["default"].createElement("a",{"data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t},this.props.title)),u["default"].createElement("div",n,this.props.children))},t}(f["default"]);r["default"]=p},{"bootstrap-collapse":"bootstrap-collapse",react:"react","silverstripe-component":"silverstripe-component"}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{role:"tablist","aria-multiselectable":"true"},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],4:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e="list-group-item "+this.props.className;return u["default"].createElement("a",{tabIndex:"0",className:e},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item"},u["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},u["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text))]}))},t}(f["default"]);p.propTypes={crumbs:u["default"].PropTypes.array},r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],6:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{className:"cms-content__right preview"},u["default"].createElement("iframe",{className:"preview__iframe",src:this.props.previewUrl}),u["default"].createElement("div",{className:"preview__overlay"},u["default"].createElement("h3",{className:"preview__overlay-text"},"There is no preview available for this item.")),u["default"].createElement("div",{className:"preview__file-container panel-scrollable"},u["default"].createElement("img",{className:"preview__file",src:"http://placehold.it/250x150"})),u["default"].createElement("div",{className:"south-actions"},u["default"].createElement("div",{className:"btn-toolbar"},u["default"].createElement("button",{className:"btn btn-secondary",type:"button"},"Edit"),u["default"].createElement("button",{type:"button","data-container":"body",className:"btn btn-link","data-toggle":"popover",title:"Page actions","data-placement":"top","data-content":"<a href=''>Add to campaign</a><a href=''>Remove from campaign</a>"},"..."))))},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],7:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c(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):i(e,t))}function u(e,t){return{config:e.config,sectionConfig:e.config.sections[t.sectionConfigKey],campaignId:e.campaign.campaignId,view:e.campaign.view}}function l(e){return{actions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),y=e("react-redux"),m=e("silverstripe-backend"),b=o(m),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/form-action/index"),O=o(w),C=e("i18n"),T=o(C),j=e("components/north-header/index"),S=o(j),R=e("components/form-builder/index"),P=o(R),A=e("./list"),x=o(A),D=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.addCampaign=n.addCampaign.bind(n),n.createFn=n.createFn.bind(n),n.publishApi=b["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.config.SecurityID},payloadSchema:{id:{urlReplacement:":id",remove:!0}}}),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var r=!0,n=window.ss.router.resolveURLToBase(this.props.sectionConfig.campaignViewRoute);window.ss.router(n,function(e,n){r?t.props.actions.showCampaignView(e.params.id,e.params.view):n()}),window.ss.router.exit(n,function(e,t){var o=window.ss.router.routeAppliesToCurrentLocation(n);o||(r=!1),t()})},t.prototype.render=function(){var e=null;switch(this.props.view){case"show":e=this.renderItemListView();break;case"edit":e=this.renderDetailEditView();break;default:e=this.renderIndexView()}return e},t.prototype.renderIndexView=function(){var e=this.props.sectionConfig.forms.editForm.schemaUrl;return d["default"].createElement("div",{className:"cms-content__inner no-preview"},d["default"].createElement("div",{className:"cms-content__left cms-campaigns collapse in","aria-expanded":"true"},d["default"].createElement(S["default"],null,d["default"].createElement("h2",{className:"text-truncate north-header__heading"},"Campaigns")),d["default"].createElement("div",{className:"container-fluid panel-scrollable"},d["default"].createElement("div",{className:"content-toolbar"},d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(O["default"],{label:T["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign}))),d["default"].createElement(P["default"],{schemaUrl:e,createFn:this.createFn}))))},t.prototype.renderItemListView=function(){var e={campaignId:this.props.campaignId,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,breadcrumbs:this.getBreadcrumbs()};return d["default"].createElement(x["default"],e)},t.prototype.renderDetailEditView=function(){return d["default"].createElement("p",null,"Edit")},t.prototype.createFn=function(e,t){var r=this.props.sectionConfig.campaignViewRoute;if("GridField"===t.component){var n=f({},t,{data:f({},t.data,{handleDrillDown:function(e,t){var n=r.replace(/:type\?/,"set").replace(/:id\?/,t.ID).replace(/:view\?/,"show");window.ss.router.show(n)}})});return d["default"].createElement(e,f({key:n.name},n))}return d["default"].createElement(e,f({key:t.name},t))},t.prototype.getBreadcrumbs=function(){return[{text:"Campaigns",href:"admin/campaigns"},{text:"March release",href:"admin/campaigns/show/1"}]},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.addCampaign=function(){},t}(_["default"]);D.propTypes={sectionConfig:d["default"].PropTypes.shape({forms:d["default"].PropTypes.shape({editForm:d["default"].PropTypes.shape({schemaUrl:d["default"].PropTypes.string})})}),config:d["default"].PropTypes.shape({SecurityID:d["default"].PropTypes.string}),sectionConfigKey:d["default"].PropTypes.string.isRequired},r["default"]=(0,y.connect)(u,l)(D)},{"./list":10,"components/form-action/index":"components/form-action/index","components/form-builder/index":"components/form-builder/index","components/north-header/index":"components/north-header/index",i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-backend":"silverstripe-backend","silverstripe-component":"silverstripe-component","state/campaign/actions":13}],8:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("jQuery"),i=n(o),a=e("react"),s=n(a),c=e("react-dom"),u=n(c),l=e("react-redux"),f=e("./controller"),p=n(f);i["default"].entwine("ss",function(e){e(".cms-content.CampaignAdmin").entwine({onadd:function(){u["default"].render(s["default"].createElement(l.Provider,{store:window.store},s["default"].createElement(p["default"],{sectionConfigKey:"CampaignAdmin"})),this[0])},onremove:function(){u["default"].unmountComponentAtNode(this[0])}})})},{"./controller":7,jQuery:"jQuery",react:"react","react-dom":"react-dom","react-redux":"react-redux"}],9:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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 s(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=e("i18n"),d=n(p),h=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=null,t={},r=this.props.item,n=this.props.campaign;if("open"===n.State)switch(r.ChangeType){case"created":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.DRAFT","Draft");break;case"modified":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.MODIFIED","Modified");break;case"deleted":t.className="label label-error list-group-item__status",t.Title=d["default"]._t("CampaignItem.REMOVED","Removed");break;case"none":default:t.className="label label-success list-group-item__status",t.Title=d["default"]._t("CampaignItem.NO_CHANGES","No changes")}var o=u["default"].createElement("span",{className:"list-group-item--has-links"},u["default"].createElement("i",{className:"font-icon-link"}),"3 linked items");return r.Thumbnail&&(e=u["default"].createElement("span",{className:"list-group-item__thumbnail"},u["default"].createElement("img",{src:r.Thumbnail}))),u["default"].createElement("div",null,e,u["default"].createElement("h4",{className:"list-group-item__heading"},r.Title),u["default"].createElement("span",{className:"list-group-item--is-linked"},u["default"].createElement("i",{className:"font-icon-link"})),o,t.className&&t.Title&&u["default"].createElement("span",{className:t.className},t.Title))},t}(f["default"]);h.propTypes={campaign:u["default"].PropTypes.object.isRequired,item:u["default"].PropTypes.object.isRequired},r["default"]=h},{i18n:"i18n",react:"react","silverstripe-component":"silverstripe-component"}],10:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 c(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):i(e,t))}function u(e,t){var r=null;return e.records&&e.records.ChangeSet&&t.campaignId&&(r=e.records.ChangeSet[parseInt(t.campaignId,10)]),{record:r||{},campaign:e.campaign}}function l(e){return{recordActions:(0,h.bindActionCreators)(b,e),campaignActions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),y=e("react-redux"),m=e("state/records/actions"),b=n(m),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/accordion/index"),O=o(w),C=e("components/accordion/group"),T=o(C),j=e("components/accordion/item"),S=o(j),R=e("components/north-header/index"),P=o(R),A=e("components/form-action/index"),x=o(A),D=e("./item"),I=o(D),N=e("components/breadcrumb/index"),F=o(N),U=e("components/preview/index"),L=o(U),M=e("i18n"),H=o(M),k=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.handlePublish=n.handlePublish.bind(n),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this.props.itemListViewEndpoint.replace(/:id/,this.props.campaignId);e.prototype.componentDidMount.call(this),this.props.recordActions.fetchRecord("ChangeSet","get",t)},t.prototype.render=function(){var e=this,t=1,r=this.props.campaignId,n=this.props.record,o=this.previewURLForItem(t),i=this.groupItemsForSet(),a=o?"cms-content__split cms-content__split--left-sm":"cms-content__split cms-content__split--none",s=[];return Object.keys(i).forEach(function(t){var o=i[t],a=o.items.length,c=[],u=a+" "+(1===a?o.singular:o.plural),l="Set_"+r+"_Group_"+t;o.items.forEach(function(t){var r="";"none"!==t.ChangeType&&"published"!==n.State||(r="list-group-item--published"),c.push(d["default"].createElement(S["default"],{key:t.ID,className:r},d["default"].createElement(I["default"],{item:t,campaign:e.props.record})))}),s.push(d["default"].createElement(T["default"],{key:l,groupid:l,title:u},c))}),d["default"].createElement("div",{className:a},d["default"].createElement("div",{className:"cms-content__left collapse in","aria-expanded":"true"},d["default"].createElement(P["default"],null,d["default"].createElement(F["default"],{crumbs:this.props.breadcrumbs,multiline:!0})),d["default"].createElement("div",{className:"container-fluid campaign-items panel-scrollable"},d["default"].createElement(O["default"],null,s)),d["default"].createElement("div",{className:"cms-south-actions"},this.renderButtonToolbar())),o&&d["default"].createElement(L["default"],{previewUrl:o}))},t.prototype.renderButtonToolbar=function(){var e=this.getItems();if(!e)return d["default"].createElement("div",{className:"btn-toolbar"});var t={};return"open"===this.props.record.State?t=f(t,{label:H["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"success",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"}):"published"===this.props.record.State&&(t=f(t,{label:H["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(x["default"],t))},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.getItems=function(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.ChangeSetItems:null},t.prototype.groupItemsForSet=function(){var e={},t=this.getItems();return t?(t.forEach(function(t){var r=t.BaseClass;e[r]||(e[r]={singular:t.Singular,plural:t.Plural,items:[]}),e[r].items.push(t)}),e):e},t.prototype.handlePublish=function(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.campaignId)},t}(_["default"]);k.propTypes={campaign:d["default"].PropTypes.shape({isPublishing:d["default"].PropTypes.bool.isRequired}),campaignActions:d["default"].PropTypes.object.isRequired,publishApi:d["default"].PropTypes.func.isRequired,record:d["default"].PropTypes.object.isRequired,recordActions:d["default"].PropTypes.object.isRequired},r["default"]=(0,y.connect)(u,l)(k)},{"./item":9,"components/accordion/group":2,"components/accordion/index":3,"components/accordion/item":4,"components/breadcrumb/index":5,"components/form-action/index":"components/form-action/index","components/north-header/index":"components/north-header/index","components/preview/index":6,i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/campaign/actions":13,"state/records/actions":19}],11:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=void 0,r=void 0;if(!(e.status>=200&&e.status<300))throw r=new Error(e.statusText),r.response=e,r;return t=e}Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=e("isomorphic-fetch"),u=n(c),l=e("es6-promise"),f=n(l),p=e("qs"),d=n(p),h=e("merge"),y=n(h);f["default"].polyfill();var m=function(){function e(){i(this,e),this.fetch=u["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return d["default"].stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function r(e,t){switch(e){case"application/x-www-form-urlencoded":return d["default"].parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function n(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function i(e){return e.text().then(function(t){return r(e.headers.get("Content-Type"),t)})}function a(e,t){return Object.keys(t).reduce(function(r,n){var i=e[n];return!i||i.remove!==!0&&i.querystring!==!0?s(r,o({},n,t[n])):r},{})}function c(e,r,i){var a=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],c=r,u=Object.keys(i).reduce(function(t,r){var n=e[r],c=a.setFromData===!0&&!(n&&n.remove===!0),u=n&&n.querystring===!0&&n.remove!==!0;return c||u?s(t,o({},r,i[r])):t},{});return c=n(c,t("application/x-www-form-urlencoded",u)),c=Object.keys(e).reduce(function(t,r){var n=e[r].urlReplacement;return n?t.replace(n,i[r]):t},c)}var u=this,l=s({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),f={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){f[l[e]]&&(l[e]=f[l[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r={Accept:l.responseFormat,"Content-Type":l.payloadFormat},n=y["default"].recursive({},l.defaultData,e),o=c(l.payloadSchema,l.url,n,{setFromData:"get"===l.method.toLowerCase()}),s=t(l.payloadFormat,a(l.payloadSchema,n)),f="get"===l.method.toLowerCase()?[o,r]:[o,s,r];return u[l.method].apply(u,f).then(i)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(a)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:s({},n,r),credentials:"same-origin",body:t}).then(a)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:r}).then(a)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:r}).then(a)},e}(),b=new m;r["default"]=b},{"es6-promise":24,"isomorphic-fetch":25,merge:26,qs:27}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},{}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return{type:s["default"].SET_CAMPAIGN_ACTIVE_CHANGESET,payload:{campaignId:e,view:t}}}function i(e,t){return function(r){r({type:s["default"].PUBLISH_CAMPAIGN_REQUEST,payload:{campaignId:t}}),e({id:t}).then(function(e){r({type:s["default"].PUBLISH_CAMPAIGN_SUCCESS,payload:{campaignId:t}}),r({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:"ChangeSet",data:e}})})["catch"](function(e){r({type:s["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.showCampaignView=o,r.publishCampaign=i;var a=e("./action-types"),s=n(a),c=e("state/records/action-types"),u=n(c)},{"./action-types":12,"state/records/action-types":18}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?l:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s["default"])(i({},e,{campaignId:t.payload.campaignId,view:t.payload.view}));case u["default"].PUBLISH_CAMPAIGN_REQUEST:return(0,s["default"])(i({},e,{isPublishing:!0}));case u["default"].PUBLISH_CAMPAIGN_SUCCESS:case u["default"].PUBLISH_CAMPAIGN_FAILURE:return(0,s["default"])(i({},e,{isPublishing:!1}));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c),l={campaignId:null,isPublishing:!1,view:null};r["default"]=o},{"./action-types":12,"deep-freeze":"deep-freeze"}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CONFIG:"SET_CONFIG"}},{}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:a["default"].SET_CONFIG,payload:{config:e}}}Object.defineProperty(r,"__esModule",{value:!0}),r.setConfig=o;var i=e("./action-types"),a=n(i)},{"./action-types":15}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CONFIG:return(0,s["default"])(i({},e,t.payload.config));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c);r["default"]=o},{"./action-types":15,"deep-freeze":"deep-freeze"}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={CREATE_RECORD:"CREATE_RECORD",UPDATE_RECORD:"UPDATE_RECORD",DELETE_RECORD:"DELETE_RECORD",FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",
FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},{}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=["id"];return r.reduce(function(e,r){return e.replace(":"+r,t[r])},e)}function i(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORDS_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORDS_FAILURE,payload:{error:r,recordType:e}})})}}function a(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORD_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORD_FAILURE,payload:{error:r,recordType:e}})})}}function s(e,t,r,n){var i={recordType:e,id:t};return function(a){return a({type:u["default"].DELETE_RECORD_REQUEST,payload:i}),f["default"][r.toLowerCase()](o(n,i)).then(function(){a({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(r){a({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchRecords=i,r.fetchRecord=a,r.deleteRecord=s;var c=e("./action-types"),u=n(c),l=e("silverstripe-backend.js"),f=n(l)},{"./action-types":18,"silverstripe-backend.js":11}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments[1],r=void 0,n=void 0,i=void 0;switch(t.type){case l["default"].CREATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].UPDATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].DELETE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].FETCH_RECORDS_REQUEST:return e;case l["default"].FETCH_RECORDS_FAILURE:return e;case l["default"].FETCH_RECORDS_SUCCESS:return n=t.payload.recordType,r=t.payload.data._embedded[n+"s"]||{},r=r.reduce(function(e,t){return a({},e,o({},t.id,t))},{}),(0,c["default"])(a({},e,o({},n,r)));case l["default"].FETCH_RECORD_REQUEST:return e;case l["default"].FETCH_RECORD_FAILURE:return e;case l["default"].FETCH_RECORD_SUCCESS:return n=t.payload.recordType,i=t.payload.data,(0,c["default"])(a({},e,o({},n,a({},e[n],o({},i.ID,i)))));case l["default"].DELETE_RECORD_REQUEST:return e;case l["default"].DELETE_RECORD_FAILURE:return e;case l["default"].DELETE_RECORD_SUCCESS:return n=t.payload.recordType,r=e[n],r=Object.keys(r).reduce(function(e,n){return parseInt(n,10)!==parseInt(t.payload.id,10)?a({},e,o({},n,r[n])):e},{}),(0,c["default"])(a({},e,o({},n,r)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f={};r["default"]=i},{"./action-types":18,"deep-freeze":"deep-freeze"}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={SET_SCHEMA:"SET_SCHEMA"};r["default"]=n},{}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];switch(t.type){case l["default"].SET_SCHEMA:var r=t.payload.schema.schema_url;return(0,c["default"])(a({},e,o({},r,t.payload)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};r["default"]=i;var s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f=(0,c["default"])({})},{"./action-types":21,"deep-freeze":"deep-freeze"}],23:[function(e,t,r){function n(){l=!1,s.length?u=s.concat(u):f=-1,u.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new i(e,t)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],24:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){V=e}function s(e){X=e}function c(){return function(){r.nextTick(d)}}function u(){return function(){Q(d)}}function l(){var e=0,t=new W(d),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=d,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(d,1)}}function d(){for(var e=0;J>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}J=0}function h(){try{var t=e,r=t("vertx");return Q=r.runOnLoop||r.runOnContext,u()}catch(n){return p()}}function y(e,t){var r=this,n=r._state;if(n===ie&&!e||n===ae&&!t)return this;var o=new this.constructor(b),i=r._result;if(n){var a=arguments[n-1];X(function(){I(n,o,a,i)})}else P(r,o,e,t);return o}function m(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(b);return T(r,e),r}function b(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function E(e){try{return e.then}catch(t){return se.error=t,se}}function _(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function w(e,t,r){X(function(e){var n=!1,o=_(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,R(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,R(e,o))},e)}function O(e,t){t._state===ie?S(e,t._result):t._state===ae?R(e,t._result):P(t,void 0,function(t){T(e,t)},function(t){R(e,t)})}function C(e,t,r){t.constructor===e.constructor&&r===re&&constructor.resolve===ne?O(e,t):r===se?R(e,se.error):void 0===r?S(e,t):i(r)?w(e,t,r):S(e,t)}function T(e,t){e===t?R(e,v()):o(t)?C(e,t,E(t)):S(e,t)}function j(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&X(A,e))}function R(e,t){e._state===oe&&(e._state=ae,e._result=t,X(j,e))}function P(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=r,o[i+ae]=n,0===i&&e._state&&X(A,e)}function A(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?I(r,n,o,i):o(i);e._subscribers.length=0}}function x(){this.error=null}function D(e,t){try{return e(t)}catch(r){return ce.error=r,ce}}function I(e,t,r,n){var o,a,s,c,u=i(r);if(u){if(o=D(r,n),o===ce?(c=!0,a=o.error,o=null):s=!0,t===o)return void R(t,g())}else o=n,s=!0;t._state!==oe||(u&&s?T(t,o):c?R(t,a):e===ie?S(t,o):e===ae&&R(t,o))}function N(e,t){try{t(function(t){T(e,t)},function(t){R(e,t)})}catch(r){R(e,r)}}function F(e){return new he(this,e).promise}function U(e){function t(e){T(o,e)}function r(e){R(o,e)}var n=this,o=new n(b);if(!K(e))return R(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,a=0;o._state===oe&&i>a;a++)P(n.resolve(e[a]),void 0,t,r);return o}function L(e){var t=this,r=new t(b);return R(r,e),r}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function k(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&M(),this instanceof k?N(this,e):H())}function B(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):R(this.promise,this._validationError())}function G(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(e.Promise=de)}var q;q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,V,z,K=q,J=0,X=function(e,t){te[J]=e,te[J+1]=t,J+=2,2===J&&(V?V(d):z())},Y="undefined"!=typeof window?window:void 0,$=Y||{},W=$.MutationObserver||$.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);z=Z?c():W?l():ee?f():void 0===Y&&"function"==typeof e?h():p();var re=y,ne=m,oe=void 0,ie=1,ae=2,se=new x,ce=new x,ue=F,le=U,fe=L,pe=0,de=k;k.all=ue,k.race=le,k.resolve=ne,k.reject=fe,k._setScheduler=a,k._setAsap=s,k._asap=X,k.prototype={constructor:k,then:re,"catch":function(e){return this.then(null,e)}};var he=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},B.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===ne){var o=E(e);if(o===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===de){var i=new r(b);C(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){t(e)}),t)}else this._willSettleAt(n(e),t)},B.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===ae?R(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},B.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,function(e){r._settledAt(ie,t,e)},function(e){r._settledAt(ae,t,e)})};var ye=G,me={Promise:de,polyfill:ye};"function"==typeof define&&define.amd?define(function(){return me}):"undefined"!=typeof t&&t.exports?t.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ye()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:23}],25:[function(e,t,r){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":32}],26:[function(e,t,r){!function(e){function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function n(e,t,n){var a=n[0],s=n.length;(e||"object"!==o(a))&&(a={});for(var c=0;s>c;++c){var u=n[c],l=o(u);if("object"===l)for(var f in u){var p=e?i.clone(u[f]):u[f];t?a[f]=r(a[f],p):a[f]=p}}return a}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var i=function(e){return n(e===!0,!1,arguments)},a="merge";i.recursive=function(e){return n(e===!0,!0,arguments)},i.clone=function(e){var t,r,n=e,a=o(e);if("array"===a)for(n=[],r=e.length,t=0;r>t;++t)n[t]=i.clone(e[t]);else if("object"===a){n={};for(t in e)n[t]=i.clone(e[t])}return n},e?t.exports=i:window[a]=i}("object"==typeof t&&t&&"object"==typeof t.exports&&t.exports)},{}],27:[function(e,t,r){"use strict";var n=e("./stringify"),o=e("./parse");t.exports={stringify:n,parse:o}},{"./parse":28,"./stringify":29}],28:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};o.parseValues=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a=o[i],s=-1===a.indexOf("]=")?a.indexOf("="):a.indexOf("]=")+1;if(-1===s)r[n.decode(a)]="",t.strictNullHandling&&(r[n.decode(a)]=null);else{var c=n.decode(a.slice(0,s)),u=n.decode(a.slice(s+1));Object.prototype.hasOwnProperty.call(r,c)?r[c]=[].concat(r[c]).concat(u):r[c]=u}}return r},o.parseObject=function(e,t,r){if(!e.length)return t;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(o.parseObject(e,t,r));else{n=r.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=o.parseObject(e,t,r)):n[a]=o.parseObject(e,t,r)}return n},o.parseKeys=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,s=i.exec(n),c=[];if(s[1]){if(!r.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!r.allowPrototypes)return;c.push(s[1])}for(var u=0;null!==(s=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(s[1]);return s&&c.push("["+n.slice(s.index)+"]"),o.parseObject(c,t,r)}},t.exports=function(e,t){var r=t||{};if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?o.parseValues(e,r):e,a=r.plainObjects?Object.create(null):{},s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=o.parseKeys(u,i[u],r);a=n.merge(a,l,r)}return n.compact(a)}},{"./utils":30}],29:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},strictNullHandling:!1,skipNulls:!1,encode:!0};o.stringify=function(e,t,r,i,a,s,c,u,l){var f=e;if("function"==typeof c)f=c(t,f);else if(n.isBuffer(f))f=String(f);else if(f instanceof Date)f=f.toISOString();else if(null===f){if(i)return s?n.encode(t):t;f=""}if("string"==typeof f||"number"==typeof f||"boolean"==typeof f)return s?[n.encode(t)+"="+n.encode(f)]:[t+"="+f];var p=[];if("undefined"==typeof f)return p;var d;if(Array.isArray(c))d=c;else{var h=Object.keys(f);d=u?h.sort(u):h}for(var y=0;y<d.length;++y){var m=d[y];a&&null===f[m]||(p=Array.isArray(f)?p.concat(o.stringify(f[m],r(t,m),r,i,a,s,c,u,l)):p.concat(o.stringify(f[m],t+(l?"."+m:"["+m+"]"),r,i,a,s,c,u,l)))}return p},t.exports=function(e,t){var r,n,i=e,a=t||{},s="undefined"==typeof a.delimiter?o.delimiter:a.delimiter,c="boolean"==typeof a.strictNullHandling?a.strictNullHandling:o.strictNullHandling,u="boolean"==typeof a.skipNulls?a.skipNulls:o.skipNulls,l="boolean"==typeof a.encode?a.encode:o.encode,f="function"==typeof a.sort?a.sort:null,p="undefined"==typeof a.allowDots?!1:a.allowDots;"function"==typeof a.filter?(n=a.filter,i=n("",i)):Array.isArray(a.filter)&&(r=n=a.filter);var d=[];if("object"!=typeof i||null===i)return"";var h;h=a.arrayFormat in o.arrayPrefixGenerators?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var y=o.arrayPrefixGenerators[h];r||(r=Object.keys(i)),f&&r.sort(f);for(var m=0;m<r.length;++m){var b=r[m];u&&null===i[b]||(d=d.concat(o.stringify(i[b],b,y,c,u,l,n,f,p)))}return d.join(s)}},{"./utils":30}],30:[function(e,t,r){"use strict";var n=function(){for(var e=new Array(256),t=0;256>t;++t)e[t]="%"+((16>t?"0":"")+t.toString(16)).toUpperCase();return e}();r.arrayToObject=function(e,t){for(var r=t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},r.merge=function(e,t,n){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var o=e;return Array.isArray(e)&&!Array.isArray(t)&&(o=r.arrayToObject(e,n)),Object.keys(t).reduce(function(e,o){var i=t[o];return Object.prototype.hasOwnProperty.call(e,o)?e[o]=r.merge(e[o],i,n):e[o]=i,e},o)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&57>=i||i>=65&&90>=i||i>=97&&122>=i?r+=t.charAt(o):128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:55296>i||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],o=n.indexOf(e);if(-1!==o)return n[o];if(n.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)"undefined"!=typeof e[a]&&i.push(e[a]);return i}for(var s=Object.keys(e),c=0;c<s.length;++c){var u=s[c];e[u]=r.compact(e[u],n)}return e},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],31:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t,r,i){switch("undefined"==typeof e?"undefined":o(e)){case"object":return"function"==typeof e[i]?e[i].apply(e,n(r)):e[i];case"function":return e(t);default:return e}}function a(){function e(){j.forEach(function(e,t){var r=e.started,o=e.startedTime,s=e.action,c=e.prevState,l=e.error,p=e.took,d=e.nextState,y=j[t+1];y&&(d=y.prevState,p=y.started-r);var b=_(s),v="function"==typeof f?f(function(){return d},s):f,g=u(o),E=T.title?"color: "+T.title(b)+";":null,w="action "+(m?g:"")+" "+b.type+" "+(h?"(in "+p.toFixed(2)+" ms)":"");try{v?T.title?a.groupCollapsed("%c "+w,E):a.groupCollapsed(w):T.title?a.group("%c "+w,E):a.group(w)}catch(O){a.log(w)}var C=i(n,b,[c],"prevState"),S=i(n,b,[b],"action"),R=i(n,b,[l,c],"error"),P=i(n,b,[d],"nextState");C&&(T.prevState?a[C]("%c prev state","color: "+T.prevState(c)+"; font-weight: bold",c):a[C]("prev state",c)),S&&(T.action?a[S]("%c action","color: "+T.action(b)+"; font-weight: bold",b):a[S]("action",b)),l&&R&&(T.error?a[R]("%c error","color: "+T.error(l,c)+"; font-weight: bold",l):a[R]("error",l)),P&&(T.nextState?a[P]("%c next state","color: "+T.nextState(d)+"; font-weight: bold",d):a[P]("next state",d));try{a.groupEnd()}catch(O){a.log("—— log end ——")}}),j.length=0}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.level,n=void 0===r?"log":r,o=t.logger,a=void 0===o?console:o,s=t.logErrors,c=void 0===s?!0:s,f=t.collapsed,p=t.predicate,d=t.duration,h=void 0===d?!1:d,y=t.timestamp,m=void 0===y?!0:y,b=t.transformer,v=t.stateTransformer,g=void 0===v?function(e){return e}:v,E=t.actionTransformer,_=void 0===E?function(e){return e}:E,w=t.errorTransformer,O=void 0===w?function(e){return e}:w,C=t.colors,T=void 0===C?{title:function(){return"#000000"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}}:C;if("undefined"==typeof a)return function(){return function(e){return function(t){return e(t)}}};b&&console.error("Option 'transformer' is deprecated, use stateTransformer instead");var j=[];return function(t){var r=t.getState;return function(t){return function(n){if("function"==typeof p&&!p(r,n))return t(n);var o={};j.push(o),o.started=l.now(),o.startedTime=new Date,o.prevState=g(r()),o.action=n;var i=void 0;if(c)try{i=t(n)}catch(a){o.error=O(a)}else i=t(n);if(o.took=l.now()-o.started,o.nextState=g(r()),e(),o.error)throw o.error;return i}}}}var s=function(e,t){return new Array(t+1).join(e)},c=function(e,t){return s("0",t-e.toString().length)+e},u=function(e){return"@ "+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)},l="undefined"!=typeof performance&&"function"==typeof performance.now?performance:Date;t.exports=a},{}],32:[function(e,t,r){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){this.map={},e instanceof n?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function s(e){var t=new FileReader;return t.readAsText(e),i(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},h.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function p(e){var t=new n,r=e.getAllResponseHeaders().trim().split("\n");return r.forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}function d(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof n?t.headers:new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){n.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},n.prototype["delete"]=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,n){this.map[t(e)]=[r(n)]},n.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var m=[301,302,303,307,308];d.redirect=function(e,t){if(-1===m.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=l,e.Response=d,e.fetch=function(e,t){return new Promise(function(r,n){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void n(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:p(a),url:o()},i="response"in a?a.response:a.responseText;r(new d(i,t))},a.onerror=function(){n(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}]},{},[1]);
//# sourceMappingURL=bundle-framework.js.map

View File

@ -27,6 +27,6 @@ this.length=1,this;if("body"===e&&!n&&M.body)return this.context=M,this[0]=M.bod
r.length&&(c=c.add(r))}else{if("string"==typeof t&&(t={data:t}),!t.data&&""!==t.data)return c;c=e("<li />"),t.attr&&c.attr(t.attr),t.metadata&&c.data(t.metadata),t.state&&c.addClass("jstree-"+t.state),e.isArray(t.data)||(r=t.data,t.data=[],t.data.push(r)),e.each(t.data,function(n,i){r=e("<a />"),e.isFunction(i)&&(i=i.call(this,t)),"string"==typeof i?r.attr("href","#")[h?"html":"text"](i):(i.attr||(i.attr={}),i.attr.href||(i.attr.href="#"),r.attr(i.attr)[h?"html":"text"](i.title),i.language&&r.addClass(i.language)),r.prepend("<ins class='jstree-icon'>&#160;</ins>"),!i.icon&&t.icon&&(i.icon=t.icon),i.icon&&(-1===i.icon.indexOf("/")?r.children("ins").addClass(i.icon):r.children("ins").css("background","url('"+i.icon+"') center center no-repeat")),c.append(r)}),c.prepend("<ins class='jstree-icon'>&#160;</ins>"),t.children&&(d.progressive_render&&"open"!==t.state?c.addClass("jstree-closed").data("jstree_children",t.children):(d.progressive_unload&&c.data("jstree_children",t.children),e.isArray(t.children)&&t.children.length&&(r=this._parse_json(t.children,n,!0),r.length&&(l=e("<ul />"),l.append(r),c.append(l)))))}return i||(a=e("<ul />"),a.append(c),c=a),c},get_json:function(t,n,i,r){var o,s,a,l,c,u,d=[],h=this._get_settings(),p=this;return t=this._get_node(t),t&&-1!==t||(t=this.get_container().find("> ul > li")),n=e.isArray(n)?n:["id","class"],!r&&this.data.types&&n.push(h.types.type_attr),i=e.isArray(i)?i:[],t.each(function(){a=e(this),o={data:[]},n.length&&(o.attr={}),e.each(n,function(e,t){s=a.attr(t),s&&s.length&&s.replace(/jstree[^ ]*/gi,"").length&&(o.attr[t]=(" "+s).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))}),a.hasClass("jstree-open")&&(o.state="open"),a.hasClass("jstree-closed")&&(o.state="closed"),a.data()&&(o.metadata=a.data()),l=a.children("a"),l.each(function(){c=e(this),i.length||-1!==e.inArray("languages",h.plugins)||c.children("ins").get(0).style.backgroundImage.length||c.children("ins").get(0).className&&c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").length?(u=!1,-1!==e.inArray("languages",h.plugins)&&e.isArray(h.languages)&&h.languages.length&&e.each(h.languages,function(e,t){return c.hasClass(t)?(u=t,!1):void 0}),s={attr:{},title:p.get_text(c,u)},e.each(i,function(e,t){s.attr[t]=(" "+(c.attr(t)||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")}),-1!==e.inArray("languages",h.plugins)&&e.isArray(h.languages)&&h.languages.length&&e.each(h.languages,function(e,t){return c.hasClass(t)?(s.language=t,!0):void 0}),c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(s.icon=c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")),c.children("ins").get(0).style.backgroundImage.length&&(s.icon=c.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""))):s=p.get_text(c),l.length>1?o.data.push(s):o.data=s}),a=a.find("> ul > li"),a.length&&(o.children=p.get_json(a,n,i,!0)),d.push(o)}),d}}})}(jQuery),function(e){var t=!1;e.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(n){var i=this._get_settings().languages,r=!1,o=".jstree-"+this.get_index()+" a";if(!e.isArray(i)||0===i.length)return!1;if(-1==e.inArray(n,i)){if(!i[n])return!1;n=i[n]}return n==this.data.languages.current_language?!0:(r=e.vakata.css.get_css(o+"."+this.data.languages.current_language,!1,t),r!==!1&&(r.style.display="none"),r=e.vakata.css.get_css(o+"."+n,!1,t),r!==!1&&(r.style.display=""),this.data.languages.current_language=n,this.__callback(n),!0)},get_lang:function(){return this.data.languages.current_language},_get_string:function(t,n){var i=this._get_settings().languages,r=this._get_settings().core.strings;return e.isArray(i)&&i.length&&(n=n&&-1!=e.inArray(n,i)?n:this.data.languages.current_language),r[n]&&r[n][t]?r[n][t]:r[t]?r[t]:t},get_text:function(t,n){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var i=this._get_settings().languages,r=this._get_settings().core.html_titles;return e.isArray(i)&&i.length?(n=n&&-1!=e.inArray(n,i)?n:this.data.languages.current_language,t=t.children("a."+n)):t=t.children("a:eq(0)"),r?(t=t.clone(),t.children("INS").remove(),t.html()):(t=t.contents().filter(function(){return 3==this.nodeType})[0],t.nodeValue)},set_text:function(t,n,i){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var r,o=this._get_settings().languages,s=this._get_settings().core.html_titles;return e.isArray(o)&&o.length?(i=i&&-1!=e.inArray(i,o)?i:this.data.languages.current_language,t=t.children("a."+i)):t=t.children("a:eq(0)"),s?(r=t.children("INS").clone(),t.html(n).prepend(r),this.__callback({obj:t,name:n,lang:i}),!0):(t=t.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:t,name:n,lang:i}),t.nodeValue=n)},_load_css:function(){var n,i=this._get_settings().languages,r="/* languages css */",o=".jstree-"+this.get_index()+" a";if(e.isArray(i)&&i.length){for(this.data.languages.current_language=i[0],n=0;n<i.length;n++)r+=o+"."+i[n]+" {",i[n]!=this.data.languages.current_language&&(r+=" display:none; "),r+=" } ";t=e.vakata.css.add_sheet({str:r,title:"jstree-languages"})}},create_node:function(t,n,i,r){var o=this.__call_old(!0,t,n,i,function(t){var n,i=this._get_settings().languages,o=t.children("a");if(e.isArray(i)&&i.length){for(n=0;n<i.length;n++)o.is("."+i[n])||t.append(o.eq(0).clone().removeClass(i.join(" ")).addClass(i[n]));o.not("."+i.join(", .")).remove()}r&&r.call(this,t)});return o}}})}(jQuery),function(e){e.jstree.plugin("cookies",{__init:function(){if("undefined"==typeof e.cookie)throw"jsTree cookie: jQuery cookie plugin not included.";var t,n=this._get_settings().cookies;n.save_loaded&&(t=e.cookie(n.save_loaded),t&&t.length&&(this.data.core.to_load=t.split(","))),n.save_opened&&(t=e.cookie(n.save_opened),t&&t.length&&(this.data.core.to_open=t.split(","))),n.save_selected&&(t=e.cookie(n.save_selected),t&&t.length&&this.data.ui&&(this.data.ui.to_select=t.split(","))),this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",e.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",e.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:!0,cookie_options:{}},_fn:{save_cookie:function(t){if(!this.data.core.refreshing){var n=this._get_settings().cookies;if(!t)return n.save_loaded&&(this.save_loaded(),e.cookie(n.save_loaded,this.data.core.to_load.join(","),n.cookie_options)),n.save_opened&&(this.save_opened(),e.cookie(n.save_opened,this.data.core.to_open.join(","),n.cookie_options)),void(n.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(n.save_selected,this.data.ui.to_select.join(","),n.cookie_options)));switch(t){case"open_node":case"close_node":n.save_opened&&(this.save_opened(),e.cookie(n.save_opened,this.data.core.to_open.join(","),n.cookie_options)),n.save_loaded&&(this.save_loaded(),e.cookie(n.save_loaded,this.data.core.to_load.join(","),n.cookie_options));break;case"select_node":case"deselect_node":n.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(n.save_selected,this.data.ui.to_select.join(","),n.cookie_options))}}}}})}(jQuery),function(e){e.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",e.proxy(function(e,t){var n=this._get_node(t.rslt.obj);n=-1===n?this.get_container().children("ul"):n.children("ul"),this.sort(n)},this)).bind("rename_node.jstree create_node.jstree create.jstree",e.proxy(function(e,t){this.sort(t.rslt.obj.parent())},this)).bind("move_node.jstree",e.proxy(function(e,t){var n=-1==t.rslt.np?this.get_container():t.rslt.np;this.sort(n.children("ul"))},this))},defaults:function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},_fn:{sort:function(t){var n=this._get_settings().sort,i=this;t.append(e.makeArray(t.children("li")).sort(e.proxy(n,i))),t.find("> li > ul").each(function(){i.sort(e(this))}),this.clean_node(t)}}})}(jQuery),function(e){var t=!1,n=!1,i=!1,r=!1,o=!1,s=!1,a=!1,l=!1,c=!1;e.vakata.dnd={is_down:!1,is_drag:!1,helper:!1,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(t,n,i){e.vakata.dnd.is_drag&&e.vakata.drag_stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.MozUserSelect="none")}catch(r){}return e.vakata.dnd.init_x=t.pageX,e.vakata.dnd.init_y=t.pageY,e.vakata.dnd.user_data=n,e.vakata.dnd.is_down=!0,e.vakata.dnd.helper=e("<div id='vakata-dragged' />").html(i),e(document).bind("mousemove",e.vakata.dnd.drag),e(document).bind("mouseup",e.vakata.dnd.drag_stop),!1},drag:function(t){if(e.vakata.dnd.is_down){if(!e.vakata.dnd.is_drag){if(!(Math.abs(t.pageX-e.vakata.dnd.init_x)>5||Math.abs(t.pageY-e.vakata.dnd.init_y)>5))return;e.vakata.dnd.helper.appendTo("body"),e.vakata.dnd.is_drag=!0,e(document).triggerHandler("drag_start.vakata",{event:t,data:e.vakata.dnd.user_data})}if("mousemove"===t.type){var n=e(document),i=n.scrollTop(),r=n.scrollLeft();t.pageY-i<20?(s&&"down"===a&&(clearInterval(s),s=!1),s||(a="up",s=setInterval(function(){e(document).scrollTop(e(document).scrollTop()-e.vakata.dnd.scroll_spd)},150))):s&&"up"===a&&(clearInterval(s),s=!1),e(window).height()-(t.pageY-i)<20?(s&&"up"===a&&(clearInterval(s),s=!1),s||(a="down",s=setInterval(function(){e(document).scrollTop(e(document).scrollTop()+e.vakata.dnd.scroll_spd)},150))):s&&"down"===a&&(clearInterval(s),s=!1),t.pageX-r<20?(o&&"right"===l&&(clearInterval(o),o=!1),o||(l="left",o=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()-e.vakata.dnd.scroll_spd)},150))):o&&"left"===l&&(clearInterval(o),o=!1),e(window).width()-(t.pageX-r)<20?(o&&"left"===l&&(clearInterval(o),o=!1),o||(l="right",o=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()+e.vakata.dnd.scroll_spd)},150))):o&&"right"===l&&(clearInterval(o),o=!1)}e.vakata.dnd.helper.css({left:t.pageX+e.vakata.dnd.helper_left+"px",top:t.pageY+e.vakata.dnd.helper_top+"px"}),e(document).triggerHandler("drag.vakata",{event:t,data:e.vakata.dnd.user_data})}},drag_stop:function(t){o&&clearInterval(o),s&&clearInterval(s),e(document).unbind("mousemove",e.vakata.dnd.drag),e(document).unbind("mouseup",e.vakata.dnd.drag_stop),e(document).triggerHandler("drag_stop.vakata",{event:t,data:e.vakata.dnd.user_data}),e.vakata.dnd.helper.remove(),e.vakata.dnd.init_x=0,e.vakata.dnd.init_y=0,e.vakata.dnd.user_data={},e.vakata.dnd.is_down=!1,e.vakata.dnd.is_drag=!1}},e(function(){var t="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";e.vakata.css.add_sheet({str:t,title:"vakata"})}),e.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:!1,after:!1,inside:!1,before:!1,off:!1,prepared:!1,w:0,to1:!1,to2:!1,cof:!1,cw:!1,ch:!1,i1:!1,i2:!1,mto:!1},this.get_container().bind("mouseenter.jstree",e.proxy(function(n){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.themes&&(i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),n.currentTarget===n.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==n.target)){var o,s=e.jstree._reference(n.target);s.data.dnd.foreign?(o=s._get_settings().dnd.drag_check.call(this,{o:t,r:s.get_container(),is_root:!0}),o!==!0&&o.inside!==!0&&o.before!==!0&&o.after!==!0||e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")):(s.prepare_move(t,s.get_container(),"last"),s.check_move()&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"))}},this)).bind("mouseup.jstree",e.proxy(function(n){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&n.currentTarget===n.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==n.target){var i,r=e.jstree._reference(n.currentTarget);r.data.dnd.foreign?(i=r._get_settings().dnd.drag_check.call(this,{o:t,r:r.get_container(),is_root:!0}),i!==!0&&i.inside!==!0&&i.before!==!0&&i.after!==!0||r._get_settings().dnd.drag_finish.call(this,{o:t,r:r.get_container(),is_root:!0})):r.move_node(t,r.get_container(),"last",n[r._get_settings().dnd.copy_modifier+"Key"])}},this)).bind("mouseleave.jstree",e.proxy(function(t){return t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id?!1:void(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")))},this)).bind("mousemove.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){var n=this.get_container()[0];t.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft+=e.vakata.dnd.scroll_spd},n),100)):t.pageX-24<this.data.dnd.cof.left?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft-=e.vakata.dnd.scroll_spd},n),100)):this.data.dnd.i1&&clearInterval(this.data.dnd.i1),t.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop+=e.vakata.dnd.scroll_spd},n),100)):t.pageY-24<this.data.dnd.cof.top?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop-=e.vakata.dnd.scroll_spd},n),100)):this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("scroll.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&i&&r&&(i.hide(),r.hide())},this)).delegate("a","mousedown.jstree",e.proxy(function(e){return 1===e.which?(this.start_drag(e.currentTarget,e),!1):void 0},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_enter(t.currentTarget)},this)).delegate("a","mousemove.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(n&&n.length&&n.children("a")[0]===t.currentTarget||this.dnd_enter(t.currentTarget),"undefined"==typeof this.data.dnd.off.top&&(this.data.dnd.off=e(t.target).offset()),this.data.dnd.w=(t.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height,this.data.dnd.w<0&&(this.data.dnd.w+=this.data.core.li_height),this.dnd_show())},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){if(t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id)return!1;i&&i.hide(),r&&r.hide(),this.data.dnd.mto=setTimeout(function(e){return function(){e.dnd_leave(t)}}(this),0)}},this)).delegate("a, #jstree-marker-line","mouseup.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_finish(t)},this)),e(document).bind("drag_stop.vakata",e.proxy(function(){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,this.data.dnd.off=!1,this.data.dnd.prepared=!1,this.data.dnd.w=!1,this.data.dnd.to1=!1,this.data.dnd.to2=!1,this.data.dnd.i1=!1,this.data.dnd.i2=!1,this.data.dnd.active=!1,this.data.dnd.foreign=!1,i&&i.css({top:"-2000px"}),r&&r.css({top:"-2000px"})},this)).bind("drag_start.vakata",e.proxy(function(t,n){if(n.data.jstree){var i=e(n.event.target);i.closest(".jstree").hasClass("jstree-"+this.get_index())&&this.dnd_enter(i)}},this));var o=this._get_settings().dnd;o.drag_target&&e(document).delegate(o.drag_target,"mousedown.jstree-"+this.get_index(),e.proxy(function(n){t=n.target,e.vakata.dnd.drag_start(n,{jstree:!0,obj:n.target},"<ins class='jstree-icon'></ins>"+e(n.target).text()),this.data.themes&&(i&&i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var o=this.get_container();this.data.dnd.cof=o.offset(),this.data.dnd.cw=parseInt(o.width(),10),this.data.dnd.ch=parseInt(o.height(),10),this.data.dnd.foreign=!0,n.preventDefault()},this)),o.drop_target&&e(document).delegate(o.drop_target,"mouseenter.jstree-"+this.get_index(),e.proxy(function(n){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:t,r:e(n.target),e:n})&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(o.drop_target,"mouseleave.jstree-"+this.get_index(),e.proxy(function(t){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(o.drop_target+", #jstree-marker-line","mouseup.jstree-"+this.get_index(),e.proxy(function(n){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:t,r:e(n.target),e:n})},this))},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(e){return!0},drop_finish:e.noop,drag_target:".jstree-draggable",drag_finish:e.noop,drag_check:function(e){return{after:!1,before:!1,inside:!0}}},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("drag_start.vakata").unbind("drag_stop.vakata"),t=!1},_fn:{dnd_prepare:function(){if(n&&n.length){if(this.data.dnd.off=n.offset(),this._get_settings().core.rtl&&(this.data.dnd.off.right=this.data.dnd.off.left+n.width()),this.data.dnd.foreign){var e=this._get_settings().dnd.drag_check.call(this,{o:t,r:n});return this.data.dnd.after=e.after,this.data.dnd.before=e.before,this.data.dnd.inside=e.inside,this.data.dnd.prepared=!0,this.dnd_show()}return this.prepare_move(t,n,"before"),this.data.dnd.before=this.check_move(),this.prepare_move(t,n,"after"),this.data.dnd.after=this.check_move(),this._is_loaded(n)?(this.prepare_move(t,n,"inside"),this.data.dnd.inside=this.check_move()):this.data.dnd.inside=!1,this.data.dnd.prepared=!0,this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var t,n=["before","inside","after"],o=!1,s=this._get_settings().core.rtl;switch(n=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=2*this.data.core.li_height/3?this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"],e.each(n,e.proxy(function(t,n){return this.data.dnd[n]?(e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"),o=n,!1):void 0},this)),o===!1&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),t=s?this.data.dnd.off.right-18:this.data.dnd.off.left+10,o){case"before":i.css({left:t+"px",top:this.data.dnd.off.top-6+"px"}).show(),r&&r.css({left:t+8+"px",top:this.data.dnd.off.top-1+"px"}).show();break;case"after":i.css({left:t+"px",top:this.data.dnd.off.top+this.data.core.li_height-6+"px"}).show(),r&&r.css({left:t+8+"px",top:this.data.dnd.off.top+this.data.core.li_height-1+"px"}).show();break;case"inside":i.css({left:t+(s?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show(),r&&r.hide();break;default:i.hide(),r&&r.hide()}return c=o,o}},dnd_open:function(){this.data.dnd.to2=!1,this.open_node(n,e.proxy(this.dnd_prepare,this),!0)},dnd_finish:function(e){this.data.dnd.foreign?(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)&&this._get_settings().dnd.drag_finish.call(this,{o:t,r:n,p:c}):(this.dnd_prepare(),this.move_node(t,n,c,e[this._get_settings().dnd.copy_modifier+"Key"])),t=!1,n=!1,i.hide(),r&&r.hide()},dnd_enter:function(t){this.data.dnd.mto&&(clearTimeout(this.data.dnd.mto),this.data.dnd.mto=!1);var i=this._get_settings().dnd;this.data.dnd.prepared=!1,n=this._get_node(t),i.check_timeout?(this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to1=setTimeout(e.proxy(this.dnd_prepare,this),i.check_timeout)):this.dnd_prepare(),i.open_timeout?(this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),n&&n.length&&n.hasClass("jstree-closed")&&(this.data.dnd.to2=setTimeout(e.proxy(this.dnd_open,this),i.open_timeout))):n&&n.length&&n.hasClass("jstree-closed")&&this.dnd_open()},dnd_leave:function(t){this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),i.hide(),r&&r.hide(),n&&n[0]===t.target.parentNode&&(this.data.dnd.to1&&(clearTimeout(this.data.dnd.to1),this.data.dnd.to1=!1),this.data.dnd.to2&&(clearTimeout(this.data.dnd.to2),this.data.dnd.to2=!1))},start_drag:function(n,o){t=this._get_node(n),this.data.ui&&this.is_selected(t)&&(t=this._get_node(null,!0));var s=t.length>1?this._get_string("multiple_selection"):this.get_text(t),a=this.get_container();this._get_settings().core.html_titles||(s=s.replace(/</gi,"&lt;").replace(/>/gi,"&gt;")),e.vakata.dnd.drag_start(o,{jstree:!0,obj:t},"<ins class='jstree-icon'></ins>"+s),this.data.themes&&(i&&i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),this.data.dnd.cof=a.offset(),this.data.dnd.cw=parseInt(a.width(),10),this.data.dnd.ch=parseInt(a.height(),10),this.data.dnd.active=!0}}}),e(function(){var t="#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";e.vakata.css.add_sheet({str:t,title:"jstree"}),i=e("<div />").attr({id:"jstree-marker"}).hide().html("&raquo;").bind("mouseleave mouseenter",function(e){return i.hide(),r.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1}).appendTo("body"),r=e("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){return n&&n.length?(n.children("a").trigger(e),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).bind("mouseleave",function(t){var o=e(t.relatedTarget);return(o.is(".jstree")||0===o.closest(".jstree").length)&&n&&n.length?(n.children("a").trigger(t),i.hide(),r.hide(),t.preventDefault(),t.stopImmediatePropagation(),!1):void 0}).appendTo("body"),e(document).bind("drag_start.vakata",function(e,t){t.data.jstree&&(i.show(),r&&r.show())}),e(document).bind("drag_stop.vakata",function(e,t){t.data.jstree&&(i.hide(),r&&r.hide())})})}(jQuery),function(e){e.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui,this.data.ui&&this.data.checkbox.noui&&(this.select_node=this.deselect_node=this.deselect_all=e.noop,this.get_selected=this.get_checked),this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",e.proxy(function(e,t){this._prepare_checkboxes(t.rslt.obj)},this)).bind("loaded.jstree",e.proxy(function(e){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",e.proxy(function(e){return e.preventDefault(),this._get_node(e.target).hasClass("jstree-checked")?this.uncheck_node(e.target):this.check_node(e.target),this.data.ui&&this.data.checkbox.noui?(this.save_selected(),void(this.data.cookies&&this.save_cookie("select_node"))):(e.stopImmediatePropagation(),!1)},this))},defaults:{override_ui:!1,two_state:!1,real_checkboxes:!1,checked_parent_open:!0,real_checkboxes_names:function(e){return["check_"+(e[0].id||Math.ceil(1e4*Math.random())),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(e,t){t.checked&&this.check_node(e,!1)},_prepare_checkboxes:function(t){if(t=t&&-1!=t?this._get_node(t):this.get_container().find("> ul > li"),t!==!1){var n,i,r=this,o=this._get_settings().checkbox.two_state,s=this._get_settings().checkbox.real_checkboxes,a=this._get_settings().checkbox.real_checkboxes_names;t.each(function(){i=e(this),n=i.is("li")&&(i.hasClass("jstree-checked")||s&&i.children(":checked").length)?"jstree-checked":"jstree-unchecked",i.find("li").andSelf().each(function(){var t,i=e(this);i.children("a"+(r.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(o?"jstree-unchecked":n),s&&(i.children(":checkbox").length?i.children(":checkbox").addClass("jstree-real-checkbox"):(t=a.call(r,i),i.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+t[0]+"' name='"+t[0]+"' value='"+t[1]+"' />"))),o?(i.hasClass("jstree-checked")||i.children(":checked").length)&&i.addClass("jstree-checked").children(":checkbox").prop("checked",!0):("jstree-checked"===n||i.hasClass("jstree-checked")||i.children(":checked").length)&&i.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",!0)})}),o||t.find(".jstree-checked").parent().parent().each(function(){r._repair_state(this)})}},change_state:function(t,n){t=this._get_node(t);var i=!1,r=this._get_settings().checkbox.real_checkboxes;if(!t||-1===t)return!1;if(n=n===!1||n===!0?n:t.hasClass("jstree-checked"),this._get_settings().checkbox.two_state)n?(t.removeClass("jstree-checked").addClass("jstree-unchecked"),r&&t.children(":checkbox").prop("checked",!1)):(t.removeClass("jstree-unchecked").addClass("jstree-checked"),r&&t.children(":checkbox").prop("checked",!0));else{if(n){if(i=t.find("li").andSelf(),!i.filter(".jstree-checked, .jstree-undetermined").length)return!1;i.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),r&&i.children(":checkbox").prop("checked",!1)}else{if(i=t.find("li").andSelf(),!i.filter(".jstree-unchecked, .jstree-undetermined").length)return!1;i.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),r&&i.children(":checkbox").prop("checked",!0),this.data.ui&&(this.data.ui.last_selected=t),this.data.checkbox.last_selected=t}t.parentsUntil(".jstree","li").each(function(){var t=e(this);if(n){if(t.children("ul").children("li.jstree-checked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),r&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),r&&t.children(":checkbox").prop("checked",!1)}else{if(t.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),r&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),r&&t.children(":checkbox").prop("checked",!0)}})}return this.data.ui&&this.data.checkbox.noui&&(this.data.ui.selected=this.get_checked()),this.__callback(t),!0},check_node:function(e){if(this.change_state(e,!1)){if(e=this._get_node(e),this._get_settings().checkbox.checked_parent_open){var t=this;e.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}this.__callback({obj:e})}},uncheck_node:function(e){this.change_state(e,!0)&&this.__callback({obj:this._get_node(e)})},check_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!1)}),this.__callback()},uncheck_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!0)}),this.__callback()},is_checked:function(e){return e=this._get_node(e),e.length?e.is(".jstree-checked"):!1},get_checked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-checked"):e.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-unchecked"):e.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(e){if(e=this._get_node(e),e.length){if(this._get_settings().checkbox.two_state)return void e.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!0);var t=this._get_settings().checkbox.real_checkboxes,n=e.find("> ul > .jstree-checked").length,i=e.find("> ul > .jstree-undetermined").length,r=e.find("> ul > li").length;0===r?e.hasClass("jstree-undetermined")&&this.change_state(e,!1):0===n&&0===i?this.change_state(e,!0):n===r?this.change_state(e,!1):(e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),t&&e.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1))}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var t=this,n=this.data.ui.to_select;n=e.map(e.makeArray(n),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.deselect_all(),e.each(n,function(e,n){t.check_node(n)}),this.__callback()}else this.__call_old()},save_loaded:function(){var e=this;this.data.core.to_load=[],this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&e.data.core.to_load.push("#"+this.id)})}}}),e(function(){var t=".jstree .jstree-real-checkbox { display:none; } ";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.vakata.xslt=function(t,n,i){var r,o,s,a,l="";return document.recalc?(r=document.createElement("xml"),o=document.createElement("xml"),r.innerHTML=t,o.innerHTML=n,e("body").append(r).append(o),setTimeout(function(t,n,i){return function(){i.call(null,t.transformNode(n.XMLDocument)),setTimeout(function(t,n){return function(){e(t).remove(),e(n).remove();
}}(t,n),200)}}(r,o,i),100),!0):("undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"==typeof window.XSLTProcessor&&(t=(new DOMParser).parseFromString(t,"text/xml"),n=(new DOMParser).parseFromString(n,"text/xml")),"undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"!=typeof window.XSLTProcessor?(s=new XSLTProcessor,(a=e.isFunction(s.transformDocument)?"undefined"!=typeof window.XMLSerializer:!0)?(t=(new DOMParser).parseFromString(t,"text/xml"),n=(new DOMParser).parseFromString(n,"text/xml"),e.isFunction(s.transformDocument)?(l=document.implementation.createDocument("","",null),s.transformDocument(t,n,l,null),i.call(null,(new XMLSerializer).serializeToString(l)),!0):(s.importStylesheet(n),l=s.transformToFragment(t,document),i.call(null,e("<div />").append(l).html()),!0)):!1):!1)};var t={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </ul></xsl:template></xsl:stylesheet>',flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) &gt; 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text>&#xa0;</xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text>&#xa0;</xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'},n=function(e){return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")};e.jstree.plugin("xml_data",{defaults:{data:!1,ajax:!1,xsl:"flat",clean_node:!1,correct_state:!0,get_skip_empty:!1,get_include_preamble:!0},_fn:{load_node:function(e,t,n){var i=this;this.load_node_xml(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){var n=this._get_settings().xml_data;return t=this._get_node(t),-1==t||!t||!n.ajax&&!e.isFunction(n.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_xml:function(t,n,i){var r=this.get_settings().xml_data,o=function(){},s=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!r.data&&!r.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(r.data):r.data.call(this,t,e.proxy(function(i){this.parse_xml(i,e.proxy(function(i){i&&(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10?(i=e(i),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),r.correct_state&&(this.correct_state(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},this))},this));break;case!!r.data&&!r.ajax||!!r.data&&!!r.ajax&&(!t||-1===t):t&&-1!=t||this.parse_xml(r.data,e.proxy(function(i){i?(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10&&(i=e(i),this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!r.data&&!!r.ajax||!!r.data&&!!r.ajax&&t&&-1!==t:o=function(e,n,o){var s=this.get_settings().xml_data.ajax.error;s&&s.call(this,e,n,o),-1!==t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&r.correct_state&&this.correct_state(t)):"success"===n&&r.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},s=function(i,s,a){i=a.responseText;var l=this.get_settings().xml_data.ajax.success;return l&&(i=l.call(this,i,s,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")?o.call(this,a,s,""):void this.parse_xml(i,e.proxy(function(i){i&&(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10?(i=e(i),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),r.correct_state&&(this.correct_state(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},this))},r.ajax.context=this,r.ajax.error=o,r.ajax.success=s,r.ajax.dataType||(r.ajax.dataType="xml"),e.isFunction(r.ajax.url)&&(r.ajax.url=r.ajax.url.call(this,t)),e.isFunction(r.ajax.data)&&(r.ajax.data=r.ajax.data.call(this,t)),e.ajax(r.ajax)}},parse_xml:function(n,i){var r=this._get_settings().xml_data;e.vakata.xslt(n,t[r.xsl],i)},get_xml:function(t,i,r,o,s){var a,l,c,u,d,h="",p=this._get_settings(),f=this;return t||(t="flat"),s||(s=0),i=this._get_node(i),i&&-1!==i||(i=this.get_container().find("> ul > li")),r=e.isArray(r)?r:["id","class"],!s&&this.data.types&&-1===e.inArray(p.types.type_attr,r)&&r.push(p.types.type_attr),o=e.isArray(o)?o:[],s||(p.xml_data.get_include_preamble&&(h+='<?xml version="1.0" encoding="UTF-8"?>'),h+="<root>"),i.each(function(){h+="<item",c=e(this),e.each(r,function(e,t){var i=c.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof i||(h+=" "+t+'="'+n((" "+(i||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),c.hasClass("jstree-open")&&(h+=' state="open"'),c.hasClass("jstree-closed")&&(h+=' state="closed"'),"flat"===t&&(h+=' parent_id="'+n(s)+'"'),h+=">",h+="<content>",u=c.children("a"),u.each(function(){a=e(this),d=!1,h+="<name",-1!==e.inArray("languages",p.plugins)&&e.each(p.languages,function(e,t){return a.hasClass(t)?(h+=' lang="'+n(t)+'"',d=t,!1):void 0}),o.length&&e.each(o,function(e,t){var i=a.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof i||(h+=" "+t+'="'+n((" "+i||"").replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),a.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(h+=' icon="'+n(a.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"'),a.children("ins").get(0).style.backgroundImage.length&&(h+=' icon="'+n(a.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/gi,"").replace(/"/gi,""))+'"'),h+=">",h+="<![CDATA["+f.get_text(a,d)+"]]>",h+="</name>"}),h+="</content>",l=c[0].id||!0,c=c.find("> ul > li"),l=c.length?f.get_xml(t,c,r,o,l):"","nest"==t&&(h+=l),h+="</item>","flat"==t&&(h+=l)}),s||(h+="</root>"),h}}})}(jQuery),function(e){e.expr[":"].jstree_contains=function(e,t,n){return(e.textContent||e.innerText||"").toLowerCase().indexOf(n[3].toLowerCase())>=0},e.expr[":"].jstree_title_contains=function(e,t,n){return(e.getAttribute("title")||"").toLowerCase().indexOf(n[3].toLowerCase())>=0},e.jstree.plugin("search",{__init:function(){this.data.search.str="",this.data.search.result=e(),this._get_settings().search.show_only_matches&&this.get_container().bind("search.jstree",function(t,n){e(this).children("ul").find("li").hide().removeClass("jstree-last"),n.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){e(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){e(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})},defaults:{ajax:!1,search_method:"jstree_contains",show_only_matches:!1},_fn:{search:function(t,n){if(""===e.trim(t))return void this.clear_search();var i=this.get_settings().search,r=this,o=function(){},s=function(){};return this.data.search.str=t,!n&&i.ajax!==!1&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0?(this.search.supress_callback=!0,o=function(){},s=function(e,t,n){var i=this.get_settings().search.ajax.success;i&&(e=i.call(this,e,t,n)||e),this.data.search.to_open=e,this._search_open()},i.ajax.context=this,i.ajax.error=o,i.ajax.success=s,e.isFunction(i.ajax.url)&&(i.ajax.url=i.ajax.url.call(this,t)),e.isFunction(i.ajax.data)&&(i.ajax.data=i.ajax.data.call(this,t)),i.ajax.data||(i.ajax.data={search_string:t}),i.ajax.dataType&&!/^json/.exec(i.ajax.dataType)||(i.ajax.dataType="json"),void e.ajax(i.ajax)):(this.data.search.result.length&&this.clear_search(),this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+i.search_method+"("+this.data.search.str+")"),this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){r.open_node(this,!1,!0)}),void this.__callback({nodes:this.data.search.result,str:t}))},clear_search:function(t){this.data.search.result.removeClass("jstree-search"),this.__callback(this.data.search.result),this.data.search.result=e()},_search_open:function(t){var n=this,i=!0,r=[],o=[];this.data.search.to_open.length&&(e.each(this.data.search.to_open,function(t,n){return"#"==n?!0:void(e(n).length&&e(n).is(".jstree-closed")?r.push(n):o.push(n))}),r.length&&(this.data.search.to_open=o,e.each(r,function(e,t){n.open_node(t,function(){n._search_open(!0)})}),i=!1)),i&&this.search(this.data.search.str,!0)}}})}(jQuery),function(e){e.vakata.context={hide_on_mouseleave:!1,cnt:e("<div id='vakata-contextmenu' />"),vis:!1,tgt:!1,par:!1,func:!1,data:!1,rtl:!1,show:function(t,n,i,r,o,s,a){e.vakata.context.rtl=!!a;var l,c,u=e.vakata.context.parse(t);u&&(e.vakata.context.vis=!0,e.vakata.context.tgt=n,e.vakata.context.par=s||n||null,e.vakata.context.data=o||null,e.vakata.context.cnt.html(u).css({visibility:"hidden",display:"block",left:0,top:0}),e.vakata.context.hide_on_mouseleave&&e.vakata.context.cnt.one("mouseleave",function(t){e.vakata.context.hide()}),l=e.vakata.context.cnt.height(),c=e.vakata.context.cnt.width(),i+c>e(document).width()&&(i=e(document).width()-(c+5),e.vakata.context.cnt.find("li > ul").addClass("right")),r+l>e(document).height()&&(r-=l+n[0].offsetHeight,e.vakata.context.cnt.find("li > ul").addClass("bottom")),e.vakata.context.cnt.css({left:i,top:r}).find("li:has(ul)").bind("mouseenter",function(t){var n=e(document).width(),i=e(document).height(),r=e(this).children("ul").show();n!==e(document).width()&&r.toggleClass("right"),i!==e(document).height()&&r.toggleClass("bottom")}).bind("mouseleave",function(t){e(this).children("ul").hide()}).end().css({visibility:"visible"}).show(),e(document).triggerHandler("context_show.vakata"))},hide:function(){e.vakata.context.vis=!1,e.vakata.context.cnt.attr("class","").css({visibility:"hidden"}),e(document).triggerHandler("context_hide.vakata")},parse:function(t,n){if(!t)return!1;var i="",r=!1,o=!0;return n||(e.vakata.context.func={}),i+="<ul>",e.each(t,function(t,n){return n?(e.vakata.context.func[t]=n.action,!o&&n.separator_before&&(i+="<li class='vakata-separator vakata-separator-before'></li>"),o=!1,i+="<li class='"+(n._class||"")+(n._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ",n.icon&&-1===n.icon.indexOf("/")&&(i+=" class='"+n.icon+"' "),n.icon&&-1!==n.icon.indexOf("/")&&(i+=" style='background:url("+n.icon+") center center no-repeat;' "),i+=">&#160;</ins><a href='#' rel='"+t+"'>",n.submenu&&(i+="<span style='float:"+(e.vakata.context.rtl?"left":"right")+";'>&raquo;</span>"),i+=n.label+"</a>",n.submenu&&(r=e.vakata.context.parse(n.submenu,!0),r&&(i+=r)),i+="</li>",void(n.separator_after&&(i+="<li class='vakata-separator vakata-separator-after'></li>",o=!0))):!0}),i=i.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,""),i+="</ul>",e(document).triggerHandler("context_parse.vakata"),i.length>10?i:!1},exec:function(t){return e.isFunction(e.vakata.context.func[t])?(e.vakata.context.func[t].call(e.vakata.context.data,e.vakata.context.par),!0):!1}},e(function(){var t="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ";e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var n=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();n.length||(n=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),n.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var n=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();n.length||(n=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),n.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,n,i){t=this._get_node(t);var r=this.get_settings().contextmenu,o=t.children("a:visible:eq(0)"),s=!1,a=!1;r.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(r.show_at_node||"undefined"==typeof n||"undefined"==typeof i)&&(s=o.offset(),n=s.left,i=s.top+this.data.core.li_height),a=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:r.items,e.isFunction(a)&&(a=a.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(a,o,n,i,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var n=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=n.types,i=n.type_attr,r="",o=this;t.each(e,function(e,n){return t.each(n,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||o.data.types.attach_to.push(e)}),n.icon?void((n.icon.image||n.icon.position)&&(r+="default"==e?".jstree-"+o.get_index()+" a > .jstree-icon { ":".jstree-"+o.get_index()+" li["+i+'="'+e+'"] > a > .jstree-icon { ',n.icon.image&&(r+=" background-image:url("+n.icon.image+"); "),r+=n.icon.position?" background-position:"+n.icon.position+"; ":" background-position:0 0; ",r+="} ")):!0}),""!==r&&t.vakata.css.add_sheet({str:r,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,n){var i,r,o=this._get_settings().types.use_data?this._get_node(n.args[0]):!1,s=o&&-1!==o&&o.length?o.data("jstree"):!1;if(s&&s.types&&s.types[n.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(n.func,this.data.types.attach_to)){if(!n.args[0]||!n.args[0].tagName&&!n.args[0].jquery)return;if(i=this._get_settings().types.types,r=this._get_type(n.args[0]),(i[r]&&"undefined"!=typeof i[r][n.func]||i["default"]&&"undefined"!=typeof i["default"][n.func])&&this._check(n.func,n.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,n){var i=n&&n.rslt&&n.rslt.obj&&-1!==n.rslt.obj?this._get_node(n.rslt.obj).parent():this.get_container_ul(),r=!1,o=this._get_settings().types;t.each(o.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(r="default"===e?i.find("li > a > .jstree-icon"):i.find("li["+o.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&r.css("backgroundImage","url("+t.icon.image+")"),r.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var n=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return n&&this.__callback({obj:t,type:e}),n},_check:function(e,n,i){n=this._get_node(n);var r=!1,o=this._get_type(n),s=0,a=this,l=this._get_settings().types,c=!1;if(-1===n){if(!l[e])return;r=l[e]}else{if(o===!1)return;c=l.use_data?n.data("jstree"):!1,c&&c.types&&"undefined"!=typeof c.types[e]?r=c.types[e]:l.types[o]&&"undefined"!=typeof l.types[o][e]?r=l.types[o][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(r=l.types["default"][e])}return t.isFunction(r)&&(r=r.call(this,n)),"max_depth"===e&&-1!==n&&i!==!1&&-2!==l.max_depth&&0!==r&&n.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(r=0,!1):(s=0===t?r:a._check(e,this,!1),-1!==s&&0>=s-(t+1)?(r=0,!1):(s>=0&&(r>s-(t+1)||0>r)&&(r=s-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<r||0>r)&&(r=l.max_depth-(t+1)))))}),r},check_move:function(){if(!this.__call_old())return!1;var e,n=this._get_move(),i=n.rt._get_settings().types,r=n.rt._check("max_children",n.cr),o=n.rt._check("max_depth",n.cr),s=n.rt._check("valid_children",n.cr),a=0,l=1;if("none"===s)return!1;if(t.isArray(s)&&n.ot&&n.ot._get_type&&(n.o.each(function(){return-1===t.inArray(n.ot._get_type(this),s)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==i.max_children&&-1!==r&&(a=-1===n.cr?this.get_container().find("> ul > li").not(n.o).length:n.cr.find("> ul > li").not(n.o).length,a+n.o.length>r))return!1;if(-2!==i.max_depth&&-1!==o){if(l=0,0===o)return!1;if("undefined"==typeof n.o.d){for(e=n.o;e.length>0;)e=e.find("> ul > li"),l++;n.o.d=l}if(o-n.o.d<0)return!1}return!0},create_node:function(e,n,i,r,o,s){if(!s&&(o||this._is_loaded(e))){var a,l="string"==typeof n&&n.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),c=this._get_settings().types,u=this._check("max_children",l),d=this._check("max_depth",l),h=this._check("valid_children",l);if("string"==typeof i&&(i={data:i}),i||(i={}),"none"===h)return!1;if(t.isArray(h))if(i.attr&&i.attr[c.type_attr]){if(-1===t.inArray(i.attr[c.type_attr],h))return!1}else i.attr||(i.attr={}),i.attr[c.type_attr]=h[0];if(-2!==c.max_children&&-1!==u&&(a=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,a+1>u))return!1;if(-2!==c.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,n,i,r,o,s)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,n){var i=this;this.load_node_html(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,n,i){var r,o=this.get_settings().html_data,s=function(){},a=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(o.data):o.data.call(this,t,e.proxy(function(i){i&&""!==i&&i.toString&&""!==i.toString().replace(/^[\s\n]+$/,"")?(i=e(i),i.is("ul")||(i=e("<ul />").append(i)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&(this.correct_state(t),n&&n.call(this))):o.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!o.data&&!o.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),n&&n.call(this);break;case!!o.data&&!o.ajax||!!o.data&&!!o.ajax&&(!t||-1===t):t&&-1!=t||(r=e(o.data),r.is("ul")||(r=e("<ul />").append(r)),this.get_container().children("ul").empty().append(r.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),n&&n.call(this);break;case!o.data&&!!o.ajax||!!o.data&&!!o.ajax&&t&&-1!==t:t=this._get_node(t),s=function(e,n,r){var s=this.get_settings().html_data.ajax.error;s&&s.call(this,e,n,r),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&o.correct_state&&this.correct_state(t)):"success"===n&&o.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},a=function(i,r,a){var l=this.get_settings().html_data.ajax.success;return l&&(i=l.call(this,i,r,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")?s.call(this,a,r,""):void(i?(i=e(i),i.is("ul")||(i=e("<ul />").append(i)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&(this.correct_state(t),n&&n.call(this))):o.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},o.ajax.context=this,o.ajax.error=s,o.ajax.success=a,o.ajax.dataType||(o.ajax.dataType="html"),e.isFunction(o.ajax.url)&&(o.ajax.url=o.ajax.url.call(this,t)),e.isFunction(o.ajax.data)&&(o.ajax.data=o.ajax.data.call(this,t)),e.ajax(o.ajax)}}}}),e.jstree.defaults.plugins.push("html_data");
}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(n){e(n.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,n){n.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_h).not(n.rslt.obj).removeClass(t.item_h),n.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,n=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(n=n.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+n.join(", .")).removeClass(n.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,n){var i,r,o=[],s=!0;return"move_node"==n.func&&n.args[4]===!0&&n.args[0].o&&n.args[0].o.length&&(n.args[0].o.children("a").each(function(){o.push(e(this).text().replace(/^\s+/g,""))}),s=this._check_unique(o,n.args[0].np.find("> ul > li").not(n.args[0].o),"move_node")),"create_node"==n.func&&(n.args[4]||this._is_loaded(n.args[0]))&&(i=this._get_node(n.args[0]),!n.args[1]||"before"!==n.args[1]&&"after"!==n.args[1]||(i=this._get_parent(n.args[0]),i&&-1!==i||(i=this.get_container())),"string"==typeof n.args[2]?o.push(n.args[2]):n.args[2]&&n.args[2].data?o.push(n.args[2].data):o.push(this._get_string("new_node")),s=this._check_unique(o,i.find("> ul > li"),"create_node")),"rename_node"==n.func&&(o.push(n.args[1]),r=this._get_node(n.args[0]),i=this._get_parent(r),i&&-1!==i||(i=this.get_container()),s=this._check_unique(o,i.find("> ul > li").not(r),"rename_node")),s?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,n,i){var r=[],o=!0;return n.children("a").each(function(){r.push(e(this).text().replace(/^\s+/g,""))}),r.length&&t.length?(e.each(t,function(t,n){return-1!==e.inArray(n,r)?(o=!1,!1):void 0}),o||this._get_settings().unique.error_callback.call(null,t,n,i),o):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),n=[];return t.o&&t.o.length?(t.o.children("a").each(function(){n.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(n,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(i){i.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",i.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",i.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",i.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",i.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",i.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((i(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",i.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var n=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");n.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=i(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",i.proxy(function(e){return e.stopImmediatePropagation(),i(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",i.proxy(function(e){i(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&i.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){i(this).find("li").andSelf().each(function(){var e=i(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'>&#160;</span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),n=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==n&&(this.data.wholerow.last_html=n,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),i(function(){var r=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";n&&(r+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(r+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),i.vakata.css.add_sheet({str:r,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],n=function(t,n){var i=!0;return t=t||{},n=[].concat(n),e.each(n,function(n,r){return e.isFunction(t[r])?void 0:(i=!1,!1)}),i};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(i,r){var o=-1==i?this._get_settings().model.object:i.data("jstree_model");return n(o,t)?void(this._get_settings().model.async?o.getChildren(e.proxy(function(e){this.model_done(e,r)},this)):this.model_done(o.getChildren(),r)):r.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,n){var i=[],r=this._get_settings(),o=this;e.isArray(t)||(t=[t]),e.each(t,function(t,n){var s=n.getProps()||{};s.attr=n.getAttr()||{},n.getChildrenCount()&&(s.state="closed"),s.data=n.getName(),e.isArray(s.data)||(s.data=[s.data]),o.data.types&&e.isFunction(n.getType)&&(s.attr[r.types.type_attr]=n.getType()),s.attr.id&&r.model.id_prefix&&(s.attr.id=r.model.id_prefix+s.attr.id),s.metadata||(s.metadata={}),s.metadata.jstree_model=n,i.push(s)}),n.call(null,i)}}})}(jQuery)}}()},{}],"bootstrap-collapse":[function(e,t,n){!function(i,r){if("function"==typeof define&&define.amd)define(["exports","module","./util"],r);else if("undefined"!=typeof n&&"undefined"!=typeof t)r(n,t,e("./util"));else{var o={exports:{}};r(o.exports,o,i.Util),i.collapse=o.exports}}(this,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=i(n),a=function(e){var t="collapse",n="4.0.0-alpha",i="bs.collapse",a="."+i,l=".data-api",c=e.fn[t],u=600,d={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},p={SHOW:"show"+a,SHOWN:"shown"+a,HIDE:"hide"+a,HIDDEN:"hidden"+a,CLICK_DATA_API:"click"+a+l},f={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},g={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},v=function(){function a(t,n){r(this,a),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],'+('[data-toggle="collapse"][data-target="#'+t.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return o(a,[{key:"toggle",value:function(){e(this._element).hasClass(f.IN)?this.hide():this.show()}},{key:"show",value:function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(f.IN)){var n=void 0,r=void 0;if(this._parent&&(n=e.makeArray(e(m.ACTIVES)),n.length||(n=null)),!(n&&(r=e(n).data(i),r&&r._isTransitioning))){var o=e.Event(p.SHOW);if(e(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call(e(n),"hide"),r||e(n).data(i,null));var l=this._getDimension();e(this._element).removeClass(f.COLLAPSE).addClass(f.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&e(this._triggerArray).removeClass(f.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var c=function(){e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).addClass(f.IN),t._element.style[l]="",t.setTransitioning(!1),e(t._element).trigger(p.SHOWN)};if(!s["default"].supportsTransitionEnd())return void c();var d=l[0].toUpperCase()+l.slice(1),h="scroll"+d;e(this._element).one(s["default"].TRANSITION_END,c).emulateTransitionEnd(u),this._element.style[l]=this._element[h]+"px"}}}}},{key:"hide",value:function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(f.IN)){var n=e.Event(p.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===g.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",s["default"].reflow(this._element),e(this._element).addClass(f.COLLAPSING).removeClass(f.COLLAPSE).removeClass(f.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&e(this._triggerArray).addClass(f.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var o=function(){t.setTransitioning(!1),e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).trigger(p.HIDDEN)};return this._element.style[i]=0,s["default"].supportsTransitionEnd()?void e(this._element).one(s["default"].TRANSITION_END,o).emulateTransitionEnd(u):void o()}}}},{key:"setTransitioning",value:function(e){this._isTransitioning=e}},{key:"dispose",value:function(){e.removeData(this._element,i),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(n){return n=e.extend({},d,n),n.toggle=Boolean(n.toggle),s["default"].typeCheckConfig(t,n,h),n}},{key:"_getDimension",value:function(){var t=e(this._element).hasClass(g.WIDTH);return t?g.WIDTH:g.HEIGHT}},{key:"_getParent",value:function(){var t=this,n=e(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(i).each(function(e,n){t._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n}},{key:"_addAriaAndCollapsedClass",value:function(t,n){if(t){var i=e(t).hasClass(f.IN);t.setAttribute("aria-expanded",i),n.length&&e(n).toggleClass(f.COLLAPSED,!i).attr("aria-expanded",i)}}}],[{key:"_getTargetFromElement",value:function(t){var n=s["default"].getSelectorFromElement(t);return n?e(n)[0]:null}},{key:"_jQueryInterface",value:function(t){return this.each(function(){var n=e(this),r=n.data(i),o=e.extend({},d,n.data(),"object"==typeof t&&t);if(!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||(r=new a(this,o),n.data(i,r)),"string"==typeof t){if(void 0===r[t])throw new Error('No method named "'+t+'"');r[t]()}})}},{key:"VERSION",get:function(){return n}},{key:"Default",get:function(){return d}}]),a}();return e(document).on(p.CLICK_DATA_API,m.DATA_TOGGLE,function(t){t.preventDefault();var n=v._getTargetFromElement(this),r=e(n).data(i),o=r?"toggle":e(this).data();v._jQueryInterface.call(e(n),o)}),e.fn[t]=v._jQueryInterface,e.fn[t].Constructor=v,e.fn[t].noConflict=function(){return e.fn[t]=c,v._jQueryInterface},v}(jQuery);t.exports=a})},{"./util":309}],"components/breadcrumb/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item"},c["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},c["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text))]}))},t}(d["default"]);h.propTypes={crumbs:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-action/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleClick=i.handleClick.bind(i),i}return a(t,e),t.prototype.render=function(){var e={type:this.props.type,className:this.getButtonClasses(),disabled:this.props.disabled,onClick:this.handleClick};return"undefined"!=typeof this.props.id&&(e.id=this.props.id),c["default"].createElement("button",e,this.getLoadingIcon(),this.props.label)},t.prototype.getButtonClasses=function(){var e=["btn"];return e.push("btn-"+this.props.bootstrapButtonStyle),"undefined"==typeof this.props.label&&e.push("no-text"),"undefined"!=typeof this.props.icon&&e.push("font-icon-"+this.props.icon),this.props.loading===!0&&e.push("btn--loading"),this.props.disabled===!0&&e.push("disabled"),"undefined"!=typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")},t.prototype.getLoadingIcon=function(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("svg",{viewBox:"0 0 44 12"},c["default"].createElement("circle",{cx:"6",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"22",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"38",cy:"6",r:"6"}))):null},t.prototype.handleClick=function(e){"undefined"!=typeof this.props.handleClick&&this.props.handleClick(e)},t}(d["default"]);h.propTypes={id:c["default"].PropTypes.string,handleClick:c["default"].PropTypes.func,label:c["default"].PropTypes.string,type:c["default"].PropTypes.string,loading:c["default"].PropTypes.bool,icon:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,bootstrapButtonStyle:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string},h.defaultProps={type:"button",bootstrapButtonStyle:"secondary",disabled:!1},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-builder/index":[function(e,t,n){"use strict";function i(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}function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 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):o(e,t))}function c(e){return{schemas:e.schemas}}function u(e){return{actions:(0,g.bindActionCreators)(v,e)}}Object.defineProperty(n,"__esModule",{value:!0}),n.FormBuilderComponent=void 0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},h=e("react"),p=r(h),f=e("react-redux"),g=e("redux"),m=e("state/schema/actions"),v=i(m),_=e("silverstripe-component"),y=r(_),b=e("components/form/index"),x=r(b),w=e("components/text-field/index"),j=r(w),C=e("components/hidden-field/index"),k=r(C),E=e("components/grid-field/index"),T=r(E),D=e("isomorphic-fetch"),S=r(D),P=e("deep-freeze"),O=r(P),M=e("es6-promise"),R=r(M);R["default"].polyfill();var N={components:{TextField:j["default"],GridField:T["default"],HiddenField:k["default"]},getComponentByName:function(e){return this.components[e]},getComponentByDataType:function(e){switch(e){case"String":return this.components.TextField;case"Hidden":return this.components.HiddenField;case"Custom":return this.components.GridField;default:return null}}},I=n.FormBuilderComponent=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.formSchemaPromise=null,i.state={isFetching:!1},i.mapFieldsToComponents=i.mapFieldsToComponents.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){this.fetch()},t.prototype.fetch=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],n=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=[];return this.state.isFetching===!0?this.formSchemaPromise:(t===!0&&i.push("schema"),n===!0&&i.push("state"),this.formSchemaPromise=(0,S["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":i.join()},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(t){e.setState({isFetching:!1}),e.props.actions.setSchema(t)}),this.formSchemaPromise)},t.prototype.mapFieldsToComponents=function(e){var t=this.props.createFn;return e.map(function(e,n){var i=null!==e.component?N.getComponentByName(e.component):N.getComponentByDataType(e.type);if(null===i)return null;var r=(0,O["default"])(e);return"function"==typeof t?t(i,r):p["default"].createElement(i,d({key:n},r))})},t.prototype.render=function(){var e=this.props.schemas[this.props.schemaUrl];if(!e)return null;var t=d({},e.schema.attributes,{"class":null,className:e.schema.attributes["class"],enctype:null,encType:e.schema.attributes.enctype}),n={actions:e.schema.actions,attributes:t,data:e.schema.data,fields:e.schema.fields,mapFieldsToComponents:this.mapFieldsToComponents};return p["default"].createElement(x["default"],n)},t}(y["default"]);I.propTypes={actions:p["default"].PropTypes.object.isRequired,createFn:p["default"].PropTypes.func,schemaUrl:p["default"].PropTypes.string.isRequired,schemas:p["default"].PropTypes.object.isRequired},n["default"]=(0,f.connect)(c,u)(I)},{"components/form/index":"components/form/index","components/grid-field/index":"components/grid-field/index","components/hidden-field/index":"components/hidden-field/index","components/text-field/index":"components/text-field/index","deep-freeze":"deep-freeze","es6-promise":317,"isomorphic-fetch":318,react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/schema/actions":8}],"components/form/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("components/form-action/index"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.getFormActionComponents=function(){return this.props.actions.map(function(e){return c["default"].createElement(p["default"],e)})},t.prototype.render=function(){var e=this.props.attributes,t=this.props.mapFieldsToComponents(this.props.fields),n=this.getFormActionComponents();return c["default"].createElement("form",e,t&&c["default"].createElement("fieldset",{className:"form-group"},t),n&&c["default"].createElement("div",{className:"actions-fix-btm"},c["default"].createElement("div",{className:"btn-group",role:"group"},n)))},t}(d["default"]);f.propTypes={actions:c["default"].PropTypes.array,attributes:c["default"].PropTypes.shape({action:c["default"].PropTypes.string.isRequired,className:c["default"].PropTypes.string,encType:c["default"].PropTypes.string,id:c["default"].PropTypes.string,method:c["default"].PropTypes.string.isRequired}),data:c["default"].PropTypes.array,fields:c["default"].PropTypes.array.isRequired,mapFieldsToComponents:c["default"].PropTypes.func.isRequired},n["default"]=f},{"components/form-action/index":"components/form-action/index",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/cell/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleDrillDown=i.handleDrillDown.bind(i),i}return a(t,e),t.prototype.render=function(){var e={className:"grid-field__cell "+this.props.className,onClick:this.handleDrillDown};return c["default"].createElement("td",e,this.props.children)},t.prototype.handleDrillDown=function(e){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(e)},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number,handleDrillDown:c["default"].PropTypes.func},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header-cell":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("th",null,this.props.children);
},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("./row"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement(p["default"],null,this.props.children)},t}(d["default"]);n["default"]=f},{"./row":"components/grid-field/row",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/index":[function(e,t,n){"use strict";function i(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}function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 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):o(e,t))}function c(e,t){var n=t.data?t.data.recordType:null;return{records:e.records&&n?e.records[n]:{}}}function u(e){return{actions:(0,p.bindActionCreators)(P,e)}}Object.defineProperty(n,"__esModule",{value:!0});var d=e("react"),h=r(d),p=e("redux"),f=e("react-redux"),g=e("silverstripe-component"),m=r(g),v=e("./table"),_=r(v),y=e("./header"),b=r(y),x=e("./header-cell"),w=r(x),j=e("./row"),C=r(j),k=e("./cell"),E=r(k),T=e("./action"),D=r(T),S=e("state/records/actions"),P=i(S),O=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.deleteRecord=i.deleteRecord.bind(i),i.editRecord=i.editRecord.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.props.data;this.props.actions.fetchRecords(t.recordType,t.collectionReadEndpoint.method,t.collectionReadEndpoint.url)},t.prototype.render=function(){var e=this,t=this.props.records,n=this.props.data.handleDrillDown;if(!t)return h["default"].createElement("div",null);var i=this.props.data.columns,r=h["default"].createElement("th",{className:"grid-field__action-placeholder"}),o=i.map(function(e,t){return h["default"].createElement(w["default"],{key:t},e.name)}),s=h["default"].createElement(b["default"],null,o.concat(r)),a=Object.keys(t).map(function(r){var o=t[r],s=i.map(function(e,t){var i=e.field.split(".").reduce(function(e,t){return e[t]},o),r={handleDrillDown:n?function(e){return n(e,o)}:null,className:n?"grid-field__cell--drillable":"",key:t,width:e.width};return h["default"].createElement(E["default"],r,i)}),a=h["default"].createElement(E["default"],{key:r+"-actions"},h["default"].createElement(D["default"],{icon:"cog",handleClick:e.editRecord,key:"action-"+r+"-edit",record:o}),h["default"].createElement(D["default"],{icon:"cancel",handleClick:e.deleteRecord,key:"action-"+r+"-delete",record:o})),l={key:r,className:n?"grid-field__row--drillable":""};return h["default"].createElement(C["default"],l,s.concat(a))});return h["default"].createElement(_["default"],{header:s,rows:a})},t.prototype.deleteRecord=function(e,t){e.preventDefault(),this.props.actions.deleteRecord(this.props.data.recordType,t,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url)},t.prototype.editRecord=function(e){e.preventDefault()},t}(m["default"]);O.propTypes={data:h["default"].PropTypes.shape({recordType:h["default"].PropTypes.string.isRequired,headerColumns:h["default"].PropTypes.array,collectionReadEndpoint:h["default"].PropTypes.object,handleDrillDown:h["default"].PropTypes.func})},n["default"]=(0,f.connect)(c,u)(O)},{"./action":2,"./cell":"components/grid-field/cell/index","./header":"components/grid-field/header","./header-cell":"components/grid-field/header-cell","./row":"components/grid-field/row","./table":"components/grid-field/table",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/records/actions":6}],"components/grid-field/row":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){var e="grid-field__row "+this.props.className;return c["default"].createElement("tr",{tabIndex:"0",className:e},this.props.children)},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/table":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"container-fluid grid-field"},c["default"].createElement("table",{className:"table table-hover grid-field__table"},c["default"].createElement("thead",null,this.generateHeader()),c["default"].createElement("tbody",null,this.generateRows())))},t.prototype.generateHeader=function(){return"undefined"!=typeof this.props.header?this.props.header:("undefined"!=typeof this.props.data,null)},t.prototype.generateRows=function(){return"undefined"!=typeof this.props.rows?this.props.rows:("undefined"!=typeof this.props.data,null)},t}(d["default"]);h.propTypes={data:c["default"].PropTypes.object,header:c["default"].PropTypes.object,rows:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/hidden-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field hidden"},c["default"].createElement("input",this.getInputProps()))},t.prototype.getInputProps=function(){return{className:["hidden",this.props.extraClass].join(" "),id:this.props.name,name:this.props.name,onChange:this.props.onChange,type:"hidden",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/north-header/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"north-header"},c["default"].createElement("div",{className:"north-header__navigation"},this.props.children))},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/text-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field text"},this.props.label&&c["default"].createElement("label",{className:"left",htmlFor:"gallery_"+this.props.name},this.props.label),c["default"].createElement("div",{className:"middleColumn"},c["default"].createElement("input",this.getInputProps())))},t.prototype.getInputProps=function(){return{className:["text",this.props.extraClass].join(" "),id:"gallery_"+this.props.name,name:this.props.name,onChange:this.props.onChange,type:"text",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],config:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e)}return e.getSection=function(e){return window.ss.config.sections[e]},e.getTopLevelRoutes=function(){var e=[];return Object.keys(window.ss.config.sections).forEach(function(t){var n=window.ss.config.sections[t].route,i=n.match(/^admin\/[^\/]+(\/?)$/);if(i){i[1]||(n+="/");var r=-1===e.indexOf(n);r&&e.push(n)}}),e},e}();n["default"]=r},{}],"deep-freeze":[function(e,t,n){t.exports=function i(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){!e.hasOwnProperty(t)||null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||i(e[t])}),e}},{}],i18n:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return e.prototype.setLocale=function(e){this.currentLocale=e},e.prototype.getLocale=function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale},e.prototype._t=function(e,t,n,i){var r=this.getLocale().replace(/_[\w]+/i,""),o=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[r]&&this.lang[r][e]?this.lang[r][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[o]&&this.lang[o][e]?this.lang[o][e]:t?t:""},e.prototype.addDictionary=function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var n in t)this.lang[e][n]=t[n]},e.prototype.getDictionary=function(e){return this.lang[e]},e.prototype.stripStr=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.prototype.stripStrML=function(e){for(var t=e.split("\n"),n=0;n<t.length;n+=1)t[n]=stripStr(t[n]);return stripStr(t.join(" "))},e.prototype.sprintf=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];if(0===n.length)return e;var r=new RegExp("(.?)(%s)","g"),o=0;return e.replace(r,function(e,t,i,r,s){return"%"===t?e:t+n[o++]})},e.prototype.inject=function(e,t){var n=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(n,function(e,n,i,r){return t[n]?t[n]:e})},e.prototype.detectLocale=function(){var t,n;if(t=jQuery("body").attr("lang"),!t)for(var i=document.getElementsByTagName("meta"),r=0;r<i.length;r++)i[r].attributes["http-equiv"]&&"content-language"==i[r].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=i[r].attributes.content.nodeValue);t||(t=this.defaultLocale);var o=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var s in e.lang)if(s.substr(0,2).toLowerCase()==t.toLowerCase()){n=s;break}}else o&&(n=o[1].toLowerCase()+"_"+o[2].toUpperCase());return n},e.prototype.addEvent=function(e,t,n,i){return e.addEventListener?(e.addEventListener(t,n,i),!0):e.attachEvent?e.attachEvent("on"+t,n):void console.log("Handler could not be attached")},e}(),o=new r;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=o,n["default"]=o},{}],jQuery:[function(e,t,n){"use strict";var i="undefined"!=typeof window.jQuery?window.jQuery:null;t.exports=i},{}],"react-addons-css-transition-group":[function(e,t,n){t.exports=e("react/lib/ReactCSSTransitionGroup")},{"react/lib/ReactCSSTransitionGroup":363}],"react-addons-test-utils":[function(e,t,n){t.exports=e("react/lib/ReactTestUtils")},{"react/lib/ReactTestUtils":420}],"react-dom":[function(e,t,n){"use strict";t.exports=e("react/lib/ReactDOM")},{"react/lib/ReactDOM":373}],"react-redux":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0,n.connect=n.Provider=void 0;var r=e("./components/Provider"),o=i(r),s=e("./components/connect"),a=i(s);n.Provider=o["default"],n.connect=a["default"]},{"./components/Provider":326,"./components/connect":327}],react:[function(e,t,n){"use strict";t.exports=e("./lib/React")},{"./lib/React":360}],"reducer-register":[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r={},o=function(){function e(){i(this,e)}return e.prototype.add=function(e,t){if("undefined"!=typeof r[e])throw new Error("Reducer already exists at '"+e+"'");r[e]=t},e.prototype.getAll=function(){return r},e.prototype.getByKey=function(e){return r[e]},e.prototype.remove=function(e){delete r[e]},e}(),s=new o;n["default"]=s},{}],"redux-thunk":[function(e,t,n){"use strict";function i(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){return"function"==typeof i?i(t,n):e(i)}}}t.exports=i},{}],redux:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var r=e("./createStore"),o=i(r),s=e("./utils/combineReducers"),a=i(s),l=e("./utils/bindActionCreators"),c=i(l),u=e("./utils/applyMiddleware"),d=i(u),h=e("./utils/compose"),p=i(h);n.createStore=o["default"],n.combineReducers=a["default"],n.bindActionCreators=c["default"],n.applyMiddleware=d["default"],n.compose=p["default"]},{"./createStore":499,"./utils/applyMiddleware":500,"./utils/bindActionCreators":501,"./utils/combineReducers":502,"./utils/compose":503}],router:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=this.getAbsoluteBase(),n=d["default"].resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,i,r){return e(c["default"].resolveURLToBase(t),n,i,r)}}function s(e){var t=new c["default"].Route(e);return t.match(c["default"].current,{})}function a(){var e=window.document.getElementsByTagName("base");return e&&e[0]?e[0].href:null}Object.defineProperty(n,"__esModule",{value:!0});var l=e("page.js"),c=i(l),u=e("url"),d=i(u);c["default"].getAbsoluteBase=a.bind(c["default"]),c["default"].resolveURLToBase=r.bind(c["default"]),c["default"].show=o(c["default"].show),c["default"].routeAppliesToCurrentLocation=s,n["default"]=c["default"]},{"page.js":320,url:315}],"silverstripe-backend":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){var t=void 0,n=void 0;if(!(e.status>=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n;return t=e}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=e("isomorphic-fetch"),c=i(l),u=e("es6-promise"),d=i(u),h=e("qs"),p=i(h),f=e("merge"),g=i(f);d["default"].polyfill();var m=function(){function e(){o(this,e),this.fetch=c["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return p["default"].stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function n(e,t){switch(e){case"application/x-www-form-urlencoded":return p["default"].parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function i(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function o(e){return e.text().then(function(t){return n(e.headers.get("Content-Type"),t)})}function s(e,t){return Object.keys(t).reduce(function(n,i){var o=e[i];return!o||o.remove!==!0&&o.querystring!==!0?a(n,r({},i,t[i])):n},{})}function l(e,n,o){var s=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],l=n,c=Object.keys(o).reduce(function(t,n){var i=e[n],l=s.setFromData===!0&&!(i&&i.remove===!0),c=i&&i.querystring===!0&&i.remove!==!0;return l||c?a(t,r({},n,o[n])):t},{});return l=i(l,t("application/x-www-form-urlencoded",c)),l=Object.keys(e).reduce(function(t,n){var i=e[n].urlReplacement;return i?t.replace(i,o[n]):t},l)}var c=this,u=a({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),d={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){d[u[e]]&&(u[e]=d[u[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n={Accept:u.responseFormat,"Content-Type":u.payloadFormat},i=g["default"].recursive({},u.defaultData,e),r=l(u.payloadSchema,u.url,i,{setFromData:"get"===u.method.toLowerCase()}),a=t(u.payloadFormat,s(u.payloadSchema,i)),d="get"===u.method.toLowerCase()?[r,n]:[r,a,n];return c[u.method].apply(c,d).then(o)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(s)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:a({},i,n),credentials:"same-origin",body:t}).then(s)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:n}).then(s)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:n}).then(s)},e}(),v=new m;n["default"]=v},{"es6-promise":317,"isomorphic-fetch":318,merge:319,qs:322}],"silverstripe-component":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("../../../client/src/jQuery"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.componentDidMount=function(){if("undefined"!=typeof this.props.cmsEvents){this.cmsEvents=this.props.cmsEvents;for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).on(e,this.cmsEvents[e].bind(this))}},t.prototype.componentWillUnmount=function(){for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).off(e)},t.prototype.emitCmsEvent=function(e,t){(0,d["default"])(document).trigger(e,t)},t}(l.Component);h.propTypes={cmsEvents:c["default"].PropTypes.object},n["default"]=h},{"../../../client/src/jQuery":"jQuery",react:"react"}]},{},[1]),function(){var e,t,n,i,r=function(e,t){function n(){this.constructor=e}for(var i in t)o.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},o={}.hasOwnProperty;t=function(){function e(t,n){this.form_field=t,this.options=null!=n?n:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100))},e.prototype.results_option_build=function(e){var t,n,i,r,o,s,a;for(t="",a=0,s=this.results_data,r=0,o=s.length;o>r&&(n=s[r],i="",i=n.group?this.result_add_group(n):this.result_add_option(n),""!==i&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.style.cssText=e.style,n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&e.active_options>0?(t=[],t.push("group-result"),e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},e.prototype.reset_single_select_options=function(){var e,t,n,i,r;for(n=this.results_data,r=[],e=0,t=n.length;t>e;e++)i=n[e],i.selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,n,i,r,o,s,a,l,c,u,d;for(this.no_results_clear(),s=0,l=this.get_search_text(),e=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=new RegExp(e,"i"),o=this.get_search_regex(e),r=this.results_data,t=0,n=r.length;n>t;t++)i=r[t],i.search_match=!1,a=null,this.include_option_in_results(i)&&(i.group&&(i.group_match=!1,i.active_options=0),null!=i.group_array_index&&this.results_data[i.group_array_index]&&(a=this.results_data[i.group_array_index],0===a.active_options&&a.search_match&&(s+=1),a.active_options+=1),i.search_text=i.group?i.label:i.html,i.group&&!this.group_search||(i.search_match=this.search_string_match(i.search_text,o),i.search_match&&!i.group&&(s+=1),i.search_match?(l.length&&(c=i.search_text.search(d),u=i.search_text.substr(0,c+l.length)+"</em>"+i.search_text.substr(c+l.length),
},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("./row"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement(p["default"],null,this.props.children)},t}(d["default"]);n["default"]=f},{"./row":"components/grid-field/row",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/index":[function(e,t,n){"use strict";function i(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}function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 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):o(e,t))}function c(e,t){var n=t.data?t.data.recordType:null;return{records:e.records&&n?e.records[n]:{}}}function u(e){return{actions:(0,p.bindActionCreators)(P,e)}}Object.defineProperty(n,"__esModule",{value:!0});var d=e("react"),h=r(d),p=e("redux"),f=e("react-redux"),g=e("silverstripe-component"),m=r(g),v=e("./table"),_=r(v),y=e("./header"),b=r(y),x=e("./header-cell"),w=r(x),j=e("./row"),C=r(j),k=e("./cell"),E=r(k),T=e("./action"),D=r(T),S=e("state/records/actions"),P=i(S),O=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.deleteRecord=i.deleteRecord.bind(i),i.editRecord=i.editRecord.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.props.data;this.props.actions.fetchRecords(t.recordType,t.collectionReadEndpoint.method,t.collectionReadEndpoint.url)},t.prototype.render=function(){var e=this,t=this.props.records,n=this.props.data.handleDrillDown;if(!t)return h["default"].createElement("div",null);var i=this.props.data.columns,r=h["default"].createElement("th",{className:"grid-field__action-placeholder"}),o=i.map(function(e,t){return h["default"].createElement(w["default"],{key:t},e.name)}),s=h["default"].createElement(b["default"],null,o.concat(r)),a=Object.keys(t).map(function(r){var o=t[r],s=i.map(function(e,t){var i=e.field.split(".").reduce(function(e,t){return e[t]},o),r={handleDrillDown:n?function(e){return n(e,o)}:null,className:n?"grid-field__cell--drillable":"",key:t,width:e.width};return h["default"].createElement(E["default"],r,i)}),a=h["default"].createElement(E["default"],{key:r+"-actions"},h["default"].createElement(D["default"],{icon:"cog",handleClick:e.editRecord,key:"action-"+r+"-edit",record:o}),h["default"].createElement(D["default"],{icon:"cancel",handleClick:e.deleteRecord,key:"action-"+r+"-delete",record:o})),l={key:r,className:n?"grid-field__row--drillable":""};return h["default"].createElement(C["default"],l,s.concat(a))});return h["default"].createElement(_["default"],{header:s,rows:a})},t.prototype.deleteRecord=function(e,t){e.preventDefault(),this.props.actions.deleteRecord(this.props.data.recordType,t,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url)},t.prototype.editRecord=function(e){e.preventDefault()},t}(m["default"]);O.propTypes={data:h["default"].PropTypes.shape({recordType:h["default"].PropTypes.string.isRequired,headerColumns:h["default"].PropTypes.array,collectionReadEndpoint:h["default"].PropTypes.object,handleDrillDown:h["default"].PropTypes.func})},n["default"]=(0,f.connect)(c,u)(O)},{"./action":2,"./cell":"components/grid-field/cell/index","./header":"components/grid-field/header","./header-cell":"components/grid-field/header-cell","./row":"components/grid-field/row","./table":"components/grid-field/table",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/records/actions":6}],"components/grid-field/row":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){var e="grid-field__row "+this.props.className;return c["default"].createElement("tr",{tabIndex:"0",className:e},this.props.children)},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/table":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"container-fluid grid-field"},c["default"].createElement("table",{className:"table table-hover grid-field__table"},c["default"].createElement("thead",null,this.generateHeader()),c["default"].createElement("tbody",null,this.generateRows())))},t.prototype.generateHeader=function(){return"undefined"!=typeof this.props.header?this.props.header:("undefined"!=typeof this.props.data,null)},t.prototype.generateRows=function(){return"undefined"!=typeof this.props.rows?this.props.rows:("undefined"!=typeof this.props.data,null)},t}(d["default"]);h.propTypes={data:c["default"].PropTypes.object,header:c["default"].PropTypes.object,rows:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/hidden-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field hidden"},c["default"].createElement("input",this.getInputProps()))},t.prototype.getInputProps=function(){return{className:["hidden",this.props.extraClass].join(" "),id:this.props.name,name:this.props.name,onChange:this.props.onChange,type:"hidden",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/north-header/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"north-header container-fluid"},c["default"].createElement("div",{className:"north-header__navigation"},this.props.children))},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/text-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field text"},this.props.label&&c["default"].createElement("label",{className:"left",htmlFor:"gallery_"+this.props.name},this.props.label),c["default"].createElement("div",{className:"middleColumn"},c["default"].createElement("input",this.getInputProps())))},t.prototype.getInputProps=function(){return{className:["text",this.props.extraClass].join(" "),id:"gallery_"+this.props.name,name:this.props.name,onChange:this.props.onChange,type:"text",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],config:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e)}return e.getSection=function(e){return window.ss.config.sections[e]},e.getTopLevelRoutes=function(){var e=[];return Object.keys(window.ss.config.sections).forEach(function(t){var n=window.ss.config.sections[t].route,i=n.match(/^admin\/[^\/]+(\/?)$/);if(i){i[1]||(n+="/");var r=-1===e.indexOf(n);r&&e.push(n)}}),e},e}();n["default"]=r},{}],"deep-freeze":[function(e,t,n){t.exports=function i(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){!e.hasOwnProperty(t)||null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||i(e[t])}),e}},{}],i18n:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return e.prototype.setLocale=function(e){this.currentLocale=e},e.prototype.getLocale=function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale},e.prototype._t=function(e,t,n,i){var r=this.getLocale().replace(/_[\w]+/i,""),o=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[r]&&this.lang[r][e]?this.lang[r][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[o]&&this.lang[o][e]?this.lang[o][e]:t?t:""},e.prototype.addDictionary=function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var n in t)this.lang[e][n]=t[n]},e.prototype.getDictionary=function(e){return this.lang[e]},e.prototype.stripStr=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.prototype.stripStrML=function(e){for(var t=e.split("\n"),n=0;n<t.length;n+=1)t[n]=stripStr(t[n]);return stripStr(t.join(" "))},e.prototype.sprintf=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];if(0===n.length)return e;var r=new RegExp("(.?)(%s)","g"),o=0;return e.replace(r,function(e,t,i,r,s){return"%"===t?e:t+n[o++]})},e.prototype.inject=function(e,t){var n=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(n,function(e,n,i,r){return t[n]?t[n]:e})},e.prototype.detectLocale=function(){var t,n;if(t=jQuery("body").attr("lang"),!t)for(var i=document.getElementsByTagName("meta"),r=0;r<i.length;r++)i[r].attributes["http-equiv"]&&"content-language"==i[r].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=i[r].attributes.content.nodeValue);t||(t=this.defaultLocale);var o=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var s in e.lang)if(s.substr(0,2).toLowerCase()==t.toLowerCase()){n=s;break}}else o&&(n=o[1].toLowerCase()+"_"+o[2].toUpperCase());return n},e.prototype.addEvent=function(e,t,n,i){return e.addEventListener?(e.addEventListener(t,n,i),!0):e.attachEvent?e.attachEvent("on"+t,n):void console.log("Handler could not be attached")},e}(),o=new r;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=o,n["default"]=o},{}],jQuery:[function(e,t,n){"use strict";var i="undefined"!=typeof window.jQuery?window.jQuery:null;t.exports=i},{}],"react-addons-css-transition-group":[function(e,t,n){t.exports=e("react/lib/ReactCSSTransitionGroup")},{"react/lib/ReactCSSTransitionGroup":363}],"react-addons-test-utils":[function(e,t,n){t.exports=e("react/lib/ReactTestUtils")},{"react/lib/ReactTestUtils":420}],"react-dom":[function(e,t,n){"use strict";t.exports=e("react/lib/ReactDOM")},{"react/lib/ReactDOM":373}],"react-redux":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0,n.connect=n.Provider=void 0;var r=e("./components/Provider"),o=i(r),s=e("./components/connect"),a=i(s);n.Provider=o["default"],n.connect=a["default"]},{"./components/Provider":326,"./components/connect":327}],react:[function(e,t,n){"use strict";t.exports=e("./lib/React")},{"./lib/React":360}],"reducer-register":[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r={},o=function(){function e(){i(this,e)}return e.prototype.add=function(e,t){if("undefined"!=typeof r[e])throw new Error("Reducer already exists at '"+e+"'");r[e]=t},e.prototype.getAll=function(){return r},e.prototype.getByKey=function(e){return r[e]},e.prototype.remove=function(e){delete r[e]},e}(),s=new o;n["default"]=s},{}],"redux-thunk":[function(e,t,n){"use strict";function i(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){return"function"==typeof i?i(t,n):e(i)}}}t.exports=i},{}],redux:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var r=e("./createStore"),o=i(r),s=e("./utils/combineReducers"),a=i(s),l=e("./utils/bindActionCreators"),c=i(l),u=e("./utils/applyMiddleware"),d=i(u),h=e("./utils/compose"),p=i(h);n.createStore=o["default"],n.combineReducers=a["default"],n.bindActionCreators=c["default"],n.applyMiddleware=d["default"],n.compose=p["default"]},{"./createStore":499,"./utils/applyMiddleware":500,"./utils/bindActionCreators":501,"./utils/combineReducers":502,"./utils/compose":503}],router:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=this.getAbsoluteBase(),n=d["default"].resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,i,r){return e(c["default"].resolveURLToBase(t),n,i,r)}}function s(e){var t=new c["default"].Route(e);return t.match(c["default"].current,{})}function a(){var e=window.document.getElementsByTagName("base");return e&&e[0]?e[0].href:null}Object.defineProperty(n,"__esModule",{value:!0});var l=e("page.js"),c=i(l),u=e("url"),d=i(u);c["default"].getAbsoluteBase=a.bind(c["default"]),c["default"].resolveURLToBase=r.bind(c["default"]),c["default"].show=o(c["default"].show),c["default"].routeAppliesToCurrentLocation=s,n["default"]=c["default"]},{"page.js":320,url:315}],"silverstripe-backend":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){var t=void 0,n=void 0;if(!(e.status>=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n;return t=e}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=e("isomorphic-fetch"),c=i(l),u=e("es6-promise"),d=i(u),h=e("qs"),p=i(h),f=e("merge"),g=i(f);d["default"].polyfill();var m=function(){function e(){o(this,e),this.fetch=c["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return p["default"].stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function n(e,t){switch(e){case"application/x-www-form-urlencoded":return p["default"].parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function i(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function o(e){return e.text().then(function(t){return n(e.headers.get("Content-Type"),t)})}function s(e,t){return Object.keys(t).reduce(function(n,i){var o=e[i];return!o||o.remove!==!0&&o.querystring!==!0?a(n,r({},i,t[i])):n},{})}function l(e,n,o){var s=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],l=n,c=Object.keys(o).reduce(function(t,n){var i=e[n],l=s.setFromData===!0&&!(i&&i.remove===!0),c=i&&i.querystring===!0&&i.remove!==!0;return l||c?a(t,r({},n,o[n])):t},{});return l=i(l,t("application/x-www-form-urlencoded",c)),l=Object.keys(e).reduce(function(t,n){var i=e[n].urlReplacement;return i?t.replace(i,o[n]):t},l)}var c=this,u=a({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),d={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){d[u[e]]&&(u[e]=d[u[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n={Accept:u.responseFormat,"Content-Type":u.payloadFormat},i=g["default"].recursive({},u.defaultData,e),r=l(u.payloadSchema,u.url,i,{setFromData:"get"===u.method.toLowerCase()}),a=t(u.payloadFormat,s(u.payloadSchema,i)),d="get"===u.method.toLowerCase()?[r,n]:[r,a,n];return c[u.method].apply(c,d).then(o)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(s)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:a({},i,n),credentials:"same-origin",body:t}).then(s)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:n}).then(s)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:n}).then(s)},e}(),v=new m;n["default"]=v},{"es6-promise":317,"isomorphic-fetch":318,merge:319,qs:322}],"silverstripe-component":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("../../../client/src/jQuery"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.componentDidMount=function(){if("undefined"!=typeof this.props.cmsEvents){this.cmsEvents=this.props.cmsEvents;for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).on(e,this.cmsEvents[e].bind(this))}},t.prototype.componentWillUnmount=function(){for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).off(e)},t.prototype.emitCmsEvent=function(e,t){(0,d["default"])(document).trigger(e,t)},t}(l.Component);h.propTypes={cmsEvents:c["default"].PropTypes.object},n["default"]=h},{"../../../client/src/jQuery":"jQuery",react:"react"}]},{},[1]),function(){var e,t,n,i,r=function(e,t){function n(){this.constructor=e}for(var i in t)o.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},o={}.hasOwnProperty;t=function(){function e(t,n){this.form_field=t,this.options=null!=n?n:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100))},e.prototype.results_option_build=function(e){var t,n,i,r,o,s,a;for(t="",a=0,s=this.results_data,r=0,o=s.length;o>r&&(n=s[r],i="",i=n.group?this.result_add_group(n):this.result_add_option(n),""!==i&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.style.cssText=e.style,n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&e.active_options>0?(t=[],t.push("group-result"),e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},e.prototype.reset_single_select_options=function(){var e,t,n,i,r;for(n=this.results_data,r=[],e=0,t=n.length;t>e;e++)i=n[e],i.selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,n,i,r,o,s,a,l,c,u,d;for(this.no_results_clear(),s=0,l=this.get_search_text(),e=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=new RegExp(e,"i"),o=this.get_search_regex(e),r=this.results_data,t=0,n=r.length;n>t;t++)i=r[t],i.search_match=!1,a=null,this.include_option_in_results(i)&&(i.group&&(i.group_match=!1,i.active_options=0),null!=i.group_array_index&&this.results_data[i.group_array_index]&&(a=this.results_data[i.group_array_index],0===a.active_options&&a.search_match&&(s+=1),a.active_options+=1),i.search_text=i.group?i.label:i.html,i.group&&!this.group_search||(i.search_match=this.search_string_match(i.search_text,o),i.search_match&&!i.group&&(s+=1),i.search_match?(l.length&&(c=i.search_text.search(d),u=i.search_text.substr(0,c+l.length)+"</em>"+i.search_text.substr(c+l.length),
i.search_text=u.substr(0,c)+"<em>"+u.substr(c)),null!=a&&(a.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),1>s&&l.length?(this.update_results_content(""),this.no_results(l)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t;return t=this.search_contains?"":"^",new RegExp(t+e,"i")},e.prototype.search_string_match=function(e,t){var n,i,r,o;if(t.test(e))return!0;if(this.enable_split_word_search&&(e.indexOf(" ")>=0||0===e.indexOf("["))&&(o=e.replace(/\[|\]/g,"").split(" "),o.length))for(n=0,i=o.length;i>n;n++)if(r=o[n],t.test(r))return!0},e.prototype.choices_count=function(){var e,t,n,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,t=i.length;t>e;e++)n=i[e],n.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){return e.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},e.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(e){return setTimeout(function(e){return function(){return e.results_search()}}(this),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return this.is_multiple&&!this.display_selected_options&&e.selected?!1:!this.display_disabled_options&&e.disabled?!1:!e.empty},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){return this.touch_started?this.search_results_mouseup(e):void 0},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:(t=document.createElement("div"),t.appendChild(e),t.innerHTML)},e.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),i=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,r,o,s;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:this.escapeExpression(e.label),title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=e.childNodes,s=[],n=0,i=o.length;i>n;n++)r=o[n],s.push(this.add_option(r,t,e.disabled));return s},e.prototype.add_option=function(e,t,n){return"OPTION"===e.nodeName.toUpperCase()?(""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},e.prototype.escapeExpression=function(e){var t,n;return null==e||e===!1?"":/[\&\<\>\"\'\`]/.test(e)?(t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=/&(?!\w+;)|[\<\>\"\'\`]/g,e.replace(n,function(e){return t[e]||"&amp;"})):e},e}(),i.select_to_array=function(e){var t,n,r,o,s;for(o=new i,s=e.childNodes,n=0,r=s.length;r>n;n++)t=s[n],o.add_node(t);return o.parsed},e=jQuery,e.fn.extend({chosen:function(i){return t.browser_is_supported()?this.each(function(t){var r,o;return r=e(this),o=r.data("chosen"),"destroy"===i?void(o instanceof n&&o.destroy()):void(o instanceof n||r.data("chosen",new n(this,i)))}):this}}),n=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,t),n.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},n.prototype.set_up_html=function(){var t,n;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),n={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(n.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=e("<div />",n),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.bind("touchstart.chosen",function(e){return function(t){return e.container_mousedown(t),t.preventDefault()}}(this)),this.container.bind("touchend.chosen",function(e){return function(t){return e.container_mouseup(t),t.preventDefault()}}(this)),this.container.bind("mousedown.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.container.bind("mouseup.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.bind("mouseenter.chosen",function(e){return function(t){e.mouse_enter(t)}}(this)),this.container.bind("mouseleave.chosen",function(e){return function(t){e.mouse_leave(t)}}(this)),this.search_results.bind("mouseup.chosen",function(e){return function(t){e.search_results_mouseup(t)}}(this)),this.search_results.bind("mouseover.chosen",function(e){return function(t){e.search_results_mouseover(t)}}(this)),this.search_results.bind("mouseout.chosen",function(e){return function(t){e.search_results_mouseout(t)}}(this)),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){return function(t){e.search_results_mousewheel(t)}}(this)),this.search_results.bind("touchstart.chosen",function(e){return function(t){e.search_results_touchstart(t)}}(this)),this.search_results.bind("touchmove.chosen",function(e){return function(t){e.search_results_touchmove(t)}}(this)),this.search_results.bind("touchend.chosen",function(e){return function(t){e.search_results_touchend(t)}}(this)),this.form_field_jq.bind("chosen:updated.chosen",function(e){return function(t){e.results_update_field(t)}}(this)),this.form_field_jq.bind("chosen:activate.chosen",function(e){return function(t){e.activate_field(t)}}(this)),this.form_field_jq.bind("chosen:open.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.form_field_jq.bind("chosen:close.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.bind("blur.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.bind("keyup.chosen",function(e){return function(t){e.keyup_checker(t)}}(this)),this.search_field.bind("keydown.chosen",function(e){return function(t){e.keydown_checker(t)}}(this)),this.search_field.bind("focus.chosen",function(e){return function(t){e.input_focus(t)}}(this)),this.search_field.bind("cut.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.search_field.bind("paste.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.bind("click.chosen",function(e){return function(t){e.choices_click(t)}}(this)):this.container.bind("click.chosen",function(e){e.preventDefault()})},n.prototype.destroy=function(){return e(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},n.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&e(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},n.prototype.search_results_mousewheel=function(e){var t;return e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t?(e.preventDefault(),"DOMMouseScroll"===e.type&&(t=40*t),this.search_results.scrollTop(t+this.search_results.scrollTop())):void 0},n.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},n.prototype.close_field=function(){return e(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},n.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(t){var n;return n=e(t.target).closest(".chosen-container"),n.length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(e){var t,n,i,r,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),r=i+o,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight(),t>=r)return this.search_results.scrollTop(t-i>0?t-i:0);if(o>n)return this.search_results.scrollTop(n)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(e){return this.search_results.html(e)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(e){var t;return this.form_field.tabIndex?(t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t):void 0},n.prototype.set_label_behavior=function(){return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=e("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(e){return function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()}}(this)):void 0},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n.length?(this.result_highlight=n,this.result_select(t),this.search_field.focus()):void 0},n.prototype.search_results_mouseover=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n?this.result_do_highlight(n):void 0},n.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},n.prototype.choice_build=function(t){var n,i;return n=e("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(t)+"</span>"),t.disabled?n.addClass("search-choice-disabled"):(i=e("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),i.bind("click.chosen",function(e){return function(t){return e.choice_destroy_link_click(t)}}(this)),n.append(i)),this.search_container.before(n)},n.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(e(t.target))},n.prototype.choice_destroy=function(e){return this.result_deselect(e[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()):void 0},n.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(e){var t,n;return this.result_highlight?(t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),n=this.results_data[t[0].getAttribute("data-option-array-index")],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),(e.metaKey||e.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())):void 0},n.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},n.prototype.result_deselect=function(e){var t;return t=this.results_data[e],this.form_field.options[t.options_index].disabled?!1:(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},n.prototype.get_search_text=function(){return e("<div/>").text(e.trim(this.search_field.val())).html()},n.prototype.winnow_results_set_highlight=function(){var e,t;return t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null!=e?this.result_do_highlight(e):void 0},n.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},n.prototype.search_field_scale=function(){var t,n,i,r,o,s,a,l,c;if(this.is_multiple){for(i=0,c=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",l=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],r=0,o=l.length;o>r;r++)s=l[r],a+=s+":"+this.search_field.css(s)+";";return t=e("<div />",{style:a}),t.text(this.search_field.val()),e("body").append(t),c=t.width()+25,t.remove(),n=this.container.outerWidth(),c>n-10&&(c=n-10),this.search_field.css({width:c+"px"})}},n}(t)}.call(this);
//# sourceMappingURL=bundle-lib.js.map

File diff suppressed because one or more lines are too long

View File

@ -55,11 +55,11 @@
fill: $gray;
transform-origin: 50% 50%;
}
circle:nth-child(1) {
animation-delay: -.32s;
}
circle:nth-child(2) {
animation-delay: -.16s;
}
@ -87,7 +87,6 @@
}
.btn-secondary {
border-color: transparent;
&:hover,
&:active,

View File

@ -20,7 +20,7 @@
padding: $spacer-y $spacer-x/2;
margin-top: -$spacer-y;
margin-bottom: -$spacer-y;
height: #{$line-height-base + $table-cell-padding*2};
height: $line-height-base + #{$table-cell-padding*2};
vertical-align: top;
&:hover {

View File

@ -5,14 +5,13 @@ class NorthHeaderComponent extends SilverStripeComponent {
render() {
return (
<div className="north-header">
<div className="north-header container-fluid">
<div className="north-header__navigation">
{this.props.children}
</div>
</div>
);
}
}
export default NorthHeaderComponent;

View File

@ -0,0 +1,3 @@
#Preview
Shows a preview of selected items like pages or files.

View File

@ -0,0 +1,31 @@
import React from 'react';
import SilverStripeComponent from 'silverstripe-component';
/**
* Renders the right-hand collapsable change preview panel
*/
class CampaignPreview extends SilverStripeComponent {
render() {
return (
<div className="cms-content__right preview">
<iframe className="preview__iframe" src={this.props.previewUrl}></iframe>
<div className="preview__overlay">
<h3 className="preview__overlay-text">There is no preview available for this item.</h3>
</div>
<div className="preview__file-container panel-scrollable">
<img className="preview__file" src="http://placehold.it/250x150" />
</div>
<div className="south-actions">
<div className="btn-toolbar">
<button className="btn btn-secondary" type="button">Edit</button>
<button type="button" data-container="body" className="btn btn-link" data-toggle="popover" title="Page actions" data-placement="top" data-content="<a href=''>Add to campaign</a><a href=''>Remove from campaign</a>">...</button>
</div>
</div>
</div>
);
}
}
export default CampaignPreview;

View File

@ -0,0 +1,28 @@
.preview__iframe {
width: 100%;
height: calc(100% - #{$toolbar-total-height});
border: none;
}
.preview__file-container {
height: calc(100% - #{$toolbar-total-height});
text-align: center;
}
.preview__file {
position: relative;
top: 50%;
transform: translateY(-50%);
}
.preview__overlay {
text-align: center;
position: absolute;
top: 0;
width: 100%;
height: calc(100% - #{$toolbar-total-height});
background-color: #FFF;
}
.preview__overlay-text {
font-size: $font-size-lg;
position: relative;
top: 50%;
transform: translateY(-50%);
}

View File

@ -83,12 +83,12 @@ class CampaignAdminContainer extends SilverStripeComponent {
const schemaUrl = this.props.sectionConfig.forms.editForm.schemaUrl;
return (
<div className="cms-middle no-preview">
<div className="cms-campaigns collapse in" aria-expanded="true">
<div className="cms-content__inner no-preview">
<div className="cms-content__left cms-campaigns collapse in" aria-expanded="true">
<NorthHeader>
<h2 className="text-truncate north-header__heading">Campaigns</h2>
</NorthHeader>
<div className="cms-middle__scrollable">
<div className="container-fluid panel-scrollable">
<div className="content-toolbar">
<div className="btn-toolbar">
<FormAction

View File

@ -11,9 +11,10 @@ import NorthHeader from 'components/north-header/index';
import FormAction from 'components/form-action/index';
import CampaignItem from './item';
import BreadcrumbComponent from 'components/breadcrumb/index';
import CampaignPreview from './preview';
import CampaignPreview from 'components/preview/index';
import i18n from 'i18n';
/**
* Represents a campaign list view
*/
@ -44,7 +45,7 @@ class CampaignListContainer extends SilverStripeComponent {
// Trigger different layout when preview is enabled
const previewUrl = this.previewURLForItem(itemID);
const itemGroups = this.groupItemsForSet();
const classNames = previewUrl ? 'cms-middle with-preview' : 'cms-middle no-preview';
const classNames = previewUrl ? 'cms-content__split cms-content__split--left-sm' : 'cms-content__split cms-content__split--none';
// Get items in this set
let accordionGroups = [];
@ -83,11 +84,11 @@ class CampaignListContainer extends SilverStripeComponent {
return (
<div className={classNames}>
<div className="cms-campaigns collapse in" aria-expanded="true">
<div className="cms-content__left collapse in" aria-expanded="true">
<NorthHeader>
<BreadcrumbComponent crumbs={this.props.breadcrumbs} multiline />
</NorthHeader>
<div className="col-md-12 campaign-items">
<div className="container-fluid campaign-items panel-scrollable">
<Accordion>
{accordionGroups}
</Accordion>

View File

@ -1,31 +1,15 @@
// Changeset items
.cms-campaigns {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
overflow: hidden;
background-color: #f6f7f8;
z-index: 2;
transition: width .2s;
padding-bottom: $toolbar-total-height;
}
.campaign-items {
height: 100%;
margin-bottom: 40px;
overflow-y: auto;
.list-group {
margin-left: -$spacer-y;
margin-right: -$spacer-y;
border-bottom: 1px solid $border-color-light;
margin-bottom: $spacer-y*.75;
}
.list-group-item {
padding-left: #{$spacer-y * 1.25};
padding-right: #{$spacer-y * 1.25};
min-height: 64px;
cursor: pointer;
text-decoration: none;
@ -33,52 +17,7 @@
&:first-child {
border-top: none;
}
&__heading {
font-weight: 400;
font-size: 14px;
margin: 2px 0 5px;
color: $body-color;
}
&__thumbnail {
width: 64px;
height: 64px;
display: block;
background: #ccc;
float: left;
margin: -12px 12px 0 -$spacer-y;
}
.label {
text-transform: uppercase;
font-size: 10px;
font-weight: 400;
letter-spacing: .4px;
}
// Show linked items
&--has-links,
&--is-linked {
color: $brand-primary;
float: right;
font-size: $font-size-sm;
position: absolute;
right: $spacer-y;
top: 27px;
opacity: 0;
transition: opacity .2s ease-in-out;
.font-icon-link {
font-size: 16px;
position: relative;
top: 3px;
margin-right: 1px;
}
}
&:hover,
&:focus {
&:hover {
text-decoration: none;
.list-group-item--has-links {
@ -98,24 +37,66 @@
opacity: 1;
}
}
}
// Published item
&--published {
opacity: .6;
.list-group-item__heading {
font-weight: 400;
font-size: 14px;
margin: 2px 0 5px;
color: $body-color;
}
.list-group-item__thumbnail {
width: 64px;
height: 64px;
display: block;
background: #ccc;
float: left;
margin: -12px 12px 0 -$spacer-y;
}
.label {
text-transform: uppercase;
font-size: 10px;
font-weight: 400;
letter-spacing: .4px;
}
// Show linked items
.list-group-item--has-links,
.list-group-item--is-linked {
color: $brand-primary;
float: right;
font-size: $font-size-sm;
position: absolute;
right: $spacer-y;
top: 27px;
opacity: 0;
transition: opacity .2s ease-in-out;
.font-icon-link {
font-size: 16px;
position: relative;
top: 3px;
margin-right: 1px;
}
}
.list-group-item--published {
opacity: .6;
transition: opacity .2s ease-in-out;
.list-group-item__status {
opacity: 0;
transition: opacity .2s ease-in-out;
}
&:hover {
opacity: 1;
.list-group-item__status {
opacity: 0;
transition: opacity .2s ease-in-out;
}
&:hover {
display: inline-block;
opacity: 1;
.list-group-item__status {
display: inline-block;
opacity: 1;
}
}
}
}

View File

@ -1,59 +1,56 @@
.cms-middle {
padding-left: 0;
height: 100%;
position: relative;
transition: padding .2s;
&.with-preview {
@media (min-width: 992px) { /* lg */
padding-left: 316px;
.cms-campaigns {
width: 316px;
}
}
@media (min-width: 1200px) { /* xl */
padding-left: 448px;
.cms-campaigns {
width: 448px;
}
}
}
.cms-content__inner {
height: 100%;
}
.cms-content__right,
.cms-content__left {
height: 100%;
overflow: hidden;
background-color: $body-bg;
transition: width .2s;
}
.panel-scrollable {
height: calc(100% - #{$toolbar-total-height});
overflow-y: auto;
}
.cms-middle__scrollable {
overflow-y: auto;
display: block;
height: 100%;
// .cms-content can be split into different left/right zones
// Exampale modifier: --left-sm = small left side panel with right panel width set to auto.
.cms-content__split {
height: 100%;
}
.cms-content__split--left-sm {
.cms-content__right {
position: relative;
border-left: 1px solid $border-color;
}
.cms-content__left {
width: 100%;
position: absolute;
left: 0;
}
@media (min-width: 992px) { /* lg */
padding-left: $cms-panel-sm;
// Preview panel
.pages-preview {
display: block;
position: relative;
background-color: #BBB;
border-left: 1px solid #dbdde0;
height: 100%;
.cms-content__left {
width: $cms-panel-sm;
}
}
@media (min-width: 1200px) { /* xl */
padding-left: $cms-panel-md;
iframe {
width: 100%;
height: calc(100% - #{$toolbar-total-height});
border: none;
}
.cms-content__left {
width: $cms-panel-md;
}
}
}
// Toolbars
// Todo: Convert toolbar to a component with variations.
.toolbar {
width: 100%; // Todo: should use mixin @include make-container();
height: $toolbar-total-height;
padding: $spacer-y*.625 $spacer-x;
background-color: $body-bg;
.btn-toolbar {
// TODO Remove '.cms .btn-toolbar' override
margin-top: 0;
margin-bottom: 0;
}
.south-actions {
height: $toolbar-total-height;
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid $border-color;
background-color: $body-bg;
padding: $spacer-y*.625 $spacer-x;
}
.content-toolbar {

View File

@ -47,8 +47,6 @@ $border-color-light: darken($background-main, 6);
$border-color: darken($background-main, 10);
$border-color-dark: darken($background-main, 14);
// Options
//
// Quickly modify global styling by enabling or disabling optional features.
@ -67,9 +65,10 @@ $border-color-dark: darken($background-main, 14);
// Control the default styling of most Bootstrap elements by modifying these
// variables. Mostly focused on spacing.
$spacer: 1.2308rem; // 16px
$spacer: 1.2308rem; // $font-size-root (13px) * $spacer = 16px
$spacer-x: $spacer;
$spacer-y: $spacer;
$spacers: (
0: (
x: 0,
@ -237,8 +236,8 @@ $text-muted: #7f8b97;
//
// Customizes the `.table` component with basic values, each used across all table variations.
$table-cell-padding: 16px; // update to $spacer
$table-sm-cell-padding: 12px; // update to $spacer
$table-cell-padding: $spacer;
$table-sm-cell-padding: $spacer*.75;
$table-bg: #FFF;
$table-bg-accent: #f9f9f9;
@ -340,6 +339,7 @@ $btn-danger-border: transparent;
//
// $cursor-disabled: not-allowed;
// Form validation icons
// $form-icon-success: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjNWNiODVjIiBkPSJNMjMzLjggNjEwYy0xMy4zIDAtMjYtNi0zNC0xNi44TDkwLjUgNDQ4LjhDNzYuMyA0MzAgODAgNDAzLjMgOTguOCAzODljMTguOC0xNC4yIDQ1LjUtMTAuNCA1OS44IDguNGw3MiA5NUw0NTEuMyAyNDJjMTIuNS0yMCAzOC44LTI2LjIgNTguOC0xMy43IDIwIDEyLjQgMjYgMzguNyAxMy43IDU4LjhMMjcwIDU5MGMtNy40IDEyLTIwLjIgMTkuNC0zNC4zIDIwaC0yeiIvPjwvc3ZnPg==";
// $form-icon-warning: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZjBhZDRlIiBkPSJNNjAzIDY0MC4ybC0yNzguNS01MDljLTMuOC02LjYtMTAuOC0xMC42LTE4LjUtMTAuNnMtMTQuNyA0LTE4LjUgMTAuNkw5IDY0MC4yYy0zLjcgNi41LTMuNiAxNC40LjIgMjAuOCAzLjggNi41IDEwLjggMTAuNCAxOC4zIDEwLjRoNTU3YzcuNiAwIDE0LjYtNCAxOC40LTEwLjQgMy41LTYuNCAzLjYtMTQuNCAwLTIwLjh6bS0yNjYuNC0zMGgtNjEuMlY1NDloNjEuMnY2MS4yem0wLTEwN2gtNjEuMlYzMDRoNjEuMnYxOTl6Ii8+PC9zdmc+";
@ -385,20 +385,20 @@ $btn-danger-border: transparent;
// SS toolbars
// Used for ui layout which contains main actions, seconday page action, top breadcrumbs and navigation bars.
$toolbar-height: 52px;
$toolbar-total-height: $toolbar-height + 1px; // Add border
$toolbar-height: 52px;
$toolbar-total-height: $toolbar-height + 1px; // Add border
// Navbar
$navbar-border-radius: 0;
$navbar-padding-horizontal: $spacer;
$navbar-padding-vertical: ($spacer / 2);
$navbar-border-radius: 0;
$navbar-padding-horizontal: $spacer;
$navbar-padding-vertical: ($spacer / 2);
// $navbar-dark-color: rgba(255,255,255,.5);
// $navbar-dark-hover-color: rgba(255,255,255,.75);
// $navbar-dark-active-color: rgba(255,255,255,1);
// $navbar-dark-disabled-color: rgba(255,255,255,.25);
// $navbar-dark-color: rgba(255,255,255,.5);
// $navbar-dark-hover-color: rgba(255,255,255,.75);
// $navbar-dark-active-color: rgba(255,255,255,1);
// $navbar-dark-disabled-color: rgba(255,255,255,.25);
//
// $navbar-light-color: rgba(0,0,0,.3);
// $navbar-light-hover-color: rgba(0,0,0,.6);
@ -696,3 +696,9 @@ $breadcrumb-divider: "/";
// $pre-color: $gray-dark;
// $pre-border-color: #ccc;
// $pre-scrollable-max-height: 340px;
// Panel sizes
$cms-panel-xs: 60px;
$cms-panel-sm: 300px;
$cms-panel-md: 448px;
$cms-panel-lg: 638px;

View File

@ -34,6 +34,7 @@
@import "../components/grid-field/styles";
@import "../components/hidden-field/styles";
@import "../components/north-header/styles";
@import "../components/preview/styles";
// Layout and sections
@import "layout";

View File

@ -77,7 +77,6 @@ body.cms {
*/
.cms-content-tools,
.cms-content-fields,
.cms-edit-form,
.cms-preview,
.cms-preview iframe,
.cms-preview-controls
@ -85,7 +84,10 @@ body.cms {
display: inline-block;
}
.cms-content-header {
.cms-content-header { // Todo: should add .container-fluid to markup or extend .container-fluid
padding-left: $spacer-x;
padding-right: $spacer-x;
min-width: 100%;
z-index: 60;
min-height: 52px;
background: {
@ -119,7 +121,6 @@ body.cms {
.cms-content-header-info {
float:left;
padding-top: $grid-y - 1;
padding-left: $grid-x * 2;
& * {
display: inline-block; // align back button and breadcrumbs
@ -227,7 +228,6 @@ body.cms {
.breadcrumbs-wrapper {
float: left;
padding-top: $grid-y - 1;
padding-left: $grid-x*2;
}
.cms-content-header-tabs {
@ -502,7 +502,7 @@ body.cms {
.ui-tabs-nav {
float: right;
margin: $grid-x*2 0 -1px 0;
padding: 0 $grid-x*2 0 0;
padding: 0;
border-bottom: 0;
~ .ui-tabs-panel {
@ -687,10 +687,6 @@ body.cms {
margin-top: 12px;
margin-bottom: 13px;
}
.icon-button-group {
margin-right: $grid-x*2;
}
}
.cms-content-fields .ui-tabs-nav {