From 82a4b16d78997093043b4b4f5f7da22368468249 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 29 Aug 2019 18:40:35 +1200 Subject: [PATCH 1/4] BUG Add a status column to the table view --- client/dist/js/bundle.js | 2 +- client/lang/src/en.json | 5 ++- client/src/containers/TableView/TableView.js | 44 +++++++++++++++++++- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 587457dbb..d56d12e6f 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/boot/applyTransform.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/transforms/AssetAdmin/insertAssetModal.js"),l=o(i),a=n("./client/src/transforms/FormAction/ownerAwareUnpublish.js"),u=o(a),d=n("./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js"),c=o(d),p=function(){s.default.transform("insert-media-modal",function(e){e.form.alterSchema("AssetAdmin.EditForm.fileInsertForm",l.default)}),s.default.transform("move-form-disabled",function(e){e.component("TreeDropdownField.AssetAdmin.MoveForm",c.default)}),s.default.transform("owner-unpublishing",function(e){e.component("FormAction.AssetAdmin.EditForm.action_unpublish",u.default)})};t.default=p},"./client/src/boot/index.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=n(20),s=o(r),i=n(30),l=o(i),a=n("./client/src/containers/AssetAdmin/AssetAdminRouter.js"),u=o(a),d=n("./client/src/boot/applyTransform.js"),c=o(d),p=n("./client/src/boot/registerReducers.js"),f=o(p),h=n("./client/src/boot/registerComponents.js"),m=o(h),g=n("./client/src/boot/registerQueries.js"),y=o(g);document.addEventListener("DOMContentLoaded",function(){(0,m.default)(),(0,c.default)();var e=s.default.getSection("SilverStripe\\AssetAdmin\\Controller\\AssetAdmin");l.default.add({path:"/",routes:[{path:"/"+e.url+"/show/:folderId/:viewAction/:fileId",component:u.default},{path:"/"+e.url+"/show/:folderId/:viewAction",component:u.default},{path:"/"+e.url+"/show/:folderId",component:u.default},{path:"/"+e.url,component:u.default}]}),(0,y.default)(),(0,f.default)()})},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/components/UploadField/UploadField.js"),l=o(i),a=n("./client/src/components/UploadField/UploadFieldItem.js"),u=o(a),d=n("./client/src/components/AssetDropzone/AssetDropzone.js"),c=o(d),p=n(9),f=o(p),h=n("./client/src/components/PreviewImageField/PreviewImageField.js"),m=o(h),g=n("./client/src/components/ProportionConstraintField/ProportionConstraintField.js"),y=o(g),_=n("./client/src/containers/HistoryList/HistoryList.js"),v=o(_),b=n("./client/src/components/GalleryToolbar/GalleryToolbar.js"),E=o(b),S=n("./client/src/components/GalleryItem/GalleryItem.js"),j=function(){s.default.component.registerMany({UploadField:l.default,UploadFieldItem:u.default,PreviewImageField:m.default,HistoryList:v.default,ProportionConstraintField:y.default,AssetDropzone:c.default,InsertMediaModal:f.default,GalleryToolbar:E.default,GalleryItemFile:S.File,GalleryItemFolder:S.Folder})};t.default=j},"./client/src/boot/registerQueries.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/lib/fileFragments.js"),l=n("./client/src/state/files/readFilesQuery.js"),a=o(l),u=function(){s.default.query.registerFragment("FileInterfaceFields",i.fileInterface),s.default.query.registerFragment("FileFields",i.file),s.default.query.registerFragment("FolderFields",i.folder),s.default.query.register("ReadFilesQuery",a.default)};t.default=u},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n(5),l=n("./client/src/state/gallery/GalleryReducer.js"),a=o(l),u=n("./client/src/state/queuedFiles/QueuedFilesReducer.js"),d=o(u),c=n("./client/src/state/uploadField/UploadFieldReducer.js"),p=o(c),f=n("./client/src/state/previewField/PreviewFieldReducer.js"),h=o(f),m=n("./client/src/state/imageLoad/ImageLoadReducer.js"),g=o(m),y=n("./client/src/state/displaySearch/DisplaySearchReducer.js"),_=o(y),v=function(){s.default.reducer.register("assetAdmin",(0,i.combineReducers)({gallery:a.default,queuedFiles:d.default,uploadField:p.default,previewField:h.default,imageLoad:g.default,displaySearch:_.default}))};t.default=v},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./node_modules/expose-loader/index.js?InsertMediaModal!./client/src/containers/InsertMediaModal/InsertMediaModal.js-exposed"),n("./node_modules/expose-loader/index.js?InsertEmbedModal!./client/src/components/InsertEmbedModal/InsertEmbedModal.js-exposed"),n("./client/src/boot/index.js"),n("./client/src/entwine/UploadField/UploadFieldEntwine.js")},"./client/src/components/AssetDropzone/AssetDropzone.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t2});return t<2?p.default.createElement(m.Button,{className:n,key:e.value,onClick:this.handleChangeValue,value:e.value,color:e.color},e.label):p.default.createElement(m.DropdownItem,{type:"button",className:n,key:e.value,onClick:this.handleChangeValue,value:e.value},e.label)}},{key:"render",value:function(){var e=this;if(!this.props.items.length)return null;var t=this.props.actions.filter(function(t){return!t.canApply||t.canApply(e.props.items)});if(t=t.map(this.renderChild),!t.length)return null;var n=this.props,o=n.ActionMenu,r=n.showCount,s=this.props.items.length;return p.default.createElement("div",{className:"bulk-actions fieldholder-small"},r&&p.default.createElement("div",{className:"bulk-actions-counter"},s),t.slice(0,2),t.length>2&&o?p.default.createElement(o,{id:"BulkActions",className:"bulk-actions__more-actions-menu"},t.slice(2)):t.slice(2))}}]),t}(c.Component);b.propTypes={items:v.default.array,actions:v.default.arrayOf(v.default.shape({value:v.default.string.isRequired,label:v.default.string.isRequired,className:v.default.string,destructive:v.default.bool,callback:v.default.func,canApply:v.default.func,confirm:v.default.func})),ActionMenu:v.default.oneOfType([v.default.node,v.default.func]),showCount:v.default.bool},b.defaultProps={items:[],actions:[],ActionMenu:null,total:null,showCount:!0,totalReachedMessage:d.default._t("")};var E=(0,f.connect)(l)(b);t.Component=b,t.default=(0,h.inject)(["ActionMenu"],function(e){return{ActionMenu:e}},function(){return"BulkActions"})(E)},"./client/src/components/GalleryItem/GalleryItem.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.item.thumbnail&&"image"===e.item.category&&e.item.exists&&!e.item.queuedId&&e.sectionConfig.imageRetry.minRetry&&e.sectionConfig.imageRetry.maxRetry}function d(e,t){if(u(t)){var n=e.assetAdmin.imageLoad,o=n.files.find(function(e){return t.item.thumbnail===e.url});return{loadState:o&&o.status||L.default.NONE}}return{loadState:L.default.DISABLED}}function c(e){return{actions:{imageLoad:(0,D.bindActionCreators)(R,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Folder=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"uploading",value:function(){return this.props.item.queuedId&&!this.saved()}},{key:"exists",value:function(){return this.props.item.exists}},{key:"isImage",value:function(){return"image"===this.props.item.category}},{key:"canBatchSelect",value:function(){return this.props.selectable&&this.props.item.canEdit}},{key:"hasError",value:function(){var e=!1;return this.props.item.message&&(e="error"===this.props.item.message.type),e}},{key:"handleActivate",value:function(e){e.stopPropagation(),"function"==typeof this.props.onActivate&&this.saved()&&this.props.onActivate(e,this.props.item)}},{key:"handleSelect",value:function(e){e.stopPropagation(),e.preventDefault(),"function"==typeof this.props.onSelect&&this.props.onSelect(e,this.props.item)}},{key:"handleKeyDown",value:function(e){E.default.SPACE_KEY_CODE===e.keyCode&&(e.preventDefault(),this.canBatchSelect()&&this.handleSelect(e)),E.default.RETURN_KEY_CODE===e.keyCode&&this.handleActivate(e)}},{key:"handleCancelUpload",value:function(e){e.stopPropagation(),e.preventDefault(),this.hasError()?this.props.onRemoveErroredUpload(this.props.item):this.props.onCancelUpload&&this.props.onCancelUpload(this.props.item)}},{key:"render",value:function(){var e=this,t=null,n=null,o=null,r=this.props.item,s=r.id,i=r.queuedId,l=s?"item-"+s:"queued-"+i;if(this.props.selectable&&(this.canBatchSelect()&&(t=this.handleSelect),n="font-icon-tick"),this.uploading())t=this.handleCancelUpload,n="font-icon-cancel";else if(this.exists()){var a=m.default._t("AssetAdmin.DETAILS","Details");o=y.default.createElement("div",{className:"gallery-item--overlay font-icon-edit"},a)}var u=this.props.badge,d={className:"gallery-item__checkbox",type:"checkbox",title:m.default._t("AssetAdmin.SELECT","Select"),tabIndex:-1,onMouseDown:B,id:l},c=["gallery-item__checkbox-label",n];this.canBatchSelect()||(d.disabled=!0,c.push("gallery-item__checkbox-label--disabled"));var f={className:c.join(" "),onClick:t};return y.default.createElement("div",{className:this.getItemClassNames(),"data-id":this.props.item.id,tabIndex:0,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleActivate},!!u&&y.default.createElement(A.default,{className:"gallery-item__badge",status:u.status,message:u.message}),y.default.createElement("div",{ref:function(t){e.thumbnail=t},className:this.getThumbnailClassNames(),style:this.getThumbnailStyles()},o,this.getStatusFlags()),this.getProgressBar(),this.getErrorMessage(),this.props.children,y.default.createElement("div",{className:"gallery-item__title",ref:function(t){e.title=t}},y.default.createElement("label",p({},f,{htmlFor:l}),y.default.createElement("input",d)),this.props.item.title))}}]),t}(g.Component);q.propTypes={sectionConfig:k.default,item:j.default,loadState:G.default.oneOf(Object.values(L.default)),highlighted:G.default.bool,selected:G.default.bool,isDropping:G.default.bool,isDragging:G.default.bool,message:G.default.shape({value:G.default.string,type:G.default.string}),selectable:G.default.bool,onActivate:G.default.func,onSelect:G.default.func,onCancelUpload:G.default.func,onRemoveErroredUpload:G.default.func,badge:G.default.shape({status:G.default.string,message:G.default.string}),updateStatusFlags:G.default.func,updateProgressBar:G.default.func,updateErrorMessage:G.default.func},q.defaultProps={item:{},sectionConfig:{imageRetry:{}},updateStatusFlags:function(e){return e},updateProgressBar:function(e){return e},updateErrorMessage:function(e){return e}};var H=(0,P.connect)(d,c)(q),z=(0,T.createSelectable)((0,w.default)("GalleryItem")(H)),V=(0,T.createSelectable)((0,I.default)("GalleryItem")(z));t.Component=q,t.Folder=V,t.File=z,t.default=H},"./client/src/components/GalleryItem/GalleryItemDragLayer.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?d.default.createElement("div",{key:"1",className:"gallery-item__drag-shadow"}):null,t>2?d.default.createElement("div",{key:"2",className:"gallery-item__drag-shadow gallery-item__drag-shadow--second"}):null];return d.default.createElement("div",{className:"gallery-item__drag-layer"},d.default.createElement("div",{className:"gallery-item__drag-layer-item",style:this.getOffset()},d.default.createElement("div",{className:"gallery-item__drag-layer-preview"},n,d.default.createElement(m.default,l({},e.props,{isDragging:!0}))),t>1?d.default.createElement(y.default,{className:"gallery-item__drag-layer-count",status:"info",message:""+t}):null))}}]),t}(u.Component);_.propTypes={item:p.default.object,offset:p.default.shape({x:p.default.number.isRequired,y:p.default.number.isRequired}),isDragging:p.default.bool.isRequired};var v=function(e){return{item:e.getItem(),offset:e.getInitialClientOffset(),dragged:e.getDifferenceFromInitialOffset(),isDragging:e.isDragging()}};t.default=(0,f.DragLayer)(v)(_)},"./client/src/components/GalleryItem/draggable.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t={canDrag:function(e){return e.canDrag},beginDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!0,t);var n=e.selectedFiles.concat([]);return n.includes(t)||n.push(t),{selected:n,props:e}},endDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!1,t)}},n=function(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}},o=(0,f.DragSource)(e,t,n);return function(e){var t=function(t){function n(){return r(this,n),s(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return i(n,t),a(n,[{key:"componentDidMount",value:function(){this.props.connectDragPreview((0,h.getEmptyImage)(),{captureDraggingState:!0})}},{key:"render",value:function(){var t=this.props.connectDragSource,n=d.default.createElement(e,this.props);return t("string"==typeof n.type?n:d.default.createElement("div",{className:"gallery-item__draggable"},n))}}]),n}(u.Component);return t.propTypes={connectDragSource:p.default.func.isRequired,connectDragPreview:p.default.func.isRequired,item:p.default.shape({id:p.default.number.isRequired}).isRequired,onDrag:p.default.func,selectedFiles:p.default.arrayOf(p.default.number)},o(t)}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&r<100?f.default.createElement("div",{className:"preview-image-field__progress"},f.default.createElement("div",{className:"preview-image-field__progress-bar",style:{width:r+"%"}})):null,d=null;return s?d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--"+s.type},s.value):100===r&&(d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--success"},c.default._t("AssetAdmin.REPlACE_FILE_SUCCESS","Upload successful, the file will be replaced when you Save."),(r||s)&&f.default.createElement("button",{onClick:this.handleCancelUpload,className:"preview-image-field__message-button btn btn-outline-light",type:"button"},c.default._t("AssetAdmin.REPLACE_FILE_UNDO","Undo")))),f.default.createElement("div",{className:"editor__thumbnail-container"},a||l,u,d)}},{key:"render",value:function(){var e=this.getDropzoneProps();if(this.canEdit())return f.default.createElement(m.default,e,this.renderImage());var t=["preview-image-field__container",this.props.className,this.props.extraClass];return f.default.createElement("div",{className:t.join(" ")},this.renderImage())}}]),t}(p.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string,className:A.default.string,extraClass:A.default.string,readOnly:A.default.bool,disabled:A.default.bool,onAutofill:A.default.func,formid:A.default.string,nameValue:A.default.string,data:A.default.shape({id:A.default.number,parentid:A.default.number,version:A.default.number,url:A.default.string,mock:A.default.bool,exists:A.default.bool,preview:A.default.string,category:A.default.string,nameField:A.default.string,uploadFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string}),initialValues:A.default.object}).isRequired,upload:A.default.shape({url:A.default.string,progress:A.default.number,xhr:A.default.object,category:A.default.string,message:A.default.shape({type:A.default.string.isRequired,value:A.default.string.isRequired})}),actions:A.default.object,securityID:A.default.string,confirm:A.default.func},x.defaultProps={extraClass:"",className:"",data:{},upload:{},confirm:function(e){return window.confirm(e)}},t.Component=x,t.default=(0,_.connect)(l,a)(x)},"./client/src/components/ProportionConstraintField/ProportionConstraintField.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n0&&(!e.message||"error"!==e.message.type)}).length;return Math.max(e-t,0)}},{key:"getFolderId",value:function(){var e=this.state.selectingItem;return e&&"object"===(void 0===e?"undefined":c(e))?e.parent.id:this.props.data.parentid||0}},{key:"handleAddedFile",value:function(e){var t=d({},e,{uploaded:!0});this.props.actions.uploadField.addFile(this.props.id,t)}},{key:"handleSending",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.uploadField.succeedUpload(this.props.id,e._queuedId,t[0])}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.uploadField.failUpload(this.props.id,e._queuedId,t)}},{key:"handleItemRemove",value:function(e,t){this.props.actions.uploadField.removeFile(this.props.id,t)}},{key:"handleReplaceShow",value:function(e,t){this.setState({selecting:!0,selectingItem:t})}},{key:"handleChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if("function"==typeof t.onChange){var n=t.files.filter(function(e){return e.id}).map(function(e){return e.id}),o={Files:n};t.onChange(e,{id:t.id,value:o})}}},{key:"handleUploadButton",value:function(e){e.preventDefault()}},{key:"handleAddShow",value:function(e){e.preventDefault(),this.setState({selecting:!0,selectingItem:null})}},{key:"handleHide",value:function(){this.setState({selecting:!1,selectingItem:null})}},{key:"handleAddInsert",value:function(e,t,n){return this.props.actions.uploadField.addFile(this.props.id,n),this.handleHide(),Promise.resolve({})}},{key:"handleInsertMany",value:function(e,t){var n=this;if(this.state.selectingItem)return void this.handleReplace(e,null,t[0]);t.forEach(function(t){n.handleAddInsert(e,null,t)})}},{key:"handleReplace",value:function(e,t,n){var o=this.state.selectingItem,r=this.props,s=r.id,i=r.actions.uploadField,l=i.addFile,a=i.removeFile;if(!o)throw new Error("Tried to replace a file when none was selected.");return a(s,o),l(s,n),this.handleHide(),Promise.resolve({})}},{key:"canEdit",value:function(){return!this.props.disabled&&!this.props.readOnly&&(this.props.data.canUpload||this.props.data.canAttach)}},{key:"canUpload",value:function(){return this.canEdit()&&this.props.data.canUpload}},{key:"canAttach",value:function(){return this.canEdit()&&this.props.data.canAttach}},{key:"renderDropzone",value:function(){var e=this.props.AssetDropzone;if(!this.props.data.createFileEndpoint)return null;var t={height:E.default.SMALL_THUMBNAIL_HEIGHT,width:E.default.SMALL_THUMBNAIL_WIDTH},n=this.getMaxFiles(),o={url:this.props.data.createFileEndpoint.url,method:this.props.data.createFileEndpoint.method,paramName:"Upload",maxFiles:n,thumbnailWidth:E.default.SMALL_THUMBNAIL_WIDTH,thumbnailHeight:E.default.SMALL_THUMBNAIL_HEIGHT},r=["uploadfield__dropzone"];if(0===n&&r.push("uploadfield__dropzone--hidden"),!this.canEdit())return this.props.files.length?null:g.default.createElement("p",null,h.default._t("AssetAdmin.EMPTY","No files"));var s=this.props.securityId,i=[];return this.canUpload()&&i.push(g.default.createElement("button",{key:"uploadbutton",type:"button",onClick:this.handleUploadButton,className:"uploadfield__upload-button"},h.default._t("AssetAdmin.UPLOADFIELD_UPLOAD_NEW","Upload new"))),this.canAttach()&&(i.length&&i.push(g.default.createElement("span",{key:"uploadjoin",className:"uploadfield__join"},h.default._t("AssetAdmin.OR","or"))),i.push(g.default.createElement("button",{key:"attachbutton",type:"button",onClick:this.handleAddShow,className:"uploadfield__add-button"},h.default._t("AssetAdmin.UPLOADFIELD_CHOOSE_EXISTING","Choose existing")))),g.default.createElement(e,{name:this.props.name,canUpload:this.canUpload(),uploadButton:!1,uploadSelector:".uploadfield__upload-button, .uploadfield__backdrop",folderId:this.props.data.parentid,onAddedFile:this.handleAddedFile,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:t,options:o,securityID:s,className:r.join(" ")},g.default.createElement("div",{className:"uploadfield__backdrop"}),g.default.createElement("span",{className:"uploadfield__droptext"},i))}},{key:"renderModal",value:function(){var e=this.props.InsertMediaModal,t=this.state,n=t.selecting,o=t.selectingItem,r=this.getMaxFiles(),s=this.getFolderId();return g.default.createElement(e,{title:!1,isOpen:n,onInsert:o?this.handleReplace:this.handleAddInsert,onClosed:this.handleHide,onInsertMany:this.handleInsertMany,maxFiles:o?1:r,type:"select",bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",fileAttributes:o?{ID:o.id}:null,folderId:s})}},{key:"renderChild",value:function(e,t){var n=this.props.UploadFieldItem,o={key:e.id?"file-"+e.id:"queued-"+e.queuedId,item:e,name:this.props.name,onRemove:this.handleItemRemove,canEdit:this.canEdit(),onView:this.handleReplaceShow},r=this.props.getItemProps(o,t,this.props);return g.default.createElement(n,r)}},{key:"render",value:function(){return g.default.createElement("div",{className:"uploadfield"},this.renderDropzone(),this.props.files.map(this.renderChild),this.renderModal())}}]),t}(m.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string.isRequired,onChange:A.default.func,value:A.default.shape({Files:A.default.arrayOf(A.default.number)}),files:A.default.arrayOf(w.default),readOnly:A.default.bool,disabled:A.default.bool,data:A.default.shape({files:A.default.arrayOf(w.default),createFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string.isRequired}),multi:A.default.bool,parentid:A.default.number,canUpload:A.default.bool,canAttach:A.default.bool,maxFiles:A.default.number}),UploadFieldItem:A.default.oneOfType([A.default.node,A.default.func]),AssetDropzone:A.default.oneOfType([A.default.node,A.default.func]),InsertMediaModal:A.default.oneOfType([A.default.node,A.default.func]),getItemProps:A.default.func},x.defaultProps={value:{Files:[]},className:"",getItemProps:function(e){return e}};var k=(0,y.connect)(a,u)(x);t.Component=x,t.ConnectedUploadField=k,t.default=(0,_.compose)((0,v.inject)(["UploadFieldItem","AssetDropzone","InsertMediaModal"]),j.default)(k)},"./client/src/components/UploadField/UploadFieldItem.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"isImageSmallerThanThumbnail",value:function(){if(!this.isImage()||this.missing())return!1;var e=this.props.item.width,t=this.props.item.height;return t&&e&&t0}).length)return alert(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FOLDER","These folders contain files which are currently in use, you must move or delete their contents before you can delete the folder.")),void n("cancelled");var o=e.filter(function(e){return"folder"!==e.type&&e.inUseCount>0}),s=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_CONFIRM","Are you sure you want to delete these files?");1===e.length&&1===o.length?s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),e[0].inUseCount):o.length>0&&(s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_MULTI_CONFIRM","There are %s files currently in use, are you sure you want to delete these files?"),o.length)),o.length>0&&(s+="\n\n",s+=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(s)?t():n("cancelled")})})},{value:"edit",label:r.default._t("AssetAdmin.BULK_ACTIONS_EDIT","Edit"),className:"font-icon-edit",destructive:!1,canApply:function(e){return 1===e.length},callback:null},{value:"move",label:r.default._t("AssetAdmin.BULK_ACTIONS_MOVE","Move"),className:"font-icon-folder-move",canApply:function(e){return e.every(function(e){return e&&e.canEdit})},destructive:!1,callback:null},{value:"publish",label:r.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH","Publish"),className:"font-icon-rocket",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e&&!e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"unpublish",label:r.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH","Unpublish"),className:"font-icon-cancel-circled",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"insert",label:r.default._t("AssetAdmin.BULK_ACTIONS_INSERT","Insert"),className:"font-icon-plus-circled btn-primary",destructive:!1,callback:null,canApply:function(e){return e.length},confirm:null}],BULK_ACTIONS_PLACEHOLDER:r.default._t("AssetAdmin.BULK_ACTIONS_PLACEHOLDER"),SPACE_KEY_CODE:32,RETURN_KEY_CODE:13,DEFAULT_PREVIEW:"framework/client/dist/images/app_icons/generic_92.png",MODAL_MOVE:"MODAL_MOVE"}},"./client/src/containers/AssetAdmin/AssetAdmin.js":function(e,t,n){"use strict";function o(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 s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1])||arguments[1];return S.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:this.props.securityId}}:{}))}},{key:"handleBackButtonClick",value:function(e){e.preventDefault(),this.props.actions.gallery.deselectFiles(),this.props.folder?this.handleOpenFolder(this.props.folder.parentId||0):this.handleOpenFolder(0)}},{key:"resetFile",value:function(e){e.queuedId&&this.props.actions.queuedFiles.removeQueuedFile(e.queuedId),this.props.fileId===e.id&&(this.handleCloseFile(),this.handleOpenFile(e.id))}},{key:"handleFolderIcon",value:function(e){e.preventDefault(),this.handleOpenFile(this.getFolderId())}},{key:"handleOpenFile",value:function(e){this.handleBrowse(this.getFolderId(),e,this.props.query)}},{key:"handleSubmitEditor",value:function(e,t,n){var o=this,r=null;if("action_insert"===t&&"select"===this.props.type){var s=this.getFiles(),i=s.find(function(t){return t.id===parseInt(e.ID,10)});return this.props.onInsertMany(null,[i]),Promise.resolve()}if("function"==typeof this.props.onSubmitEditor){var l=this.findFile(this.props.fileId);r=this.props.onSubmitEditor(e,t,n,l)}else r=n();if(!r)throw new Error("Promise was not returned for submitting");return r.then(function(e){return"action_createfolder"===t&&"admin"===o.props.type&&o.handleOpenFile(e.record.id),o.props.actions.files.readFiles().then(function(){return"action_createfolder"===t&&"admin"!==o.props.type&&o.handleOpenFolder(o.getFolderId()),e})})}},{key:"handleCloseFile",value:function(){this.handleBrowse(this.getFolderId(),null,this.props.query)}},{key:"handleOpenFolder",value:function(e){var t=Object.assign({},this.props.query);delete t.page,delete t.filter,this.handleBrowse(e,null,t)}},{key:"handleDelete",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for deletion cannot be found: "+e);return n.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(n.queuedId),n}),o=n.map(function(e){return e.id}),r=this.props.folder?this.props.folder.id:0;return this.props.actions.files.deleteFiles(o,r).then(function(e){var n=e.data.deleteFiles;return t.handleBrowse(r,null,t.props.query),t.props.queuedFiles.items.filter(function(e){return o.includes(e.id)}).forEach(function(e){e.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),t.props.actions.files.readFiles(),n})}},{key:"doUnpublish",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for unpublishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot unpublish folders");return n}),r=o.map(function(e){return e.id});return this.props.actions.files.unpublishFiles(r,n).then(function(e){var n=e.data.unpublishFiles,o=n.filter(function(e){return"File"===e.__typename}),r=n.filter(function(e){return"PublicationNotice"===e.__typename&&"HAS_OWNERS"===e.Type}),s=o.map(function(e){return t.resetFile(e),e}),i=r.slice(0,4),l=r.slice(5),a=i.map(function(e){return e.Message});if(l.length&&a.push(C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_REMAINING","And {count} other file(s)"),{count:l.length})),i.length){var u=[C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_HEADING","{count} file(s) are being used by other published content."),{count:r.length}),a.join("\n"),C.default._t("AssetAdmin.BULK_OWNED_WARNING_FOOTER","Unpublishing will only remove files from the published version of the content. They will remain on the draft version. Unpublish anyway?")];if(confirm(u.join("\n\n"))){var d=r.reduce(function(e,t){return e.concat(t.IDs)},[]);return t.doUnpublish(d,!0).then(function(e){return s.concat(e)})}}return s})}},{key:"handleUnpublish",value:function(e){var t=this;return this.doUnpublish(e).then(function(e){var n=t.props.fileId;t.props.actions.files.readFiles().then(function(){n&&e.find(function(e){return e.id===n})&&(t.handleCloseFile(),t.handleOpenFile(n))})})}},{key:"doPublish",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for publishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot publish folders");return n}),o=n.map(function(e){return e.id});return this.props.actions.files.publishFiles(o).then(function(e){return e.data.publishFiles.filter(function(e){return"File"===e.__typename}).map(function(e){return t.resetFile(e),e})})}},{key:"findFile",value:function(e){return this.getFiles().find(function(t){return t.id===parseInt(e,10)})}},{key:"handleUpload",value:function(){}},{key:"handleUploadQueue",value:function(){this.props.fileId&&this.props.actions.files.readFiles()}},{key:"handleCreateFolder",value:function(){this.props.onBrowse(this.getFolderId(),null,this.props.query,te.default.ACTIONS.CREATE_FOLDER)}},{key:"handleMoveFilesSuccess",value:function(e,t){var n=this;this.props.queuedFiles.items.filter(function(e){return t.includes(e.id)}).forEach(function(e){e.queuedId&&n.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),this.props.actions.gallery.deselectFiles(),this.props.actions.files.readFiles()}},{key:"renderGallery",value:function(){var e=this.props.sectionConfig,t=e.createFileEndpoint.url,n=e.createFileEndpoint.method,o=this.props.query&&parseInt(this.props.query.limit||e.limit,10),r=this.props.query&&parseInt(this.props.query.page||1,10),s=this.props.query&&this.props.query.sort,i=this.props.query&&this.props.query.view,l=this.props.query.filter||{};return g.default.createElement(L.default,{files:this.getFiles(),fileId:this.props.fileId,folderId:this.getFolderId(),folder:this.props.folder,type:this.props.type,limit:o,page:r,totalCount:this.props.filesTotalCount,view:i,filters:l,graphQLErrors:this.props.graphQLErrors,createFileApiUrl:t,createFileApiMethod:n,onDelete:this.handleDelete,onInsertMany:this.props.onInsertMany,onPublish:this.doPublish,onUnpublish:this.doUnpublish,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSuccessfulUpload:this.handleUpload,onSuccessfulUploadQueue:this.handleUploadQueue,onCreateFolder:this.handleCreateFolder,onMoveFilesSuccess:this.handleMoveFilesSuccess,onClearSearch:this.handleClearSearch,onSort:this.handleSort,onSetPage:this.handleSetPage,onViewChange:this.handleViewChange,sort:s,sectionConfig:e,loading:this.props.loading,maxFilesSelect:this.props.maxFiles})}},{key:"renderEditor",value:function(){var e=this.props.sectionConfig,t=u({config:e,viewAction:this.props.viewAction,folderId:this.getFolderId(),type:this.props.type,fileId:this.props.fileId}),n=t.schemaUrl,o=t.targetId;return n?g.default.createElement(R.default,{className:this.props.dialog?"editor--dialog":"",targetId:o,file:this.findFile(o),onClose:this.handleCloseFile,schemaUrl:n,schemaUrlQueries:this.props.requireLinkText?[{name:"requireLinkText",value:!0}]:[],onSubmit:this.handleSubmitEditor,onDelete:this.handleDelete,onUnpublish:this.handleUnpublish,addToCampaignSchemaUrl:e.form.addToCampaignForm.schemaUrl}):null}},{key:"render",value:function(){var e=Boolean(this.props.folderId||(0,z.hasFilters)(this.props.query.filter)),t=this.props.sectionConfig.form.fileSearchForm.schemaUrl,n=this.props.query.filter||{},o=(0,O.default)("fill-height asset-admin","select"===this.props.type&&{"asset-admin--single-select":1===this.props.maxFiles,"asset-admin--multi-select":1!==this.props.maxFiles}),r=(0,z.hasFilters)(this.props.query.filter)||this.props.showSearch,s=this.props.actions.displaySearch?this.props.actions.displaySearch.toggleSearch:void 0;return g.default.createElement("div",{className:o},g.default.createElement(q.default,{showBackButton:e,onBackButtonClick:this.handleBackButtonClick},g.default.createElement(G.default,{multiline:!0}),g.default.createElement("div",{className:"asset-admin__toolbar-extra pull-xs-right fill-width vertical-align-items"},g.default.createElement(K.default,{toggled:r,onToggle:s}),this.props.toolbarChildren)),r&&g.default.createElement(V.default,{onSearch:this.handleDoSearch,id:"AssetSearchForm",formSchemaUrl:t,onHide:this.handleClearSearch,displayBehavior:"HIDEABLE",filters:n,name:"name"}),g.default.createElement("div",{className:"flexbox-area-grow fill-width fill-height gallery"},this.renderGallery(),this.renderEditor()))}}]),t}(m.Component);se.propTypes={dialog:_.default.bool,sectionConfig:oe.default,fileId:_.default.number,folderId:_.default.number,onBrowse:_.default.func,onReplaceUrl:_.default.func,onInsertMany:_.default.func,graphQLErrors:_.default.arrayOf(_.default.string),getUrl:_.default.func,query:_.default.shape({sort:_.default.string,limit:_.default.oneOfType([_.default.number,_.default.string]),page:_.default.oneOfType([_.default.number,_.default.string]),filter:_.default.object}),onSubmitEditor:_.default.func,type:_.default.oneOf(["insert-media","insert-link","select","admin"]),files:_.default.array,queuedFiles:_.default.shape({items:_.default.array.isRequired}),filesTotalCount:_.default.number,folder:_.default.shape({id:_.default.number,title:_.default.string,parents:_.default.array,parentId:_.default.number,canView:_.default.bool,canEdit:_.default.bool}),loading:_.default.bool,actions:_.default.object,maxFiles:_.default.number},se.defaultProps={type:"admin",query:{sort:"",limit:null,page:0,filter:{}},maxFiles:null},t.Component=se,t.getFormSchema=u,t.default=(0,b.compose)((0,v.connect)(c,p),(0,re.injectGraphql)("ReadFilesQuery"),Y.default,X.default,J.default,function(e){return(0,H.withApollo)(e)})(se)},"./client/src/containers/AssetAdmin/AssetAdminRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.base,n=e.folderId,o=e.fileId,r=e.query,s=e.action;if(s&&-1===O.indexOf(s))throw new Error("Invalid action provided: "+s);var i=null;return i=o?t+"/show/"+n+"/"+S.default.ACTIONS.EDIT_FILE+"/"+o:n?t+"/show/"+n:t+"/",s===S.default.ACTIONS.CREATE_FOLDER&&(i=t+"/show/"+(n||0)+"/"+s),r&&Object.keys(r).length>0&&(i=i+"?"+b.default.stringify(r)),i}function a(e){return{sectionConfig:e.config.sections.find(function(e){return e.name===w})}}Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=r!==this.getFolderId(),a=Object.assign({},n);return(i||a.page<=1)&&delete a.page,l({base:"/"+this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return this.props.match.params&&this.props.match.params.folderId?parseInt(this.props.match.params.folderId,10):0}},{key:"getFileId",value:function(){return this.props.match.params&&this.props.match.params.fileId?parseInt(this.props.match.params.fileId,10):0}},{key:"getViewAction",value:function(){return this.props.match.params&&this.props.match.params.viewAction?this.props.match.params.viewAction:S.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){return{sectionConfig:this.props.sectionConfig,type:"admin",folderId:this.getFolderId(),viewAction:this.getViewAction(),fileId:this.getFileId(),query:this.getQuery(),getUrl:this.getUrl,onBrowse:this.handleBrowse,onReplaceUrl:this.handleReplaceUrl}}},{key:"getQuery",value:function(){return(0,_.decodeQuery)(this.props.location.search)}},{key:"handleBrowse",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.push(r)}},{key:"handleReplaceUrl",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.replace(r)}},{key:"render",value:function(){return this.props.sectionConfig?c.default.createElement(y.default,this.getSectionProps()):null}}]),t}(d.Component);I.propTypes={sectionConfig:C.default,location:f.default.shape({pathname:f.default.string,query:f.default.object,search:f.default.string}),params:f.default.object,router:f.default.object},t.Component=I,t.buildUrl=l,t.default=(0,m.withRouter)((0,h.connect)(a)(I))},"./client/src/containers/AssetAdmin/stateRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){function t(t){var n=t.config.sections.find(function(e){return e.name===y});return{Component:e,sectionConfig:n}}return(0,f.connect)(t)(v)}Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAdminStateRouter=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=this.getFolderId(),l=r!==i&&null!==i,a=Object.assign({},n);return(l||a.page<=1)&&delete a.page,(0,h.buildUrl)({base:this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return null===this.state.folderId?null:parseInt(this.state.folderId||0,10)}},{key:"getFileId",value:function(){return parseInt(this.state.fileId||this.props.fileId||0,10)}},{key:"getViewAction",value:function(){return this.state.action||g.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){var e=Object.assign({},this.props,{folderId:this.getFolderId(),fileId:this.getFileId(),viewAction:this.getViewAction(),query:this.state.query,getUrl:this.getUrl,onBrowse:this.handleBrowse});return delete e.Component,e}},{key:"handleBrowse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE;if(o&&-1===Object.values(g.default.ACTIONS).indexOf(o))throw new Error("Invalid action provided: "+o);this.setState({folderId:e,fileId:t,query:n,action:o})}},{key:"render",value:function(){var e=this.getSectionProps(),t=this.props.Component;return d.default.createElement(t,e)}}]),t}(u.Component);v.propTypes={Component:p.default.oneOfType([p.default.element,p.default.func]),sectionConfig:p.default.shape({url:p.default.string.isRequired}).isRequired,fileId:p.default.number},t.AssetAdminStateRouter=v,t.default=l},"./client/src/containers/Editor/Editor.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{actions:{unsavedForms:(0,f.bindActionCreators)(j,e)}}}function a(e){return{enableDropzone:e.assetAdmin.gallery.enableDropzone}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&(o=c.default.sprintf(c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),this.props.file.inUseCount),o+="\n\n",o+=c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(o)&&(this.props.actions.unsavedForms.removeFormChanged("AssetAdmin.EditForm"),this.props.onDelete([t.ID])),e.preventDefault()}}},{key:"handleCancelKeyDown",value:function(e){e.keyCode!==y.default.SPACE_KEY_CODE&&e.keyCode!==y.default.RETURN_KEY_CODE||this.handleClose(e)}},{key:"handleSubmit",value:function(e,t,n){return"function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n()}},{key:"handleClose",value:function(e){this.props.onClose(),this.closeModal(),e&&e.preventDefault()}},{key:"openModal",value:function(){this.setState({openModal:!0})}},{key:"closeModal",value:function(){this.setState({openModal:!1})}},{key:"replaceFile",value:function(){var e=document.querySelector(".dz-input-PreviewImage");e&&e.click()}},{key:"handleLoadingError",value:function(e){this.setState({loadingForm:!1,loadingError:e.errors[0]})}},{key:"handleLoadingSuccess",value:function(){this.setState({loadingForm:!1,loadingError:null})}},{key:"handleFetchingSchema",value:function(){this.setState({loadingForm:!0})}},{key:"renderCancelButton",value:function(){return m.default.createElement("a",{role:"button",tabIndex:0,className:"btn btn--close-panel btn--no-text font-icon-cancel btn--icon-xl",onClick:this.handleClose,onKeyDown:this.handleCancelKeyDown,type:"button","aria-label":c.default._t("AssetAdmin.CANCEL")})}},{key:"render",value:function(){var e=this.props.schemaUrlQueries.map(function(e){return e.name+"="+e.value}).join("&").trim();e=e?"?"+e:"";var t=this.props.schemaUrl+"/"+this.props.targetId+e,n=this.props.addToCampaignSchemaUrl+"/"+this.props.targetId,o=["panel","form--no-dividers","editor"];this.props.className&&o.push(this.props.className),this.props.enableDropzone||o.push("editor--asset-dropzone--disable");var r=null;if(this.state.loadingError){var s=this.state.loadingError.value;404===this.state.loadingError.code&&(s=c.default._t("AssetAdmin.FILE_MISSING","File cannot be found")),s||(s=c.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")),r=m.default.createElement("div",{className:"editor__file-preview-message--file-missing"},s)}var i=c.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign"),l=this.props.loadingComponent;return m.default.createElement("div",{className:o.join(" ")},m.default.createElement("div",{className:"editor__details fill-height"},m.default.createElement(v.default,{identifier:"AssetAdmin.EditForm",schemaUrl:t,afterMessages:this.renderCancelButton(),onSubmit:this.handleSubmit,onAction:this.handleAction,onLoadingSuccess:this.handleLoadingSuccess,onLoadingError:this.handleLoadingError,onFetchingSchema:this.handleFetchingSchema}),r,m.default.createElement(E.default,{title:i,identifier:"AssetAdmin.AddToCampaign",isOpen:this.state.openModal,onClosed:this.closeModal,schemaUrl:n,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good"}),this.state.loadingForm&&m.default.createElement(l,null)))}}]),t}(h.Component);A.propTypes={file:w.default,className:I.default.string,targetId:I.default.number.isRequired,enableDropzone:I.default.bool,onClose:I.default.func.isRequired,onSubmit:I.default.func.isRequired,onDelete:I.default.func.isRequired,schemaUrl:I.default.string.isRequired,schemaUrlQueries:I.default.arrayOf(I.default.shape({name:I.default.string,value:I.default.any})),addToCampaignSchemaUrl:I.default.string,actions:I.default.object},t.Component=A,t.default=(0,f.compose)((0,F.inject)(["Loading"],function(e){return{loadingComponent:e}},function(){return"AssetAdmin.Editor"}),(0,p.connect)(a,l))(A)},"./client/src/containers/Gallery/Gallery.js":function(e,t,n){"use strict";function o(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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=t.sort,o=e.assetAdmin.gallery,r=o.selectedFiles,s=o.errorMessage,i=o.noticeMessage,l=o.enableDropzone,a=o.badges,u=o.concatenateSelect,d=o.loading,c=o.sorters,p=o.lastSelected;return!n&&c&&c[0]&&(n=c[0].field+","+c[0].direction),{lastSelected:p,selectedFiles:r,errorMessage:s,noticeMessage:i,enableDropzone:l,badges:a,concatenateSelect:u,loading:t.loading||d,queuedFiles:e.assetAdmin.queuedFiles,securityId:e.config.SecurityID,sorters:c,sort:n}}function u(e){return{actions:{gallery:(0,S.bindActionCreators)(R,e),queuedFiles:(0,S.bindActionCreators)(L,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.galleryViewDefaultProps=t.galleryViewPropTypes=t.Component=void 0;var d=Object.assign||function(e){for(var t=1;t=s&&t<=i}).map(function(e){return e.id})}},{key:"getSelectableFiles",value:function(){var e=this.props.files.filter(function(e){return e.id});return"select"===this.props.type?e.filter(function(e){return"folder"!==e.type}):e}},{key:"handleBulkInsert",value:function(e,t){this.props.onInsertMany(e,t)}},{key:"handleBulkDelete",value:function(e,t){var n=this;return this.props.onDelete(t.map(function(e){return e.id})).then(function(e){var o=e.filter(function(e){return e}).length;o!==t.length?(n.props.actions.gallery.setErrorMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FAIL","%s folders/files were successfully deleted, but %s files were not able to be deleted."),o,t.length-o)),n.props.actions.gallery.setNoticeMessage(null)):(n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SUCCESS","%s folders/files were successfully deleted."),o)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles())})}},{key:"handleBulkPublish",value:function(e,t){var n=this,o=t.map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onPublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH_SUCCESS","%s folders/files were successfully published."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"handleBulkUnpublish",value:function(e,t){var n=this,o=t.filter(function(e){return e.published}).map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onUnpublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH_SUCCESS","%s folders/files were successfully unpublished."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"initSortDropdown",value:function(){if("tile"===this.props.view){var e=this.getSortElement();e.chosen({allow_single_deselect:!0,disable_search_threshold:20}),e.off("change"),e.on("change",function(){return e.find(":selected")[0].click()})}}},{key:"handleSort",value:function(e){this.props.actions.queuedFiles.purgeUploadQueue(),this.props.onSort(e)}},{key:"handleSetPage",value:function(e){this.props.onSetPage(e)}},{key:"handleCancelUpload",value:function(e){e.xhr.abort(),this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleRemoveErroredUpload",value:function(e){this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleAddedFile",value:function(e){this.props.actions.queuedFiles.addQueuedFile(e)}},{key:"handlePreviewLoaded",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e.queuedId,t)}},{key:"handleSending",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.queuedFiles.succeedUpload(e._queuedId,t[0]),this.props.onSuccessfulUpload&&this.props.onSuccessfulUpload(t);var n=this.props.queuedFiles.items.reduce(function(e,t){return 100!==t.progress?e+1:e},0);if(!this.props.fileId&&!this.props.selectedFiles.length&&0===n){var o=t.pop();this.props.onOpenFile(o.id)}}},{key:"handleQueueComplete",value:function(){this.props.onSuccessfulUploadQueue&&this.props.onSuccessfulUploadQueue()}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.queuedFiles.failUpload(e._queuedId,t)}},{key:"itemIsSelected",value:function(e){return this.props.selectedFiles.indexOf(e)>-1}},{key:"toggleSelectConcat",value:function(e){this.props.actions.gallery.setConcatenateSelect(this.isConcat(e))}},{key:"isConcat",value:function(e){return e.metaKey||e.ctrlKey||e.shiftKey}},{key:"itemIsHighlighted",value:function(e){return this.props.fileId===e}},{key:"hasOpenedItem",value:function(){return!!this.props.fileId}},{key:"handleClearSearch",value:function(e){this.props.onClearSearch(e)}},{key:"handleGroupSelect",value:function(e,t){var n=this,o=this.props.actions.gallery,r=o.setSelectedFiles,s=o.selectFiles,i=this.getSelectableFiles(),l=e.filter(function(t,n){return e.indexOf(t)===n&&i.find(function(e){return e.id===t})}),a=this.props.concatenateSelect||this.isConcat(t);if(null!==this.props.maxFilesSelect){var u=l.length;if(a&&(u=this.props.selectedFiles.filter(function(e){return!n.props.selectedFiles.includes(e)}).concat(this.props.selectedFiles).length),u>=this.props.maxFilesSelect)return}a?s(l):r(l)}},{key:"handleClearSelection",value:function(){this.props.actions.gallery.deselectFiles()}},{key:"handleOpenFolder",value:function(e,t){e.preventDefault(),this.props.actions.gallery.setErrorMessage(null),this.props.actions.gallery.setNoticeMessage(null),this.props.onOpenFolder(t.id)}},{key:"handleOpenFile",value:function(e,t){e.preventDefault(),null!==t.created&&(this.props.selectedFiles.length&&1!==this.props.maxFilesSelect||"select"!==this.props.type||this.handleSelect(e,t),this.props.onOpenFile(t.id,t))}},{key:"handleSelect",value:function(e,t){var n=this.props.maxFilesSelect,o=this.getSelectableFiles(),r=o.filter(function(e){return e.id===t.id}).map(function(e){return e.id});if(1===n)return void this.props.actions.gallery.setSelectedFiles(r);if(-1===this.props.selectedFiles.indexOf(t.id)){if(e.shiftKey&&(r=this.getSelection(this.props.lastSelected,t.id)),this.props.selectedFiles.filter(function(e){return!r.includes(e)}).concat(r).length>n&&null!==n)return;this.props.actions.gallery.selectFiles(r),this.props.actions.gallery.setLastSelected(t.id)}else this.props.actions.gallery.deselectFiles([t.id]),e.shiftKey&&this.props.actions.gallery.setLastSelected(null)}},{key:"handleEnableDropzone",value:function(e){this.props.actions.gallery.setEnableDropzone(e)}},{key:"handleMoveFiles",value:function(e,t){var n=this;this.props.actions.files.moveFiles(e,t).then(function(){var o=P.default.MOVE_SUCCESS_DURATION,r="+"+t.length;n.props.actions.gallery.setFileBadge(e,r,"success",o),"function"==typeof n.props.onMoveFilesSuccess&&n.props.onMoveFilesSuccess(e,t)}).catch(function(){n.props.actions.gallery.setErrorMessage(g.default._t("AssetAdmin.FAILED_MOVE","There was an error moving the selected items."))})}},{key:"handleBulkEdit",value:function(e,t){this.handleOpenFile(e,t[0])}},{key:"handleBulkMove",value:function(){this.props.actions.gallery.activateModal(P.default.MODAL_MOVE)}},{key:"renderTransitionBulkActions",value:function(){return this.renderBulkActions()}},{key:"renderBulkActions",value:function(){var e=this,t="select"===this.props.type?function(e){return"insert"===e.value}:function(e){return"insert"!==e.value},n=P.default.BULK_ACTIONS.filter(t).map(function(t){if(t.callback)return t;switch(t.value){case"delete":return d({},t,{callback:e.handleBulkDelete});case"edit":return d({},t,{callback:e.handleBulkEdit});case"move":return d({},t,{callback:e.handleBulkMove});case"publish":return d({},t,{callback:e.handleBulkPublish});case"unpublish":return d({},t,{callback:e.handleBulkUnpublish});case"insert":return d({},t,{callback:e.handleBulkInsert,color:"primary"});default:return t}}),o=this.props.selectedFiles.map(function(t){return e.props.files.find(function(e){return e&&t===e.id})}).filter(function(e){return e});return o.length>0&&["admin","select"].includes(this.props.type)?_.default.createElement(O.default,{actions:n,items:o,total:this.props.maxFilesSelect,key:o.length>0,container:this.gallery,showCount:1!==this.props.maxFilesSelect}):null}},{key:"renderGalleryView",value:function(){var e=this,t="table"===this.props.view?x.default:F.default,n=this.props.files.map(function(t){return d({},t,{selected:e.itemIsSelected(t.id),highlighted:e.itemIsHighlighted(t.id)})}),o=this.props,r=o.type,s=o.loading,i=o.page,l=o.totalCount,a=o.limit,u=o.sort,c=o.selectedFiles,p=o.badges,f={selectableItems:["admin","select"].includes(r),selectableFolders:"select"!==this.props.type,files:n,loading:s,page:i,totalCount:l,limit:a,sort:u,selectedFiles:c,badges:p,onSort:this.handleSort,onSetPage:this.handleSetPage,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSelect:this.handleSelect,onCancelUpload:this.handleCancelUpload,onDropFiles:this.handleMoveFiles,onRemoveErroredUpload:this.handleRemoveErroredUpload,onEnableDropzone:this.handleEnableDropzone,sectionConfig:this.props.sectionConfig,canDrag:"admin"===this.props.type,maxFilesSelect:this.props.maxFilesSelect};return _.default.createElement(t,f)}},{key:"renderToolbar",value:function(){var e=this.props,t=e.GalleryToolbar,n=e.sort,o=e.view,r=e.folder,s=e.onCreateFolder,i=e.onOpenFolder,l=e.onViewChange,a={onMoveFiles:this.handleMoveFiles,onSort:this.handleSort,onCreateFolder:s,onOpenFolder:i,onViewChange:l,view:o,sort:n,folder:r};return _.default.createElement(t,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.folder,o=t.loading,r=t.errorMessage,s=t.graphQLErrors,i=t.noticeMessage,l=this.props.LoadingComponent,a=s&&s.length>0;if(!n)return r||a?_.default.createElement("div",{className:"gallery__error flexbox-area-grow"},_.default.createElement("div",{className:"gallery__error-message"},_.default.createElement("h3",null,g.default._t("AssetAdmin.DROPZONE_RESPONSE_ERROR","Server responded with an error.")),r&&_.default.createElement("p",null,r),a&&s.map(function(e,t){return _.default.createElement("p",{key:t},e)}))):o?_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement(l,null)):_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement("div",{className:"editor__file-preview-message--file-missing m-t-3"},g.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")));var u=_.default.createElement("div",{className:"gallery_messages"},r&&_.default.createElement(T.default,{value:r,type:"danger"}),i&&_.default.createElement(T.default,{value:i,type:"success"})),c={height:P.default.THUMBNAIL_HEIGHT,width:P.default.THUMBNAIL_WIDTH},p=d({url:this.props.createFileApiUrl,method:this.props.createFileApiMethod,paramName:"Upload",clickable:"#upload-button"},this.props.sectionConfig.dropzoneOptions),f=this.props.securityId,h=this.props.folder.canEdit&&this.props.enableDropzone,m=["panel","panel--padded","panel--scrollable","gallery__main","fill-height"];"insert"===this.props.type&&m.push("insert-media-modal__main");var y=m;return this.hasOpenedItem()&&y.push("gallery__main--has-opened-item"),_.default.createElement("div",{className:"flexbox-area-grow gallery__outer",ref:function(t){e.gallery=t}},this.renderTransitionBulkActions(),_.default.createElement(z.default,{className:m.join(" ")},this.renderToolbar(),_.default.createElement(q.SelectableGroup,{enabled:"tile"===this.props.view&&"admin"===this.props.type,className:"flexbox-area-grow fill-height gallery__main--selectable",onSelection:this.handleGroupSelect,onNonItemClick:this.handleClearSelection,preventDefault:!1,fixedPosition:!0},_.default.createElement(C.default,{name:"gallery-container",className:"flexbox-area-grow",canUpload:h,onAddedFile:this.handleAddedFile,onPreviewLoaded:this.handlePreviewLoaded,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onQueueComplete:this.handleQueueComplete,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:c,folderId:this.props.folderId,options:p,securityID:f,uploadButton:!1},u,this.renderGalleryView()))),this.props.loading&&_.default.createElement(l,null),_.default.createElement(Q.default,{sectionConfig:this.props.sectionConfig,folderId:this.props.folderId,onSuccess:this.props.onMoveFilesSuccess,onOpenFolder:this.props.onOpenFolder}))}}]),t}(y.Component),J={page:1,limit:15},ee={sectionConfig:W.default,loading:X.default.bool,sort:X.default.string,files:X.default.arrayOf(X.default.shape({id:X.default.number,parent:X.default.shape({id:X.default.number})})).isRequired,selectedFiles:X.default.arrayOf(X.default.number),totalCount:X.default.number,page:X.default.number,limit:X.default.number,badges:X.default.arrayOf(X.default.shape({id:X.default.number,message:X.default.node,status:X.default.string})),onOpenFile:X.default.func.isRequired,onOpenFolder:X.default.func.isRequired,onSort:X.default.func.isRequired,onSetPage:X.default.func.isRequired,maxFilesSelect:X.default.number},te=Object.assign({},J,{selectableItems:!1}),ne=Object.assign({},ee,{selectableItems:X.default.bool,selectableFolders:X.default.bool,onSelect:X.default.func,onCancelUpload:X.default.func,onDelete:X.default.func,onRemoveErroredUpload:X.default.func,onEnableDropzone:X.default.func});Z.defaultProps=Object.assign({},J,{type:"admin",view:"tile",enableDropzone:!0}),Z.propTypes=Object.assign({},ee,{onSuccessfulUpload:X.default.func,onSuccessfulUploadQueue:X.default.func,onCreateFolder:X.default.func,onMoveFilesSuccess:X.default.func,onDelete:X.default.func,onPublish:X.default.func,onUnpublish:X.default.func,type:X.default.oneOf(["insert-media","insert-link","select","admin"]),view:X.default.oneOf(["tile","table"]),lastSelected:X.default.number,dialog:X.default.bool,fileId:X.default.number,folderId:X.default.number.isRequired,folder:X.default.shape({id:X.default.number,title:X.default.string,parentId:X.default.number,canView:X.default.bool,canEdit:X.default.bool}),files:X.default.array,errorMessage:X.default.string,graphQLErrors:X.default.arrayOf(X.default.string),actions:X.default.object,securityId:X.default.string,onViewChange:X.default.func.isRequired,createFileApiUrl:X.default.string,createFileApiMethod:X.default.string,search:X.default.object,enableDropzone:X.default.bool,concatenateSelect:X.default.bool,GalleryToolbar:X.default.func,sorters:X.default.arrayOf(X.default.shape({field:X.default.string.isRequired,direction:X.default.oneOf(["asc","desc"]).isRequired,label:X.default.string.isRequired})).isRequired}),t.Component=Z,t.galleryViewPropTypes=ne,t.galleryViewDefaultProps=te,t.default=(0,S.compose)((0,Y.inject)(["GalleryToolbar","Loading"],function(e,t){return{GalleryToolbar:e,LoadingComponent:t}},function(){return"AssetAdmin.Gallery"}),(0,E.connect)(a,u),G.default,function(e){return(0,B.withApollo)(e)})(Z)},"./client/src/containers/Gallery/GalleryDND.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return h.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:g.default.get("SecurityID")}}:{}))},w=function(e){function t(e){r(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={detailView:null,history:[],loadedDetails:!1},n.handleClick=n.handleClick.bind(n),n.handleBack=n.handleBack.bind(n),n.timer=null,n.api=C(e.sectionConfig.historyEndpoint),n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.refreshHistoryIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.refreshHistoryIfNeeded(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.timer=null}},{key:"refreshHistoryIfNeeded",value:function(e){var t=this;if(!e&&!this.state.loadedDetails||e.data.fileId!==this.props.data.fileId||e.data.latestVersionId!==this.props.data.latestVersionId){this.setState({loadedDetails:!1});var n=e?e.data.fileId:this.props.data.fileId;clearTimeout(this.timer),this.timer=setTimeout(function(){t.api({fileId:n}).then(function(e){t.timer&&t.setState({history:e,loadedDetails:!0})})},250)}}},{key:"handleClick",value:function(e){this.setState({viewDetails:e})}},{key:"handleBack",value:function(e){e.preventDefault(),this.setState({viewDetails:null})}},{key:"render",value:function(){var e=this;if(!this.state.loadedDetails)return c.default.createElement("div",{className:"history-list history-list--loading"},"Loading...");if(this.state.viewDetails){var t=[this.props.historySchemaUrl,this.props.data.fileId,this.state.viewDetails].join("/"),n=["btn","btn-secondary","btn--icon-xl","btn--no-text","font-icon-left-open-big","history-list__back"].join(" ");return c.default.createElement("div",{className:"history-list"},c.default.createElement("a",{href:"#",className:n,onClick:this.handleBack}),c.default.createElement(b.default,{identifier:"AssetAdmin.HistoryList",schemaUrl:t,formTag:"div"}))}var o=this.state.history||[];return c.default.createElement("div",{className:"history-list"},c.default.createElement("ul",{className:"list-group list-group-flush history-list__list"},o.map(function(t){return c.default.createElement(_.default,a({key:t.versionid},t,{onClick:e.handleClick}))})))}}]),t}(d.Component);w.propTypes={sectionConfig:S.default.shape({form:S.default.object,historyEndpoint:S.default.shape({url:S.default.string,method:S.default.string,responseFormat:S.default.string})}),historySchemaUrl:S.default.string,data:S.default.object},w.defaultProps={data:{fieldId:0}},t.Component=w,t.default=(0,p.connect)(l)(w)},"./client/src/containers/MoveModal/MoveModal.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.assetAdmin.gallery,n=t.modal,o=t.selectedFiles;return{isOpen:n===y.default.MODAL_MOVE,selectedFiles:o,title:m.default.sprintf(m.default._t("AssetAdmin.MOVE_ITEMS_TO","Move %s item(s) to..."),o.length)}}function a(e){return{onClosed:function(){e((0,b.deactivateModal)())},setNotice:function(t){e((0,b.setNoticeMessage)(t))},setError:function(t){e((0,b.setErrorMessage)(t))},setBadge:function(){e(b.setFileBadge.apply(void 0,arguments))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0)return c.default.createElement("div",{className:"gallery__progress-bar--complete"});var t={className:"gallery__progress-bar-progress",style:{width:e.progress+"%"}};return c.default.createElement("div",{className:"gallery__progress-bar"},c.default.createElement("div",t))}},{key:"renderTitle",value:function(e){var t=this.renderProgressBar(e.rowData);return c.default.createElement("div",{className:"fill-width"},c.default.createElement("div",{className:"flexbox-area-grow"},e.data),t)}},{key:"renderSelect",value:function(e){if(this.props.selectableItems&&(this.props.selectableFolders||"folder"!==e.rowData.type)){var t={type:"checkbox",title:y.default._t("AssetAdmin.SELECT"),defaultChecked:e.data,tabIndex:-1,onMouseDown:this.preventFocus};return![null,1].includes(this.props.maxFilesSelect)&&this.props.selectedFiles.length>=this.props.maxFilesSelect&&!e.data&&(t.disabled=!0),c.default.createElement("input",t)}return null}},{key:"renderDate",value:function(e){return"folder"===e.rowData.type?null:c.default.createElement("span",null,e.data)}},{key:"renderThumbnail",value:function(e){var t=e.data||e.rowData.url,n=e.rowData.queuedId&&!e.rowData.id,o=e.rowData.category||"false",r="gallery__table-image",s=[r],i={};return s.push(r+"--"+o),"image"===o&&t&&(i.backgroundImage='url("'+t+'")'),n||t||"folder"===o||s.push(r+"--error"),c.default.createElement("div",{className:s.join(" "),style:i})}},{key:"render",value:function(){return c.default.createElement(m.default,this.getTableProps())}}]),t}(d.Component);b.defaultProps=_.galleryViewDefaultProps,b.propTypes=l({},_.galleryViewPropTypes,{sort:f.default.string.isRequired}),t.Component=b,t.default=b},"./client/src/containers/ThumbnailView/ThumbnailView.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=Object.assign||function(e){for(var t=1;t=this.props.maxFilesSelect,b=1===this.props.maxFilesSelect?c.onActivate:this.props.onSelect;c=l({},c,{selectable:!0,onSelect:b,maxSelected:v})}if("folder"===e.type){var E=this.props.onDropFiles;return c=l({},c,{onDropFiles:E}),p.default.createElement(o,c)}return p.default.createElement(n,c)}},{key:"render",value:function(){return p.default.createElement("div",{className:"gallery__main-view--tile"},p.default.createElement("div",{className:"gallery__folders"},this.props.files.filter(this.folderFilter).map(this.renderItem)),p.default.createElement("div",{className:"gallery__files"},this.props.files.filter(this.fileFilter).map(this.renderItem)),0===this.props.files.length&&!this.props.loading&&p.default.createElement("p",{className:"gallery__no-item-notice"},d.default._t("AssetAdmin.NOITEMSFOUND")),p.default.createElement("div",{className:"gallery__load"},this.renderPagination()))}}]),t}(c.Component);v.defaultProps=h.galleryViewDefaultProps,v.propTypes=l({},h.galleryViewPropTypes,{File:_.default.oneOfType([_.default.node,_.default.func]).isRequired,Folder:_.default.oneOfType([_.default.node,_.default.func]).isRequired});var b=(0,f.inject)(["GalleryItemFile","GalleryItemFolder"],function(e,t){return{File:e,Folder:t}},function(){return"AssetAdmin.Gallery.ThumbnailView"});t.Component=v,t.default=b(v)},"./client/src/entwine/UploadField/UploadFieldEntwine.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=Object.assign||function(e){for(var t=1;t');this.before(n),t=n[0]}return t},onunmatch:function(){this._super(),d.default.unmountComponentAtNode(this.siblings(".uploadfield-holder")[0])},onmatch:function(){var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,p.loadComponent)("UploadField",t);this.setComponent(n),this._super(),this.hide(),this.refresh()},onclick:function(e){e.preventDefault()},refresh:function(){var t=this.getAttributes(),n=e(this).closest("form"),o=function(){setTimeout(function(){n.trigger("change")},0)},s=this.getComponent();d.default.render(a.default.createElement(s,r({},t,{onChange:o,noHolder:!0})),this.getContainer())},getAttributes:function(){var t=e(this).data("state"),n=e(this).data("schema");return(0,c.schemaMerge)(n,t)}})})},"./client/src/lib/configShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({url:r.default.string,limit:r.default.number,imageRetry:r.default.shape({minRetry:r.default.number,maxRetry:r.default.number,expiry:r.default.number}),form:r.default.object,dropzoneOptions:r.default.object});t.default=s},"./client/src/lib/fileFragments.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileInterface="\n fragment FileInterfaceFields on FileInterface {\n canDelete\n canEdit\n canView\n category\n exists\n filename\n id\n lastEdited\n name\n parentId\n title\n type\n url\n }\n",t.file="\n fragment FileFields on File {\n draft\n extension\n published\n modified\n size\n smallThumbnail\n thumbnail\n inUseCount\n }\n",t.folder="\n fragment FolderFields on Folder {\n filesInUseCount\n }\n"},"./client/src/lib/fileShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({canEdit:r.default.bool,canDelete:r.default.bool,canView:r.default.bool,exists:r.default.bool,type:r.default.string,smallThumbnail:r.default.string,thumbnail:r.default.string,width:r.default.number,height:r.default.number,category:r.default.oneOfType([r.default.bool,r.default.string]),id:r.default.number,inUseCount:r.default.number,url:r.default.string,title:r.default.string,progress:r.default.number});t.default=s},"./client/src/lib/fileStructure.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=(0,r.default)({name:null,canDelete:!1,canEdit:!1,category:null,created:null,extension:null,filename:null,id:0,lastEdited:null,messages:null,owner:{id:0,title:null},parent:{filename:null,id:0,title:null},queuedId:null,size:null,title:null,type:null,url:null,xhr:null,thumbnail:null,smallThumbnail:null,height:null,width:null});t.default=s},"./client/src/state/displaySearch/DisplaySearchActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_SEARCH:"TOGGLE_SEARCH",OPEN_SEARCH:"OPEN_SEARCH",CLOSE_SEARCH:"CLOSE_SEARCH"}},"./client/src/state/displaySearch/DisplaySearchActions.js":function(e,t,n){"use strict";function o(){return{type:l.default.TOGGLE_SEARCH,payload:null}}function r(){return{type:l.default.OPEN_SEARCH,payload:null}}function s(){return{type:l.default.CLOSE_SEARCH,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleSearch=o,t.openSearch=r,t.closeSearch=s;var i=n("./client/src/state/displaySearch/DisplaySearchActionTypes.js"),l=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/displaySearch/DisplaySearchReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;switch(arguments[1].type){case u.default.TOGGLE_SEARCH:return(0,l.default)(s({},e,{isOpen:!e.isOpen}));case u.default.OPEN_SEARCH:return(0,l.default)(s({},e,{isOpen:!0}));case u.default.CLOSE_SEARCH:return(0,l.default)(s({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n({variables:{IDs:e,Quiet:o,Force:t}})};return{actions:r({},s,{files:r({},s.files,o({},e,i))})}}}}};t.default=u},"./client/src/state/files/deleteFilesMutation.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return t({variables:{IDs:e},update:function(t){var r=d.default.query.get("ReadFilesQuery"),s=r.getApolloConfig(),i=s.options(n).variables;null!==o&&(i.rootFilter.id=o,i.rootFilter.anyChildId=null);var l=r.getGraphqlAST(),a=t.readQuery({query:l,variables:i}),u=JSON.parse(JSON.stringify(a)),c=u.readFiles.edges[0].node.children.edges;c=c.filter(function(t){return!e.includes(t.node.id)}),u.readFiles.edges[0].node.children.edges=c,u.readFiles.edges[0].node.children.pageInfo.totalCount=c.length,t.writeQuery({query:l,data:u,variables:i})}})};return{actions:r({},o,{files:r({},o.files,{deleteFiles:s})})}}};t.mutation=c,t.config=p,t.default=(0,i.graphql)(c,p)},"./client/src/state/files/moveFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"],["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"]),r=n(11),s=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n("./client/src/lib/fileFragments.js"),a=(0,i.default)(o,l.fileInterface,l.file),u={props:function(e){var t=e.mutate,n=e.ownProps.actions,o=void 0===n?{}:n;return{actions:Object.assign({},o,{files:Object.assign({},o.files,{moveFiles:function(e,n){return t({variables:{folderId:e,fileIds:n},update:function(){window.ss.apolloClient.resetStore()}})}})})}}};t.mutation=a,t.config=u,t.default=(0,r.graphql)(a,u)},"./client/src/state/files/publishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("publishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/files/readFilesQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,s=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,s=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n(22),s=n(3),i={options:function(e){var t=e.sectionConfig,n=e.folderId,s=e.fileId,i=e.query,l=Object.assign({},i.filter),a=Object.assign({},l,{parentId:void 0,recursive:(0,r.hasFilters)(l),currentFolderOnly:void 0}),u=(0,r.hasFilters)(l)?null:s||null,d=u?null:n||0,c={id:d,anyChildId:u},p=i.sort?i.sort.split(","):["",""],f=o(p,2),h=f[0],m=f[1],g=i.limit||t.limit;return{variables:{rootFilter:c,childrenFilter:a,limit:g,offset:((i.page||1)-1)*g,sortBy:h&&m?[{field:h,direction:m.toUpperCase()}]:void 0}}},props:function(e){var t=e.data,n=t.error,o=t.refetch,r=t.readFiles,s=t.loading,i=e.ownProps.actions,l=r&&r.edges[0]?r.edges[0].node:null,a=l&&l.children?l.children.edges.map(function(e){return e.node}).filter(function(e){return e}):[],u=l&&l.children?l.children.pageInfo.totalCount:0,d=l&&!l.children,c=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:s||d,folder:l,files:a,filesTotalCount:u,graphQLErrors:c,actions:Object.assign({},i,{files:Object.assign({},i.files,{readFiles:o})})}}},l=s.graphqlTemplates.READ,a={apolloConfig:i,templateName:l,pluralName:"Files",pagination:!1,params:{limit:"Int!",offset:"Int!",rootFilter:"FileFilterInput",childrenFilter:"FileFilterInput",sortBy:"[ChildrenSortInputType]"},args:{root:{filter:"rootFilter"},"root/edges/node/...on Folder/children":{limit:"limit",offset:"offset",filter:"childrenFilter",sortBy:"sortBy"}},fragments:["FileInterfaceFields","FileFields","FolderFields"],fields:["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...on Folder",["children",["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...FolderFields"]]],"parents",["id","title"]]]]]};t.default=a},"./client/src/state/files/unpublishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("unpublishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/gallery/GalleryActionTypes.js":function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["SET_LAST_SELECTED","SET_SELECTED_FILES","DESELECT_FILES","SELECT_FILES","LOAD_FILE_REQUEST","LOAD_FILE_SUCCESS","HIGHLIGHT_FILES","UPDATE_BATCH_ACTIONS","SET_NOTICE_MESSAGE","SET_ERROR_MESSAGE","SET_ENABLE_DROPZONE","SET_FILE_BADGE","CLEAR_FILE_BADGE","ACTIVATE_MODAL","DEACTIVATE_MODAL","CONCATENATE_SELECT","SET_LOADING"].reduce(function(e,t){return Object.assign(e,o({},t,"GALLERY."+t))},{})},"./client/src/state/gallery/GalleryActions.js":function(e,t,n){"use strict";function o(e){return function(t){t({type:_.default.SET_LAST_SELECTED,payload:{id:e}})}}function r(e){return function(t){t({type:_.default.SET_SELECTED_FILES,payload:{files:e}})}}function s(e,t){return function(n){n({type:_.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.SELECT_FILES,payload:{ids:e}})}}function l(e){return function(t){return t({type:_.default.CONCATENATE_SELECT,payload:!!e})}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.DESELECT_FILES,payload:{ids:e}})}}function u(e){return function(t){return t({type:_.default.SET_NOTICE_MESSAGE,payload:{message:e}})}}function d(e){return function(t){return t({type:_.default.SET_ERROR_MESSAGE,payload:{message:e}})}}function c(e){return function(t){return t({type:_.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})}}function p(e){return function(t){t({type:_.default.CLEAR_FILE_BADGE,payload:{id:e}})}}function f(e,t,n,o){return function(r,s){var i=s(),l=i.assetAdmin,a=l.gallery.badges.find(function(t){return t.id===e});a&&a.timer&&clearTimeout(a.timer);var u=o>0?setTimeout(function(){return p(e)(r)},o):null;r({type:_.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:u}})}}function h(e){return function(t){t({type:_.default.ACTIVATE_MODAL,payload:e})}}function m(){return function(e){e({type:_.default.DEACTIVATE_MODAL})}}function g(e){return function(t){t({type:_.default.SET_LOADING,payload:!!e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLastSelected=o,t.setSelectedFiles=r,t.loadFile=s,t.selectFiles=i,t.setConcatenateSelect=l,t.deselectFiles=a,t.setNoticeMessage=u,t.setErrorMessage=d,t.setEnableDropzone=c,t.clearFileBadge=p,t.setFileBadge=f,t.activateModal=h,t.deactivateModal=m,t.setLoading=g;var y=n("./client/src/state/gallery/GalleryActionTypes.js"),_=function(e){return e&&e.__esModule?e:{default:e}}(y)},"./client/src/state/gallery/GalleryReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,o=t.payload;switch(n){case u.default.SET_LAST_SELECTED:return s({},e,{lastSelected:o.id});case u.default.SET_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id}).concat([o])});case u.default.CLEAR_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id})});case u.default.SET_ENABLE_DROPZONE:return s({},e,{enableDropzone:o.enableDropzone});case u.default.SET_NOTICE_MESSAGE:return s({},e,{noticeMessage:o.message});case u.default.SET_ERROR_MESSAGE:return s({},e,{errorMessage:o.message});case u.default.LOAD_FILE_SUCCESS:var r=e.files.find(function(e){return e.id===o.id});if(r){var i=s({},r,o.file);return(0,l.default)(s({},e,{files:e.files.map(function(e){return e.id===i.id?i:e})}))}return e.folder.id===o.id?(0,l.default)(s({},e,{folder:s({},e.folder,o.file)})):e;case u.default.SET_SELECTED_FILES:return(0,l.default)(s({},e,{selectedFiles:Array.isArray(o.files)?o.files:[]}));case u.default.SELECT_FILES:var a=null;return a=null===o.ids?e.files.map(function(e){return e.id}):e.selectedFiles.concat(o.ids.filter(function(t){return-1===e.selectedFiles.indexOf(t)})),(0,l.default)(s({},e,{selectedFiles:a}));case u.default.DESELECT_FILES:var d=null;return d=null===o.ids?[]:e.selectedFiles.filter(function(e){return-1===o.ids.indexOf(e)}),(0,l.default)(s({},e,{selectedFiles:d}));case u.default.ACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:o}));case u.default.DEACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:null}));case u.default.CONCATENATE_SELECT:return(0,l.default)(s({},e,{concatenateSelect:o}));case u.default.SET_LOADING:return(0,l.default)(s({},e,{loading:o}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p;r(this,e),this.options=s({},c,t),this.factory=n}return i(e,[{key:"loadImage",value:function(e){return this.options.minRetry&&d.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}},{key:"loadImageLoop",value:function(e,t){var n=this;return this.options.onStatusChange(e,a.default.LOADING),new Promise(function(t,o){return n.factory(e,t,o)}).then(function(){return n.handleSuccess(e)}).catch(function(){return n.handleError(e,t)})}},{key:"handleReset",value:function(e,t){this.options.onReset(e),t()}},{key:"handleTimeout",value:function(e,t){var n=setTimeout(e,t);return this.options.onTimeout(n,t),n}},{key:"handleSuccess",value:function(e){d.default.unlock(e),this.options.onStatusChange(e,a.default.SUCCESS)}},{key:"handleFailure",value:function(e){var t=this;return d.default.unlock(e),this.options.onStatusChange(e,a.default.FAILED),this.options.expiry?new Promise(function(n){t.handleTimeout(function(){return t.handleReset(e,n)},1e3*t.options.expiry)}):null}},{key:"handleError",value:function(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,a.default.WAITING),this.handleRetry(e,t))}},{key:"handleRetry",value:function(e,t){var n=this,o=new Promise(function(o){n.handleTimeout(function(){return o(n.loadImageLoop(e,2*t))},1e3*t)});return this.options.onRetry(e,t,o),o}},{key:"setOnRetry",value:function(e){this.options.onRetry=e}},{key:"setOnReset",value:function(e){this.options.onReset=e}},{key:"setOnStatusChange",value:function(e){this.options.onStatusChange=e}},{key:"setOnTimeout",value:function(e){this.options.onTimeout=e}}]),e}();t.defaultImageFactory=p,t.default=f},"./client/src/state/imageLoad/ImageLoadActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},"./client/src/state/imageLoad/ImageLoadActions.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return function(n,o){if(!e)return null;if(o().assetAdmin.imageLoad.files.find(function(t){return t.url===e}))return null;var r=s({},t,{onStatusChange:function(e,t){return n({type:l.default.SET_STATUS,payload:{status:t,url:e}})},onReset:function(e){return n({type:l.default.RESET,payload:{url:e}})}});return new u.default(r).loadImage(e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||(this.urls=[].concat(o(this.urls),[e]),0))}},{key:"unlock",value:function(e){this.urls=this.urls.filter(function(t){return t!==e})}}]),e}();window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new i,t.Component=i,t.default=window.ss.imagelocker},"./client/src/state/imageLoad/ImageLoadReducer.js":function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;switch(n){case l.default.SET_STATUS:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})),[r])});case l.default.RESET:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PREVIEWFIELD_ADD_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,t.payload.file)));case u.default.PREVIEWFIELD_FAIL_UPLOAD:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.message))));case u.default.PREVIEWFIELD_REMOVE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,void 0)));case u.default.PREVIEWFIELD_UPDATE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.data))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),l=o(i),a=n("./client/src/state/previewField/PreviewFieldActionTypes.js"),u=o(a),d={};t.default=s},"./client/src/state/queuedFiles/QueuedFilesActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ADD_QUEUED_FILE:"ADD_QUEUED_FILE",FAIL_UPLOAD:"FAIL_UPLOAD",PURGE_UPLOAD_QUEUE:"PURGE_UPLOAD_QUEUE",REMOVE_QUEUED_FILE:"REMOVE_QUEUED_FILE",SUCCEED_UPLOAD:"SUCCEED_UPLOAD",UPDATE_QUEUED_FILE:"UPDATE_QUEUED_FILE"}},"./client/src/state/queuedFiles/QueuedFilesActions.js":function(e,t,n){"use strict";function o(e){return function(t){return t({type:d.default.ADD_QUEUED_FILE,payload:{file:e}})}}function r(e,t){return function(n){var o=t.message;return t.errors&&t.errors.length&&(o=t.errors[0]),"string"==typeof t&&(o={value:t,type:"error"}),n({type:d.default.FAIL_UPLOAD,payload:{queuedId:e,message:o}})}}function s(){return function(e){return e({type:d.default.PURGE_UPLOAD_QUEUE,payload:null})}}function i(e){return function(t){return t({type:d.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})}}function l(e,t){return function(n){return n({type:d.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})}}function a(e,t){return function(n){return n({type:d.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.addQueuedFile=o,t.failUpload=r,t.purgeUploadQueue=s,t.removeQueuedFile=i,t.succeedUpload=l,t.updateQueuedFile=a;var u=n("./client/src/state/queuedFiles/QueuedFilesActionTypes.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(u)},"./client/src/state/queuedFiles/QueuedFilesReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:m,t=arguments[1];switch(t.type){case d.default.ADD_QUEUED_FILE:return(0,a.default)(i({},e,{items:[].concat(r(e.items),[i({},p.default,t.payload.file)])}));case d.default.FAIL_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,{message:t.payload.message}):e})}));case d.default.PURGE_UPLOAD_QUEUE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return!e.id})}));case d.default.REMOVE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return e.queuedId!==t.payload.queuedId})}));case d.default.SUCCEED_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.json,{messages:[{value:h.default._t("AssetAdmin.DROPZONE_SUCCESS_UPLOAD"),type:"success",extraClass:"success"}]}):e})}));case d.default.UPDATE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.updates):e})}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1],n=(0,p.default)(e,t,h);switch(t.type){case a.default.UPLOADFIELD_ADD_FILE:return n(function(e){return e.files.find(function(e){return e.id===t.payload.file.id})?e:i({},e,{files:[].concat(r(e.files),[i({},d.default,t.payload.file)])})});case a.default.UPLOADFIELD_SET_FILES:return n(function(){return{files:t.payload.files}});case a.default.UPLOADFIELD_UPLOAD_FAILURE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,{message:t.payload.message}):e})}});case a.default.UPLOADFIELD_REMOVE_FILE:return n(function(e){return{files:e.files.filter(function(e){return!(t.payload.file.queuedId&&e.queuedId===t.payload.file.queuedId||t.payload.file.id&&e.id===t.payload.file.id)})}});case a.default.UPLOADFIELD_UPLOAD_SUCCESS:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.json):e})}});case a.default.UPLOADFIELD_UPDATE_QUEUED_FILE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.updates):e})}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0?s.default._t("AssetAdmin.UPDATE_FILE","Update file"):s.default._t("AssetAdmin.INSERT_FILE","Insert file");return e.mutateField("action_insert",function(e){return o({},e,{title:r||e.title})}),e.getState()};t.default=i},"./client/src/transforms/FormAction/ownerAwareUnpublish.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?[a.default.inject(a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_1","This file is being used in {count} other published section(s)."),{count:r}),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_2","Ensure files are removed from content areas prior to unpublishing them. Otherwise, they will appear as broken links."),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_3","Do you want to unpublish this file anyway?")].join("\n\n"):a.default._t("AssetAdmin.CONFIRMUNPUBLISH","Are you sure you want to unpublish this record?"),confirm(s)?n(e,o):e.preventDefault()}});return i.default.createElement(e,o)}};t.default=u},"./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disabledTreeDropdownField=void 0;var o=Object.assign||function(e){for(var t=1;t1?n-1:0),r=1;r=s.length)break;l=s[i++],l.apply(this,o)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var o=0;o=n.length)break;r=n[o++];var s=r;if(/(^| )dz-message($| )/.test(s.className)){e=s,s.className="dz-message";break}}e||(e=t.createElement('
'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,o){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;null==t&&null==n?(t=r.srcWidth,n=r.srcHeight):null==t?t=n*s:null==n&&(n=t/s),t=Math.min(t,r.srcWidth),n=Math.min(n,r.srcHeight);var i=t/n;if(r.srcWidth>t||r.srcHeight>n)if("crop"===o)s>i?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*i):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/i);else{if("contain"!==o)throw new Error("Unknown resizeMethod '"+o+"'");s>i?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var o=e.previewElement.querySelectorAll("[data-dz-name]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;i.textContent=e.name}for(var l=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=l;!(a>=l.length);)i=l[a++],i.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink));for(var u=function(o){return o.preventDefault(),o.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)},d=e.previewElement.querySelectorAll("[data-dz-remove]"),c=0,d=d;;){var p;if(c>=d.length)break;p=d[c++],p.addEventListener("click",u)}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(var n=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;s.alt=e.name,s.src=t}return setTimeout(function(){return e.previewElement.classList.add("dz-image-preview")},1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);for(var n=e.previewElement.querySelectorAll("[data-dz-errormessage]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++],r.textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement)for(var o=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;"PROGRESS"===i.nodeName?i.value=t:i.style.width=t+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.length)break;i=r[s++];var l=i;for(var a in l){var u=l[a];e[a]=u}}return e}}]),l(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(e){return e.accepted}).map(function(e){return e})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(e){return!e.accepted}).map(function(e){return e})}},{key:"getFilesWithStatus",value:function(e){return this.files.filter(function(t){return t.status===e}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===t.UPLOADING||e.status===t.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t=e.hiddenFileInput.files;if(t.length)for(var o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;e.addFile(i)}return e.emit("addedfiles",t),n()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var n=this.events,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;this.on(s,this.options[s])}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var i=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return i(t),e.emit("dragenter",t)},dragover:function(t){var n=void 0;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return i(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach(function(n){return e.listeners.push({element:n,events:{click:function(o){return(n!==e.element||o.target===e.element||t.elementInside(o.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,n=0;if(this.getActiveFiles().length){for(var o=this.getActiveFiles(),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;t+=i.upload.bytesSent,n+=i.upload.total}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e=void 0,n=void 0;if(e=this.getExistingFallback())return e;var o='
';this.options.dictFallbackText&&(o+="

"+this.options.dictFallbackText+"

"),o+='
';var r=t.createElement(o);return"FORM"!==this.element.tagName?(n=t.createElement('
'),n.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:r}},{key:"getExistingFallback",value:function(){for(var e=["div","form"],t=0;t=t.length)break;o=t[n++];var r=o;if(/(^| )fallback($| )/.test(r.className))return r}}(this.element.getElementsByTagName(o)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.addEventListener(n,o,!1))}return t}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.removeEventListener(n,o,!1))}return t}()})}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(t){return e.cancelUpload(t)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var o=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),n=s;break}}t=Math.round(10*t)/10}return""+t+" "+this.options.dictFileSizeUnits[n]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n=t.length)break;o=t[n++];var r=o;this.addFile(r)}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){for(var n=[],o=e,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i,l=s;null!=l.webkitGetAsEntry&&(i=l.webkitGetAsEntry())?i.isFile?n.push(t.addFile(l.getAsFile())):i.isDirectory?n.push(t._addFilesFromDirectory(i,i.name)):n.push(void 0):null==l.getAsFile||null!=l.kind&&"file"!==l.kind?n.push(void 0):n.push(t.addFile(l.getAsFile()))}return n}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,o=e.createReader(),r=function(e){return i(console,"log",function(t){return t.log(e)})};return function e(){return o.readEntries(function(o){if(o.length>0){for(var r=o,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.isFile?l.file(function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=t+"/"+e.name,n.addFile(e)}):l.isDirectory&&n._addFilesFromDirectory(l,t+"/"+l.name)}e()}return null},r)}()}},{key:"accept",value:function(e,n){return this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){for(var t=e,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;this.enqueueFile(r)}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return n.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(){return t._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=d(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var n=this.files.slice(),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;(s.status!==t.UPLOADING||e)&&this.removeFile(s)}return null}},{key:"resizeImage",value:function(e,n,o,r,s){var i=this;return this.createThumbnail(e,n,o,r,!0,function(n,o){if(null==o)return s(e);var r=i.options.resizeMimeType;null==r&&(r=e.type);var l=o.toDataURL(r,i.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(l=h.restore(e.dataURL,l)),s(t.dataURItoBlob(l))})}},{key:"createThumbnail",value:function(e,t,n,o,r,s){var i=this,l=new FileReader;return l.onload=function(){return e.dataURL=l.result,"image/svg+xml"===e.type?void(null!=s&&s(l.result)):i.createThumbnailFromUrl(e,t,n,o,r,s)},l.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(e,t,n,o,r,s,i){var l=this,a=document.createElement("img");return i&&(a.crossOrigin=i),a.onload=function(){var i=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(i=function(e){return EXIF.getData(a,function(){return e(EXIF.getTag(this,"Orientation"))})}),i(function(r){e.width=a.width,e.height=a.height;var i=l.options.resize.call(l,e,t,n,o),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=i.trgWidth,u.height=i.trgHeight,r>4&&(u.width=i.trgHeight,u.height=i.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.width);break;case 7:d.rotate(.5*Math.PI),d.translate(u.height,-u.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.height,0)}f(d,a,null!=i.srcX?i.srcX:0,null!=i.srcY?i.srcY:0,i.srcWidth,i.srcHeight,null!=i.trgX?i.trgX:0,null!=i.trgY?i.trgY:0,i.trgWidth,i.trgHeight);var c=u.toDataURL("image/png");if(null!=s)return s(c,u)})},null!=s&&(a.onerror=s),a.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var o=this.getQueuedFiles();if(o.length>0){if(this.options.uploadMultiple)return this.processFiles(o.slice(0,e-t));for(;n=n.length)break;r=n[o++];var s=r;s.processing=!0,s.status=t.UPLOADING,this.emit("processing",s)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter(function(t){return t.xhr===e}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var n=this._getFilesWithXhr(e.xhr),o=n,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++],s.status=t.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var i=n,l=0,i=i;;){var a;if(l>=i.length)break;a=i[l++];var u=a;this.emit("canceled",u)}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.upload.totalChunkCount)){i++;var l=o*n.options.chunkSize,a=Math.min(l+n.options.chunkSize,r.size),u={name:n._getParamName(0),data:s.webkitSlice?s.webkitSlice(l,a):s.slice(l,a),filename:r.upload.filename,chunkIndex:o};r.upload.chunks[o]={file:r,index:o,dataBlock:u,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[u])}};if(r.upload.finishedChunkUpload=function(o){var s=!0;o.status=t.SUCCESS,o.dataBlock=null,o.xhr=null;for(var i=0;i=s.length)break;l=s[i++],l.xhr=r}e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,e),u=this.resolveOption(this.options.url,e);r.open(a,u,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){o._finishedUploading(e,r,t)},r.onerror=function(){o._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return o._updateFilesUploadProgress(e,r,t)};var d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&t.extend(d,this.options.headers);for(var c in d){var p=d[c];p&&r.setRequestHeader(c,p)}var f=new FormData;if(this.options.params){var h=this.options.params;"function"==typeof h&&(h=h.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null));for(var m in h){var g=h[m];f.append(m,g)}}for(var y=e,_=0,y=y;;){var v;if(_>=y.length)break;v=y[_++];var b=v;this.emit("sending",b,r,f)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,f),this._addFormElementData(f);for(var E=0;E=t.length)break;o=t[n++];var r=o,s=r.getAttribute("name"),i=r.getAttribute("type");if(i&&(i=i.toLowerCase()),void 0!==s&&null!==s)if("SELECT"===r.tagName&&r.hasAttribute("multiple"))for(var l=r.options,a=0,l=l;;){var u;if(a>=l.length)break;u=l[a++];var d=u;d.selected&&e.append(s,d.value)}else(!i||"checkbox"!==i&&"radio"!==i||r.checked)&&e.append(s,r.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var o=void 0;if(void 0!==n){if(o=100*n.loaded/n.total,e[0].upload.chunked){var r=e[0],s=this._getChunk(r,t);s.progress=o,s.total=n.total,s.bytesSent=n.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var i=0;i=l.length)break;u=l[a++];var d=u;d.upload.progress=o,d.upload.total=n.total,d.upload.bytesSent=n.loaded}for(var c=e,p=0,c=c;;){var f;if(p>=c.length)break;f=c[p++];var h=f;this.emit("uploadprogress",h,h.upload.progress,h.upload.bytesSent)}}else{var m=!0;o=100;for(var g=e,y=0,g=g;;){var _;if(y>=g.length)break;_=g[y++];var v=_;100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(m=!1),v.upload.progress=o,v.upload.bytesSent=v.upload.total}if(m)return;for(var b=e,E=0,b=b;;){var S;if(E>=b.length)break;S=b[E++];var j=S;this.emit("uploadprogress",j,o,j.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,n,o){var r=void 0;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){o=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,r,o):this._handleUploadError(e,n,r)}}},{key:"_handleUploadError",value:function(e,n,o){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],n);if(r.retries++=s.length);)s[i++],this._errorProcessing(e,o||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.SUCCESS,this.emit("success",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.ERROR,this.emit("error",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}]),t}(a);u.initClass(),u.version="5.5.1",u.options={},u.optionsForElement=function(e){return e.getAttribute("id")?u.options[c(e.getAttribute("id"))]:void 0},u.instances=[],u.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},u.autoDiscover=!0,u.discover=function(){var e=void 0;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){for(var n=[],o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;/(^| )dropzone($| )/.test(i.className)?n.push(e.push(i)):n.push(void 0)}return n}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){for(var t=[],n=e,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;!1!==u.optionsForElement(s)?t.push(new u(s)):t.push(void 0)}return t}()},u.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],u.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=u.blacklistedBrowsers,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;r.test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},u.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),r=new Uint8Array(o),s=0,i=t.length,l=0<=i;l?s<=i:s>=i;l?s++:s--)r[s]=t.charCodeAt(s);return new Blob([o],{type:n})};var d=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},c=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};u.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},u.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},u.getElement=function(e,t){var n=void 0;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},u.getElements=function(e,t){var n=void 0,o=void 0;if(e instanceof Array){o=[];try{for(var r=e,s=0,r=r;!(s>=r.length);)n=r[s++],o.push(this.getElement(n,t))}catch(e){o=null}}else if("string"==typeof e){o=[];for(var i=document.querySelectorAll(e),l=0,i=i;!(l>=i.length);)n=i[l++],o.push(n)}else null!=e.nodeType&&(o=[e]);if(null==o||!o.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},u.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},u.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var n=e.type,o=n.replace(/\/.*$/,""),r=t,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;if(l=l.trim(),"."===l.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(l.toLowerCase(),e.name.length-l.length))return!0}else if(/\/\*$/.test(l)){if(o===l.replace(/\/.*$/,""))return!0}else if(n===l)return!0}return!1},void 0!==e&&null!==e&&(e.fn.dropzone=function(e){return this.each(function(){return new u(this,e)})}),void 0!==t&&null!==t?t.exports=u:window.Dropzone=u,u.ADDED="added",u.QUEUED="queued",u.ACCEPTED=u.QUEUED,u.UPLOADING="uploading",u.PROCESSING=u.UPLOADING,u.CANCELED="canceled",u.ERROR="error",u.SUCCESS="success";var p=function(e){var t=(e.naturalWidth,e.naturalHeight),n=document.createElement("canvas");n.width=1,n.height=t;var o=n.getContext("2d");o.drawImage(e,0,0);for(var r=o.getImageData(1,0,1,t),s=r.data,i=0,l=t,a=t;a>i;)0===s[4*(a-1)+3]?l=a:i=a,a=l+i>>1;var u=a/t;return 0===u?1:u},f=function(e,t,n,o,r,s,i,l,a,u){var d=p(t);return e.drawImage(t,n,o,r,s,i,l,a,u/d)},h=function(){function e(){r(this,e)}return l(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,o=void 0,r="",s=void 0,i=void 0,l=void 0,a="",u=0;n=e[u++],o=e[u++],r=e[u++],s=n>>2,i=(3&n)<<4|o>>4,l=(15&o)<<2|r>>6,a=63&r,isNaN(o)?l=a=64:isNaN(r)&&(a=64),t=t+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(a),n=o=r="",s=i=l=a="",ue.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,o="",r=void 0,s=void 0,i=void 0,l="",a=0,u=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(e.charAt(a++)),s=this.KEY_STR.indexOf(e.charAt(a++)),i=this.KEY_STR.indexOf(e.charAt(a++)),l=this.KEY_STR.indexOf(e.charAt(a++)),t=r<<2|s>>4,n=(15&s)<<4|i>>2,o=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(o),t=n=o="",r=s=i=l="",a0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var o=this.getColumnMetadataByName(e);return void 0===o||null===o?n:o.hasOwnProperty(t)?o[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,function(e){var n=l(t.columnMetadata,{columnName:e});return void 0===n||null===n||isNaN(n.order)?100:n.order})}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=r({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),o.createElement("div",null)):o.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=s},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t0&&(e=o.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=o.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,r=null,i=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},l),r=s({textAlign:"center",width:"33%"},l),n=s({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(o.createElement("option",{value:u,key:u},u));return o.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},o.createElement("div",{className:this.props.previousClassName,style:n},e),o.createElement("div",{className:"griddle-page",style:r},o.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),o.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/deep.js")),i=n("./node_modules/lodash/isFunction.js"),l=n("./node_modules/lodash/zipObject.js"),a=n("./node_modules/lodash/assign.js"),u=n("./node_modules/lodash/defaults.js"),d=n("./node_modules/lodash/toPairs.js"),c=n("./node_modules/lodash/without.js"),p=r({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var r=this.props.columnSettings.getColumns(),p=l(r,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(s.pick(f,c(r,"children"))),y=g.map(function(t,r){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===r&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===r&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===r&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==i&&null!==i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=o.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},u)}else s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},l,e.formatData(t[1]));return s||o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:r,style:n},l,t[1])});null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),y&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection&&(this.props.multipleSelectionSettings.getSelectedRowIds(),y.unshift(o.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},o.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"}))));var _=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?_="child-row":t.props.hasChildren&&(_=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),o.createElement("tr",{onClick:h,className:_},y)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/lodash/pick.js")),i=r({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return o.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(o.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var r=null;return e.state.showChildren&&(r=e.props.hasChildren&&this.props.data.children.map(function(t,n){var r=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return o.createElement("tr",{key:r,style:{paddingLeft:5}},o.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},o.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return o.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:r})})),!1===e.props.hasChildren?t[0]:o.createElement("tbody",null,e.state.showChildren?t.concat(r):t)}});e.exports=i},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/lodash/includes.js"),i=n("./node_modules/lodash/without.js"),l=n("./node_modules/lodash/find.js"),a=r({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,n){var r=s(e.props.selectedColumns,t),i=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(a=i.displayName),void 0!==i&&null!=i&&i.locked?o.createElement("div",{className:"column checkbox"},o.createElement("label",null,o.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:r,"data-name":t}),a)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:o.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},o.createElement("label",null,o.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:r,"data-name":t}),a))}));var n=e.props.enableToggleCustom?o.createElement("div",{className:"form-group"},o.createElement("label",{htmlFor:"maxRows"},o.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",r=this.props.showSetPageSize?o.createElement("div",null,o.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",o.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},o.createElement("option",{value:"5"},"5"),o.createElement("option",{value:"10"},"10"),o.createElement("option",{value:"25"},"25"),o.createElement("option",{value:"50"},"50"),o.createElement("option",{value:"100"},"100")))):"";return o.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},o.createElement("h6",null,this.props.settingsText),o.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),r,n)}});e.exports=a},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/griddle-react/modules/gridTitle.jsx.js"),i=n("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),l=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/rowProperties.js"),r({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var r={scrollTop:t,scrollHeight:n,clientHeight:o};this.setState(r)}.6*(n-(t+o)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,r=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var l=e.getAdjustedRowHeight(),a=Math.ceil(e.state.clientHeight/l),u=Math.max(0,Math.floor(e.state.scrollTop/l)-.25*a),d=Math.min(u+1.25*a,this.props.data.length-1);n=n.slice(u,d+1);var c={height:u*l+"px"};r=o.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};s=o.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map(function(n,r){var s=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,r);return s&&(t=s),o.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:l+"-container",uniqueId:l,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})});if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(o.createElement("tr",{key:"no-data-section"},o.createElement("td",{colSpan:h},this.props.noDataSection)))}return r&&f.unshift(r),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var r=null,i=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(r={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a=null,u=null;this.props.useGriddleStyles&&(a={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?o.createElement(this.props.externalLoadingComponent,null):o.createElement("div",null,"Loading...");i=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{style:a,colSpan:u},d)))}var c=this.props.showTableHeading?o.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=o.createElement("tbody",null,e));var p=o.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(l.tableLayout="fixed"),o.createElement("div",null,o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,i,p)))):o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,i,p))}}));e.exports=l},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t=0)return!0;return!1})},defaultColumnFilter:function(e,t,n){var o=P(I(n)?n:[n],function(e){return(e||"").toLowerCase()});return M(v.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),M(o,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce(function(n,o){return T(n,function(n){var r=v.getAt(n,o||""),s=e[o];return t(o||"",r,s)})},this.props.results),o={columnFilters:e};e?(o.filteredResults=n,o.maxPage=this.getMaxPage(o.filteredResults)):this.state.filter?o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):o.filteredResults=null,this.setState(o)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=k(n,t);else{var o={};o[t]=e,n=D({},n,o)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var n=this,o={page:0,filter:e};o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),o.maxPage=n.getMaxPage(o.filteredResults),(x(e)||A(e)||F(e))&&(o.filter=e,o.filteredResults=null),n.setState(o),this._resetSelectedRows()},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return void 0===e||null===e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,n={page:e};t.setState(n)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=I(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=S(this.props.columnMetadata,{columnName:e})||{},o=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],r=null,s=o.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);s=(s+1)%o.length,r=o[s]?o[s]:null;var i={page:0,sortColumn:e,sortDirection:r};this.setState(i)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=v.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,n){return e===t[n]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,P(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new y(this.props.results.length>0?v.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new _(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var o=this,r=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:i}),a={columns:[],orders:[]};if(l.length>0&&(s=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort(function(e,t){return s(R(e,i),R(t,i))}),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=N(e,function(e){return s(R(e,i))},[this.state.sortDirection]));else{var u=[function(e){return(R(e,i)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach(function(e,t){u.push(function(t){return(R(t,e)||"").toString().toLowerCase()}),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(o.state.sortDirection)}),e=N(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=j(e,(c+1)*this.state.resultsPerPage);else{var p=b(e,c*this.state.resultsPerPage);e=(E||w)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=r.getDataForRender(m[r.props.childrenColumnName],t,!1),"children"!==r.props.childrenColumnName&&delete m[r.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),o=this;C(e,function(e){o._updateSelectedRowIds(e[o.props.uniqueIdentifier],n,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),o=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],o,t);var r=this._getAreAllRowsChecked(o,P(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:r,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,r)},_updateSelectedRowIds:function(e,t,n){n?void 0===S(t,function(t){return e===t})&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===O(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!S(this.props.results,function(e){return"children"in e})&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?r.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):r.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?r.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,o=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),o=this.getSettingsStyles(),s=this.getClearFixStyles()),r.createElement("div",{className:"top-section",style:s},r.createElement("div",{className:"griddle-filter",style:n},e),r.createElement("div",{className:"griddle-settings-toggle",style:o},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return r.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?r.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):r.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?r.createElement(d,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return r.createElement(this.props.customGridComponent,o({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,o,s){return r.createElement("div",null,r.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&o)},getStandardGridSection:function(e,t,n,o,s){var i=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return r.createElement("div",{className:"griddle-body"},r.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:o,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,o,r,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,o,s):this.getStandardGridSection(e,t,n,o,r)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?r.createElement("div",{className:this.props.noDataClassName},r.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):r.createElement(c,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),o=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),l=this.getDataForRender(e,i,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?C(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)}):s=v.keys(k(e[0],a)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",r.createElement("div",{className:m},o,h,r.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n-1}var r=n("./node_modules/lodash/_baseIndexOf.js");e.exports=o},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function n(e,t,n){for(var o=-1,r=null==e?0:e.length;++o=d&&(p=u,f=!1,t=new r(t));e:for(;++c0&&n(d)?t>1?o(d,t-1,n,i,l):r(l,d):i||(l[l.length]=d)}return l}var r=n("./node_modules/lodash/_arrayPush.js"),s=n("./node_modules/lodash/_isFlattenable.js");e.exports=o},"./node_modules/lodash/_baseFor.js":function(e,t,n){var o=n("./node_modules/lodash/_createBaseFor.js"),r=o();e.exports=r},"./node_modules/lodash/_baseForOwn.js":function(e,t,n){function o(e,t){return e&&r(e,t,s)}var r=n("./node_modules/lodash/_baseFor.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_baseGet.js":function(e,t,n){function o(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var _=-1,v=h[0];e:for(;++_r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++ot||i&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!s)return 1;if(!o&&!i&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}var r=n("./node_modules/lodash/_compareAscending.js");e.exports=o},"./node_modules/lodash/_copyArray.js":function(e,t){function n(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n1?n[r-1]:void 0,l=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,l&&s(n[0],n[1],l)&&(i=r<3?void 0:i,r=1),t=Object(t);++o-1?l[a?t[u]:u]:void 0}}var r=n("./node_modules/lodash/_baseIteratee.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_createToPairs.js":function(e,t,n){function o(e){return function(t){var n=s(t);return n==a?i(t):n==u?l(t):r(t,e(t))}}var r=n("./node_modules/lodash/_baseToPairs.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/_mapToArray.js"),l=n("./node_modules/lodash/_setToPairs.js"),a="[object Map]",u="[object Set]";e.exports=o},"./node_modules/lodash/_customOmitClone.js":function(e,t,n){function o(e){return r(e)?void 0:e}var r=n("./node_modules/lodash/isPlainObject.js");e.exports=o},"./node_modules/lodash/_defineProperty.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},"./node_modules/lodash/_equalArrays.js":function(e,t,n){function o(e,t,n,o,u,d){var c=n&l,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var h=d.get(e);if(h&&d.get(t))return h==t;var m=-1,g=!0,y=n&a?new r:void 0;for(d.set(e,t),d.set(t,e);++m-1&&e%1==0&&e-1}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_listCacheSet.js":function(e,t,n){function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_mapCacheClear.js":function(e,t,n){function o(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}var r=n("./node_modules/lodash/_Hash.js"),s=n("./node_modules/lodash/_ListCache.js"),i=n("./node_modules/lodash/_Map.js");e.exports=o},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,n){function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheGet.js":function(e,t,n){function o(e){return r(this,e).get(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheHas.js":function(e,t,n){function o(e){return r(this,e).has(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheSet.js":function(e,t,n){function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapToArray.js":function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}e.exports=n},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function n(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},"./node_modules/lodash/_memoizeCapped.js":function(e,t,n){function o(e){var t=r(e,function(e){return n.size===s&&n.clear(),e}),n=t.cache;return t}var r=n("./node_modules/lodash/memoize.js"),s=500;e.exports=o},"./node_modules/lodash/_nativeCreate.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=o(Object,"create");e.exports=r},"./node_modules/lodash/_nativeKeys.js":function(e,t,n){var o=n("./node_modules/lodash/_overArg.js"),r=o(Object.keys,Object);e.exports=r},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},"./node_modules/lodash/_nodeUtil.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_freeGlobal.js"),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i&&o.process,a=function(){try{return s&&s.require&&s.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=a}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},"./node_modules/lodash/_overArg.js":function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},"./node_modules/lodash/_overRest.js":function(e,t,n){function o(e,t,n){return t=s(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,l=s(o.length-t,0),a=Array(l);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,r=16,s=Date.now;e.exports=n},"./node_modules/lodash/_stackClear.js":function(e,t,n){function o(){this.__data__=new r,this.size=0}var r=n("./node_modules/lodash/_ListCache.js");e.exports=o},"./node_modules/lodash/_stackDelete.js":function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},"./node_modules/lodash/_stackGet.js":function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},"./node_modules/lodash/_stackHas.js":function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},"./node_modules/lodash/_stackSet.js":function(e,t,n){function o(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(o=1);++n-1:!!d&&r(e,t,n)>-1}var r=n("./node_modules/lodash/_baseIndexOf.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/isString.js"),l=n("./node_modules/lodash/toInteger.js"),a=n("./node_modules/lodash/values.js"),u=Math.max;e.exports=o},"./node_modules/lodash/initial.js":function(e,t,n){function o(e){return(null==e?0:e.length)?r(e,0,-1):[]}var r=n("./node_modules/lodash/_baseSlice.js");e.exports=o},"./node_modules/lodash/intersection.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseIntersection.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_castArrayLikeObject.js"),l=s(function(e){var t=o(e,i);return t.length&&t[0]===e[0]?r(t):[]});e.exports=l},"./node_modules/lodash/isArguments.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsArguments.js"),r=n("./node_modules/lodash/isObjectLike.js"),s=Object.prototype,i=s.hasOwnProperty,l=s.propertyIsEnumerable,a=o(function(){return arguments}())?o:function(e){return r(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},"./node_modules/lodash/isArray.js":function(e,t){var n=Array.isArray;e.exports=n},"./node_modules/lodash/isArrayLike.js":function(e,t,n){function o(e){return null!=e&&s(e.length)&&!r(e)}var r=n("./node_modules/lodash/isFunction.js"),s=n("./node_modules/lodash/isLength.js");e.exports=o},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,n){function o(e){return s(e)&&r(e)}var r=n("./node_modules/lodash/isArrayLike.js"),s=n("./node_modules/lodash/isObjectLike.js");e.exports=o},"./node_modules/lodash/isBuffer.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_root.js"),r=n("./node_modules/lodash/stubFalse.js"),s="object"==typeof t&&t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===s,a=l?o.Buffer:void 0,u=a?a.isBuffer:void 0,d=u||r;e.exports=d}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,n){function o(e){if(null==e)return!0;if(a(e)&&(l(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=s(e);if(t==p||t==f)return!e.size;if(d(e))return!r(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}var r=n("./node_modules/lodash/_baseKeys.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/isArguments.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/isArrayLike.js"),u=n("./node_modules/lodash/isBuffer.js"),d=n("./node_modules/lodash/_isPrototype.js"),c=n("./node_modules/lodash/isTypedArray.js"),p="[object Map]",f="[object Set]",h=Object.prototype,m=h.hasOwnProperty;e.exports=o},"./node_modules/lodash/isFunction.js":function(e,t,n){function o(e){if(!s(e))return!1;var t=r(e);return t==l||t==a||t==i||t==u}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObject.js"),i="[object AsyncFunction]",l="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=o},"./node_modules/lodash/isLength.js":function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=n},"./node_modules/lodash/isMap.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsMap.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isMap,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isNull.js":function(e,t){function n(e){return null===e}e.exports=n},"./node_modules/lodash/isObject.js":function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},"./node_modules/lodash/isObjectLike.js":function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},"./node_modules/lodash/isPlainObject.js":function(e,t,n){function o(e){if(!i(e)||r(e)!=l)return!1;var t=s(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==p}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/_getPrototype.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object Object]",a=Function.prototype,u=Object.prototype,d=a.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=o},"./node_modules/lodash/isSet.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsSet.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isSet,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isString.js":function(e,t,n){function o(e){return"string"==typeof e||!s(e)&&i(e)&&r(e)==l}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isArray.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object String]";e.exports=o},"./node_modules/lodash/isSymbol.js":function(e,t,n){function o(e){return"symbol"==typeof e||s(e)&&r(e)==i}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObjectLike.js"),i="[object Symbol]";e.exports=o},"./node_modules/lodash/isTypedArray.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsTypedArray.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isTypedArray,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isUndefined.js":function(e,t){function n(e){return void 0===e}e.exports=n},"./node_modules/lodash/keys.js":function(e,t,n){function o(e){return i(e)?r(e):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeys.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/keysIn.js":function(e,t,n){function o(e){return i(e)?r(e,!0):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeysIn.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/last.js":function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},"./node_modules/lodash/map.js":function(e,t,n){function o(e,t){return(l(e)?r:i)(e,s(t,3))}var r=n("./node_modules/lodash/_arrayMap.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseMap.js"),l=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/memoize.js":function(e,t,n){function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],s=n.cache;if(s.has(r))return s.get(r);var i=e.apply(this,o);return n.cache=s.set(r,i)||s,i};return n.cache=new(o.Cache||r),n}var r=n("./node_modules/lodash/_MapCache.js"),s="Expected a function";o.Cache=r,e.exports=o},"./node_modules/lodash/omit.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseClone.js"),s=n("./node_modules/lodash/_baseUnset.js"),i=n("./node_modules/lodash/_castPath.js"),l=n("./node_modules/lodash/_copyObject.js"),a=n("./node_modules/lodash/_customOmitClone.js"),u=n("./node_modules/lodash/_flatRest.js"),d=n("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=o(t,function(t){return t=i(t,e),u||(u=t.length>1),t}),l(e,d(e),n),u&&(n=r(n,7,a));for(var c=t.length;c--;)s(n,t[c]);return n});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,n){function o(e,t,n,o){return null==e?[]:(s(t)||(t=null==t?[]:[t]),n=o?void 0:n,s(n)||(n=null==n?[]:[n]),r(e,t,n))}var r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/pick.js":function(e,t,n){var o=n("./node_modules/lodash/_basePick.js"),r=n("./node_modules/lodash/_flatRest.js"),s=r(function(e,t){return null==e?{}:o(e,t)});e.exports=s},"./node_modules/lodash/property.js":function(e,t,n){function o(e){return i(e)?r(l(e)):s(e)}var r=n("./node_modules/lodash/_baseProperty.js"),s=n("./node_modules/lodash/_basePropertyDeep.js"),i=n("./node_modules/lodash/_isKey.js"),l=n("./node_modules/lodash/_toKey.js");e.exports=o},"./node_modules/lodash/some.js":function(e,t,n){function o(e,t,n){var o=l(e)?r:i;return n&&a(e,t,n)&&(t=void 0),o(e,s(t,3))}var r=n("./node_modules/lodash/_arraySome.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseSome.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/_isIterateeCall.js");e.exports=o},"./node_modules/lodash/sortBy.js":function(e,t,n){var o=n("./node_modules/lodash/_baseFlatten.js"),r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_isIterateeCall.js"),l=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,o(t,1),[])});e.exports=l},"./node_modules/lodash/stubArray.js":function(e,t){function n(){return[]}e.exports=n},"./node_modules/lodash/stubFalse.js":function(e,t){function n(){return!1}e.exports=n},"./node_modules/lodash/take.js":function(e,t,n){function o(e,t,n){return e&&e.length?(t=n||void 0===t?1:s(t),r(e,0,t<0?0:t)):[]}var r=n("./node_modules/lodash/_baseSlice.js"),s=n("./node_modules/lodash/toInteger.js");e.exports=o},"./node_modules/lodash/toFinite.js":function(e,t,n){function o(e){return e?(e=r(e))===s||e===-s?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}var r=n("./node_modules/lodash/toNumber.js"),s=1/0,i=1.7976931348623157e308;e.exports=o},"./node_modules/lodash/toInteger.js":function(e,t,n){function o(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}var r=n("./node_modules/lodash/toFinite.js");e.exports=o},"./node_modules/lodash/toNumber.js":function(e,t,n){function o(e){if("number"==typeof e)return e;if(s(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=u.test(e);return n||d.test(e)?c(e.slice(2),n?2:8):a.test(e)?i:+e}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/isSymbol.js"),i=NaN,l=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=o},"./node_modules/lodash/toPairs.js":function(e,t,n){var o=n("./node_modules/lodash/_createToPairs.js"),r=n("./node_modules/lodash/keys.js"),s=o(r);e.exports=s},"./node_modules/lodash/toString.js":function(e,t,n){function o(e){return null==e?"":r(e)}var r=n("./node_modules/lodash/_baseToString.js");e.exports=o},"./node_modules/lodash/uniqueId.js":function(e,t,n){function o(e){var t=++s;return r(e)+t}var r=n("./node_modules/lodash/toString.js"),s=0;e.exports=o},"./node_modules/lodash/values.js":function(e,t,n){function o(e){return null==e?[]:r(e,s(e))}var r=n("./node_modules/lodash/_baseValues.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/without.js":function(e,t,n){var o=n("./node_modules/lodash/_baseDifference.js"),r=n("./node_modules/lodash/_baseRest.js"),s=n("./node_modules/lodash/isArrayLikeObject.js"),i=r(function(e,t){return s(e)?o(e,t):[]});e.exports=i},"./node_modules/lodash/zipObject.js":function(e,t,n){function o(e,t){return s(e||[],t||[],r)}var r=n("./node_modules/lodash/_assignValue.js"),s=n("./node_modules/lodash/_baseZipObject.js");e.exports=o},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,a=o(e),u=1;u1)for(var n=1;n1?t-1:0),o=1;o2?n-2:0),r=2;r1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function v(e){function t(t,n,o,r,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var i=t[n],a=w(i);if("object"!==a)return new f("Invalid "+r+" `"+s+"` of type `"+a+"` supplied to `"+o+"`, expected an object.");for(var d in i)if(u(i,d)){var c=e(i,d,o,r,s+"."+d,l);if(c instanceof Error)return c}return null}return h(t)}function b(e){function n(t,n,o,r,s){for(var i=0;in+l||t+r-ao+i)};t.default=function(e,t,n){var o=e instanceof HTMLElement?(0,r.default)(e):e,i=t instanceof HTMLElement?(0,r.default)(t):t;return s(o.top,o.left,i.top,i.left,o.offsetWidth,o.offsetHeight,i.offsetWidth,i.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function o(t){var n=m,o=g;return m=g=void 0,E=t,_=e.apply(o,n)}function s(e){return E=e,v=setTimeout(d,t),w?o(e):_}function i(e){var n=e-b,o=e-E,r=t-n;return O?j(r,y-o):r}function a(e){var n=e-b,o=e-E;return void 0===b||n>=t||n<0||O&&o>=y}function d(){var e=C();if(a(e))return c(e);v=setTimeout(d,i(e))}function c(e){return v=void 0,I&&m?o(e):(m=g=void 0,_)}function p(){void 0!==v&&clearTimeout(v),E=0,m=b=g=v=void 0}function f(){return void 0===v?_:c(C())}function h(){var e=C(),n=a(e);if(m=arguments,g=this,b=e,n){if(void 0===v)return s(b);if(O)return v=setTimeout(d,t),o(b)}return void 0===v&&(v=setTimeout(d,t)),_}var m,g,y,_,v,b,E=0,w=!1,O=!1,I=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,r(n)&&(w=!!n.leading,O="maxWait"in n,y=O?S(l(n.maxWait)||0,t):y,I="trailing"in n?!!n.trailing:I),h.cancel=p,h.flush=f,h}function o(e,t,o){var s=!0,i=!0;if("function"!=typeof e)throw new TypeError(u);return r(o)&&(s="leading"in o?!!o.leading:s,i="trailing"in o?!!o.trailing:i),n(e,t,{leading:s,maxWait:t,trailing:i})}function r(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function i(e){return"symbol"==(void 0===e?"undefined":a(e))||s(e)&&E.call(e)==c}function l(e){if("number"==typeof e)return e;if(i(e))return d;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=h.test(e);return n||m.test(e)?g(e.slice(2),n?2:8):f.test(e)?d:+e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="Expected a function",d=NaN,c="[object Symbol]",p=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,y="object"==(void 0===t?"undefined":a(t))&&t&&t.Object===Object&&t,_="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,v=y||_||Function("return this")(),b=Object.prototype,E=b.toString,S=Math.max,j=Math.min,C=function(){return v.Date.now()};e.exports=o}).call(t,n(19))},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o},function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n2});return t<2?p.default.createElement(m.Button,{className:n,key:e.value,onClick:this.handleChangeValue,value:e.value,color:e.color},e.label):p.default.createElement(m.DropdownItem,{type:"button",className:n,key:e.value,onClick:this.handleChangeValue,value:e.value},e.label)}},{key:"render",value:function(){var e=this;if(!this.props.items.length)return null;var t=this.props.actions.filter(function(t){return!t.canApply||t.canApply(e.props.items)});if(t=t.map(this.renderChild),!t.length)return null;var n=this.props,o=n.ActionMenu,r=n.showCount,s=this.props.items.length;return p.default.createElement("div",{className:"bulk-actions fieldholder-small"},r&&p.default.createElement("div",{className:"bulk-actions-counter"},s),t.slice(0,2),t.length>2&&o?p.default.createElement(o,{id:"BulkActions",className:"bulk-actions__more-actions-menu"},t.slice(2)):t.slice(2))}}]),t}(c.Component);b.propTypes={items:v.default.array,actions:v.default.arrayOf(v.default.shape({value:v.default.string.isRequired,label:v.default.string.isRequired,className:v.default.string,destructive:v.default.bool,callback:v.default.func,canApply:v.default.func,confirm:v.default.func})),ActionMenu:v.default.oneOfType([v.default.node,v.default.func]),showCount:v.default.bool},b.defaultProps={items:[],actions:[],ActionMenu:null,total:null,showCount:!0,totalReachedMessage:d.default._t("")};var E=(0,f.connect)(l)(b);t.Component=b,t.default=(0,h.inject)(["ActionMenu"],function(e){return{ActionMenu:e}},function(){return"BulkActions"})(E)},"./client/src/components/GalleryItem/GalleryItem.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.item.thumbnail&&"image"===e.item.category&&e.item.exists&&!e.item.queuedId&&e.sectionConfig.imageRetry.minRetry&&e.sectionConfig.imageRetry.maxRetry}function d(e,t){if(u(t)){var n=e.assetAdmin.imageLoad,o=n.files.find(function(e){return t.item.thumbnail===e.url});return{loadState:o&&o.status||L.default.NONE}}return{loadState:L.default.DISABLED}}function c(e){return{actions:{imageLoad:(0,D.bindActionCreators)(R,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Folder=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"uploading",value:function(){return this.props.item.queuedId&&!this.saved()}},{key:"exists",value:function(){return this.props.item.exists}},{key:"isImage",value:function(){return"image"===this.props.item.category}},{key:"canBatchSelect",value:function(){return this.props.selectable&&this.props.item.canEdit}},{key:"hasError",value:function(){var e=!1;return this.props.item.message&&(e="error"===this.props.item.message.type),e}},{key:"handleActivate",value:function(e){e.stopPropagation(),"function"==typeof this.props.onActivate&&this.saved()&&this.props.onActivate(e,this.props.item)}},{key:"handleSelect",value:function(e){e.stopPropagation(),e.preventDefault(),"function"==typeof this.props.onSelect&&this.props.onSelect(e,this.props.item)}},{key:"handleKeyDown",value:function(e){E.default.SPACE_KEY_CODE===e.keyCode&&(e.preventDefault(),this.canBatchSelect()&&this.handleSelect(e)),E.default.RETURN_KEY_CODE===e.keyCode&&this.handleActivate(e)}},{key:"handleCancelUpload",value:function(e){e.stopPropagation(),e.preventDefault(),this.hasError()?this.props.onRemoveErroredUpload(this.props.item):this.props.onCancelUpload&&this.props.onCancelUpload(this.props.item)}},{key:"render",value:function(){var e=this,t=null,n=null,o=null,r=this.props.item,s=r.id,i=r.queuedId,l=s?"item-"+s:"queued-"+i;if(this.props.selectable&&(this.canBatchSelect()&&(t=this.handleSelect),n="font-icon-tick"),this.uploading())t=this.handleCancelUpload,n="font-icon-cancel";else if(this.exists()){var a=m.default._t("AssetAdmin.DETAILS","Details");o=y.default.createElement("div",{className:"gallery-item--overlay font-icon-edit"},a)}var u=this.props.badge,d={className:"gallery-item__checkbox",type:"checkbox",title:m.default._t("AssetAdmin.SELECT","Select"),tabIndex:-1,onMouseDown:B,id:l},c=["gallery-item__checkbox-label",n];this.canBatchSelect()||(d.disabled=!0,c.push("gallery-item__checkbox-label--disabled"));var f={className:c.join(" "),onClick:t};return y.default.createElement("div",{className:this.getItemClassNames(),"data-id":this.props.item.id,tabIndex:0,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleActivate},!!u&&y.default.createElement(A.default,{className:"gallery-item__badge",status:u.status,message:u.message}),y.default.createElement("div",{ref:function(t){e.thumbnail=t},className:this.getThumbnailClassNames(),style:this.getThumbnailStyles()},o,this.getStatusFlags()),this.getProgressBar(),this.getErrorMessage(),this.props.children,y.default.createElement("div",{className:"gallery-item__title",ref:function(t){e.title=t}},y.default.createElement("label",p({},f,{htmlFor:l}),y.default.createElement("input",d)),this.props.item.title))}}]),t}(g.Component);q.propTypes={sectionConfig:k.default,item:j.default,loadState:G.default.oneOf(Object.values(L.default)),highlighted:G.default.bool,selected:G.default.bool,isDropping:G.default.bool,isDragging:G.default.bool,message:G.default.shape({value:G.default.string,type:G.default.string}),selectable:G.default.bool,onActivate:G.default.func,onSelect:G.default.func,onCancelUpload:G.default.func,onRemoveErroredUpload:G.default.func,badge:G.default.shape({status:G.default.string,message:G.default.string}),updateStatusFlags:G.default.func,updateProgressBar:G.default.func,updateErrorMessage:G.default.func},q.defaultProps={item:{},sectionConfig:{imageRetry:{}},updateStatusFlags:function(e){return e},updateProgressBar:function(e){return e},updateErrorMessage:function(e){return e}};var H=(0,P.connect)(d,c)(q),z=(0,T.createSelectable)((0,w.default)("GalleryItem")(H)),V=(0,T.createSelectable)((0,I.default)("GalleryItem")(z));t.Component=q,t.Folder=V,t.File=z,t.default=H},"./client/src/components/GalleryItem/GalleryItemDragLayer.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?d.default.createElement("div",{key:"1",className:"gallery-item__drag-shadow"}):null,t>2?d.default.createElement("div",{key:"2",className:"gallery-item__drag-shadow gallery-item__drag-shadow--second"}):null];return d.default.createElement("div",{className:"gallery-item__drag-layer"},d.default.createElement("div",{className:"gallery-item__drag-layer-item",style:this.getOffset()},d.default.createElement("div",{className:"gallery-item__drag-layer-preview"},n,d.default.createElement(m.default,l({},e.props,{isDragging:!0}))),t>1?d.default.createElement(y.default,{className:"gallery-item__drag-layer-count",status:"info",message:""+t}):null))}}]),t}(u.Component);_.propTypes={item:p.default.object,offset:p.default.shape({x:p.default.number.isRequired,y:p.default.number.isRequired}),isDragging:p.default.bool.isRequired};var v=function(e){return{item:e.getItem(),offset:e.getInitialClientOffset(),dragged:e.getDifferenceFromInitialOffset(),isDragging:e.isDragging()}};t.default=(0,f.DragLayer)(v)(_)},"./client/src/components/GalleryItem/draggable.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t={canDrag:function(e){return e.canDrag},beginDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!0,t);var n=e.selectedFiles.concat([]);return n.includes(t)||n.push(t),{selected:n,props:e}},endDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!1,t)}},n=function(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}},o=(0,f.DragSource)(e,t,n);return function(e){var t=function(t){function n(){return r(this,n),s(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return i(n,t),a(n,[{key:"componentDidMount",value:function(){this.props.connectDragPreview((0,h.getEmptyImage)(),{captureDraggingState:!0})}},{key:"render",value:function(){var t=this.props.connectDragSource,n=d.default.createElement(e,this.props);return t("string"==typeof n.type?n:d.default.createElement("div",{className:"gallery-item__draggable"},n))}}]),n}(u.Component);return t.propTypes={connectDragSource:p.default.func.isRequired,connectDragPreview:p.default.func.isRequired,item:p.default.shape({id:p.default.number.isRequired}).isRequired,onDrag:p.default.func,selectedFiles:p.default.arrayOf(p.default.number)},o(t)}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&r<100?f.default.createElement("div",{className:"preview-image-field__progress"},f.default.createElement("div",{className:"preview-image-field__progress-bar",style:{width:r+"%"}})):null,d=null;return s?d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--"+s.type},s.value):100===r&&(d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--success"},c.default._t("AssetAdmin.REPlACE_FILE_SUCCESS","Upload successful, the file will be replaced when you Save."),(r||s)&&f.default.createElement("button",{onClick:this.handleCancelUpload,className:"preview-image-field__message-button btn btn-outline-light",type:"button"},c.default._t("AssetAdmin.REPLACE_FILE_UNDO","Undo")))),f.default.createElement("div",{className:"editor__thumbnail-container"},a||l,u,d)}},{key:"render",value:function(){var e=this.getDropzoneProps();if(this.canEdit())return f.default.createElement(m.default,e,this.renderImage());var t=["preview-image-field__container",this.props.className,this.props.extraClass];return f.default.createElement("div",{className:t.join(" ")},this.renderImage())}}]),t}(p.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string,className:A.default.string,extraClass:A.default.string,readOnly:A.default.bool,disabled:A.default.bool,onAutofill:A.default.func,formid:A.default.string,nameValue:A.default.string,data:A.default.shape({id:A.default.number,parentid:A.default.number,version:A.default.number,url:A.default.string,mock:A.default.bool,exists:A.default.bool,preview:A.default.string,category:A.default.string,nameField:A.default.string,uploadFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string}),initialValues:A.default.object}).isRequired,upload:A.default.shape({url:A.default.string,progress:A.default.number,xhr:A.default.object,category:A.default.string,message:A.default.shape({type:A.default.string.isRequired,value:A.default.string.isRequired})}),actions:A.default.object,securityID:A.default.string,confirm:A.default.func},x.defaultProps={extraClass:"",className:"",data:{},upload:{},confirm:function(e){return window.confirm(e)}},t.Component=x,t.default=(0,_.connect)(l,a)(x)},"./client/src/components/ProportionConstraintField/ProportionConstraintField.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n0&&(!e.message||"error"!==e.message.type)}).length;return Math.max(e-t,0)}},{key:"getFolderId",value:function(){var e=this.state.selectingItem;return e&&"object"===(void 0===e?"undefined":c(e))?e.parent.id:this.props.data.parentid||0}},{key:"handleAddedFile",value:function(e){var t=d({},e,{uploaded:!0});this.props.actions.uploadField.addFile(this.props.id,t)}},{key:"handleSending",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.uploadField.succeedUpload(this.props.id,e._queuedId,t[0])}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.uploadField.failUpload(this.props.id,e._queuedId,t)}},{key:"handleItemRemove",value:function(e,t){this.props.actions.uploadField.removeFile(this.props.id,t)}},{key:"handleReplaceShow",value:function(e,t){this.setState({selecting:!0,selectingItem:t})}},{key:"handleChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if("function"==typeof t.onChange){var n=t.files.filter(function(e){return e.id}).map(function(e){return e.id}),o={Files:n};t.onChange(e,{id:t.id,value:o})}}},{key:"handleUploadButton",value:function(e){e.preventDefault()}},{key:"handleAddShow",value:function(e){e.preventDefault(),this.setState({selecting:!0,selectingItem:null})}},{key:"handleHide",value:function(){this.setState({selecting:!1,selectingItem:null})}},{key:"handleAddInsert",value:function(e,t,n){return this.props.actions.uploadField.addFile(this.props.id,n),this.handleHide(),Promise.resolve({})}},{key:"handleInsertMany",value:function(e,t){var n=this;if(this.state.selectingItem)return void this.handleReplace(e,null,t[0]);t.forEach(function(t){n.handleAddInsert(e,null,t)})}},{key:"handleReplace",value:function(e,t,n){var o=this.state.selectingItem,r=this.props,s=r.id,i=r.actions.uploadField,l=i.addFile,a=i.removeFile;if(!o)throw new Error("Tried to replace a file when none was selected.");return a(s,o),l(s,n),this.handleHide(),Promise.resolve({})}},{key:"canEdit",value:function(){return!this.props.disabled&&!this.props.readOnly&&(this.props.data.canUpload||this.props.data.canAttach)}},{key:"canUpload",value:function(){return this.canEdit()&&this.props.data.canUpload}},{key:"canAttach",value:function(){return this.canEdit()&&this.props.data.canAttach}},{key:"renderDropzone",value:function(){var e=this.props.AssetDropzone;if(!this.props.data.createFileEndpoint)return null;var t={height:E.default.SMALL_THUMBNAIL_HEIGHT,width:E.default.SMALL_THUMBNAIL_WIDTH},n=this.getMaxFiles(),o={url:this.props.data.createFileEndpoint.url,method:this.props.data.createFileEndpoint.method,paramName:"Upload",maxFiles:n,thumbnailWidth:E.default.SMALL_THUMBNAIL_WIDTH,thumbnailHeight:E.default.SMALL_THUMBNAIL_HEIGHT},r=["uploadfield__dropzone"];if(0===n&&r.push("uploadfield__dropzone--hidden"),!this.canEdit())return this.props.files.length?null:g.default.createElement("p",null,h.default._t("AssetAdmin.EMPTY","No files"));var s=this.props.securityId,i=[];return this.canUpload()&&i.push(g.default.createElement("button",{key:"uploadbutton",type:"button",onClick:this.handleUploadButton,className:"uploadfield__upload-button"},h.default._t("AssetAdmin.UPLOADFIELD_UPLOAD_NEW","Upload new"))),this.canAttach()&&(i.length&&i.push(g.default.createElement("span",{key:"uploadjoin",className:"uploadfield__join"},h.default._t("AssetAdmin.OR","or"))),i.push(g.default.createElement("button",{key:"attachbutton",type:"button",onClick:this.handleAddShow,className:"uploadfield__add-button"},h.default._t("AssetAdmin.UPLOADFIELD_CHOOSE_EXISTING","Choose existing")))),g.default.createElement(e,{name:this.props.name,canUpload:this.canUpload(),uploadButton:!1,uploadSelector:".uploadfield__upload-button, .uploadfield__backdrop",folderId:this.props.data.parentid,onAddedFile:this.handleAddedFile,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:t,options:o,securityID:s,className:r.join(" ")},g.default.createElement("div",{className:"uploadfield__backdrop"}),g.default.createElement("span",{className:"uploadfield__droptext"},i))}},{key:"renderModal",value:function(){var e=this.props.InsertMediaModal,t=this.state,n=t.selecting,o=t.selectingItem,r=this.getMaxFiles(),s=this.getFolderId();return g.default.createElement(e,{title:!1,isOpen:n,onInsert:o?this.handleReplace:this.handleAddInsert,onClosed:this.handleHide,onInsertMany:this.handleInsertMany,maxFiles:o?1:r,type:"select",bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",fileAttributes:o?{ID:o.id}:null,folderId:s})}},{key:"renderChild",value:function(e,t){var n=this.props.UploadFieldItem,o={key:e.id?"file-"+e.id:"queued-"+e.queuedId,item:e,name:this.props.name,onRemove:this.handleItemRemove,canEdit:this.canEdit(),onView:this.handleReplaceShow},r=this.props.getItemProps(o,t,this.props);return g.default.createElement(n,r)}},{key:"render",value:function(){return g.default.createElement("div",{className:"uploadfield"},this.renderDropzone(),this.props.files.map(this.renderChild),this.renderModal())}}]),t}(m.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string.isRequired,onChange:A.default.func,value:A.default.shape({Files:A.default.arrayOf(A.default.number)}),files:A.default.arrayOf(w.default),readOnly:A.default.bool,disabled:A.default.bool,data:A.default.shape({files:A.default.arrayOf(w.default),createFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string.isRequired}),multi:A.default.bool,parentid:A.default.number,canUpload:A.default.bool,canAttach:A.default.bool,maxFiles:A.default.number}),UploadFieldItem:A.default.oneOfType([A.default.node,A.default.func]),AssetDropzone:A.default.oneOfType([A.default.node,A.default.func]),InsertMediaModal:A.default.oneOfType([A.default.node,A.default.func]),getItemProps:A.default.func},x.defaultProps={value:{Files:[]},className:"",getItemProps:function(e){return e}};var k=(0,y.connect)(a,u)(x);t.Component=x,t.ConnectedUploadField=k,t.default=(0,_.compose)((0,v.inject)(["UploadFieldItem","AssetDropzone","InsertMediaModal"]),j.default)(k)},"./client/src/components/UploadField/UploadFieldItem.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"isImageSmallerThanThumbnail",value:function(){if(!this.isImage()||this.missing())return!1;var e=this.props.item.width,t=this.props.item.height;return t&&e&&t0}).length)return alert(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FOLDER","These folders contain files which are currently in use, you must move or delete their contents before you can delete the folder.")),void n("cancelled");var o=e.filter(function(e){return"folder"!==e.type&&e.inUseCount>0}),s=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_CONFIRM","Are you sure you want to delete these files?");1===e.length&&1===o.length?s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),e[0].inUseCount):o.length>0&&(s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_MULTI_CONFIRM","There are %s files currently in use, are you sure you want to delete these files?"),o.length)),o.length>0&&(s+="\n\n",s+=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(s)?t():n("cancelled")})})},{value:"edit",label:r.default._t("AssetAdmin.BULK_ACTIONS_EDIT","Edit"),className:"font-icon-edit",destructive:!1,canApply:function(e){return 1===e.length},callback:null},{value:"move",label:r.default._t("AssetAdmin.BULK_ACTIONS_MOVE","Move"),className:"font-icon-folder-move",canApply:function(e){return e.every(function(e){return e&&e.canEdit})},destructive:!1,callback:null},{value:"publish",label:r.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH","Publish"),className:"font-icon-rocket",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e&&!e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"unpublish",label:r.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH","Unpublish"),className:"font-icon-cancel-circled",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"insert",label:r.default._t("AssetAdmin.BULK_ACTIONS_INSERT","Insert"),className:"font-icon-plus-circled btn-primary",destructive:!1,callback:null,canApply:function(e){return e.length},confirm:null}],BULK_ACTIONS_PLACEHOLDER:r.default._t("AssetAdmin.BULK_ACTIONS_PLACEHOLDER"),SPACE_KEY_CODE:32,RETURN_KEY_CODE:13,DEFAULT_PREVIEW:"framework/client/dist/images/app_icons/generic_92.png",MODAL_MOVE:"MODAL_MOVE"}},"./client/src/containers/AssetAdmin/AssetAdmin.js":function(e,t,n){"use strict";function o(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 s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1])||arguments[1];return S.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:this.props.securityId}}:{}))}},{key:"handleBackButtonClick",value:function(e){e.preventDefault(),this.props.actions.gallery.deselectFiles(),this.props.folder?this.handleOpenFolder(this.props.folder.parentId||0):this.handleOpenFolder(0)}},{key:"resetFile",value:function(e){e.queuedId&&this.props.actions.queuedFiles.removeQueuedFile(e.queuedId),this.props.fileId===e.id&&(this.handleCloseFile(),this.handleOpenFile(e.id))}},{key:"handleFolderIcon",value:function(e){e.preventDefault(),this.handleOpenFile(this.getFolderId())}},{key:"handleOpenFile",value:function(e){this.handleBrowse(this.getFolderId(),e,this.props.query)}},{key:"handleSubmitEditor",value:function(e,t,n){var o=this,r=null;if("action_insert"===t&&"select"===this.props.type){var s=this.getFiles(),i=s.find(function(t){return t.id===parseInt(e.ID,10)});return this.props.onInsertMany(null,[i]),Promise.resolve()}if("function"==typeof this.props.onSubmitEditor){var l=this.findFile(this.props.fileId);r=this.props.onSubmitEditor(e,t,n,l)}else r=n();if(!r)throw new Error("Promise was not returned for submitting");return r.then(function(e){return"action_createfolder"===t&&"admin"===o.props.type&&o.handleOpenFile(e.record.id),o.props.actions.files.readFiles().then(function(){return"action_createfolder"===t&&"admin"!==o.props.type&&o.handleOpenFolder(o.getFolderId()),e})})}},{key:"handleCloseFile",value:function(){this.handleBrowse(this.getFolderId(),null,this.props.query)}},{key:"handleOpenFolder",value:function(e){var t=Object.assign({},this.props.query);delete t.page,delete t.filter,this.handleBrowse(e,null,t)}},{key:"handleDelete",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for deletion cannot be found: "+e);return n.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(n.queuedId),n}),o=n.map(function(e){return e.id}),r=this.props.folder?this.props.folder.id:0;return this.props.actions.files.deleteFiles(o,r).then(function(e){var n=e.data.deleteFiles;return t.handleBrowse(r,null,t.props.query),t.props.queuedFiles.items.filter(function(e){return o.includes(e.id)}).forEach(function(e){e.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),t.props.actions.files.readFiles(),n})}},{key:"doUnpublish",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for unpublishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot unpublish folders");return n}),r=o.map(function(e){return e.id});return this.props.actions.files.unpublishFiles(r,n).then(function(e){var n=e.data.unpublishFiles,o=n.filter(function(e){return"File"===e.__typename}),r=n.filter(function(e){return"PublicationNotice"===e.__typename&&"HAS_OWNERS"===e.Type}),s=o.map(function(e){return t.resetFile(e),e}),i=r.slice(0,4),l=r.slice(5),a=i.map(function(e){return e.Message});if(l.length&&a.push(C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_REMAINING","And {count} other file(s)"),{count:l.length})),i.length){var u=[C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_HEADING","{count} file(s) are being used by other published content."),{count:r.length}),a.join("\n"),C.default._t("AssetAdmin.BULK_OWNED_WARNING_FOOTER","Unpublishing will only remove files from the published version of the content. They will remain on the draft version. Unpublish anyway?")];if(confirm(u.join("\n\n"))){var d=r.reduce(function(e,t){return e.concat(t.IDs)},[]);return t.doUnpublish(d,!0).then(function(e){return s.concat(e)})}}return s})}},{key:"handleUnpublish",value:function(e){var t=this;return this.doUnpublish(e).then(function(e){var n=t.props.fileId;t.props.actions.files.readFiles().then(function(){n&&e.find(function(e){return e.id===n})&&(t.handleCloseFile(),t.handleOpenFile(n))})})}},{key:"doPublish",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for publishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot publish folders");return n}),o=n.map(function(e){return e.id});return this.props.actions.files.publishFiles(o).then(function(e){return e.data.publishFiles.filter(function(e){return"File"===e.__typename}).map(function(e){return t.resetFile(e),e})})}},{key:"findFile",value:function(e){return this.getFiles().find(function(t){return t.id===parseInt(e,10)})}},{key:"handleUpload",value:function(){}},{key:"handleUploadQueue",value:function(){this.props.fileId&&this.props.actions.files.readFiles()}},{key:"handleCreateFolder",value:function(){this.props.onBrowse(this.getFolderId(),null,this.props.query,te.default.ACTIONS.CREATE_FOLDER)}},{key:"handleMoveFilesSuccess",value:function(e,t){var n=this;this.props.queuedFiles.items.filter(function(e){return t.includes(e.id)}).forEach(function(e){e.queuedId&&n.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),this.props.actions.gallery.deselectFiles(),this.props.actions.files.readFiles()}},{key:"renderGallery",value:function(){var e=this.props.sectionConfig,t=e.createFileEndpoint.url,n=e.createFileEndpoint.method,o=this.props.query&&parseInt(this.props.query.limit||e.limit,10),r=this.props.query&&parseInt(this.props.query.page||1,10),s=this.props.query&&this.props.query.sort,i=this.props.query&&this.props.query.view,l=this.props.query.filter||{};return g.default.createElement(L.default,{files:this.getFiles(),fileId:this.props.fileId,folderId:this.getFolderId(),folder:this.props.folder,type:this.props.type,limit:o,page:r,totalCount:this.props.filesTotalCount,view:i,filters:l,graphQLErrors:this.props.graphQLErrors,createFileApiUrl:t,createFileApiMethod:n,onDelete:this.handleDelete,onInsertMany:this.props.onInsertMany,onPublish:this.doPublish,onUnpublish:this.doUnpublish,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSuccessfulUpload:this.handleUpload,onSuccessfulUploadQueue:this.handleUploadQueue,onCreateFolder:this.handleCreateFolder,onMoveFilesSuccess:this.handleMoveFilesSuccess,onClearSearch:this.handleClearSearch,onSort:this.handleSort,onSetPage:this.handleSetPage,onViewChange:this.handleViewChange,sort:s,sectionConfig:e,loading:this.props.loading,maxFilesSelect:this.props.maxFiles})}},{key:"renderEditor",value:function(){var e=this.props.sectionConfig,t=u({config:e,viewAction:this.props.viewAction,folderId:this.getFolderId(),type:this.props.type,fileId:this.props.fileId}),n=t.schemaUrl,o=t.targetId;return n?g.default.createElement(R.default,{className:this.props.dialog?"editor--dialog":"",targetId:o,file:this.findFile(o),onClose:this.handleCloseFile,schemaUrl:n,schemaUrlQueries:this.props.requireLinkText?[{name:"requireLinkText",value:!0}]:[],onSubmit:this.handleSubmitEditor,onDelete:this.handleDelete,onUnpublish:this.handleUnpublish,addToCampaignSchemaUrl:e.form.addToCampaignForm.schemaUrl}):null}},{key:"render",value:function(){var e=Boolean(this.props.folderId||(0,z.hasFilters)(this.props.query.filter)),t=this.props.sectionConfig.form.fileSearchForm.schemaUrl,n=this.props.query.filter||{},o=(0,O.default)("fill-height asset-admin","select"===this.props.type&&{"asset-admin--single-select":1===this.props.maxFiles,"asset-admin--multi-select":1!==this.props.maxFiles}),r=(0,z.hasFilters)(this.props.query.filter)||this.props.showSearch,s=this.props.actions.displaySearch?this.props.actions.displaySearch.toggleSearch:void 0;return g.default.createElement("div",{className:o},g.default.createElement(q.default,{showBackButton:e,onBackButtonClick:this.handleBackButtonClick},g.default.createElement(G.default,{multiline:!0}),g.default.createElement("div",{className:"asset-admin__toolbar-extra pull-xs-right fill-width vertical-align-items"},g.default.createElement(K.default,{toggled:r,onToggle:s}),this.props.toolbarChildren)),r&&g.default.createElement(V.default,{onSearch:this.handleDoSearch,id:"AssetSearchForm",formSchemaUrl:t,onHide:this.handleClearSearch,displayBehavior:"HIDEABLE",filters:n,name:"name"}),g.default.createElement("div",{className:"flexbox-area-grow fill-width fill-height gallery"},this.renderGallery(),this.renderEditor()))}}]),t}(m.Component);se.propTypes={dialog:_.default.bool,sectionConfig:oe.default,fileId:_.default.number,folderId:_.default.number,onBrowse:_.default.func,onReplaceUrl:_.default.func,onInsertMany:_.default.func,graphQLErrors:_.default.arrayOf(_.default.string),getUrl:_.default.func,query:_.default.shape({sort:_.default.string,limit:_.default.oneOfType([_.default.number,_.default.string]),page:_.default.oneOfType([_.default.number,_.default.string]),filter:_.default.object}),onSubmitEditor:_.default.func,type:_.default.oneOf(["insert-media","insert-link","select","admin"]),files:_.default.array,queuedFiles:_.default.shape({items:_.default.array.isRequired}),filesTotalCount:_.default.number,folder:_.default.shape({id:_.default.number,title:_.default.string,parents:_.default.array,parentId:_.default.number,canView:_.default.bool,canEdit:_.default.bool}),loading:_.default.bool,actions:_.default.object,maxFiles:_.default.number},se.defaultProps={type:"admin",query:{sort:"",limit:null,page:0,filter:{}},maxFiles:null},t.Component=se,t.getFormSchema=u,t.default=(0,b.compose)((0,v.connect)(c,p),(0,re.injectGraphql)("ReadFilesQuery"),Y.default,X.default,J.default,function(e){return(0,H.withApollo)(e)})(se)},"./client/src/containers/AssetAdmin/AssetAdminRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.base,n=e.folderId,o=e.fileId,r=e.query,s=e.action;if(s&&-1===O.indexOf(s))throw new Error("Invalid action provided: "+s);var i=null;return i=o?t+"/show/"+n+"/"+S.default.ACTIONS.EDIT_FILE+"/"+o:n?t+"/show/"+n:t+"/",s===S.default.ACTIONS.CREATE_FOLDER&&(i=t+"/show/"+(n||0)+"/"+s),r&&Object.keys(r).length>0&&(i=i+"?"+b.default.stringify(r)),i}function a(e){return{sectionConfig:e.config.sections.find(function(e){return e.name===w})}}Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=r!==this.getFolderId(),a=Object.assign({},n);return(i||a.page<=1)&&delete a.page,l({base:"/"+this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return this.props.match.params&&this.props.match.params.folderId?parseInt(this.props.match.params.folderId,10):0}},{key:"getFileId",value:function(){return this.props.match.params&&this.props.match.params.fileId?parseInt(this.props.match.params.fileId,10):0}},{key:"getViewAction",value:function(){return this.props.match.params&&this.props.match.params.viewAction?this.props.match.params.viewAction:S.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){return{sectionConfig:this.props.sectionConfig,type:"admin",folderId:this.getFolderId(),viewAction:this.getViewAction(),fileId:this.getFileId(),query:this.getQuery(),getUrl:this.getUrl,onBrowse:this.handleBrowse,onReplaceUrl:this.handleReplaceUrl}}},{key:"getQuery",value:function(){return(0,_.decodeQuery)(this.props.location.search)}},{key:"handleBrowse",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.push(r)}},{key:"handleReplaceUrl",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.replace(r)}},{key:"render",value:function(){return this.props.sectionConfig?c.default.createElement(y.default,this.getSectionProps()):null}}]),t}(d.Component);I.propTypes={sectionConfig:C.default,location:f.default.shape({pathname:f.default.string,query:f.default.object,search:f.default.string}),params:f.default.object,router:f.default.object},t.Component=I,t.buildUrl=l,t.default=(0,m.withRouter)((0,h.connect)(a)(I))},"./client/src/containers/AssetAdmin/stateRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){function t(t){var n=t.config.sections.find(function(e){return e.name===y});return{Component:e,sectionConfig:n}}return(0,f.connect)(t)(v)}Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAdminStateRouter=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=this.getFolderId(),l=r!==i&&null!==i,a=Object.assign({},n);return(l||a.page<=1)&&delete a.page,(0,h.buildUrl)({base:this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return null===this.state.folderId?null:parseInt(this.state.folderId||0,10)}},{key:"getFileId",value:function(){return parseInt(this.state.fileId||this.props.fileId||0,10)}},{key:"getViewAction",value:function(){return this.state.action||g.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){var e=Object.assign({},this.props,{folderId:this.getFolderId(),fileId:this.getFileId(),viewAction:this.getViewAction(),query:this.state.query,getUrl:this.getUrl,onBrowse:this.handleBrowse});return delete e.Component,e}},{key:"handleBrowse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE;if(o&&-1===Object.values(g.default.ACTIONS).indexOf(o))throw new Error("Invalid action provided: "+o);this.setState({folderId:e,fileId:t,query:n,action:o})}},{key:"render",value:function(){var e=this.getSectionProps(),t=this.props.Component;return d.default.createElement(t,e)}}]),t}(u.Component);v.propTypes={Component:p.default.oneOfType([p.default.element,p.default.func]),sectionConfig:p.default.shape({url:p.default.string.isRequired}).isRequired,fileId:p.default.number},t.AssetAdminStateRouter=v,t.default=l},"./client/src/containers/Editor/Editor.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{actions:{unsavedForms:(0,f.bindActionCreators)(j,e)}}}function a(e){return{enableDropzone:e.assetAdmin.gallery.enableDropzone}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&(o=c.default.sprintf(c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),this.props.file.inUseCount),o+="\n\n",o+=c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(o)&&(this.props.actions.unsavedForms.removeFormChanged("AssetAdmin.EditForm"),this.props.onDelete([t.ID])),e.preventDefault()}}},{key:"handleCancelKeyDown",value:function(e){e.keyCode!==y.default.SPACE_KEY_CODE&&e.keyCode!==y.default.RETURN_KEY_CODE||this.handleClose(e)}},{key:"handleSubmit",value:function(e,t,n){return"function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n()}},{key:"handleClose",value:function(e){this.props.onClose(),this.closeModal(),e&&e.preventDefault()}},{key:"openModal",value:function(){this.setState({openModal:!0})}},{key:"closeModal",value:function(){this.setState({openModal:!1})}},{key:"replaceFile",value:function(){var e=document.querySelector(".dz-input-PreviewImage");e&&e.click()}},{key:"handleLoadingError",value:function(e){this.setState({loadingForm:!1,loadingError:e.errors[0]})}},{key:"handleLoadingSuccess",value:function(){this.setState({loadingForm:!1,loadingError:null})}},{key:"handleFetchingSchema",value:function(){this.setState({loadingForm:!0})}},{key:"renderCancelButton",value:function(){return m.default.createElement("a",{role:"button",tabIndex:0,className:"btn btn--close-panel btn--no-text font-icon-cancel btn--icon-xl",onClick:this.handleClose,onKeyDown:this.handleCancelKeyDown,type:"button","aria-label":c.default._t("AssetAdmin.CANCEL")})}},{key:"render",value:function(){var e=this.props.schemaUrlQueries.map(function(e){return e.name+"="+e.value}).join("&").trim();e=e?"?"+e:"";var t=this.props.schemaUrl+"/"+this.props.targetId+e,n=this.props.addToCampaignSchemaUrl+"/"+this.props.targetId,o=["panel","form--no-dividers","editor"];this.props.className&&o.push(this.props.className),this.props.enableDropzone||o.push("editor--asset-dropzone--disable");var r=null;if(this.state.loadingError){var s=this.state.loadingError.value;404===this.state.loadingError.code&&(s=c.default._t("AssetAdmin.FILE_MISSING","File cannot be found")),s||(s=c.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")),r=m.default.createElement("div",{className:"editor__file-preview-message--file-missing"},s)}var i=c.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign"),l=this.props.loadingComponent;return m.default.createElement("div",{className:o.join(" ")},m.default.createElement("div",{className:"editor__details fill-height"},m.default.createElement(v.default,{identifier:"AssetAdmin.EditForm",schemaUrl:t,afterMessages:this.renderCancelButton(),onSubmit:this.handleSubmit,onAction:this.handleAction,onLoadingSuccess:this.handleLoadingSuccess,onLoadingError:this.handleLoadingError,onFetchingSchema:this.handleFetchingSchema}),r,m.default.createElement(E.default,{title:i,identifier:"AssetAdmin.AddToCampaign",isOpen:this.state.openModal,onClosed:this.closeModal,schemaUrl:n,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good"}),this.state.loadingForm&&m.default.createElement(l,null)))}}]),t}(h.Component);A.propTypes={file:w.default,className:I.default.string,targetId:I.default.number.isRequired,enableDropzone:I.default.bool,onClose:I.default.func.isRequired,onSubmit:I.default.func.isRequired,onDelete:I.default.func.isRequired,schemaUrl:I.default.string.isRequired,schemaUrlQueries:I.default.arrayOf(I.default.shape({name:I.default.string,value:I.default.any})),addToCampaignSchemaUrl:I.default.string,actions:I.default.object},t.Component=A,t.default=(0,f.compose)((0,F.inject)(["Loading"],function(e){return{loadingComponent:e}},function(){return"AssetAdmin.Editor"}),(0,p.connect)(a,l))(A)},"./client/src/containers/Gallery/Gallery.js":function(e,t,n){"use strict";function o(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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=t.sort,o=e.assetAdmin.gallery,r=o.selectedFiles,s=o.errorMessage,i=o.noticeMessage,l=o.enableDropzone,a=o.badges,u=o.concatenateSelect,d=o.loading,c=o.sorters,p=o.lastSelected;return!n&&c&&c[0]&&(n=c[0].field+","+c[0].direction),{lastSelected:p,selectedFiles:r,errorMessage:s,noticeMessage:i,enableDropzone:l,badges:a,concatenateSelect:u,loading:t.loading||d,queuedFiles:e.assetAdmin.queuedFiles,securityId:e.config.SecurityID,sorters:c,sort:n}}function u(e){return{actions:{gallery:(0,S.bindActionCreators)(R,e),queuedFiles:(0,S.bindActionCreators)(L,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.galleryViewDefaultProps=t.galleryViewPropTypes=t.Component=void 0;var d=Object.assign||function(e){for(var t=1;t=s&&t<=i}).map(function(e){return e.id})}},{key:"getSelectableFiles",value:function(){var e=this.props.files.filter(function(e){return e.id});return"select"===this.props.type?e.filter(function(e){return"folder"!==e.type}):e}},{key:"handleBulkInsert",value:function(e,t){this.props.onInsertMany(e,t)}},{key:"handleBulkDelete",value:function(e,t){var n=this;return this.props.onDelete(t.map(function(e){return e.id})).then(function(e){var o=e.filter(function(e){return e}).length;o!==t.length?(n.props.actions.gallery.setErrorMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FAIL","%s folders/files were successfully deleted, but %s files were not able to be deleted."),o,t.length-o)),n.props.actions.gallery.setNoticeMessage(null)):(n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SUCCESS","%s folders/files were successfully deleted."),o)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles())})}},{key:"handleBulkPublish",value:function(e,t){var n=this,o=t.map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onPublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH_SUCCESS","%s folders/files were successfully published."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"handleBulkUnpublish",value:function(e,t){var n=this,o=t.filter(function(e){return e.published}).map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onUnpublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH_SUCCESS","%s folders/files were successfully unpublished."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"initSortDropdown",value:function(){if("tile"===this.props.view){var e=this.getSortElement();e.chosen({allow_single_deselect:!0,disable_search_threshold:20}),e.off("change"),e.on("change",function(){return e.find(":selected")[0].click()})}}},{key:"handleSort",value:function(e){this.props.actions.queuedFiles.purgeUploadQueue(),this.props.onSort(e)}},{key:"handleSetPage",value:function(e){this.props.onSetPage(e)}},{key:"handleCancelUpload",value:function(e){e.xhr.abort(),this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleRemoveErroredUpload",value:function(e){this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleAddedFile",value:function(e){this.props.actions.queuedFiles.addQueuedFile(e)}},{key:"handlePreviewLoaded",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e.queuedId,t)}},{key:"handleSending",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.queuedFiles.succeedUpload(e._queuedId,t[0]),this.props.onSuccessfulUpload&&this.props.onSuccessfulUpload(t);var n=this.props.queuedFiles.items.reduce(function(e,t){return 100!==t.progress?e+1:e},0);if(!this.props.fileId&&!this.props.selectedFiles.length&&0===n){var o=t.pop();this.props.onOpenFile(o.id)}}},{key:"handleQueueComplete",value:function(){this.props.onSuccessfulUploadQueue&&this.props.onSuccessfulUploadQueue()}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.queuedFiles.failUpload(e._queuedId,t)}},{key:"itemIsSelected",value:function(e){return this.props.selectedFiles.indexOf(e)>-1}},{key:"toggleSelectConcat",value:function(e){this.props.actions.gallery.setConcatenateSelect(this.isConcat(e))}},{key:"isConcat",value:function(e){return e.metaKey||e.ctrlKey||e.shiftKey}},{key:"itemIsHighlighted",value:function(e){return this.props.fileId===e}},{key:"hasOpenedItem",value:function(){return!!this.props.fileId}},{key:"handleClearSearch",value:function(e){this.props.onClearSearch(e)}},{key:"handleGroupSelect",value:function(e,t){var n=this,o=this.props.actions.gallery,r=o.setSelectedFiles,s=o.selectFiles,i=this.getSelectableFiles(),l=e.filter(function(t,n){return e.indexOf(t)===n&&i.find(function(e){return e.id===t})}),a=this.props.concatenateSelect||this.isConcat(t);if(null!==this.props.maxFilesSelect){var u=l.length;if(a&&(u=this.props.selectedFiles.filter(function(e){return!n.props.selectedFiles.includes(e)}).concat(this.props.selectedFiles).length),u>=this.props.maxFilesSelect)return}a?s(l):r(l)}},{key:"handleClearSelection",value:function(){this.props.actions.gallery.deselectFiles()}},{key:"handleOpenFolder",value:function(e,t){e.preventDefault(),this.props.actions.gallery.setErrorMessage(null),this.props.actions.gallery.setNoticeMessage(null),this.props.onOpenFolder(t.id)}},{key:"handleOpenFile",value:function(e,t){e.preventDefault(),null!==t.created&&(this.props.selectedFiles.length&&1!==this.props.maxFilesSelect||"select"!==this.props.type||this.handleSelect(e,t),this.props.onOpenFile(t.id,t))}},{key:"handleSelect",value:function(e,t){var n=this.props.maxFilesSelect,o=this.getSelectableFiles(),r=o.filter(function(e){return e.id===t.id}).map(function(e){return e.id});if(1===n)return void this.props.actions.gallery.setSelectedFiles(r);if(-1===this.props.selectedFiles.indexOf(t.id)){if(e.shiftKey&&(r=this.getSelection(this.props.lastSelected,t.id)),this.props.selectedFiles.filter(function(e){return!r.includes(e)}).concat(r).length>n&&null!==n)return;this.props.actions.gallery.selectFiles(r),this.props.actions.gallery.setLastSelected(t.id)}else this.props.actions.gallery.deselectFiles([t.id]),e.shiftKey&&this.props.actions.gallery.setLastSelected(null)}},{key:"handleEnableDropzone",value:function(e){this.props.actions.gallery.setEnableDropzone(e)}},{key:"handleMoveFiles",value:function(e,t){var n=this;this.props.actions.files.moveFiles(e,t).then(function(){var o=P.default.MOVE_SUCCESS_DURATION,r="+"+t.length;n.props.actions.gallery.setFileBadge(e,r,"success",o),"function"==typeof n.props.onMoveFilesSuccess&&n.props.onMoveFilesSuccess(e,t)}).catch(function(){n.props.actions.gallery.setErrorMessage(g.default._t("AssetAdmin.FAILED_MOVE","There was an error moving the selected items."))})}},{key:"handleBulkEdit",value:function(e,t){this.handleOpenFile(e,t[0])}},{key:"handleBulkMove",value:function(){this.props.actions.gallery.activateModal(P.default.MODAL_MOVE)}},{key:"renderTransitionBulkActions",value:function(){return this.renderBulkActions()}},{key:"renderBulkActions",value:function(){var e=this,t="select"===this.props.type?function(e){return"insert"===e.value}:function(e){return"insert"!==e.value},n=P.default.BULK_ACTIONS.filter(t).map(function(t){if(t.callback)return t;switch(t.value){case"delete":return d({},t,{callback:e.handleBulkDelete});case"edit":return d({},t,{callback:e.handleBulkEdit});case"move":return d({},t,{callback:e.handleBulkMove});case"publish":return d({},t,{callback:e.handleBulkPublish});case"unpublish":return d({},t,{callback:e.handleBulkUnpublish});case"insert":return d({},t,{callback:e.handleBulkInsert,color:"primary"});default:return t}}),o=this.props.selectedFiles.map(function(t){return e.props.files.find(function(e){return e&&t===e.id})}).filter(function(e){return e});return o.length>0&&["admin","select"].includes(this.props.type)?_.default.createElement(O.default,{actions:n,items:o,total:this.props.maxFilesSelect,key:o.length>0,container:this.gallery,showCount:1!==this.props.maxFilesSelect}):null}},{key:"renderGalleryView",value:function(){var e=this,t="table"===this.props.view?x.default:F.default,n=this.props.files.map(function(t){return d({},t,{selected:e.itemIsSelected(t.id),highlighted:e.itemIsHighlighted(t.id)})}),o=this.props,r=o.type,s=o.loading,i=o.page,l=o.totalCount,a=o.limit,u=o.sort,c=o.selectedFiles,p=o.badges,f={selectableItems:["admin","select"].includes(r),selectableFolders:"select"!==this.props.type,files:n,loading:s,page:i,totalCount:l,limit:a,sort:u,selectedFiles:c,badges:p,onSort:this.handleSort,onSetPage:this.handleSetPage,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSelect:this.handleSelect,onCancelUpload:this.handleCancelUpload,onDropFiles:this.handleMoveFiles,onRemoveErroredUpload:this.handleRemoveErroredUpload,onEnableDropzone:this.handleEnableDropzone,sectionConfig:this.props.sectionConfig,canDrag:"admin"===this.props.type,maxFilesSelect:this.props.maxFilesSelect};return _.default.createElement(t,f)}},{key:"renderToolbar",value:function(){var e=this.props,t=e.GalleryToolbar,n=e.sort,o=e.view,r=e.folder,s=e.onCreateFolder,i=e.onOpenFolder,l=e.onViewChange,a={onMoveFiles:this.handleMoveFiles,onSort:this.handleSort,onCreateFolder:s,onOpenFolder:i,onViewChange:l,view:o,sort:n,folder:r};return _.default.createElement(t,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.folder,o=t.loading,r=t.errorMessage,s=t.graphQLErrors,i=t.noticeMessage,l=this.props.LoadingComponent,a=s&&s.length>0;if(!n)return r||a?_.default.createElement("div",{className:"gallery__error flexbox-area-grow"},_.default.createElement("div",{className:"gallery__error-message"},_.default.createElement("h3",null,g.default._t("AssetAdmin.DROPZONE_RESPONSE_ERROR","Server responded with an error.")),r&&_.default.createElement("p",null,r),a&&s.map(function(e,t){return _.default.createElement("p",{key:t},e)}))):o?_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement(l,null)):_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement("div",{className:"editor__file-preview-message--file-missing m-t-3"},g.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")));var u=_.default.createElement("div",{className:"gallery_messages"},r&&_.default.createElement(T.default,{value:r,type:"danger"}),i&&_.default.createElement(T.default,{value:i,type:"success"})),c={height:P.default.THUMBNAIL_HEIGHT,width:P.default.THUMBNAIL_WIDTH},p=d({url:this.props.createFileApiUrl,method:this.props.createFileApiMethod,paramName:"Upload",clickable:"#upload-button"},this.props.sectionConfig.dropzoneOptions),f=this.props.securityId,h=this.props.folder.canEdit&&this.props.enableDropzone,m=["panel","panel--padded","panel--scrollable","gallery__main","fill-height"];"insert"===this.props.type&&m.push("insert-media-modal__main");var y=m;return this.hasOpenedItem()&&y.push("gallery__main--has-opened-item"),_.default.createElement("div",{className:"flexbox-area-grow gallery__outer",ref:function(t){e.gallery=t}},this.renderTransitionBulkActions(),_.default.createElement(z.default,{className:m.join(" ")},this.renderToolbar(),_.default.createElement(q.SelectableGroup,{enabled:"tile"===this.props.view&&"admin"===this.props.type,className:"flexbox-area-grow fill-height gallery__main--selectable",onSelection:this.handleGroupSelect,onNonItemClick:this.handleClearSelection,preventDefault:!1,fixedPosition:!0},_.default.createElement(C.default,{name:"gallery-container",className:"flexbox-area-grow",canUpload:h,onAddedFile:this.handleAddedFile,onPreviewLoaded:this.handlePreviewLoaded,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onQueueComplete:this.handleQueueComplete,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:c,folderId:this.props.folderId,options:p,securityID:f,uploadButton:!1},u,this.renderGalleryView()))),this.props.loading&&_.default.createElement(l,null),_.default.createElement(Q.default,{sectionConfig:this.props.sectionConfig,folderId:this.props.folderId,onSuccess:this.props.onMoveFilesSuccess,onOpenFolder:this.props.onOpenFolder}))}}]),t}(y.Component),J={page:1,limit:15},ee={sectionConfig:W.default,loading:X.default.bool,sort:X.default.string,files:X.default.arrayOf(X.default.shape({id:X.default.number,parent:X.default.shape({id:X.default.number})})).isRequired,selectedFiles:X.default.arrayOf(X.default.number),totalCount:X.default.number,page:X.default.number,limit:X.default.number,badges:X.default.arrayOf(X.default.shape({id:X.default.number,message:X.default.node,status:X.default.string})),onOpenFile:X.default.func.isRequired,onOpenFolder:X.default.func.isRequired,onSort:X.default.func.isRequired,onSetPage:X.default.func.isRequired,maxFilesSelect:X.default.number},te=Object.assign({},J,{selectableItems:!1}),ne=Object.assign({},ee,{selectableItems:X.default.bool,selectableFolders:X.default.bool,onSelect:X.default.func,onCancelUpload:X.default.func,onDelete:X.default.func,onRemoveErroredUpload:X.default.func,onEnableDropzone:X.default.func});Z.defaultProps=Object.assign({},J,{type:"admin",view:"tile",enableDropzone:!0}),Z.propTypes=Object.assign({},ee,{onSuccessfulUpload:X.default.func,onSuccessfulUploadQueue:X.default.func,onCreateFolder:X.default.func,onMoveFilesSuccess:X.default.func,onDelete:X.default.func,onPublish:X.default.func,onUnpublish:X.default.func,type:X.default.oneOf(["insert-media","insert-link","select","admin"]),view:X.default.oneOf(["tile","table"]),lastSelected:X.default.number,dialog:X.default.bool,fileId:X.default.number,folderId:X.default.number.isRequired,folder:X.default.shape({id:X.default.number,title:X.default.string,parentId:X.default.number,canView:X.default.bool,canEdit:X.default.bool}),files:X.default.array,errorMessage:X.default.string,graphQLErrors:X.default.arrayOf(X.default.string),actions:X.default.object,securityId:X.default.string,onViewChange:X.default.func.isRequired,createFileApiUrl:X.default.string,createFileApiMethod:X.default.string,search:X.default.object,enableDropzone:X.default.bool,concatenateSelect:X.default.bool,GalleryToolbar:X.default.func,sorters:X.default.arrayOf(X.default.shape({field:X.default.string.isRequired,direction:X.default.oneOf(["asc","desc"]).isRequired,label:X.default.string.isRequired})).isRequired}),t.Component=Z,t.galleryViewPropTypes=ne,t.galleryViewDefaultProps=te,t.default=(0,S.compose)((0,Y.inject)(["GalleryToolbar","Loading"],function(e,t){return{GalleryToolbar:e,LoadingComponent:t}},function(){return"AssetAdmin.Gallery"}),(0,E.connect)(a,u),G.default,function(e){return(0,B.withApollo)(e)})(Z)},"./client/src/containers/Gallery/GalleryDND.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return h.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:g.default.get("SecurityID")}}:{}))},w=function(e){function t(e){r(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={detailView:null,history:[],loadedDetails:!1},n.handleClick=n.handleClick.bind(n),n.handleBack=n.handleBack.bind(n),n.timer=null,n.api=C(e.sectionConfig.historyEndpoint),n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.refreshHistoryIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.refreshHistoryIfNeeded(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.timer=null}},{key:"refreshHistoryIfNeeded",value:function(e){var t=this;if(!e&&!this.state.loadedDetails||e.data.fileId!==this.props.data.fileId||e.data.latestVersionId!==this.props.data.latestVersionId){this.setState({loadedDetails:!1});var n=e?e.data.fileId:this.props.data.fileId;clearTimeout(this.timer),this.timer=setTimeout(function(){t.api({fileId:n}).then(function(e){t.timer&&t.setState({history:e,loadedDetails:!0})})},250)}}},{key:"handleClick",value:function(e){this.setState({viewDetails:e})}},{key:"handleBack",value:function(e){e.preventDefault(),this.setState({viewDetails:null})}},{key:"render",value:function(){var e=this;if(!this.state.loadedDetails)return c.default.createElement("div",{className:"history-list history-list--loading"},"Loading...");if(this.state.viewDetails){var t=[this.props.historySchemaUrl,this.props.data.fileId,this.state.viewDetails].join("/"),n=["btn","btn-secondary","btn--icon-xl","btn--no-text","font-icon-left-open-big","history-list__back"].join(" ");return c.default.createElement("div",{className:"history-list"},c.default.createElement("a",{href:"#",className:n,onClick:this.handleBack}),c.default.createElement(b.default,{identifier:"AssetAdmin.HistoryList",schemaUrl:t,formTag:"div"}))}var o=this.state.history||[];return c.default.createElement("div",{className:"history-list"},c.default.createElement("ul",{className:"list-group list-group-flush history-list__list"},o.map(function(t){return c.default.createElement(_.default,a({key:t.versionid},t,{onClick:e.handleClick}))})))}}]),t}(d.Component);w.propTypes={sectionConfig:S.default.shape({form:S.default.object,historyEndpoint:S.default.shape({url:S.default.string,method:S.default.string,responseFormat:S.default.string})}),historySchemaUrl:S.default.string,data:S.default.object},w.defaultProps={data:{fieldId:0}},t.Component=w,t.default=(0,p.connect)(l)(w)},"./client/src/containers/MoveModal/MoveModal.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.assetAdmin.gallery,n=t.modal,o=t.selectedFiles;return{isOpen:n===y.default.MODAL_MOVE,selectedFiles:o,title:m.default.sprintf(m.default._t("AssetAdmin.MOVE_ITEMS_TO","Move %s item(s) to..."),o.length)}}function a(e){return{onClosed:function(){e((0,b.deactivateModal)())},setNotice:function(t){e((0,b.setNoticeMessage)(t))},setError:function(t){e((0,b.setErrorMessage)(t))},setBadge:function(){e(b.setFileBadge.apply(void 0,arguments))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t0)return p.default.createElement("div",{className:"gallery__progress-bar--complete"});var t={className:"gallery__progress-bar-progress",style:{width:e.progress+"%"}};return p.default.createElement("div",{className:"gallery__progress-bar"},p.default.createElement("div",t))}},{key:"renderTitle",value:function(e){var t=this.renderProgressBar(e.rowData);return p.default.createElement("div",{className:"fill-width"},p.default.createElement("div",{className:"flexbox-area-grow"},e.data),t)}},{key:"renderSelect",value:function(e){if(this.props.selectableItems&&(this.props.selectableFolders||"folder"!==e.rowData.type)){var t={type:"checkbox",title:_.default._t("AssetAdmin.SELECT"),defaultChecked:e.data,tabIndex:-1,onMouseDown:this.preventFocus};return![null,1].includes(this.props.maxFilesSelect)&&this.props.selectedFiles.length>=this.props.maxFilesSelect&&!e.data&&(t.disabled=!0),p.default.createElement("input",t)}return null}},{key:"renderDate",value:function(e){return"folder"===e.rowData.type?null:p.default.createElement("span",null,e.data)}},{key:"renderThumbnail",value:function(e){var t=e.data||e.rowData.url,n=e.rowData.queuedId&&!e.rowData.id,o=e.rowData.category||"false",r="gallery__table-image",s=[r],i={};return s.push(r+"--"+o),"image"===o&&t&&(i.backgroundImage='url("'+t+'")'),n||t||"folder"===o||s.push(r+"--error"),p.default.createElement("div",{className:s.join(" "),style:i})}},{key:"render",value:function(){return p.default.createElement(g.default,this.getTableProps())}}]),t}(c.Component);j.defaultProps=v.galleryViewDefaultProps,j.propTypes=a({},v.galleryViewPropTypes,{sort:h.default.string.isRequired}),t.Component=j,t.default=j},"./client/src/containers/ThumbnailView/ThumbnailView.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=Object.assign||function(e){for(var t=1;t=this.props.maxFilesSelect,b=1===this.props.maxFilesSelect?c.onActivate:this.props.onSelect;c=l({},c,{selectable:!0,onSelect:b,maxSelected:v})}if("folder"===e.type){var E=this.props.onDropFiles;return c=l({},c,{onDropFiles:E}),p.default.createElement(o,c)}return p.default.createElement(n,c)}},{key:"render",value:function(){return p.default.createElement("div",{className:"gallery__main-view--tile"},p.default.createElement("div",{className:"gallery__folders"},this.props.files.filter(this.folderFilter).map(this.renderItem)),p.default.createElement("div",{className:"gallery__files"},this.props.files.filter(this.fileFilter).map(this.renderItem)),0===this.props.files.length&&!this.props.loading&&p.default.createElement("p",{className:"gallery__no-item-notice"},d.default._t("AssetAdmin.NOITEMSFOUND")),p.default.createElement("div",{className:"gallery__load"},this.renderPagination()))}}]),t}(c.Component);v.defaultProps=h.galleryViewDefaultProps,v.propTypes=l({},h.galleryViewPropTypes,{File:_.default.oneOfType([_.default.node,_.default.func]).isRequired,Folder:_.default.oneOfType([_.default.node,_.default.func]).isRequired});var b=(0,f.inject)(["GalleryItemFile","GalleryItemFolder"],function(e,t){return{File:e,Folder:t}},function(){return"AssetAdmin.Gallery.ThumbnailView"});t.Component=v,t.default=b(v)},"./client/src/entwine/UploadField/UploadFieldEntwine.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=Object.assign||function(e){for(var t=1;t');this.before(n),t=n[0]}return t},onunmatch:function(){this._super(),d.default.unmountComponentAtNode(this.siblings(".uploadfield-holder")[0])},onmatch:function(){var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,p.loadComponent)("UploadField",t);this.setComponent(n),this._super(),this.hide(),this.refresh()},onclick:function(e){e.preventDefault()},refresh:function(){var t=this.getAttributes(),n=e(this).closest("form"),o=function(){setTimeout(function(){n.trigger("change")},0)},s=this.getComponent();d.default.render(a.default.createElement(s,r({},t,{onChange:o,noHolder:!0})),this.getContainer())},getAttributes:function(){var t=e(this).data("state"),n=e(this).data("schema");return(0,c.schemaMerge)(n,t)}})})},"./client/src/lib/configShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({url:r.default.string,limit:r.default.number,imageRetry:r.default.shape({minRetry:r.default.number,maxRetry:r.default.number,expiry:r.default.number}),form:r.default.object,dropzoneOptions:r.default.object});t.default=s},"./client/src/lib/fileFragments.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileInterface="\n fragment FileInterfaceFields on FileInterface {\n canDelete\n canEdit\n canView\n category\n exists\n filename\n id\n lastEdited\n name\n parentId\n title\n type\n url\n }\n",t.file="\n fragment FileFields on File {\n draft\n extension\n published\n modified\n size\n smallThumbnail\n thumbnail\n inUseCount\n }\n",t.folder="\n fragment FolderFields on Folder {\n filesInUseCount\n }\n"},"./client/src/lib/fileShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({canEdit:r.default.bool,canDelete:r.default.bool,canView:r.default.bool,exists:r.default.bool,type:r.default.string,smallThumbnail:r.default.string,thumbnail:r.default.string,width:r.default.number,height:r.default.number,category:r.default.oneOfType([r.default.bool,r.default.string]),id:r.default.number,inUseCount:r.default.number,url:r.default.string,title:r.default.string,progress:r.default.number});t.default=s},"./client/src/lib/fileStructure.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=(0,r.default)({name:null,canDelete:!1,canEdit:!1,category:null,created:null,extension:null,filename:null,id:0,lastEdited:null,messages:null,owner:{id:0,title:null},parent:{filename:null,id:0,title:null},queuedId:null,size:null,title:null,type:null,url:null,xhr:null,thumbnail:null,smallThumbnail:null,height:null,width:null});t.default=s},"./client/src/state/displaySearch/DisplaySearchActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_SEARCH:"TOGGLE_SEARCH",OPEN_SEARCH:"OPEN_SEARCH",CLOSE_SEARCH:"CLOSE_SEARCH"}},"./client/src/state/displaySearch/DisplaySearchActions.js":function(e,t,n){"use strict";function o(){return{type:l.default.TOGGLE_SEARCH,payload:null}}function r(){return{type:l.default.OPEN_SEARCH,payload:null}}function s(){return{type:l.default.CLOSE_SEARCH,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleSearch=o,t.openSearch=r,t.closeSearch=s;var i=n("./client/src/state/displaySearch/DisplaySearchActionTypes.js"),l=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/displaySearch/DisplaySearchReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;switch(arguments[1].type){case u.default.TOGGLE_SEARCH:return(0,l.default)(s({},e,{isOpen:!e.isOpen}));case u.default.OPEN_SEARCH:return(0,l.default)(s({},e,{isOpen:!0}));case u.default.CLOSE_SEARCH:return(0,l.default)(s({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n({variables:{IDs:e,Quiet:o,Force:t}})};return{actions:r({},s,{files:r({},s.files,o({},e,i))})}}}}};t.default=u},"./client/src/state/files/deleteFilesMutation.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return t({variables:{IDs:e},update:function(t){var r=d.default.query.get("ReadFilesQuery"),s=r.getApolloConfig(),i=s.options(n).variables;null!==o&&(i.rootFilter.id=o,i.rootFilter.anyChildId=null);var l=r.getGraphqlAST(),a=t.readQuery({query:l,variables:i}),u=JSON.parse(JSON.stringify(a)),c=u.readFiles.edges[0].node.children.edges;c=c.filter(function(t){return!e.includes(t.node.id)}),u.readFiles.edges[0].node.children.edges=c,u.readFiles.edges[0].node.children.pageInfo.totalCount=c.length,t.writeQuery({query:l,data:u,variables:i})}})};return{actions:r({},o,{files:r({},o.files,{deleteFiles:s})})}}};t.mutation=c,t.config=p,t.default=(0,i.graphql)(c,p)},"./client/src/state/files/moveFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"],["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"]),r=n(11),s=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n("./client/src/lib/fileFragments.js"),a=(0,i.default)(o,l.fileInterface,l.file),u={props:function(e){var t=e.mutate,n=e.ownProps.actions,o=void 0===n?{}:n;return{actions:Object.assign({},o,{files:Object.assign({},o.files,{moveFiles:function(e,n){return t({variables:{folderId:e,fileIds:n},update:function(){window.ss.apolloClient.resetStore()}})}})})}}};t.mutation=a,t.config=u,t.default=(0,r.graphql)(a,u)},"./client/src/state/files/publishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("publishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/files/readFilesQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,s=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,s=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n(22),s=n(3),i={options:function(e){var t=e.sectionConfig,n=e.folderId,s=e.fileId,i=e.query,l=Object.assign({},i.filter),a=Object.assign({},l,{parentId:void 0,recursive:(0,r.hasFilters)(l),currentFolderOnly:void 0}),u=(0,r.hasFilters)(l)?null:s||null,d=u?null:n||0,c={id:d,anyChildId:u},p=i.sort?i.sort.split(","):["",""],f=o(p,2),h=f[0],m=f[1],g=i.limit||t.limit;return{variables:{rootFilter:c,childrenFilter:a,limit:g,offset:((i.page||1)-1)*g,sortBy:h&&m?[{field:h,direction:m.toUpperCase()}]:void 0}}},props:function(e){var t=e.data,n=t.error,o=t.refetch,r=t.readFiles,s=t.loading,i=e.ownProps.actions,l=r&&r.edges[0]?r.edges[0].node:null,a=l&&l.children?l.children.edges.map(function(e){return e.node}).filter(function(e){return e}):[],u=l&&l.children?l.children.pageInfo.totalCount:0,d=l&&!l.children,c=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:s||d,folder:l,files:a,filesTotalCount:u,graphQLErrors:c,actions:Object.assign({},i,{files:Object.assign({},i.files,{readFiles:o})})}}},l=s.graphqlTemplates.READ,a={apolloConfig:i,templateName:l,pluralName:"Files",pagination:!1,params:{limit:"Int!",offset:"Int!",rootFilter:"FileFilterInput",childrenFilter:"FileFilterInput",sortBy:"[ChildrenSortInputType]"},args:{root:{filter:"rootFilter"},"root/edges/node/...on Folder/children":{limit:"limit",offset:"offset",filter:"childrenFilter",sortBy:"sortBy"}},fragments:["FileInterfaceFields","FileFields","FolderFields"],fields:["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...on Folder",["children",["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...FolderFields"]]],"parents",["id","title"]]]]]};t.default=a},"./client/src/state/files/unpublishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("unpublishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/gallery/GalleryActionTypes.js":function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["SET_LAST_SELECTED","SET_SELECTED_FILES","DESELECT_FILES","SELECT_FILES","LOAD_FILE_REQUEST","LOAD_FILE_SUCCESS","HIGHLIGHT_FILES","UPDATE_BATCH_ACTIONS","SET_NOTICE_MESSAGE","SET_ERROR_MESSAGE","SET_ENABLE_DROPZONE","SET_FILE_BADGE","CLEAR_FILE_BADGE","ACTIVATE_MODAL","DEACTIVATE_MODAL","CONCATENATE_SELECT","SET_LOADING"].reduce(function(e,t){return Object.assign(e,o({},t,"GALLERY."+t))},{})},"./client/src/state/gallery/GalleryActions.js":function(e,t,n){"use strict";function o(e){return function(t){t({type:_.default.SET_LAST_SELECTED,payload:{id:e}})}}function r(e){return function(t){t({type:_.default.SET_SELECTED_FILES,payload:{files:e}})}}function s(e,t){return function(n){n({type:_.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.SELECT_FILES,payload:{ids:e}})}}function l(e){return function(t){return t({type:_.default.CONCATENATE_SELECT,payload:!!e})}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.DESELECT_FILES,payload:{ids:e}})}}function u(e){return function(t){return t({type:_.default.SET_NOTICE_MESSAGE,payload:{message:e}})}}function d(e){return function(t){return t({type:_.default.SET_ERROR_MESSAGE,payload:{message:e}})}}function c(e){return function(t){return t({type:_.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})}}function p(e){return function(t){t({type:_.default.CLEAR_FILE_BADGE,payload:{id:e}})}}function f(e,t,n,o){return function(r,s){var i=s(),l=i.assetAdmin,a=l.gallery.badges.find(function(t){return t.id===e});a&&a.timer&&clearTimeout(a.timer);var u=o>0?setTimeout(function(){return p(e)(r)},o):null;r({type:_.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:u}})}}function h(e){return function(t){t({type:_.default.ACTIVATE_MODAL,payload:e})}}function m(){return function(e){e({type:_.default.DEACTIVATE_MODAL})}}function g(e){return function(t){t({type:_.default.SET_LOADING,payload:!!e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLastSelected=o,t.setSelectedFiles=r,t.loadFile=s,t.selectFiles=i,t.setConcatenateSelect=l,t.deselectFiles=a,t.setNoticeMessage=u,t.setErrorMessage=d,t.setEnableDropzone=c,t.clearFileBadge=p,t.setFileBadge=f,t.activateModal=h,t.deactivateModal=m,t.setLoading=g;var y=n("./client/src/state/gallery/GalleryActionTypes.js"),_=function(e){return e&&e.__esModule?e:{default:e}}(y)},"./client/src/state/gallery/GalleryReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,o=t.payload;switch(n){case u.default.SET_LAST_SELECTED:return s({},e,{lastSelected:o.id});case u.default.SET_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id}).concat([o])});case u.default.CLEAR_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id})});case u.default.SET_ENABLE_DROPZONE:return s({},e,{enableDropzone:o.enableDropzone});case u.default.SET_NOTICE_MESSAGE:return s({},e,{noticeMessage:o.message});case u.default.SET_ERROR_MESSAGE:return s({},e,{errorMessage:o.message});case u.default.LOAD_FILE_SUCCESS:var r=e.files.find(function(e){return e.id===o.id});if(r){var i=s({},r,o.file);return(0,l.default)(s({},e,{files:e.files.map(function(e){return e.id===i.id?i:e})}))}return e.folder.id===o.id?(0,l.default)(s({},e,{folder:s({},e.folder,o.file)})):e;case u.default.SET_SELECTED_FILES:return(0,l.default)(s({},e,{selectedFiles:Array.isArray(o.files)?o.files:[]}));case u.default.SELECT_FILES:var a=null;return a=null===o.ids?e.files.map(function(e){return e.id}):e.selectedFiles.concat(o.ids.filter(function(t){return-1===e.selectedFiles.indexOf(t)})),(0,l.default)(s({},e,{selectedFiles:a}));case u.default.DESELECT_FILES:var d=null;return d=null===o.ids?[]:e.selectedFiles.filter(function(e){return-1===o.ids.indexOf(e)}),(0,l.default)(s({},e,{selectedFiles:d}));case u.default.ACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:o}));case u.default.DEACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:null}));case u.default.CONCATENATE_SELECT:return(0,l.default)(s({},e,{concatenateSelect:o}));case u.default.SET_LOADING:return(0,l.default)(s({},e,{loading:o}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p;r(this,e),this.options=s({},c,t),this.factory=n}return i(e,[{key:"loadImage",value:function(e){return this.options.minRetry&&d.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}},{key:"loadImageLoop",value:function(e,t){var n=this;return this.options.onStatusChange(e,a.default.LOADING),new Promise(function(t,o){return n.factory(e,t,o)}).then(function(){return n.handleSuccess(e)}).catch(function(){return n.handleError(e,t)})}},{key:"handleReset",value:function(e,t){this.options.onReset(e),t()}},{key:"handleTimeout",value:function(e,t){var n=setTimeout(e,t);return this.options.onTimeout(n,t),n}},{key:"handleSuccess",value:function(e){d.default.unlock(e),this.options.onStatusChange(e,a.default.SUCCESS)}},{key:"handleFailure",value:function(e){var t=this;return d.default.unlock(e),this.options.onStatusChange(e,a.default.FAILED),this.options.expiry?new Promise(function(n){t.handleTimeout(function(){return t.handleReset(e,n)},1e3*t.options.expiry)}):null}},{key:"handleError",value:function(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,a.default.WAITING),this.handleRetry(e,t))}},{key:"handleRetry",value:function(e,t){var n=this,o=new Promise(function(o){n.handleTimeout(function(){return o(n.loadImageLoop(e,2*t))},1e3*t)});return this.options.onRetry(e,t,o),o}},{key:"setOnRetry",value:function(e){this.options.onRetry=e}},{key:"setOnReset",value:function(e){this.options.onReset=e}},{key:"setOnStatusChange",value:function(e){this.options.onStatusChange=e}},{key:"setOnTimeout",value:function(e){this.options.onTimeout=e}}]),e}();t.defaultImageFactory=p,t.default=f},"./client/src/state/imageLoad/ImageLoadActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},"./client/src/state/imageLoad/ImageLoadActions.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return function(n,o){if(!e)return null;if(o().assetAdmin.imageLoad.files.find(function(t){return t.url===e}))return null;var r=s({},t,{onStatusChange:function(e,t){return n({type:l.default.SET_STATUS,payload:{status:t,url:e}})},onReset:function(e){return n({type:l.default.RESET,payload:{url:e}})}});return new u.default(r).loadImage(e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||(this.urls=[].concat(o(this.urls),[e]),0))}},{key:"unlock",value:function(e){this.urls=this.urls.filter(function(t){return t!==e})}}]),e}();window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new i,t.Component=i,t.default=window.ss.imagelocker},"./client/src/state/imageLoad/ImageLoadReducer.js":function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;switch(n){case l.default.SET_STATUS:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})),[r])});case l.default.RESET:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PREVIEWFIELD_ADD_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,t.payload.file)));case u.default.PREVIEWFIELD_FAIL_UPLOAD:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.message))));case u.default.PREVIEWFIELD_REMOVE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,void 0)));case u.default.PREVIEWFIELD_UPDATE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.data))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),l=o(i),a=n("./client/src/state/previewField/PreviewFieldActionTypes.js"),u=o(a),d={};t.default=s},"./client/src/state/queuedFiles/QueuedFilesActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ADD_QUEUED_FILE:"ADD_QUEUED_FILE",FAIL_UPLOAD:"FAIL_UPLOAD",PURGE_UPLOAD_QUEUE:"PURGE_UPLOAD_QUEUE",REMOVE_QUEUED_FILE:"REMOVE_QUEUED_FILE",SUCCEED_UPLOAD:"SUCCEED_UPLOAD",UPDATE_QUEUED_FILE:"UPDATE_QUEUED_FILE"}},"./client/src/state/queuedFiles/QueuedFilesActions.js":function(e,t,n){"use strict";function o(e){return function(t){return t({type:d.default.ADD_QUEUED_FILE,payload:{file:e}})}}function r(e,t){return function(n){var o=t.message;return t.errors&&t.errors.length&&(o=t.errors[0]),"string"==typeof t&&(o={value:t,type:"error"}),n({type:d.default.FAIL_UPLOAD,payload:{queuedId:e,message:o}})}}function s(){return function(e){return e({type:d.default.PURGE_UPLOAD_QUEUE,payload:null})}}function i(e){return function(t){return t({type:d.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})}}function l(e,t){return function(n){return n({type:d.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})}}function a(e,t){return function(n){return n({type:d.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.addQueuedFile=o,t.failUpload=r,t.purgeUploadQueue=s,t.removeQueuedFile=i,t.succeedUpload=l,t.updateQueuedFile=a;var u=n("./client/src/state/queuedFiles/QueuedFilesActionTypes.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(u)},"./client/src/state/queuedFiles/QueuedFilesReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:m,t=arguments[1];switch(t.type){case d.default.ADD_QUEUED_FILE:return(0,a.default)(i({},e,{items:[].concat(r(e.items),[i({},p.default,t.payload.file)])}));case d.default.FAIL_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,{message:t.payload.message}):e})}));case d.default.PURGE_UPLOAD_QUEUE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return!e.id})}));case d.default.REMOVE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return e.queuedId!==t.payload.queuedId})}));case d.default.SUCCEED_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.json,{messages:[{value:h.default._t("AssetAdmin.DROPZONE_SUCCESS_UPLOAD"),type:"success",extraClass:"success"}]}):e})}));case d.default.UPDATE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.updates):e})}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1],n=(0,p.default)(e,t,h);switch(t.type){case a.default.UPLOADFIELD_ADD_FILE:return n(function(e){return e.files.find(function(e){return e.id===t.payload.file.id})?e:i({},e,{files:[].concat(r(e.files),[i({},d.default,t.payload.file)])})});case a.default.UPLOADFIELD_SET_FILES:return n(function(){return{files:t.payload.files}});case a.default.UPLOADFIELD_UPLOAD_FAILURE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,{message:t.payload.message}):e})}});case a.default.UPLOADFIELD_REMOVE_FILE:return n(function(e){return{files:e.files.filter(function(e){return!(t.payload.file.queuedId&&e.queuedId===t.payload.file.queuedId||t.payload.file.id&&e.id===t.payload.file.id)})}});case a.default.UPLOADFIELD_UPLOAD_SUCCESS:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.json):e})}});case a.default.UPLOADFIELD_UPDATE_QUEUED_FILE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.updates):e})}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0?s.default._t("AssetAdmin.UPDATE_FILE","Update file"):s.default._t("AssetAdmin.INSERT_FILE","Insert file");return e.mutateField("action_insert",function(e){return o({},e,{title:r||e.title})}),e.getState()};t.default=i},"./client/src/transforms/FormAction/ownerAwareUnpublish.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?[a.default.inject(a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_1","This file is being used in {count} other published section(s)."),{count:r}),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_2","Ensure files are removed from content areas prior to unpublishing them. Otherwise, they will appear as broken links."),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_3","Do you want to unpublish this file anyway?")].join("\n\n"):a.default._t("AssetAdmin.CONFIRMUNPUBLISH","Are you sure you want to unpublish this record?"),confirm(s)?n(e,o):e.preventDefault()}});return i.default.createElement(e,o)}};t.default=u},"./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disabledTreeDropdownField=void 0;var o=Object.assign||function(e){for(var t=1;t1?n-1:0),r=1;r=s.length)break;l=s[i++],l.apply(this,o)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var o=0;o=n.length)break;r=n[o++];var s=r;if(/(^| )dz-message($| )/.test(s.className)){e=s,s.className="dz-message";break}}e||(e=t.createElement('
'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,o){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;null==t&&null==n?(t=r.srcWidth,n=r.srcHeight):null==t?t=n*s:null==n&&(n=t/s),t=Math.min(t,r.srcWidth),n=Math.min(n,r.srcHeight);var i=t/n;if(r.srcWidth>t||r.srcHeight>n)if("crop"===o)s>i?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*i):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/i);else{if("contain"!==o)throw new Error("Unknown resizeMethod '"+o+"'");s>i?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var o=e.previewElement.querySelectorAll("[data-dz-name]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;i.textContent=e.name}for(var l=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=l;!(a>=l.length);)i=l[a++],i.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink));for(var u=function(o){return o.preventDefault(),o.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)},d=e.previewElement.querySelectorAll("[data-dz-remove]"),c=0,d=d;;){var p;if(c>=d.length)break;p=d[c++],p.addEventListener("click",u)}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(var n=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;s.alt=e.name,s.src=t}return setTimeout(function(){return e.previewElement.classList.add("dz-image-preview")},1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);for(var n=e.previewElement.querySelectorAll("[data-dz-errormessage]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++],r.textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement)for(var o=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;"PROGRESS"===i.nodeName?i.value=t:i.style.width=t+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.length)break;i=r[s++];var l=i;for(var a in l){var u=l[a];e[a]=u}}return e}}]),l(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(e){return e.accepted}).map(function(e){return e})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(e){return!e.accepted}).map(function(e){return e})}},{key:"getFilesWithStatus",value:function(e){return this.files.filter(function(t){return t.status===e}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===t.UPLOADING||e.status===t.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t=e.hiddenFileInput.files;if(t.length)for(var o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;e.addFile(i)}return e.emit("addedfiles",t),n()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var n=this.events,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;this.on(s,this.options[s])}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var i=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return i(t),e.emit("dragenter",t)},dragover:function(t){var n=void 0;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return i(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach(function(n){return e.listeners.push({element:n,events:{click:function(o){return(n!==e.element||o.target===e.element||t.elementInside(o.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,n=0;if(this.getActiveFiles().length){for(var o=this.getActiveFiles(),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;t+=i.upload.bytesSent,n+=i.upload.total}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e=void 0,n=void 0;if(e=this.getExistingFallback())return e;var o='
';this.options.dictFallbackText&&(o+="

"+this.options.dictFallbackText+"

"),o+='
';var r=t.createElement(o);return"FORM"!==this.element.tagName?(n=t.createElement('
'),n.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:r}},{key:"getExistingFallback",value:function(){for(var e=["div","form"],t=0;t=t.length)break;o=t[n++];var r=o;if(/(^| )fallback($| )/.test(r.className))return r}}(this.element.getElementsByTagName(o)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.addEventListener(n,o,!1))}return t}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.removeEventListener(n,o,!1))}return t}()})}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(t){return e.cancelUpload(t)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var o=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),n=s;break}}t=Math.round(10*t)/10}return""+t+" "+this.options.dictFileSizeUnits[n]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n=t.length)break;o=t[n++];var r=o;this.addFile(r)}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){for(var n=[],o=e,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i,l=s;null!=l.webkitGetAsEntry&&(i=l.webkitGetAsEntry())?i.isFile?n.push(t.addFile(l.getAsFile())):i.isDirectory?n.push(t._addFilesFromDirectory(i,i.name)):n.push(void 0):null==l.getAsFile||null!=l.kind&&"file"!==l.kind?n.push(void 0):n.push(t.addFile(l.getAsFile()))}return n}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,o=e.createReader(),r=function(e){return i(console,"log",function(t){return t.log(e)})};return function e(){return o.readEntries(function(o){if(o.length>0){for(var r=o,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.isFile?l.file(function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=t+"/"+e.name,n.addFile(e)}):l.isDirectory&&n._addFilesFromDirectory(l,t+"/"+l.name)}e()}return null},r)}()}},{key:"accept",value:function(e,n){return this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){for(var t=e,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;this.enqueueFile(r)}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return n.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(){return t._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=d(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var n=this.files.slice(),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;(s.status!==t.UPLOADING||e)&&this.removeFile(s)}return null}},{key:"resizeImage",value:function(e,n,o,r,s){var i=this;return this.createThumbnail(e,n,o,r,!0,function(n,o){if(null==o)return s(e);var r=i.options.resizeMimeType;null==r&&(r=e.type);var l=o.toDataURL(r,i.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(l=h.restore(e.dataURL,l)),s(t.dataURItoBlob(l))})}},{key:"createThumbnail",value:function(e,t,n,o,r,s){var i=this,l=new FileReader;return l.onload=function(){return e.dataURL=l.result,"image/svg+xml"===e.type?void(null!=s&&s(l.result)):i.createThumbnailFromUrl(e,t,n,o,r,s)},l.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(e,t,n,o,r,s,i){var l=this,a=document.createElement("img");return i&&(a.crossOrigin=i),a.onload=function(){var i=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(i=function(e){return EXIF.getData(a,function(){return e(EXIF.getTag(this,"Orientation"))})}),i(function(r){e.width=a.width,e.height=a.height;var i=l.options.resize.call(l,e,t,n,o),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=i.trgWidth,u.height=i.trgHeight,r>4&&(u.width=i.trgHeight,u.height=i.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.width);break;case 7:d.rotate(.5*Math.PI),d.translate(u.height,-u.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.height,0)}f(d,a,null!=i.srcX?i.srcX:0,null!=i.srcY?i.srcY:0,i.srcWidth,i.srcHeight,null!=i.trgX?i.trgX:0,null!=i.trgY?i.trgY:0,i.trgWidth,i.trgHeight);var c=u.toDataURL("image/png");if(null!=s)return s(c,u)})},null!=s&&(a.onerror=s),a.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var o=this.getQueuedFiles();if(o.length>0){if(this.options.uploadMultiple)return this.processFiles(o.slice(0,e-t));for(;n=n.length)break;r=n[o++];var s=r;s.processing=!0,s.status=t.UPLOADING,this.emit("processing",s)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter(function(t){return t.xhr===e}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var n=this._getFilesWithXhr(e.xhr),o=n,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++],s.status=t.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var i=n,l=0,i=i;;){var a;if(l>=i.length)break;a=i[l++];var u=a;this.emit("canceled",u)}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.upload.totalChunkCount)){i++;var l=o*n.options.chunkSize,a=Math.min(l+n.options.chunkSize,r.size),u={name:n._getParamName(0),data:s.webkitSlice?s.webkitSlice(l,a):s.slice(l,a),filename:r.upload.filename,chunkIndex:o};r.upload.chunks[o]={file:r,index:o,dataBlock:u,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[u])}};if(r.upload.finishedChunkUpload=function(o){var s=!0;o.status=t.SUCCESS,o.dataBlock=null,o.xhr=null;for(var i=0;i=s.length)break;l=s[i++],l.xhr=r}e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,e),u=this.resolveOption(this.options.url,e);r.open(a,u,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){o._finishedUploading(e,r,t)},r.onerror=function(){o._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return o._updateFilesUploadProgress(e,r,t)};var d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&t.extend(d,this.options.headers);for(var c in d){var p=d[c];p&&r.setRequestHeader(c,p)}var f=new FormData;if(this.options.params){var h=this.options.params;"function"==typeof h&&(h=h.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null));for(var m in h){var g=h[m];f.append(m,g)}}for(var y=e,_=0,y=y;;){var v;if(_>=y.length)break;v=y[_++];var b=v;this.emit("sending",b,r,f)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,f),this._addFormElementData(f);for(var E=0;E=t.length)break;o=t[n++];var r=o,s=r.getAttribute("name"),i=r.getAttribute("type");if(i&&(i=i.toLowerCase()),void 0!==s&&null!==s)if("SELECT"===r.tagName&&r.hasAttribute("multiple"))for(var l=r.options,a=0,l=l;;){var u;if(a>=l.length)break;u=l[a++];var d=u;d.selected&&e.append(s,d.value)}else(!i||"checkbox"!==i&&"radio"!==i||r.checked)&&e.append(s,r.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var o=void 0;if(void 0!==n){if(o=100*n.loaded/n.total,e[0].upload.chunked){var r=e[0],s=this._getChunk(r,t);s.progress=o,s.total=n.total,s.bytesSent=n.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var i=0;i=l.length)break;u=l[a++];var d=u;d.upload.progress=o,d.upload.total=n.total,d.upload.bytesSent=n.loaded}for(var c=e,p=0,c=c;;){var f;if(p>=c.length)break;f=c[p++];var h=f;this.emit("uploadprogress",h,h.upload.progress,h.upload.bytesSent)}}else{var m=!0;o=100;for(var g=e,y=0,g=g;;){var _;if(y>=g.length)break;_=g[y++];var v=_;100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(m=!1),v.upload.progress=o,v.upload.bytesSent=v.upload.total}if(m)return;for(var b=e,E=0,b=b;;){var S;if(E>=b.length)break;S=b[E++];var j=S;this.emit("uploadprogress",j,o,j.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,n,o){var r=void 0;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){o=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,r,o):this._handleUploadError(e,n,r)}}},{key:"_handleUploadError",value:function(e,n,o){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],n);if(r.retries++=s.length);)s[i++],this._errorProcessing(e,o||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.SUCCESS,this.emit("success",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.ERROR,this.emit("error",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}]),t}(a);u.initClass(),u.version="5.5.1",u.options={},u.optionsForElement=function(e){return e.getAttribute("id")?u.options[c(e.getAttribute("id"))]:void 0},u.instances=[],u.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},u.autoDiscover=!0,u.discover=function(){var e=void 0;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){for(var n=[],o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;/(^| )dropzone($| )/.test(i.className)?n.push(e.push(i)):n.push(void 0)}return n}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){for(var t=[],n=e,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;!1!==u.optionsForElement(s)?t.push(new u(s)):t.push(void 0)}return t}()},u.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],u.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=u.blacklistedBrowsers,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;r.test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},u.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),r=new Uint8Array(o),s=0,i=t.length,l=0<=i;l?s<=i:s>=i;l?s++:s--)r[s]=t.charCodeAt(s);return new Blob([o],{type:n})};var d=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},c=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};u.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},u.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},u.getElement=function(e,t){var n=void 0;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},u.getElements=function(e,t){var n=void 0,o=void 0;if(e instanceof Array){o=[];try{for(var r=e,s=0,r=r;!(s>=r.length);)n=r[s++],o.push(this.getElement(n,t))}catch(e){o=null}}else if("string"==typeof e){o=[];for(var i=document.querySelectorAll(e),l=0,i=i;!(l>=i.length);)n=i[l++],o.push(n)}else null!=e.nodeType&&(o=[e]);if(null==o||!o.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},u.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},u.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var n=e.type,o=n.replace(/\/.*$/,""),r=t,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;if(l=l.trim(),"."===l.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(l.toLowerCase(),e.name.length-l.length))return!0}else if(/\/\*$/.test(l)){if(o===l.replace(/\/.*$/,""))return!0}else if(n===l)return!0}return!1},void 0!==e&&null!==e&&(e.fn.dropzone=function(e){return this.each(function(){return new u(this,e)})}),void 0!==t&&null!==t?t.exports=u:window.Dropzone=u,u.ADDED="added",u.QUEUED="queued",u.ACCEPTED=u.QUEUED,u.UPLOADING="uploading",u.PROCESSING=u.UPLOADING,u.CANCELED="canceled",u.ERROR="error",u.SUCCESS="success";var p=function(e){var t=(e.naturalWidth,e.naturalHeight),n=document.createElement("canvas");n.width=1,n.height=t;var o=n.getContext("2d");o.drawImage(e,0,0);for(var r=o.getImageData(1,0,1,t),s=r.data,i=0,l=t,a=t;a>i;)0===s[4*(a-1)+3]?l=a:i=a,a=l+i>>1;var u=a/t;return 0===u?1:u},f=function(e,t,n,o,r,s,i,l,a,u){var d=p(t);return e.drawImage(t,n,o,r,s,i,l,a,u/d)},h=function(){function e(){r(this,e)}return l(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,o=void 0,r="",s=void 0,i=void 0,l=void 0,a="",u=0;n=e[u++],o=e[u++],r=e[u++],s=n>>2,i=(3&n)<<4|o>>4,l=(15&o)<<2|r>>6,a=63&r,isNaN(o)?l=a=64:isNaN(r)&&(a=64),t=t+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(a),n=o=r="",s=i=l=a="",ue.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,o="",r=void 0,s=void 0,i=void 0,l="",a=0,u=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(e.charAt(a++)),s=this.KEY_STR.indexOf(e.charAt(a++)),i=this.KEY_STR.indexOf(e.charAt(a++)),l=this.KEY_STR.indexOf(e.charAt(a++)),t=r<<2|s>>4,n=(15&s)<<4|i>>2,o=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(o),t=n=o="",r=s=i=l="",a0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var o=this.getColumnMetadataByName(e);return void 0===o||null===o?n:o.hasOwnProperty(t)?o[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,function(e){var n=l(t.columnMetadata,{columnName:e});return void 0===n||null===n||isNaN(n.order)?100:n.order})}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=r({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),o.createElement("div",null)):o.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=s},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t0&&(e=o.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=o.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,r=null,i=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},l),r=s({textAlign:"center",width:"33%"},l),n=s({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(o.createElement("option",{value:u,key:u},u));return o.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},o.createElement("div",{className:this.props.previousClassName,style:n},e),o.createElement("div",{className:"griddle-page",style:r},o.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),o.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/deep.js")),i=n("./node_modules/lodash/isFunction.js"),l=n("./node_modules/lodash/zipObject.js"),a=n("./node_modules/lodash/assign.js"),u=n("./node_modules/lodash/defaults.js"),d=n("./node_modules/lodash/toPairs.js"),c=n("./node_modules/lodash/without.js"),p=r({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var r=this.props.columnSettings.getColumns(),p=l(r,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(s.pick(f,c(r,"children"))),y=g.map(function(t,r){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===r&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===r&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===r&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==i&&null!==i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=o.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},u)}else s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},l,e.formatData(t[1]));return s||o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:r,style:n},l,t[1])});null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),y&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection&&(this.props.multipleSelectionSettings.getSelectedRowIds(),y.unshift(o.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},o.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"}))));var _=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?_="child-row":t.props.hasChildren&&(_=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),o.createElement("tr",{onClick:h,className:_},y)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/lodash/pick.js")),i=r({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return o.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(o.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var r=null;return e.state.showChildren&&(r=e.props.hasChildren&&this.props.data.children.map(function(t,n){var r=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return o.createElement("tr",{key:r,style:{paddingLeft:5}},o.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},o.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return o.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:r})})),!1===e.props.hasChildren?t[0]:o.createElement("tbody",null,e.state.showChildren?t.concat(r):t)}});e.exports=i},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/lodash/includes.js"),i=n("./node_modules/lodash/without.js"),l=n("./node_modules/lodash/find.js"),a=r({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,n){var r=s(e.props.selectedColumns,t),i=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(a=i.displayName),void 0!==i&&null!=i&&i.locked?o.createElement("div",{className:"column checkbox"},o.createElement("label",null,o.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:r,"data-name":t}),a)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:o.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},o.createElement("label",null,o.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:r,"data-name":t}),a))}));var n=e.props.enableToggleCustom?o.createElement("div",{className:"form-group"},o.createElement("label",{htmlFor:"maxRows"},o.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",r=this.props.showSetPageSize?o.createElement("div",null,o.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",o.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},o.createElement("option",{value:"5"},"5"),o.createElement("option",{value:"10"},"10"),o.createElement("option",{value:"25"},"25"),o.createElement("option",{value:"50"},"50"),o.createElement("option",{value:"100"},"100")))):"";return o.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},o.createElement("h6",null,this.props.settingsText),o.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),r,n)}});e.exports=a},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/griddle-react/modules/gridTitle.jsx.js"),i=n("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),l=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/rowProperties.js"),r({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var r={scrollTop:t,scrollHeight:n,clientHeight:o};this.setState(r)}.6*(n-(t+o)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,r=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var l=e.getAdjustedRowHeight(),a=Math.ceil(e.state.clientHeight/l),u=Math.max(0,Math.floor(e.state.scrollTop/l)-.25*a),d=Math.min(u+1.25*a,this.props.data.length-1);n=n.slice(u,d+1);var c={height:u*l+"px"};r=o.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};s=o.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map(function(n,r){var s=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,r);return s&&(t=s),o.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:l+"-container",uniqueId:l,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})});if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(o.createElement("tr",{key:"no-data-section"},o.createElement("td",{colSpan:h},this.props.noDataSection)))}return r&&f.unshift(r),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var r=null,i=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(r={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a=null,u=null;this.props.useGriddleStyles&&(a={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?o.createElement(this.props.externalLoadingComponent,null):o.createElement("div",null,"Loading...");i=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{style:a,colSpan:u},d)))}var c=this.props.showTableHeading?o.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=o.createElement("tbody",null,e));var p=o.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(l.tableLayout="fixed"),o.createElement("div",null,o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,i,p)))):o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,i,p))}}));e.exports=l},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t=0)return!0;return!1})},defaultColumnFilter:function(e,t,n){var o=P(I(n)?n:[n],function(e){return(e||"").toLowerCase()});return M(v.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),M(o,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce(function(n,o){return T(n,function(n){var r=v.getAt(n,o||""),s=e[o];return t(o||"",r,s)})},this.props.results),o={columnFilters:e};e?(o.filteredResults=n,o.maxPage=this.getMaxPage(o.filteredResults)):this.state.filter?o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):o.filteredResults=null,this.setState(o)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=k(n,t);else{var o={};o[t]=e,n=D({},n,o)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var n=this,o={page:0,filter:e};o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),o.maxPage=n.getMaxPage(o.filteredResults),(x(e)||A(e)||F(e))&&(o.filter=e,o.filteredResults=null),n.setState(o),this._resetSelectedRows()},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return void 0===e||null===e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,n={page:e};t.setState(n)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=I(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=S(this.props.columnMetadata,{columnName:e})||{},o=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],r=null,s=o.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);s=(s+1)%o.length,r=o[s]?o[s]:null;var i={page:0,sortColumn:e,sortDirection:r};this.setState(i)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=v.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,n){return e===t[n]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,P(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new y(this.props.results.length>0?v.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new _(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var o=this,r=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:i}),a={columns:[],orders:[]};if(l.length>0&&(s=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort(function(e,t){return s(R(e,i),R(t,i))}),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=N(e,function(e){return s(R(e,i))},[this.state.sortDirection]));else{var u=[function(e){return(R(e,i)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach(function(e,t){u.push(function(t){return(R(t,e)||"").toString().toLowerCase()}),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(o.state.sortDirection)}),e=N(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=j(e,(c+1)*this.state.resultsPerPage);else{var p=b(e,c*this.state.resultsPerPage);e=(E||w)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=r.getDataForRender(m[r.props.childrenColumnName],t,!1),"children"!==r.props.childrenColumnName&&delete m[r.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),o=this;C(e,function(e){o._updateSelectedRowIds(e[o.props.uniqueIdentifier],n,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),o=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],o,t);var r=this._getAreAllRowsChecked(o,P(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:r,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,r)},_updateSelectedRowIds:function(e,t,n){n?void 0===S(t,function(t){return e===t})&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===O(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!S(this.props.results,function(e){return"children"in e})&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?r.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):r.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?r.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,o=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),o=this.getSettingsStyles(),s=this.getClearFixStyles()),r.createElement("div",{className:"top-section",style:s},r.createElement("div",{className:"griddle-filter",style:n},e),r.createElement("div",{className:"griddle-settings-toggle",style:o},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return r.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?r.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):r.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?r.createElement(d,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return r.createElement(this.props.customGridComponent,o({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,o,s){return r.createElement("div",null,r.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&o)},getStandardGridSection:function(e,t,n,o,s){var i=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return r.createElement("div",{className:"griddle-body"},r.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:o,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,o,r,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,o,s):this.getStandardGridSection(e,t,n,o,r)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?r.createElement("div",{className:this.props.noDataClassName},r.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):r.createElement(c,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),o=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),l=this.getDataForRender(e,i,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?C(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)}):s=v.keys(k(e[0],a)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",r.createElement("div",{className:m},o,h,r.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n-1}var r=n("./node_modules/lodash/_baseIndexOf.js");e.exports=o},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function n(e,t,n){for(var o=-1,r=null==e?0:e.length;++o=d&&(p=u,f=!1,t=new r(t));e:for(;++c0&&n(d)?t>1?o(d,t-1,n,i,l):r(l,d):i||(l[l.length]=d)}return l}var r=n("./node_modules/lodash/_arrayPush.js"),s=n("./node_modules/lodash/_isFlattenable.js");e.exports=o},"./node_modules/lodash/_baseFor.js":function(e,t,n){var o=n("./node_modules/lodash/_createBaseFor.js"),r=o();e.exports=r},"./node_modules/lodash/_baseForOwn.js":function(e,t,n){function o(e,t){return e&&r(e,t,s)}var r=n("./node_modules/lodash/_baseFor.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_baseGet.js":function(e,t,n){function o(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var _=-1,v=h[0];e:for(;++_r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++ot||i&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!s)return 1;if(!o&&!i&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}var r=n("./node_modules/lodash/_compareAscending.js");e.exports=o},"./node_modules/lodash/_copyArray.js":function(e,t){function n(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n1?n[r-1]:void 0,l=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,l&&s(n[0],n[1],l)&&(i=r<3?void 0:i,r=1),t=Object(t);++o-1?l[a?t[u]:u]:void 0}}var r=n("./node_modules/lodash/_baseIteratee.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_createToPairs.js":function(e,t,n){function o(e){return function(t){var n=s(t);return n==a?i(t):n==u?l(t):r(t,e(t))}}var r=n("./node_modules/lodash/_baseToPairs.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/_mapToArray.js"),l=n("./node_modules/lodash/_setToPairs.js"),a="[object Map]",u="[object Set]";e.exports=o},"./node_modules/lodash/_customOmitClone.js":function(e,t,n){function o(e){return r(e)?void 0:e}var r=n("./node_modules/lodash/isPlainObject.js");e.exports=o},"./node_modules/lodash/_defineProperty.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},"./node_modules/lodash/_equalArrays.js":function(e,t,n){function o(e,t,n,o,u,d){var c=n&l,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var h=d.get(e);if(h&&d.get(t))return h==t;var m=-1,g=!0,y=n&a?new r:void 0;for(d.set(e,t),d.set(t,e);++m-1&&e%1==0&&e-1}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_listCacheSet.js":function(e,t,n){function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_mapCacheClear.js":function(e,t,n){function o(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}var r=n("./node_modules/lodash/_Hash.js"),s=n("./node_modules/lodash/_ListCache.js"),i=n("./node_modules/lodash/_Map.js");e.exports=o},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,n){function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheGet.js":function(e,t,n){function o(e){return r(this,e).get(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheHas.js":function(e,t,n){function o(e){return r(this,e).has(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheSet.js":function(e,t,n){function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapToArray.js":function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}e.exports=n},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function n(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},"./node_modules/lodash/_memoizeCapped.js":function(e,t,n){function o(e){var t=r(e,function(e){return n.size===s&&n.clear(),e}),n=t.cache;return t}var r=n("./node_modules/lodash/memoize.js"),s=500;e.exports=o},"./node_modules/lodash/_nativeCreate.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=o(Object,"create");e.exports=r},"./node_modules/lodash/_nativeKeys.js":function(e,t,n){var o=n("./node_modules/lodash/_overArg.js"),r=o(Object.keys,Object);e.exports=r},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},"./node_modules/lodash/_nodeUtil.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_freeGlobal.js"),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i&&o.process,a=function(){try{return s&&s.require&&s.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=a}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},"./node_modules/lodash/_overArg.js":function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},"./node_modules/lodash/_overRest.js":function(e,t,n){function o(e,t,n){return t=s(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,l=s(o.length-t,0),a=Array(l);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,r=16,s=Date.now;e.exports=n},"./node_modules/lodash/_stackClear.js":function(e,t,n){function o(){this.__data__=new r,this.size=0}var r=n("./node_modules/lodash/_ListCache.js");e.exports=o},"./node_modules/lodash/_stackDelete.js":function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},"./node_modules/lodash/_stackGet.js":function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},"./node_modules/lodash/_stackHas.js":function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},"./node_modules/lodash/_stackSet.js":function(e,t,n){function o(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(o=1);++n-1:!!d&&r(e,t,n)>-1}var r=n("./node_modules/lodash/_baseIndexOf.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/isString.js"),l=n("./node_modules/lodash/toInteger.js"),a=n("./node_modules/lodash/values.js"),u=Math.max;e.exports=o},"./node_modules/lodash/initial.js":function(e,t,n){function o(e){return(null==e?0:e.length)?r(e,0,-1):[]}var r=n("./node_modules/lodash/_baseSlice.js");e.exports=o},"./node_modules/lodash/intersection.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseIntersection.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_castArrayLikeObject.js"),l=s(function(e){var t=o(e,i);return t.length&&t[0]===e[0]?r(t):[]});e.exports=l},"./node_modules/lodash/isArguments.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsArguments.js"),r=n("./node_modules/lodash/isObjectLike.js"),s=Object.prototype,i=s.hasOwnProperty,l=s.propertyIsEnumerable,a=o(function(){return arguments}())?o:function(e){return r(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},"./node_modules/lodash/isArray.js":function(e,t){var n=Array.isArray;e.exports=n},"./node_modules/lodash/isArrayLike.js":function(e,t,n){function o(e){return null!=e&&s(e.length)&&!r(e)}var r=n("./node_modules/lodash/isFunction.js"),s=n("./node_modules/lodash/isLength.js");e.exports=o},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,n){function o(e){return s(e)&&r(e)}var r=n("./node_modules/lodash/isArrayLike.js"),s=n("./node_modules/lodash/isObjectLike.js");e.exports=o},"./node_modules/lodash/isBuffer.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_root.js"),r=n("./node_modules/lodash/stubFalse.js"),s="object"==typeof t&&t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===s,a=l?o.Buffer:void 0,u=a?a.isBuffer:void 0,d=u||r;e.exports=d}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,n){function o(e){if(null==e)return!0;if(a(e)&&(l(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=s(e);if(t==p||t==f)return!e.size;if(d(e))return!r(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}var r=n("./node_modules/lodash/_baseKeys.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/isArguments.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/isArrayLike.js"),u=n("./node_modules/lodash/isBuffer.js"),d=n("./node_modules/lodash/_isPrototype.js"),c=n("./node_modules/lodash/isTypedArray.js"),p="[object Map]",f="[object Set]",h=Object.prototype,m=h.hasOwnProperty;e.exports=o},"./node_modules/lodash/isFunction.js":function(e,t,n){function o(e){if(!s(e))return!1;var t=r(e);return t==l||t==a||t==i||t==u}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObject.js"),i="[object AsyncFunction]",l="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=o},"./node_modules/lodash/isLength.js":function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=n},"./node_modules/lodash/isMap.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsMap.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isMap,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isNull.js":function(e,t){function n(e){return null===e}e.exports=n},"./node_modules/lodash/isObject.js":function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},"./node_modules/lodash/isObjectLike.js":function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},"./node_modules/lodash/isPlainObject.js":function(e,t,n){function o(e){if(!i(e)||r(e)!=l)return!1;var t=s(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==p}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/_getPrototype.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object Object]",a=Function.prototype,u=Object.prototype,d=a.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=o},"./node_modules/lodash/isSet.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsSet.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isSet,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isString.js":function(e,t,n){function o(e){return"string"==typeof e||!s(e)&&i(e)&&r(e)==l}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isArray.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object String]";e.exports=o},"./node_modules/lodash/isSymbol.js":function(e,t,n){function o(e){return"symbol"==typeof e||s(e)&&r(e)==i}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObjectLike.js"),i="[object Symbol]";e.exports=o},"./node_modules/lodash/isTypedArray.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsTypedArray.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isTypedArray,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isUndefined.js":function(e,t){function n(e){return void 0===e}e.exports=n},"./node_modules/lodash/keys.js":function(e,t,n){function o(e){return i(e)?r(e):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeys.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/keysIn.js":function(e,t,n){function o(e){return i(e)?r(e,!0):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeysIn.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/last.js":function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},"./node_modules/lodash/map.js":function(e,t,n){function o(e,t){return(l(e)?r:i)(e,s(t,3))}var r=n("./node_modules/lodash/_arrayMap.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseMap.js"),l=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/memoize.js":function(e,t,n){function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],s=n.cache;if(s.has(r))return s.get(r);var i=e.apply(this,o);return n.cache=s.set(r,i)||s,i};return n.cache=new(o.Cache||r),n}var r=n("./node_modules/lodash/_MapCache.js"),s="Expected a function";o.Cache=r,e.exports=o},"./node_modules/lodash/omit.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseClone.js"),s=n("./node_modules/lodash/_baseUnset.js"),i=n("./node_modules/lodash/_castPath.js"),l=n("./node_modules/lodash/_copyObject.js"),a=n("./node_modules/lodash/_customOmitClone.js"),u=n("./node_modules/lodash/_flatRest.js"),d=n("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=o(t,function(t){return t=i(t,e),u||(u=t.length>1),t}),l(e,d(e),n),u&&(n=r(n,7,a));for(var c=t.length;c--;)s(n,t[c]);return n});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,n){function o(e,t,n,o){return null==e?[]:(s(t)||(t=null==t?[]:[t]),n=o?void 0:n,s(n)||(n=null==n?[]:[n]),r(e,t,n))}var r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/pick.js":function(e,t,n){var o=n("./node_modules/lodash/_basePick.js"),r=n("./node_modules/lodash/_flatRest.js"),s=r(function(e,t){return null==e?{}:o(e,t)});e.exports=s},"./node_modules/lodash/property.js":function(e,t,n){function o(e){return i(e)?r(l(e)):s(e)}var r=n("./node_modules/lodash/_baseProperty.js"),s=n("./node_modules/lodash/_basePropertyDeep.js"),i=n("./node_modules/lodash/_isKey.js"),l=n("./node_modules/lodash/_toKey.js");e.exports=o},"./node_modules/lodash/some.js":function(e,t,n){function o(e,t,n){var o=l(e)?r:i;return n&&a(e,t,n)&&(t=void 0),o(e,s(t,3))}var r=n("./node_modules/lodash/_arraySome.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseSome.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/_isIterateeCall.js");e.exports=o},"./node_modules/lodash/sortBy.js":function(e,t,n){var o=n("./node_modules/lodash/_baseFlatten.js"),r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_isIterateeCall.js"),l=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,o(t,1),[])});e.exports=l},"./node_modules/lodash/stubArray.js":function(e,t){function n(){return[]}e.exports=n},"./node_modules/lodash/stubFalse.js":function(e,t){function n(){return!1}e.exports=n},"./node_modules/lodash/take.js":function(e,t,n){function o(e,t,n){return e&&e.length?(t=n||void 0===t?1:s(t),r(e,0,t<0?0:t)):[]}var r=n("./node_modules/lodash/_baseSlice.js"),s=n("./node_modules/lodash/toInteger.js");e.exports=o},"./node_modules/lodash/toFinite.js":function(e,t,n){function o(e){return e?(e=r(e))===s||e===-s?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}var r=n("./node_modules/lodash/toNumber.js"),s=1/0,i=1.7976931348623157e308;e.exports=o},"./node_modules/lodash/toInteger.js":function(e,t,n){function o(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}var r=n("./node_modules/lodash/toFinite.js");e.exports=o},"./node_modules/lodash/toNumber.js":function(e,t,n){function o(e){if("number"==typeof e)return e;if(s(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=u.test(e);return n||d.test(e)?c(e.slice(2),n?2:8):a.test(e)?i:+e}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/isSymbol.js"),i=NaN,l=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=o},"./node_modules/lodash/toPairs.js":function(e,t,n){var o=n("./node_modules/lodash/_createToPairs.js"),r=n("./node_modules/lodash/keys.js"),s=o(r);e.exports=s},"./node_modules/lodash/toString.js":function(e,t,n){function o(e){return null==e?"":r(e)}var r=n("./node_modules/lodash/_baseToString.js");e.exports=o},"./node_modules/lodash/uniqueId.js":function(e,t,n){function o(e){var t=++s;return r(e)+t}var r=n("./node_modules/lodash/toString.js"),s=0;e.exports=o},"./node_modules/lodash/values.js":function(e,t,n){function o(e){return null==e?[]:r(e,s(e))}var r=n("./node_modules/lodash/_baseValues.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/without.js":function(e,t,n){var o=n("./node_modules/lodash/_baseDifference.js"),r=n("./node_modules/lodash/_baseRest.js"),s=n("./node_modules/lodash/isArrayLikeObject.js"),i=r(function(e,t){return s(e)?o(e,t):[]});e.exports=i},"./node_modules/lodash/zipObject.js":function(e,t,n){function o(e,t){return s(e||[],t||[],r)}var r=n("./node_modules/lodash/_assignValue.js"),s=n("./node_modules/lodash/_baseZipObject.js");e.exports=o},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,a=o(e),u=1;u1)for(var n=1;n1?t-1:0),o=1;o2?n-2:0),r=2;r1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function v(e){function t(t,n,o,r,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var i=t[n],a=w(i);if("object"!==a)return new f("Invalid "+r+" `"+s+"` of type `"+a+"` supplied to `"+o+"`, expected an object.");for(var d in i)if(u(i,d)){var c=e(i,d,o,r,s+"."+d,l);if(c instanceof Error)return c}return null}return h(t)}function b(e){function n(t,n,o,r,s){for(var i=0;in+l||t+r-ao+i)};t.default=function(e,t,n){var o=e instanceof HTMLElement?(0,r.default)(e):e,i=t instanceof HTMLElement?(0,r.default)(t):t;return s(o.top,o.left,i.top,i.left,o.offsetWidth,o.offsetHeight,i.offsetWidth,i.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function o(t){var n=m,o=g;return m=g=void 0,E=t,_=e.apply(o,n)}function s(e){return E=e,v=setTimeout(d,t),w?o(e):_}function i(e){var n=e-b,o=e-E,r=t-n;return O?j(r,y-o):r}function a(e){var n=e-b,o=e-E;return void 0===b||n>=t||n<0||O&&o>=y}function d(){var e=C();if(a(e))return c(e);v=setTimeout(d,i(e))}function c(e){return v=void 0,I&&m?o(e):(m=g=void 0,_)}function p(){void 0!==v&&clearTimeout(v),E=0,m=b=g=v=void 0}function f(){return void 0===v?_:c(C())}function h(){var e=C(),n=a(e);if(m=arguments,g=this,b=e,n){if(void 0===v)return s(b);if(O)return v=setTimeout(d,t),o(b)}return void 0===v&&(v=setTimeout(d,t)),_}var m,g,y,_,v,b,E=0,w=!1,O=!1,I=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,r(n)&&(w=!!n.leading,O="maxWait"in n,y=O?S(l(n.maxWait)||0,t):y,I="trailing"in n?!!n.trailing:I),h.cancel=p,h.flush=f,h}function o(e,t,o){var s=!0,i=!0;if("function"!=typeof e)throw new TypeError(u);return r(o)&&(s="leading"in o?!!o.leading:s,i="trailing"in o?!!o.trailing:i),n(e,t,{leading:s,maxWait:t,trailing:i})}function r(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function i(e){return"symbol"==(void 0===e?"undefined":a(e))||s(e)&&E.call(e)==c}function l(e){if("number"==typeof e)return e;if(i(e))return d;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=h.test(e);return n||m.test(e)?g(e.slice(2),n?2:8):f.test(e)?d:+e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="Expected a function",d=NaN,c="[object Symbol]",p=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,y="object"==(void 0===t?"undefined":a(t))&&t&&t.Object===Object&&t,_="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,v=y||_||Function("return this")(),b=Object.prototype,E=b.toString,S=Math.max,j=Math.min,C=function(){return v.Date.now()};e.exports=o}).call(t,n(19))},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o},function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n (0), // Suppress griddle re-sorting + displayName: i18n._t('File.TITLE', 'Title'), cssClassName: 'gallery__table-column--title', customComponent: this.renderTitle, }, + { + columnName: 'status', + sortable: false, + cssClassName: 'sort--disabled', + customComponent: this.renderStatus, + displayName: i18n._t('File.STATUS', 'Status'), + }, { columnName: 'lastEdited', - displayName: 'Modified', + displayName: i18n._t('File.MODIFIED', 'Modified'), customComponent: this.renderDate, }, { columnName: 'size', sortable: false, - displayName: 'Size', + displayName: i18n._t('File.SIZE', 'Size'), cssClassName: 'sort--disabled', customComponent: this.renderSize, }, @@ -245,6 +256,35 @@ class TableView extends Component { ); } + /** + * Renders the content for the status column + * + * @param {object} props + * @returns {Component|null} + */ + renderStatus(props) { + let flags = []; + const item = props.rowData; + + if (item.type !== 'folder') { + if (item.draft) { + flags.push({ + key: 'status-draft', + status: 'draft' + }); + } else if (item.modified) { + flags.push({ + key: 'status-modified', + status: 'modified' + }); + } + } + + flags = flags.map(({ ...attributes }) => ); + + return {flags}; + } + /** * Renders the progressbar for a given row * From e5f206bc13728418e84fcc3eb931f4e934379ebb Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Mon, 2 Sep 2019 15:21:46 +1200 Subject: [PATCH 2/4] Answer PR feedback and install latest version of webpack-config --- client/dist/js/bundle.js | 2 +- client/src/containers/TableView/TableView.js | 14 ++++-- package.json | 2 +- yarn.lock | 50 ++++++++++++++++++-- 4 files changed, 60 insertions(+), 8 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index d56d12e6f..517cd1555 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/boot/applyTransform.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/transforms/AssetAdmin/insertAssetModal.js"),l=o(i),a=n("./client/src/transforms/FormAction/ownerAwareUnpublish.js"),u=o(a),d=n("./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js"),c=o(d),p=function(){s.default.transform("insert-media-modal",function(e){e.form.alterSchema("AssetAdmin.EditForm.fileInsertForm",l.default)}),s.default.transform("move-form-disabled",function(e){e.component("TreeDropdownField.AssetAdmin.MoveForm",c.default)}),s.default.transform("owner-unpublishing",function(e){e.component("FormAction.AssetAdmin.EditForm.action_unpublish",u.default)})};t.default=p},"./client/src/boot/index.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=n(20),s=o(r),i=n(30),l=o(i),a=n("./client/src/containers/AssetAdmin/AssetAdminRouter.js"),u=o(a),d=n("./client/src/boot/applyTransform.js"),c=o(d),p=n("./client/src/boot/registerReducers.js"),f=o(p),h=n("./client/src/boot/registerComponents.js"),m=o(h),g=n("./client/src/boot/registerQueries.js"),y=o(g);document.addEventListener("DOMContentLoaded",function(){(0,m.default)(),(0,c.default)();var e=s.default.getSection("SilverStripe\\AssetAdmin\\Controller\\AssetAdmin");l.default.add({path:"/",routes:[{path:"/"+e.url+"/show/:folderId/:viewAction/:fileId",component:u.default},{path:"/"+e.url+"/show/:folderId/:viewAction",component:u.default},{path:"/"+e.url+"/show/:folderId",component:u.default},{path:"/"+e.url,component:u.default}]}),(0,y.default)(),(0,f.default)()})},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/components/UploadField/UploadField.js"),l=o(i),a=n("./client/src/components/UploadField/UploadFieldItem.js"),u=o(a),d=n("./client/src/components/AssetDropzone/AssetDropzone.js"),c=o(d),p=n(9),f=o(p),h=n("./client/src/components/PreviewImageField/PreviewImageField.js"),m=o(h),g=n("./client/src/components/ProportionConstraintField/ProportionConstraintField.js"),y=o(g),_=n("./client/src/containers/HistoryList/HistoryList.js"),v=o(_),b=n("./client/src/components/GalleryToolbar/GalleryToolbar.js"),E=o(b),S=n("./client/src/components/GalleryItem/GalleryItem.js"),j=function(){s.default.component.registerMany({UploadField:l.default,UploadFieldItem:u.default,PreviewImageField:m.default,HistoryList:v.default,ProportionConstraintField:y.default,AssetDropzone:c.default,InsertMediaModal:f.default,GalleryToolbar:E.default,GalleryItemFile:S.File,GalleryItemFolder:S.Folder})};t.default=j},"./client/src/boot/registerQueries.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n("./client/src/lib/fileFragments.js"),l=n("./client/src/state/files/readFilesQuery.js"),a=o(l),u=function(){s.default.query.registerFragment("FileInterfaceFields",i.fileInterface),s.default.query.registerFragment("FileFields",i.file),s.default.query.registerFragment("FolderFields",i.folder),s.default.query.register("ReadFilesQuery",a.default)};t.default=u},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),s=o(r),i=n(5),l=n("./client/src/state/gallery/GalleryReducer.js"),a=o(l),u=n("./client/src/state/queuedFiles/QueuedFilesReducer.js"),d=o(u),c=n("./client/src/state/uploadField/UploadFieldReducer.js"),p=o(c),f=n("./client/src/state/previewField/PreviewFieldReducer.js"),h=o(f),m=n("./client/src/state/imageLoad/ImageLoadReducer.js"),g=o(m),y=n("./client/src/state/displaySearch/DisplaySearchReducer.js"),_=o(y),v=function(){s.default.reducer.register("assetAdmin",(0,i.combineReducers)({gallery:a.default,queuedFiles:d.default,uploadField:p.default,previewField:h.default,imageLoad:g.default,displaySearch:_.default}))};t.default=v},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./node_modules/expose-loader/index.js?InsertMediaModal!./client/src/containers/InsertMediaModal/InsertMediaModal.js-exposed"),n("./node_modules/expose-loader/index.js?InsertEmbedModal!./client/src/components/InsertEmbedModal/InsertEmbedModal.js-exposed"),n("./client/src/boot/index.js"),n("./client/src/entwine/UploadField/UploadFieldEntwine.js")},"./client/src/components/AssetDropzone/AssetDropzone.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t2});return t<2?p.default.createElement(m.Button,{className:n,key:e.value,onClick:this.handleChangeValue,value:e.value,color:e.color},e.label):p.default.createElement(m.DropdownItem,{type:"button",className:n,key:e.value,onClick:this.handleChangeValue,value:e.value},e.label)}},{key:"render",value:function(){var e=this;if(!this.props.items.length)return null;var t=this.props.actions.filter(function(t){return!t.canApply||t.canApply(e.props.items)});if(t=t.map(this.renderChild),!t.length)return null;var n=this.props,o=n.ActionMenu,r=n.showCount,s=this.props.items.length;return p.default.createElement("div",{className:"bulk-actions fieldholder-small"},r&&p.default.createElement("div",{className:"bulk-actions-counter"},s),t.slice(0,2),t.length>2&&o?p.default.createElement(o,{id:"BulkActions",className:"bulk-actions__more-actions-menu"},t.slice(2)):t.slice(2))}}]),t}(c.Component);b.propTypes={items:v.default.array,actions:v.default.arrayOf(v.default.shape({value:v.default.string.isRequired,label:v.default.string.isRequired,className:v.default.string,destructive:v.default.bool,callback:v.default.func,canApply:v.default.func,confirm:v.default.func})),ActionMenu:v.default.oneOfType([v.default.node,v.default.func]),showCount:v.default.bool},b.defaultProps={items:[],actions:[],ActionMenu:null,total:null,showCount:!0,totalReachedMessage:d.default._t("")};var E=(0,f.connect)(l)(b);t.Component=b,t.default=(0,h.inject)(["ActionMenu"],function(e){return{ActionMenu:e}},function(){return"BulkActions"})(E)},"./client/src/components/GalleryItem/GalleryItem.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.item.thumbnail&&"image"===e.item.category&&e.item.exists&&!e.item.queuedId&&e.sectionConfig.imageRetry.minRetry&&e.sectionConfig.imageRetry.maxRetry}function d(e,t){if(u(t)){var n=e.assetAdmin.imageLoad,o=n.files.find(function(e){return t.item.thumbnail===e.url});return{loadState:o&&o.status||L.default.NONE}}return{loadState:L.default.DISABLED}}function c(e){return{actions:{imageLoad:(0,D.bindActionCreators)(R,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Folder=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"uploading",value:function(){return this.props.item.queuedId&&!this.saved()}},{key:"exists",value:function(){return this.props.item.exists}},{key:"isImage",value:function(){return"image"===this.props.item.category}},{key:"canBatchSelect",value:function(){return this.props.selectable&&this.props.item.canEdit}},{key:"hasError",value:function(){var e=!1;return this.props.item.message&&(e="error"===this.props.item.message.type),e}},{key:"handleActivate",value:function(e){e.stopPropagation(),"function"==typeof this.props.onActivate&&this.saved()&&this.props.onActivate(e,this.props.item)}},{key:"handleSelect",value:function(e){e.stopPropagation(),e.preventDefault(),"function"==typeof this.props.onSelect&&this.props.onSelect(e,this.props.item)}},{key:"handleKeyDown",value:function(e){E.default.SPACE_KEY_CODE===e.keyCode&&(e.preventDefault(),this.canBatchSelect()&&this.handleSelect(e)),E.default.RETURN_KEY_CODE===e.keyCode&&this.handleActivate(e)}},{key:"handleCancelUpload",value:function(e){e.stopPropagation(),e.preventDefault(),this.hasError()?this.props.onRemoveErroredUpload(this.props.item):this.props.onCancelUpload&&this.props.onCancelUpload(this.props.item)}},{key:"render",value:function(){var e=this,t=null,n=null,o=null,r=this.props.item,s=r.id,i=r.queuedId,l=s?"item-"+s:"queued-"+i;if(this.props.selectable&&(this.canBatchSelect()&&(t=this.handleSelect),n="font-icon-tick"),this.uploading())t=this.handleCancelUpload,n="font-icon-cancel";else if(this.exists()){var a=m.default._t("AssetAdmin.DETAILS","Details");o=y.default.createElement("div",{className:"gallery-item--overlay font-icon-edit"},a)}var u=this.props.badge,d={className:"gallery-item__checkbox",type:"checkbox",title:m.default._t("AssetAdmin.SELECT","Select"),tabIndex:-1,onMouseDown:B,id:l},c=["gallery-item__checkbox-label",n];this.canBatchSelect()||(d.disabled=!0,c.push("gallery-item__checkbox-label--disabled"));var f={className:c.join(" "),onClick:t};return y.default.createElement("div",{className:this.getItemClassNames(),"data-id":this.props.item.id,tabIndex:0,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleActivate},!!u&&y.default.createElement(A.default,{className:"gallery-item__badge",status:u.status,message:u.message}),y.default.createElement("div",{ref:function(t){e.thumbnail=t},className:this.getThumbnailClassNames(),style:this.getThumbnailStyles()},o,this.getStatusFlags()),this.getProgressBar(),this.getErrorMessage(),this.props.children,y.default.createElement("div",{className:"gallery-item__title",ref:function(t){e.title=t}},y.default.createElement("label",p({},f,{htmlFor:l}),y.default.createElement("input",d)),this.props.item.title))}}]),t}(g.Component);q.propTypes={sectionConfig:k.default,item:j.default,loadState:G.default.oneOf(Object.values(L.default)),highlighted:G.default.bool,selected:G.default.bool,isDropping:G.default.bool,isDragging:G.default.bool,message:G.default.shape({value:G.default.string,type:G.default.string}),selectable:G.default.bool,onActivate:G.default.func,onSelect:G.default.func,onCancelUpload:G.default.func,onRemoveErroredUpload:G.default.func,badge:G.default.shape({status:G.default.string,message:G.default.string}),updateStatusFlags:G.default.func,updateProgressBar:G.default.func,updateErrorMessage:G.default.func},q.defaultProps={item:{},sectionConfig:{imageRetry:{}},updateStatusFlags:function(e){return e},updateProgressBar:function(e){return e},updateErrorMessage:function(e){return e}};var H=(0,P.connect)(d,c)(q),z=(0,T.createSelectable)((0,w.default)("GalleryItem")(H)),V=(0,T.createSelectable)((0,I.default)("GalleryItem")(z));t.Component=q,t.Folder=V,t.File=z,t.default=H},"./client/src/components/GalleryItem/GalleryItemDragLayer.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?d.default.createElement("div",{key:"1",className:"gallery-item__drag-shadow"}):null,t>2?d.default.createElement("div",{key:"2",className:"gallery-item__drag-shadow gallery-item__drag-shadow--second"}):null];return d.default.createElement("div",{className:"gallery-item__drag-layer"},d.default.createElement("div",{className:"gallery-item__drag-layer-item",style:this.getOffset()},d.default.createElement("div",{className:"gallery-item__drag-layer-preview"},n,d.default.createElement(m.default,l({},e.props,{isDragging:!0}))),t>1?d.default.createElement(y.default,{className:"gallery-item__drag-layer-count",status:"info",message:""+t}):null))}}]),t}(u.Component);_.propTypes={item:p.default.object,offset:p.default.shape({x:p.default.number.isRequired,y:p.default.number.isRequired}),isDragging:p.default.bool.isRequired};var v=function(e){return{item:e.getItem(),offset:e.getInitialClientOffset(),dragged:e.getDifferenceFromInitialOffset(),isDragging:e.isDragging()}};t.default=(0,f.DragLayer)(v)(_)},"./client/src/components/GalleryItem/draggable.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t={canDrag:function(e){return e.canDrag},beginDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!0,t);var n=e.selectedFiles.concat([]);return n.includes(t)||n.push(t),{selected:n,props:e}},endDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!1,t)}},n=function(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}},o=(0,f.DragSource)(e,t,n);return function(e){var t=function(t){function n(){return r(this,n),s(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return i(n,t),a(n,[{key:"componentDidMount",value:function(){this.props.connectDragPreview((0,h.getEmptyImage)(),{captureDraggingState:!0})}},{key:"render",value:function(){var t=this.props.connectDragSource,n=d.default.createElement(e,this.props);return t("string"==typeof n.type?n:d.default.createElement("div",{className:"gallery-item__draggable"},n))}}]),n}(u.Component);return t.propTypes={connectDragSource:p.default.func.isRequired,connectDragPreview:p.default.func.isRequired,item:p.default.shape({id:p.default.number.isRequired}).isRequired,onDrag:p.default.func,selectedFiles:p.default.arrayOf(p.default.number)},o(t)}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&r<100?f.default.createElement("div",{className:"preview-image-field__progress"},f.default.createElement("div",{className:"preview-image-field__progress-bar",style:{width:r+"%"}})):null,d=null;return s?d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--"+s.type},s.value):100===r&&(d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--success"},c.default._t("AssetAdmin.REPlACE_FILE_SUCCESS","Upload successful, the file will be replaced when you Save."),(r||s)&&f.default.createElement("button",{onClick:this.handleCancelUpload,className:"preview-image-field__message-button btn btn-outline-light",type:"button"},c.default._t("AssetAdmin.REPLACE_FILE_UNDO","Undo")))),f.default.createElement("div",{className:"editor__thumbnail-container"},a||l,u,d)}},{key:"render",value:function(){var e=this.getDropzoneProps();if(this.canEdit())return f.default.createElement(m.default,e,this.renderImage());var t=["preview-image-field__container",this.props.className,this.props.extraClass];return f.default.createElement("div",{className:t.join(" ")},this.renderImage())}}]),t}(p.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string,className:A.default.string,extraClass:A.default.string,readOnly:A.default.bool,disabled:A.default.bool,onAutofill:A.default.func,formid:A.default.string,nameValue:A.default.string,data:A.default.shape({id:A.default.number,parentid:A.default.number,version:A.default.number,url:A.default.string,mock:A.default.bool,exists:A.default.bool,preview:A.default.string,category:A.default.string,nameField:A.default.string,uploadFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string}),initialValues:A.default.object}).isRequired,upload:A.default.shape({url:A.default.string,progress:A.default.number,xhr:A.default.object,category:A.default.string,message:A.default.shape({type:A.default.string.isRequired,value:A.default.string.isRequired})}),actions:A.default.object,securityID:A.default.string,confirm:A.default.func},x.defaultProps={extraClass:"",className:"",data:{},upload:{},confirm:function(e){return window.confirm(e)}},t.Component=x,t.default=(0,_.connect)(l,a)(x)},"./client/src/components/ProportionConstraintField/ProportionConstraintField.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n0&&(!e.message||"error"!==e.message.type)}).length;return Math.max(e-t,0)}},{key:"getFolderId",value:function(){var e=this.state.selectingItem;return e&&"object"===(void 0===e?"undefined":c(e))?e.parent.id:this.props.data.parentid||0}},{key:"handleAddedFile",value:function(e){var t=d({},e,{uploaded:!0});this.props.actions.uploadField.addFile(this.props.id,t)}},{key:"handleSending",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.uploadField.succeedUpload(this.props.id,e._queuedId,t[0])}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.uploadField.failUpload(this.props.id,e._queuedId,t)}},{key:"handleItemRemove",value:function(e,t){this.props.actions.uploadField.removeFile(this.props.id,t)}},{key:"handleReplaceShow",value:function(e,t){this.setState({selecting:!0,selectingItem:t})}},{key:"handleChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if("function"==typeof t.onChange){var n=t.files.filter(function(e){return e.id}).map(function(e){return e.id}),o={Files:n};t.onChange(e,{id:t.id,value:o})}}},{key:"handleUploadButton",value:function(e){e.preventDefault()}},{key:"handleAddShow",value:function(e){e.preventDefault(),this.setState({selecting:!0,selectingItem:null})}},{key:"handleHide",value:function(){this.setState({selecting:!1,selectingItem:null})}},{key:"handleAddInsert",value:function(e,t,n){return this.props.actions.uploadField.addFile(this.props.id,n),this.handleHide(),Promise.resolve({})}},{key:"handleInsertMany",value:function(e,t){var n=this;if(this.state.selectingItem)return void this.handleReplace(e,null,t[0]);t.forEach(function(t){n.handleAddInsert(e,null,t)})}},{key:"handleReplace",value:function(e,t,n){var o=this.state.selectingItem,r=this.props,s=r.id,i=r.actions.uploadField,l=i.addFile,a=i.removeFile;if(!o)throw new Error("Tried to replace a file when none was selected.");return a(s,o),l(s,n),this.handleHide(),Promise.resolve({})}},{key:"canEdit",value:function(){return!this.props.disabled&&!this.props.readOnly&&(this.props.data.canUpload||this.props.data.canAttach)}},{key:"canUpload",value:function(){return this.canEdit()&&this.props.data.canUpload}},{key:"canAttach",value:function(){return this.canEdit()&&this.props.data.canAttach}},{key:"renderDropzone",value:function(){var e=this.props.AssetDropzone;if(!this.props.data.createFileEndpoint)return null;var t={height:E.default.SMALL_THUMBNAIL_HEIGHT,width:E.default.SMALL_THUMBNAIL_WIDTH},n=this.getMaxFiles(),o={url:this.props.data.createFileEndpoint.url,method:this.props.data.createFileEndpoint.method,paramName:"Upload",maxFiles:n,thumbnailWidth:E.default.SMALL_THUMBNAIL_WIDTH,thumbnailHeight:E.default.SMALL_THUMBNAIL_HEIGHT},r=["uploadfield__dropzone"];if(0===n&&r.push("uploadfield__dropzone--hidden"),!this.canEdit())return this.props.files.length?null:g.default.createElement("p",null,h.default._t("AssetAdmin.EMPTY","No files"));var s=this.props.securityId,i=[];return this.canUpload()&&i.push(g.default.createElement("button",{key:"uploadbutton",type:"button",onClick:this.handleUploadButton,className:"uploadfield__upload-button"},h.default._t("AssetAdmin.UPLOADFIELD_UPLOAD_NEW","Upload new"))),this.canAttach()&&(i.length&&i.push(g.default.createElement("span",{key:"uploadjoin",className:"uploadfield__join"},h.default._t("AssetAdmin.OR","or"))),i.push(g.default.createElement("button",{key:"attachbutton",type:"button",onClick:this.handleAddShow,className:"uploadfield__add-button"},h.default._t("AssetAdmin.UPLOADFIELD_CHOOSE_EXISTING","Choose existing")))),g.default.createElement(e,{name:this.props.name,canUpload:this.canUpload(),uploadButton:!1,uploadSelector:".uploadfield__upload-button, .uploadfield__backdrop",folderId:this.props.data.parentid,onAddedFile:this.handleAddedFile,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:t,options:o,securityID:s,className:r.join(" ")},g.default.createElement("div",{className:"uploadfield__backdrop"}),g.default.createElement("span",{className:"uploadfield__droptext"},i))}},{key:"renderModal",value:function(){var e=this.props.InsertMediaModal,t=this.state,n=t.selecting,o=t.selectingItem,r=this.getMaxFiles(),s=this.getFolderId();return g.default.createElement(e,{title:!1,isOpen:n,onInsert:o?this.handleReplace:this.handleAddInsert,onClosed:this.handleHide,onInsertMany:this.handleInsertMany,maxFiles:o?1:r,type:"select",bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",fileAttributes:o?{ID:o.id}:null,folderId:s})}},{key:"renderChild",value:function(e,t){var n=this.props.UploadFieldItem,o={key:e.id?"file-"+e.id:"queued-"+e.queuedId,item:e,name:this.props.name,onRemove:this.handleItemRemove,canEdit:this.canEdit(),onView:this.handleReplaceShow},r=this.props.getItemProps(o,t,this.props);return g.default.createElement(n,r)}},{key:"render",value:function(){return g.default.createElement("div",{className:"uploadfield"},this.renderDropzone(),this.props.files.map(this.renderChild),this.renderModal())}}]),t}(m.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string.isRequired,onChange:A.default.func,value:A.default.shape({Files:A.default.arrayOf(A.default.number)}),files:A.default.arrayOf(w.default),readOnly:A.default.bool,disabled:A.default.bool,data:A.default.shape({files:A.default.arrayOf(w.default),createFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string.isRequired}),multi:A.default.bool,parentid:A.default.number,canUpload:A.default.bool,canAttach:A.default.bool,maxFiles:A.default.number}),UploadFieldItem:A.default.oneOfType([A.default.node,A.default.func]),AssetDropzone:A.default.oneOfType([A.default.node,A.default.func]),InsertMediaModal:A.default.oneOfType([A.default.node,A.default.func]),getItemProps:A.default.func},x.defaultProps={value:{Files:[]},className:"",getItemProps:function(e){return e}};var k=(0,y.connect)(a,u)(x);t.Component=x,t.ConnectedUploadField=k,t.default=(0,_.compose)((0,v.inject)(["UploadFieldItem","AssetDropzone","InsertMediaModal"]),j.default)(k)},"./client/src/components/UploadField/UploadFieldItem.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"isImageSmallerThanThumbnail",value:function(){if(!this.isImage()||this.missing())return!1;var e=this.props.item.width,t=this.props.item.height;return t&&e&&t0}).length)return alert(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FOLDER","These folders contain files which are currently in use, you must move or delete their contents before you can delete the folder.")),void n("cancelled");var o=e.filter(function(e){return"folder"!==e.type&&e.inUseCount>0}),s=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_CONFIRM","Are you sure you want to delete these files?");1===e.length&&1===o.length?s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),e[0].inUseCount):o.length>0&&(s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_MULTI_CONFIRM","There are %s files currently in use, are you sure you want to delete these files?"),o.length)),o.length>0&&(s+="\n\n",s+=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(s)?t():n("cancelled")})})},{value:"edit",label:r.default._t("AssetAdmin.BULK_ACTIONS_EDIT","Edit"),className:"font-icon-edit",destructive:!1,canApply:function(e){return 1===e.length},callback:null},{value:"move",label:r.default._t("AssetAdmin.BULK_ACTIONS_MOVE","Move"),className:"font-icon-folder-move",canApply:function(e){return e.every(function(e){return e&&e.canEdit})},destructive:!1,callback:null},{value:"publish",label:r.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH","Publish"),className:"font-icon-rocket",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e&&!e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"unpublish",label:r.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH","Unpublish"),className:"font-icon-cancel-circled",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"insert",label:r.default._t("AssetAdmin.BULK_ACTIONS_INSERT","Insert"),className:"font-icon-plus-circled btn-primary",destructive:!1,callback:null,canApply:function(e){return e.length},confirm:null}],BULK_ACTIONS_PLACEHOLDER:r.default._t("AssetAdmin.BULK_ACTIONS_PLACEHOLDER"),SPACE_KEY_CODE:32,RETURN_KEY_CODE:13,DEFAULT_PREVIEW:"framework/client/dist/images/app_icons/generic_92.png",MODAL_MOVE:"MODAL_MOVE"}},"./client/src/containers/AssetAdmin/AssetAdmin.js":function(e,t,n){"use strict";function o(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 s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1])||arguments[1];return S.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:this.props.securityId}}:{}))}},{key:"handleBackButtonClick",value:function(e){e.preventDefault(),this.props.actions.gallery.deselectFiles(),this.props.folder?this.handleOpenFolder(this.props.folder.parentId||0):this.handleOpenFolder(0)}},{key:"resetFile",value:function(e){e.queuedId&&this.props.actions.queuedFiles.removeQueuedFile(e.queuedId),this.props.fileId===e.id&&(this.handleCloseFile(),this.handleOpenFile(e.id))}},{key:"handleFolderIcon",value:function(e){e.preventDefault(),this.handleOpenFile(this.getFolderId())}},{key:"handleOpenFile",value:function(e){this.handleBrowse(this.getFolderId(),e,this.props.query)}},{key:"handleSubmitEditor",value:function(e,t,n){var o=this,r=null;if("action_insert"===t&&"select"===this.props.type){var s=this.getFiles(),i=s.find(function(t){return t.id===parseInt(e.ID,10)});return this.props.onInsertMany(null,[i]),Promise.resolve()}if("function"==typeof this.props.onSubmitEditor){var l=this.findFile(this.props.fileId);r=this.props.onSubmitEditor(e,t,n,l)}else r=n();if(!r)throw new Error("Promise was not returned for submitting");return r.then(function(e){return"action_createfolder"===t&&"admin"===o.props.type&&o.handleOpenFile(e.record.id),o.props.actions.files.readFiles().then(function(){return"action_createfolder"===t&&"admin"!==o.props.type&&o.handleOpenFolder(o.getFolderId()),e})})}},{key:"handleCloseFile",value:function(){this.handleBrowse(this.getFolderId(),null,this.props.query)}},{key:"handleOpenFolder",value:function(e){var t=Object.assign({},this.props.query);delete t.page,delete t.filter,this.handleBrowse(e,null,t)}},{key:"handleDelete",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for deletion cannot be found: "+e);return n.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(n.queuedId),n}),o=n.map(function(e){return e.id}),r=this.props.folder?this.props.folder.id:0;return this.props.actions.files.deleteFiles(o,r).then(function(e){var n=e.data.deleteFiles;return t.handleBrowse(r,null,t.props.query),t.props.queuedFiles.items.filter(function(e){return o.includes(e.id)}).forEach(function(e){e.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),t.props.actions.files.readFiles(),n})}},{key:"doUnpublish",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for unpublishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot unpublish folders");return n}),r=o.map(function(e){return e.id});return this.props.actions.files.unpublishFiles(r,n).then(function(e){var n=e.data.unpublishFiles,o=n.filter(function(e){return"File"===e.__typename}),r=n.filter(function(e){return"PublicationNotice"===e.__typename&&"HAS_OWNERS"===e.Type}),s=o.map(function(e){return t.resetFile(e),e}),i=r.slice(0,4),l=r.slice(5),a=i.map(function(e){return e.Message});if(l.length&&a.push(C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_REMAINING","And {count} other file(s)"),{count:l.length})),i.length){var u=[C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_HEADING","{count} file(s) are being used by other published content."),{count:r.length}),a.join("\n"),C.default._t("AssetAdmin.BULK_OWNED_WARNING_FOOTER","Unpublishing will only remove files from the published version of the content. They will remain on the draft version. Unpublish anyway?")];if(confirm(u.join("\n\n"))){var d=r.reduce(function(e,t){return e.concat(t.IDs)},[]);return t.doUnpublish(d,!0).then(function(e){return s.concat(e)})}}return s})}},{key:"handleUnpublish",value:function(e){var t=this;return this.doUnpublish(e).then(function(e){var n=t.props.fileId;t.props.actions.files.readFiles().then(function(){n&&e.find(function(e){return e.id===n})&&(t.handleCloseFile(),t.handleOpenFile(n))})})}},{key:"doPublish",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for publishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot publish folders");return n}),o=n.map(function(e){return e.id});return this.props.actions.files.publishFiles(o).then(function(e){return e.data.publishFiles.filter(function(e){return"File"===e.__typename}).map(function(e){return t.resetFile(e),e})})}},{key:"findFile",value:function(e){return this.getFiles().find(function(t){return t.id===parseInt(e,10)})}},{key:"handleUpload",value:function(){}},{key:"handleUploadQueue",value:function(){this.props.fileId&&this.props.actions.files.readFiles()}},{key:"handleCreateFolder",value:function(){this.props.onBrowse(this.getFolderId(),null,this.props.query,te.default.ACTIONS.CREATE_FOLDER)}},{key:"handleMoveFilesSuccess",value:function(e,t){var n=this;this.props.queuedFiles.items.filter(function(e){return t.includes(e.id)}).forEach(function(e){e.queuedId&&n.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),this.props.actions.gallery.deselectFiles(),this.props.actions.files.readFiles()}},{key:"renderGallery",value:function(){var e=this.props.sectionConfig,t=e.createFileEndpoint.url,n=e.createFileEndpoint.method,o=this.props.query&&parseInt(this.props.query.limit||e.limit,10),r=this.props.query&&parseInt(this.props.query.page||1,10),s=this.props.query&&this.props.query.sort,i=this.props.query&&this.props.query.view,l=this.props.query.filter||{};return g.default.createElement(L.default,{files:this.getFiles(),fileId:this.props.fileId,folderId:this.getFolderId(),folder:this.props.folder,type:this.props.type,limit:o,page:r,totalCount:this.props.filesTotalCount,view:i,filters:l,graphQLErrors:this.props.graphQLErrors,createFileApiUrl:t,createFileApiMethod:n,onDelete:this.handleDelete,onInsertMany:this.props.onInsertMany,onPublish:this.doPublish,onUnpublish:this.doUnpublish,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSuccessfulUpload:this.handleUpload,onSuccessfulUploadQueue:this.handleUploadQueue,onCreateFolder:this.handleCreateFolder,onMoveFilesSuccess:this.handleMoveFilesSuccess,onClearSearch:this.handleClearSearch,onSort:this.handleSort,onSetPage:this.handleSetPage,onViewChange:this.handleViewChange,sort:s,sectionConfig:e,loading:this.props.loading,maxFilesSelect:this.props.maxFiles})}},{key:"renderEditor",value:function(){var e=this.props.sectionConfig,t=u({config:e,viewAction:this.props.viewAction,folderId:this.getFolderId(),type:this.props.type,fileId:this.props.fileId}),n=t.schemaUrl,o=t.targetId;return n?g.default.createElement(R.default,{className:this.props.dialog?"editor--dialog":"",targetId:o,file:this.findFile(o),onClose:this.handleCloseFile,schemaUrl:n,schemaUrlQueries:this.props.requireLinkText?[{name:"requireLinkText",value:!0}]:[],onSubmit:this.handleSubmitEditor,onDelete:this.handleDelete,onUnpublish:this.handleUnpublish,addToCampaignSchemaUrl:e.form.addToCampaignForm.schemaUrl}):null}},{key:"render",value:function(){var e=Boolean(this.props.folderId||(0,z.hasFilters)(this.props.query.filter)),t=this.props.sectionConfig.form.fileSearchForm.schemaUrl,n=this.props.query.filter||{},o=(0,O.default)("fill-height asset-admin","select"===this.props.type&&{"asset-admin--single-select":1===this.props.maxFiles,"asset-admin--multi-select":1!==this.props.maxFiles}),r=(0,z.hasFilters)(this.props.query.filter)||this.props.showSearch,s=this.props.actions.displaySearch?this.props.actions.displaySearch.toggleSearch:void 0;return g.default.createElement("div",{className:o},g.default.createElement(q.default,{showBackButton:e,onBackButtonClick:this.handleBackButtonClick},g.default.createElement(G.default,{multiline:!0}),g.default.createElement("div",{className:"asset-admin__toolbar-extra pull-xs-right fill-width vertical-align-items"},g.default.createElement(K.default,{toggled:r,onToggle:s}),this.props.toolbarChildren)),r&&g.default.createElement(V.default,{onSearch:this.handleDoSearch,id:"AssetSearchForm",formSchemaUrl:t,onHide:this.handleClearSearch,displayBehavior:"HIDEABLE",filters:n,name:"name"}),g.default.createElement("div",{className:"flexbox-area-grow fill-width fill-height gallery"},this.renderGallery(),this.renderEditor()))}}]),t}(m.Component);se.propTypes={dialog:_.default.bool,sectionConfig:oe.default,fileId:_.default.number,folderId:_.default.number,onBrowse:_.default.func,onReplaceUrl:_.default.func,onInsertMany:_.default.func,graphQLErrors:_.default.arrayOf(_.default.string),getUrl:_.default.func,query:_.default.shape({sort:_.default.string,limit:_.default.oneOfType([_.default.number,_.default.string]),page:_.default.oneOfType([_.default.number,_.default.string]),filter:_.default.object}),onSubmitEditor:_.default.func,type:_.default.oneOf(["insert-media","insert-link","select","admin"]),files:_.default.array,queuedFiles:_.default.shape({items:_.default.array.isRequired}),filesTotalCount:_.default.number,folder:_.default.shape({id:_.default.number,title:_.default.string,parents:_.default.array,parentId:_.default.number,canView:_.default.bool,canEdit:_.default.bool}),loading:_.default.bool,actions:_.default.object,maxFiles:_.default.number},se.defaultProps={type:"admin",query:{sort:"",limit:null,page:0,filter:{}},maxFiles:null},t.Component=se,t.getFormSchema=u,t.default=(0,b.compose)((0,v.connect)(c,p),(0,re.injectGraphql)("ReadFilesQuery"),Y.default,X.default,J.default,function(e){return(0,H.withApollo)(e)})(se)},"./client/src/containers/AssetAdmin/AssetAdminRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.base,n=e.folderId,o=e.fileId,r=e.query,s=e.action;if(s&&-1===O.indexOf(s))throw new Error("Invalid action provided: "+s);var i=null;return i=o?t+"/show/"+n+"/"+S.default.ACTIONS.EDIT_FILE+"/"+o:n?t+"/show/"+n:t+"/",s===S.default.ACTIONS.CREATE_FOLDER&&(i=t+"/show/"+(n||0)+"/"+s),r&&Object.keys(r).length>0&&(i=i+"?"+b.default.stringify(r)),i}function a(e){return{sectionConfig:e.config.sections.find(function(e){return e.name===w})}}Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=r!==this.getFolderId(),a=Object.assign({},n);return(i||a.page<=1)&&delete a.page,l({base:"/"+this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return this.props.match.params&&this.props.match.params.folderId?parseInt(this.props.match.params.folderId,10):0}},{key:"getFileId",value:function(){return this.props.match.params&&this.props.match.params.fileId?parseInt(this.props.match.params.fileId,10):0}},{key:"getViewAction",value:function(){return this.props.match.params&&this.props.match.params.viewAction?this.props.match.params.viewAction:S.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){return{sectionConfig:this.props.sectionConfig,type:"admin",folderId:this.getFolderId(),viewAction:this.getViewAction(),fileId:this.getFileId(),query:this.getQuery(),getUrl:this.getUrl,onBrowse:this.handleBrowse,onReplaceUrl:this.handleReplaceUrl}}},{key:"getQuery",value:function(){return(0,_.decodeQuery)(this.props.location.search)}},{key:"handleBrowse",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.push(r)}},{key:"handleReplaceUrl",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.replace(r)}},{key:"render",value:function(){return this.props.sectionConfig?c.default.createElement(y.default,this.getSectionProps()):null}}]),t}(d.Component);I.propTypes={sectionConfig:C.default,location:f.default.shape({pathname:f.default.string,query:f.default.object,search:f.default.string}),params:f.default.object,router:f.default.object},t.Component=I,t.buildUrl=l,t.default=(0,m.withRouter)((0,h.connect)(a)(I))},"./client/src/containers/AssetAdmin/stateRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){function t(t){var n=t.config.sections.find(function(e){return e.name===y});return{Component:e,sectionConfig:n}}return(0,f.connect)(t)(v)}Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAdminStateRouter=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=this.getFolderId(),l=r!==i&&null!==i,a=Object.assign({},n);return(l||a.page<=1)&&delete a.page,(0,h.buildUrl)({base:this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return null===this.state.folderId?null:parseInt(this.state.folderId||0,10)}},{key:"getFileId",value:function(){return parseInt(this.state.fileId||this.props.fileId||0,10)}},{key:"getViewAction",value:function(){return this.state.action||g.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){var e=Object.assign({},this.props,{folderId:this.getFolderId(),fileId:this.getFileId(),viewAction:this.getViewAction(),query:this.state.query,getUrl:this.getUrl,onBrowse:this.handleBrowse});return delete e.Component,e}},{key:"handleBrowse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE;if(o&&-1===Object.values(g.default.ACTIONS).indexOf(o))throw new Error("Invalid action provided: "+o);this.setState({folderId:e,fileId:t,query:n,action:o})}},{key:"render",value:function(){var e=this.getSectionProps(),t=this.props.Component;return d.default.createElement(t,e)}}]),t}(u.Component);v.propTypes={Component:p.default.oneOfType([p.default.element,p.default.func]),sectionConfig:p.default.shape({url:p.default.string.isRequired}).isRequired,fileId:p.default.number},t.AssetAdminStateRouter=v,t.default=l},"./client/src/containers/Editor/Editor.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{actions:{unsavedForms:(0,f.bindActionCreators)(j,e)}}}function a(e){return{enableDropzone:e.assetAdmin.gallery.enableDropzone}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&(o=c.default.sprintf(c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),this.props.file.inUseCount),o+="\n\n",o+=c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(o)&&(this.props.actions.unsavedForms.removeFormChanged("AssetAdmin.EditForm"),this.props.onDelete([t.ID])),e.preventDefault()}}},{key:"handleCancelKeyDown",value:function(e){e.keyCode!==y.default.SPACE_KEY_CODE&&e.keyCode!==y.default.RETURN_KEY_CODE||this.handleClose(e)}},{key:"handleSubmit",value:function(e,t,n){return"function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n()}},{key:"handleClose",value:function(e){this.props.onClose(),this.closeModal(),e&&e.preventDefault()}},{key:"openModal",value:function(){this.setState({openModal:!0})}},{key:"closeModal",value:function(){this.setState({openModal:!1})}},{key:"replaceFile",value:function(){var e=document.querySelector(".dz-input-PreviewImage");e&&e.click()}},{key:"handleLoadingError",value:function(e){this.setState({loadingForm:!1,loadingError:e.errors[0]})}},{key:"handleLoadingSuccess",value:function(){this.setState({loadingForm:!1,loadingError:null})}},{key:"handleFetchingSchema",value:function(){this.setState({loadingForm:!0})}},{key:"renderCancelButton",value:function(){return m.default.createElement("a",{role:"button",tabIndex:0,className:"btn btn--close-panel btn--no-text font-icon-cancel btn--icon-xl",onClick:this.handleClose,onKeyDown:this.handleCancelKeyDown,type:"button","aria-label":c.default._t("AssetAdmin.CANCEL")})}},{key:"render",value:function(){var e=this.props.schemaUrlQueries.map(function(e){return e.name+"="+e.value}).join("&").trim();e=e?"?"+e:"";var t=this.props.schemaUrl+"/"+this.props.targetId+e,n=this.props.addToCampaignSchemaUrl+"/"+this.props.targetId,o=["panel","form--no-dividers","editor"];this.props.className&&o.push(this.props.className),this.props.enableDropzone||o.push("editor--asset-dropzone--disable");var r=null;if(this.state.loadingError){var s=this.state.loadingError.value;404===this.state.loadingError.code&&(s=c.default._t("AssetAdmin.FILE_MISSING","File cannot be found")),s||(s=c.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")),r=m.default.createElement("div",{className:"editor__file-preview-message--file-missing"},s)}var i=c.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign"),l=this.props.loadingComponent;return m.default.createElement("div",{className:o.join(" ")},m.default.createElement("div",{className:"editor__details fill-height"},m.default.createElement(v.default,{identifier:"AssetAdmin.EditForm",schemaUrl:t,afterMessages:this.renderCancelButton(),onSubmit:this.handleSubmit,onAction:this.handleAction,onLoadingSuccess:this.handleLoadingSuccess,onLoadingError:this.handleLoadingError,onFetchingSchema:this.handleFetchingSchema}),r,m.default.createElement(E.default,{title:i,identifier:"AssetAdmin.AddToCampaign",isOpen:this.state.openModal,onClosed:this.closeModal,schemaUrl:n,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good"}),this.state.loadingForm&&m.default.createElement(l,null)))}}]),t}(h.Component);A.propTypes={file:w.default,className:I.default.string,targetId:I.default.number.isRequired,enableDropzone:I.default.bool,onClose:I.default.func.isRequired,onSubmit:I.default.func.isRequired,onDelete:I.default.func.isRequired,schemaUrl:I.default.string.isRequired,schemaUrlQueries:I.default.arrayOf(I.default.shape({name:I.default.string,value:I.default.any})),addToCampaignSchemaUrl:I.default.string,actions:I.default.object},t.Component=A,t.default=(0,f.compose)((0,F.inject)(["Loading"],function(e){return{loadingComponent:e}},function(){return"AssetAdmin.Editor"}),(0,p.connect)(a,l))(A)},"./client/src/containers/Gallery/Gallery.js":function(e,t,n){"use strict";function o(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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=t.sort,o=e.assetAdmin.gallery,r=o.selectedFiles,s=o.errorMessage,i=o.noticeMessage,l=o.enableDropzone,a=o.badges,u=o.concatenateSelect,d=o.loading,c=o.sorters,p=o.lastSelected;return!n&&c&&c[0]&&(n=c[0].field+","+c[0].direction),{lastSelected:p,selectedFiles:r,errorMessage:s,noticeMessage:i,enableDropzone:l,badges:a,concatenateSelect:u,loading:t.loading||d,queuedFiles:e.assetAdmin.queuedFiles,securityId:e.config.SecurityID,sorters:c,sort:n}}function u(e){return{actions:{gallery:(0,S.bindActionCreators)(R,e),queuedFiles:(0,S.bindActionCreators)(L,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.galleryViewDefaultProps=t.galleryViewPropTypes=t.Component=void 0;var d=Object.assign||function(e){for(var t=1;t=s&&t<=i}).map(function(e){return e.id})}},{key:"getSelectableFiles",value:function(){var e=this.props.files.filter(function(e){return e.id});return"select"===this.props.type?e.filter(function(e){return"folder"!==e.type}):e}},{key:"handleBulkInsert",value:function(e,t){this.props.onInsertMany(e,t)}},{key:"handleBulkDelete",value:function(e,t){var n=this;return this.props.onDelete(t.map(function(e){return e.id})).then(function(e){var o=e.filter(function(e){return e}).length;o!==t.length?(n.props.actions.gallery.setErrorMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FAIL","%s folders/files were successfully deleted, but %s files were not able to be deleted."),o,t.length-o)),n.props.actions.gallery.setNoticeMessage(null)):(n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SUCCESS","%s folders/files were successfully deleted."),o)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles())})}},{key:"handleBulkPublish",value:function(e,t){var n=this,o=t.map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onPublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH_SUCCESS","%s folders/files were successfully published."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"handleBulkUnpublish",value:function(e,t){var n=this,o=t.filter(function(e){return e.published}).map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onUnpublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH_SUCCESS","%s folders/files were successfully unpublished."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"initSortDropdown",value:function(){if("tile"===this.props.view){var e=this.getSortElement();e.chosen({allow_single_deselect:!0,disable_search_threshold:20}),e.off("change"),e.on("change",function(){return e.find(":selected")[0].click()})}}},{key:"handleSort",value:function(e){this.props.actions.queuedFiles.purgeUploadQueue(),this.props.onSort(e)}},{key:"handleSetPage",value:function(e){this.props.onSetPage(e)}},{key:"handleCancelUpload",value:function(e){e.xhr.abort(),this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleRemoveErroredUpload",value:function(e){this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleAddedFile",value:function(e){this.props.actions.queuedFiles.addQueuedFile(e)}},{key:"handlePreviewLoaded",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e.queuedId,t)}},{key:"handleSending",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.queuedFiles.succeedUpload(e._queuedId,t[0]),this.props.onSuccessfulUpload&&this.props.onSuccessfulUpload(t);var n=this.props.queuedFiles.items.reduce(function(e,t){return 100!==t.progress?e+1:e},0);if(!this.props.fileId&&!this.props.selectedFiles.length&&0===n){var o=t.pop();this.props.onOpenFile(o.id)}}},{key:"handleQueueComplete",value:function(){this.props.onSuccessfulUploadQueue&&this.props.onSuccessfulUploadQueue()}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.queuedFiles.failUpload(e._queuedId,t)}},{key:"itemIsSelected",value:function(e){return this.props.selectedFiles.indexOf(e)>-1}},{key:"toggleSelectConcat",value:function(e){this.props.actions.gallery.setConcatenateSelect(this.isConcat(e))}},{key:"isConcat",value:function(e){return e.metaKey||e.ctrlKey||e.shiftKey}},{key:"itemIsHighlighted",value:function(e){return this.props.fileId===e}},{key:"hasOpenedItem",value:function(){return!!this.props.fileId}},{key:"handleClearSearch",value:function(e){this.props.onClearSearch(e)}},{key:"handleGroupSelect",value:function(e,t){var n=this,o=this.props.actions.gallery,r=o.setSelectedFiles,s=o.selectFiles,i=this.getSelectableFiles(),l=e.filter(function(t,n){return e.indexOf(t)===n&&i.find(function(e){return e.id===t})}),a=this.props.concatenateSelect||this.isConcat(t);if(null!==this.props.maxFilesSelect){var u=l.length;if(a&&(u=this.props.selectedFiles.filter(function(e){return!n.props.selectedFiles.includes(e)}).concat(this.props.selectedFiles).length),u>=this.props.maxFilesSelect)return}a?s(l):r(l)}},{key:"handleClearSelection",value:function(){this.props.actions.gallery.deselectFiles()}},{key:"handleOpenFolder",value:function(e,t){e.preventDefault(),this.props.actions.gallery.setErrorMessage(null),this.props.actions.gallery.setNoticeMessage(null),this.props.onOpenFolder(t.id)}},{key:"handleOpenFile",value:function(e,t){e.preventDefault(),null!==t.created&&(this.props.selectedFiles.length&&1!==this.props.maxFilesSelect||"select"!==this.props.type||this.handleSelect(e,t),this.props.onOpenFile(t.id,t))}},{key:"handleSelect",value:function(e,t){var n=this.props.maxFilesSelect,o=this.getSelectableFiles(),r=o.filter(function(e){return e.id===t.id}).map(function(e){return e.id});if(1===n)return void this.props.actions.gallery.setSelectedFiles(r);if(-1===this.props.selectedFiles.indexOf(t.id)){if(e.shiftKey&&(r=this.getSelection(this.props.lastSelected,t.id)),this.props.selectedFiles.filter(function(e){return!r.includes(e)}).concat(r).length>n&&null!==n)return;this.props.actions.gallery.selectFiles(r),this.props.actions.gallery.setLastSelected(t.id)}else this.props.actions.gallery.deselectFiles([t.id]),e.shiftKey&&this.props.actions.gallery.setLastSelected(null)}},{key:"handleEnableDropzone",value:function(e){this.props.actions.gallery.setEnableDropzone(e)}},{key:"handleMoveFiles",value:function(e,t){var n=this;this.props.actions.files.moveFiles(e,t).then(function(){var o=P.default.MOVE_SUCCESS_DURATION,r="+"+t.length;n.props.actions.gallery.setFileBadge(e,r,"success",o),"function"==typeof n.props.onMoveFilesSuccess&&n.props.onMoveFilesSuccess(e,t)}).catch(function(){n.props.actions.gallery.setErrorMessage(g.default._t("AssetAdmin.FAILED_MOVE","There was an error moving the selected items."))})}},{key:"handleBulkEdit",value:function(e,t){this.handleOpenFile(e,t[0])}},{key:"handleBulkMove",value:function(){this.props.actions.gallery.activateModal(P.default.MODAL_MOVE)}},{key:"renderTransitionBulkActions",value:function(){return this.renderBulkActions()}},{key:"renderBulkActions",value:function(){var e=this,t="select"===this.props.type?function(e){return"insert"===e.value}:function(e){return"insert"!==e.value},n=P.default.BULK_ACTIONS.filter(t).map(function(t){if(t.callback)return t;switch(t.value){case"delete":return d({},t,{callback:e.handleBulkDelete});case"edit":return d({},t,{callback:e.handleBulkEdit});case"move":return d({},t,{callback:e.handleBulkMove});case"publish":return d({},t,{callback:e.handleBulkPublish});case"unpublish":return d({},t,{callback:e.handleBulkUnpublish});case"insert":return d({},t,{callback:e.handleBulkInsert,color:"primary"});default:return t}}),o=this.props.selectedFiles.map(function(t){return e.props.files.find(function(e){return e&&t===e.id})}).filter(function(e){return e});return o.length>0&&["admin","select"].includes(this.props.type)?_.default.createElement(O.default,{actions:n,items:o,total:this.props.maxFilesSelect,key:o.length>0,container:this.gallery,showCount:1!==this.props.maxFilesSelect}):null}},{key:"renderGalleryView",value:function(){var e=this,t="table"===this.props.view?x.default:F.default,n=this.props.files.map(function(t){return d({},t,{selected:e.itemIsSelected(t.id),highlighted:e.itemIsHighlighted(t.id)})}),o=this.props,r=o.type,s=o.loading,i=o.page,l=o.totalCount,a=o.limit,u=o.sort,c=o.selectedFiles,p=o.badges,f={selectableItems:["admin","select"].includes(r),selectableFolders:"select"!==this.props.type,files:n,loading:s,page:i,totalCount:l,limit:a,sort:u,selectedFiles:c,badges:p,onSort:this.handleSort,onSetPage:this.handleSetPage,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSelect:this.handleSelect,onCancelUpload:this.handleCancelUpload,onDropFiles:this.handleMoveFiles,onRemoveErroredUpload:this.handleRemoveErroredUpload,onEnableDropzone:this.handleEnableDropzone,sectionConfig:this.props.sectionConfig,canDrag:"admin"===this.props.type,maxFilesSelect:this.props.maxFilesSelect};return _.default.createElement(t,f)}},{key:"renderToolbar",value:function(){var e=this.props,t=e.GalleryToolbar,n=e.sort,o=e.view,r=e.folder,s=e.onCreateFolder,i=e.onOpenFolder,l=e.onViewChange,a={onMoveFiles:this.handleMoveFiles,onSort:this.handleSort,onCreateFolder:s,onOpenFolder:i,onViewChange:l,view:o,sort:n,folder:r};return _.default.createElement(t,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.folder,o=t.loading,r=t.errorMessage,s=t.graphQLErrors,i=t.noticeMessage,l=this.props.LoadingComponent,a=s&&s.length>0;if(!n)return r||a?_.default.createElement("div",{className:"gallery__error flexbox-area-grow"},_.default.createElement("div",{className:"gallery__error-message"},_.default.createElement("h3",null,g.default._t("AssetAdmin.DROPZONE_RESPONSE_ERROR","Server responded with an error.")),r&&_.default.createElement("p",null,r),a&&s.map(function(e,t){return _.default.createElement("p",{key:t},e)}))):o?_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement(l,null)):_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement("div",{className:"editor__file-preview-message--file-missing m-t-3"},g.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")));var u=_.default.createElement("div",{className:"gallery_messages"},r&&_.default.createElement(T.default,{value:r,type:"danger"}),i&&_.default.createElement(T.default,{value:i,type:"success"})),c={height:P.default.THUMBNAIL_HEIGHT,width:P.default.THUMBNAIL_WIDTH},p=d({url:this.props.createFileApiUrl,method:this.props.createFileApiMethod,paramName:"Upload",clickable:"#upload-button"},this.props.sectionConfig.dropzoneOptions),f=this.props.securityId,h=this.props.folder.canEdit&&this.props.enableDropzone,m=["panel","panel--padded","panel--scrollable","gallery__main","fill-height"];"insert"===this.props.type&&m.push("insert-media-modal__main");var y=m;return this.hasOpenedItem()&&y.push("gallery__main--has-opened-item"),_.default.createElement("div",{className:"flexbox-area-grow gallery__outer",ref:function(t){e.gallery=t}},this.renderTransitionBulkActions(),_.default.createElement(z.default,{className:m.join(" ")},this.renderToolbar(),_.default.createElement(q.SelectableGroup,{enabled:"tile"===this.props.view&&"admin"===this.props.type,className:"flexbox-area-grow fill-height gallery__main--selectable",onSelection:this.handleGroupSelect,onNonItemClick:this.handleClearSelection,preventDefault:!1,fixedPosition:!0},_.default.createElement(C.default,{name:"gallery-container",className:"flexbox-area-grow",canUpload:h,onAddedFile:this.handleAddedFile,onPreviewLoaded:this.handlePreviewLoaded,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onQueueComplete:this.handleQueueComplete,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:c,folderId:this.props.folderId,options:p,securityID:f,uploadButton:!1},u,this.renderGalleryView()))),this.props.loading&&_.default.createElement(l,null),_.default.createElement(Q.default,{sectionConfig:this.props.sectionConfig,folderId:this.props.folderId,onSuccess:this.props.onMoveFilesSuccess,onOpenFolder:this.props.onOpenFolder}))}}]),t}(y.Component),J={page:1,limit:15},ee={sectionConfig:W.default,loading:X.default.bool,sort:X.default.string,files:X.default.arrayOf(X.default.shape({id:X.default.number,parent:X.default.shape({id:X.default.number})})).isRequired,selectedFiles:X.default.arrayOf(X.default.number),totalCount:X.default.number,page:X.default.number,limit:X.default.number,badges:X.default.arrayOf(X.default.shape({id:X.default.number,message:X.default.node,status:X.default.string})),onOpenFile:X.default.func.isRequired,onOpenFolder:X.default.func.isRequired,onSort:X.default.func.isRequired,onSetPage:X.default.func.isRequired,maxFilesSelect:X.default.number},te=Object.assign({},J,{selectableItems:!1}),ne=Object.assign({},ee,{selectableItems:X.default.bool,selectableFolders:X.default.bool,onSelect:X.default.func,onCancelUpload:X.default.func,onDelete:X.default.func,onRemoveErroredUpload:X.default.func,onEnableDropzone:X.default.func});Z.defaultProps=Object.assign({},J,{type:"admin",view:"tile",enableDropzone:!0}),Z.propTypes=Object.assign({},ee,{onSuccessfulUpload:X.default.func,onSuccessfulUploadQueue:X.default.func,onCreateFolder:X.default.func,onMoveFilesSuccess:X.default.func,onDelete:X.default.func,onPublish:X.default.func,onUnpublish:X.default.func,type:X.default.oneOf(["insert-media","insert-link","select","admin"]),view:X.default.oneOf(["tile","table"]),lastSelected:X.default.number,dialog:X.default.bool,fileId:X.default.number,folderId:X.default.number.isRequired,folder:X.default.shape({id:X.default.number,title:X.default.string,parentId:X.default.number,canView:X.default.bool,canEdit:X.default.bool}),files:X.default.array,errorMessage:X.default.string,graphQLErrors:X.default.arrayOf(X.default.string),actions:X.default.object,securityId:X.default.string,onViewChange:X.default.func.isRequired,createFileApiUrl:X.default.string,createFileApiMethod:X.default.string,search:X.default.object,enableDropzone:X.default.bool,concatenateSelect:X.default.bool,GalleryToolbar:X.default.func,sorters:X.default.arrayOf(X.default.shape({field:X.default.string.isRequired,direction:X.default.oneOf(["asc","desc"]).isRequired,label:X.default.string.isRequired})).isRequired}),t.Component=Z,t.galleryViewPropTypes=ne,t.galleryViewDefaultProps=te,t.default=(0,S.compose)((0,Y.inject)(["GalleryToolbar","Loading"],function(e,t){return{GalleryToolbar:e,LoadingComponent:t}},function(){return"AssetAdmin.Gallery"}),(0,E.connect)(a,u),G.default,function(e){return(0,B.withApollo)(e)})(Z)},"./client/src/containers/Gallery/GalleryDND.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return h.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:g.default.get("SecurityID")}}:{}))},w=function(e){function t(e){r(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={detailView:null,history:[],loadedDetails:!1},n.handleClick=n.handleClick.bind(n),n.handleBack=n.handleBack.bind(n),n.timer=null,n.api=C(e.sectionConfig.historyEndpoint),n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.refreshHistoryIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.refreshHistoryIfNeeded(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.timer=null}},{key:"refreshHistoryIfNeeded",value:function(e){var t=this;if(!e&&!this.state.loadedDetails||e.data.fileId!==this.props.data.fileId||e.data.latestVersionId!==this.props.data.latestVersionId){this.setState({loadedDetails:!1});var n=e?e.data.fileId:this.props.data.fileId;clearTimeout(this.timer),this.timer=setTimeout(function(){t.api({fileId:n}).then(function(e){t.timer&&t.setState({history:e,loadedDetails:!0})})},250)}}},{key:"handleClick",value:function(e){this.setState({viewDetails:e})}},{key:"handleBack",value:function(e){e.preventDefault(),this.setState({viewDetails:null})}},{key:"render",value:function(){var e=this;if(!this.state.loadedDetails)return c.default.createElement("div",{className:"history-list history-list--loading"},"Loading...");if(this.state.viewDetails){var t=[this.props.historySchemaUrl,this.props.data.fileId,this.state.viewDetails].join("/"),n=["btn","btn-secondary","btn--icon-xl","btn--no-text","font-icon-left-open-big","history-list__back"].join(" ");return c.default.createElement("div",{className:"history-list"},c.default.createElement("a",{href:"#",className:n,onClick:this.handleBack}),c.default.createElement(b.default,{identifier:"AssetAdmin.HistoryList",schemaUrl:t,formTag:"div"}))}var o=this.state.history||[];return c.default.createElement("div",{className:"history-list"},c.default.createElement("ul",{className:"list-group list-group-flush history-list__list"},o.map(function(t){return c.default.createElement(_.default,a({key:t.versionid},t,{onClick:e.handleClick}))})))}}]),t}(d.Component);w.propTypes={sectionConfig:S.default.shape({form:S.default.object,historyEndpoint:S.default.shape({url:S.default.string,method:S.default.string,responseFormat:S.default.string})}),historySchemaUrl:S.default.string,data:S.default.object},w.defaultProps={data:{fieldId:0}},t.Component=w,t.default=(0,p.connect)(l)(w)},"./client/src/containers/MoveModal/MoveModal.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.assetAdmin.gallery,n=t.modal,o=t.selectedFiles;return{isOpen:n===y.default.MODAL_MOVE,selectedFiles:o,title:m.default.sprintf(m.default._t("AssetAdmin.MOVE_ITEMS_TO","Move %s item(s) to..."),o.length)}}function a(e){return{onClosed:function(){e((0,b.deactivateModal)())},setNotice:function(t){e((0,b.setNoticeMessage)(t))},setError:function(t){e((0,b.setErrorMessage)(t))},setBadge:function(){e(b.setFileBadge.apply(void 0,arguments))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t0)return p.default.createElement("div",{className:"gallery__progress-bar--complete"});var t={className:"gallery__progress-bar-progress",style:{width:e.progress+"%"}};return p.default.createElement("div",{className:"gallery__progress-bar"},p.default.createElement("div",t))}},{key:"renderTitle",value:function(e){var t=this.renderProgressBar(e.rowData);return p.default.createElement("div",{className:"fill-width"},p.default.createElement("div",{className:"flexbox-area-grow"},e.data),t)}},{key:"renderSelect",value:function(e){if(this.props.selectableItems&&(this.props.selectableFolders||"folder"!==e.rowData.type)){var t={type:"checkbox",title:_.default._t("AssetAdmin.SELECT"),defaultChecked:e.data,tabIndex:-1,onMouseDown:this.preventFocus};return![null,1].includes(this.props.maxFilesSelect)&&this.props.selectedFiles.length>=this.props.maxFilesSelect&&!e.data&&(t.disabled=!0),p.default.createElement("input",t)}return null}},{key:"renderDate",value:function(e){return"folder"===e.rowData.type?null:p.default.createElement("span",null,e.data)}},{key:"renderThumbnail",value:function(e){var t=e.data||e.rowData.url,n=e.rowData.queuedId&&!e.rowData.id,o=e.rowData.category||"false",r="gallery__table-image",s=[r],i={};return s.push(r+"--"+o),"image"===o&&t&&(i.backgroundImage='url("'+t+'")'),n||t||"folder"===o||s.push(r+"--error"),p.default.createElement("div",{className:s.join(" "),style:i})}},{key:"render",value:function(){return p.default.createElement(g.default,this.getTableProps())}}]),t}(c.Component);j.defaultProps=v.galleryViewDefaultProps,j.propTypes=a({},v.galleryViewPropTypes,{sort:h.default.string.isRequired}),t.Component=j,t.default=j},"./client/src/containers/ThumbnailView/ThumbnailView.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=Object.assign||function(e){for(var t=1;t=this.props.maxFilesSelect,b=1===this.props.maxFilesSelect?c.onActivate:this.props.onSelect;c=l({},c,{selectable:!0,onSelect:b,maxSelected:v})}if("folder"===e.type){var E=this.props.onDropFiles;return c=l({},c,{onDropFiles:E}),p.default.createElement(o,c)}return p.default.createElement(n,c)}},{key:"render",value:function(){return p.default.createElement("div",{className:"gallery__main-view--tile"},p.default.createElement("div",{className:"gallery__folders"},this.props.files.filter(this.folderFilter).map(this.renderItem)),p.default.createElement("div",{className:"gallery__files"},this.props.files.filter(this.fileFilter).map(this.renderItem)),0===this.props.files.length&&!this.props.loading&&p.default.createElement("p",{className:"gallery__no-item-notice"},d.default._t("AssetAdmin.NOITEMSFOUND")),p.default.createElement("div",{className:"gallery__load"},this.renderPagination()))}}]),t}(c.Component);v.defaultProps=h.galleryViewDefaultProps,v.propTypes=l({},h.galleryViewPropTypes,{File:_.default.oneOfType([_.default.node,_.default.func]).isRequired,Folder:_.default.oneOfType([_.default.node,_.default.func]).isRequired});var b=(0,f.inject)(["GalleryItemFile","GalleryItemFolder"],function(e,t){return{File:e,Folder:t}},function(){return"AssetAdmin.Gallery.ThumbnailView"});t.Component=v,t.default=b(v)},"./client/src/entwine/UploadField/UploadFieldEntwine.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=Object.assign||function(e){for(var t=1;t');this.before(n),t=n[0]}return t},onunmatch:function(){this._super(),d.default.unmountComponentAtNode(this.siblings(".uploadfield-holder")[0])},onmatch:function(){var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,p.loadComponent)("UploadField",t);this.setComponent(n),this._super(),this.hide(),this.refresh()},onclick:function(e){e.preventDefault()},refresh:function(){var t=this.getAttributes(),n=e(this).closest("form"),o=function(){setTimeout(function(){n.trigger("change")},0)},s=this.getComponent();d.default.render(a.default.createElement(s,r({},t,{onChange:o,noHolder:!0})),this.getContainer())},getAttributes:function(){var t=e(this).data("state"),n=e(this).data("schema");return(0,c.schemaMerge)(n,t)}})})},"./client/src/lib/configShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({url:r.default.string,limit:r.default.number,imageRetry:r.default.shape({minRetry:r.default.number,maxRetry:r.default.number,expiry:r.default.number}),form:r.default.object,dropzoneOptions:r.default.object});t.default=s},"./client/src/lib/fileFragments.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileInterface="\n fragment FileInterfaceFields on FileInterface {\n canDelete\n canEdit\n canView\n category\n exists\n filename\n id\n lastEdited\n name\n parentId\n title\n type\n url\n }\n",t.file="\n fragment FileFields on File {\n draft\n extension\n published\n modified\n size\n smallThumbnail\n thumbnail\n inUseCount\n }\n",t.folder="\n fragment FolderFields on Folder {\n filesInUseCount\n }\n"},"./client/src/lib/fileShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({canEdit:r.default.bool,canDelete:r.default.bool,canView:r.default.bool,exists:r.default.bool,type:r.default.string,smallThumbnail:r.default.string,thumbnail:r.default.string,width:r.default.number,height:r.default.number,category:r.default.oneOfType([r.default.bool,r.default.string]),id:r.default.number,inUseCount:r.default.number,url:r.default.string,title:r.default.string,progress:r.default.number});t.default=s},"./client/src/lib/fileStructure.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=(0,r.default)({name:null,canDelete:!1,canEdit:!1,category:null,created:null,extension:null,filename:null,id:0,lastEdited:null,messages:null,owner:{id:0,title:null},parent:{filename:null,id:0,title:null},queuedId:null,size:null,title:null,type:null,url:null,xhr:null,thumbnail:null,smallThumbnail:null,height:null,width:null});t.default=s},"./client/src/state/displaySearch/DisplaySearchActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_SEARCH:"TOGGLE_SEARCH",OPEN_SEARCH:"OPEN_SEARCH",CLOSE_SEARCH:"CLOSE_SEARCH"}},"./client/src/state/displaySearch/DisplaySearchActions.js":function(e,t,n){"use strict";function o(){return{type:l.default.TOGGLE_SEARCH,payload:null}}function r(){return{type:l.default.OPEN_SEARCH,payload:null}}function s(){return{type:l.default.CLOSE_SEARCH,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleSearch=o,t.openSearch=r,t.closeSearch=s;var i=n("./client/src/state/displaySearch/DisplaySearchActionTypes.js"),l=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/displaySearch/DisplaySearchReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;switch(arguments[1].type){case u.default.TOGGLE_SEARCH:return(0,l.default)(s({},e,{isOpen:!e.isOpen}));case u.default.OPEN_SEARCH:return(0,l.default)(s({},e,{isOpen:!0}));case u.default.CLOSE_SEARCH:return(0,l.default)(s({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n({variables:{IDs:e,Quiet:o,Force:t}})};return{actions:r({},s,{files:r({},s.files,o({},e,i))})}}}}};t.default=u},"./client/src/state/files/deleteFilesMutation.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return t({variables:{IDs:e},update:function(t){var r=d.default.query.get("ReadFilesQuery"),s=r.getApolloConfig(),i=s.options(n).variables;null!==o&&(i.rootFilter.id=o,i.rootFilter.anyChildId=null);var l=r.getGraphqlAST(),a=t.readQuery({query:l,variables:i}),u=JSON.parse(JSON.stringify(a)),c=u.readFiles.edges[0].node.children.edges;c=c.filter(function(t){return!e.includes(t.node.id)}),u.readFiles.edges[0].node.children.edges=c,u.readFiles.edges[0].node.children.pageInfo.totalCount=c.length,t.writeQuery({query:l,data:u,variables:i})}})};return{actions:r({},o,{files:r({},o.files,{deleteFiles:s})})}}};t.mutation=c,t.config=p,t.default=(0,i.graphql)(c,p)},"./client/src/state/files/moveFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"],["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"]),r=n(11),s=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n("./client/src/lib/fileFragments.js"),a=(0,i.default)(o,l.fileInterface,l.file),u={props:function(e){var t=e.mutate,n=e.ownProps.actions,o=void 0===n?{}:n;return{actions:Object.assign({},o,{files:Object.assign({},o.files,{moveFiles:function(e,n){return t({variables:{folderId:e,fileIds:n},update:function(){window.ss.apolloClient.resetStore()}})}})})}}};t.mutation=a,t.config=u,t.default=(0,r.graphql)(a,u)},"./client/src/state/files/publishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("publishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/files/readFilesQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,s=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,s=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n(22),s=n(3),i={options:function(e){var t=e.sectionConfig,n=e.folderId,s=e.fileId,i=e.query,l=Object.assign({},i.filter),a=Object.assign({},l,{parentId:void 0,recursive:(0,r.hasFilters)(l),currentFolderOnly:void 0}),u=(0,r.hasFilters)(l)?null:s||null,d=u?null:n||0,c={id:d,anyChildId:u},p=i.sort?i.sort.split(","):["",""],f=o(p,2),h=f[0],m=f[1],g=i.limit||t.limit;return{variables:{rootFilter:c,childrenFilter:a,limit:g,offset:((i.page||1)-1)*g,sortBy:h&&m?[{field:h,direction:m.toUpperCase()}]:void 0}}},props:function(e){var t=e.data,n=t.error,o=t.refetch,r=t.readFiles,s=t.loading,i=e.ownProps.actions,l=r&&r.edges[0]?r.edges[0].node:null,a=l&&l.children?l.children.edges.map(function(e){return e.node}).filter(function(e){return e}):[],u=l&&l.children?l.children.pageInfo.totalCount:0,d=l&&!l.children,c=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:s||d,folder:l,files:a,filesTotalCount:u,graphQLErrors:c,actions:Object.assign({},i,{files:Object.assign({},i.files,{readFiles:o})})}}},l=s.graphqlTemplates.READ,a={apolloConfig:i,templateName:l,pluralName:"Files",pagination:!1,params:{limit:"Int!",offset:"Int!",rootFilter:"FileFilterInput",childrenFilter:"FileFilterInput",sortBy:"[ChildrenSortInputType]"},args:{root:{filter:"rootFilter"},"root/edges/node/...on Folder/children":{limit:"limit",offset:"offset",filter:"childrenFilter",sortBy:"sortBy"}},fragments:["FileInterfaceFields","FileFields","FolderFields"],fields:["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...on Folder",["children",["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...FolderFields"]]],"parents",["id","title"]]]]]};t.default=a},"./client/src/state/files/unpublishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("unpublishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/gallery/GalleryActionTypes.js":function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["SET_LAST_SELECTED","SET_SELECTED_FILES","DESELECT_FILES","SELECT_FILES","LOAD_FILE_REQUEST","LOAD_FILE_SUCCESS","HIGHLIGHT_FILES","UPDATE_BATCH_ACTIONS","SET_NOTICE_MESSAGE","SET_ERROR_MESSAGE","SET_ENABLE_DROPZONE","SET_FILE_BADGE","CLEAR_FILE_BADGE","ACTIVATE_MODAL","DEACTIVATE_MODAL","CONCATENATE_SELECT","SET_LOADING"].reduce(function(e,t){return Object.assign(e,o({},t,"GALLERY."+t))},{})},"./client/src/state/gallery/GalleryActions.js":function(e,t,n){"use strict";function o(e){return function(t){t({type:_.default.SET_LAST_SELECTED,payload:{id:e}})}}function r(e){return function(t){t({type:_.default.SET_SELECTED_FILES,payload:{files:e}})}}function s(e,t){return function(n){n({type:_.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.SELECT_FILES,payload:{ids:e}})}}function l(e){return function(t){return t({type:_.default.CONCATENATE_SELECT,payload:!!e})}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.DESELECT_FILES,payload:{ids:e}})}}function u(e){return function(t){return t({type:_.default.SET_NOTICE_MESSAGE,payload:{message:e}})}}function d(e){return function(t){return t({type:_.default.SET_ERROR_MESSAGE,payload:{message:e}})}}function c(e){return function(t){return t({type:_.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})}}function p(e){return function(t){t({type:_.default.CLEAR_FILE_BADGE,payload:{id:e}})}}function f(e,t,n,o){return function(r,s){var i=s(),l=i.assetAdmin,a=l.gallery.badges.find(function(t){return t.id===e});a&&a.timer&&clearTimeout(a.timer);var u=o>0?setTimeout(function(){return p(e)(r)},o):null;r({type:_.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:u}})}}function h(e){return function(t){t({type:_.default.ACTIVATE_MODAL,payload:e})}}function m(){return function(e){e({type:_.default.DEACTIVATE_MODAL})}}function g(e){return function(t){t({type:_.default.SET_LOADING,payload:!!e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLastSelected=o,t.setSelectedFiles=r,t.loadFile=s,t.selectFiles=i,t.setConcatenateSelect=l,t.deselectFiles=a,t.setNoticeMessage=u,t.setErrorMessage=d,t.setEnableDropzone=c,t.clearFileBadge=p,t.setFileBadge=f,t.activateModal=h,t.deactivateModal=m,t.setLoading=g;var y=n("./client/src/state/gallery/GalleryActionTypes.js"),_=function(e){return e&&e.__esModule?e:{default:e}}(y)},"./client/src/state/gallery/GalleryReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,o=t.payload;switch(n){case u.default.SET_LAST_SELECTED:return s({},e,{lastSelected:o.id});case u.default.SET_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id}).concat([o])});case u.default.CLEAR_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id})});case u.default.SET_ENABLE_DROPZONE:return s({},e,{enableDropzone:o.enableDropzone});case u.default.SET_NOTICE_MESSAGE:return s({},e,{noticeMessage:o.message});case u.default.SET_ERROR_MESSAGE:return s({},e,{errorMessage:o.message});case u.default.LOAD_FILE_SUCCESS:var r=e.files.find(function(e){return e.id===o.id});if(r){var i=s({},r,o.file);return(0,l.default)(s({},e,{files:e.files.map(function(e){return e.id===i.id?i:e})}))}return e.folder.id===o.id?(0,l.default)(s({},e,{folder:s({},e.folder,o.file)})):e;case u.default.SET_SELECTED_FILES:return(0,l.default)(s({},e,{selectedFiles:Array.isArray(o.files)?o.files:[]}));case u.default.SELECT_FILES:var a=null;return a=null===o.ids?e.files.map(function(e){return e.id}):e.selectedFiles.concat(o.ids.filter(function(t){return-1===e.selectedFiles.indexOf(t)})),(0,l.default)(s({},e,{selectedFiles:a}));case u.default.DESELECT_FILES:var d=null;return d=null===o.ids?[]:e.selectedFiles.filter(function(e){return-1===o.ids.indexOf(e)}),(0,l.default)(s({},e,{selectedFiles:d}));case u.default.ACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:o}));case u.default.DEACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:null}));case u.default.CONCATENATE_SELECT:return(0,l.default)(s({},e,{concatenateSelect:o}));case u.default.SET_LOADING:return(0,l.default)(s({},e,{loading:o}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p;r(this,e),this.options=s({},c,t),this.factory=n}return i(e,[{key:"loadImage",value:function(e){return this.options.minRetry&&d.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}},{key:"loadImageLoop",value:function(e,t){var n=this;return this.options.onStatusChange(e,a.default.LOADING),new Promise(function(t,o){return n.factory(e,t,o)}).then(function(){return n.handleSuccess(e)}).catch(function(){return n.handleError(e,t)})}},{key:"handleReset",value:function(e,t){this.options.onReset(e),t()}},{key:"handleTimeout",value:function(e,t){var n=setTimeout(e,t);return this.options.onTimeout(n,t),n}},{key:"handleSuccess",value:function(e){d.default.unlock(e),this.options.onStatusChange(e,a.default.SUCCESS)}},{key:"handleFailure",value:function(e){var t=this;return d.default.unlock(e),this.options.onStatusChange(e,a.default.FAILED),this.options.expiry?new Promise(function(n){t.handleTimeout(function(){return t.handleReset(e,n)},1e3*t.options.expiry)}):null}},{key:"handleError",value:function(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,a.default.WAITING),this.handleRetry(e,t))}},{key:"handleRetry",value:function(e,t){var n=this,o=new Promise(function(o){n.handleTimeout(function(){return o(n.loadImageLoop(e,2*t))},1e3*t)});return this.options.onRetry(e,t,o),o}},{key:"setOnRetry",value:function(e){this.options.onRetry=e}},{key:"setOnReset",value:function(e){this.options.onReset=e}},{key:"setOnStatusChange",value:function(e){this.options.onStatusChange=e}},{key:"setOnTimeout",value:function(e){this.options.onTimeout=e}}]),e}();t.defaultImageFactory=p,t.default=f},"./client/src/state/imageLoad/ImageLoadActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},"./client/src/state/imageLoad/ImageLoadActions.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return function(n,o){if(!e)return null;if(o().assetAdmin.imageLoad.files.find(function(t){return t.url===e}))return null;var r=s({},t,{onStatusChange:function(e,t){return n({type:l.default.SET_STATUS,payload:{status:t,url:e}})},onReset:function(e){return n({type:l.default.RESET,payload:{url:e}})}});return new u.default(r).loadImage(e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||(this.urls=[].concat(o(this.urls),[e]),0))}},{key:"unlock",value:function(e){this.urls=this.urls.filter(function(t){return t!==e})}}]),e}();window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new i,t.Component=i,t.default=window.ss.imagelocker},"./client/src/state/imageLoad/ImageLoadReducer.js":function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;switch(n){case l.default.SET_STATUS:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})),[r])});case l.default.RESET:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PREVIEWFIELD_ADD_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,t.payload.file)));case u.default.PREVIEWFIELD_FAIL_UPLOAD:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.message))));case u.default.PREVIEWFIELD_REMOVE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,void 0)));case u.default.PREVIEWFIELD_UPDATE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.data))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),l=o(i),a=n("./client/src/state/previewField/PreviewFieldActionTypes.js"),u=o(a),d={};t.default=s},"./client/src/state/queuedFiles/QueuedFilesActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ADD_QUEUED_FILE:"ADD_QUEUED_FILE",FAIL_UPLOAD:"FAIL_UPLOAD",PURGE_UPLOAD_QUEUE:"PURGE_UPLOAD_QUEUE",REMOVE_QUEUED_FILE:"REMOVE_QUEUED_FILE",SUCCEED_UPLOAD:"SUCCEED_UPLOAD",UPDATE_QUEUED_FILE:"UPDATE_QUEUED_FILE"}},"./client/src/state/queuedFiles/QueuedFilesActions.js":function(e,t,n){"use strict";function o(e){return function(t){return t({type:d.default.ADD_QUEUED_FILE,payload:{file:e}})}}function r(e,t){return function(n){var o=t.message;return t.errors&&t.errors.length&&(o=t.errors[0]),"string"==typeof t&&(o={value:t,type:"error"}),n({type:d.default.FAIL_UPLOAD,payload:{queuedId:e,message:o}})}}function s(){return function(e){return e({type:d.default.PURGE_UPLOAD_QUEUE,payload:null})}}function i(e){return function(t){return t({type:d.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})}}function l(e,t){return function(n){return n({type:d.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})}}function a(e,t){return function(n){return n({type:d.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.addQueuedFile=o,t.failUpload=r,t.purgeUploadQueue=s,t.removeQueuedFile=i,t.succeedUpload=l,t.updateQueuedFile=a;var u=n("./client/src/state/queuedFiles/QueuedFilesActionTypes.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(u)},"./client/src/state/queuedFiles/QueuedFilesReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:m,t=arguments[1];switch(t.type){case d.default.ADD_QUEUED_FILE:return(0,a.default)(i({},e,{items:[].concat(r(e.items),[i({},p.default,t.payload.file)])}));case d.default.FAIL_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,{message:t.payload.message}):e})}));case d.default.PURGE_UPLOAD_QUEUE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return!e.id})}));case d.default.REMOVE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return e.queuedId!==t.payload.queuedId})}));case d.default.SUCCEED_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.json,{messages:[{value:h.default._t("AssetAdmin.DROPZONE_SUCCESS_UPLOAD"),type:"success",extraClass:"success"}]}):e})}));case d.default.UPDATE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.updates):e})}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1],n=(0,p.default)(e,t,h);switch(t.type){case a.default.UPLOADFIELD_ADD_FILE:return n(function(e){return e.files.find(function(e){return e.id===t.payload.file.id})?e:i({},e,{files:[].concat(r(e.files),[i({},d.default,t.payload.file)])})});case a.default.UPLOADFIELD_SET_FILES:return n(function(){return{files:t.payload.files}});case a.default.UPLOADFIELD_UPLOAD_FAILURE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,{message:t.payload.message}):e})}});case a.default.UPLOADFIELD_REMOVE_FILE:return n(function(e){return{files:e.files.filter(function(e){return!(t.payload.file.queuedId&&e.queuedId===t.payload.file.queuedId||t.payload.file.id&&e.id===t.payload.file.id)})}});case a.default.UPLOADFIELD_UPLOAD_SUCCESS:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.json):e})}});case a.default.UPLOADFIELD_UPDATE_QUEUED_FILE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.updates):e})}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0?s.default._t("AssetAdmin.UPDATE_FILE","Update file"):s.default._t("AssetAdmin.INSERT_FILE","Insert file");return e.mutateField("action_insert",function(e){return o({},e,{title:r||e.title})}),e.getState()};t.default=i},"./client/src/transforms/FormAction/ownerAwareUnpublish.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?[a.default.inject(a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_1","This file is being used in {count} other published section(s)."),{count:r}),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_2","Ensure files are removed from content areas prior to unpublishing them. Otherwise, they will appear as broken links."),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_3","Do you want to unpublish this file anyway?")].join("\n\n"):a.default._t("AssetAdmin.CONFIRMUNPUBLISH","Are you sure you want to unpublish this record?"),confirm(s)?n(e,o):e.preventDefault()}});return i.default.createElement(e,o)}};t.default=u},"./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disabledTreeDropdownField=void 0;var o=Object.assign||function(e){for(var t=1;t1?n-1:0),r=1;r=s.length)break;l=s[i++],l.apply(this,o)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var o=0;o=n.length)break;r=n[o++];var s=r;if(/(^| )dz-message($| )/.test(s.className)){e=s,s.className="dz-message";break}}e||(e=t.createElement('
'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,o){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;null==t&&null==n?(t=r.srcWidth,n=r.srcHeight):null==t?t=n*s:null==n&&(n=t/s),t=Math.min(t,r.srcWidth),n=Math.min(n,r.srcHeight);var i=t/n;if(r.srcWidth>t||r.srcHeight>n)if("crop"===o)s>i?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*i):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/i);else{if("contain"!==o)throw new Error("Unknown resizeMethod '"+o+"'");s>i?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var o=e.previewElement.querySelectorAll("[data-dz-name]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;i.textContent=e.name}for(var l=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=l;!(a>=l.length);)i=l[a++],i.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink));for(var u=function(o){return o.preventDefault(),o.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)},d=e.previewElement.querySelectorAll("[data-dz-remove]"),c=0,d=d;;){var p;if(c>=d.length)break;p=d[c++],p.addEventListener("click",u)}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(var n=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;s.alt=e.name,s.src=t}return setTimeout(function(){return e.previewElement.classList.add("dz-image-preview")},1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);for(var n=e.previewElement.querySelectorAll("[data-dz-errormessage]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++],r.textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement)for(var o=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;"PROGRESS"===i.nodeName?i.value=t:i.style.width=t+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.length)break;i=r[s++];var l=i;for(var a in l){var u=l[a];e[a]=u}}return e}}]),l(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(e){return e.accepted}).map(function(e){return e})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(e){return!e.accepted}).map(function(e){return e})}},{key:"getFilesWithStatus",value:function(e){return this.files.filter(function(t){return t.status===e}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===t.UPLOADING||e.status===t.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t=e.hiddenFileInput.files;if(t.length)for(var o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;e.addFile(i)}return e.emit("addedfiles",t),n()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var n=this.events,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;this.on(s,this.options[s])}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var i=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return i(t),e.emit("dragenter",t)},dragover:function(t){var n=void 0;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return i(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach(function(n){return e.listeners.push({element:n,events:{click:function(o){return(n!==e.element||o.target===e.element||t.elementInside(o.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,n=0;if(this.getActiveFiles().length){for(var o=this.getActiveFiles(),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;t+=i.upload.bytesSent,n+=i.upload.total}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e=void 0,n=void 0;if(e=this.getExistingFallback())return e;var o='
';this.options.dictFallbackText&&(o+="

"+this.options.dictFallbackText+"

"),o+='
';var r=t.createElement(o);return"FORM"!==this.element.tagName?(n=t.createElement('
'),n.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:r}},{key:"getExistingFallback",value:function(){for(var e=["div","form"],t=0;t=t.length)break;o=t[n++];var r=o;if(/(^| )fallback($| )/.test(r.className))return r}}(this.element.getElementsByTagName(o)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.addEventListener(n,o,!1))}return t}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.removeEventListener(n,o,!1))}return t}()})}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(t){return e.cancelUpload(t)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var o=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),n=s;break}}t=Math.round(10*t)/10}return""+t+" "+this.options.dictFileSizeUnits[n]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n=t.length)break;o=t[n++];var r=o;this.addFile(r)}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){for(var n=[],o=e,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i,l=s;null!=l.webkitGetAsEntry&&(i=l.webkitGetAsEntry())?i.isFile?n.push(t.addFile(l.getAsFile())):i.isDirectory?n.push(t._addFilesFromDirectory(i,i.name)):n.push(void 0):null==l.getAsFile||null!=l.kind&&"file"!==l.kind?n.push(void 0):n.push(t.addFile(l.getAsFile()))}return n}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,o=e.createReader(),r=function(e){return i(console,"log",function(t){return t.log(e)})};return function e(){return o.readEntries(function(o){if(o.length>0){for(var r=o,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.isFile?l.file(function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=t+"/"+e.name,n.addFile(e)}):l.isDirectory&&n._addFilesFromDirectory(l,t+"/"+l.name)}e()}return null},r)}()}},{key:"accept",value:function(e,n){return this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){for(var t=e,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;this.enqueueFile(r)}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return n.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(){return t._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=d(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var n=this.files.slice(),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;(s.status!==t.UPLOADING||e)&&this.removeFile(s)}return null}},{key:"resizeImage",value:function(e,n,o,r,s){var i=this;return this.createThumbnail(e,n,o,r,!0,function(n,o){if(null==o)return s(e);var r=i.options.resizeMimeType;null==r&&(r=e.type);var l=o.toDataURL(r,i.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(l=h.restore(e.dataURL,l)),s(t.dataURItoBlob(l))})}},{key:"createThumbnail",value:function(e,t,n,o,r,s){var i=this,l=new FileReader;return l.onload=function(){return e.dataURL=l.result,"image/svg+xml"===e.type?void(null!=s&&s(l.result)):i.createThumbnailFromUrl(e,t,n,o,r,s)},l.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(e,t,n,o,r,s,i){var l=this,a=document.createElement("img");return i&&(a.crossOrigin=i),a.onload=function(){var i=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(i=function(e){return EXIF.getData(a,function(){return e(EXIF.getTag(this,"Orientation"))})}),i(function(r){e.width=a.width,e.height=a.height;var i=l.options.resize.call(l,e,t,n,o),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=i.trgWidth,u.height=i.trgHeight,r>4&&(u.width=i.trgHeight,u.height=i.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.width);break;case 7:d.rotate(.5*Math.PI),d.translate(u.height,-u.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.height,0)}f(d,a,null!=i.srcX?i.srcX:0,null!=i.srcY?i.srcY:0,i.srcWidth,i.srcHeight,null!=i.trgX?i.trgX:0,null!=i.trgY?i.trgY:0,i.trgWidth,i.trgHeight);var c=u.toDataURL("image/png");if(null!=s)return s(c,u)})},null!=s&&(a.onerror=s),a.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var o=this.getQueuedFiles();if(o.length>0){if(this.options.uploadMultiple)return this.processFiles(o.slice(0,e-t));for(;n=n.length)break;r=n[o++];var s=r;s.processing=!0,s.status=t.UPLOADING,this.emit("processing",s)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter(function(t){return t.xhr===e}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var n=this._getFilesWithXhr(e.xhr),o=n,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++],s.status=t.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var i=n,l=0,i=i;;){var a;if(l>=i.length)break;a=i[l++];var u=a;this.emit("canceled",u)}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.upload.totalChunkCount)){i++;var l=o*n.options.chunkSize,a=Math.min(l+n.options.chunkSize,r.size),u={name:n._getParamName(0),data:s.webkitSlice?s.webkitSlice(l,a):s.slice(l,a),filename:r.upload.filename,chunkIndex:o};r.upload.chunks[o]={file:r,index:o,dataBlock:u,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[u])}};if(r.upload.finishedChunkUpload=function(o){var s=!0;o.status=t.SUCCESS,o.dataBlock=null,o.xhr=null;for(var i=0;i=s.length)break;l=s[i++],l.xhr=r}e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,e),u=this.resolveOption(this.options.url,e);r.open(a,u,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){o._finishedUploading(e,r,t)},r.onerror=function(){o._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return o._updateFilesUploadProgress(e,r,t)};var d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&t.extend(d,this.options.headers);for(var c in d){var p=d[c];p&&r.setRequestHeader(c,p)}var f=new FormData;if(this.options.params){var h=this.options.params;"function"==typeof h&&(h=h.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null));for(var m in h){var g=h[m];f.append(m,g)}}for(var y=e,_=0,y=y;;){var v;if(_>=y.length)break;v=y[_++];var b=v;this.emit("sending",b,r,f)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,f),this._addFormElementData(f);for(var E=0;E=t.length)break;o=t[n++];var r=o,s=r.getAttribute("name"),i=r.getAttribute("type");if(i&&(i=i.toLowerCase()),void 0!==s&&null!==s)if("SELECT"===r.tagName&&r.hasAttribute("multiple"))for(var l=r.options,a=0,l=l;;){var u;if(a>=l.length)break;u=l[a++];var d=u;d.selected&&e.append(s,d.value)}else(!i||"checkbox"!==i&&"radio"!==i||r.checked)&&e.append(s,r.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var o=void 0;if(void 0!==n){if(o=100*n.loaded/n.total,e[0].upload.chunked){var r=e[0],s=this._getChunk(r,t);s.progress=o,s.total=n.total,s.bytesSent=n.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var i=0;i=l.length)break;u=l[a++];var d=u;d.upload.progress=o,d.upload.total=n.total,d.upload.bytesSent=n.loaded}for(var c=e,p=0,c=c;;){var f;if(p>=c.length)break;f=c[p++];var h=f;this.emit("uploadprogress",h,h.upload.progress,h.upload.bytesSent)}}else{var m=!0;o=100;for(var g=e,y=0,g=g;;){var _;if(y>=g.length)break;_=g[y++];var v=_;100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(m=!1),v.upload.progress=o,v.upload.bytesSent=v.upload.total}if(m)return;for(var b=e,E=0,b=b;;){var S;if(E>=b.length)break;S=b[E++];var j=S;this.emit("uploadprogress",j,o,j.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,n,o){var r=void 0;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){o=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,r,o):this._handleUploadError(e,n,r)}}},{key:"_handleUploadError",value:function(e,n,o){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],n);if(r.retries++=s.length);)s[i++],this._errorProcessing(e,o||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.SUCCESS,this.emit("success",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.ERROR,this.emit("error",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}]),t}(a);u.initClass(),u.version="5.5.1",u.options={},u.optionsForElement=function(e){return e.getAttribute("id")?u.options[c(e.getAttribute("id"))]:void 0},u.instances=[],u.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},u.autoDiscover=!0,u.discover=function(){var e=void 0;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){for(var n=[],o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;/(^| )dropzone($| )/.test(i.className)?n.push(e.push(i)):n.push(void 0)}return n}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){for(var t=[],n=e,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;!1!==u.optionsForElement(s)?t.push(new u(s)):t.push(void 0)}return t}()},u.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],u.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=u.blacklistedBrowsers,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;r.test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},u.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),r=new Uint8Array(o),s=0,i=t.length,l=0<=i;l?s<=i:s>=i;l?s++:s--)r[s]=t.charCodeAt(s);return new Blob([o],{type:n})};var d=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},c=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};u.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},u.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},u.getElement=function(e,t){var n=void 0;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},u.getElements=function(e,t){var n=void 0,o=void 0;if(e instanceof Array){o=[];try{for(var r=e,s=0,r=r;!(s>=r.length);)n=r[s++],o.push(this.getElement(n,t))}catch(e){o=null}}else if("string"==typeof e){o=[];for(var i=document.querySelectorAll(e),l=0,i=i;!(l>=i.length);)n=i[l++],o.push(n)}else null!=e.nodeType&&(o=[e]);if(null==o||!o.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},u.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},u.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var n=e.type,o=n.replace(/\/.*$/,""),r=t,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;if(l=l.trim(),"."===l.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(l.toLowerCase(),e.name.length-l.length))return!0}else if(/\/\*$/.test(l)){if(o===l.replace(/\/.*$/,""))return!0}else if(n===l)return!0}return!1},void 0!==e&&null!==e&&(e.fn.dropzone=function(e){return this.each(function(){return new u(this,e)})}),void 0!==t&&null!==t?t.exports=u:window.Dropzone=u,u.ADDED="added",u.QUEUED="queued",u.ACCEPTED=u.QUEUED,u.UPLOADING="uploading",u.PROCESSING=u.UPLOADING,u.CANCELED="canceled",u.ERROR="error",u.SUCCESS="success";var p=function(e){var t=(e.naturalWidth,e.naturalHeight),n=document.createElement("canvas");n.width=1,n.height=t;var o=n.getContext("2d");o.drawImage(e,0,0);for(var r=o.getImageData(1,0,1,t),s=r.data,i=0,l=t,a=t;a>i;)0===s[4*(a-1)+3]?l=a:i=a,a=l+i>>1;var u=a/t;return 0===u?1:u},f=function(e,t,n,o,r,s,i,l,a,u){var d=p(t);return e.drawImage(t,n,o,r,s,i,l,a,u/d)},h=function(){function e(){r(this,e)}return l(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,o=void 0,r="",s=void 0,i=void 0,l=void 0,a="",u=0;n=e[u++],o=e[u++],r=e[u++],s=n>>2,i=(3&n)<<4|o>>4,l=(15&o)<<2|r>>6,a=63&r,isNaN(o)?l=a=64:isNaN(r)&&(a=64),t=t+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(a),n=o=r="",s=i=l=a="",ue.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,o="",r=void 0,s=void 0,i=void 0,l="",a=0,u=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(e.charAt(a++)),s=this.KEY_STR.indexOf(e.charAt(a++)),i=this.KEY_STR.indexOf(e.charAt(a++)),l=this.KEY_STR.indexOf(e.charAt(a++)),t=r<<2|s>>4,n=(15&s)<<4|i>>2,o=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(o),t=n=o="",r=s=i=l="",a0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var o=this.getColumnMetadataByName(e);return void 0===o||null===o?n:o.hasOwnProperty(t)?o[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,function(e){var n=l(t.columnMetadata,{columnName:e});return void 0===n||null===n||isNaN(n.order)?100:n.order})}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=r({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),o.createElement("div",null)):o.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=s},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t0&&(e=o.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=o.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,r=null,i=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},l),r=s({textAlign:"center",width:"33%"},l),n=s({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(o.createElement("option",{value:u,key:u},u));return o.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},o.createElement("div",{className:this.props.previousClassName,style:n},e),o.createElement("div",{className:"griddle-page",style:r},o.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),o.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/deep.js")),i=n("./node_modules/lodash/isFunction.js"),l=n("./node_modules/lodash/zipObject.js"),a=n("./node_modules/lodash/assign.js"),u=n("./node_modules/lodash/defaults.js"),d=n("./node_modules/lodash/toPairs.js"),c=n("./node_modules/lodash/without.js"),p=r({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var r=this.props.columnSettings.getColumns(),p=l(r,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(s.pick(f,c(r,"children"))),y=g.map(function(t,r){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===r&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===r&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===r&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==i&&null!==i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=o.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},u)}else s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},l,e.formatData(t[1]));return s||o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:r,style:n},l,t[1])});null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),y&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection&&(this.props.multipleSelectionSettings.getSelectedRowIds(),y.unshift(o.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},o.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"}))));var _=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?_="child-row":t.props.hasChildren&&(_=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),o.createElement("tr",{onClick:h,className:_},y)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/lodash/pick.js")),i=r({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return o.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(o.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var r=null;return e.state.showChildren&&(r=e.props.hasChildren&&this.props.data.children.map(function(t,n){var r=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return o.createElement("tr",{key:r,style:{paddingLeft:5}},o.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},o.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return o.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:r})})),!1===e.props.hasChildren?t[0]:o.createElement("tbody",null,e.state.showChildren?t.concat(r):t)}});e.exports=i},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/lodash/includes.js"),i=n("./node_modules/lodash/without.js"),l=n("./node_modules/lodash/find.js"),a=r({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,n){var r=s(e.props.selectedColumns,t),i=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(a=i.displayName),void 0!==i&&null!=i&&i.locked?o.createElement("div",{className:"column checkbox"},o.createElement("label",null,o.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:r,"data-name":t}),a)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:o.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},o.createElement("label",null,o.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:r,"data-name":t}),a))}));var n=e.props.enableToggleCustom?o.createElement("div",{className:"form-group"},o.createElement("label",{htmlFor:"maxRows"},o.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",r=this.props.showSetPageSize?o.createElement("div",null,o.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",o.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},o.createElement("option",{value:"5"},"5"),o.createElement("option",{value:"10"},"10"),o.createElement("option",{value:"25"},"25"),o.createElement("option",{value:"50"},"50"),o.createElement("option",{value:"100"},"100")))):"";return o.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},o.createElement("h6",null,this.props.settingsText),o.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),r,n)}});e.exports=a},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/griddle-react/modules/gridTitle.jsx.js"),i=n("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),l=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/rowProperties.js"),r({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var r={scrollTop:t,scrollHeight:n,clientHeight:o};this.setState(r)}.6*(n-(t+o)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,r=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var l=e.getAdjustedRowHeight(),a=Math.ceil(e.state.clientHeight/l),u=Math.max(0,Math.floor(e.state.scrollTop/l)-.25*a),d=Math.min(u+1.25*a,this.props.data.length-1);n=n.slice(u,d+1);var c={height:u*l+"px"};r=o.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};s=o.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map(function(n,r){var s=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,r);return s&&(t=s),o.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:l+"-container",uniqueId:l,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})});if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(o.createElement("tr",{key:"no-data-section"},o.createElement("td",{colSpan:h},this.props.noDataSection)))}return r&&f.unshift(r),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var r=null,i=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(r={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a=null,u=null;this.props.useGriddleStyles&&(a={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?o.createElement(this.props.externalLoadingComponent,null):o.createElement("div",null,"Loading...");i=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{style:a,colSpan:u},d)))}var c=this.props.showTableHeading?o.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=o.createElement("tbody",null,e));var p=o.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(l.tableLayout="fixed"),o.createElement("div",null,o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,i,p)))):o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,i,p))}}));e.exports=l},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t=0)return!0;return!1})},defaultColumnFilter:function(e,t,n){var o=P(I(n)?n:[n],function(e){return(e||"").toLowerCase()});return M(v.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),M(o,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce(function(n,o){return T(n,function(n){var r=v.getAt(n,o||""),s=e[o];return t(o||"",r,s)})},this.props.results),o={columnFilters:e};e?(o.filteredResults=n,o.maxPage=this.getMaxPage(o.filteredResults)):this.state.filter?o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):o.filteredResults=null,this.setState(o)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=k(n,t);else{var o={};o[t]=e,n=D({},n,o)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var n=this,o={page:0,filter:e};o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),o.maxPage=n.getMaxPage(o.filteredResults),(x(e)||A(e)||F(e))&&(o.filter=e,o.filteredResults=null),n.setState(o),this._resetSelectedRows()},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return void 0===e||null===e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,n={page:e};t.setState(n)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=I(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=S(this.props.columnMetadata,{columnName:e})||{},o=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],r=null,s=o.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);s=(s+1)%o.length,r=o[s]?o[s]:null;var i={page:0,sortColumn:e,sortDirection:r};this.setState(i)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=v.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,n){return e===t[n]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,P(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new y(this.props.results.length>0?v.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new _(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var o=this,r=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:i}),a={columns:[],orders:[]};if(l.length>0&&(s=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort(function(e,t){return s(R(e,i),R(t,i))}),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=N(e,function(e){return s(R(e,i))},[this.state.sortDirection]));else{var u=[function(e){return(R(e,i)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach(function(e,t){u.push(function(t){return(R(t,e)||"").toString().toLowerCase()}),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(o.state.sortDirection)}),e=N(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=j(e,(c+1)*this.state.resultsPerPage);else{var p=b(e,c*this.state.resultsPerPage);e=(E||w)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=r.getDataForRender(m[r.props.childrenColumnName],t,!1),"children"!==r.props.childrenColumnName&&delete m[r.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),o=this;C(e,function(e){o._updateSelectedRowIds(e[o.props.uniqueIdentifier],n,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),o=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],o,t);var r=this._getAreAllRowsChecked(o,P(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:r,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,r)},_updateSelectedRowIds:function(e,t,n){n?void 0===S(t,function(t){return e===t})&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===O(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!S(this.props.results,function(e){return"children"in e})&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?r.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):r.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?r.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,o=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),o=this.getSettingsStyles(),s=this.getClearFixStyles()),r.createElement("div",{className:"top-section",style:s},r.createElement("div",{className:"griddle-filter",style:n},e),r.createElement("div",{className:"griddle-settings-toggle",style:o},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return r.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?r.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):r.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?r.createElement(d,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return r.createElement(this.props.customGridComponent,o({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,o,s){return r.createElement("div",null,r.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&o)},getStandardGridSection:function(e,t,n,o,s){var i=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return r.createElement("div",{className:"griddle-body"},r.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:o,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,o,r,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,o,s):this.getStandardGridSection(e,t,n,o,r)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?r.createElement("div",{className:this.props.noDataClassName},r.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):r.createElement(c,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),o=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),l=this.getDataForRender(e,i,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?C(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)}):s=v.keys(k(e[0],a)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",r.createElement("div",{className:m},o,h,r.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n-1}var r=n("./node_modules/lodash/_baseIndexOf.js");e.exports=o},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function n(e,t,n){for(var o=-1,r=null==e?0:e.length;++o=d&&(p=u,f=!1,t=new r(t));e:for(;++c0&&n(d)?t>1?o(d,t-1,n,i,l):r(l,d):i||(l[l.length]=d)}return l}var r=n("./node_modules/lodash/_arrayPush.js"),s=n("./node_modules/lodash/_isFlattenable.js");e.exports=o},"./node_modules/lodash/_baseFor.js":function(e,t,n){var o=n("./node_modules/lodash/_createBaseFor.js"),r=o();e.exports=r},"./node_modules/lodash/_baseForOwn.js":function(e,t,n){function o(e,t){return e&&r(e,t,s)}var r=n("./node_modules/lodash/_baseFor.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_baseGet.js":function(e,t,n){function o(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var _=-1,v=h[0];e:for(;++_r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++ot||i&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!s)return 1;if(!o&&!i&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}var r=n("./node_modules/lodash/_compareAscending.js");e.exports=o},"./node_modules/lodash/_copyArray.js":function(e,t){function n(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n1?n[r-1]:void 0,l=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,l&&s(n[0],n[1],l)&&(i=r<3?void 0:i,r=1),t=Object(t);++o-1?l[a?t[u]:u]:void 0}}var r=n("./node_modules/lodash/_baseIteratee.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_createToPairs.js":function(e,t,n){function o(e){return function(t){var n=s(t);return n==a?i(t):n==u?l(t):r(t,e(t))}}var r=n("./node_modules/lodash/_baseToPairs.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/_mapToArray.js"),l=n("./node_modules/lodash/_setToPairs.js"),a="[object Map]",u="[object Set]";e.exports=o},"./node_modules/lodash/_customOmitClone.js":function(e,t,n){function o(e){return r(e)?void 0:e}var r=n("./node_modules/lodash/isPlainObject.js");e.exports=o},"./node_modules/lodash/_defineProperty.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},"./node_modules/lodash/_equalArrays.js":function(e,t,n){function o(e,t,n,o,u,d){var c=n&l,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var h=d.get(e);if(h&&d.get(t))return h==t;var m=-1,g=!0,y=n&a?new r:void 0;for(d.set(e,t),d.set(t,e);++m-1&&e%1==0&&e-1}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_listCacheSet.js":function(e,t,n){function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_mapCacheClear.js":function(e,t,n){function o(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}var r=n("./node_modules/lodash/_Hash.js"),s=n("./node_modules/lodash/_ListCache.js"),i=n("./node_modules/lodash/_Map.js");e.exports=o},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,n){function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheGet.js":function(e,t,n){function o(e){return r(this,e).get(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheHas.js":function(e,t,n){function o(e){return r(this,e).has(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheSet.js":function(e,t,n){function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapToArray.js":function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}e.exports=n},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function n(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},"./node_modules/lodash/_memoizeCapped.js":function(e,t,n){function o(e){var t=r(e,function(e){return n.size===s&&n.clear(),e}),n=t.cache;return t}var r=n("./node_modules/lodash/memoize.js"),s=500;e.exports=o},"./node_modules/lodash/_nativeCreate.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=o(Object,"create");e.exports=r},"./node_modules/lodash/_nativeKeys.js":function(e,t,n){var o=n("./node_modules/lodash/_overArg.js"),r=o(Object.keys,Object);e.exports=r},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},"./node_modules/lodash/_nodeUtil.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_freeGlobal.js"),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i&&o.process,a=function(){try{return s&&s.require&&s.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=a}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},"./node_modules/lodash/_overArg.js":function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},"./node_modules/lodash/_overRest.js":function(e,t,n){function o(e,t,n){return t=s(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,l=s(o.length-t,0),a=Array(l);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,r=16,s=Date.now;e.exports=n},"./node_modules/lodash/_stackClear.js":function(e,t,n){function o(){this.__data__=new r,this.size=0}var r=n("./node_modules/lodash/_ListCache.js");e.exports=o},"./node_modules/lodash/_stackDelete.js":function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},"./node_modules/lodash/_stackGet.js":function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},"./node_modules/lodash/_stackHas.js":function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},"./node_modules/lodash/_stackSet.js":function(e,t,n){function o(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(o=1);++n-1:!!d&&r(e,t,n)>-1}var r=n("./node_modules/lodash/_baseIndexOf.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/isString.js"),l=n("./node_modules/lodash/toInteger.js"),a=n("./node_modules/lodash/values.js"),u=Math.max;e.exports=o},"./node_modules/lodash/initial.js":function(e,t,n){function o(e){return(null==e?0:e.length)?r(e,0,-1):[]}var r=n("./node_modules/lodash/_baseSlice.js");e.exports=o},"./node_modules/lodash/intersection.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseIntersection.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_castArrayLikeObject.js"),l=s(function(e){var t=o(e,i);return t.length&&t[0]===e[0]?r(t):[]});e.exports=l},"./node_modules/lodash/isArguments.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsArguments.js"),r=n("./node_modules/lodash/isObjectLike.js"),s=Object.prototype,i=s.hasOwnProperty,l=s.propertyIsEnumerable,a=o(function(){return arguments}())?o:function(e){return r(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},"./node_modules/lodash/isArray.js":function(e,t){var n=Array.isArray;e.exports=n},"./node_modules/lodash/isArrayLike.js":function(e,t,n){function o(e){return null!=e&&s(e.length)&&!r(e)}var r=n("./node_modules/lodash/isFunction.js"),s=n("./node_modules/lodash/isLength.js");e.exports=o},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,n){function o(e){return s(e)&&r(e)}var r=n("./node_modules/lodash/isArrayLike.js"),s=n("./node_modules/lodash/isObjectLike.js");e.exports=o},"./node_modules/lodash/isBuffer.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_root.js"),r=n("./node_modules/lodash/stubFalse.js"),s="object"==typeof t&&t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===s,a=l?o.Buffer:void 0,u=a?a.isBuffer:void 0,d=u||r;e.exports=d}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,n){function o(e){if(null==e)return!0;if(a(e)&&(l(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=s(e);if(t==p||t==f)return!e.size;if(d(e))return!r(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}var r=n("./node_modules/lodash/_baseKeys.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/isArguments.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/isArrayLike.js"),u=n("./node_modules/lodash/isBuffer.js"),d=n("./node_modules/lodash/_isPrototype.js"),c=n("./node_modules/lodash/isTypedArray.js"),p="[object Map]",f="[object Set]",h=Object.prototype,m=h.hasOwnProperty;e.exports=o},"./node_modules/lodash/isFunction.js":function(e,t,n){function o(e){if(!s(e))return!1;var t=r(e);return t==l||t==a||t==i||t==u}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObject.js"),i="[object AsyncFunction]",l="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=o},"./node_modules/lodash/isLength.js":function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=n},"./node_modules/lodash/isMap.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsMap.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isMap,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isNull.js":function(e,t){function n(e){return null===e}e.exports=n},"./node_modules/lodash/isObject.js":function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},"./node_modules/lodash/isObjectLike.js":function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},"./node_modules/lodash/isPlainObject.js":function(e,t,n){function o(e){if(!i(e)||r(e)!=l)return!1;var t=s(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==p}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/_getPrototype.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object Object]",a=Function.prototype,u=Object.prototype,d=a.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=o},"./node_modules/lodash/isSet.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsSet.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isSet,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isString.js":function(e,t,n){function o(e){return"string"==typeof e||!s(e)&&i(e)&&r(e)==l}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isArray.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object String]";e.exports=o},"./node_modules/lodash/isSymbol.js":function(e,t,n){function o(e){return"symbol"==typeof e||s(e)&&r(e)==i}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObjectLike.js"),i="[object Symbol]";e.exports=o},"./node_modules/lodash/isTypedArray.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsTypedArray.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isTypedArray,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isUndefined.js":function(e,t){function n(e){return void 0===e}e.exports=n},"./node_modules/lodash/keys.js":function(e,t,n){function o(e){return i(e)?r(e):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeys.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/keysIn.js":function(e,t,n){function o(e){return i(e)?r(e,!0):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeysIn.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/last.js":function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},"./node_modules/lodash/map.js":function(e,t,n){function o(e,t){return(l(e)?r:i)(e,s(t,3))}var r=n("./node_modules/lodash/_arrayMap.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseMap.js"),l=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/memoize.js":function(e,t,n){function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],s=n.cache;if(s.has(r))return s.get(r);var i=e.apply(this,o);return n.cache=s.set(r,i)||s,i};return n.cache=new(o.Cache||r),n}var r=n("./node_modules/lodash/_MapCache.js"),s="Expected a function";o.Cache=r,e.exports=o},"./node_modules/lodash/omit.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseClone.js"),s=n("./node_modules/lodash/_baseUnset.js"),i=n("./node_modules/lodash/_castPath.js"),l=n("./node_modules/lodash/_copyObject.js"),a=n("./node_modules/lodash/_customOmitClone.js"),u=n("./node_modules/lodash/_flatRest.js"),d=n("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=o(t,function(t){return t=i(t,e),u||(u=t.length>1),t}),l(e,d(e),n),u&&(n=r(n,7,a));for(var c=t.length;c--;)s(n,t[c]);return n});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,n){function o(e,t,n,o){return null==e?[]:(s(t)||(t=null==t?[]:[t]),n=o?void 0:n,s(n)||(n=null==n?[]:[n]),r(e,t,n))}var r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/pick.js":function(e,t,n){var o=n("./node_modules/lodash/_basePick.js"),r=n("./node_modules/lodash/_flatRest.js"),s=r(function(e,t){return null==e?{}:o(e,t)});e.exports=s},"./node_modules/lodash/property.js":function(e,t,n){function o(e){return i(e)?r(l(e)):s(e)}var r=n("./node_modules/lodash/_baseProperty.js"),s=n("./node_modules/lodash/_basePropertyDeep.js"),i=n("./node_modules/lodash/_isKey.js"),l=n("./node_modules/lodash/_toKey.js");e.exports=o},"./node_modules/lodash/some.js":function(e,t,n){function o(e,t,n){var o=l(e)?r:i;return n&&a(e,t,n)&&(t=void 0),o(e,s(t,3))}var r=n("./node_modules/lodash/_arraySome.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseSome.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/_isIterateeCall.js");e.exports=o},"./node_modules/lodash/sortBy.js":function(e,t,n){var o=n("./node_modules/lodash/_baseFlatten.js"),r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_isIterateeCall.js"),l=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,o(t,1),[])});e.exports=l},"./node_modules/lodash/stubArray.js":function(e,t){function n(){return[]}e.exports=n},"./node_modules/lodash/stubFalse.js":function(e,t){function n(){return!1}e.exports=n},"./node_modules/lodash/take.js":function(e,t,n){function o(e,t,n){return e&&e.length?(t=n||void 0===t?1:s(t),r(e,0,t<0?0:t)):[]}var r=n("./node_modules/lodash/_baseSlice.js"),s=n("./node_modules/lodash/toInteger.js");e.exports=o},"./node_modules/lodash/toFinite.js":function(e,t,n){function o(e){return e?(e=r(e))===s||e===-s?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}var r=n("./node_modules/lodash/toNumber.js"),s=1/0,i=1.7976931348623157e308;e.exports=o},"./node_modules/lodash/toInteger.js":function(e,t,n){function o(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}var r=n("./node_modules/lodash/toFinite.js");e.exports=o},"./node_modules/lodash/toNumber.js":function(e,t,n){function o(e){if("number"==typeof e)return e;if(s(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=u.test(e);return n||d.test(e)?c(e.slice(2),n?2:8):a.test(e)?i:+e}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/isSymbol.js"),i=NaN,l=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=o},"./node_modules/lodash/toPairs.js":function(e,t,n){var o=n("./node_modules/lodash/_createToPairs.js"),r=n("./node_modules/lodash/keys.js"),s=o(r);e.exports=s},"./node_modules/lodash/toString.js":function(e,t,n){function o(e){return null==e?"":r(e)}var r=n("./node_modules/lodash/_baseToString.js");e.exports=o},"./node_modules/lodash/uniqueId.js":function(e,t,n){function o(e){var t=++s;return r(e)+t}var r=n("./node_modules/lodash/toString.js"),s=0;e.exports=o},"./node_modules/lodash/values.js":function(e,t,n){function o(e){return null==e?[]:r(e,s(e))}var r=n("./node_modules/lodash/_baseValues.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/without.js":function(e,t,n){var o=n("./node_modules/lodash/_baseDifference.js"),r=n("./node_modules/lodash/_baseRest.js"),s=n("./node_modules/lodash/isArrayLikeObject.js"),i=r(function(e,t){return s(e)?o(e,t):[]});e.exports=i},"./node_modules/lodash/zipObject.js":function(e,t,n){function o(e,t){return s(e||[],t||[],r)}var r=n("./node_modules/lodash/_assignValue.js"),s=n("./node_modules/lodash/_baseZipObject.js");e.exports=o},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,a=o(e),u=1;u1)for(var n=1;n1?t-1:0),o=1;o2?n-2:0),r=2;r1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function v(e){function t(t,n,o,r,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var i=t[n],a=w(i);if("object"!==a)return new f("Invalid "+r+" `"+s+"` of type `"+a+"` supplied to `"+o+"`, expected an object.");for(var d in i)if(u(i,d)){var c=e(i,d,o,r,s+"."+d,l);if(c instanceof Error)return c}return null}return h(t)}function b(e){function n(t,n,o,r,s){for(var i=0;in+l||t+r-ao+i)};t.default=function(e,t,n){var o=e instanceof HTMLElement?(0,r.default)(e):e,i=t instanceof HTMLElement?(0,r.default)(t):t;return s(o.top,o.left,i.top,i.left,o.offsetWidth,o.offsetHeight,i.offsetWidth,i.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function o(t){var n=m,o=g;return m=g=void 0,E=t,_=e.apply(o,n)}function s(e){return E=e,v=setTimeout(d,t),w?o(e):_}function i(e){var n=e-b,o=e-E,r=t-n;return O?j(r,y-o):r}function a(e){var n=e-b,o=e-E;return void 0===b||n>=t||n<0||O&&o>=y}function d(){var e=C();if(a(e))return c(e);v=setTimeout(d,i(e))}function c(e){return v=void 0,I&&m?o(e):(m=g=void 0,_)}function p(){void 0!==v&&clearTimeout(v),E=0,m=b=g=v=void 0}function f(){return void 0===v?_:c(C())}function h(){var e=C(),n=a(e);if(m=arguments,g=this,b=e,n){if(void 0===v)return s(b);if(O)return v=setTimeout(d,t),o(b)}return void 0===v&&(v=setTimeout(d,t)),_}var m,g,y,_,v,b,E=0,w=!1,O=!1,I=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,r(n)&&(w=!!n.leading,O="maxWait"in n,y=O?S(l(n.maxWait)||0,t):y,I="trailing"in n?!!n.trailing:I),h.cancel=p,h.flush=f,h}function o(e,t,o){var s=!0,i=!0;if("function"!=typeof e)throw new TypeError(u);return r(o)&&(s="leading"in o?!!o.leading:s,i="trailing"in o?!!o.trailing:i),n(e,t,{leading:s,maxWait:t,trailing:i})}function r(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function i(e){return"symbol"==(void 0===e?"undefined":a(e))||s(e)&&E.call(e)==c}function l(e){if("number"==typeof e)return e;if(i(e))return d;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=h.test(e);return n||m.test(e)?g(e.slice(2),n?2:8):f.test(e)?d:+e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="Expected a function",d=NaN,c="[object Symbol]",p=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,y="object"==(void 0===t?"undefined":a(t))&&t&&t.Object===Object&&t,_="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,v=y||_||Function("return this")(),b=Object.prototype,E=b.toString,S=Math.max,j=Math.min,C=function(){return v.Date.now()};e.exports=o}).call(t,n(19))},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o},function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n2});return t<2?p.default.createElement(m.Button,{className:n,key:e.value,onClick:this.handleChangeValue,value:e.value,color:e.color},e.label):p.default.createElement(m.DropdownItem,{type:"button",className:n,key:e.value,onClick:this.handleChangeValue,value:e.value},e.label)}},{key:"render",value:function(){var e=this;if(!this.props.items.length)return null;var t=this.props.actions.filter(function(t){return!t.canApply||t.canApply(e.props.items)});if(t=t.map(this.renderChild),!t.length)return null;var n=this.props,o=n.ActionMenu,r=n.showCount,s=this.props.items.length;return p.default.createElement("div",{className:"bulk-actions fieldholder-small"},r&&p.default.createElement("div",{className:"bulk-actions-counter"},s),t.slice(0,2),t.length>2&&o?p.default.createElement(o,{id:"BulkActions",className:"bulk-actions__more-actions-menu"},t.slice(2)):t.slice(2))}}]),t}(c.Component);b.propTypes={items:v.default.array,actions:v.default.arrayOf(v.default.shape({value:v.default.string.isRequired,label:v.default.string.isRequired,className:v.default.string,destructive:v.default.bool,callback:v.default.func,canApply:v.default.func,confirm:v.default.func})),ActionMenu:v.default.oneOfType([v.default.node,v.default.func]),showCount:v.default.bool},b.defaultProps={items:[],actions:[],ActionMenu:null,total:null,showCount:!0,totalReachedMessage:d.default._t("")};var E=(0,f.connect)(l)(b);t.Component=b,t.default=(0,h.inject)(["ActionMenu"],function(e){return{ActionMenu:e}},function(){return"BulkActions"})(E)},"./client/src/components/GalleryItem/GalleryItem.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.item.thumbnail&&"image"===e.item.category&&e.item.exists&&!e.item.queuedId&&e.sectionConfig.imageRetry.minRetry&&e.sectionConfig.imageRetry.maxRetry}function d(e,t){if(u(t)){var n=e.assetAdmin.imageLoad,o=n.files.find(function(e){return t.item.thumbnail===e.url});return{loadState:o&&o.status||L.default.NONE}}return{loadState:L.default.DISABLED}}function c(e){return{actions:{imageLoad:(0,D.bindActionCreators)(R,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.File=t.Folder=t.Component=void 0;var p=Object.assign||function(e){for(var t=1;t0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"uploading",value:function(){return this.props.item.queuedId&&!this.saved()}},{key:"exists",value:function(){return this.props.item.exists}},{key:"isImage",value:function(){return"image"===this.props.item.category}},{key:"canBatchSelect",value:function(){return this.props.selectable&&this.props.item.canEdit}},{key:"hasError",value:function(){var e=!1;return this.props.item.message&&(e="error"===this.props.item.message.type),e}},{key:"handleActivate",value:function(e){e.stopPropagation(),"function"==typeof this.props.onActivate&&this.saved()&&this.props.onActivate(e,this.props.item)}},{key:"handleSelect",value:function(e){e.stopPropagation(),e.preventDefault(),"function"==typeof this.props.onSelect&&this.props.onSelect(e,this.props.item)}},{key:"handleKeyDown",value:function(e){E.default.SPACE_KEY_CODE===e.keyCode&&(e.preventDefault(),this.canBatchSelect()&&this.handleSelect(e)),E.default.RETURN_KEY_CODE===e.keyCode&&this.handleActivate(e)}},{key:"handleCancelUpload",value:function(e){e.stopPropagation(),e.preventDefault(),this.hasError()?this.props.onRemoveErroredUpload(this.props.item):this.props.onCancelUpload&&this.props.onCancelUpload(this.props.item)}},{key:"render",value:function(){var e=this,t=null,n=null,o=null,r=this.props.item,s=r.id,i=r.queuedId,l=s?"item-"+s:"queued-"+i;if(this.props.selectable&&(this.canBatchSelect()&&(t=this.handleSelect),n="font-icon-tick"),this.uploading())t=this.handleCancelUpload,n="font-icon-cancel";else if(this.exists()){var a=m.default._t("AssetAdmin.DETAILS","Details");o=y.default.createElement("div",{className:"gallery-item--overlay font-icon-edit"},a)}var u=this.props.badge,d={className:"gallery-item__checkbox",type:"checkbox",title:m.default._t("AssetAdmin.SELECT","Select"),tabIndex:-1,onMouseDown:B,id:l},c=["gallery-item__checkbox-label",n];this.canBatchSelect()||(d.disabled=!0,c.push("gallery-item__checkbox-label--disabled"));var f={className:c.join(" "),onClick:t};return y.default.createElement("div",{className:this.getItemClassNames(),"data-id":this.props.item.id,tabIndex:0,role:"button",onKeyDown:this.handleKeyDown,onClick:this.handleActivate},!!u&&y.default.createElement(A.default,{className:"gallery-item__badge",status:u.status,message:u.message}),y.default.createElement("div",{ref:function(t){e.thumbnail=t},className:this.getThumbnailClassNames(),style:this.getThumbnailStyles()},o,this.getStatusFlags()),this.getProgressBar(),this.getErrorMessage(),this.props.children,y.default.createElement("div",{className:"gallery-item__title",ref:function(t){e.title=t}},y.default.createElement("label",p({},f,{htmlFor:l}),y.default.createElement("input",d)),this.props.item.title))}}]),t}(g.Component);q.propTypes={sectionConfig:k.default,item:j.default,loadState:G.default.oneOf(Object.values(L.default)),highlighted:G.default.bool,selected:G.default.bool,isDropping:G.default.bool,isDragging:G.default.bool,message:G.default.shape({value:G.default.string,type:G.default.string}),selectable:G.default.bool,onActivate:G.default.func,onSelect:G.default.func,onCancelUpload:G.default.func,onRemoveErroredUpload:G.default.func,badge:G.default.shape({status:G.default.string,message:G.default.string}),updateStatusFlags:G.default.func,updateProgressBar:G.default.func,updateErrorMessage:G.default.func},q.defaultProps={item:{},sectionConfig:{imageRetry:{}},updateStatusFlags:function(e){return e},updateProgressBar:function(e){return e},updateErrorMessage:function(e){return e}};var H=(0,P.connect)(d,c)(q),z=(0,T.createSelectable)((0,w.default)("GalleryItem")(H)),V=(0,T.createSelectable)((0,I.default)("GalleryItem")(z));t.Component=q,t.Folder=V,t.File=z,t.default=H},"./client/src/components/GalleryItem/GalleryItemDragLayer.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?d.default.createElement("div",{key:"1",className:"gallery-item__drag-shadow"}):null,t>2?d.default.createElement("div",{key:"2",className:"gallery-item__drag-shadow gallery-item__drag-shadow--second"}):null];return d.default.createElement("div",{className:"gallery-item__drag-layer"},d.default.createElement("div",{className:"gallery-item__drag-layer-item",style:this.getOffset()},d.default.createElement("div",{className:"gallery-item__drag-layer-preview"},n,d.default.createElement(m.default,l({},e.props,{isDragging:!0}))),t>1?d.default.createElement(y.default,{className:"gallery-item__drag-layer-count",status:"info",message:""+t}):null))}}]),t}(u.Component);_.propTypes={item:p.default.object,offset:p.default.shape({x:p.default.number.isRequired,y:p.default.number.isRequired}),isDragging:p.default.bool.isRequired};var v=function(e){return{item:e.getItem(),offset:e.getInitialClientOffset(),dragged:e.getDifferenceFromInitialOffset(),isDragging:e.isDragging()}};t.default=(0,f.DragLayer)(v)(_)},"./client/src/components/GalleryItem/draggable.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t={canDrag:function(e){return e.canDrag},beginDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!0,t);var n=e.selectedFiles.concat([]);return n.includes(t)||n.push(t),{selected:n,props:e}},endDrag:function(e){var t=e.item.id;"function"==typeof e.onDrag&&e.onDrag(!1,t)}},n=function(e,t){return{connectDragPreview:e.dragPreview(),connectDragSource:e.dragSource(),isDragging:t.isDragging()}},o=(0,f.DragSource)(e,t,n);return function(e){var t=function(t){function n(){return r(this,n),s(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return i(n,t),a(n,[{key:"componentDidMount",value:function(){this.props.connectDragPreview((0,h.getEmptyImage)(),{captureDraggingState:!0})}},{key:"render",value:function(){var t=this.props.connectDragSource,n=d.default.createElement(e,this.props);return t("string"==typeof n.type?n:d.default.createElement("div",{className:"gallery-item__draggable"},n))}}]),n}(u.Component);return t.propTypes={connectDragSource:p.default.func.isRequired,connectDragPreview:p.default.func.isRequired,item:p.default.shape({id:p.default.number.isRequired}).isRequired,onDrag:p.default.func,selectedFiles:p.default.arrayOf(p.default.number)},o(t)}}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&r<100?f.default.createElement("div",{className:"preview-image-field__progress"},f.default.createElement("div",{className:"preview-image-field__progress-bar",style:{width:r+"%"}})):null,d=null;return s?d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--"+s.type},s.value):100===r&&(d=f.default.createElement("div",{className:"preview-image-field__message preview-image-field__message--success"},c.default._t("AssetAdmin.REPlACE_FILE_SUCCESS","Upload successful, the file will be replaced when you Save."),(r||s)&&f.default.createElement("button",{onClick:this.handleCancelUpload,className:"preview-image-field__message-button btn btn-outline-light",type:"button"},c.default._t("AssetAdmin.REPLACE_FILE_UNDO","Undo")))),f.default.createElement("div",{className:"editor__thumbnail-container"},a||l,u,d)}},{key:"render",value:function(){var e=this.getDropzoneProps();if(this.canEdit())return f.default.createElement(m.default,e,this.renderImage());var t=["preview-image-field__container",this.props.className,this.props.extraClass];return f.default.createElement("div",{className:t.join(" ")},this.renderImage())}}]),t}(p.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string,className:A.default.string,extraClass:A.default.string,readOnly:A.default.bool,disabled:A.default.bool,onAutofill:A.default.func,formid:A.default.string,nameValue:A.default.string,data:A.default.shape({id:A.default.number,parentid:A.default.number,version:A.default.number,url:A.default.string,mock:A.default.bool,exists:A.default.bool,preview:A.default.string,category:A.default.string,nameField:A.default.string,uploadFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string}),initialValues:A.default.object}).isRequired,upload:A.default.shape({url:A.default.string,progress:A.default.number,xhr:A.default.object,category:A.default.string,message:A.default.shape({type:A.default.string.isRequired,value:A.default.string.isRequired})}),actions:A.default.object,securityID:A.default.string,confirm:A.default.func},x.defaultProps={extraClass:"",className:"",data:{},upload:{},confirm:function(e){return window.confirm(e)}},t.Component=x,t.default=(0,_.connect)(l,a)(x)},"./client/src/components/ProportionConstraintField/ProportionConstraintField.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n0&&(!e.message||"error"!==e.message.type)}).length;return Math.max(e-t,0)}},{key:"getFolderId",value:function(){var e=this.state.selectingItem;return e&&"object"===(void 0===e?"undefined":c(e))?e.parent.id:this.props.data.parentid||0}},{key:"handleAddedFile",value:function(e){var t=d({},e,{uploaded:!0});this.props.actions.uploadField.addFile(this.props.id,t)}},{key:"handleSending",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.uploadField.updateQueuedFile(this.props.id,e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.uploadField.succeedUpload(this.props.id,e._queuedId,t[0])}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.uploadField.failUpload(this.props.id,e._queuedId,t)}},{key:"handleItemRemove",value:function(e,t){this.props.actions.uploadField.removeFile(this.props.id,t)}},{key:"handleReplaceShow",value:function(e,t){this.setState({selecting:!0,selectingItem:t})}},{key:"handleChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if("function"==typeof t.onChange){var n=t.files.filter(function(e){return e.id}).map(function(e){return e.id}),o={Files:n};t.onChange(e,{id:t.id,value:o})}}},{key:"handleUploadButton",value:function(e){e.preventDefault()}},{key:"handleAddShow",value:function(e){e.preventDefault(),this.setState({selecting:!0,selectingItem:null})}},{key:"handleHide",value:function(){this.setState({selecting:!1,selectingItem:null})}},{key:"handleAddInsert",value:function(e,t,n){return this.props.actions.uploadField.addFile(this.props.id,n),this.handleHide(),Promise.resolve({})}},{key:"handleInsertMany",value:function(e,t){var n=this;if(this.state.selectingItem)return void this.handleReplace(e,null,t[0]);t.forEach(function(t){n.handleAddInsert(e,null,t)})}},{key:"handleReplace",value:function(e,t,n){var o=this.state.selectingItem,r=this.props,s=r.id,i=r.actions.uploadField,l=i.addFile,a=i.removeFile;if(!o)throw new Error("Tried to replace a file when none was selected.");return a(s,o),l(s,n),this.handleHide(),Promise.resolve({})}},{key:"canEdit",value:function(){return!this.props.disabled&&!this.props.readOnly&&(this.props.data.canUpload||this.props.data.canAttach)}},{key:"canUpload",value:function(){return this.canEdit()&&this.props.data.canUpload}},{key:"canAttach",value:function(){return this.canEdit()&&this.props.data.canAttach}},{key:"renderDropzone",value:function(){var e=this.props.AssetDropzone;if(!this.props.data.createFileEndpoint)return null;var t={height:E.default.SMALL_THUMBNAIL_HEIGHT,width:E.default.SMALL_THUMBNAIL_WIDTH},n=this.getMaxFiles(),o={url:this.props.data.createFileEndpoint.url,method:this.props.data.createFileEndpoint.method,paramName:"Upload",maxFiles:n,thumbnailWidth:E.default.SMALL_THUMBNAIL_WIDTH,thumbnailHeight:E.default.SMALL_THUMBNAIL_HEIGHT},r=["uploadfield__dropzone"];if(0===n&&r.push("uploadfield__dropzone--hidden"),!this.canEdit())return this.props.files.length?null:g.default.createElement("p",null,h.default._t("AssetAdmin.EMPTY","No files"));var s=this.props.securityId,i=[];return this.canUpload()&&i.push(g.default.createElement("button",{key:"uploadbutton",type:"button",onClick:this.handleUploadButton,className:"uploadfield__upload-button"},h.default._t("AssetAdmin.UPLOADFIELD_UPLOAD_NEW","Upload new"))),this.canAttach()&&(i.length&&i.push(g.default.createElement("span",{key:"uploadjoin",className:"uploadfield__join"},h.default._t("AssetAdmin.OR","or"))),i.push(g.default.createElement("button",{key:"attachbutton",type:"button",onClick:this.handleAddShow,className:"uploadfield__add-button"},h.default._t("AssetAdmin.UPLOADFIELD_CHOOSE_EXISTING","Choose existing")))),g.default.createElement(e,{name:this.props.name,canUpload:this.canUpload(),uploadButton:!1,uploadSelector:".uploadfield__upload-button, .uploadfield__backdrop",folderId:this.props.data.parentid,onAddedFile:this.handleAddedFile,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:t,options:o,securityID:s,className:r.join(" ")},g.default.createElement("div",{className:"uploadfield__backdrop"}),g.default.createElement("span",{className:"uploadfield__droptext"},i))}},{key:"renderModal",value:function(){var e=this.props.InsertMediaModal,t=this.state,n=t.selecting,o=t.selectingItem,r=this.getMaxFiles(),s=this.getFolderId();return g.default.createElement(e,{title:!1,isOpen:n,onInsert:o?this.handleReplace:this.handleAddInsert,onClosed:this.handleHide,onInsertMany:this.handleInsertMany,maxFiles:o?1:r,type:"select",bodyClassName:"modal__dialog",className:"insert-media-react__dialog-wrapper",fileAttributes:o?{ID:o.id}:null,folderId:s})}},{key:"renderChild",value:function(e,t){var n=this.props.UploadFieldItem,o={key:e.id?"file-"+e.id:"queued-"+e.queuedId,item:e,name:this.props.name,onRemove:this.handleItemRemove,canEdit:this.canEdit(),onView:this.handleReplaceShow},r=this.props.getItemProps(o,t,this.props);return g.default.createElement(n,r)}},{key:"render",value:function(){return g.default.createElement("div",{className:"uploadfield"},this.renderDropzone(),this.props.files.map(this.renderChild),this.renderModal())}}]),t}(m.Component);x.propTypes={id:A.default.string.isRequired,name:A.default.string.isRequired,onChange:A.default.func,value:A.default.shape({Files:A.default.arrayOf(A.default.number)}),files:A.default.arrayOf(w.default),readOnly:A.default.bool,disabled:A.default.bool,data:A.default.shape({files:A.default.arrayOf(w.default),createFileEndpoint:A.default.shape({url:A.default.string.isRequired,method:A.default.string.isRequired,payloadFormat:A.default.string.isRequired}),multi:A.default.bool,parentid:A.default.number,canUpload:A.default.bool,canAttach:A.default.bool,maxFiles:A.default.number}),UploadFieldItem:A.default.oneOfType([A.default.node,A.default.func]),AssetDropzone:A.default.oneOfType([A.default.node,A.default.func]),InsertMediaModal:A.default.oneOfType([A.default.node,A.default.func]),getItemProps:A.default.func},x.defaultProps={value:{Files:[]},className:"",getItemProps:function(e){return e}};var k=(0,y.connect)(a,u)(x);t.Component=x,t.ConnectedUploadField=k,t.default=(0,_.compose)((0,v.inject)(["UploadFieldItem","AssetDropzone","InsertMediaModal"]),j.default)(k)},"./client/src/components/UploadField/UploadFieldItem.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0}},{key:"missing",value:function(){return!this.exists()&&this.saved()}},{key:"isImageSmallerThanThumbnail",value:function(){if(!this.isImage()||this.missing())return!1;var e=this.props.item.width,t=this.props.item.height;return t&&e&&t0}).length)return alert(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FOLDER","These folders contain files which are currently in use, you must move or delete their contents before you can delete the folder.")),void n("cancelled");var o=e.filter(function(e){return"folder"!==e.type&&e.inUseCount>0}),s=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_CONFIRM","Are you sure you want to delete these files?");1===e.length&&1===o.length?s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),e[0].inUseCount):o.length>0&&(s=r.default.sprintf(r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_MULTI_CONFIRM","There are %s files currently in use, are you sure you want to delete these files?"),o.length)),o.length>0&&(s+="\n\n",s+=r.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(s)?t():n("cancelled")})})},{value:"edit",label:r.default._t("AssetAdmin.BULK_ACTIONS_EDIT","Edit"),className:"font-icon-edit",destructive:!1,canApply:function(e){return 1===e.length},callback:null},{value:"move",label:r.default._t("AssetAdmin.BULK_ACTIONS_MOVE","Move"),className:"font-icon-folder-move",canApply:function(e){return e.every(function(e){return e&&e.canEdit})},destructive:!1,callback:null},{value:"publish",label:r.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH","Publish"),className:"font-icon-rocket",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e&&!e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"unpublish",label:r.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH","Unpublish"),className:"font-icon-cancel-circled",destructive:!1,callback:null,canApply:function(e){return e.some(function(e){return e.published})&&e.every(function(e){return e.canEdit&&"folder"!==e.type})},confirm:null},{value:"insert",label:r.default._t("AssetAdmin.BULK_ACTIONS_INSERT","Insert"),className:"font-icon-plus-circled btn-primary",destructive:!1,callback:null,canApply:function(e){return e.length},confirm:null}],BULK_ACTIONS_PLACEHOLDER:r.default._t("AssetAdmin.BULK_ACTIONS_PLACEHOLDER"),SPACE_KEY_CODE:32,RETURN_KEY_CODE:13,DEFAULT_PREVIEW:"framework/client/dist/images/app_icons/generic_92.png",MODAL_MOVE:"MODAL_MOVE"}},"./client/src/containers/AssetAdmin/AssetAdmin.js":function(e,t,n){"use strict";function o(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 s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1])||arguments[1];return S.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:this.props.securityId}}:{}))}},{key:"handleBackButtonClick",value:function(e){e.preventDefault(),this.props.actions.gallery.deselectFiles(),this.props.folder?this.handleOpenFolder(this.props.folder.parentId||0):this.handleOpenFolder(0)}},{key:"resetFile",value:function(e){e.queuedId&&this.props.actions.queuedFiles.removeQueuedFile(e.queuedId),this.props.fileId===e.id&&(this.handleCloseFile(),this.handleOpenFile(e.id))}},{key:"handleFolderIcon",value:function(e){e.preventDefault(),this.handleOpenFile(this.getFolderId())}},{key:"handleOpenFile",value:function(e){this.handleBrowse(this.getFolderId(),e,this.props.query)}},{key:"handleSubmitEditor",value:function(e,t,n){var o=this,r=null;if("action_insert"===t&&"select"===this.props.type){var s=this.getFiles(),i=s.find(function(t){return t.id===parseInt(e.ID,10)});return this.props.onInsertMany(null,[i]),Promise.resolve()}if("function"==typeof this.props.onSubmitEditor){var l=this.findFile(this.props.fileId);r=this.props.onSubmitEditor(e,t,n,l)}else r=n();if(!r)throw new Error("Promise was not returned for submitting");return r.then(function(e){return"action_createfolder"===t&&"admin"===o.props.type&&o.handleOpenFile(e.record.id),o.props.actions.files.readFiles().then(function(){return"action_createfolder"===t&&"admin"!==o.props.type&&o.handleOpenFolder(o.getFolderId()),e})})}},{key:"handleCloseFile",value:function(){this.handleBrowse(this.getFolderId(),null,this.props.query)}},{key:"handleOpenFolder",value:function(e){var t=Object.assign({},this.props.query);delete t.page,delete t.filter,this.handleBrowse(e,null,t)}},{key:"handleDelete",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for deletion cannot be found: "+e);return n.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(n.queuedId),n}),o=n.map(function(e){return e.id}),r=this.props.folder?this.props.folder.id:0;return this.props.actions.files.deleteFiles(o,r).then(function(e){var n=e.data.deleteFiles;return t.handleBrowse(r,null,t.props.query),t.props.queuedFiles.items.filter(function(e){return o.includes(e.id)}).forEach(function(e){e.queuedId&&t.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),t.props.actions.files.readFiles(),n})}},{key:"doUnpublish",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for unpublishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot unpublish folders");return n}),r=o.map(function(e){return e.id});return this.props.actions.files.unpublishFiles(r,n).then(function(e){var n=e.data.unpublishFiles,o=n.filter(function(e){return"File"===e.__typename}),r=n.filter(function(e){return"PublicationNotice"===e.__typename&&"HAS_OWNERS"===e.Type}),s=o.map(function(e){return t.resetFile(e),e}),i=r.slice(0,4),l=r.slice(5),a=i.map(function(e){return e.Message});if(l.length&&a.push(C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_REMAINING","And {count} other file(s)"),{count:l.length})),i.length){var u=[C.default.inject(C.default._t("AssetAdmin.BULK_OWNED_WARNING_HEADING","{count} file(s) are being used by other published content."),{count:r.length}),a.join("\n"),C.default._t("AssetAdmin.BULK_OWNED_WARNING_FOOTER","Unpublishing will only remove files from the published version of the content. They will remain on the draft version. Unpublish anyway?")];if(confirm(u.join("\n\n"))){var d=r.reduce(function(e,t){return e.concat(t.IDs)},[]);return t.doUnpublish(d,!0).then(function(e){return s.concat(e)})}}return s})}},{key:"handleUnpublish",value:function(e){var t=this;return this.doUnpublish(e).then(function(e){var n=t.props.fileId;t.props.actions.files.readFiles().then(function(){n&&e.find(function(e){return e.id===n})&&(t.handleCloseFile(),t.handleOpenFile(n))})})}},{key:"doPublish",value:function(e){var t=this,n=e.map(function(e){var n=t.findFile(e);if(!n)throw new Error("File selected for publishing cannot be found: "+e);if("folder"===n.type)throw new Error("Cannot publish folders");return n}),o=n.map(function(e){return e.id});return this.props.actions.files.publishFiles(o).then(function(e){return e.data.publishFiles.filter(function(e){return"File"===e.__typename}).map(function(e){return t.resetFile(e),e})})}},{key:"findFile",value:function(e){return this.getFiles().find(function(t){return t.id===parseInt(e,10)})}},{key:"handleUpload",value:function(){}},{key:"handleUploadQueue",value:function(){this.props.fileId&&this.props.actions.files.readFiles()}},{key:"handleCreateFolder",value:function(){this.props.onBrowse(this.getFolderId(),null,this.props.query,te.default.ACTIONS.CREATE_FOLDER)}},{key:"handleMoveFilesSuccess",value:function(e,t){var n=this;this.props.queuedFiles.items.filter(function(e){return t.includes(e.id)}).forEach(function(e){e.queuedId&&n.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}),this.props.actions.gallery.deselectFiles(),this.props.actions.files.readFiles()}},{key:"renderGallery",value:function(){var e=this.props.sectionConfig,t=e.createFileEndpoint.url,n=e.createFileEndpoint.method,o=this.props.query&&parseInt(this.props.query.limit||e.limit,10),r=this.props.query&&parseInt(this.props.query.page||1,10),s=this.props.query&&this.props.query.sort,i=this.props.query&&this.props.query.view,l=this.props.query.filter||{};return g.default.createElement(L.default,{files:this.getFiles(),fileId:this.props.fileId,folderId:this.getFolderId(),folder:this.props.folder,type:this.props.type,limit:o,page:r,totalCount:this.props.filesTotalCount,view:i,filters:l,graphQLErrors:this.props.graphQLErrors,createFileApiUrl:t,createFileApiMethod:n,onDelete:this.handleDelete,onInsertMany:this.props.onInsertMany,onPublish:this.doPublish,onUnpublish:this.doUnpublish,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSuccessfulUpload:this.handleUpload,onSuccessfulUploadQueue:this.handleUploadQueue,onCreateFolder:this.handleCreateFolder,onMoveFilesSuccess:this.handleMoveFilesSuccess,onClearSearch:this.handleClearSearch,onSort:this.handleSort,onSetPage:this.handleSetPage,onViewChange:this.handleViewChange,sort:s,sectionConfig:e,loading:this.props.loading,maxFilesSelect:this.props.maxFiles})}},{key:"renderEditor",value:function(){var e=this.props.sectionConfig,t=u({config:e,viewAction:this.props.viewAction,folderId:this.getFolderId(),type:this.props.type,fileId:this.props.fileId}),n=t.schemaUrl,o=t.targetId;return n?g.default.createElement(R.default,{className:this.props.dialog?"editor--dialog":"",targetId:o,file:this.findFile(o),onClose:this.handleCloseFile,schemaUrl:n,schemaUrlQueries:this.props.requireLinkText?[{name:"requireLinkText",value:!0}]:[],onSubmit:this.handleSubmitEditor,onDelete:this.handleDelete,onUnpublish:this.handleUnpublish,addToCampaignSchemaUrl:e.form.addToCampaignForm.schemaUrl}):null}},{key:"render",value:function(){var e=Boolean(this.props.folderId||(0,z.hasFilters)(this.props.query.filter)),t=this.props.sectionConfig.form.fileSearchForm.schemaUrl,n=this.props.query.filter||{},o=(0,O.default)("fill-height asset-admin","select"===this.props.type&&{"asset-admin--single-select":1===this.props.maxFiles,"asset-admin--multi-select":1!==this.props.maxFiles}),r=(0,z.hasFilters)(this.props.query.filter)||this.props.showSearch,s=this.props.actions.displaySearch?this.props.actions.displaySearch.toggleSearch:void 0;return g.default.createElement("div",{className:o},g.default.createElement(q.default,{showBackButton:e,onBackButtonClick:this.handleBackButtonClick},g.default.createElement(G.default,{multiline:!0}),g.default.createElement("div",{className:"asset-admin__toolbar-extra pull-xs-right fill-width vertical-align-items"},g.default.createElement(K.default,{toggled:r,onToggle:s}),this.props.toolbarChildren)),r&&g.default.createElement(V.default,{onSearch:this.handleDoSearch,id:"AssetSearchForm",formSchemaUrl:t,onHide:this.handleClearSearch,displayBehavior:"HIDEABLE",filters:n,name:"name"}),g.default.createElement("div",{className:"flexbox-area-grow fill-width fill-height gallery"},this.renderGallery(),this.renderEditor()))}}]),t}(m.Component);se.propTypes={dialog:_.default.bool,sectionConfig:oe.default,fileId:_.default.number,folderId:_.default.number,onBrowse:_.default.func,onReplaceUrl:_.default.func,onInsertMany:_.default.func,graphQLErrors:_.default.arrayOf(_.default.string),getUrl:_.default.func,query:_.default.shape({sort:_.default.string,limit:_.default.oneOfType([_.default.number,_.default.string]),page:_.default.oneOfType([_.default.number,_.default.string]),filter:_.default.object}),onSubmitEditor:_.default.func,type:_.default.oneOf(["insert-media","insert-link","select","admin"]),files:_.default.array,queuedFiles:_.default.shape({items:_.default.array.isRequired}),filesTotalCount:_.default.number,folder:_.default.shape({id:_.default.number,title:_.default.string,parents:_.default.array,parentId:_.default.number,canView:_.default.bool,canEdit:_.default.bool}),loading:_.default.bool,actions:_.default.object,maxFiles:_.default.number},se.defaultProps={type:"admin",query:{sort:"",limit:null,page:0,filter:{}},maxFiles:null},t.Component=se,t.getFormSchema=u,t.default=(0,b.compose)((0,v.connect)(c,p),(0,re.injectGraphql)("ReadFilesQuery"),Y.default,X.default,J.default,function(e){return(0,H.withApollo)(e)})(se)},"./client/src/containers/AssetAdmin/AssetAdminRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.base,n=e.folderId,o=e.fileId,r=e.query,s=e.action;if(s&&-1===O.indexOf(s))throw new Error("Invalid action provided: "+s);var i=null;return i=o?t+"/show/"+n+"/"+S.default.ACTIONS.EDIT_FILE+"/"+o:n?t+"/show/"+n:t+"/",s===S.default.ACTIONS.CREATE_FOLDER&&(i=t+"/show/"+(n||0)+"/"+s),r&&Object.keys(r).length>0&&(i=i+"?"+b.default.stringify(r)),i}function a(e){return{sectionConfig:e.config.sections.find(function(e){return e.name===w})}}Object.defineProperty(t,"__esModule",{value:!0}),t.buildUrl=t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=r!==this.getFolderId(),a=Object.assign({},n);return(i||a.page<=1)&&delete a.page,l({base:"/"+this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return this.props.match.params&&this.props.match.params.folderId?parseInt(this.props.match.params.folderId,10):0}},{key:"getFileId",value:function(){return this.props.match.params&&this.props.match.params.fileId?parseInt(this.props.match.params.fileId,10):0}},{key:"getViewAction",value:function(){return this.props.match.params&&this.props.match.params.viewAction?this.props.match.params.viewAction:S.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){return{sectionConfig:this.props.sectionConfig,type:"admin",folderId:this.getFolderId(),viewAction:this.getViewAction(),fileId:this.getFileId(),query:this.getQuery(),getUrl:this.getUrl,onBrowse:this.handleBrowse,onReplaceUrl:this.handleReplaceUrl}}},{key:"getQuery",value:function(){return(0,_.decodeQuery)(this.props.location.search)}},{key:"handleBrowse",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.push(r)}},{key:"handleReplaceUrl",value:function(e,t,n,o){var r=this.getUrl(e,t,n,o);this.props.history.replace(r)}},{key:"render",value:function(){return this.props.sectionConfig?c.default.createElement(y.default,this.getSectionProps()):null}}]),t}(d.Component);I.propTypes={sectionConfig:C.default,location:f.default.shape({pathname:f.default.string,query:f.default.object,search:f.default.string}),params:f.default.object,router:f.default.object},t.Component=I,t.buildUrl=l,t.default=(0,m.withRouter)((0,h.connect)(a)(I))},"./client/src/containers/AssetAdmin/stateRouter.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){function t(t){var n=t.config.sections.find(function(e){return e.name===y});return{Component:e,sectionConfig:n}}return(0,f.connect)(t)(v)}Object.defineProperty(t,"__esModule",{value:!0}),t.AssetAdminStateRouter=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE,r=parseInt(e||0,10),s=parseInt(t||0,10),i=this.getFolderId(),l=r!==i&&null!==i,a=Object.assign({},n);return(l||a.page<=1)&&delete a.page,(0,h.buildUrl)({base:this.props.sectionConfig.url,folderId:r,fileId:s,query:a,action:o})}},{key:"getFolderId",value:function(){return null===this.state.folderId?null:parseInt(this.state.folderId||0,10)}},{key:"getFileId",value:function(){return parseInt(this.state.fileId||this.props.fileId||0,10)}},{key:"getViewAction",value:function(){return this.state.action||g.default.ACTIONS.EDIT_FILE}},{key:"getSectionProps",value:function(){var e=Object.assign({},this.props,{folderId:this.getFolderId(),fileId:this.getFileId(),viewAction:this.getViewAction(),query:this.state.query,getUrl:this.getUrl,onBrowse:this.handleBrowse});return delete e.Component,e}},{key:"handleBrowse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.default.ACTIONS.EDIT_FILE;if(o&&-1===Object.values(g.default.ACTIONS).indexOf(o))throw new Error("Invalid action provided: "+o);this.setState({folderId:e,fileId:t,query:n,action:o})}},{key:"render",value:function(){var e=this.getSectionProps(),t=this.props.Component;return d.default.createElement(t,e)}}]),t}(u.Component);v.propTypes={Component:p.default.oneOfType([p.default.element,p.default.func]),sectionConfig:p.default.shape({url:p.default.string.isRequired}).isRequired,fileId:p.default.number},t.AssetAdminStateRouter=v,t.default=l},"./client/src/containers/Editor/Editor.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{actions:{unsavedForms:(0,f.bindActionCreators)(j,e)}}}function a(e){return{enableDropzone:e.assetAdmin.gallery.enableDropzone}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var u=function(){function e(e,t){for(var n=0;n0&&(o=c.default.sprintf(c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SINGLE_CONFIRM","This file is currently used in %s place(s), are you sure you want to delete it?"),this.props.file.inUseCount),o+="\n\n",o+=c.default._t("AssetAdmin.BULK_ACTIONS_DELETE_WARNING","Ensure files are removed from content areas prior to deleting them, otherwise they will appear as broken links.")),confirm(o)&&(this.props.actions.unsavedForms.removeFormChanged("AssetAdmin.EditForm"),this.props.onDelete([t.ID])),e.preventDefault()}}},{key:"handleCancelKeyDown",value:function(e){e.keyCode!==y.default.SPACE_KEY_CODE&&e.keyCode!==y.default.RETURN_KEY_CODE||this.handleClose(e)}},{key:"handleSubmit",value:function(e,t,n){return"function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n()}},{key:"handleClose",value:function(e){this.props.onClose(),this.closeModal(),e&&e.preventDefault()}},{key:"openModal",value:function(){this.setState({openModal:!0})}},{key:"closeModal",value:function(){this.setState({openModal:!1})}},{key:"replaceFile",value:function(){var e=document.querySelector(".dz-input-PreviewImage");e&&e.click()}},{key:"handleLoadingError",value:function(e){this.setState({loadingForm:!1,loadingError:e.errors[0]})}},{key:"handleLoadingSuccess",value:function(){this.setState({loadingForm:!1,loadingError:null})}},{key:"handleFetchingSchema",value:function(){this.setState({loadingForm:!0})}},{key:"renderCancelButton",value:function(){return m.default.createElement("a",{role:"button",tabIndex:0,className:"btn btn--close-panel btn--no-text font-icon-cancel btn--icon-xl",onClick:this.handleClose,onKeyDown:this.handleCancelKeyDown,type:"button","aria-label":c.default._t("AssetAdmin.CANCEL")})}},{key:"render",value:function(){var e=this.props.schemaUrlQueries.map(function(e){return e.name+"="+e.value}).join("&").trim();e=e?"?"+e:"";var t=this.props.schemaUrl+"/"+this.props.targetId+e,n=this.props.addToCampaignSchemaUrl+"/"+this.props.targetId,o=["panel","form--no-dividers","editor"];this.props.className&&o.push(this.props.className),this.props.enableDropzone||o.push("editor--asset-dropzone--disable");var r=null;if(this.state.loadingError){var s=this.state.loadingError.value;404===this.state.loadingError.code&&(s=c.default._t("AssetAdmin.FILE_MISSING","File cannot be found")),s||(s=c.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")),r=m.default.createElement("div",{className:"editor__file-preview-message--file-missing"},s)}var i=c.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign"),l=this.props.loadingComponent;return m.default.createElement("div",{className:o.join(" ")},m.default.createElement("div",{className:"editor__details fill-height"},m.default.createElement(v.default,{identifier:"AssetAdmin.EditForm",schemaUrl:t,afterMessages:this.renderCancelButton(),onSubmit:this.handleSubmit,onAction:this.handleAction,onLoadingSuccess:this.handleLoadingSuccess,onLoadingError:this.handleLoadingError,onFetchingSchema:this.handleFetchingSchema}),r,m.default.createElement(E.default,{title:i,identifier:"AssetAdmin.AddToCampaign",isOpen:this.state.openModal,onClosed:this.closeModal,schemaUrl:n,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good"}),this.state.loadingForm&&m.default.createElement(l,null)))}}]),t}(h.Component);A.propTypes={file:w.default,className:I.default.string,targetId:I.default.number.isRequired,enableDropzone:I.default.bool,onClose:I.default.func.isRequired,onSubmit:I.default.func.isRequired,onDelete:I.default.func.isRequired,schemaUrl:I.default.string.isRequired,schemaUrlQueries:I.default.arrayOf(I.default.shape({name:I.default.string,value:I.default.any})),addToCampaignSchemaUrl:I.default.string,actions:I.default.object},t.Component=A,t.default=(0,f.compose)((0,F.inject)(["Loading"],function(e){return{loadingComponent:e}},function(){return"AssetAdmin.Editor"}),(0,p.connect)(a,l))(A)},"./client/src/containers/Gallery/Gallery.js":function(e,t,n){"use strict";function o(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 s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=t.sort,o=e.assetAdmin.gallery,r=o.selectedFiles,s=o.errorMessage,i=o.noticeMessage,l=o.enableDropzone,a=o.badges,u=o.concatenateSelect,d=o.loading,c=o.sorters,p=o.lastSelected;return!n&&c&&c[0]&&(n=c[0].field+","+c[0].direction),{lastSelected:p,selectedFiles:r,errorMessage:s,noticeMessage:i,enableDropzone:l,badges:a,concatenateSelect:u,loading:t.loading||d,queuedFiles:e.assetAdmin.queuedFiles,securityId:e.config.SecurityID,sorters:c,sort:n}}function u(e){return{actions:{gallery:(0,S.bindActionCreators)(R,e),queuedFiles:(0,S.bindActionCreators)(L,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.galleryViewDefaultProps=t.galleryViewPropTypes=t.Component=void 0;var d=Object.assign||function(e){for(var t=1;t=s&&t<=i}).map(function(e){return e.id})}},{key:"getSelectableFiles",value:function(){var e=this.props.files.filter(function(e){return e.id});return"select"===this.props.type?e.filter(function(e){return"folder"!==e.type}):e}},{key:"handleBulkInsert",value:function(e,t){this.props.onInsertMany(e,t)}},{key:"handleBulkDelete",value:function(e,t){var n=this;return this.props.onDelete(t.map(function(e){return e.id})).then(function(e){var o=e.filter(function(e){return e}).length;o!==t.length?(n.props.actions.gallery.setErrorMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_FAIL","%s folders/files were successfully deleted, but %s files were not able to be deleted."),o,t.length-o)),n.props.actions.gallery.setNoticeMessage(null)):(n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_DELETE_SUCCESS","%s folders/files were successfully deleted."),o)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles())})}},{key:"handleBulkPublish",value:function(e,t){var n=this,o=t.map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onPublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_PUBLISH_SUCCESS","%s folders/files were successfully published."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"handleBulkUnpublish",value:function(e,t){var n=this,o=t.filter(function(e){return e.published}).map(function(e){return e.id});return o.length?(this.props.actions.gallery.setLoading(!0),this.props.onUnpublish(o).then(function(e){n.props.actions.gallery.setLoading(!1),n.props.actions.gallery.setNoticeMessage(g.default.sprintf(g.default._t("AssetAdmin.BULK_ACTIONS_UNPUBLISH_SUCCESS","%s folders/files were successfully unpublished."),e.length)),n.props.actions.gallery.setErrorMessage(null),n.props.actions.gallery.deselectFiles()})):(this.props.actions.gallery.deselectFiles(),Promise.resolve(!0))}},{key:"initSortDropdown",value:function(){if("tile"===this.props.view){var e=this.getSortElement();e.chosen({allow_single_deselect:!0,disable_search_threshold:20}),e.off("change"),e.on("change",function(){return e.find(":selected")[0].click()})}}},{key:"handleSort",value:function(e){this.props.actions.queuedFiles.purgeUploadQueue(),this.props.onSort(e)}},{key:"handleSetPage",value:function(e){this.props.onSetPage(e)}},{key:"handleCancelUpload",value:function(e){e.xhr.abort(),this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleRemoveErroredUpload",value:function(e){this.props.actions.queuedFiles.removeQueuedFile(e.queuedId)}},{key:"handleAddedFile",value:function(e){this.props.actions.queuedFiles.addQueuedFile(e)}},{key:"handlePreviewLoaded",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e.queuedId,t)}},{key:"handleSending",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{xhr:t})}},{key:"handleUploadProgress",value:function(e,t){this.props.actions.queuedFiles.updateQueuedFile(e._queuedId,{progress:t})}},{key:"handleSuccessfulUpload",value:function(e){var t=JSON.parse(e.xhr.response);if(void 0!==t[0].error)return void this.handleFailedUpload(e);this.props.actions.queuedFiles.succeedUpload(e._queuedId,t[0]),this.props.onSuccessfulUpload&&this.props.onSuccessfulUpload(t);var n=this.props.queuedFiles.items.reduce(function(e,t){return 100!==t.progress?e+1:e},0);if(!this.props.fileId&&!this.props.selectedFiles.length&&0===n){var o=t.pop();this.props.onOpenFile(o.id)}}},{key:"handleQueueComplete",value:function(){this.props.onSuccessfulUploadQueue&&this.props.onSuccessfulUploadQueue()}},{key:"handleFailedUpload",value:function(e,t){this.props.actions.queuedFiles.failUpload(e._queuedId,t)}},{key:"itemIsSelected",value:function(e){return this.props.selectedFiles.indexOf(e)>-1}},{key:"toggleSelectConcat",value:function(e){this.props.actions.gallery.setConcatenateSelect(this.isConcat(e))}},{key:"isConcat",value:function(e){return e.metaKey||e.ctrlKey||e.shiftKey}},{key:"itemIsHighlighted",value:function(e){return this.props.fileId===e}},{key:"hasOpenedItem",value:function(){return!!this.props.fileId}},{key:"handleClearSearch",value:function(e){this.props.onClearSearch(e)}},{key:"handleGroupSelect",value:function(e,t){var n=this,o=this.props.actions.gallery,r=o.setSelectedFiles,s=o.selectFiles,i=this.getSelectableFiles(),l=e.filter(function(t,n){return e.indexOf(t)===n&&i.find(function(e){return e.id===t})}),a=this.props.concatenateSelect||this.isConcat(t);if(null!==this.props.maxFilesSelect){var u=l.length;if(a&&(u=this.props.selectedFiles.filter(function(e){return!n.props.selectedFiles.includes(e)}).concat(this.props.selectedFiles).length),u>=this.props.maxFilesSelect)return}a?s(l):r(l)}},{key:"handleClearSelection",value:function(){this.props.actions.gallery.deselectFiles()}},{key:"handleOpenFolder",value:function(e,t){e.preventDefault(),this.props.actions.gallery.setErrorMessage(null),this.props.actions.gallery.setNoticeMessage(null),this.props.onOpenFolder(t.id)}},{key:"handleOpenFile",value:function(e,t){e.preventDefault(),null!==t.created&&(this.props.selectedFiles.length&&1!==this.props.maxFilesSelect||"select"!==this.props.type||this.handleSelect(e,t),this.props.onOpenFile(t.id,t))}},{key:"handleSelect",value:function(e,t){var n=this.props.maxFilesSelect,o=this.getSelectableFiles(),r=o.filter(function(e){return e.id===t.id}).map(function(e){return e.id});if(1===n)return void this.props.actions.gallery.setSelectedFiles(r);if(-1===this.props.selectedFiles.indexOf(t.id)){if(e.shiftKey&&(r=this.getSelection(this.props.lastSelected,t.id)),this.props.selectedFiles.filter(function(e){return!r.includes(e)}).concat(r).length>n&&null!==n)return;this.props.actions.gallery.selectFiles(r),this.props.actions.gallery.setLastSelected(t.id)}else this.props.actions.gallery.deselectFiles([t.id]),e.shiftKey&&this.props.actions.gallery.setLastSelected(null)}},{key:"handleEnableDropzone",value:function(e){this.props.actions.gallery.setEnableDropzone(e)}},{key:"handleMoveFiles",value:function(e,t){var n=this;this.props.actions.files.moveFiles(e,t).then(function(){var o=P.default.MOVE_SUCCESS_DURATION,r="+"+t.length;n.props.actions.gallery.setFileBadge(e,r,"success",o),"function"==typeof n.props.onMoveFilesSuccess&&n.props.onMoveFilesSuccess(e,t)}).catch(function(){n.props.actions.gallery.setErrorMessage(g.default._t("AssetAdmin.FAILED_MOVE","There was an error moving the selected items."))})}},{key:"handleBulkEdit",value:function(e,t){this.handleOpenFile(e,t[0])}},{key:"handleBulkMove",value:function(){this.props.actions.gallery.activateModal(P.default.MODAL_MOVE)}},{key:"renderTransitionBulkActions",value:function(){return this.renderBulkActions()}},{key:"renderBulkActions",value:function(){var e=this,t="select"===this.props.type?function(e){return"insert"===e.value}:function(e){return"insert"!==e.value},n=P.default.BULK_ACTIONS.filter(t).map(function(t){if(t.callback)return t;switch(t.value){case"delete":return d({},t,{callback:e.handleBulkDelete});case"edit":return d({},t,{callback:e.handleBulkEdit});case"move":return d({},t,{callback:e.handleBulkMove});case"publish":return d({},t,{callback:e.handleBulkPublish});case"unpublish":return d({},t,{callback:e.handleBulkUnpublish});case"insert":return d({},t,{callback:e.handleBulkInsert,color:"primary"});default:return t}}),o=this.props.selectedFiles.map(function(t){return e.props.files.find(function(e){return e&&t===e.id})}).filter(function(e){return e});return o.length>0&&["admin","select"].includes(this.props.type)?_.default.createElement(O.default,{actions:n,items:o,total:this.props.maxFilesSelect,key:o.length>0,container:this.gallery,showCount:1!==this.props.maxFilesSelect}):null}},{key:"renderGalleryView",value:function(){var e=this,t="table"===this.props.view?x.default:F.default,n=this.props.files.map(function(t){return d({},t,{selected:e.itemIsSelected(t.id),highlighted:e.itemIsHighlighted(t.id)})}),o=this.props,r=o.type,s=o.loading,i=o.page,l=o.totalCount,a=o.limit,u=o.sort,c=o.selectedFiles,p=o.badges,f={selectableItems:["admin","select"].includes(r),selectableFolders:"select"!==this.props.type,files:n,loading:s,page:i,totalCount:l,limit:a,sort:u,selectedFiles:c,badges:p,onSort:this.handleSort,onSetPage:this.handleSetPage,onOpenFile:this.handleOpenFile,onOpenFolder:this.handleOpenFolder,onSelect:this.handleSelect,onCancelUpload:this.handleCancelUpload,onDropFiles:this.handleMoveFiles,onRemoveErroredUpload:this.handleRemoveErroredUpload,onEnableDropzone:this.handleEnableDropzone,sectionConfig:this.props.sectionConfig,canDrag:"admin"===this.props.type,maxFilesSelect:this.props.maxFilesSelect};return _.default.createElement(t,f)}},{key:"renderToolbar",value:function(){var e=this.props,t=e.GalleryToolbar,n=e.sort,o=e.view,r=e.folder,s=e.onCreateFolder,i=e.onOpenFolder,l=e.onViewChange,a={onMoveFiles:this.handleMoveFiles,onSort:this.handleSort,onCreateFolder:s,onOpenFolder:i,onViewChange:l,view:o,sort:n,folder:r};return _.default.createElement(t,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.folder,o=t.loading,r=t.errorMessage,s=t.graphQLErrors,i=t.noticeMessage,l=this.props.LoadingComponent,a=s&&s.length>0;if(!n)return r||a?_.default.createElement("div",{className:"gallery__error flexbox-area-grow"},_.default.createElement("div",{className:"gallery__error-message"},_.default.createElement("h3",null,g.default._t("AssetAdmin.DROPZONE_RESPONSE_ERROR","Server responded with an error.")),r&&_.default.createElement("p",null,r),a&&s.map(function(e,t){return _.default.createElement("p",{key:t},e)}))):o?_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement(l,null)):_.default.createElement("div",{className:"flexbox-area-grow"},_.default.createElement("div",{className:"editor__file-preview-message--file-missing m-t-3"},g.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred")));var u=_.default.createElement("div",{className:"gallery_messages"},r&&_.default.createElement(T.default,{value:r,type:"danger"}),i&&_.default.createElement(T.default,{value:i,type:"success"})),c={height:P.default.THUMBNAIL_HEIGHT,width:P.default.THUMBNAIL_WIDTH},p=d({url:this.props.createFileApiUrl,method:this.props.createFileApiMethod,paramName:"Upload",clickable:"#upload-button"},this.props.sectionConfig.dropzoneOptions),f=this.props.securityId,h=this.props.folder.canEdit&&this.props.enableDropzone,m=["panel","panel--padded","panel--scrollable","gallery__main","fill-height"];"insert"===this.props.type&&m.push("insert-media-modal__main");var y=m;return this.hasOpenedItem()&&y.push("gallery__main--has-opened-item"),_.default.createElement("div",{className:"flexbox-area-grow gallery__outer",ref:function(t){e.gallery=t}},this.renderTransitionBulkActions(),_.default.createElement(z.default,{className:m.join(" ")},this.renderToolbar(),_.default.createElement(q.SelectableGroup,{enabled:"tile"===this.props.view&&"admin"===this.props.type,className:"flexbox-area-grow fill-height gallery__main--selectable",onSelection:this.handleGroupSelect,onNonItemClick:this.handleClearSelection,preventDefault:!1,fixedPosition:!0},_.default.createElement(C.default,{name:"gallery-container",className:"flexbox-area-grow",canUpload:h,onAddedFile:this.handleAddedFile,onPreviewLoaded:this.handlePreviewLoaded,onError:this.handleFailedUpload,onSuccess:this.handleSuccessfulUpload,onQueueComplete:this.handleQueueComplete,onSending:this.handleSending,onUploadProgress:this.handleUploadProgress,preview:c,folderId:this.props.folderId,options:p,securityID:f,uploadButton:!1},u,this.renderGalleryView()))),this.props.loading&&_.default.createElement(l,null),_.default.createElement(Q.default,{sectionConfig:this.props.sectionConfig,folderId:this.props.folderId,onSuccess:this.props.onMoveFilesSuccess,onOpenFolder:this.props.onOpenFolder}))}}]),t}(y.Component),J={page:1,limit:15},ee={sectionConfig:W.default,loading:X.default.bool,sort:X.default.string,files:X.default.arrayOf(X.default.shape({id:X.default.number,parent:X.default.shape({id:X.default.number})})).isRequired,selectedFiles:X.default.arrayOf(X.default.number),totalCount:X.default.number,page:X.default.number,limit:X.default.number,badges:X.default.arrayOf(X.default.shape({id:X.default.number,message:X.default.node,status:X.default.string})),onOpenFile:X.default.func.isRequired,onOpenFolder:X.default.func.isRequired,onSort:X.default.func.isRequired,onSetPage:X.default.func.isRequired,maxFilesSelect:X.default.number},te=Object.assign({},J,{selectableItems:!1}),ne=Object.assign({},ee,{selectableItems:X.default.bool,selectableFolders:X.default.bool,onSelect:X.default.func,onCancelUpload:X.default.func,onDelete:X.default.func,onRemoveErroredUpload:X.default.func,onEnableDropzone:X.default.func});Z.defaultProps=Object.assign({},J,{type:"admin",view:"tile",enableDropzone:!0}),Z.propTypes=Object.assign({},ee,{onSuccessfulUpload:X.default.func,onSuccessfulUploadQueue:X.default.func,onCreateFolder:X.default.func,onMoveFilesSuccess:X.default.func,onDelete:X.default.func,onPublish:X.default.func,onUnpublish:X.default.func,type:X.default.oneOf(["insert-media","insert-link","select","admin"]),view:X.default.oneOf(["tile","table"]),lastSelected:X.default.number,dialog:X.default.bool,fileId:X.default.number,folderId:X.default.number.isRequired,folder:X.default.shape({id:X.default.number,title:X.default.string,parentId:X.default.number,canView:X.default.bool,canEdit:X.default.bool}),files:X.default.array,errorMessage:X.default.string,graphQLErrors:X.default.arrayOf(X.default.string),actions:X.default.object,securityId:X.default.string,onViewChange:X.default.func.isRequired,createFileApiUrl:X.default.string,createFileApiMethod:X.default.string,search:X.default.object,enableDropzone:X.default.bool,concatenateSelect:X.default.bool,GalleryToolbar:X.default.func,sorters:X.default.arrayOf(X.default.shape({field:X.default.string.isRequired,direction:X.default.oneOf(["asc","desc"]).isRequired,label:X.default.string.isRequired})).isRequired}),t.Component=Z,t.galleryViewPropTypes=ne,t.galleryViewDefaultProps=te,t.default=(0,S.compose)((0,Y.inject)(["GalleryToolbar","Loading"],function(e,t){return{GalleryToolbar:e,LoadingComponent:t}},function(){return"AssetAdmin.Gallery"}),(0,E.connect)(a,u),G.default,function(e){return(0,B.withApollo)(e)})(Z)},"./client/src/containers/Gallery/GalleryDND.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];return h.default.createEndpointFetcher(Object.assign({},e,t?{defaultData:{SecurityID:g.default.get("SecurityID")}}:{}))},w=function(e){function t(e){r(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={detailView:null,history:[],loadedDetails:!1},n.handleClick=n.handleClick.bind(n),n.handleBack=n.handleBack.bind(n),n.timer=null,n.api=C(e.sectionConfig.historyEndpoint),n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){this.refreshHistoryIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.refreshHistoryIfNeeded(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.timer=null}},{key:"refreshHistoryIfNeeded",value:function(e){var t=this;if(!e&&!this.state.loadedDetails||e.data.fileId!==this.props.data.fileId||e.data.latestVersionId!==this.props.data.latestVersionId){this.setState({loadedDetails:!1});var n=e?e.data.fileId:this.props.data.fileId;clearTimeout(this.timer),this.timer=setTimeout(function(){t.api({fileId:n}).then(function(e){t.timer&&t.setState({history:e,loadedDetails:!0})})},250)}}},{key:"handleClick",value:function(e){this.setState({viewDetails:e})}},{key:"handleBack",value:function(e){e.preventDefault(),this.setState({viewDetails:null})}},{key:"render",value:function(){var e=this;if(!this.state.loadedDetails)return c.default.createElement("div",{className:"history-list history-list--loading"},"Loading...");if(this.state.viewDetails){var t=[this.props.historySchemaUrl,this.props.data.fileId,this.state.viewDetails].join("/"),n=["btn","btn-secondary","btn--icon-xl","btn--no-text","font-icon-left-open-big","history-list__back"].join(" ");return c.default.createElement("div",{className:"history-list"},c.default.createElement("a",{href:"#",className:n,onClick:this.handleBack}),c.default.createElement(b.default,{identifier:"AssetAdmin.HistoryList",schemaUrl:t,formTag:"div"}))}var o=this.state.history||[];return c.default.createElement("div",{className:"history-list"},c.default.createElement("ul",{className:"list-group list-group-flush history-list__list"},o.map(function(t){return c.default.createElement(_.default,a({key:t.versionid},t,{onClick:e.handleClick}))})))}}]),t}(d.Component);w.propTypes={sectionConfig:S.default.shape({form:S.default.object,historyEndpoint:S.default.shape({url:S.default.string,method:S.default.string,responseFormat:S.default.string})}),historySchemaUrl:S.default.string,data:S.default.object},w.defaultProps={data:{fieldId:0}},t.Component=w,t.default=(0,p.connect)(l)(w)},"./client/src/containers/MoveModal/MoveModal.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=e.assetAdmin.gallery,n=t.modal,o=t.selectedFiles;return{isOpen:n===y.default.MODAL_MOVE,selectedFiles:o,title:m.default.sprintf(m.default._t("AssetAdmin.MOVE_ITEMS_TO","Move %s item(s) to..."),o.length)}}function a(e){return{onClosed:function(){e((0,b.deactivateModal)())},setNotice:function(t){e((0,b.setNoticeMessage)(t))},setError:function(t){e((0,b.setErrorMessage)(t))},setBadge:function(){e(b.setFileBadge.apply(void 0,arguments))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var a=Object.assign||function(e){for(var t=1;t0)return p.default.createElement("div",{className:"gallery__progress-bar--complete"});var t={className:"gallery__progress-bar-progress",style:{width:e.progress+"%"}};return p.default.createElement("div",{className:"gallery__progress-bar"},p.default.createElement("div",t))}},{key:"renderTitle",value:function(e){var t=this.renderProgressBar(e.rowData);return p.default.createElement("div",{className:"fill-width"},p.default.createElement("div",{className:"flexbox-area-grow"},e.data),t)}},{key:"renderSelect",value:function(e){if(this.props.selectableItems&&(this.props.selectableFolders||"folder"!==e.rowData.type)){var t={type:"checkbox",title:_.default._t("AssetAdmin.SELECT"),defaultChecked:e.data,tabIndex:-1,onMouseDown:this.preventFocus};return![null,1].includes(this.props.maxFilesSelect)&&this.props.selectedFiles.length>=this.props.maxFilesSelect&&!e.data&&(t.disabled=!0),p.default.createElement("input",t)}return null}},{key:"renderDate",value:function(e){return"folder"===e.rowData.type?null:p.default.createElement("span",null,e.data)}},{key:"renderThumbnail",value:function(e){var t=e.data||e.rowData.url,n=e.rowData.queuedId&&!e.rowData.id,o=e.rowData.category||"false",r="gallery__table-image",s=[r],i={};return s.push(r+"--"+o),"image"===o&&t&&(i.backgroundImage='url("'+t+'")'),n||t||"folder"===o||s.push(r+"--error"),p.default.createElement("div",{className:s.join(" "),style:i})}},{key:"render",value:function(){return p.default.createElement(g.default,this.getTableProps())}}]),t}(c.Component);j.defaultProps=v.galleryViewDefaultProps,j.propTypes=a({},v.galleryViewPropTypes,{sort:h.default.string.isRequired,VersionedBadge:h.default.oneOfType([h.default.node,h.default.func])}),t.Component=j,t.default=(0,S.compose)((0,E.inject)(["VersionedBadge"],function(e){return{VersionedBadge:e}}))(j)},"./client/src/containers/ThumbnailView/ThumbnailView.js":function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=Object.assign||function(e){for(var t=1;t=this.props.maxFilesSelect,b=1===this.props.maxFilesSelect?c.onActivate:this.props.onSelect;c=l({},c,{selectable:!0,onSelect:b,maxSelected:v})}if("folder"===e.type){var E=this.props.onDropFiles;return c=l({},c,{onDropFiles:E}),p.default.createElement(o,c)}return p.default.createElement(n,c)}},{key:"render",value:function(){return p.default.createElement("div",{className:"gallery__main-view--tile"},p.default.createElement("div",{className:"gallery__folders"},this.props.files.filter(this.folderFilter).map(this.renderItem)),p.default.createElement("div",{className:"gallery__files"},this.props.files.filter(this.fileFilter).map(this.renderItem)),0===this.props.files.length&&!this.props.loading&&p.default.createElement("p",{className:"gallery__no-item-notice"},d.default._t("AssetAdmin.NOITEMSFOUND")),p.default.createElement("div",{className:"gallery__load"},this.renderPagination()))}}]),t}(c.Component);v.defaultProps=h.galleryViewDefaultProps,v.propTypes=l({},h.galleryViewPropTypes,{File:_.default.oneOfType([_.default.node,_.default.func]).isRequired,Folder:_.default.oneOfType([_.default.node,_.default.func]).isRequired});var b=(0,f.inject)(["GalleryItemFile","GalleryItemFolder"],function(e,t){return{File:e,Folder:t}},function(){return"AssetAdmin.Gallery.ThumbnailView"});t.Component=v,t.default=b(v)},"./client/src/entwine/UploadField/UploadFieldEntwine.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=Object.assign||function(e){for(var t=1;t');this.before(n),t=n[0]}return t},onunmatch:function(){this._super(),d.default.unmountComponentAtNode(this.siblings(".uploadfield-holder")[0])},onmatch:function(){var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,p.loadComponent)("UploadField",t);this.setComponent(n),this._super(),this.hide(),this.refresh()},onclick:function(e){e.preventDefault()},refresh:function(){var t=this.getAttributes(),n=e(this).closest("form"),o=function(){setTimeout(function(){n.trigger("change")},0)},s=this.getComponent();d.default.render(a.default.createElement(s,r({},t,{onChange:o,noHolder:!0})),this.getContainer())},getAttributes:function(){var t=e(this).data("state"),n=e(this).data("schema");return(0,c.schemaMerge)(n,t)}})})},"./client/src/lib/configShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({url:r.default.string,limit:r.default.number,imageRetry:r.default.shape({minRetry:r.default.number,maxRetry:r.default.number,expiry:r.default.number}),form:r.default.object,dropzoneOptions:r.default.object});t.default=s},"./client/src/lib/fileFragments.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileInterface="\n fragment FileInterfaceFields on FileInterface {\n canDelete\n canEdit\n canView\n category\n exists\n filename\n id\n lastEdited\n name\n parentId\n title\n type\n url\n }\n",t.file="\n fragment FileFields on File {\n draft\n extension\n published\n modified\n size\n smallThumbnail\n thumbnail\n inUseCount\n }\n",t.folder="\n fragment FolderFields on Folder {\n filesInUseCount\n }\n"},"./client/src/lib/fileShape.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=r.default.shape({canEdit:r.default.bool,canDelete:r.default.bool,canView:r.default.bool,exists:r.default.bool,type:r.default.string,smallThumbnail:r.default.string,thumbnail:r.default.string,width:r.default.number,height:r.default.number,category:r.default.oneOfType([r.default.bool,r.default.string]),id:r.default.number,inUseCount:r.default.number,url:r.default.string,title:r.default.string,progress:r.default.number});t.default=s},"./client/src/lib/fileStructure.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),r=function(e){return e&&e.__esModule?e:{default:e}}(o),s=(0,r.default)({name:null,canDelete:!1,canEdit:!1,category:null,created:null,extension:null,filename:null,id:0,lastEdited:null,messages:null,owner:{id:0,title:null},parent:{filename:null,id:0,title:null},queuedId:null,size:null,title:null,type:null,url:null,xhr:null,thumbnail:null,smallThumbnail:null,height:null,width:null});t.default=s},"./client/src/state/displaySearch/DisplaySearchActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_SEARCH:"TOGGLE_SEARCH",OPEN_SEARCH:"OPEN_SEARCH",CLOSE_SEARCH:"CLOSE_SEARCH"}},"./client/src/state/displaySearch/DisplaySearchActions.js":function(e,t,n){"use strict";function o(){return{type:l.default.TOGGLE_SEARCH,payload:null}}function r(){return{type:l.default.OPEN_SEARCH,payload:null}}function s(){return{type:l.default.CLOSE_SEARCH,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleSearch=o,t.openSearch=r,t.closeSearch=s;var i=n("./client/src/state/displaySearch/DisplaySearchActionTypes.js"),l=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/displaySearch/DisplaySearchReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;switch(arguments[1].type){case u.default.TOGGLE_SEARCH:return(0,l.default)(s({},e,{isOpen:!e.isOpen}));case u.default.OPEN_SEARCH:return(0,l.default)(s({},e,{isOpen:!0}));case u.default.CLOSE_SEARCH:return(0,l.default)(s({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n({variables:{IDs:e,Quiet:o,Force:t}})};return{actions:r({},s,{files:r({},s.files,o({},e,i))})}}}}};t.default=u},"./client/src/state/files/deleteFilesMutation.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;return t({variables:{IDs:e},update:function(t){var r=d.default.query.get("ReadFilesQuery"),s=r.getApolloConfig(),i=s.options(n).variables;null!==o&&(i.rootFilter.id=o,i.rootFilter.anyChildId=null);var l=r.getGraphqlAST(),a=t.readQuery({query:l,variables:i}),u=JSON.parse(JSON.stringify(a)),c=u.readFiles.edges[0].node.children.edges;c=c.filter(function(t){return!e.includes(t.node.id)}),u.readFiles.edges[0].node.children.edges=c,u.readFiles.edges[0].node.children.pageInfo.totalCount=c.length,t.writeQuery({query:l,data:u,variables:i})}})};return{actions:r({},o,{files:r({},o.files,{deleteFiles:s})})}}};t.mutation=c,t.config=p,t.default=(0,i.graphql)(c,p)},"./client/src/state/files/moveFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"],["\n mutation MoveFiles($folderId:ID!, $fileIds:[ID]!) {\n moveFiles(folderId: $folderId, fileIds: $fileIds) {\n ...FileInterfaceFields\n ...FileFields\n }\n }\n ","\n ","\n"]),r=n(11),s=n(16),i=function(e){return e&&e.__esModule?e:{default:e}}(s),l=n("./client/src/lib/fileFragments.js"),a=(0,i.default)(o,l.fileInterface,l.file),u={props:function(e){var t=e.mutate,n=e.ownProps.actions,o=void 0===n?{}:n;return{actions:Object.assign({},o,{files:Object.assign({},o.files,{moveFiles:function(e,n){return t({variables:{folderId:e,fileIds:n},update:function(){window.ss.apolloClient.resetStore()}})}})})}}};t.mutation=a,t.config=u,t.default=(0,r.graphql)(a,u)},"./client/src/state/files/publishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("publishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/files/readFilesQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],o=!0,r=!1,s=void 0;try{for(var i,l=e[Symbol.iterator]();!(o=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);o=!0);}catch(e){r=!0,s=e}finally{try{!o&&l.return&&l.return()}finally{if(r)throw s}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=n(22),s=n(3),i={options:function(e){var t=e.sectionConfig,n=e.folderId,s=e.fileId,i=e.query,l=Object.assign({},i.filter),a=Object.assign({},l,{parentId:void 0,recursive:(0,r.hasFilters)(l),currentFolderOnly:void 0}),u=(0,r.hasFilters)(l)?null:s||null,d=u?null:n||0,c={id:d,anyChildId:u},p=i.sort?i.sort.split(","):["",""],f=o(p,2),h=f[0],m=f[1],g=i.limit||t.limit;return{variables:{rootFilter:c,childrenFilter:a,limit:g,offset:((i.page||1)-1)*g,sortBy:h&&m?[{field:h,direction:m.toUpperCase()}]:void 0}}},props:function(e){var t=e.data,n=t.error,o=t.refetch,r=t.readFiles,s=t.loading,i=e.ownProps.actions,l=r&&r.edges[0]?r.edges[0].node:null,a=l&&l.children?l.children.edges.map(function(e){return e.node}).filter(function(e){return e}):[],u=l&&l.children?l.children.pageInfo.totalCount:0,d=l&&!l.children,c=n&&n.graphQLErrors&&n.graphQLErrors.map(function(e){return e.message});return{loading:s||d,folder:l,files:a,filesTotalCount:u,graphQLErrors:c,actions:Object.assign({},i,{files:Object.assign({},i.files,{readFiles:o})})}}},l=s.graphqlTemplates.READ,a={apolloConfig:i,templateName:l,pluralName:"Files",pagination:!1,params:{limit:"Int!",offset:"Int!",rootFilter:"FileFilterInput",childrenFilter:"FileFilterInput",sortBy:"[ChildrenSortInputType]"},args:{root:{filter:"rootFilter"},"root/edges/node/...on Folder/children":{limit:"limit",offset:"offset",filter:"childrenFilter",sortBy:"sortBy"}},fragments:["FileInterfaceFields","FileFields","FolderFields"],fields:["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...on Folder",["children",["pageInfo",["totalCount"],"edges",["node",["...FileInterfaceFields","...FileFields","...FolderFields"]]],"parents",["id","title"]]]]]};t.default=a},"./client/src/state/files/unpublishFilesMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.mutation=void 0;var o=n(11),r=n("./client/src/state/files/buildPublicationMutation.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(r),i=(0,s.default)("unpublishFiles"),l=i.mutation,a=i.config;t.mutation=l,t.config=a,t.default=(0,o.graphql)(l,a)},"./client/src/state/gallery/GalleryActionTypes.js":function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=["SET_LAST_SELECTED","SET_SELECTED_FILES","DESELECT_FILES","SELECT_FILES","LOAD_FILE_REQUEST","LOAD_FILE_SUCCESS","HIGHLIGHT_FILES","UPDATE_BATCH_ACTIONS","SET_NOTICE_MESSAGE","SET_ERROR_MESSAGE","SET_ENABLE_DROPZONE","SET_FILE_BADGE","CLEAR_FILE_BADGE","ACTIVATE_MODAL","DEACTIVATE_MODAL","CONCATENATE_SELECT","SET_LOADING"].reduce(function(e,t){return Object.assign(e,o({},t,"GALLERY."+t))},{})},"./client/src/state/gallery/GalleryActions.js":function(e,t,n){"use strict";function o(e){return function(t){t({type:_.default.SET_LAST_SELECTED,payload:{id:e}})}}function r(e){return function(t){t({type:_.default.SET_SELECTED_FILES,payload:{files:e}})}}function s(e,t){return function(n){n({type:_.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.SELECT_FILES,payload:{ids:e}})}}function l(e){return function(t){return t({type:_.default.CONCATENATE_SELECT,payload:!!e})}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t({type:_.default.DESELECT_FILES,payload:{ids:e}})}}function u(e){return function(t){return t({type:_.default.SET_NOTICE_MESSAGE,payload:{message:e}})}}function d(e){return function(t){return t({type:_.default.SET_ERROR_MESSAGE,payload:{message:e}})}}function c(e){return function(t){return t({type:_.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})}}function p(e){return function(t){t({type:_.default.CLEAR_FILE_BADGE,payload:{id:e}})}}function f(e,t,n,o){return function(r,s){var i=s(),l=i.assetAdmin,a=l.gallery.badges.find(function(t){return t.id===e});a&&a.timer&&clearTimeout(a.timer);var u=o>0?setTimeout(function(){return p(e)(r)},o):null;r({type:_.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:u}})}}function h(e){return function(t){t({type:_.default.ACTIVATE_MODAL,payload:e})}}function m(){return function(e){e({type:_.default.DEACTIVATE_MODAL})}}function g(e){return function(t){t({type:_.default.SET_LOADING,payload:!!e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLastSelected=o,t.setSelectedFiles=r,t.loadFile=s,t.selectFiles=i,t.setConcatenateSelect=l,t.deselectFiles=a,t.setNoticeMessage=u,t.setErrorMessage=d,t.setEnableDropzone=c,t.clearFileBadge=p,t.setFileBadge=f,t.activateModal=h,t.deactivateModal=m,t.setLoading=g;var y=n("./client/src/state/gallery/GalleryActionTypes.js"),_=function(e){return e&&e.__esModule?e:{default:e}}(y)},"./client/src/state/gallery/GalleryReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,o=t.payload;switch(n){case u.default.SET_LAST_SELECTED:return s({},e,{lastSelected:o.id});case u.default.SET_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id}).concat([o])});case u.default.CLEAR_FILE_BADGE:return s({},e,{badges:e.badges.filter(function(e){return e.id!==o.id})});case u.default.SET_ENABLE_DROPZONE:return s({},e,{enableDropzone:o.enableDropzone});case u.default.SET_NOTICE_MESSAGE:return s({},e,{noticeMessage:o.message});case u.default.SET_ERROR_MESSAGE:return s({},e,{errorMessage:o.message});case u.default.LOAD_FILE_SUCCESS:var r=e.files.find(function(e){return e.id===o.id});if(r){var i=s({},r,o.file);return(0,l.default)(s({},e,{files:e.files.map(function(e){return e.id===i.id?i:e})}))}return e.folder.id===o.id?(0,l.default)(s({},e,{folder:s({},e.folder,o.file)})):e;case u.default.SET_SELECTED_FILES:return(0,l.default)(s({},e,{selectedFiles:Array.isArray(o.files)?o.files:[]}));case u.default.SELECT_FILES:var a=null;return a=null===o.ids?e.files.map(function(e){return e.id}):e.selectedFiles.concat(o.ids.filter(function(t){return-1===e.selectedFiles.indexOf(t)})),(0,l.default)(s({},e,{selectedFiles:a}));case u.default.DESELECT_FILES:var d=null;return d=null===o.ids?[]:e.selectedFiles.filter(function(e){return-1===o.ids.indexOf(e)}),(0,l.default)(s({},e,{selectedFiles:d}));case u.default.ACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:o}));case u.default.DEACTIVATE_MODAL:return(0,l.default)(s({},e,{modal:null}));case u.default.CONCATENATE_SELECT:return(0,l.default)(s({},e,{concatenateSelect:o}));case u.default.SET_LOADING:return(0,l.default)(s({},e,{loading:o}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:p;r(this,e),this.options=s({},c,t),this.factory=n}return i(e,[{key:"loadImage",value:function(e){return this.options.minRetry&&d.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}},{key:"loadImageLoop",value:function(e,t){var n=this;return this.options.onStatusChange(e,a.default.LOADING),new Promise(function(t,o){return n.factory(e,t,o)}).then(function(){return n.handleSuccess(e)}).catch(function(){return n.handleError(e,t)})}},{key:"handleReset",value:function(e,t){this.options.onReset(e),t()}},{key:"handleTimeout",value:function(e,t){var n=setTimeout(e,t);return this.options.onTimeout(n,t),n}},{key:"handleSuccess",value:function(e){d.default.unlock(e),this.options.onStatusChange(e,a.default.SUCCESS)}},{key:"handleFailure",value:function(e){var t=this;return d.default.unlock(e),this.options.onStatusChange(e,a.default.FAILED),this.options.expiry?new Promise(function(n){t.handleTimeout(function(){return t.handleReset(e,n)},1e3*t.options.expiry)}):null}},{key:"handleError",value:function(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,a.default.WAITING),this.handleRetry(e,t))}},{key:"handleRetry",value:function(e,t){var n=this,o=new Promise(function(o){n.handleTimeout(function(){return o(n.loadImageLoop(e,2*t))},1e3*t)});return this.options.onRetry(e,t,o),o}},{key:"setOnRetry",value:function(e){this.options.onRetry=e}},{key:"setOnReset",value:function(e){this.options.onReset=e}},{key:"setOnStatusChange",value:function(e){this.options.onStatusChange=e}},{key:"setOnTimeout",value:function(e){this.options.onTimeout=e}}]),e}();t.defaultImageFactory=p,t.default=f},"./client/src/state/imageLoad/ImageLoadActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},"./client/src/state/imageLoad/ImageLoadActions.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return function(n,o){if(!e)return null;if(o().assetAdmin.imageLoad.files.find(function(t){return t.url===e}))return null;var r=s({},t,{onStatusChange:function(e,t){return n({type:l.default.SET_STATUS,payload:{status:t,url:e}})},onReset:function(e){return n({type:l.default.RESET,payload:{url:e}})}});return new u.default(r).loadImage(e)}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0||(this.urls=[].concat(o(this.urls),[e]),0))}},{key:"unlock",value:function(e){this.urls=this.urls.filter(function(t){return t!==e})}}]),e}();window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new i,t.Component=i,t.default=window.ss.imagelocker},"./client/src/state/imageLoad/ImageLoadReducer.js":function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,r=t.payload;switch(n){case l.default.SET_STATUS:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})),[r])});case l.default.RESET:return s({},e,{files:[].concat(o(e.files.filter(function(e){return e.url!==r.url})))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1];switch(t.type){case u.default.PREVIEWFIELD_ADD_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,t.payload.file)));case u.default.PREVIEWFIELD_FAIL_UPLOAD:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.message))));case u.default.PREVIEWFIELD_REMOVE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,void 0)));case u.default.PREVIEWFIELD_UPDATE_FILE:return(0,l.default)(Object.assign({},e,r({},t.payload.id,Object.assign({},e[t.payload.id],t.payload.data))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),l=o(i),a=n("./client/src/state/previewField/PreviewFieldActionTypes.js"),u=o(a),d={};t.default=s},"./client/src/state/queuedFiles/QueuedFilesActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={ADD_QUEUED_FILE:"ADD_QUEUED_FILE",FAIL_UPLOAD:"FAIL_UPLOAD",PURGE_UPLOAD_QUEUE:"PURGE_UPLOAD_QUEUE",REMOVE_QUEUED_FILE:"REMOVE_QUEUED_FILE",SUCCEED_UPLOAD:"SUCCEED_UPLOAD",UPDATE_QUEUED_FILE:"UPDATE_QUEUED_FILE"}},"./client/src/state/queuedFiles/QueuedFilesActions.js":function(e,t,n){"use strict";function o(e){return function(t){return t({type:d.default.ADD_QUEUED_FILE,payload:{file:e}})}}function r(e,t){return function(n){var o=t.message;return t.errors&&t.errors.length&&(o=t.errors[0]),"string"==typeof t&&(o={value:t,type:"error"}),n({type:d.default.FAIL_UPLOAD,payload:{queuedId:e,message:o}})}}function s(){return function(e){return e({type:d.default.PURGE_UPLOAD_QUEUE,payload:null})}}function i(e){return function(t){return t({type:d.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})}}function l(e,t){return function(n){return n({type:d.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})}}function a(e,t){return function(n){return n({type:d.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.addQueuedFile=o,t.failUpload=r,t.purgeUploadQueue=s,t.removeQueuedFile=i,t.succeedUpload=l,t.updateQueuedFile=a;var u=n("./client/src/state/queuedFiles/QueuedFilesActionTypes.js"),d=function(e){return e&&e.__esModule?e:{default:e}}(u)},"./client/src/state/queuedFiles/QueuedFilesReducer.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:m,t=arguments[1];switch(t.type){case d.default.ADD_QUEUED_FILE:return(0,a.default)(i({},e,{items:[].concat(r(e.items),[i({},p.default,t.payload.file)])}));case d.default.FAIL_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,{message:t.payload.message}):e})}));case d.default.PURGE_UPLOAD_QUEUE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return!e.id})}));case d.default.REMOVE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.filter(function(e){return e.queuedId!==t.payload.queuedId})}));case d.default.SUCCEED_UPLOAD:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.json,{messages:[{value:h.default._t("AssetAdmin.DROPZONE_SUCCESS_UPLOAD"),type:"success",extraClass:"success"}]}):e})}));case d.default.UPDATE_QUEUED_FILE:return(0,a.default)(i({},e,{items:e.items.map(function(e){return e.queuedId===t.payload.queuedId?i({},e,t.payload.updates):e})}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1],n=(0,p.default)(e,t,h);switch(t.type){case a.default.UPLOADFIELD_ADD_FILE:return n(function(e){return e.files.find(function(e){return e.id===t.payload.file.id})?e:i({},e,{files:[].concat(r(e.files),[i({},d.default,t.payload.file)])})});case a.default.UPLOADFIELD_SET_FILES:return n(function(){return{files:t.payload.files}});case a.default.UPLOADFIELD_UPLOAD_FAILURE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,{message:t.payload.message}):e})}});case a.default.UPLOADFIELD_REMOVE_FILE:return n(function(e){return{files:e.files.filter(function(e){return!(t.payload.file.queuedId&&e.queuedId===t.payload.file.queuedId||t.payload.file.id&&e.id===t.payload.file.id)})}});case a.default.UPLOADFIELD_UPLOAD_SUCCESS:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.json):e})}});case a.default.UPLOADFIELD_UPDATE_QUEUED_FILE:return n(function(e){return{files:e.files.map(function(e){return e.queuedId===t.payload.queuedId?Object.assign({},e,t.payload.updates):e})}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0?s.default._t("AssetAdmin.UPDATE_FILE","Update file"):s.default._t("AssetAdmin.INSERT_FILE","Insert file");return e.mutateField("action_insert",function(e){return o({},e,{title:r||e.title})}),e.getState()};t.default=i},"./client/src/transforms/FormAction/ownerAwareUnpublish.js":function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0?[a.default.inject(a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_1","This file is being used in {count} other published section(s)."),{count:r}),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_2","Ensure files are removed from content areas prior to unpublishing them. Otherwise, they will appear as broken links."),a.default._t("AssetAdmin.SINGLE_OWNED_WARNING_3","Do you want to unpublish this file anyway?")].join("\n\n"):a.default._t("AssetAdmin.CONFIRMUNPUBLISH","Are you sure you want to unpublish this record?"),confirm(s)?n(e,o):e.preventDefault()}});return i.default.createElement(e,o)}};t.default=u},"./client/src/transforms/TreeDropdownField/moveTreeDropdownField.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.disabledTreeDropdownField=void 0;var o=Object.assign||function(e){for(var t=1;t1?n-1:0),r=1;r=s.length)break;l=s[i++],l.apply(this,o)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var o=0;o=n.length)break;r=n[o++];var s=r;if(/(^| )dz-message($| )/.test(s.className)){e=s,s.className="dz-message";break}}e||(e=t.createElement('
'),this.element.appendChild(e));var i=e.getElementsByTagName("span")[0];return i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,o){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},s=e.width/e.height;null==t&&null==n?(t=r.srcWidth,n=r.srcHeight):null==t?t=n*s:null==n&&(n=t/s),t=Math.min(t,r.srcWidth),n=Math.min(n,r.srcHeight);var i=t/n;if(r.srcWidth>t||r.srcHeight>n)if("crop"===o)s>i?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*i):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/i);else{if("contain"!==o)throw new Error("Unknown resizeMethod '"+o+"'");s>i?n=t/s:t=n*s}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=n,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var o=e.previewElement.querySelectorAll("[data-dz-name]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;i.textContent=e.name}for(var l=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,l=l;!(a>=l.length);)i=l[a++],i.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink));for(var u=function(o){return o.preventDefault(),o.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)},d=e.previewElement.querySelectorAll("[data-dz-remove]"),c=0,d=d;;){var p;if(c>=d.length)break;p=d[c++],p.addEventListener("click",u)}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(var n=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;s.alt=e.name,s.src=t}return setTimeout(function(){return e.previewElement.classList.add("dz-image-preview")},1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);for(var n=e.previewElement.querySelectorAll("[data-dz-errormessage]"),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++],r.textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement)for(var o=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;"PROGRESS"===i.nodeName?i.value=t:i.style.width=t+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.length)break;i=r[s++];var l=i;for(var a in l){var u=l[a];e[a]=u}}return e}}]),l(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(e){return e.accepted}).map(function(e){return e})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(e){return!e.accepted}).map(function(e){return e})}},{key:"getFilesWithStatus",value:function(e){return this.files.filter(function(t){return t.status===e}).map(function(e){return e})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(e){return e.status===t.UPLOADING||e.status===t.QUEUED}).map(function(e){return e})}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&function n(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",t.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t=e.hiddenFileInput.files;if(t.length)for(var o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;e.addFile(i)}return e.emit("addedfiles",t),n()})}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var n=this.events,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;this.on(s,this.options[s])}this.on("uploadprogress",function(){return e.updateTotalUploadProgress()}),this.on("removedfile",function(){return e.updateTotalUploadProgress()}),this.on("canceled",function(t){return e.emit("complete",t)}),this.on("complete",function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout(function(){return e.emit("queuecomplete")},0)});var i=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return i(t),e.emit("dragenter",t)},dragover:function(t){var n=void 0;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",i(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return i(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach(function(n){return e.listeners.push({element:n,events:{click:function(o){return(n!==e.element||o.target===e.element||t.elementInside(o.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,n=0;if(this.getActiveFiles().length){for(var o=this.getActiveFiles(),r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;t+=i.upload.bytesSent,n+=i.upload.total}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e=void 0,n=void 0;if(e=this.getExistingFallback())return e;var o='
';this.options.dictFallbackText&&(o+="

"+this.options.dictFallbackText+"

"),o+='
';var r=t.createElement(o);return"FORM"!==this.element.tagName?(n=t.createElement('
'),n.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:r}},{key:"getExistingFallback",value:function(){for(var e=["div","form"],t=0;t=t.length)break;o=t[n++];var r=o;if(/(^| )fallback($| )/.test(r.className))return r}}(this.element.getElementsByTagName(o)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.addEventListener(n,o,!1))}return t}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(e){return function(){var t=[];for(var n in e.events){var o=e.events[n];t.push(e.element.removeEventListener(n,o,!1))}return t}()})}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(t){return e.cancelUpload(t)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var o=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),n=s;break}}t=Math.round(10*t)/10}return""+t+" "+this.options.dictFileSizeUnits[n]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n=t.length)break;o=t[n++];var r=o;this.addFile(r)}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){for(var n=[],o=e,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i,l=s;null!=l.webkitGetAsEntry&&(i=l.webkitGetAsEntry())?i.isFile?n.push(t.addFile(l.getAsFile())):i.isDirectory?n.push(t._addFilesFromDirectory(i,i.name)):n.push(void 0):null==l.getAsFile||null!=l.kind&&"file"!==l.kind?n.push(void 0):n.push(t.addFile(l.getAsFile()))}return n}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,o=e.createReader(),r=function(e){return i(console,"log",function(t){return t.log(e)})};return function e(){return o.readEntries(function(o){if(o.length>0){for(var r=o,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.isFile?l.file(function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=t+"/"+e.name,n.addFile(e)}):l.isDirectory&&n._addFilesFromDirectory(l,t+"/"+l.name)}e()}return null},r)}()}},{key:"accept",value:function(e,n){return this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var n=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return t?(e.accepted=!1,n._errorProcessing([e],t)):(e.accepted=!0,n.options.autoQueue&&n.enqueueFile(e)),n._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(e){for(var t=e,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;this.enqueueFile(r)}return null}},{key:"enqueueFile",value:function(e){var n=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return n.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout(function(){return t._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()})}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=d(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var n=this.files.slice(),o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;(s.status!==t.UPLOADING||e)&&this.removeFile(s)}return null}},{key:"resizeImage",value:function(e,n,o,r,s){var i=this;return this.createThumbnail(e,n,o,r,!0,function(n,o){if(null==o)return s(e);var r=i.options.resizeMimeType;null==r&&(r=e.type);var l=o.toDataURL(r,i.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(l=h.restore(e.dataURL,l)),s(t.dataURItoBlob(l))})}},{key:"createThumbnail",value:function(e,t,n,o,r,s){var i=this,l=new FileReader;return l.onload=function(){return e.dataURL=l.result,"image/svg+xml"===e.type?void(null!=s&&s(l.result)):i.createThumbnailFromUrl(e,t,n,o,r,s)},l.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(e,t,n,o,r,s,i){var l=this,a=document.createElement("img");return i&&(a.crossOrigin=i),a.onload=function(){var i=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(i=function(e){return EXIF.getData(a,function(){return e(EXIF.getTag(this,"Orientation"))})}),i(function(r){e.width=a.width,e.height=a.height;var i=l.options.resize.call(l,e,t,n,o),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=i.trgWidth,u.height=i.trgHeight,r>4&&(u.width=i.trgHeight,u.height=i.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.width);break;case 7:d.rotate(.5*Math.PI),d.translate(u.height,-u.width),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.height,0)}f(d,a,null!=i.srcX?i.srcX:0,null!=i.srcY?i.srcY:0,i.srcWidth,i.srcHeight,null!=i.trgX?i.trgX:0,null!=i.trgY?i.trgY:0,i.trgWidth,i.trgHeight);var c=u.toDataURL("image/png");if(null!=s)return s(c,u)})},null!=s&&(a.onerror=s),a.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var o=this.getQueuedFiles();if(o.length>0){if(this.options.uploadMultiple)return this.processFiles(o.slice(0,e-t));for(;n=n.length)break;r=n[o++];var s=r;s.processing=!0,s.status=t.UPLOADING,this.emit("processing",s)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter(function(t){return t.xhr===e}).map(function(e){return e})}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var n=this._getFilesWithXhr(e.xhr),o=n,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++],s.status=t.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var i=n,l=0,i=i;;){var a;if(l>=i.length)break;a=i[l++];var u=a;this.emit("canceled",u)}this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=r.upload.totalChunkCount)){i++;var l=o*n.options.chunkSize,a=Math.min(l+n.options.chunkSize,r.size),u={name:n._getParamName(0),data:s.webkitSlice?s.webkitSlice(l,a):s.slice(l,a),filename:r.upload.filename,chunkIndex:o};r.upload.chunks[o]={file:r,index:o,dataBlock:u,status:t.UPLOADING,progress:0,retries:0},n._uploadData(e,[u])}};if(r.upload.finishedChunkUpload=function(o){var s=!0;o.status=t.SUCCESS,o.dataBlock=null,o.xhr=null;for(var i=0;i=s.length)break;l=s[i++],l.xhr=r}e[0].upload.chunked&&(e[0].upload.chunks[n[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,e),u=this.resolveOption(this.options.url,e);r.open(a,u,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){o._finishedUploading(e,r,t)},r.onerror=function(){o._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return o._updateFilesUploadProgress(e,r,t)};var d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&t.extend(d,this.options.headers);for(var c in d){var p=d[c];p&&r.setRequestHeader(c,p)}var f=new FormData;if(this.options.params){var h=this.options.params;"function"==typeof h&&(h=h.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null));for(var m in h){var g=h[m];f.append(m,g)}}for(var y=e,_=0,y=y;;){var v;if(_>=y.length)break;v=y[_++];var b=v;this.emit("sending",b,r,f)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,f),this._addFormElementData(f);for(var E=0;E=t.length)break;o=t[n++];var r=o,s=r.getAttribute("name"),i=r.getAttribute("type");if(i&&(i=i.toLowerCase()),void 0!==s&&null!==s)if("SELECT"===r.tagName&&r.hasAttribute("multiple"))for(var l=r.options,a=0,l=l;;){var u;if(a>=l.length)break;u=l[a++];var d=u;d.selected&&e.append(s,d.value)}else(!i||"checkbox"!==i&&"radio"!==i||r.checked)&&e.append(s,r.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var o=void 0;if(void 0!==n){if(o=100*n.loaded/n.total,e[0].upload.chunked){var r=e[0],s=this._getChunk(r,t);s.progress=o,s.total=n.total,s.bytesSent=n.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var i=0;i=l.length)break;u=l[a++];var d=u;d.upload.progress=o,d.upload.total=n.total,d.upload.bytesSent=n.loaded}for(var c=e,p=0,c=c;;){var f;if(p>=c.length)break;f=c[p++];var h=f;this.emit("uploadprogress",h,h.upload.progress,h.upload.bytesSent)}}else{var m=!0;o=100;for(var g=e,y=0,g=g;;){var _;if(y>=g.length)break;_=g[y++];var v=_;100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(m=!1),v.upload.progress=o,v.upload.bytesSent=v.upload.total}if(m)return;for(var b=e,E=0,b=b;;){var S;if(E>=b.length)break;S=b[E++];var j=S;this.emit("uploadprogress",j,o,j.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,n,o){var r=void 0;if(e[0].status!==t.CANCELED&&4===n.readyState){if("arraybuffer"!==n.responseType&&"blob"!==n.responseType&&(r=n.responseText,n.getResponseHeader("content-type")&&~n.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){o=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=n.status&&n.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],n)):this._finished(e,r,o):this._handleUploadError(e,n,r)}}},{key:"_handleUploadError",value:function(e,n,o){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],n);if(r.retries++=s.length);)s[i++],this._errorProcessing(e,o||this.options.dictResponseError.replace("{{statusCode}}",n.status),n)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.SUCCESS,this.emit("success",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,n,o){for(var r=e,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;l.status=t.ERROR,this.emit("error",l,n,o),this.emit("complete",l)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,n,o),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}]),t}(a);u.initClass(),u.version="5.5.1",u.options={},u.optionsForElement=function(e){return e.getAttribute("id")?u.options[c(e.getAttribute("id"))]:void 0},u.instances=[],u.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},u.autoDiscover=!0,u.discover=function(){var e=void 0;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){for(var n=[],o=t,r=0,o=o;;){var s;if(r>=o.length)break;s=o[r++];var i=s;/(^| )dropzone($| )/.test(i.className)?n.push(e.push(i)):n.push(void 0)}return n}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){for(var t=[],n=e,o=0,n=n;;){var r;if(o>=n.length)break;r=n[o++];var s=r;!1!==u.optionsForElement(s)?t.push(new u(s)):t.push(void 0)}return t}()},u.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],u.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=u.blacklistedBrowsers,n=0,t=t;;){var o;if(n>=t.length)break;o=t[n++];var r=o;r.test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},u.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),r=new Uint8Array(o),s=0,i=t.length,l=0<=i;l?s<=i:s>=i;l?s++:s--)r[s]=t.charCodeAt(s);return new Blob([o],{type:n})};var d=function(e,t){return e.filter(function(e){return e!==t}).map(function(e){return e})},c=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})};u.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},u.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},u.getElement=function(e,t){var n=void 0;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},u.getElements=function(e,t){var n=void 0,o=void 0;if(e instanceof Array){o=[];try{for(var r=e,s=0,r=r;!(s>=r.length);)n=r[s++],o.push(this.getElement(n,t))}catch(e){o=null}}else if("string"==typeof e){o=[];for(var i=document.querySelectorAll(e),l=0,i=i;!(l>=i.length);)n=i[l++],o.push(n)}else null!=e.nodeType&&(o=[e]);if(null==o||!o.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return o},u.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},u.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var n=e.type,o=n.replace(/\/.*$/,""),r=t,s=0,r=r;;){var i;if(s>=r.length)break;i=r[s++];var l=i;if(l=l.trim(),"."===l.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(l.toLowerCase(),e.name.length-l.length))return!0}else if(/\/\*$/.test(l)){if(o===l.replace(/\/.*$/,""))return!0}else if(n===l)return!0}return!1},void 0!==e&&null!==e&&(e.fn.dropzone=function(e){return this.each(function(){return new u(this,e)})}),void 0!==t&&null!==t?t.exports=u:window.Dropzone=u,u.ADDED="added",u.QUEUED="queued",u.ACCEPTED=u.QUEUED,u.UPLOADING="uploading",u.PROCESSING=u.UPLOADING,u.CANCELED="canceled",u.ERROR="error",u.SUCCESS="success";var p=function(e){var t=(e.naturalWidth,e.naturalHeight),n=document.createElement("canvas");n.width=1,n.height=t;var o=n.getContext("2d");o.drawImage(e,0,0);for(var r=o.getImageData(1,0,1,t),s=r.data,i=0,l=t,a=t;a>i;)0===s[4*(a-1)+3]?l=a:i=a,a=l+i>>1;var u=a/t;return 0===u?1:u},f=function(e,t,n,o,r,s,i,l,a,u){var d=p(t);return e.drawImage(t,n,o,r,s,i,l,a,u/d)},h=function(){function e(){r(this,e)}return l(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,o=void 0,r="",s=void 0,i=void 0,l=void 0,a="",u=0;n=e[u++],o=e[u++],r=e[u++],s=n>>2,i=(3&n)<<4|o>>4,l=(15&o)<<2|r>>6,a=63&r,isNaN(o)?l=a=64:isNaN(r)&&(a=64),t=t+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(a),n=o=r="",s=i=l=a="",ue.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,o="",r=void 0,s=void 0,i=void 0,l="",a=0,u=[],d=/[^A-Za-z0-9\+\/\=]/g;for(d.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");r=this.KEY_STR.indexOf(e.charAt(a++)),s=this.KEY_STR.indexOf(e.charAt(a++)),i=this.KEY_STR.indexOf(e.charAt(a++)),l=this.KEY_STR.indexOf(e.charAt(a++)),t=r<<2|s>>4,n=(15&s)<<4|i>>2,o=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(o),t=n=o="",r=s=i=l="",a0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var o=this.getColumnMetadataByName(e);return void 0===o||null===o?n:o.hasOwnProperty(t)?o[t]:n}},{key:"orderColumns",value:function(e){var t=this;return a(e,function(e){var n=l(t.columnMetadata,{columnName:e});return void 0===n||null===n||isNaN(n.order)?100:n.order})}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=r({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),o.createElement("div",null)):o.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=s},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t0&&(e=o.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=o.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,r=null,i=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},l),r=s({textAlign:"center",width:"33%"},l),n=s({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(o.createElement("option",{value:u,key:u},u));return o.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},o.createElement("div",{className:this.props.previousClassName,style:n},e),o.createElement("div",{className:"griddle-page",style:r},o.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),o.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/deep.js")),i=n("./node_modules/lodash/isFunction.js"),l=n("./node_modules/lodash/zipObject.js"),a=n("./node_modules/lodash/assign.js"),u=n("./node_modules/lodash/defaults.js"),d=n("./node_modules/lodash/toPairs.js"),c=n("./node_modules/lodash/without.js"),p=r({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var r=this.props.columnSettings.getColumns(),p=l(r,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(s.pick(f,c(r,"children"))),y=g.map(function(t,r){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===r&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===r&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?o.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===r&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==i&&null!==i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=o.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},u)}else s=o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:r,style:n},l,e.formatData(t[1]));return s||o.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:r,style:n},l,t[1])});null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),y&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection&&(this.props.multipleSelectionSettings.getSelectedRowIds(),y.unshift(o.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},o.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"}))));var _=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?_="child-row":t.props.hasChildren&&(_=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),o.createElement("tr",{onClick:h,className:_},y)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/lodash/pick.js")),i=r({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return o.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(o.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var r=null;return e.state.showChildren&&(r=e.props.hasChildren&&this.props.data.children.map(function(t,n){var r=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return o.createElement("tr",{key:r,style:{paddingLeft:5}},o.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},o.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return o.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:r})})),!1===e.props.hasChildren?t[0]:o.createElement("tbody",null,e.state.showChildren?t.concat(r):t)}});e.exports=i},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/lodash/includes.js"),i=n("./node_modules/lodash/without.js"),l=n("./node_modules/lodash/find.js"),a=r({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,n){var r=s(e.props.selectedColumns,t),i=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(a=i.displayName),void 0!==i&&null!=i&&i.locked?o.createElement("div",{className:"column checkbox"},o.createElement("label",null,o.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:r,"data-name":t}),a)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:o.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},o.createElement("label",null,o.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:r,"data-name":t}),a))}));var n=e.props.enableToggleCustom?o.createElement("div",{className:"form-group"},o.createElement("label",{htmlFor:"maxRows"},o.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",r=this.props.showSetPageSize?o.createElement("div",null,o.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",o.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},o.createElement("option",{value:"5"},"5"),o.createElement("option",{value:"10"},"10"),o.createElement("option",{value:"25"},"25"),o.createElement("option",{value:"50"},"50"),o.createElement("option",{value:"100"},"100")))):"";return o.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},o.createElement("h6",null,this.props.settingsText),o.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),r,n)}});e.exports=a},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,n){"use strict";var o=n(0),r=n("./node_modules/create-react-class/index.js"),s=n("./node_modules/griddle-react/modules/gridTitle.jsx.js"),i=n("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),l=(n("./node_modules/griddle-react/modules/columnProperties.js"),n("./node_modules/griddle-react/modules/rowProperties.js"),r({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"â–¶",parentRowExpandedComponent:"â–¼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var r={scrollTop:t,scrollHeight:n,clientHeight:o};this.setState(r)}.6*(n-(t+o)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,r=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var l=e.getAdjustedRowHeight(),a=Math.ceil(e.state.clientHeight/l),u=Math.max(0,Math.floor(e.state.scrollTop/l)-.25*a),d=Math.min(u+1.25*a,this.props.data.length-1);n=n.slice(u,d+1);var c={height:u*l+"px"};r=o.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};s=o.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map(function(n,r){var s=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,r);return s&&(t=s),o.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:l+"-container",uniqueId:l,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})});if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(o.createElement("tr",{key:"no-data-section"},o.createElement("td",{colSpan:h},this.props.noDataSection)))}return r&&f.unshift(r),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var r=null,i=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(r={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a=null,u=null;this.props.useGriddleStyles&&(a={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?o.createElement(this.props.externalLoadingComponent,null):o.createElement("div",null,"Loading...");i=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{style:a,colSpan:u},d)))}var c=this.props.showTableHeading?o.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=o.createElement("tbody",null,e));var p=o.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(l.tableLayout="fixed"),o.createElement("div",null,o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,i,p)))):o.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:r},o.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,i,p))}}));e.exports=l},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t=0)return!0;return!1})},defaultColumnFilter:function(e,t,n){var o=P(I(n)?n:[n],function(e){return(e||"").toLowerCase()});return M(v.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),M(o,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce(function(n,o){return T(n,function(n){var r=v.getAt(n,o||""),s=e[o];return t(o||"",r,s)})},this.props.results),o={columnFilters:e};e?(o.filteredResults=n,o.maxPage=this.getMaxPage(o.filteredResults)):this.state.filter?o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):o.filteredResults=null,this.setState(o)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=k(n,t);else{var o={};o[t]=e,n=D({},n,o)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var n=this,o={page:0,filter:e};o.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),o.maxPage=n.getMaxPage(o.filteredResults),(x(e)||A(e)||F(e))&&(o.filter=e,o.filteredResults=null),n.setState(o),this._resetSelectedRows()},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return void 0===e||null===e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,n={page:e};t.setState(n)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=I(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=S(this.props.columnMetadata,{columnName:e})||{},o=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],r=null,s=o.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);s=(s+1)%o.length,r=o[s]?o[s]:null;var i={page:0,sortColumn:e,sortDirection:r};this.setState(i)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=v.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,n){return e===t[n]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,P(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new y(this.props.results.length>0?v.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new _(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var o=this,r=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:i}),a={columns:[],orders:[]};if(l.length>0&&(s=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort(function(e,t){return s(R(e,i),R(t,i))}),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=N(e,function(e){return s(R(e,i))},[this.state.sortDirection]));else{var u=[function(e){return(R(e,i)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach(function(e,t){u.push(function(t){return(R(t,e)||"").toString().toLowerCase()}),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(o.state.sortDirection)}),e=N(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=j(e,(c+1)*this.state.resultsPerPage);else{var p=b(e,c*this.state.resultsPerPage);e=(E||w)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=r.getDataForRender(m[r.props.childrenColumnName],t,!1),"children"!==r.props.childrenColumnName&&delete m[r.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),o=this;C(e,function(e){o._updateSelectedRowIds(e[o.props.uniqueIdentifier],n,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),o=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],o,t);var r=this._getAreAllRowsChecked(o,P(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:r,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,r)},_updateSelectedRowIds:function(e,t,n){n?void 0===S(t,function(t){return e===t})&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===O(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!S(this.props.results,function(e){return"children"in e})&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?r.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):r.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?r.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,o=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),o=this.getSettingsStyles(),s=this.getClearFixStyles()),r.createElement("div",{className:"top-section",style:s},r.createElement("div",{className:"griddle-filter",style:n},e),r.createElement("div",{className:"griddle-settings-toggle",style:o},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return r.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?r.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):r.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?r.createElement(d,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return r.createElement(this.props.customGridComponent,o({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,o,s){return r.createElement("div",null,r.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&o)},getStandardGridSection:function(e,t,n,o,s){var i=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return r.createElement("div",{className:"griddle-body"},r.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:o,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,o,r,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,o,s):this.getStandardGridSection(e,t,n,o,r)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?r.createElement("div",{className:this.props.noDataClassName},r.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):r.createElement(c,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),o=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),l=this.getDataForRender(e,i,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?C(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)}):s=v.keys(k(e[0],a)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",r.createElement("div",{className:m},o,h,r.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n-1}var r=n("./node_modules/lodash/_baseIndexOf.js");e.exports=o},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function n(e,t,n){for(var o=-1,r=null==e?0:e.length;++o=d&&(p=u,f=!1,t=new r(t));e:for(;++c0&&n(d)?t>1?o(d,t-1,n,i,l):r(l,d):i||(l[l.length]=d)}return l}var r=n("./node_modules/lodash/_arrayPush.js"),s=n("./node_modules/lodash/_isFlattenable.js");e.exports=o},"./node_modules/lodash/_baseFor.js":function(e,t,n){var o=n("./node_modules/lodash/_createBaseFor.js"),r=o();e.exports=r},"./node_modules/lodash/_baseForOwn.js":function(e,t,n){function o(e,t){return e&&r(e,t,s)}var r=n("./node_modules/lodash/_baseFor.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_baseGet.js":function(e,t,n){function o(e,t){t=r(t,e);for(var n=0,o=t.length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var _=-1,v=h[0];e:for(;++_r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++ot||i&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!s)return 1;if(!o&&!i&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}var r=n("./node_modules/lodash/_compareAscending.js");e.exports=o},"./node_modules/lodash/_copyArray.js":function(e,t){function n(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n1?n[r-1]:void 0,l=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,l&&s(n[0],n[1],l)&&(i=r<3?void 0:i,r=1),t=Object(t);++o-1?l[a?t[u]:u]:void 0}}var r=n("./node_modules/lodash/_baseIteratee.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/_createToPairs.js":function(e,t,n){function o(e){return function(t){var n=s(t);return n==a?i(t):n==u?l(t):r(t,e(t))}}var r=n("./node_modules/lodash/_baseToPairs.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/_mapToArray.js"),l=n("./node_modules/lodash/_setToPairs.js"),a="[object Map]",u="[object Set]";e.exports=o},"./node_modules/lodash/_customOmitClone.js":function(e,t,n){function o(e){return r(e)?void 0:e}var r=n("./node_modules/lodash/isPlainObject.js");e.exports=o},"./node_modules/lodash/_defineProperty.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},"./node_modules/lodash/_equalArrays.js":function(e,t,n){function o(e,t,n,o,u,d){var c=n&l,p=e.length,f=t.length;if(p!=f&&!(c&&f>p))return!1;var h=d.get(e);if(h&&d.get(t))return h==t;var m=-1,g=!0,y=n&a?new r:void 0;for(d.set(e,t),d.set(t,e);++m-1&&e%1==0&&e-1}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_listCacheSet.js":function(e,t,n){function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var r=n("./node_modules/lodash/_assocIndexOf.js");e.exports=o},"./node_modules/lodash/_mapCacheClear.js":function(e,t,n){function o(){this.size=0,this.__data__={hash:new r,map:new(i||s),string:new r}}var r=n("./node_modules/lodash/_Hash.js"),s=n("./node_modules/lodash/_ListCache.js"),i=n("./node_modules/lodash/_Map.js");e.exports=o},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,n){function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheGet.js":function(e,t,n){function o(e){return r(this,e).get(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheHas.js":function(e,t,n){function o(e){return r(this,e).has(e)}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapCacheSet.js":function(e,t,n){function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var r=n("./node_modules/lodash/_getMapData.js");e.exports=o},"./node_modules/lodash/_mapToArray.js":function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n}e.exports=n},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function n(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},"./node_modules/lodash/_memoizeCapped.js":function(e,t,n){function o(e){var t=r(e,function(e){return n.size===s&&n.clear(),e}),n=t.cache;return t}var r=n("./node_modules/lodash/memoize.js"),s=500;e.exports=o},"./node_modules/lodash/_nativeCreate.js":function(e,t,n){var o=n("./node_modules/lodash/_getNative.js"),r=o(Object,"create");e.exports=r},"./node_modules/lodash/_nativeKeys.js":function(e,t,n){var o=n("./node_modules/lodash/_overArg.js"),r=o(Object.keys,Object);e.exports=r},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},"./node_modules/lodash/_nodeUtil.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_freeGlobal.js"),r="object"==typeof t&&t&&!t.nodeType&&t,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i&&o.process,a=function(){try{return s&&s.require&&s.require("util").types||l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=a}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},"./node_modules/lodash/_overArg.js":function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},"./node_modules/lodash/_overRest.js":function(e,t,n){function o(e,t,n){return t=s(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,l=s(o.length-t,0),a=Array(l);++i0){if(++t>=o)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var o=800,r=16,s=Date.now;e.exports=n},"./node_modules/lodash/_stackClear.js":function(e,t,n){function o(){this.__data__=new r,this.size=0}var r=n("./node_modules/lodash/_ListCache.js");e.exports=o},"./node_modules/lodash/_stackDelete.js":function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},"./node_modules/lodash/_stackGet.js":function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},"./node_modules/lodash/_stackHas.js":function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},"./node_modules/lodash/_stackSet.js":function(e,t,n){function o(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!s||o.length2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(o=1);++n-1:!!d&&r(e,t,n)>-1}var r=n("./node_modules/lodash/_baseIndexOf.js"),s=n("./node_modules/lodash/isArrayLike.js"),i=n("./node_modules/lodash/isString.js"),l=n("./node_modules/lodash/toInteger.js"),a=n("./node_modules/lodash/values.js"),u=Math.max;e.exports=o},"./node_modules/lodash/initial.js":function(e,t,n){function o(e){return(null==e?0:e.length)?r(e,0,-1):[]}var r=n("./node_modules/lodash/_baseSlice.js");e.exports=o},"./node_modules/lodash/intersection.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseIntersection.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_castArrayLikeObject.js"),l=s(function(e){var t=o(e,i);return t.length&&t[0]===e[0]?r(t):[]});e.exports=l},"./node_modules/lodash/isArguments.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsArguments.js"),r=n("./node_modules/lodash/isObjectLike.js"),s=Object.prototype,i=s.hasOwnProperty,l=s.propertyIsEnumerable,a=o(function(){return arguments}())?o:function(e){return r(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},"./node_modules/lodash/isArray.js":function(e,t){var n=Array.isArray;e.exports=n},"./node_modules/lodash/isArrayLike.js":function(e,t,n){function o(e){return null!=e&&s(e.length)&&!r(e)}var r=n("./node_modules/lodash/isFunction.js"),s=n("./node_modules/lodash/isLength.js");e.exports=o},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,n){function o(e){return s(e)&&r(e)}var r=n("./node_modules/lodash/isArrayLike.js"),s=n("./node_modules/lodash/isObjectLike.js");e.exports=o},"./node_modules/lodash/isBuffer.js":function(e,t,n){(function(e){var o=n("./node_modules/lodash/_root.js"),r=n("./node_modules/lodash/stubFalse.js"),s="object"==typeof t&&t&&!t.nodeType&&t,i=s&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===s,a=l?o.Buffer:void 0,u=a?a.isBuffer:void 0,d=u||r;e.exports=d}).call(t,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,n){function o(e){if(null==e)return!0;if(a(e)&&(l(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=s(e);if(t==p||t==f)return!e.size;if(d(e))return!r(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}var r=n("./node_modules/lodash/_baseKeys.js"),s=n("./node_modules/lodash/_getTag.js"),i=n("./node_modules/lodash/isArguments.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/isArrayLike.js"),u=n("./node_modules/lodash/isBuffer.js"),d=n("./node_modules/lodash/_isPrototype.js"),c=n("./node_modules/lodash/isTypedArray.js"),p="[object Map]",f="[object Set]",h=Object.prototype,m=h.hasOwnProperty;e.exports=o},"./node_modules/lodash/isFunction.js":function(e,t,n){function o(e){if(!s(e))return!1;var t=r(e);return t==l||t==a||t==i||t==u}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObject.js"),i="[object AsyncFunction]",l="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=o},"./node_modules/lodash/isLength.js":function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=n},"./node_modules/lodash/isMap.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsMap.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isMap,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isNull.js":function(e,t){function n(e){return null===e}e.exports=n},"./node_modules/lodash/isObject.js":function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},"./node_modules/lodash/isObjectLike.js":function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},"./node_modules/lodash/isPlainObject.js":function(e,t,n){function o(e){if(!i(e)||r(e)!=l)return!1;var t=s(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==p}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/_getPrototype.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object Object]",a=Function.prototype,u=Object.prototype,d=a.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=o},"./node_modules/lodash/isSet.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsSet.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isSet,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isString.js":function(e,t,n){function o(e){return"string"==typeof e||!s(e)&&i(e)&&r(e)==l}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isArray.js"),i=n("./node_modules/lodash/isObjectLike.js"),l="[object String]";e.exports=o},"./node_modules/lodash/isSymbol.js":function(e,t,n){function o(e){return"symbol"==typeof e||s(e)&&r(e)==i}var r=n("./node_modules/lodash/_baseGetTag.js"),s=n("./node_modules/lodash/isObjectLike.js"),i="[object Symbol]";e.exports=o},"./node_modules/lodash/isTypedArray.js":function(e,t,n){var o=n("./node_modules/lodash/_baseIsTypedArray.js"),r=n("./node_modules/lodash/_baseUnary.js"),s=n("./node_modules/lodash/_nodeUtil.js"),i=s&&s.isTypedArray,l=i?r(i):o;e.exports=l},"./node_modules/lodash/isUndefined.js":function(e,t){function n(e){return void 0===e}e.exports=n},"./node_modules/lodash/keys.js":function(e,t,n){function o(e){return i(e)?r(e):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeys.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/keysIn.js":function(e,t,n){function o(e){return i(e)?r(e,!0):s(e)}var r=n("./node_modules/lodash/_arrayLikeKeys.js"),s=n("./node_modules/lodash/_baseKeysIn.js"),i=n("./node_modules/lodash/isArrayLike.js");e.exports=o},"./node_modules/lodash/last.js":function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},"./node_modules/lodash/map.js":function(e,t,n){function o(e,t){return(l(e)?r:i)(e,s(t,3))}var r=n("./node_modules/lodash/_arrayMap.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseMap.js"),l=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/memoize.js":function(e,t,n){function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],s=n.cache;if(s.has(r))return s.get(r);var i=e.apply(this,o);return n.cache=s.set(r,i)||s,i};return n.cache=new(o.Cache||r),n}var r=n("./node_modules/lodash/_MapCache.js"),s="Expected a function";o.Cache=r,e.exports=o},"./node_modules/lodash/omit.js":function(e,t,n){var o=n("./node_modules/lodash/_arrayMap.js"),r=n("./node_modules/lodash/_baseClone.js"),s=n("./node_modules/lodash/_baseUnset.js"),i=n("./node_modules/lodash/_castPath.js"),l=n("./node_modules/lodash/_copyObject.js"),a=n("./node_modules/lodash/_customOmitClone.js"),u=n("./node_modules/lodash/_flatRest.js"),d=n("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var n={};if(null==e)return n;var u=!1;t=o(t,function(t){return t=i(t,e),u||(u=t.length>1),t}),l(e,d(e),n),u&&(n=r(n,7,a));for(var c=t.length;c--;)s(n,t[c]);return n});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,n){function o(e,t,n,o){return null==e?[]:(s(t)||(t=null==t?[]:[t]),n=o?void 0:n,s(n)||(n=null==n?[]:[n]),r(e,t,n))}var r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/isArray.js");e.exports=o},"./node_modules/lodash/pick.js":function(e,t,n){var o=n("./node_modules/lodash/_basePick.js"),r=n("./node_modules/lodash/_flatRest.js"),s=r(function(e,t){return null==e?{}:o(e,t)});e.exports=s},"./node_modules/lodash/property.js":function(e,t,n){function o(e){return i(e)?r(l(e)):s(e)}var r=n("./node_modules/lodash/_baseProperty.js"),s=n("./node_modules/lodash/_basePropertyDeep.js"),i=n("./node_modules/lodash/_isKey.js"),l=n("./node_modules/lodash/_toKey.js");e.exports=o},"./node_modules/lodash/some.js":function(e,t,n){function o(e,t,n){var o=l(e)?r:i;return n&&a(e,t,n)&&(t=void 0),o(e,s(t,3))}var r=n("./node_modules/lodash/_arraySome.js"),s=n("./node_modules/lodash/_baseIteratee.js"),i=n("./node_modules/lodash/_baseSome.js"),l=n("./node_modules/lodash/isArray.js"),a=n("./node_modules/lodash/_isIterateeCall.js");e.exports=o},"./node_modules/lodash/sortBy.js":function(e,t,n){var o=n("./node_modules/lodash/_baseFlatten.js"),r=n("./node_modules/lodash/_baseOrderBy.js"),s=n("./node_modules/lodash/_baseRest.js"),i=n("./node_modules/lodash/_isIterateeCall.js"),l=s(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),r(e,o(t,1),[])});e.exports=l},"./node_modules/lodash/stubArray.js":function(e,t){function n(){return[]}e.exports=n},"./node_modules/lodash/stubFalse.js":function(e,t){function n(){return!1}e.exports=n},"./node_modules/lodash/take.js":function(e,t,n){function o(e,t,n){return e&&e.length?(t=n||void 0===t?1:s(t),r(e,0,t<0?0:t)):[]}var r=n("./node_modules/lodash/_baseSlice.js"),s=n("./node_modules/lodash/toInteger.js");e.exports=o},"./node_modules/lodash/toFinite.js":function(e,t,n){function o(e){return e?(e=r(e))===s||e===-s?(e<0?-1:1)*i:e===e?e:0:0===e?e:0}var r=n("./node_modules/lodash/toNumber.js"),s=1/0,i=1.7976931348623157e308;e.exports=o},"./node_modules/lodash/toInteger.js":function(e,t,n){function o(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}var r=n("./node_modules/lodash/toFinite.js");e.exports=o},"./node_modules/lodash/toNumber.js":function(e,t,n){function o(e){if("number"==typeof e)return e;if(s(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=u.test(e);return n||d.test(e)?c(e.slice(2),n?2:8):a.test(e)?i:+e}var r=n("./node_modules/lodash/isObject.js"),s=n("./node_modules/lodash/isSymbol.js"),i=NaN,l=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=o},"./node_modules/lodash/toPairs.js":function(e,t,n){var o=n("./node_modules/lodash/_createToPairs.js"),r=n("./node_modules/lodash/keys.js"),s=o(r);e.exports=s},"./node_modules/lodash/toString.js":function(e,t,n){function o(e){return null==e?"":r(e)}var r=n("./node_modules/lodash/_baseToString.js");e.exports=o},"./node_modules/lodash/uniqueId.js":function(e,t,n){function o(e){var t=++s;return r(e)+t}var r=n("./node_modules/lodash/toString.js"),s=0;e.exports=o},"./node_modules/lodash/values.js":function(e,t,n){function o(e){return null==e?[]:r(e,s(e))}var r=n("./node_modules/lodash/_baseValues.js"),s=n("./node_modules/lodash/keys.js");e.exports=o},"./node_modules/lodash/without.js":function(e,t,n){var o=n("./node_modules/lodash/_baseDifference.js"),r=n("./node_modules/lodash/_baseRest.js"),s=n("./node_modules/lodash/isArrayLikeObject.js"),i=r(function(e,t){return s(e)?o(e,t):[]});e.exports=i},"./node_modules/lodash/zipObject.js":function(e,t,n){function o(e,t){return s(e||[],t||[],r)}var r=n("./node_modules/lodash/_assignValue.js"),s=n("./node_modules/lodash/_baseZipObject.js");e.exports=o},"./node_modules/object-assign/index.js":function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,a=o(e),u=1;u1)for(var n=1;n1?t-1:0),o=1;o2?n-2:0),r=2;r1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o)}function v(e){function t(t,n,o,r,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var i=t[n],a=w(i);if("object"!==a)return new f("Invalid "+r+" `"+s+"` of type `"+a+"` supplied to `"+o+"`, expected an object.");for(var d in i)if(u(i,d)){var c=e(i,d,o,r,s+"."+d,l);if(c instanceof Error)return c}return null}return h(t)}function b(e){function n(t,n,o,r,s){for(var i=0;in+l||t+r-ao+i)};t.default=function(e,t,n){var o=e instanceof HTMLElement?(0,r.default)(e):e,i=t instanceof HTMLElement?(0,r.default)(t):t;return s(o.top,o.left,i.top,i.left,o.offsetWidth,o.offsetHeight,i.offsetWidth,i.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function o(t){var n=m,o=g;return m=g=void 0,E=t,_=e.apply(o,n)}function s(e){return E=e,v=setTimeout(d,t),w?o(e):_}function i(e){var n=e-b,o=e-E,r=t-n;return O?j(r,y-o):r}function a(e){var n=e-b,o=e-E;return void 0===b||n>=t||n<0||O&&o>=y}function d(){var e=C();if(a(e))return c(e);v=setTimeout(d,i(e))}function c(e){return v=void 0,I&&m?o(e):(m=g=void 0,_)}function p(){void 0!==v&&clearTimeout(v),E=0,m=b=g=v=void 0}function f(){return void 0===v?_:c(C())}function h(){var e=C(),n=a(e);if(m=arguments,g=this,b=e,n){if(void 0===v)return s(b);if(O)return v=setTimeout(d,t),o(b)}return void 0===v&&(v=setTimeout(d,t)),_}var m,g,y,_,v,b,E=0,w=!1,O=!1,I=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,r(n)&&(w=!!n.leading,O="maxWait"in n,y=O?S(l(n.maxWait)||0,t):y,I="trailing"in n?!!n.trailing:I),h.cancel=p,h.flush=f,h}function o(e,t,o){var s=!0,i=!0;if("function"!=typeof e)throw new TypeError(u);return r(o)&&(s="leading"in o?!!o.leading:s,i="trailing"in o?!!o.trailing:i),n(e,t,{leading:s,maxWait:t,trailing:i})}function r(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function i(e){return"symbol"==(void 0===e?"undefined":a(e))||s(e)&&E.call(e)==c}function l(e){if("number"==typeof e)return e;if(i(e))return d;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(p,"");var n=h.test(e);return n||m.test(e)?g(e.slice(2),n?2:8):f.test(e)?d:+e}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="Expected a function",d=NaN,c="[object Symbol]",p=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt,y="object"==(void 0===t?"undefined":a(t))&&t&&t.Object===Object&&t,_="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,v=y||_||Function("return this")(),b=Object.prototype,E=b.toString,S=Math.max,j=Math.min,C=function(){return v.Date.now()};e.exports=o}).call(t,n(19))},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o},function(e,t,n){"use strict";function o(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")}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 i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n ); - return {flags}; + return flags ? {flags} : null; } /** @@ -418,8 +420,14 @@ TableView.defaultProps = galleryViewDefaultProps; TableView.propTypes = { ...galleryViewPropTypes, sort: PropTypes.string.isRequired, + VersionedBadge: PropTypes.oneOfType([PropTypes.node, PropTypes.func]) }; export { TableView as Component }; -export default TableView; +export default compose( + inject( + ['VersionedBadge'], + VersionedBadge => ({ VersionedBadge }) + ) +)(TableView); diff --git a/package.json b/package.json index 76a7f6631..40bb1b0e1 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@silverstripe/eslint-config": "0.0.5", - "@silverstripe/webpack-config": "^1.0.0", + "@silverstripe/webpack-config": "^1.2.0", "@storybook/addon-actions": "^3.4.11", "@storybook/addons": "^3.4.11", "@storybook/react": "^3.4.11", diff --git a/yarn.lock b/yarn.lock index f0fc052e2..d7bea4c03 100644 --- a/yarn.lock +++ b/yarn.lock @@ -38,9 +38,10 @@ eslint-plugin-jsx-a11y "^5.1.1" eslint-plugin-react "^7.3.0" -"@silverstripe/webpack-config@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@silverstripe/webpack-config/-/webpack-config-1.0.0.tgz#95ab7a5cca9959346b9c0feed306f65c8d2f3182" +"@silverstripe/webpack-config@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@silverstripe/webpack-config/-/webpack-config-1.2.0.tgz#e79aeebda764b48ccafd62dd1e0b438e418757b5" + integrity sha512-Joctx5bPuMr4rGuM3qR+FRzxfRu8CTAcLFYSpoeW+Xf4u8SdpXoij8Jqb2Q0l3y9rXLGBqIyEyDkcgNthB/yDg== dependencies: autoprefixer "^6.4.0" babel-core "^6.24.1" @@ -58,6 +59,7 @@ modernizr-loader "^1.0.1" node-sass "^4.5.3" npm "^6.0.0" + postcss-custom-properties "^8.0.10" postcss-load-config "^1.2.0" postcss-loader "^2.0.5" resolve-url-loader "^2.0.2" @@ -2151,6 +2153,15 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" @@ -7376,6 +7387,14 @@ postcss-convert-values@^2.3.4: postcss "^5.0.11" postcss-value-parser "^3.1.2" +postcss-custom-properties@^8.0.10: + version "8.0.11" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz#2d61772d6e92f22f5e0d52602df8fae46fa30d97" + integrity sha512-nm+o0eLdYqdnJ5abAJeXp4CEU1c1k+eB2yMCvhgzsds/e0umabFrN6HoTy/8Q4K5ilxERdl/JD1LO5ANoYBeMA== + dependencies: + postcss "^7.0.17" + postcss-values-parser "^2.0.1" + postcss-discard-comments@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" @@ -7618,6 +7637,15 @@ postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^ version "3.3.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" +postcss-values-parser@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" + integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + postcss-zindex@^2.0.1: version "2.2.0" resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" @@ -7643,6 +7671,15 @@ postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.17: source-map "^0.6.1" supports-color "^5.4.0" +postcss@^7.0.17: + version "7.0.17" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" + integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -9446,6 +9483,13 @@ supports-color@^5.3.0, supports-color@^5.4.0: dependencies: has-flag "^3.0.0" +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + svg-tag-names@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/svg-tag-names/-/svg-tag-names-1.1.1.tgz#9641b29ef71025ee094c7043f7cdde7d99fbd50a" From b02f574e47d16470718d2d4ce33acf8f74316f61 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Tue, 10 Sep 2019 11:38:01 +1200 Subject: [PATCH 3/4] Update behat test to use the click on the Title header when sorting files --- tests/behat/features/change-sort-order.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/behat/features/change-sort-order.feature b/tests/behat/features/change-sort-order.feature index f057fd338..bbdcfcd4b 100644 --- a/tests/behat/features/change-sort-order.feature +++ b/tests/behat/features/change-sort-order.feature @@ -28,6 +28,6 @@ Feature: Change view for asset admin And I wait until I see the ".gallery__table-row" element Then I should see the gallery item "file1" in position "1" And I should see the gallery item "file2" in position "2" - When I click "title" in the ".gallery__table thead" element + When I click "Title" in the ".gallery__table thead" element Then I should see the gallery item "file2" in position "1" And I should see the gallery item "file1" in position "2" From 5fb759e3b171f4655efc716d44af32c4dc6f5f8e Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Tue, 10 Sep 2019 12:06:20 +1200 Subject: [PATCH 4/4] Rebuild bundle --- client/dist/styles/bundle.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/dist/styles/bundle.css b/client/dist/styles/bundle.css index 669043724..687863838 100644 --- a/client/dist/styles/bundle.css +++ b/client/dist/styles/bundle.css @@ -1 +1 @@ -.gallery-item{opacity:1;position:relative;background-color:#fff;border:1px solid;border-color:#dbe0e9 #ced5e1 #c1cad9;width:178px;border-radius:.192rem;-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;-o-transition:box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;height:174px;-webkit-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.gallery-item:hover{-webkit-box-shadow:0 1px 4px rgba(0,0,0,.2);box-shadow:0 1px 4px rgba(0,0,0,.2);cursor:pointer}.gallery-item:not(.gallery-item--error):not(.gallery-item--folder):hover .gallery-item--overlay{opacity:1;display:block}.gallery-item--dropping{border-color:#29abe2;background-color:#e8f5ff}.gallery-item__draggable,.gallery-item__droppable{margin:0 1.2308rem 1.2308rem 0}.gallery-item__draggable>.gallery-item__droppable,.gallery-item__droppable>.gallery-item__draggable{margin:0}.gallery-item--folder{height:54px}.gallery-item--folder .gallery-item__thumbnail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpi1Jhy/D8D6cDxRo7lAQYaACYy9Tkw0AiQ6yD7weYgB83VjwRo4SBGoMH/GQYRYGIYZGDUQaMOGnXQqINGHTTqoFEHjTpo1EGjDhp10KiDRh006qDB7SCAAAMAe8YKeWd2MukAAAAASUVORK5CYII=) 12px 14px no-repeat;-webkit-background-size:27px 24px;background-size:27px 24px;height:52px;width:45px;float:left}.gallery-item--folder .gallery-item__title{padding-top:17px;padding-bottom:17px;padding-left:0;width:131px;height:52px}.gallery-item--folder .gallery-item__checkbox-label{margin-top:5px}.gallery-item__thumbnail{height:132px;width:176px;margin:0 auto;background-repeat:no-repeat;background-position:50%;border-top-left-radius:.192rem;border-top-right-radius:.192rem;-webkit-background-size:cover;background-size:cover}.gallery-item__thumbnail--error{background-color:#dd3636}.gallery-item__thumbnail--no-preview{background-color:#566b8d}.gallery-item__thumbnail--loading{background:#fff url(data:image/gif;base64,R0lGODlhKwArAKIHAOvt7rS8wdLW2EB9ogBakqysrP///////yH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1NWQ2NWU5Yy1iZjAwLTRmNjktODVlNS03NDQ4ODZiM2E1MDEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjRFNkFDN0EwNjZDMTFFNTg1QTBBNzNENzVBQ0M0ODQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjRFNkFDNzkwNjZDMTFFNTg1QTBBNzNENzVBQ0M0ODQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MzRlNmQ4NC00OGE1LTRmNzQtYTcwYS0wNDM4N2E1ZTYzZjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo5ZjhiOTRiYy00YTNiLTExNzgtYWNjMy1kNzg3OTk3MTdhNzQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQFAAAHACwAAAAAKwArAAADtni23P4wOiWrvTjrzbv/YCiOWCCQGVAUAXoF6+pKABwXMyTca5szKt7q9DPshAViroZMFoNCHwQgEAA+Np7ScbwFrppu7BvJCrcWs7PcjKElWlr7luGBG4KWuHfGxIE2VDdEUD0ldgtiVj13RjwYeyx9aw2FOH5zK41cjxiWURJ7UheRYxFMfylqlJygHlRWp6uaRaUsmyi2b7lIZEUGq7szPL6/C17GDoHJXKPMz9DR0tMT1AcJACH5BAUAAAcALBAABwAGAAcAAAMQeApTGiSyGAetdxwb3SZaAgAh+QQFAAAHACwIAAoADAAKAAADIXi6F8QMDPJgm7QqmbsSWEcVR9gNwlGYI2Oi1kEN8RLECQAh+QQFAAAHACwHAA8ABwAMAAADG2hCzDaNlchgtG0YGnYsDyVgjZcZUwUawVC8CQAh+QQFAAAHACwKABQADgAJAAADI3i6O8TwCEdCPKCQTUrkYABYCggKjMkNiwoCy6QWMJQVARolACH5BAUAAAcALA8ADwARAAkAAAMseLqsUSW0Bgq5d0wFBsba5n0YdQjkt1RHlV7bMV4FcB5GuASYEC+FA0HHSAAAIfkEBQAABwAsHAAPAAkADgAAAyR4CtpNQzhFapmnkjD1YJQGGaHXFCLRBGkztAcrDs5Lc9iF4QkAIfkEBQAABwAsGAAZAAwACQAAAx54urOuYpB5SFNl6tni3kLwgYc0XsooPBUHsMqwsgkAIfkEBQAABwAsEAAHAA0AHgAAAzp4aiH6EJQS4GNzWpXzPkNXfZ3zgcN4rmzrvnAsz3Rt31vRDgRbEL0VD7gCGg+qh5EwAHyMSUuhCUkAACH5BAUAAAcALAgACgAPAA4AAAMveLoHwVAZUUpkoNZ7pv6FsDigJi5lFRgMkZ7Q8AUAd8ihvcgXq3eBwW/YsOyIkgQAIfkEBQAABwAsBwAPAAgADAAAAx54cNwXjolSYqC1YSrYLsvxdc8GHdM2DOLWpJnDNgkAIfkEBQAABwAsCAAUABEACQAAAyl4unwSLSoQShGygGOEtVhWfeBWNCS5rUv6QYznWoERUa5gSxwgCBtJAgAh+QQFAAAHACwVAA8ACwAKAAADIni6IHFmGVFqGTJYu/SuCvBx03gdzSYsYRUArGIUayzZSgIAIfkEBQAABwAsHQAPAAgADAAAAyAocNxXJSwHi6D1sgpN4NAFgAEjgMzIbSgzvEfpHISQAAAh+QQFAAAHACwZABgACwALAAADIXi6sq6iSLlAmBPiGeyewPAV3SFuzYKVjygYj0Kk8QHXCQA7) 50% no-repeat}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.gallery-item__thumbnail--loading{background:#fff url(data:image/gif;base64,R0lGODlhVgBWAPf/AP///5qkqnigubi4uO3y9fD09tTU1MrKyi1xnCZtmhlnl7q6ulWDnxFilWWTsSlvm1WJqk+AnsbGxpa0x+bm5h1pmEqDpsPDw6Woq83Nzc3a46nC0fLy8snW3uTk5K6urmuNomGJoXSet7S0tFGHqR9qmG2ZtNHe5hVklq6vsAlelJWhqdjj6enp6X2WpYOnvoWZpnOSpdvb28zU2ARck566y+nv87nN2UR6nI2uwqzE0ubt8Ymbp7/Gy6mrrEF9o8vZ4nuiuvz9/pu3yQ5hlevw85KyxaCmqmqXs6usrPr7/Ep9namqq0eBpVyGoAZdk5q2yAxglE2FpzBxmTp2m4qswSJql22Vraq0uwJbkqysrABakjN1noadrHGatO3v8ZGfqPX29k2Coh1olufs78/R0j94nLKysvf39/z8/Le3t9DQ0LGxsePj48jIyN/o7fr6+v7+/7y8vPHx8fb4+r29veDg4P7+/vv7+/n5+fj4+ER/pAFaktLS0tnZ2cXFxcDAwP39/fb29t/f397e3vX19erq6q2trV+QriFrmZCwxPT09OLi4u3t7QFbkrOzs6urq+Hh4QNck/Dw8GCRr3+lvApflGOSr+fu8r7Q26W/z+zs7M7Ozr+/v93d3dPT0/L2+LCwsNjY2Ovr68TExNfX17m6uzV2n4mrwLPI1ViMrLe4ua/G1Pj6+8jX4ePq7zBznefn5+Dh4bbL18jJyVOIqfPz84+wxNvl7Dh4oD17ocTFxdjZ2bS2tqytrsjY4eHp7tTf5vf5+u/v79HR0cnJyba2tqG8zfz9/cLT3fb5+g9ilVKGp5e1x9vl66e+zPL192aSrgdek3aft2GQrV6Prjd0mvv8/KK6ydPU1DNymoKitdXg56a/z9/g4X+juJ6yvp2oriRrmNvc3fz8/eHl536crvb29+Xl5XicsoWfsN3e3/r7++zx9I2dp8jLzoeovGWPqc3X3+Xr74+ouJSzxq26wpKxxUt/oGOQrdXZ3PX4+cDK0N3m7La2twAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODA4M0Y1OEQ5Qzk3MEQ4RSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3OTA5OUY3RTkzRjIxMUU0QjVEM0JDM0U0RkMyRUM5NyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3OTA5OUY3RDkzRjIxMUU0QjVEM0JDM0U0RkMyRUM5NyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDg4MDExNzQwNzIwNjgxMTgwODNGNThEOUM5NzBEOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDc4MDExNzQwNzIwNjgxMTgwODNGNThEOUM5NzBEOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQFAAD/ACwAAAAAVgBWAEAI/wD/CQRAsKDBgwgTKlzIsKFDggL/PZxIsaLFixgbGlKjpeMHOBlDijRYCFDHkyhTaiE0sqXDNSpjdnQDkmKkBTJPslmTx+XCnFrQPWxzZiXBSECTpjyTxidBOI+UKh2AMc2InGqcTtSDBk/VA5CkdlSDRqtZgpOk1ll0ti3DRQtauJ1Lt67du3jz6jU4Rw7QT3sz4nEj1uOaQIEvykh6oWzFQBwLq8xw9gBQOY4Ltois0g8AWykfUWCYISebtncsS9ZyRi7FPH+kSkhcEQ1nqRcE0c5oIOaARruDax0onG7E4nYlIl/OvPnCFgvYOh/ZaEBMA9MrLqojdVL2hYIuSP8m+/0gmquFDzS9CAeNnsASpP55T7EFm9VaDtxpezvliPUWWYdfaD05dZ9MlC0UC3on2QKAKDKp4VpBaPiV0wFOpVHUgCrZQRAhrDHyEDpAnVUah1qogVht4gElA115rHFgTgtEUlEehIm1RnkHBbLGB5K54RWPBYEoFiCFEKlQH0AtMIeSD8EBZEcDGALllVhmSRtxWlLEZZdghinmmGSWGWYanADphpkHpfFjSm2weccnU6q0I5ml1CnTi2HKEIpUC4DpyYxKAaIlUZLJkeSVguBUmDFWYpkGd2KpEYtFm6xRx4ZafKCGG3YMWdcch0h1RpwULdJJYWwMMpcepQL8dYaHFQ1DqGSk7GdWfDkVg5EfKJ7kqlYp5ITdQ2j0UdAcwaJEjFZAicgQHDlqIQdBwMoEyR8ezDGKAZzKJK1LFsbERmYGpaFaSh62EdMBNZl3K0rX+sRIUmcYMMocbfwRlkyiEFSuBPEqdG9OWjHZbEdPErQGugz1JlMKZg2ysGcXVRvTbGbdQQqHbABXkR3hxnQIfW0NMm9OnXBQEaJKHeKdXXjYIcEAdZ5RxxqbWBRLf0DVASCUG0m2gG5XFlKuqahiaZJYbHgCpqNJhcInmIsB9UEpZcIU0wcG6Fqmuyh90MfQbBL2ASdos+n223DHLXdBys0N0XFyRxQQACH5BAUAAP8ALA4ADgA7ADsAQAjpAP8JHEiwoMGCGxKdOMiwocOHA3mU2EKxYkVXEDNq3Mix479eHkOKHEmSI5OSKFOqXMmy5cZMiSxWNOHSY5IjIBI8oajgTc2fK1MARUlrKEpeRpMqBZqqQsUnBJY2VCdNpkUHUhu6GGN1S46sEH1h6EEOrNmGSM9qPKk2Y9G2D4XCfQhyrt27ePPqXWlrVSy8oFQ52mIhL51LWWQOmRvIC42uWyjNjREF8pYXc48sgZzoLgYQDfhY5BInLwYYDLT96Le3tevXeHfB/udrNlvXskzBNiUL9m3XtWHLnk28uPHjyJMrX868ZEAAIfkEBQAA/wAsEQATABgAFQBACKAA/wkcSLCgEiQFE05osKWhw4cQtyRg8c9HjDERiShKyLHjv0oqIHLEYiaiyS0oNHkkmG2lS45xRDxp+FIgqignHRYkkyinSQWsBvoAwTBnAygvmbgwo4CGlDg1o/779WCL1IEnEDyUyuLUSZdvdPncSrCAhbEQHVVT9i8MPrQPaxUgeCQCH7QWinQEYy3nj1dJQWB0mOvNVYEBXMRgJzUgACH5BAUAAP8ALA4AHQAPABkAQAibAP8J/NdvoMGBe7YoXMjQYDOGEBU2eFHu4L8ZAQJAsvhL0kKLAyMynGDxlsgtjnAEGEjnwRaQA195bAiSxsktJgwmuGkJl0EHN7fwWXJkoJIfDBuYgbHR4BsFMA1S+hi1CU2QlUSCrHBTAZ2BfG7WMBjlpiqDJIImeCOQDpGgW7SB+Wejwc0GMXwMhCBSGwyLyK6Ie4ADxMqBAQEAIfkEBQAA/wAsEwAnABgAEgBACIoA/wkcSLBgQWAO4hgUuKWhw4cQt2ggWECRhQo0HEZBcOnGwo8LC5CIuKUeQZIot1jKBLKlDQsOE4BEMgtIjT18UgowmJJkEIFQiPSECGtiy6P/oDTYUgVpQU0oIHJzykoByp8Lhz68l1VrwxJdvVZo9Y9aFq8Po+goiAlRlKGJjDj9J4TMGwJIAwIAIfkEBQAA/wAsKgAeABcAEgBACKkA/wkcSJAggTc7hBQcWGKLw4cQIzq0dkSRwCpbGjRbyLEjqygSQ9KI4CPYPwEhtyjQURDYlSMdBUJJlHLLSF8EWzWsKTHBCoFGeIa0wuPkv2ARURyLyZTgDUQIQDqkkSidvo4nYAndgsJFwWSWtj7UBlNgELEQfQrUgPbhEydMBKJMyWdPDSCzkDQgEsLHPyP/JoQkQYBjmIHTBCZ42MRG04VxLgF7XDAgACH5BAUAAP8ALDwAHwANABgAQAiMAP9Fewbtn8GDCP9tWciQoZeDJhpKpHFQ4g8lCHFZktgwwT8YDzgujNLOIEMiORIiFHmrokiGzQxOeLkwjhSaW/YcxAAjRIQlDECs+GJySxREmFS6ZEgCo0qOEJ5ybFCyqMhlwt4kwEnCIASaUQzWwPmPjgKaFbAgwPnCoLslZxk+SUBPZRIMGJggDAgAIfkEBQAA/wAsMAAyABkAEgBACJ0A/wkcSPDfm1xbCip8h2OLw4cQI26xUEDhQHcMxGiwyNGiDQsSQzqkJBCSCxQit5xi0bElpj0hCTpkNhBaLT4pJSp4M/CImZwPdfHsCONBRAQnWiodqIjIQ47Silgc0gCoQ0kbCWpCadXhAzoD5VXo+jCRM4IBqJBtMMEiBgaOckZBpTRAQ4kqKi0dmMSFNmlbnoiIs9dimUCFCQYEACH5BAUAAP8ALB8ADgAZADsAQAjxAP8JHDgw1ipbBBMS5KNthZaHECFOUkixosWLGDNq3MixI8EcW0KK9EjgicgKqSw2GhARogGOWcQ5cXeEiT80HnPq3MnzorBpKHI6EElU5AMgCg2pgfgBTkYg5lq2/KQxywMYUrUQ2omo58ZmXsOKHUu2bMc3CkZ6dFVU7UYTbbckytTxRKINHdNw+qDFjcc0a/hGbKMx0CfBUtdkjMLAR9aHMjQ2AOFY6gKONLTBSBIREACPfCyJMxOPjNnTqFOrXs26tevXsC124MkiQUidcbgUzZmorccXcd1iRBScBhIlGocUzXKJjkcLWxypAkUxIAAh+QQFAAD/ACwRABMAGQAYAEAIugD/CRxIsOCdgggFtjmjpaHDhxC1yCkk8MkSDBHP2EnIkaOMUBETcgEBKaJJNbE6DuQTJYhKgmj6AHj5D0CpDw1pDvTExuRDhDYW+PRpzBDBLDgwDj3TRmcDBmB8aCk2U6dVhAW24ZjS4OocOVcLLqrz82ohQD5pCrow9ORAPG7aRvywJtDAGHIhHkhTUJqTvFrcwOloBcbQP3qchlDa8AKasAItaXPSBQ/kywK9BQCB7XI3BU+y8BEYEAAh+QQFAAD/ACwOAB0ADgAZAEAIlwD/CfwnaKBBgbu0KFy40KAshhAVhoN38F+NigLnHGqIkUnEhYwODvrIJESDgWnqKMT4T89Ghhh9fVRoYKCpmVrYoBnYB6cWECcF3umEIckRGBFQ8DmIZgTLgWtWPpUAEyOvjxV74RyRRqDHmegGpsCZYSAtn3LO/UtzxicPcf/gPJoZgEqWgRkgHgExpmIgcE5wWHliMCAAIfkEBQAA/wAsEgAoABsAEQBACIsA/wkcSLBgwTZntIwzSFCLw4cQI2oZwLAgAD1o8FTcWBBNwRZqJDr084/bnQMiUz4804Kjy3+xRkT8wlGlSDsMbYpUE8hgnjVsdC6I9LLoPzhuHsoxSjANSonrOJ4xMGpOmz+QVIqqqRPinIpdI5IUSCqsSDaNDA4KarYTB5d47EgY8GFlnTWbOAYEACH5BAUAAP8ALCkAHgAWAB4AQAi9AP8JHEiwIBw0YeIUFDhAi8OHECH6ABGFICEtZxgt3Mixo0eBLdhEHImBAY1/tv6JGulQTYuC8z7K3Hjt20yPkRawZGKyYCA1LEf6cKGAkMBIQUcmgWGFoK2IjyjcnEq1qkBQVgtuWlPnjMMkMajk47ioU1It7qYsHCbyrBZIMRoQ9OP2ISQXKAbOqfvwCL4sA+kGhfTHw5xRZZwA/mfnXxuWB+DMlPNQguSpANagycq5s+fPC+WVqPoGwdSAACH5BAUAAP8ALDoAHgAPABYAQAiPAPUA+EewoMGDWhIqXPgoz0F0CyP6IBgx4YE7B/+hkVNxIa2DUaYwAEGSwZQoFBWyWeMwY8qOGQx2jHgmjcEMM7WkKCisC4aOGLpo+aDGjR08LmUuZDMo6UxSGJXObFowZ0JiBA2csapFVkE0bHKaMsgoJxOD2XJOLCguBJifCTGACaHK5ZMoDaI8+SfpX0AAIfkEBQAA/wAsMQAuABgAFQBACKkA/wkcSLCgQYFMCOZxo6Whw4cQ1xB8AAZiQ0CFDmo0iOaCRYi8iFgL8PGjGzwb/yVIyXJjmhFaDmrpdTDPn5IQJQjcZw8STotq0BAsweOnlguCWD7BUVFLnUUtowo0sNEXSwAMHQ50uGujnTNGD+kx2AasUS2HJhGkoOaswzppBHYQs8JtwwVJCU4JkMTomTYaVYTo+5GNp5ZZlpB0GEqGVIIJQvAD8DggADs=) 50% no-repeat;-webkit-background-size:43px 43px;background-size:43px 43px}}.gallery-item__thumbnail--small{-webkit-background-size:auto auto;background-size:auto;background-color:#fff}.gallery-item__title{padding:11px 12px;height:40px;width:176px;margin:0;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;position:relative}.gallery-item--selectable .gallery-item__title{padding-right:32px}.asset-admin--single-select .gallery-item--selectable:not(.gallery-item--selected) .gallery-item__title{padding-right:12px}.gallery-item__checkbox{margin:13px 4px;-webkit-transform:scale(.1);-o-transform:scale(.1);transform:scale(.1);z-index:-1;position:absolute}.gallery-item__checkbox-label{width:30px;height:40px;position:absolute;right:0;top:0;margin-bottom:0}.asset-admin--single-select .gallery-item--selectable .gallery-item__checkbox-label{display:none}.gallery-item--selectable .gallery-item__checkbox-label:before{cursor:pointer;top:0;bottom:0;right:0;height:19px;width:19px;margin:auto 10px;position:absolute;border:1px solid #ced5e1;border-radius:.192rem;font-size:1.15em;padding:1px;color:transparent;background-color:#fff}.asset-admin--single-select .gallery-item--selected .gallery-item__checkbox-label{display:block}.asset-admin--single-select .gallery-item--selected .gallery-item__checkbox-label:before{margin:8px;border-radius:100%;font-size:1.5em}.gallery-item--selectable .gallery-item__checkbox-label:not(.gallery-item__checkbox-label--disabled):hover:before{border:1px solid #29abe2}.gallery-item--error .gallery-item__checkbox-label:before,.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:before{font-size:19px;border:0;border-radius:0;padding:0}.gallery-item--error .gallery-item__checkbox-label:hover:before,.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:hover:before{border:0}.gallery-item--error .gallery-item__checkbox-label,.gallery-item--error .gallery-item__thumbnail,.gallery-item--error .gallery-item__title,.gallery-item--error:hover{cursor:not-allowed}.gallery-item--error .gallery-item__checkbox-label:before{color:#d40404}.gallery-item__error-message{position:absolute;top:calc(50% - 20px);left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);max-height:calc(100% - 40px);overflow:hidden;width:90%;color:#fff;background-color:#dd3636;text-align:center}.gallery-item--error .gallery-item__thumbnail,.gallery-item--missing .gallery-item__thumbnail{position:relative}.gallery-item--error .gallery-item__thumbnail:after,.gallery-item--missing .gallery-item__thumbnail:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#dd3636;border-radius:2px 2px 0 0}.gallery-item--error:hover .gallery-item__error-message,.gallery-item--error:hover .gallery-item__thumbnail:after,.gallery-item--missing:hover .gallery-item__error-message,.gallery-item--missing:hover .gallery-item__thumbnail:after{background:#d81d1d}.gallery-item--overlay{background:rgba(48,59,77,.5);position:absolute;top:0;right:0;left:0;opacity:0;display:none;-webkit-transition-property:opacity,background;-o-transition-property:opacity,background;transition-property:opacity,background;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;border-top-left-radius:.192rem;border-top-right-radius:.192rem;color:#fff;height:132px;width:100%;font-size:14px;padding-top:56px;text-align:center}.gallery-item--overlay:before{margin-right:5px}.gallery-item--selected{border-color:#29abe2}.gallery-item--selected .gallery-item__checkbox-label:before{border-color:#29abe2;background-color:#29abe2;color:#fff}.gallery__main--dragging .gallery-item--selected{opacity:.2}.gallery-item--highlighted,.gallery-item__drag-shadow{border-color:#29abe2;background-color:#e8f5ff}.gallery-item--focussed .gallery-item--overlay{opacity:1;display:block}.gallery-item--archive .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=) 50% no-repeat}.gallery-item--audio .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--video .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--document .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--false .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfdJREFUeNrs3TtOw0AYReGZiU3EQ0BBk44dIFEhUbAEtsAaoKajoYCKBbAQCrZBE8p0CCUmTuIkxknEAmwpd7D+cyTLlfP4NB6PpTx8WZaOdCVNDur3+8fV7rXartvwJtM0dUmS3PV6vefYryU0PO69Ldh/ee+fBoPBbevAq9F9U+3O2ng6/wf0JiP8tM1zaGz04AwWE90keEx0s+Cx0E2Dx0A3D65GB1yMDrgYHXAxOuBidMDF6ICL0QEXowMuRgdcjA64GB1wMTrgYnTAxeiJBZxsPHGjfLiNh36q+0kAE+DdtONG46XL8mn012JmSjk52ncHu13AraGbu2jGRje5SomJbnZZGAvd9Do8Brr5Gx81OneaYnTAxeiAi9EBF6MDLkYHXIwOuBgdcDE64GJ0wMXogIvRARejAy5GT+Brjs4IbwE64OIABxxwAhxwAhxwAhxwwAlwwAlwwAlwwAEnwAEnwAEnwAEHnAAHnAAHnAAHHHACHHACHHACvGXg31m+A9umyWy+ffB8WqRL/rh63awQgBeLZfgajsEuFquzvfZxjb6JvPpZ6Pli6Q73ui4Ee5eBfFa40c/ENTnTa4N75z4381ex3mzns61PKVcX5y/VE30wgzvXCf5Rsizspp3L4P2b5ZHdCeG+GnwPtY8sWXFI+xVgAB+AqE72La37AAAAAElFTkSuQmCC) 50% no-repeat}.gallery-item__upload-progress{height:18px;width:75%;position:absolute;top:calc(50% - 20px);left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:10px;overflow:hidden;background-color:#aebace}.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:before{color:#43536d}.gallery-item__progress-bar{height:100%;background:#29abe2;width:0}.gallery-item--draft,.gallery-item--modified{position:absolute;top:.76925rem;left:.76925rem;display:block;width:8px;height:8px;border:1px solid #cf3f00;-webkit-box-shadow:0 0 1px .5px #fff;box-shadow:0 0 1px .5px #fff;border-radius:100%;z-index:1}.gallery-item--draft:hover:after,.gallery-item--modified:hover:after{top:-4px;font-size:.75rem;font-weight:200;position:absolute;color:#fff;margin-left:.9231rem}.gallery-item--draft{background-color:#cf3f00}.gallery-item--draft:hover:after{content:"DRAFT"}.gallery-item--modified{background-color:#fff7f0}.gallery-item--modified:hover:after{content:"MODIFIED"}.gallery-item--max-selected{opacity:.2}.gallery-item--max-selected .gallery-item__checkbox-label,.gallery-item--max-selected .gallery-item__checkbox-label:before{cursor:not-allowed}.gallery-item--dragging{opacity:.2}.gallery-item--dragging.gallery-item{cursor:-webkit-grabbing;cursor:grabbing}.gallery-item__drag-layer-item .gallery-item--dragging{opacity:1}.gallery-item__drag-layer{position:fixed;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:100}.gallery-item__drag-layer-preview{-webkit-transform:scale(.4) translate(-100%,-160%);-o-transform:scale(.4) translate(-100%,-160%);transform:scale(.4) translate(-100%,-160%);border:1px solid #29abe2}.gallery-item__drag-layer-preview .gallery-item__thumbnail{-webkit-transform:scale(2.5) translate(22px,16px);-o-transform:scale(2.5) translate(22px,16px);transform:scale(2.5) translate(22px,16px)}.gallery-item__drag-layer-item{display:inline-block;position:relative;opacity:1}.gallery-item__drag-layer-item .gallery-item{border-width:2px;z-index:104;height:134px}.gallery-item__drag-layer-item .gallery-item__title{display:none}.gallery-item__drag-layer-count{top:-45%;left:25%;z-index:105}.gallery-item__badge,.gallery-item__drag-layer-count{display:inline-block;position:absolute;font-size:1rem}.gallery-item__badge{top:-.5rem;right:-.5rem;z-index:99}.gallery-item__drag-shadow{display:inline-block;position:absolute;left:0;top:0;right:0;bottom:0;-webkit-transform:translate(.75rem,-.75rem);-o-transform:translate(.75rem,-.75rem);transform:translate(.75rem,-.75rem);z-index:103;border:2px solid #29abe2;background:#fff}.gallery-item__drag-shadow.gallery-item__drag-shadow--second{-webkit-transform:translate(1.5rem,-1.5rem);-o-transform:translate(1.5rem,-1.5rem);transform:translate(1.5rem,-1.5rem);z-index:102}.bulk-actions{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;width:100%;padding:.76925rem 1.5385rem;margin:0 auto;position:absolute;height:53px;z-index:2;bottom:0;background-color:#f1f3f6;-webkit-transition:top .5s ease-in-out,-webkit-transform .5s ease-in-out;transition:top .5s ease-in-out,-webkit-transform .5s ease-in-out;-o-transition:top .5s ease-in-out,-o-transform .5s ease-in-out;transition:top .5s ease-in-out,transform .5s ease-in-out;transition:top .5s ease-in-out,transform .5s ease-in-out,-webkit-transform .5s ease-in-out,-o-transform .5s ease-in-out;-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1);min-width:160px;border-top:1px solid #dbe0e9}.bulk-actions>*{-webkit-box-flex:0;-webkit-flex:0;flex:0}.bulk-actions-enter{bottom:-53px}.bulk-actions-enter-active{bottom:0;-webkit-transition:bottom .2s ease-out;-o-transition:bottom .2s ease-out;transition:bottom .2s ease-out}.bulk-actions-leave{bottom:0}.bulk-actions-leave-active{bottom:-53px;-webkit-transition:bottom .2s ease-in-out .1s;-o-transition:bottom .2s ease-in-out .1s;transition:bottom .2s ease-in-out .1s}.bulk-actions .bulk-actions-counter{vertical-align:middle;min-width:28px;padding:6px;margin-right:8px;line-height:1.5384;color:#fff;text-align:center;background-color:#0071c4;border-radius:.23rem;font-weight:700}.bulk-actions .bulk-actions__action.ss-ui-button{line-height:1.5384;margin-bottom:0;height:32px}.bulk-actions .bulk-actions__action.ss-ui-button[class*=font-icon-]:before{font-size:20px;line-height:18px;position:relative;top:-1px;vertical-align:middle}.bulk-actions .chosen-single{border-radius:5px 0 0 5px;border:0;-webkit-filter:none;filter:none;background:none;-webkit-box-shadow:none;box-shadow:none;color:inherit}.bulk-actions .chosen-single:focus{-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.bulk-actions .chosen-single>span{text-align:left;display:inline-block;margin-right:0}.bulk-actions .chosen-single>div{position:static;display:inline-block}.bulk-actions .chosen-drop{border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);border:0}.bulk-actions .search-choice-close{display:none}.bulk-actions .chosen-results li{padding-left:22px;position:relative}.bulk-actions .chosen-results li:before{position:absolute;font-family:silverstripe;left:4px;font-size:14px;vertical-align:middle;margin-right:4px}.bulk-actions .chosen-results li:first-child::before{content:"g"}.asset-dropzone:after{position:absolute;top:0;right:-1.5385rem;bottom:0;left:-1.5385rem;background:rgba(247,248,250,.9) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSItMzU1IDIyMi41IDMxMiAzMjQuNSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMzU1IDIyMi41IDMxMiAzMjQuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjMkM3RUIwIiBkPSJNLTE0Mi43LDM3NC40Yy0yLjgsMC01LjYsMC4yLTguMywwLjdjLTYuNy0yMi0yNy42LTM4LTUyLjMtMzhjLTMwLjEsMC01NC41LDIzLjktNTQuNSw1My4zDQoJYzAsMi42LDAuMiw1LjIsMC42LDcuN2MtMS40LTAuMi0yLjktMC4zLTQuNC0wLjNjLTIwLjUsMC0zNy4xLDE2LjItMzcuMSwzNi4zYzAsMjAsMTYuNiwzNi4zLDM3LjEsMzYuM2g1MS4xdi0zOC42bC0yMS41LTAuMw0KCWwzNS45LTUxLjNsMzUuOSw1MS4zbC0yMS41LDAuM3YzOC42aDM5LjFjMjcuMSwwLDQ5LjEtMjEuNSw0OS4xLTQ4Qy05My42LDM5NS45LTExNS42LDM3NC40LTE0Mi43LDM3NC40eiIvPg0KPHBhdGggZmlsbD0iIzJDN0VCMCIgZD0iTS0yNzcuMSw1MzcuNHYtMjIuOWg3LjljMS44LDAsMy4xLDAuMSw0LjEsMC4zYzEuMywwLjMsMi40LDAuOCwzLjQsMS42YzEuMiwxLDIuMSwyLjMsMi43LDMuOQ0KCWMwLjYsMS42LDAuOSwzLjQsMC45LDUuNGMwLDEuNy0wLjIsMy4zLTAuNiw0LjZzLTAuOSwyLjUtMS42LDMuM2MtMC42LDAuOS0xLjMsMS42LTIuMSwyLjFjLTAuOCwwLjUtMS43LDAuOS0yLjcsMS4xDQoJYy0xLjEsMC4zLTIuMywwLjQtMy43LDAuNGgtOC4zVjUzNy40eiBNLTI3NCw1MzQuN2g0LjljMS41LDAsMi43LTAuMSwzLjYtMC40czEuNS0wLjcsMi4xLTEuMmMwLjctMC43LDEuMy0xLjcsMS43LTIuOQ0KCWMwLjQtMS4yLDAuNi0yLjcsMC42LTQuNGMwLTIuNC0wLjQtNC4yLTEuMi01LjVjLTAuOC0xLjMtMS43LTIuMS0yLjktMi42Yy0wLjgtMC4zLTIuMS0wLjUtMy45LTAuNWgtNC44djE3LjVILTI3NHogTS0yNTUuNCw1MzcuNA0KCXYtMTYuNmgyLjV2Mi41YzAuNi0xLjIsMS4yLTIsMS44LTIuM3MxLjEtMC42LDEuOC0wLjZjMC45LDAsMS45LDAuMywyLjksMC45bC0xLDIuNmMtMC43LTAuNC0xLjQtMC42LTIuMS0wLjYNCgljLTAuNiwwLTEuMiwwLjItMS43LDAuNmMtMC41LDAuNC0wLjgsMC45LTEsMS41Yy0wLjMsMS0wLjUsMi4xLTAuNSwzLjN2OC43TC0yNTUuNCw1MzcuNEwtMjU1LjQsNTM3LjR6IE0tMjM0LjQsNTM1LjQNCgljLTEsMC45LTIsMS41LTMsMS45cy0yLDAuNS0zLjEsMC41Yy0xLjgsMC0zLjItMC40LTQuMi0xLjNjLTEtMC45LTEuNS0yLTEuNS0zLjRjMC0wLjgsMC4yLTEuNiwwLjYtMi4yYzAuNC0wLjcsMC45LTEuMiwxLjUtMS42DQoJYzAuNi0wLjQsMS4zLTAuNywyLTAuOWMwLjYtMC4xLDEuNC0wLjMsMi41LTAuNGMyLjMtMC4zLDMuOS0wLjYsNS0xYzAtMC40LDAtMC42LDAtMC43YzAtMS4xLTAuMy0yLTAuOC0yLjRjLTAuNy0wLjYtMS44LTEtMy4yLTENCgljLTEuMywwLTIuMywwLjItMi45LDAuN2MtMC42LDAuNS0xLjEsMS4zLTEuNCwyLjVsLTIuOC0wLjRjMC4yLTEuMiwwLjctMi4xLDEuMi0yLjljMC42LTAuNywxLjQtMS4zLDIuNS0xLjdzMi4zLTAuNiwzLjgtMC42DQoJYzEuNCwwLDIuNiwwLjIsMy41LDAuNXMxLjUsMC44LDIsMS4zYzAuNCwwLjUsMC43LDEuMSwwLjksMS45YzAuMSwwLjUsMC4xLDEuMywwLjEsMi42djMuOGMwLDIuNiwwLjEsNC4zLDAuMiw1DQoJYzAuMSwwLjcsMC40LDEuNCwwLjcsMmgtMi45Qy0yMzQuMSw1MzYuOS0yMzQuMyw1MzYuMi0yMzQuNCw1MzUuNHogTS0yMzQuNiw1MjkuMWMtMSwwLjQtMi42LDAuOC00LjYsMS4xYy0xLjIsMC4yLTIsMC40LTIuNSwwLjYNCgljLTAuNSwwLjItMC44LDAuNS0xLjEsMC45cy0wLjQsMC44LTAuNCwxLjNjMCwwLjgsMC4zLDEuNCwwLjksMS45YzAuNiwwLjUsMS40LDAuOCwyLjUsMC44czItMC4yLDIuOS0wLjdjMC44LTAuNSwxLjUtMS4xLDEuOS0xLjkNCgljMC4zLTAuNiwwLjUtMS42LDAuNS0yLjhMLTIzNC42LDUyOS4xTC0yMzQuNiw1MjkuMXogTS0yMjguNCw1MzguOGwyLjcsMC40YzAuMSwwLjgsMC40LDEuNSwxLDEuOGMwLjcsMC41LDEuNywwLjgsMi45LDAuOA0KCWMxLjMsMCwyLjMtMC4zLDMtMC44czEuMi0xLjIsMS40LTIuMmMwLjEtMC42LDAuMi0xLjgsMC4yLTMuNmMtMS4yLDEuNC0yLjgsMi4yLTQuNiwyLjJjLTIuMywwLTQtMC44LTUuMy0yLjUNCgljLTEuMi0xLjYtMS45LTMuNi0xLjktNS45YzAtMS42LDAuMy0zLDAuOS00LjRjMC42LTEuMywxLjQtMi40LDIuNS0zLjFjMS4xLTAuNywyLjQtMS4xLDMuOC0xLjFjMiwwLDMuNiwwLjgsNC44LDIuNHYtMmgyLjZ2MTQuMw0KCWMwLDIuNi0wLjMsNC40LTAuOCw1LjVzLTEuNCwxLjktMi41LDIuNnMtMi41LDAuOS00LjIsMC45Yy0yLDAtMy42LTAuNC00LjgtMS4zUy0yMjguNCw1NDAuNi0yMjguNCw1MzguOHogTS0yMjYsNTI4LjgNCgljMCwyLjIsMC40LDMuOCwxLjMsNC44YzAuOSwxLDEuOSwxLjUsMy4yLDEuNXMyLjQtMC41LDMuMi0xLjVjMC45LTEsMS4zLTIuNiwxLjMtNC43YzAtMi0wLjUtMy42LTEuNC00LjZzLTItMS41LTMuMy0xLjUNCgljLTEuMiwwLTIuMywwLjUtMy4yLDEuNVMtMjI2LDUyNi44LTIyNiw1MjguOHogTS0xODksNTM0LjdjLTAuOSwxLTEuOSwxLjgtMywyLjNzLTIuMywwLjgtMy41LDAuOGMtMi4zLDAtNC4yLTAuOC01LjYtMi40DQoJYy0xLjEtMS4zLTEuNy0yLjctMS43LTQuM2MwLTEuNCwwLjUtMi43LDEuNC0zLjhzMi4zLTIuMSw0LjEtM2MtMS0xLjItMS43LTIuMi0yLjEtMi45Yy0wLjMtMC43LTAuNS0xLjUtMC41LTIuMQ0KCWMwLTEuNCwwLjUtMi42LDEuNi0zLjZzMi40LTEuNSw0LjEtMS41YzEuNiwwLDIuOCwwLjUsMy44LDEuNGMxLDEsMS41LDIuMSwxLjUsMy41YzAsMi4yLTEuNCw0LTQuMyw1LjZsNC4xLDUuMg0KCWMwLjUtMC45LDAuOC0yLDEuMS0zLjJsMi45LDAuNmMtMC41LDItMS4yLDMuNi0yLDQuOWMxLjEsMS40LDIuMiwyLjYsMy42LDMuNWwtMS45LDIuMkMtMTg2LjYsNTM3LjItMTg3LjgsNTM2LjItMTg5LDUzNC43eg0KCSBNLTE5MC43LDUzMi41bC01LjItNi40Yy0xLjUsMC45LTIuNSwxLjctMy4xLDIuNWMtMC41LDAuOC0wLjgsMS41LTAuOCwyLjNjMCwwLjksMC40LDEuOSwxLjEsMi45YzAuNywxLDEuOCwxLjUsMy4xLDEuNQ0KCWMwLjgsMCwxLjctMC4zLDIuNi0wLjhDLTE5Miw1MzQtMTkxLjMsNTMzLjMtMTkwLjcsNTMyLjV6IE0tMTk0LjcsNTIyLjhjMS4yLTAuNywyLTEuMywyLjQtMS45YzAuNC0wLjUsMC41LTEuMSwwLjUtMS44DQoJYzAtMC44LTAuMi0xLjQtMC43LTEuOXMtMS4xLTAuNy0xLjktMC43Yy0wLjgsMC0xLjQsMC4yLTEuOSwwLjdzLTAuOCwxLjEtMC44LDEuOGMwLDAuNCwwLjEsMC43LDAuMywxLjFjMC4yLDAuNCwwLjUsMC44LDAuOCwxLjINCglMLTE5NC43LDUyMi44eiBNLTE2Miw1MzcuNHYtMi4xYy0xLjEsMS42LTIuNiwyLjUtNC42LDIuNWMtMS4zLDAtMi41LTAuNC0zLjYtMS4xcy0yLTEuNy0yLjYtMy4xYy0wLjYtMS4zLTAuOS0yLjgtMC45LTQuNQ0KCXMwLjMtMy4yLDAuOC00LjVjMC42LTEuMywxLjQtMi40LDIuNS0zLjFjMS4xLTAuNywyLjMtMS4xLDMuNy0xLjFjMSwwLDEuOSwwLjIsMi43LDAuNnMxLjQsMSwxLjksMS42di04LjJoMi44djIyLjlMLTE2Miw1MzcuNA0KCUwtMTYyLDUzNy40eiBNLTE3MC45LDUyOS4yYzAsMi4xLDAuNCwzLjcsMS4zLDQuOGMwLjksMS4xLDIsMS42LDMuMiwxLjZzMi4zLTAuNSwzLjEtMS41YzAuOS0xLDEuMy0yLjUsMS4zLTQuNg0KCWMwLTIuMy0wLjQtMy45LTEuMy01cy0yLTEuNi0zLjItMS42cy0yLjMsMC41LTMuMSwxLjVDLTE3MC40LDUyNS4zLTE3MC45LDUyNy0xNzAuOSw1MjkuMnogTS0xNTUuNCw1MzcuNHYtMTYuNmgyLjV2Mi41DQoJYzAuNi0xLjIsMS4yLTIsMS44LTIuM3MxLjEtMC42LDEuOC0wLjZjMC45LDAsMS45LDAuMywyLjksMC45bC0xLDIuNmMtMC43LTAuNC0xLjQtMC42LTIuMS0wLjZjLTAuNiwwLTEuMiwwLjItMS43LDAuNg0KCWMtMC41LDAuNC0wLjgsMC45LTEsMS41Yy0wLjMsMS0wLjUsMi4xLTAuNSwzLjN2OC43TC0xNTUuNCw1MzcuNEwtMTU1LjQsNTM3LjR6IE0tMTQ2LjIsNTI5LjFjMC0zLjEsMC45LTUuMywyLjYtNi44DQoJYzEuNC0xLjIsMy4yLTEuOCw1LjItMS44YzIuMywwLDQuMSwwLjcsNS42LDIuMmMxLjQsMS41LDIuMiwzLjYsMi4yLDYuMmMwLDIuMS0wLjMsMy44LTEsNWMtMC42LDEuMi0xLjYsMi4yLTIuOCwyLjlzLTIuNiwxLTQsMQ0KCWMtMi4zLDAtNC4yLTAuNy01LjYtMi4yQy0xNDUuNSw1MzQuMS0xNDYuMiw1MzEuOS0xNDYuMiw1MjkuMXogTS0xNDMuMyw1MjkuMWMwLDIuMSwwLjUsMy43LDEuNCw0LjhzMi4xLDEuNiwzLjUsMS42DQoJczIuNi0wLjUsMy41LTEuNnMxLjQtMi43LDEuNC00LjljMC0yLjEtMC41LTMuNi0xLjQtNC43Yy0wLjktMS4xLTIuMS0xLjYtMy41LTEuNnMtMi42LDAuNS0zLjUsMS42DQoJQy0xNDIuOSw1MjUuNC0xNDMuMyw1MjctMTQzLjMsNTI5LjF6IE0tMTI3LjgsNTQzLjh2LTIzaDIuNnYyLjJjMC42LTAuOCwxLjMtMS41LDItMS45YzAuOC0wLjQsMS43LTAuNiwyLjgtMC42DQoJYzEuNCwwLDIuNywwLjQsMy44LDEuMWMxLjEsMC43LDEuOSwxLjgsMi41LDMuMXMwLjgsMi44LDAuOCw0LjRjMCwxLjctMC4zLDMuMi0wLjksNC42cy0xLjUsMi40LTIuNywzLjFjLTEuMiwwLjctMi40LDEuMS0zLjcsMS4xDQoJYy0wLjksMC0xLjgtMC4yLTIuNS0wLjZjLTAuNy0wLjQtMS40LTAuOS0xLjgtMS41djguMUwtMTI3LjgsNTQzLjhMLTEyNy44LDU0My44eiBNLTEyNS4zLDUyOS4yYzAsMi4xLDAuNCwzLjcsMS4zLDQuNw0KCXMxLjksMS41LDMuMSwxLjVzMi4zLTAuNSwzLjItMS42YzAuOS0xLjEsMS4zLTIuNywxLjMtNC45YzAtMi4xLTAuNC0zLjctMS4zLTQuOHMtMS45LTEuNi0zLjEtMS42cy0yLjMsMC42LTMuMiwxLjcNCglDLTEyNC44LDUyNS41LTEyNS4zLDUyNy4xLTEyNS4zLDUyOS4yeiIvPg0KPHBhdGggZmlsbD0iIzJDN0VCMCIgZD0iTS0xNzIuNSwyNDEuNWwtMi44LTE2LjFsLTU2LjUsOS45bDguMyw0Ny4ybDUuNi0wLjl2NC4xaDU3LjR2LTQ0LjFoLTEyVjI0MS41eiBNLTIxNy45LDI3Ni44bC0xLjgsMC4zDQoJbC02LjctMzguMWw0Ny40LTguNGwxLjksMTAuOGgtNDAuN3YzNS40SC0yMTcuOXogTS0xNjUuMiwyODAuOWgtNDguMXYtMzQuOGg0OC4xVjI4MC45eiBNLTIxMC4xLDI0OS4yVjI3NWw5LjgtNi41bDYsMy44bDE0LjctMTYuMQ0KCWwxLjksMC44bDkuNSwxMXYtMTguN0wtMjEwLjEsMjQ5LjJMLTIxMC4xLDI0OS4yeiBNLTIwMC44LDI2MC40Yy0yLjIsMC00LjEtMS45LTQuMS00LjFjMC0yLjIsMS45LTQuMSw0LjEtNC4xDQoJYzIuMiwwLDQuMSwxLjksNC4xLDQuMUMtMTk2LjcsMjU4LjUtMTk4LjYsMjYwLjQtMjAwLjgsMjYwLjR6Ii8+DQo8cGF0aCBmaWxsPSIjMkM3RUIwIiBkPSJNLTMzMS41LDI3Ny44djM1LjRjLTItMC45LTQuNi0xLjEtNy4xLTAuNmMtNS40LDEuMi05LjEsNS42LTguMyw5LjhjMC43LDMuNCw0LjMsNS45LDguNyw1LjkNCgljMC45LDAsMS44LTAuMSwyLjctMC4zYzQuNy0xLDguMi00LjUsOC40LTguM3YtMzMuMWwyNi4xLTMuOXYyNS44Yy0yLTAuOS00LjYtMS4xLTcuMS0wLjZjLTUuNCwxLjItOS4xLDUuNi04LjMsOS44DQoJYzAuNywzLjQsNC4zLDUuOSw4LjcsNS45bDAsMGMwLjksMCwxLjgtMC4xLDIuNy0wLjNjNC43LTEsOC4yLTQuNSw4LjQtOC4zdi00Mi4xTC0zMzEuNSwyNzcuOHoiLz4NCjxwYXRoIGZpbGw9IiMyQzdFQjAiIGQ9Ik0tNTIuNywzMTkuM3YtNi43aDYuN3YtNy41aC02Ljd2LTYuN2g2Ljd2LTYuN2gtNi43di03LjVoNi43di02LjdoLTY1LjF2Ni43aDYuN3Y3LjVoLTYuN3Y2LjdoNi43djYuN2gtNi43DQoJdjcuNWg2Ljd2Ni43aC02Ljd2Ni43SC00NnYtNi43SC01Mi43eiBNLTgyLjgsMzA5LjF2LTEzLjlsMTIuMSw3TC04Mi44LDMwOS4xeiIvPg0KPC9zdmc+DQo=) 50% no-repeat;-webkit-background-size:312px 325px;background-size:312px 325px;z-index:100}.asset-dropzone.dragging:after{content:""}.asset-dropzone--button{position:static}.uploadfield__dropzone{position:relative;left:0;top:0;right:auto;bottom:auto;margin:0 0 10px;border:2px dashed #c1cad9;border-radius:5px;padding:0;background:#fdfefe;height:78px}.uploadfield__dropzone:after{left:0;top:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 10px 0 rgba(0,0,0,.2);box-shadow:inset 0 0 10px 0 rgba(0,0,0,.2);background-image:none;background:rgba(0,0,0,.03)}.uploadfield__dropzone--hidden{display:none}.uploadfield__backdrop{position:absolute;left:0;top:0;right:0;bottom:0;cursor:pointer}.uploadfield__join:after,.uploadfield__join:before{content:" ";display:inline}.uploadfield__add-button,.uploadfield__upload-button{border:0;margin:0;padding:0;background:none;text-decoration:none;color:#0071c4}.uploadfield__add-button:hover,.uploadfield__upload-button:hover{color:#0062ab;text-decoration:underline}.uploadfield__droptext{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:inline-block;text-align:center}.uploadfield__droptext a,.uploadfield__droptext button{cursor:pointer}.uploadfield__droptext:before{font-family:silverstripe,sans-serif;content:"v";font-size:1.7em;padding-right:20px;vertical-align:middle}.uploadfield-item{position:relative;margin:0;background-color:#fff;border:1px solid;border-color:#ced5e1;border-bottom-width:0;width:auto;-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;-o-transition:box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;height:61px}.uploadfield-item:first-child{border-top-left-radius:.192rem;border-top-right-radius:.192rem}.uploadfield-item:last-child{border-bottom-width:1px;height:62px;border-bottom-left-radius:.192rem;border-bottom-right-radius:.192rem}.uploadfield-item:not(.uploadfield-item--error):not(.uploadfield-item--folder):hover .uploadfield-item--overlay{opacity:1;display:block}.uploadfield__dropzone+.uploadfield-item{border-top-left-radius:.192rem;border-top-right-radius:.192rem}.uploadfield-item--folder .uploadfield-item__thumbnail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpi1Jhy/D8D6cDxRo7lAQYaACYy9Tkw0AiQ6yD7weYgB83VjwRo4SBGoMH/GQYRYGIYZGDUQaMOGnXQqINGHTTqoFEHjTpo1EGjDhp10KiDRh006qDB7SCAAAMAe8YKeWd2MukAAAAASUVORK5CYII=) 12px 14px no-repeat;-webkit-background-size:27px 24px;background-size:27px 24px}.uploadfield-item__thumbnail{height:60px;width:60px;margin:0;background-repeat:no-repeat;background-position:50%;-webkit-background-size:cover;background-size:cover;border-radius:.192rem .192rem 0 0}.uploadfield-item__thumbnail--small{-webkit-background-size:auto auto;background-size:auto;background-color:#fff}.uploadfield-item__details{padding:11px 0 11px 12px;height:100%;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:50px;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uploadfield-item__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploadfield-item__meta{font-size:.846rem;text-transform:uppercase}.uploadfield-item__specs{color:#566b8d}.uploadfield-item__remove-btn{margin:0}.uploadfield-item--archive .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=) 50% no-repeat}.uploadfield-item--audio .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--video .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--document .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--false .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfdJREFUeNrs3TtOw0AYReGZiU3EQ0BBk44dIFEhUbAEtsAaoKajoYCKBbAQCrZBE8p0CCUmTuIkxknEAmwpd7D+cyTLlfP4NB6PpTx8WZaOdCVNDur3+8fV7rXartvwJtM0dUmS3PV6vefYryU0PO69Ldh/ee+fBoPBbevAq9F9U+3O2ng6/wf0JiP8tM1zaGz04AwWE90keEx0s+Cx0E2Dx0A3D65GB1yMDrgYHXAxOuBidMDF6ICL0QEXowMuRgdcjA64GB1wMTrgYnTAxeiJBZxsPHGjfLiNh36q+0kAE+DdtONG46XL8mn012JmSjk52ncHu13AraGbu2jGRje5SomJbnZZGAvd9Do8Brr5Gx81OneaYnTAxeiAi9EBF6MDLkYHXIwOuBgdcDE64GJ0wMXogIvRARejAy5GT+Brjs4IbwE64OIABxxwAhxwAhxwAhxwwAlwwAlwwAlwwAEnwAEnwAEnwAEHnAAHnAAHnAAHHHACHHACHHACvGXg31m+A9umyWy+ffB8WqRL/rh63awQgBeLZfgajsEuFquzvfZxjb6JvPpZ6Pli6Q73ui4Ee5eBfFa40c/ENTnTa4N75z4381ex3mzns61PKVcX5y/VE30wgzvXCf5Rsizspp3L4P2b5ZHdCeG+GnwPtY8sWXFI+xVgAB+AqE72La37AAAAAElFTkSuQmCC) 50% no-repeat}.uploadfield-item__upload-progress{height:16px;margin:22px 5px;width:30%;border-radius:10px;overflow:hidden}.uploadfield-item__upload-progress+.uploadfield-item__title .uploadfield-item__checkbox-label:before{color:#43536d}.uploadfield-item__progress-bar{height:100%;background:#29abe2;width:0}.uploadfield-item__error-message{line-height:28px;height:28px;margin:16px 5px;padding:0 10px;color:#fff;background:#d40404;border-radius:14px;max-width:25%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploadfield-item__complete-icon{line-height:38px;padding:11px 5px}.uploadfield-item__complete-icon:after{color:#3fa142;font-size:30px;display:inline;font-family:silverstripe,sans-serif;content:"I"}.uploadfield-item__status{margin:0 .6154rem;color:#cf3f00;background-color:#fff7f0;text-transform:uppercase}.preview-image-field__container{position:relative}.preview-image-field__toolbar{position:absolute;top:50%;right:0;-webkit-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:auto;max-height:100%;border-bottom-left-radius:.23rem;border-top-left-radius:.23rem;overflow:hidden}.preview-image-field__toolbar-button--link:before{content:"="}.preview-image-field__toolbar-button--replace:before{content:"b"}.preview-image-field__toolbar-button{padding:11px 0;height:47px;width:47px;overflow:hidden;background:#000;opacity:.55;color:#fff;border:0}.preview-image-field__toolbar-button:active,.preview-image-field__toolbar-button:focus,.preview-image-field__toolbar-button:hover{color:#b3b3b3;text-decoration:none}.preview-image-field__toolbar-button:before{padding:0 11px;font-family:silverstripe;font-style:normal;speak:none;line-height:1;font-size:25px;height:25px;width:25px;vertical-align:middle}.preview-image-field__progress{height:18px;width:75%;position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:10px;overflow:hidden;background:#e6e6e6}.preview-image-field__progress-bar{height:100%;background:#29abe2;width:0}.preview-image-field__message{position:absolute;bottom:0;left:0;right:0;padding:1.5385rem}@media (min-width:992px){.preview-image-field__message{display:-webkit-box;display:-webkit-flex;display:flex}}.preview-image-field__message-button{margin-left:.76925rem}.preview-image-field__message--error{color:#fff;background:#d40404}.preview-image-field__message--success{color:#fff;background:#3fa142}.insert-embed-modal .modal-content{height:auto;max-height:100%}.insert-embed-modal .modal-body{display:-webkit-box;display:-webkit-flex;display:flex;-ms-grid-column-align:stretch;justify-items:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.insert-embed-modal--edit{width:100%}@media (min-width:768px){.insert-embed-modal--edit .btn-toolbar{margin-left:30%}}.insert-embed-modal--create{-webkit-box-flex:1;-webkit-flex:1;flex:1;width:100%}.alert+.insert-embed-modal--create{padding-top:0}.insert-embed-modal__url-create .form-control.text{padding:.75rem 1.25rem;font-size:1.231rem;line-height:1.33333;border-radius:.5rem}@media (min-width:768px){.insert-embed-modal__fields--fill-width{width:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.insert-embed-modal__preview-container{padding-bottom:1.2308rem}@media (min-width:768px){.insert-embed-modal__preview-container{-webkit-box-ordinal-group:3;-webkit-order:2;order:2;padding-left:1.2308rem;width:30%}}.insert-embed-modal__preview{display:block;max-width:100%;margin:0 auto;max-height:198px}.insert-embed-modal__placement .form__field-holder>div{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-ms-grid-column-align:stretch;justify-items:stretch}.insert-embed-modal__placement .form-check{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin-bottom:0;padding-left:0}.insert-embed-modal__placement .form-check:first-of-type .form-check-label span:before{border-top-left-radius:.23rem;border-bottom-left-radius:.23rem}.insert-embed-modal__placement .form-check:last-of-type .form-check-label span:before{border-top-right-radius:.23rem;border-bottom-right-radius:.23rem}.insert-embed-modal__placement .form-check-label{display:block;cursor:pointer}.insert-embed-modal__placement .form-check-label span{display:block;color:rgba(67,83,109,0);font-size:.9rem;letter-spacing:1px;text-align:center;text-transform:uppercase;-webkit-transition:color .1s ease-out;-o-transition:color .1s ease-out;transition:color .1s ease-out}.insert-embed-modal__placement .form-check-label span:before{content:" ";display:block;-webkit-box-sizing:content-box;box-sizing:content-box;height:36px;padding:5px 0;border:1px solid #dbe0e9;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAFoCAYAAAAl0bm1AAAACXBIWXMAAAsSAAALEgHS3X78AAAB7klEQVR42u3cwW3CQBBAURu5DRqgHoqgAAqgAAqgCOqhAQox173YAuPdsTVvblFE9JV9WmmiVfpxHLstz6Hb+Gw+cCi/OD3fq57363zsHbFAgQIFChQoUKDAf6a3k9hJAqbcZRhkkEEGGWRQoECB7e7B2/2x6p1zu178jVqgQIECBQoUKFDgX2MvtpNETLnLMMgggwwyyKBAgQLb3YNzE/XG2hELFChQoECBAgXmDrQX59pJvB9kkEEGGWSQQYECc9+DcxP1xtoRCxQoUKBAgQIF5g60F+faSbwfZJBBBhlkkEGBAnPfg0un5htrRyxQoECBAgUKFJg70F6cayfxfpBBBhlkkEEGBQrMfQ8unZpvrB2xQIECBQoUKFBg7kB7ca6dxPtBBhlkkEEGGRQoMPc9WPM99C8/u/zc0Oo38e0/yGawqsGawyCDDDLIIIMM7tOgvdhOEjEMMsgggwwyKFCgwJh7sOZ76F9+dvm5ZkvTt/8gm8Hd7sUMMsgggwwyyOA+DdqL7SQRwyCDDDLIIIMCBQqMuQeXvm2p+f56mPqGI2awEQcGGWSQQQYZZDDWoL2YwYjxfpBBBhlkkEGBAgXG3INL37bUfH89TH3DETPYiAODDDLIIIMMMhhr0F7MYMR4P8gggwwyyKDA7cwHteyC9AjuZNIAAAAASUVORK5CYII=) top no-repeat content-box;-webkit-transition:background-color .1s ease-out;-o-transition:background-color .1s ease-out;transition:background-color .1s ease-out}.insert-embed-modal__placement .form-check-label:focus span,.insert-embed-modal__placement .form-check-label:hover span{color:#43536d}.insert-embed-modal__placement .form-check-input{position:absolute;left:-9999px}.insert-embed-modal__placement .form-check-input.checked+span{color:#29abe2}.insert-embed-modal__placement .form-check-input.checked+span:before{border:1px solid #29abe2;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAFoCAYAAAAl0bm1AAAACXBIWXMAAAsSAAALEgHS3X78AAAB7klEQVR42u3cwW3CQBBAURu5DRqgHoqgAAqgAAqgCOqhAQox173YAuPdsTVvblFE9JV9WmmiVfpxHLstz6Hb+Gw+cCi/OD3fq57363zsHbFAgQIFChQoUKDAf6a3k9hJAqbcZRhkkEEGGWRQoECB7e7B2/2x6p1zu178jVqgQIECBQoUKFDgX2MvtpNETLnLMMgggwwyyKBAgQLb3YNzE/XG2hELFChQoECBAgXmDrQX59pJvB9kkEEGGWSQQYECc9+DcxP1xtoRCxQoUKBAgQIF5g60F+faSbwfZJBBBhlkkEGBAnPfg0un5htrRyxQoECBAgUKFJg70F6cayfxfpBBBhlkkEEGBQrMfQ8unZpvrB2xQIECBQoUKFBg7kB7ca6dxPtBBhlkkEEGGRQoMPc9WPM99C8/u/zc0Oo38e0/yGawqsGawyCDDDLIIIMM7tOgvdhOEjEMMsgggwwyKFCgwJh7sOZ76F9+dvm5ZkvTt/8gm8Hd7sUMMsgggwwyyOA+DdqL7SQRwyCDDDLIIIMCBQqMuQeXvm2p+f56mPqGI2awEQcGGWSQQQYZZDDWoL2YwYjxfpBBBhlkkEGBAgXG3INL37bUfH89TH3DETPYiAODDDLIIIMMMhhr0F7MYMR4P8gggwwyyKDA7cwHteyC9AjuZNIAAAAASUVORK5CYII=) top no-repeat content-box,#e8f5ff padding-box}.insert-embed-modal__placement .form-check .option-val--leftAlone+span:before{background-position-y:-36px}.insert-embed-modal__placement .form-check .option-val--leftAlone.checked+span:before{background-position-y:0}.insert-embed-modal__placement .form-check .option-val--center+span:before{background-position-y:-108px}.insert-embed-modal__placement .form-check .option-val--center.checked+span:before{background-position-y:-72px}.insert-embed-modal__placement .form-check .option-val--rightAlone+span:before{background-position-y:-180px}.insert-embed-modal__placement .form-check .option-val--rightAlone.checked+span:before{background-position-y:-144px}.insert-embed-modal__placement .form-check .option-val--left+span:before{background-position-y:-252px}.insert-embed-modal__placement .form-check .option-val--left.checked+span:before{background-position-y:-216px}.insert-embed-modal__placement .form-check .option-val--right+span:before{background-position-y:-324px}.insert-embed-modal__placement .form-check .option-val--right.checked+span:before{background-position-y:-288px}.gallery,.gallery__main,.gallery__outer{position:relative}.gallery__main{height:100%}@media (max-width:991.98px){.gallery__main.gallery__main--has-opened-item{display:none}}.gallery__no-item-notice{text-align:center;font-size:1.231rem;margin-top:1.2308rem}.gallery__back{position:relative}.gallery__back.ss-ui-button:before{font-size:23px}.gallery__back .gallery__back-badge{display:inline-block;position:absolute;font-size:1rem;top:-.5rem;right:-1rem}.gallery__back--droppable-hover{background-color:#e7ebf0;border-color:transparent;-webkit-transform:scale(1.3);-o-transform:scale(1.3);transform:scale(1.3);border:1px solid #29abe2}.gallery__main--selectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:-1.5385rem;padding:1.5385rem}.gallery__back-container{display:inline-block}.gallery__back-container .gallery-item__droppable{margin:0}.gallery__files,.gallery__folders{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;flex-flow:row wrap}@media (max-width:991.98px){.gallery__files{margin-bottom:53px}}.gallery__load{width:100%;display:inline-block}.gallery__load-more{display:block;color:#fff;cursor:pointer;margin:8px auto 24px;padding:4px;width:200px;font-size:16px;height:44px;background-color:#29abe2;border:0;border-radius:4px}.gallery__sort{display:inline-block;vertical-align:middle;padding:.3846rem .7692rem}@media (max-width:767.98px){.gallery__sort .chosen-container{width:auto!important}}.gallery__sort .chosen-container-active .chosen-single{outline:1px dotted #29abe2;outline:5px auto -webkit-focus-ring-color}.gallery .gallery__sort .chosen-single{border:0;-webkit-filter:none;filter:none;background:none;-webkit-box-shadow:none;box-shadow:none;color:inherit;margin-top:-1px}.gallery__sort .chosen-single:focus{-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.gallery__sort .chosen-single>span{text-align:right;color:inherit}@media (max-width:767.98px){.gallery__sort .chosen-single>span{font-size:0}.gallery__sort .chosen-single>span:after{content:"\E003";font-size:1.231rem;font-family:silverstripe;color:#566b8d}}.gallery__sort .chosen-single>span:before{content:"Sort by "}.gallery__sort .chosen-drop{min-width:160px;right:0;border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);border:0}.gallery__sort .active-result{text-transform:capitalize}.gallery__error{display:table;width:100%;height:100%}.gallery__error-message{display:table-cell;vertical-align:middle;text-align:center}.gallery__view-change-button .icon:before{vertical-align:middle}@media (min-width:544px){.gallery__state-buttons{margin-right:-.7693rem}}.gallery__state-buttons .btn-group:last-child{margin-right:0}.gallery__view-change-button{margin-right:-.76925rem}.griddle-footer>div{display:-webkit-box;display:-webkit-flex;display:flex}.griddle-page{-webkit-box-flex:1;-webkit-flex:1;flex:1;text-align:center;margin-top:-3px}.griddle-page select{height:2.7692rem;padding:.3846rem .7692rem;line-height:1.5384;color:#566b8d;border:1px solid #cbd3df;background-color:#fff;background-image:none;text-align:center;display:inline}.griddle-page select:focus{color:#566b8d;background-color:#fff;border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),rgba(102,175,233,.6)}.griddle-footer{width:200px;margin:0 auto}.griddle-next,.griddle-previous{width:36px}.griddle-next button,.griddle-previous button{white-space:nowrap;border:0;background:transparent;width:36px;height:30px;position:relative;border-radius:.23rem;overflow:hidden}.griddle-next button:hover,.griddle-previous button:hover{background-color:#ced5e1;border-color:transparent}.griddle-next button:hover:before,.griddle-previous button:hover:before{background-color:#ced5e1}.griddle-next button:before,.griddle-previous button:before{font-family:silverstripe;color:#566b8d;width:36px;height:30px;background-color:#f7f8fa;position:absolute;top:0;left:0;padding:.3846rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;font-size:1.231rem;-webkit-font-smoothing:antialiased;line-height:1.5384}.griddle-previous button:before{content:"'"}.griddle-next button:before{content:"&"}.gallery__search-message-clear{padding-left:.6154rem}.gallery__table{margin-bottom:-1.5385rem}.gallery__table td,.gallery__table th{word-wrap:break-word}.gallery__table td{word-break:break-all}.gallery__table td.gallery__table-column-image{padding:0}.gallery__table th{cursor:pointer}.gallery__table th>span{display:inline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery__table th>span:after{color:#8f9fba;content:")";display:inline-block;font-family:silverstripe;margin-left:4px}.gallery__table tbody td{padding-top:1.8462rem;padding-bottom:1.8462rem}@media (max-width:767.98px){.gallery__table tbody td:nth-child(n+4){display:none}}.gallery__table thead td,.gallery__table thead th{height:52px}.gallery__table thead th:hover{background-color:#f1f3f6}@media (max-width:767.98px){.gallery__table thead th:nth-child(n+4){display:none}}.gallery__table .sort-ascending,.gallery__table .sort-descending{border-bottom:1px solid #29abe2}.gallery__table .sort-ascending>span:after,.gallery__table .sort-descending>span:after{color:#29abe2}.gallery__table .sort-descending>span:after{content:"*"}.gallery__table .sort-ascending>span:after{content:"("}.gallery__table .footer-container,.gallery__table .footer-container:hover{background-color:#f7f8fa;border-bottom:0}.gallery__table-row{cursor:pointer}.gallery__table-column--select{width:1%}.gallery__table-column--select input[type=checkbox]{width:14px;height:14px}.gallery__table-row--highlighted{border-color:#29abe2;background-color:#e8f5ff}.gallery__table-column--image{width:68px;max-width:68px;height:69px;text-align:center}.gallery__table .gallery__table-row>.gallery__table-column--image{padding:0;vertical-align:middle}.gallery__table .gallery__table-row>.gallery__table-column--image:first-child{max-width:none;padding-left:1.5385rem}.gallery__table-image{background-repeat:no-repeat;background-position:50%;height:68px;width:68px;-webkit-background-size:calc(68px - 1.5385rem) auto;background-size:calc(68px - 1.5385rem) auto}.gallery__table-image--image{-webkit-background-size:68px auto;background-size:68px auto}.gallery__table-image--folder{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAAB6CAYAAABNyyaCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXxJREFUeNrs2q9Ow0AcwPEdXQerAY3FDBQBNbcQwCJnwE4jAD83Am+A4AHgBXgKLJLAE2D4Y3ocvAPJL/TzTbra9j69a3NZyjn3FK8lQwBGYMAIDBiBERgwAgNGYAQGjMD8l9Lo5vGy9/V5EeFi8sf7+dPZ3jWWnxkTBOX3KRk2V6PFwwJLxKVsZXiwMT6uwERbW+vBTjk1YALWPzo5BBPxi2SwPAETsaoag4k4Y/r1bvkAaMAErJ7O9sHEnDUTMDHfM9Ot+9c1MNFq2/Xy+1xwtrsIkzbvXmL+eTm35eo6ucf6Vo7TuHeeOrvxvVqOW9v+3jECA0ZgwAiMwIARGDACIzBgBAaMwIARGIEBIzBgBEZgwAgMGIEBIzACA0ZgwAiMwIARGDACA8YQgBEYMAIDRmAEBozAgBEYgQEjMGAEBozACAwYgQEjMAIDRmDACAwYgREYMALTIZi5YQjXPOWcDYOlTGDACAwYgREYMAIDRmAEBozAgNHf9S3AAJeuKdi1sikAAAAAAElFTkSuQmCC)}.gallery__table-image--archive{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=)}.gallery__table-image--audio{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==)}.gallery__table-image--video{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==)}.gallery__table-image--document{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==)}.gallery__table-image--error{background:#d40404;height:68px;width:68px}.gallery__table-image--error:after{content:"<";line-height:68px;font-size:30px;display:inline;font-family:silverstripe,sans-serif;color:#fff;opacity:.8}.gallery__progress-bar-progress{height:100%;background:#29abe2;width:0}.gallery__progress-bar{height:16px;width:30%;border-radius:10px;overflow:hidden}.gallery__progress-bar--complete:after{color:#3fa142;font-size:20px;display:inline;font-family:silverstripe,sans-serif;content:"I"}th.sort--disabled>span:after{content:""}.editor{background-color:#f7f8fa;z-index:2;position:absolute;height:100%;left:0}@media (min-width:992px){.editor{width:300px;border-left:1px solid #ced5e1;position:relative;padding-bottom:0}}@media (min-width:1200px){.editor{width:448px}}.editor .nav-tabs{z-index:1;position:relative}.editor .editor__details{-webkit-transform:translateZ(0);transform:translateZ(0)}.editor .editor__details .btn--close-panel{margin-right:0}.editor .editor__details fieldset{overflow-y:auto}.editor--asset-dropzone--disable .asset-dropzone{pointer-events:none}.editor__heading{margin-right:2.4616rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}.editor__status-flag{color:#f46b00;background-color:#fff7f2;border-color:#f46b00;clear:both;text-transform:uppercase;display:inline-block;position:relative;line-height:1rem;margin-left:3px}.editor__specs{color:#566b8d;font-size:.846rem;margin-bottom:1.2308rem}.editor__top-message{margin:-1.5385rem -1.5385rem 1.2308rem}.editor__file-preview{text-align:center;margin:0 -1.5385rem .76925rem;position:relative;max-height:336px;min-height:60px;overflow:hidden;display:block;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none}.editor__file-preview:not(.editor__file-preview--folder):hover .editor__thumbnail{-webkit-transform:scale(1.04);-o-transform:scale(1.04);transform:scale(1.04)}.editor__file-preview--folder{margin-left:0;margin-right:0;width:100%}.editor__file-preview-link:before{position:absolute;top:50%;left:50%;margin-top:-25px;margin-left:-25px;padding:11px;height:50px;width:50px;border-radius:50%;background-color:rgba(0,0,0,.6);color:#fff;font-size:22px;opacity:0;content:"=";font-family:silverstripe;line-height:27px;z-index:1;-webkit-transition:all .5s;-o-transition:all .5s;transition:all .5s}.editor__file-preview-link:active:before,.editor__file-preview-link:hover,.editor__file-preview-link:hover:before{text-decoration:none;opacity:1}.editor__thumbnail{max-width:100%;max-height:336px;min-height:60px;margin:auto;-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1);-webkit-transition:all .5s;-o-transition:all .5s;transition:all .5s}.editor__file-preview-message--file-missing{margin:2.4616rem 0 1.2308rem;font-size:1.231rem;color:#d40404;text-align:center}@media (max-width:991.98px){.editor__heading,.editor__specs{text-align:center;margin-right:1.8462rem;margin-left:1.8462rem}.btn--close-panel{float:left;right:auto;margin-right:0;margin-left:-15px;color:#566b8d}.btn--close-panel:before{content:"5"}}.relative-time[title]{cursor:pointer;text-decoration:underline}.asset-admin .popover-field .popover{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.1),0 2px 10px 0 rgba(0,0,0,.1);box-shadow:0 2px 5px 0 rgba(0,0,0,.1),0 2px 10px 0 rgba(0,0,0,.1);font-size:1rem;min-width:230px}.asset-admin .popover-field .popover:focus{outline:none}.asset-admin .popover-field .popover.bottom .arrow,.asset-admin .popover-field .popover.top .arrow{margin-left:-5px}.asset-admin .popover-field .popover.top{margin-top:-10px}.asset-admin .popover-field .popover.left .arrow,.asset-admin .popover-field .popover.right .arrow{margin-top:-3px}.asset-admin .popover-field .popover.left{margin-left:-10px}.asset-admin .popover-field .popover-body{padding:.5rem .75rem}.asset-admin .popover-field .popover-body ul{padding-left:0!important;list-style-type:none;margin-left:-1.2308rem + 1px;margin-right:-1.2308rem + 1px;margin-bottom:0}.asset-admin .popover-field .popover-body a{display:block;padding:.3077rem 1.2308rem;color:#43536d}.asset-admin .popover-field .popover-body a:hover{text-decoration:none;background-color:#eef0f4;color:#43536d}.asset-admin .popover-field .popover-body .btn{padding-left:calc(1.2308rem - 1px);padding-right:calc(1.2308rem - 1px);margin-left:calc(-.75rem + 1px);margin-right:calc(-.75rem + 1px);display:block;width:calc(100% + 1.5rem - 2px);text-align:left;border-radius:0}.asset-admin .popover-field .popover-body .btn:hover{background-color:#e9f0f4}.asset-admin__toolbar-extra{width:auto}.insert-media-modal.modal-lg{width:calc(100% - 4.9232rem);max-width:1600px;margin-top:0;margin-left:auto;margin-right:auto;height:calc(100% - 53px)}@media (max-width:991.98px){.insert-media-modal.modal-lg{width:calc(100% - 1rem);height:calc(100% - .5rem);margin:0 auto}}.insert-media-modal .modal-content{height:100%;border-top-left-radius:0;border-top-right-radius:0}.insert-media-modal .modal-body{padding:0;height:100%}@media (max-width:991.98px){.insert-media-modal .editor__details{height:100%}}@media (min-width:992px){.insert-media-modal .btn--close-panel{display:none}}.insert-media-modal .tab-content{margin-bottom:1.2308rem}.insert-media-modal .fieldgroup.fill-width .field.flexbox-area-grow:first-child{margin-right:1.5385rem}.insert-media-modal .asset-admin--multi-select [name=action_insert]{display:none}@media (min-width:992px){.insert-media-modal .asset-admin--single-select [name=action_insert]{display:none}}@media (max-width:991.98px){.insert-media-modal .asset-admin--multi-select [name=action_insert]{display:block}}.insert-media-modal__main{height:calc(100vh - 106px)}.insert-media-modal__close-button{float:right;height:32px;margin:10px -10px 10px 0}.insert-media-modal__close-button:before{top:0}.history-item{padding-top:1rem}.history-item:focus,.history-item:hover{background-color:#f1f3f6}.history-item p{margin-bottom:0}.list-group-flush:first-child .history-item:first-child{border-top:1px solid #ced5e1}.history-item__date,.history-item__version{opacity:.7;font-size:.846rem;margin-bottom:1px}.history-item__date{display:block}.history-item__version{position:absolute;right:1.5385rem;top:.9231rem;font-size:.846rem;opacity:.7}.history-item__status-flag{color:#3fa142;text-transform:uppercase;font-size:.923rem}.history-list{position:relative;min-height:50vh}.history-list>form{display:block}.history-list>.list-group{margin-top:calc(-1.5385rem - 1px)}.history-list .editor__file-preview-link,.history-list .editor__file-preview-message--file-missing{max-width:50%;position:relative;display:block;text-align:center;font-size:10px;padding:10px;background:#f1f3f6;border:1px solid #dbe0e9;margin:0 auto 10px}.history-list .editor__specs{text-align:center}.history-list__back{padding:5px;position:absolute;top:0;left:-.76925rem;z-index:2} \ No newline at end of file +.gallery-item{opacity:1;position:relative;background-color:#fff;border:1px solid;border-color:#dbe0e9 #ced5e1 #c1cad9;width:178px;border-radius:.192rem;-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;-o-transition:box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;height:174px;-webkit-transition:opacity .25s linear;-o-transition:opacity .25s linear;transition:opacity .25s linear}.gallery-item:hover{-webkit-box-shadow:0 1px 4px rgba(0,0,0,.2);box-shadow:0 1px 4px rgba(0,0,0,.2);cursor:pointer}.gallery-item:not(.gallery-item--error):not(.gallery-item--folder):hover .gallery-item--overlay{opacity:1;display:block}.gallery-item--dropping{border-color:#29abe2;background-color:#e8f5ff}.gallery-item__draggable,.gallery-item__droppable{margin:0 1.2308rem 1.2308rem 0}.gallery-item__draggable>.gallery-item__droppable,.gallery-item__droppable>.gallery-item__draggable{margin:0}.gallery-item--folder{height:54px}.gallery-item--folder .gallery-item__thumbnail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpi1Jhy/D8D6cDxRo7lAQYaACYy9Tkw0AiQ6yD7weYgB83VjwRo4SBGoMH/GQYRYGIYZGDUQaMOGnXQqINGHTTqoFEHjTpo1EGjDhp10KiDRh006qDB7SCAAAMAe8YKeWd2MukAAAAASUVORK5CYII=) 12px 14px no-repeat;-webkit-background-size:27px 24px;background-size:27px 24px;height:52px;width:45px;float:left}.gallery-item--folder .gallery-item__title{padding-top:17px;padding-bottom:17px;padding-left:0;width:131px;height:52px}.gallery-item--folder .gallery-item__checkbox-label{margin-top:5px}.gallery-item__thumbnail{height:132px;width:176px;margin:0 auto;background-repeat:no-repeat;background-position:50%;border-top-left-radius:.192rem;border-top-right-radius:.192rem;-webkit-background-size:cover;background-size:cover}.gallery-item__thumbnail--error{background-color:#dd3636}.gallery-item__thumbnail--no-preview{background-color:#566b8d}.gallery-item__thumbnail--loading{background:#fff url(data:image/gif;base64,R0lGODlhKwArAKIHAOvt7rS8wdLW2EB9ogBakqysrP///////yH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1NWQ2NWU5Yy1iZjAwLTRmNjktODVlNS03NDQ4ODZiM2E1MDEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjRFNkFDN0EwNjZDMTFFNTg1QTBBNzNENzVBQ0M0ODQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjRFNkFDNzkwNjZDMTFFNTg1QTBBNzNENzVBQ0M0ODQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MzRlNmQ4NC00OGE1LTRmNzQtYTcwYS0wNDM4N2E1ZTYzZjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDo5ZjhiOTRiYy00YTNiLTExNzgtYWNjMy1kNzg3OTk3MTdhNzQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQFAAAHACwAAAAAKwArAAADtni23P4wOiWrvTjrzbv/YCiOWCCQGVAUAXoF6+pKABwXMyTca5szKt7q9DPshAViroZMFoNCHwQgEAA+Np7ScbwFrppu7BvJCrcWs7PcjKElWlr7luGBG4KWuHfGxIE2VDdEUD0ldgtiVj13RjwYeyx9aw2FOH5zK41cjxiWURJ7UheRYxFMfylqlJygHlRWp6uaRaUsmyi2b7lIZEUGq7szPL6/C17GDoHJXKPMz9DR0tMT1AcJACH5BAUAAAcALBAABwAGAAcAAAMQeApTGiSyGAetdxwb3SZaAgAh+QQFAAAHACwIAAoADAAKAAADIXi6F8QMDPJgm7QqmbsSWEcVR9gNwlGYI2Oi1kEN8RLECQAh+QQFAAAHACwHAA8ABwAMAAADG2hCzDaNlchgtG0YGnYsDyVgjZcZUwUawVC8CQAh+QQFAAAHACwKABQADgAJAAADI3i6O8TwCEdCPKCQTUrkYABYCggKjMkNiwoCy6QWMJQVARolACH5BAUAAAcALA8ADwARAAkAAAMseLqsUSW0Bgq5d0wFBsba5n0YdQjkt1RHlV7bMV4FcB5GuASYEC+FA0HHSAAAIfkEBQAABwAsHAAPAAkADgAAAyR4CtpNQzhFapmnkjD1YJQGGaHXFCLRBGkztAcrDs5Lc9iF4QkAIfkEBQAABwAsGAAZAAwACQAAAx54urOuYpB5SFNl6tni3kLwgYc0XsooPBUHsMqwsgkAIfkEBQAABwAsEAAHAA0AHgAAAzp4aiH6EJQS4GNzWpXzPkNXfZ3zgcN4rmzrvnAsz3Rt31vRDgRbEL0VD7gCGg+qh5EwAHyMSUuhCUkAACH5BAUAAAcALAgACgAPAA4AAAMveLoHwVAZUUpkoNZ7pv6FsDigJi5lFRgMkZ7Q8AUAd8ihvcgXq3eBwW/YsOyIkgQAIfkEBQAABwAsBwAPAAgADAAAAx54cNwXjolSYqC1YSrYLsvxdc8GHdM2DOLWpJnDNgkAIfkEBQAABwAsCAAUABEACQAAAyl4unwSLSoQShGygGOEtVhWfeBWNCS5rUv6QYznWoERUa5gSxwgCBtJAgAh+QQFAAAHACwVAA8ACwAKAAADIni6IHFmGVFqGTJYu/SuCvBx03gdzSYsYRUArGIUayzZSgIAIfkEBQAABwAsHQAPAAgADAAAAyAocNxXJSwHi6D1sgpN4NAFgAEjgMzIbSgzvEfpHISQAAAh+QQFAAAHACwZABgACwALAAADIXi6sq6iSLlAmBPiGeyewPAV3SFuzYKVjygYj0Kk8QHXCQA7) 50% no-repeat}@media only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.gallery-item__thumbnail--loading{background:#fff url(data:image/gif;base64,R0lGODlhVgBWAPf/AP///5qkqnigubi4uO3y9fD09tTU1MrKyi1xnCZtmhlnl7q6ulWDnxFilWWTsSlvm1WJqk+AnsbGxpa0x+bm5h1pmEqDpsPDw6Woq83Nzc3a46nC0fLy8snW3uTk5K6urmuNomGJoXSet7S0tFGHqR9qmG2ZtNHe5hVklq6vsAlelJWhqdjj6enp6X2WpYOnvoWZpnOSpdvb28zU2ARck566y+nv87nN2UR6nI2uwqzE0ubt8Ymbp7/Gy6mrrEF9o8vZ4nuiuvz9/pu3yQ5hlevw85KyxaCmqmqXs6usrPr7/Ep9namqq0eBpVyGoAZdk5q2yAxglE2FpzBxmTp2m4qswSJql22Vraq0uwJbkqysrABakjN1noadrHGatO3v8ZGfqPX29k2Coh1olufs78/R0j94nLKysvf39/z8/Le3t9DQ0LGxsePj48jIyN/o7fr6+v7+/7y8vPHx8fb4+r29veDg4P7+/vv7+/n5+fj4+ER/pAFaktLS0tnZ2cXFxcDAwP39/fb29t/f397e3vX19erq6q2trV+QriFrmZCwxPT09OLi4u3t7QFbkrOzs6urq+Hh4QNck/Dw8GCRr3+lvApflGOSr+fu8r7Q26W/z+zs7M7Ozr+/v93d3dPT0/L2+LCwsNjY2Ovr68TExNfX17m6uzV2n4mrwLPI1ViMrLe4ua/G1Pj6+8jX4ePq7zBznefn5+Dh4bbL18jJyVOIqfPz84+wxNvl7Dh4oD17ocTFxdjZ2bS2tqytrsjY4eHp7tTf5vf5+u/v79HR0cnJyba2tqG8zfz9/cLT3fb5+g9ilVKGp5e1x9vl66e+zPL192aSrgdek3aft2GQrV6Prjd0mvv8/KK6ydPU1DNymoKitdXg56a/z9/g4X+juJ6yvp2oriRrmNvc3fz8/eHl536crvb29+Xl5XicsoWfsN3e3/r7++zx9I2dp8jLzoeovGWPqc3X3+Xr74+ouJSzxq26wpKxxUt/oGOQrdXZ3PX4+cDK0N3m7La2twAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODA4M0Y1OEQ5Qzk3MEQ4RSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3OTA5OUY3RTkzRjIxMUU0QjVEM0JDM0U0RkMyRUM5NyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3OTA5OUY3RDkzRjIxMUU0QjVEM0JDM0U0RkMyRUM5NyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDg4MDExNzQwNzIwNjgxMTgwODNGNThEOUM5NzBEOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDc4MDExNzQwNzIwNjgxMTgwODNGNThEOUM5NzBEOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQFAAD/ACwAAAAAVgBWAEAI/wD/CQRAsKDBgwgTKlzIsKFDggL/PZxIsaLFixgbGlKjpeMHOBlDijRYCFDHkyhTaiE0sqXDNSpjdnQDkmKkBTJPslmTx+XCnFrQPWxzZiXBSECTpjyTxidBOI+UKh2AMc2InGqcTtSDBk/VA5CkdlSDRqtZgpOk1ll0ti3DRQtauJ1Lt67du3jz6jU4Rw7QT3sz4nEj1uOaQIEvykh6oWzFQBwLq8xw9gBQOY4Ltois0g8AWykfUWCYISebtncsS9ZyRi7FPH+kSkhcEQ1nqRcE0c5oIOaARruDax0onG7E4nYlIl/OvPnCFgvYOh/ZaEBMA9MrLqojdVL2hYIuSP8m+/0gmquFDzS9CAeNnsASpP55T7EFm9VaDtxpezvliPUWWYdfaD05dZ9MlC0UC3on2QKAKDKp4VpBaPiV0wFOpVHUgCrZQRAhrDHyEDpAnVUah1qogVht4gElA115rHFgTgtEUlEehIm1RnkHBbLGB5K54RWPBYEoFiCFEKlQH0AtMIeSD8EBZEcDGALllVhmSRtxWlLEZZdghinmmGSWGWYanADphpkHpfFjSm2weccnU6q0I5ml1CnTi2HKEIpUC4DpyYxKAaIlUZLJkeSVguBUmDFWYpkGd2KpEYtFm6xRx4ZafKCGG3YMWdcch0h1RpwULdJJYWwMMpcepQL8dYaHFQ1DqGSk7GdWfDkVg5EfKJ7kqlYp5ITdQ2j0UdAcwaJEjFZAicgQHDlqIQdBwMoEyR8ezDGKAZzKJK1LFsbERmYGpaFaSh62EdMBNZl3K0rX+sRIUmcYMMocbfwRlkyiEFSuBPEqdG9OWjHZbEdPErQGugz1JlMKZg2ysGcXVRvTbGbdQQqHbABXkR3hxnQIfW0NMm9OnXBQEaJKHeKdXXjYIcEAdZ5RxxqbWBRLf0DVASCUG0m2gG5XFlKuqahiaZJYbHgCpqNJhcInmIsB9UEpZcIU0wcG6Fqmuyh90MfQbBL2ASdos+n223DHLXdBys0N0XFyRxQQACH5BAUAAP8ALA4ADgA7ADsAQAjpAP8JHEiwoMGCGxKdOMiwocOHA3mU2EKxYkVXEDNq3Mix479eHkOKHEmSI5OSKFOqXMmy5cZMiSxWNOHSY5IjIBI8oajgTc2fK1MARUlrKEpeRpMqBZqqQsUnBJY2VCdNpkUHUhu6GGN1S46sEH1h6EEOrNmGSM9qPKk2Y9G2D4XCfQhyrt27ePPqXWlrVSy8oFQ52mIhL51LWWQOmRvIC42uWyjNjREF8pYXc48sgZzoLgYQDfhY5BInLwYYDLT96Le3tevXeHfB/udrNlvXskzBNiUL9m3XtWHLnk28uPHjyJMrX868ZEAAIfkEBQAA/wAsEQATABgAFQBACKAA/wkcSLCgEiQFE05osKWhw4cQtyRg8c9HjDERiShKyLHjv0oqIHLEYiaiyS0oNHkkmG2lS45xRDxp+FIgqignHRYkkyinSQWsBvoAwTBnAygvmbgwo4CGlDg1o/779WCL1IEnEDyUyuLUSZdvdPncSrCAhbEQHVVT9i8MPrQPaxUgeCQCH7QWinQEYy3nj1dJQWB0mOvNVYEBXMRgJzUgACH5BAUAAP8ALA4AHQAPABkAQAibAP8J/NdvoMGBe7YoXMjQYDOGEBU2eFHu4L8ZAQJAsvhL0kKLAyMynGDxlsgtjnAEGEjnwRaQA195bAiSxsktJgwmuGkJl0EHN7fwWXJkoJIfDBuYgbHR4BsFMA1S+hi1CU2QlUSCrHBTAZ2BfG7WMBjlpiqDJIImeCOQDpGgW7SB+Wejwc0GMXwMhCBSGwyLyK6Ie4ADxMqBAQEAIfkEBQAA/wAsEwAnABgAEgBACIoA/wkcSLBgQWAO4hgUuKWhw4cQt2ggWECRhQo0HEZBcOnGwo8LC5CIuKUeQZIot1jKBLKlDQsOE4BEMgtIjT18UgowmJJkEIFQiPSECGtiy6P/oDTYUgVpQU0oIHJzykoByp8Lhz68l1VrwxJdvVZo9Y9aFq8Po+goiAlRlKGJjDj9J4TMGwJIAwIAIfkEBQAA/wAsKgAeABcAEgBACKkA/wkcSJAggTc7hBQcWGKLw4cQIzq0dkSRwCpbGjRbyLEjqygSQ9KI4CPYPwEhtyjQURDYlSMdBUJJlHLLSF8EWzWsKTHBCoFGeIa0wuPkv2ARURyLyZTgDUQIQDqkkSidvo4nYAndgsJFwWSWtj7UBlNgELEQfQrUgPbhEydMBKJMyWdPDSCzkDQgEsLHPyP/JoQkQYBjmIHTBCZ42MRG04VxLgF7XDAgACH5BAUAAP8ALDwAHwANABgAQAiMAP9Fewbtn8GDCP9tWciQoZeDJhpKpHFQ4g8lCHFZktgwwT8YDzgujNLOIEMiORIiFHmrokiGzQxOeLkwjhSaW/YcxAAjRIQlDECs+GJySxREmFS6ZEgCo0qOEJ5ybFCyqMhlwt4kwEnCIASaUQzWwPmPjgKaFbAgwPnCoLslZxk+SUBPZRIMGJggDAgAIfkEBQAA/wAsMAAyABkAEgBACJ0A/wkcSPDfm1xbCip8h2OLw4cQI26xUEDhQHcMxGiwyNGiDQsSQzqkJBCSCxQit5xi0bElpj0hCTpkNhBaLT4pJSp4M/CImZwPdfHsCONBRAQnWiodqIjIQ47Silgc0gCoQ0kbCWpCadXhAzoD5VXo+jCRM4IBqJBtMMEiBgaOckZBpTRAQ4kqKi0dmMSFNmlbnoiIs9dimUCFCQYEACH5BAUAAP8ALB8ADgAZADsAQAjxAP8JHDgw1ipbBBMS5KNthZaHECFOUkixosWLGDNq3MixI8EcW0KK9EjgicgKqSw2GhARogGOWcQ5cXeEiT80HnPq3MnzorBpKHI6EElU5AMgCg2pgfgBTkYg5lq2/KQxywMYUrUQ2omo58ZmXsOKHUu2bMc3CkZ6dFVU7UYTbbckytTxRKINHdNw+qDFjcc0a/hGbKMx0CfBUtdkjMLAR9aHMjQ2AOFY6gKONLTBSBIREACPfCyJMxOPjNnTqFOrXs26tevXsC124MkiQUidcbgUzZmorccXcd1iRBScBhIlGocUzXKJjkcLWxypAkUxIAAh+QQFAAD/ACwRABMAGQAYAEAIugD/CRxIsOCdgggFtjmjpaHDhxC1yCkk8MkSDBHP2EnIkaOMUBETcgEBKaJJNbE6DuQTJYhKgmj6AHj5D0CpDw1pDvTExuRDhDYW+PRpzBDBLDgwDj3TRmcDBmB8aCk2U6dVhAW24ZjS4OocOVcLLqrz82ohQD5pCrow9ORAPG7aRvywJtDAGHIhHkhTUJqTvFrcwOloBcbQP3qchlDa8AKasAItaXPSBQ/kywK9BQCB7XI3BU+y8BEYEAAh+QQFAAD/ACwOAB0ADgAZAEAIlwD/CfwnaKBBgbu0KFy40KAshhAVhoN38F+NigLnHGqIkUnEhYwODvrIJESDgWnqKMT4T89Ghhh9fVRoYKCpmVrYoBnYB6cWECcF3umEIckRGBFQ8DmIZgTLgWtWPpUAEyOvjxV74RyRRqDHmegGpsCZYSAtn3LO/UtzxicPcf/gPJoZgEqWgRkgHgExpmIgcE5wWHliMCAAIfkEBQAA/wAsEgAoABsAEQBACIsA/wkcSLBgwTZntIwzSFCLw4cQI2oZwLAgAD1o8FTcWBBNwRZqJDr084/bnQMiUz4804Kjy3+xRkT8wlGlSDsMbYpUE8hgnjVsdC6I9LLoPzhuHsoxSjANSonrOJ4xMGpOmz+QVIqqqRPinIpdI5IUSCqsSDaNDA4KarYTB5d47EgY8GFlnTWbOAYEACH5BAUAAP8ALCkAHgAWAB4AQAi9AP8JHEiwIBw0YeIUFDhAi8OHECH6ABGFICEtZxgt3Mixo0eBLdhEHImBAY1/tv6JGulQTYuC8z7K3Hjt20yPkRawZGKyYCA1LEf6cKGAkMBIQUcmgWGFoK2IjyjcnEq1qkBQVgtuWlPnjMMkMajk47ioU1It7qYsHCbyrBZIMRoQ9OP2ISQXKAbOqfvwCL4sA+kGhfTHw5xRZZwA/mfnXxuWB+DMlPNQguSpANagycq5s+fPC+WVqPoGwdSAACH5BAUAAP8ALDoAHgAPABYAQAiPAPUA+EewoMGDWhIqXPgoz0F0CyP6IBgx4YE7B/+hkVNxIa2DUaYwAEGSwZQoFBWyWeMwY8qOGQx2jHgmjcEMM7WkKCisC4aOGLpo+aDGjR08LmUuZDMo6UxSGJXObFowZ0JiBA2csapFVkE0bHKaMsgoJxOD2XJOLCguBJifCTGACaHK5ZMoDaI8+SfpX0AAIfkEBQAA/wAsMQAuABgAFQBACKkA/wkcSLCgQYFMCOZxo6Whw4cQ1xB8AAZiQ0CFDmo0iOaCRYi8iFgL8PGjGzwb/yVIyXJjmhFaDmrpdTDPn5IQJQjcZw8STotq0BAsweOnlguCWD7BUVFLnUUtowo0sNEXSwAMHQ50uGujnTNGD+kx2AasUS2HJhGkoOaswzppBHYQs8JtwwVJCU4JkMTomTYaVYTo+5GNp5ZZlpB0GEqGVIIJQvAD8DggADs=) 50% no-repeat;-webkit-background-size:43px 43px;background-size:43px 43px}}.gallery-item__thumbnail--small{-webkit-background-size:auto auto;background-size:auto;background-color:#fff}.gallery-item__title{padding:11px 12px;height:40px;width:176px;margin:0;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;position:relative}.gallery-item--selectable .gallery-item__title{padding-right:32px}.asset-admin--single-select .gallery-item--selectable:not(.gallery-item--selected) .gallery-item__title{padding-right:12px}.gallery-item__checkbox{margin:13px 4px;-webkit-transform:scale(.1);-o-transform:scale(.1);transform:scale(.1);z-index:-1;position:absolute}.gallery-item__checkbox-label{width:30px;height:40px;position:absolute;right:0;top:0;margin-bottom:0}.asset-admin--single-select .gallery-item--selectable .gallery-item__checkbox-label{display:none}.gallery-item--selectable .gallery-item__checkbox-label:before{cursor:pointer;top:0;bottom:0;right:0;height:19px;width:19px;margin:auto 10px;position:absolute;border:1px solid #ced5e1;border-radius:.192rem;font-size:1.15em;padding:1px;color:transparent;background-color:#fff}.asset-admin--single-select .gallery-item--selected .gallery-item__checkbox-label{display:block}.asset-admin--single-select .gallery-item--selected .gallery-item__checkbox-label:before{margin:8px;border-radius:100%;font-size:1.5em}.gallery-item--selectable .gallery-item__checkbox-label:not(.gallery-item__checkbox-label--disabled):hover:before{border:1px solid #29abe2}.gallery-item--error .gallery-item__checkbox-label:before,.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:before{font-size:19px;border:0;border-radius:0;padding:0}.gallery-item--error .gallery-item__checkbox-label:hover:before,.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:hover:before{border:0}.gallery-item--error .gallery-item__checkbox-label,.gallery-item--error .gallery-item__thumbnail,.gallery-item--error .gallery-item__title,.gallery-item--error:hover{cursor:not-allowed}.gallery-item--error .gallery-item__checkbox-label:before{color:#d40404}.gallery-item__error-message{position:absolute;top:calc(50% - 20px);left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);max-height:calc(100% - 40px);overflow:hidden;width:90%;color:#fff;background-color:#dd3636;text-align:center}.gallery-item--error .gallery-item__thumbnail,.gallery-item--missing .gallery-item__thumbnail{position:relative}.gallery-item--error .gallery-item__thumbnail:after,.gallery-item--missing .gallery-item__thumbnail:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:#dd3636;border-radius:2px 2px 0 0}.gallery-item--error:hover .gallery-item__error-message,.gallery-item--error:hover .gallery-item__thumbnail:after,.gallery-item--missing:hover .gallery-item__error-message,.gallery-item--missing:hover .gallery-item__thumbnail:after{background:#d81d1d}.gallery-item--overlay{background:rgba(48,59,77,.5);position:absolute;top:0;right:0;left:0;opacity:0;display:none;-webkit-transition-property:opacity,background;-o-transition-property:opacity,background;transition-property:opacity,background;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;border-top-left-radius:.192rem;border-top-right-radius:.192rem;color:#fff;height:132px;width:100%;font-size:14px;padding-top:56px;text-align:center}.gallery-item--overlay:before{margin-right:5px}.gallery-item--selected{border-color:#29abe2}.gallery-item--selected .gallery-item__checkbox-label:before{border-color:#29abe2;background-color:#29abe2;color:#fff}.gallery__main--dragging .gallery-item--selected{opacity:.2}.gallery-item--highlighted,.gallery-item__drag-shadow{border-color:#29abe2;background-color:#e8f5ff}.gallery-item--focussed .gallery-item--overlay{opacity:1;display:block}.gallery-item--archive .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=) 50% no-repeat}.gallery-item--audio .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--video .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--document .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==) 50% no-repeat}.gallery-item--false .gallery-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfdJREFUeNrs3TtOw0AYReGZiU3EQ0BBk44dIFEhUbAEtsAaoKajoYCKBbAQCrZBE8p0CCUmTuIkxknEAmwpd7D+cyTLlfP4NB6PpTx8WZaOdCVNDur3+8fV7rXartvwJtM0dUmS3PV6vefYryU0PO69Ldh/ee+fBoPBbevAq9F9U+3O2ng6/wf0JiP8tM1zaGz04AwWE90keEx0s+Cx0E2Dx0A3D65GB1yMDrgYHXAxOuBidMDF6ICL0QEXowMuRgdcjA64GB1wMTrgYnTAxeiJBZxsPHGjfLiNh36q+0kAE+DdtONG46XL8mn012JmSjk52ncHu13AraGbu2jGRje5SomJbnZZGAvd9Do8Brr5Gx81OneaYnTAxeiAi9EBF6MDLkYHXIwOuBgdcDE64GJ0wMXogIvRARejAy5GT+Brjs4IbwE64OIABxxwAhxwAhxwAhxwwAlwwAlwwAlwwAEnwAEnwAEnwAEHnAAHnAAHnAAHHHACHHACHHACvGXg31m+A9umyWy+ffB8WqRL/rh63awQgBeLZfgajsEuFquzvfZxjb6JvPpZ6Pli6Q73ui4Ee5eBfFa40c/ENTnTa4N75z4381ex3mzns61PKVcX5y/VE30wgzvXCf5Rsizspp3L4P2b5ZHdCeG+GnwPtY8sWXFI+xVgAB+AqE72La37AAAAAElFTkSuQmCC) 50% no-repeat}.gallery-item__upload-progress{height:18px;width:75%;position:absolute;top:calc(50% - 20px);left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:10px;overflow:hidden;background-color:#aebace}.gallery-item__upload-progress+.gallery-item__title .gallery-item__checkbox-label:before{color:#43536d}.gallery-item__progress-bar{height:100%;background:#29abe2;width:0}.gallery-item--draft,.gallery-item--modified{position:absolute;top:.76925rem;left:.76925rem;display:block;width:8px;height:8px;border:1px solid #cf3f00;-webkit-box-shadow:0 0 1px .5px #fff;box-shadow:0 0 1px .5px #fff;border-radius:100%;z-index:1}.gallery-item--draft:hover:after,.gallery-item--modified:hover:after{top:-4px;font-size:.75rem;font-weight:200;position:absolute;color:#fff;margin-left:.9231rem}.gallery-item--draft{background-color:#cf3f00}.gallery-item--draft:hover:after{content:"DRAFT"}.gallery-item--modified{background-color:#fff7f0}.gallery-item--modified:hover:after{content:"MODIFIED"}.gallery-item--max-selected{opacity:.2}.gallery-item--max-selected .gallery-item__checkbox-label,.gallery-item--max-selected .gallery-item__checkbox-label:before{cursor:not-allowed}.gallery-item--dragging{opacity:.2}.gallery-item--dragging.gallery-item{cursor:-webkit-grabbing;cursor:grabbing}.gallery-item__drag-layer-item .gallery-item--dragging{opacity:1}.gallery-item__drag-layer{position:fixed;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:100}.gallery-item__drag-layer-preview{-webkit-transform:scale(.4) translate(-100%,-160%);-o-transform:scale(.4) translate(-100%,-160%);transform:scale(.4) translate(-100%,-160%);border:1px solid #29abe2}.gallery-item__drag-layer-preview .gallery-item__thumbnail{-webkit-transform:scale(2.5) translate(22px,16px);-o-transform:scale(2.5) translate(22px,16px);transform:scale(2.5) translate(22px,16px)}.gallery-item__drag-layer-item{display:inline-block;position:relative;opacity:1}.gallery-item__drag-layer-item .gallery-item{border-width:2px;z-index:104;height:134px}.gallery-item__drag-layer-item .gallery-item__title{display:none}.gallery-item__drag-layer-count{top:-45%;left:25%;z-index:105}.gallery-item__badge,.gallery-item__drag-layer-count{display:inline-block;position:absolute;font-size:1rem}.gallery-item__badge{top:-.5rem;right:-.5rem;z-index:99}.gallery-item__drag-shadow{display:inline-block;position:absolute;left:0;top:0;right:0;bottom:0;-webkit-transform:translate(.75rem,-.75rem);-o-transform:translate(.75rem,-.75rem);transform:translate(.75rem,-.75rem);z-index:103;border:2px solid #29abe2;background:#fff}.gallery-item__drag-shadow.gallery-item__drag-shadow--second{-webkit-transform:translate(1.5rem,-1.5rem);-o-transform:translate(1.5rem,-1.5rem);transform:translate(1.5rem,-1.5rem);z-index:102}.bulk-actions{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;width:100%;padding:.76925rem 1.5385rem;margin:0 auto;position:absolute;height:53px;z-index:2;bottom:0;background-color:#f4f6f8;-webkit-transition:top .5s ease-in-out,-webkit-transform .5s ease-in-out;transition:top .5s ease-in-out,-webkit-transform .5s ease-in-out;-o-transition:top .5s ease-in-out,-o-transform .5s ease-in-out;transition:top .5s ease-in-out,transform .5s ease-in-out;transition:top .5s ease-in-out,transform .5s ease-in-out,-webkit-transform .5s ease-in-out,-o-transform .5s ease-in-out;-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1);min-width:160px;border-top:1px solid #dbe0e9}.bulk-actions>*{-webkit-box-flex:0;-webkit-flex:0;flex:0}.bulk-actions-enter{bottom:-53px}.bulk-actions-enter-active{bottom:0;-webkit-transition:bottom .2s ease-out;-o-transition:bottom .2s ease-out;transition:bottom .2s ease-out}.bulk-actions-leave{bottom:0}.bulk-actions-leave-active{bottom:-53px;-webkit-transition:bottom .2s ease-in-out .1s;-o-transition:bottom .2s ease-in-out .1s;transition:bottom .2s ease-in-out .1s}.bulk-actions .bulk-actions-counter{vertical-align:middle;min-width:28px;padding:6px;margin-right:8px;line-height:1.5384;color:#fff;text-align:center;background-color:#0071c4;border-radius:.23rem;font-weight:700}.bulk-actions .bulk-actions__action.ss-ui-button{line-height:1.5384;margin-bottom:0;height:32px}.bulk-actions .bulk-actions__action.ss-ui-button[class*=font-icon-]:before{font-size:20px;line-height:18px;position:relative;top:-1px;vertical-align:middle}.bulk-actions .chosen-single{border-radius:5px 0 0 5px;border:0;-webkit-filter:none;filter:none;background:none;-webkit-box-shadow:none;box-shadow:none;color:inherit}.bulk-actions .chosen-single:focus{-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.bulk-actions .chosen-single>span{text-align:left;display:inline-block;margin-right:0}.bulk-actions .chosen-single>div{position:static;display:inline-block}.bulk-actions .chosen-drop{border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);border:0}.bulk-actions .search-choice-close{display:none}.bulk-actions .chosen-results li{padding-left:22px;position:relative}.bulk-actions .chosen-results li:before{position:absolute;font-family:silverstripe;left:4px;font-size:14px;vertical-align:middle;margin-right:4px}.bulk-actions .chosen-results li:first-child::before{content:"g"}.asset-dropzone:after{position:absolute;top:0;right:-1.5385rem;bottom:0;left:-1.5385rem;background:rgba(250,251,252,.9) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSItMzU1IDIyMi41IDMxMiAzMjQuNSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAtMzU1IDIyMi41IDMxMiAzMjQuNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjMkM3RUIwIiBkPSJNLTE0Mi43LDM3NC40Yy0yLjgsMC01LjYsMC4yLTguMywwLjdjLTYuNy0yMi0yNy42LTM4LTUyLjMtMzhjLTMwLjEsMC01NC41LDIzLjktNTQuNSw1My4zDQoJYzAsMi42LDAuMiw1LjIsMC42LDcuN2MtMS40LTAuMi0yLjktMC4zLTQuNC0wLjNjLTIwLjUsMC0zNy4xLDE2LjItMzcuMSwzNi4zYzAsMjAsMTYuNiwzNi4zLDM3LjEsMzYuM2g1MS4xdi0zOC42bC0yMS41LTAuMw0KCWwzNS45LTUxLjNsMzUuOSw1MS4zbC0yMS41LDAuM3YzOC42aDM5LjFjMjcuMSwwLDQ5LjEtMjEuNSw0OS4xLTQ4Qy05My42LDM5NS45LTExNS42LDM3NC40LTE0Mi43LDM3NC40eiIvPg0KPHBhdGggZmlsbD0iIzJDN0VCMCIgZD0iTS0yNzcuMSw1MzcuNHYtMjIuOWg3LjljMS44LDAsMy4xLDAuMSw0LjEsMC4zYzEuMywwLjMsMi40LDAuOCwzLjQsMS42YzEuMiwxLDIuMSwyLjMsMi43LDMuOQ0KCWMwLjYsMS42LDAuOSwzLjQsMC45LDUuNGMwLDEuNy0wLjIsMy4zLTAuNiw0LjZzLTAuOSwyLjUtMS42LDMuM2MtMC42LDAuOS0xLjMsMS42LTIuMSwyLjFjLTAuOCwwLjUtMS43LDAuOS0yLjcsMS4xDQoJYy0xLjEsMC4zLTIuMywwLjQtMy43LDAuNGgtOC4zVjUzNy40eiBNLTI3NCw1MzQuN2g0LjljMS41LDAsMi43LTAuMSwzLjYtMC40czEuNS0wLjcsMi4xLTEuMmMwLjctMC43LDEuMy0xLjcsMS43LTIuOQ0KCWMwLjQtMS4yLDAuNi0yLjcsMC42LTQuNGMwLTIuNC0wLjQtNC4yLTEuMi01LjVjLTAuOC0xLjMtMS43LTIuMS0yLjktMi42Yy0wLjgtMC4zLTIuMS0wLjUtMy45LTAuNWgtNC44djE3LjVILTI3NHogTS0yNTUuNCw1MzcuNA0KCXYtMTYuNmgyLjV2Mi41YzAuNi0xLjIsMS4yLTIsMS44LTIuM3MxLjEtMC42LDEuOC0wLjZjMC45LDAsMS45LDAuMywyLjksMC45bC0xLDIuNmMtMC43LTAuNC0xLjQtMC42LTIuMS0wLjYNCgljLTAuNiwwLTEuMiwwLjItMS43LDAuNmMtMC41LDAuNC0wLjgsMC45LTEsMS41Yy0wLjMsMS0wLjUsMi4xLTAuNSwzLjN2OC43TC0yNTUuNCw1MzcuNEwtMjU1LjQsNTM3LjR6IE0tMjM0LjQsNTM1LjQNCgljLTEsMC45LTIsMS41LTMsMS45cy0yLDAuNS0zLjEsMC41Yy0xLjgsMC0zLjItMC40LTQuMi0xLjNjLTEtMC45LTEuNS0yLTEuNS0zLjRjMC0wLjgsMC4yLTEuNiwwLjYtMi4yYzAuNC0wLjcsMC45LTEuMiwxLjUtMS42DQoJYzAuNi0wLjQsMS4zLTAuNywyLTAuOWMwLjYtMC4xLDEuNC0wLjMsMi41LTAuNGMyLjMtMC4zLDMuOS0wLjYsNS0xYzAtMC40LDAtMC42LDAtMC43YzAtMS4xLTAuMy0yLTAuOC0yLjRjLTAuNy0wLjYtMS44LTEtMy4yLTENCgljLTEuMywwLTIuMywwLjItMi45LDAuN2MtMC42LDAuNS0xLjEsMS4zLTEuNCwyLjVsLTIuOC0wLjRjMC4yLTEuMiwwLjctMi4xLDEuMi0yLjljMC42LTAuNywxLjQtMS4zLDIuNS0xLjdzMi4zLTAuNiwzLjgtMC42DQoJYzEuNCwwLDIuNiwwLjIsMy41LDAuNXMxLjUsMC44LDIsMS4zYzAuNCwwLjUsMC43LDEuMSwwLjksMS45YzAuMSwwLjUsMC4xLDEuMywwLjEsMi42djMuOGMwLDIuNiwwLjEsNC4zLDAuMiw1DQoJYzAuMSwwLjcsMC40LDEuNCwwLjcsMmgtMi45Qy0yMzQuMSw1MzYuOS0yMzQuMyw1MzYuMi0yMzQuNCw1MzUuNHogTS0yMzQuNiw1MjkuMWMtMSwwLjQtMi42LDAuOC00LjYsMS4xYy0xLjIsMC4yLTIsMC40LTIuNSwwLjYNCgljLTAuNSwwLjItMC44LDAuNS0xLjEsMC45cy0wLjQsMC44LTAuNCwxLjNjMCwwLjgsMC4zLDEuNCwwLjksMS45YzAuNiwwLjUsMS40LDAuOCwyLjUsMC44czItMC4yLDIuOS0wLjdjMC44LTAuNSwxLjUtMS4xLDEuOS0xLjkNCgljMC4zLTAuNiwwLjUtMS42LDAuNS0yLjhMLTIzNC42LDUyOS4xTC0yMzQuNiw1MjkuMXogTS0yMjguNCw1MzguOGwyLjcsMC40YzAuMSwwLjgsMC40LDEuNSwxLDEuOGMwLjcsMC41LDEuNywwLjgsMi45LDAuOA0KCWMxLjMsMCwyLjMtMC4zLDMtMC44czEuMi0xLjIsMS40LTIuMmMwLjEtMC42LDAuMi0xLjgsMC4yLTMuNmMtMS4yLDEuNC0yLjgsMi4yLTQuNiwyLjJjLTIuMywwLTQtMC44LTUuMy0yLjUNCgljLTEuMi0xLjYtMS45LTMuNi0xLjktNS45YzAtMS42LDAuMy0zLDAuOS00LjRjMC42LTEuMywxLjQtMi40LDIuNS0zLjFjMS4xLTAuNywyLjQtMS4xLDMuOC0xLjFjMiwwLDMuNiwwLjgsNC44LDIuNHYtMmgyLjZ2MTQuMw0KCWMwLDIuNi0wLjMsNC40LTAuOCw1LjVzLTEuNCwxLjktMi41LDIuNnMtMi41LDAuOS00LjIsMC45Yy0yLDAtMy42LTAuNC00LjgtMS4zUy0yMjguNCw1NDAuNi0yMjguNCw1MzguOHogTS0yMjYsNTI4LjgNCgljMCwyLjIsMC40LDMuOCwxLjMsNC44YzAuOSwxLDEuOSwxLjUsMy4yLDEuNXMyLjQtMC41LDMuMi0xLjVjMC45LTEsMS4zLTIuNiwxLjMtNC43YzAtMi0wLjUtMy42LTEuNC00LjZzLTItMS41LTMuMy0xLjUNCgljLTEuMiwwLTIuMywwLjUtMy4yLDEuNVMtMjI2LDUyNi44LTIyNiw1MjguOHogTS0xODksNTM0LjdjLTAuOSwxLTEuOSwxLjgtMywyLjNzLTIuMywwLjgtMy41LDAuOGMtMi4zLDAtNC4yLTAuOC01LjYtMi40DQoJYy0xLjEtMS4zLTEuNy0yLjctMS43LTQuM2MwLTEuNCwwLjUtMi43LDEuNC0zLjhzMi4zLTIuMSw0LjEtM2MtMS0xLjItMS43LTIuMi0yLjEtMi45Yy0wLjMtMC43LTAuNS0xLjUtMC41LTIuMQ0KCWMwLTEuNCwwLjUtMi42LDEuNi0zLjZzMi40LTEuNSw0LjEtMS41YzEuNiwwLDIuOCwwLjUsMy44LDEuNGMxLDEsMS41LDIuMSwxLjUsMy41YzAsMi4yLTEuNCw0LTQuMyw1LjZsNC4xLDUuMg0KCWMwLjUtMC45LDAuOC0yLDEuMS0zLjJsMi45LDAuNmMtMC41LDItMS4yLDMuNi0yLDQuOWMxLjEsMS40LDIuMiwyLjYsMy42LDMuNWwtMS45LDIuMkMtMTg2LjYsNTM3LjItMTg3LjgsNTM2LjItMTg5LDUzNC43eg0KCSBNLTE5MC43LDUzMi41bC01LjItNi40Yy0xLjUsMC45LTIuNSwxLjctMy4xLDIuNWMtMC41LDAuOC0wLjgsMS41LTAuOCwyLjNjMCwwLjksMC40LDEuOSwxLjEsMi45YzAuNywxLDEuOCwxLjUsMy4xLDEuNQ0KCWMwLjgsMCwxLjctMC4zLDIuNi0wLjhDLTE5Miw1MzQtMTkxLjMsNTMzLjMtMTkwLjcsNTMyLjV6IE0tMTk0LjcsNTIyLjhjMS4yLTAuNywyLTEuMywyLjQtMS45YzAuNC0wLjUsMC41LTEuMSwwLjUtMS44DQoJYzAtMC44LTAuMi0xLjQtMC43LTEuOXMtMS4xLTAuNy0xLjktMC43Yy0wLjgsMC0xLjQsMC4yLTEuOSwwLjdzLTAuOCwxLjEtMC44LDEuOGMwLDAuNCwwLjEsMC43LDAuMywxLjFjMC4yLDAuNCwwLjUsMC44LDAuOCwxLjINCglMLTE5NC43LDUyMi44eiBNLTE2Miw1MzcuNHYtMi4xYy0xLjEsMS42LTIuNiwyLjUtNC42LDIuNWMtMS4zLDAtMi41LTAuNC0zLjYtMS4xcy0yLTEuNy0yLjYtMy4xYy0wLjYtMS4zLTAuOS0yLjgtMC45LTQuNQ0KCXMwLjMtMy4yLDAuOC00LjVjMC42LTEuMywxLjQtMi40LDIuNS0zLjFjMS4xLTAuNywyLjMtMS4xLDMuNy0xLjFjMSwwLDEuOSwwLjIsMi43LDAuNnMxLjQsMSwxLjksMS42di04LjJoMi44djIyLjlMLTE2Miw1MzcuNA0KCUwtMTYyLDUzNy40eiBNLTE3MC45LDUyOS4yYzAsMi4xLDAuNCwzLjcsMS4zLDQuOGMwLjksMS4xLDIsMS42LDMuMiwxLjZzMi4zLTAuNSwzLjEtMS41YzAuOS0xLDEuMy0yLjUsMS4zLTQuNg0KCWMwLTIuMy0wLjQtMy45LTEuMy01cy0yLTEuNi0zLjItMS42cy0yLjMsMC41LTMuMSwxLjVDLTE3MC40LDUyNS4zLTE3MC45LDUyNy0xNzAuOSw1MjkuMnogTS0xNTUuNCw1MzcuNHYtMTYuNmgyLjV2Mi41DQoJYzAuNi0xLjIsMS4yLTIsMS44LTIuM3MxLjEtMC42LDEuOC0wLjZjMC45LDAsMS45LDAuMywyLjksMC45bC0xLDIuNmMtMC43LTAuNC0xLjQtMC42LTIuMS0wLjZjLTAuNiwwLTEuMiwwLjItMS43LDAuNg0KCWMtMC41LDAuNC0wLjgsMC45LTEsMS41Yy0wLjMsMS0wLjUsMi4xLTAuNSwzLjN2OC43TC0xNTUuNCw1MzcuNEwtMTU1LjQsNTM3LjR6IE0tMTQ2LjIsNTI5LjFjMC0zLjEsMC45LTUuMywyLjYtNi44DQoJYzEuNC0xLjIsMy4yLTEuOCw1LjItMS44YzIuMywwLDQuMSwwLjcsNS42LDIuMmMxLjQsMS41LDIuMiwzLjYsMi4yLDYuMmMwLDIuMS0wLjMsMy44LTEsNWMtMC42LDEuMi0xLjYsMi4yLTIuOCwyLjlzLTIuNiwxLTQsMQ0KCWMtMi4zLDAtNC4yLTAuNy01LjYtMi4yQy0xNDUuNSw1MzQuMS0xNDYuMiw1MzEuOS0xNDYuMiw1MjkuMXogTS0xNDMuMyw1MjkuMWMwLDIuMSwwLjUsMy43LDEuNCw0LjhzMi4xLDEuNiwzLjUsMS42DQoJczIuNi0wLjUsMy41LTEuNnMxLjQtMi43LDEuNC00LjljMC0yLjEtMC41LTMuNi0xLjQtNC43Yy0wLjktMS4xLTIuMS0xLjYtMy41LTEuNnMtMi42LDAuNS0zLjUsMS42DQoJQy0xNDIuOSw1MjUuNC0xNDMuMyw1MjctMTQzLjMsNTI5LjF6IE0tMTI3LjgsNTQzLjh2LTIzaDIuNnYyLjJjMC42LTAuOCwxLjMtMS41LDItMS45YzAuOC0wLjQsMS43LTAuNiwyLjgtMC42DQoJYzEuNCwwLDIuNywwLjQsMy44LDEuMWMxLjEsMC43LDEuOSwxLjgsMi41LDMuMXMwLjgsMi44LDAuOCw0LjRjMCwxLjctMC4zLDMuMi0wLjksNC42cy0xLjUsMi40LTIuNywzLjFjLTEuMiwwLjctMi40LDEuMS0zLjcsMS4xDQoJYy0wLjksMC0xLjgtMC4yLTIuNS0wLjZjLTAuNy0wLjQtMS40LTAuOS0xLjgtMS41djguMUwtMTI3LjgsNTQzLjhMLTEyNy44LDU0My44eiBNLTEyNS4zLDUyOS4yYzAsMi4xLDAuNCwzLjcsMS4zLDQuNw0KCXMxLjksMS41LDMuMSwxLjVzMi4zLTAuNSwzLjItMS42YzAuOS0xLjEsMS4zLTIuNywxLjMtNC45YzAtMi4xLTAuNC0zLjctMS4zLTQuOHMtMS45LTEuNi0zLjEtMS42cy0yLjMsMC42LTMuMiwxLjcNCglDLTEyNC44LDUyNS41LTEyNS4zLDUyNy4xLTEyNS4zLDUyOS4yeiIvPg0KPHBhdGggZmlsbD0iIzJDN0VCMCIgZD0iTS0xNzIuNSwyNDEuNWwtMi44LTE2LjFsLTU2LjUsOS45bDguMyw0Ny4ybDUuNi0wLjl2NC4xaDU3LjR2LTQ0LjFoLTEyVjI0MS41eiBNLTIxNy45LDI3Ni44bC0xLjgsMC4zDQoJbC02LjctMzguMWw0Ny40LTguNGwxLjksMTAuOGgtNDAuN3YzNS40SC0yMTcuOXogTS0xNjUuMiwyODAuOWgtNDguMXYtMzQuOGg0OC4xVjI4MC45eiBNLTIxMC4xLDI0OS4yVjI3NWw5LjgtNi41bDYsMy44bDE0LjctMTYuMQ0KCWwxLjksMC44bDkuNSwxMXYtMTguN0wtMjEwLjEsMjQ5LjJMLTIxMC4xLDI0OS4yeiBNLTIwMC44LDI2MC40Yy0yLjIsMC00LjEtMS45LTQuMS00LjFjMC0yLjIsMS45LTQuMSw0LjEtNC4xDQoJYzIuMiwwLDQuMSwxLjksNC4xLDQuMUMtMTk2LjcsMjU4LjUtMTk4LjYsMjYwLjQtMjAwLjgsMjYwLjR6Ii8+DQo8cGF0aCBmaWxsPSIjMkM3RUIwIiBkPSJNLTMzMS41LDI3Ny44djM1LjRjLTItMC45LTQuNi0xLjEtNy4xLTAuNmMtNS40LDEuMi05LjEsNS42LTguMyw5LjhjMC43LDMuNCw0LjMsNS45LDguNyw1LjkNCgljMC45LDAsMS44LTAuMSwyLjctMC4zYzQuNy0xLDguMi00LjUsOC40LTguM3YtMzMuMWwyNi4xLTMuOXYyNS44Yy0yLTAuOS00LjYtMS4xLTcuMS0wLjZjLTUuNCwxLjItOS4xLDUuNi04LjMsOS44DQoJYzAuNywzLjQsNC4zLDUuOSw4LjcsNS45bDAsMGMwLjksMCwxLjgtMC4xLDIuNy0wLjNjNC43LTEsOC4yLTQuNSw4LjQtOC4zdi00Mi4xTC0zMzEuNSwyNzcuOHoiLz4NCjxwYXRoIGZpbGw9IiMyQzdFQjAiIGQ9Ik0tNTIuNywzMTkuM3YtNi43aDYuN3YtNy41aC02Ljd2LTYuN2g2Ljd2LTYuN2gtNi43di03LjVoNi43di02LjdoLTY1LjF2Ni43aDYuN3Y3LjVoLTYuN3Y2LjdoNi43djYuN2gtNi43DQoJdjcuNWg2Ljd2Ni43aC02Ljd2Ni43SC00NnYtNi43SC01Mi43eiBNLTgyLjgsMzA5LjF2LTEzLjlsMTIuMSw3TC04Mi44LDMwOS4xeiIvPg0KPC9zdmc+DQo=) 50% no-repeat;-webkit-background-size:312px 325px;background-size:312px 325px;z-index:100}.asset-dropzone.dragging:after{content:""}.asset-dropzone--button{position:static}.uploadfield__dropzone{position:relative;left:0;top:0;right:auto;bottom:auto;margin:0 0 10px;border:2px dashed #c1cad9;border-radius:5px;padding:0;background:#fff;height:78px}.uploadfield__dropzone:after{left:0;top:0;right:0;bottom:0;-webkit-box-shadow:inset 0 0 10px 0 rgba(0,0,0,.2);box-shadow:inset 0 0 10px 0 rgba(0,0,0,.2);background-image:none;background:rgba(0,0,0,.03)}.uploadfield__dropzone--hidden{display:none}.uploadfield__backdrop{position:absolute;left:0;top:0;right:0;bottom:0;cursor:pointer}.uploadfield__join:after,.uploadfield__join:before{content:" ";display:inline}.uploadfield__add-button,.uploadfield__upload-button{border:0;margin:0;padding:0;background:none;text-decoration:none;color:#0071c4}.uploadfield__add-button:hover,.uploadfield__upload-button:hover{color:#0062ab;text-decoration:underline}.uploadfield__droptext{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:inline-block;text-align:center}.uploadfield__droptext a,.uploadfield__droptext button{cursor:pointer}.uploadfield__droptext:before{font-family:silverstripe,sans-serif;content:"v";font-size:1.7em;padding-right:20px;vertical-align:middle}.uploadfield-item{position:relative;margin:0;background-color:#fff;border:1px solid;border-color:#ced5e1;border-bottom-width:0;width:auto;-webkit-transition:-webkit-box-shadow .3s;transition:-webkit-box-shadow .3s;-o-transition:box-shadow .3s;transition:box-shadow .3s;transition:box-shadow .3s,-webkit-box-shadow .3s;height:61px}.uploadfield-item:first-child{border-top-left-radius:.192rem;border-top-right-radius:.192rem}.uploadfield-item:last-child{border-bottom-width:1px;height:62px;border-bottom-left-radius:.192rem;border-bottom-right-radius:.192rem}.uploadfield-item:not(.uploadfield-item--error):not(.uploadfield-item--folder):hover .uploadfield-item--overlay{opacity:1;display:block}.uploadfield__dropzone+.uploadfield-item{border-top-left-radius:.192rem;border-top-right-radius:.192rem}.uploadfield-item--folder .uploadfield-item__thumbnail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpi1Jhy/D8D6cDxRo7lAQYaACYy9Tkw0AiQ6yD7weYgB83VjwRo4SBGoMH/GQYRYGIYZGDUQaMOGnXQqINGHTTqoFEHjTpo1EGjDhp10KiDRh006qDB7SCAAAMAe8YKeWd2MukAAAAASUVORK5CYII=) 12px 14px no-repeat;-webkit-background-size:27px 24px;background-size:27px 24px}.uploadfield-item__thumbnail{height:60px;width:60px;margin:0;background-repeat:no-repeat;background-position:50%;-webkit-background-size:cover;background-size:cover;border-radius:.192rem .192rem 0 0}.uploadfield-item__thumbnail--small{-webkit-background-size:auto auto;background-size:auto;background-color:#fff}.uploadfield-item__details{padding:11px 0 11px 12px;height:100%;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:50px;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.uploadfield-item__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploadfield-item__meta{font-size:.846rem;text-transform:uppercase}.uploadfield-item__specs{color:#566b8d}.uploadfield-item__remove-btn{margin:0}.uploadfield-item--archive .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=) 50% no-repeat}.uploadfield-item--audio .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--video .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--document .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==) 50% no-repeat}.uploadfield-item--false .uploadfield-item__thumbnail{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAfdJREFUeNrs3TtOw0AYReGZiU3EQ0BBk44dIFEhUbAEtsAaoKajoYCKBbAQCrZBE8p0CCUmTuIkxknEAmwpd7D+cyTLlfP4NB6PpTx8WZaOdCVNDur3+8fV7rXartvwJtM0dUmS3PV6vefYryU0PO69Ldh/ee+fBoPBbevAq9F9U+3O2ng6/wf0JiP8tM1zaGz04AwWE90keEx0s+Cx0E2Dx0A3D65GB1yMDrgYHXAxOuBidMDF6ICL0QEXowMuRgdcjA64GB1wMTrgYnTAxeiJBZxsPHGjfLiNh36q+0kAE+DdtONG46XL8mn012JmSjk52ncHu13AraGbu2jGRje5SomJbnZZGAvd9Do8Brr5Gx81OneaYnTAxeiAi9EBF6MDLkYHXIwOuBgdcDE64GJ0wMXogIvRARejAy5GT+Brjs4IbwE64OIABxxwAhxwAhxwAhxwwAlwwAlwwAlwwAEnwAEnwAEnwAEHnAAHnAAHnAAHHHACHHACHHACvGXg31m+A9umyWy+ffB8WqRL/rh63awQgBeLZfgajsEuFquzvfZxjb6JvPpZ6Pli6Q73ui4Ee5eBfFa40c/ENTnTa4N75z4381ex3mzns61PKVcX5y/VE30wgzvXCf5Rsizspp3L4P2b5ZHdCeG+GnwPtY8sWXFI+xVgAB+AqE72La37AAAAAElFTkSuQmCC) 50% no-repeat}.uploadfield-item__upload-progress{height:16px;margin:22px 5px;width:30%;border-radius:10px;overflow:hidden}.uploadfield-item__upload-progress+.uploadfield-item__title .uploadfield-item__checkbox-label:before{color:#43536d}.uploadfield-item__progress-bar{height:100%;background:#29abe2;width:0}.uploadfield-item__error-message{line-height:28px;height:28px;margin:16px 5px;padding:0 10px;color:#fff;background:#d40404;border-radius:14px;max-width:25%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.uploadfield-item__complete-icon{line-height:38px;padding:11px 5px}.uploadfield-item__complete-icon:after{color:#3fa142;font-size:30px;display:inline;font-family:silverstripe,sans-serif;content:"I"}.uploadfield-item__status{margin:0 .6154rem;color:#cf3f00;background-color:#fff7f0;text-transform:uppercase}.preview-image-field__container{position:relative}.preview-image-field__toolbar{position:absolute;top:50%;right:0;-webkit-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:auto;max-height:100%;border-bottom-left-radius:.23rem;border-top-left-radius:.23rem;overflow:hidden}.preview-image-field__toolbar-button--link:before{content:"="}.preview-image-field__toolbar-button--replace:before{content:"b"}.preview-image-field__toolbar-button{padding:11px 0;height:47px;width:47px;overflow:hidden;background:#000;opacity:.55;color:#fff;border:0}.preview-image-field__toolbar-button:active,.preview-image-field__toolbar-button:focus,.preview-image-field__toolbar-button:hover{color:#b3b3b3;text-decoration:none}.preview-image-field__toolbar-button:before{padding:0 11px;font-family:silverstripe;font-style:normal;speak:none;line-height:1;font-size:25px;height:25px;width:25px;vertical-align:middle}.preview-image-field__progress{height:18px;width:75%;position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border-radius:10px;overflow:hidden;background:#e6e6e6}.preview-image-field__progress-bar{height:100%;background:#29abe2;width:0}.preview-image-field__message{position:absolute;bottom:0;left:0;right:0;padding:1.5385rem}@media (min-width:992px){.preview-image-field__message{display:-webkit-box;display:-webkit-flex;display:flex}}.preview-image-field__message-button{margin-left:.76925rem}.preview-image-field__message--error{color:#fff;background:#d40404}.preview-image-field__message--success{color:#fff;background:#3fa142}.insert-embed-modal .modal-content{height:auto;max-height:100%}.insert-embed-modal .modal-body{display:-webkit-box;display:-webkit-flex;display:flex;-ms-grid-column-align:stretch;justify-items:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.insert-embed-modal--edit{width:100%}@media (min-width:768px){.insert-embed-modal--edit .btn-toolbar{margin-left:30%}}.insert-embed-modal--create{-webkit-box-flex:1;-webkit-flex:1;flex:1;width:100%}.alert+.insert-embed-modal--create{padding-top:0}.insert-embed-modal__url-create .form-control.text{padding:.75rem 1.25rem;font-size:1.231rem;line-height:1.33333;border-radius:.5rem}@media (min-width:768px){.insert-embed-modal__fields--fill-width{width:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.insert-embed-modal__preview-container{padding-bottom:1.2308rem}@media (min-width:768px){.insert-embed-modal__preview-container{-webkit-box-ordinal-group:3;-webkit-order:2;order:2;padding-left:1.2308rem;width:30%}}.insert-embed-modal__preview{display:block;max-width:100%;margin:0 auto;max-height:198px}.insert-embed-modal__placement .form__field-holder>div{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-ms-grid-column-align:stretch;justify-items:stretch}.insert-embed-modal__placement .form-check{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin-bottom:0;padding-left:0}.insert-embed-modal__placement .form-check:first-of-type .form-check-label span:before{border-top-left-radius:.23rem;border-bottom-left-radius:.23rem}.insert-embed-modal__placement .form-check:last-of-type .form-check-label span:before{border-top-right-radius:.23rem;border-bottom-right-radius:.23rem}.insert-embed-modal__placement .form-check-label{display:block;cursor:pointer}.insert-embed-modal__placement .form-check-label span{display:block;color:rgba(67,83,109,0);font-size:.9rem;letter-spacing:1px;text-align:center;text-transform:uppercase;-webkit-transition:color .1s ease-out;-o-transition:color .1s ease-out;transition:color .1s ease-out}.insert-embed-modal__placement .form-check-label span:before{content:" ";display:block;-webkit-box-sizing:content-box;box-sizing:content-box;height:36px;padding:5px 0;border:1px solid #dbe0e9;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAFoCAYAAAAl0bm1AAAACXBIWXMAAAsSAAALEgHS3X78AAAB7klEQVR42u3cwW3CQBBAURu5DRqgHoqgAAqgAAqgCOqhAQox173YAuPdsTVvblFE9JV9WmmiVfpxHLstz6Hb+Gw+cCi/OD3fq57363zsHbFAgQIFChQoUKDAf6a3k9hJAqbcZRhkkEEGGWRQoECB7e7B2/2x6p1zu178jVqgQIECBQoUKFDgX2MvtpNETLnLMMgggwwyyKBAgQLb3YNzE/XG2hELFChQoECBAgXmDrQX59pJvB9kkEEGGWSQQYECc9+DcxP1xtoRCxQoUKBAgQIF5g60F+faSbwfZJBBBhlkkEGBAnPfg0un5htrRyxQoECBAgUKFJg70F6cayfxfpBBBhlkkEEGBQrMfQ8unZpvrB2xQIECBQoUKFBg7kB7ca6dxPtBBhlkkEEGGRQoMPc9WPM99C8/u/zc0Oo38e0/yGawqsGawyCDDDLIIIMM7tOgvdhOEjEMMsgggwwyKFCgwJh7sOZ76F9+dvm5ZkvTt/8gm8Hd7sUMMsgggwwyyOA+DdqL7SQRwyCDDDLIIIMCBQqMuQeXvm2p+f56mPqGI2awEQcGGWSQQQYZZDDWoL2YwYjxfpBBBhlkkEGBAgXG3INL37bUfH89TH3DETPYiAODDDLIIIMMMhhr0F7MYMR4P8gggwwyyKDA7cwHteyC9AjuZNIAAAAASUVORK5CYII=) top no-repeat content-box;-webkit-transition:background-color .1s ease-out;-o-transition:background-color .1s ease-out;transition:background-color .1s ease-out}.insert-embed-modal__placement .form-check-label:focus span,.insert-embed-modal__placement .form-check-label:hover span{color:#43536d}.insert-embed-modal__placement .form-check-input{position:absolute;left:-9999px}.insert-embed-modal__placement .form-check-input.checked+span{color:#29abe2}.insert-embed-modal__placement .form-check-input.checked+span:before{border:1px solid #29abe2;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAFoCAYAAAAl0bm1AAAACXBIWXMAAAsSAAALEgHS3X78AAAB7klEQVR42u3cwW3CQBBAURu5DRqgHoqgAAqgAAqgCOqhAQox173YAuPdsTVvblFE9JV9WmmiVfpxHLstz6Hb+Gw+cCi/OD3fq57363zsHbFAgQIFChQoUKDAf6a3k9hJAqbcZRhkkEEGGWRQoECB7e7B2/2x6p1zu178jVqgQIECBQoUKFDgX2MvtpNETLnLMMgggwwyyKBAgQLb3YNzE/XG2hELFChQoECBAgXmDrQX59pJvB9kkEEGGWSQQYECc9+DcxP1xtoRCxQoUKBAgQIF5g60F+faSbwfZJBBBhlkkEGBAnPfg0un5htrRyxQoECBAgUKFJg70F6cayfxfpBBBhlkkEEGBQrMfQ8unZpvrB2xQIECBQoUKFBg7kB7ca6dxPtBBhlkkEEGGRQoMPc9WPM99C8/u/zc0Oo38e0/yGawqsGawyCDDDLIIIMM7tOgvdhOEjEMMsgggwwyKFCgwJh7sOZ76F9+dvm5ZkvTt/8gm8Hd7sUMMsgggwwyyOA+DdqL7SQRwyCDDDLIIIMCBQqMuQeXvm2p+f56mPqGI2awEQcGGWSQQQYZZDDWoL2YwYjxfpBBBhlkkEGBAgXG3INL37bUfH89TH3DETPYiAODDDLIIIMMMhhr0F7MYMR4P8gggwwyyKDA7cwHteyC9AjuZNIAAAAASUVORK5CYII=) top no-repeat content-box,#e8f5ff padding-box}.insert-embed-modal__placement .form-check .option-val--leftAlone+span:before{background-position-y:-36px}.insert-embed-modal__placement .form-check .option-val--leftAlone.checked+span:before{background-position-y:0}.insert-embed-modal__placement .form-check .option-val--center+span:before{background-position-y:-108px}.insert-embed-modal__placement .form-check .option-val--center.checked+span:before{background-position-y:-72px}.insert-embed-modal__placement .form-check .option-val--rightAlone+span:before{background-position-y:-180px}.insert-embed-modal__placement .form-check .option-val--rightAlone.checked+span:before{background-position-y:-144px}.insert-embed-modal__placement .form-check .option-val--left+span:before{background-position-y:-252px}.insert-embed-modal__placement .form-check .option-val--left.checked+span:before{background-position-y:-216px}.insert-embed-modal__placement .form-check .option-val--right+span:before{background-position-y:-324px}.insert-embed-modal__placement .form-check .option-val--right.checked+span:before{background-position-y:-288px}.gallery,.gallery__main,.gallery__outer{position:relative}.gallery__main{height:100%}@media (max-width:991.98px){.gallery__main.gallery__main--has-opened-item{display:none}}.gallery__no-item-notice{text-align:center;font-size:1.231rem;margin-top:1.2308rem}.gallery__back{position:relative}.gallery__back.ss-ui-button:before{font-size:23px}.gallery__back .gallery__back-badge{display:inline-block;position:absolute;font-size:1rem;top:-.5rem;right:-1rem}.gallery__back--droppable-hover{background-color:#ebeef2;border-color:transparent;-webkit-transform:scale(1.3);-o-transform:scale(1.3);transform:scale(1.3);border:1px solid #29abe2}.gallery__main--selectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:-1.5385rem;padding:1.5385rem}.gallery__back-container{display:inline-block}.gallery__back-container .gallery-item__droppable{margin:0}.gallery__files,.gallery__folders{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-flow:row wrap;flex-flow:row wrap}@media (max-width:991.98px){.gallery__files{margin-bottom:53px}}.gallery__load{width:100%;display:inline-block}.gallery__load-more{display:block;color:#fff;cursor:pointer;margin:8px auto 24px;padding:4px;width:200px;font-size:16px;height:44px;background-color:#29abe2;border:0;border-radius:4px}.gallery__sort{display:inline-block;vertical-align:middle;padding:.3846rem .7692rem}@media (max-width:767.98px){.gallery__sort .chosen-container{width:auto!important}}.gallery__sort .chosen-container-active .chosen-single{outline:1px dotted #29abe2;outline:5px auto -webkit-focus-ring-color}.gallery .gallery__sort .chosen-single{border:0;-webkit-filter:none;filter:none;background:none;-webkit-box-shadow:none;box-shadow:none;color:inherit;margin-top:-1px}.gallery__sort .chosen-single:focus{-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.gallery__sort .chosen-single>span{text-align:right;color:inherit}@media (max-width:767.98px){.gallery__sort .chosen-single>span{font-size:0}.gallery__sort .chosen-single>span:after{content:"\E003";font-size:1.231rem;font-family:silverstripe;color:#566b8d}}.gallery__sort .chosen-single>span:before{content:"Sort by "}.gallery__sort .chosen-drop{min-width:160px;right:0;border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);border:0}.gallery__sort .active-result{text-transform:capitalize}.gallery__error{display:table;width:100%;height:100%}.gallery__error-message{display:table-cell;vertical-align:middle;text-align:center}.gallery__view-change-button .icon:before{vertical-align:middle}@media (min-width:544px){.gallery__state-buttons{margin-right:-.7693rem}}.gallery__state-buttons .btn-group:last-child{margin-right:0}.gallery__view-change-button{margin-right:-.76925rem}.griddle-footer>div{display:-webkit-box;display:-webkit-flex;display:flex}.griddle-page{-webkit-box-flex:1;-webkit-flex:1;flex:1;text-align:center;margin-top:-3px}.griddle-page select{height:2.7692rem;padding:.3846rem .7692rem;line-height:1.5384;color:#566b8d;border:1px solid #ced5e1;background-color:#fff;background-image:none;text-align:center;display:inline}.griddle-page select:focus{color:#566b8d;background-color:#fff;border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),rgba(102,175,233,.6)}.griddle-footer{width:200px;margin:0 auto}.griddle-next,.griddle-previous{width:36px}.griddle-next button,.griddle-previous button{white-space:nowrap;border:0;background:transparent;width:36px;height:30px;position:relative;border-radius:.23rem;overflow:hidden}.griddle-next button:hover,.griddle-previous button:hover{background-color:#ced5e1;border-color:transparent}.griddle-next button:hover:before,.griddle-previous button:hover:before{background-color:#ced5e1}.griddle-next button:before,.griddle-previous button:before{font-family:silverstripe;color:#566b8d;width:36px;height:30px;background-color:#fafbfc;position:absolute;top:0;left:0;padding:.3846rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;font-size:1.231rem;-webkit-font-smoothing:antialiased;line-height:1.5384}.griddle-previous button:before{content:"'"}.griddle-next button:before{content:"&"}.gallery__search-message-clear{padding-left:.6154rem}.gallery__table{margin-bottom:-1.5385rem}.gallery__table td,.gallery__table th{word-wrap:break-word}.gallery__table td{word-break:break-all}.gallery__table td.gallery__table-column-image{padding:0}.gallery__table th{cursor:pointer}.gallery__table th>span{display:inline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gallery__table th>span:after{color:#8f9fba;content:")";display:inline-block;font-family:silverstripe;margin-left:4px}.gallery__table tbody td{padding-top:1.8462rem;padding-bottom:1.8462rem}@media (max-width:767.98px){.gallery__table tbody td:nth-child(n+4){display:none}}.gallery__table thead td,.gallery__table thead th{height:52px}.gallery__table thead th:hover{background-color:#f4f6f8}@media (max-width:767.98px){.gallery__table thead th:nth-child(n+4){display:none}}.gallery__table .sort-ascending,.gallery__table .sort-descending{border-bottom:1px solid #29abe2}.gallery__table .sort-ascending>span:after,.gallery__table .sort-descending>span:after{color:#29abe2}.gallery__table .sort-descending>span:after{content:"*"}.gallery__table .sort-ascending>span:after{content:"("}.gallery__table .footer-container,.gallery__table .footer-container:hover{background-color:#fafbfc;border-bottom:0}.gallery__table-row{cursor:pointer}.gallery__table-column--select{width:1%}.gallery__table-column--select input[type=checkbox]{width:14px;height:14px}.gallery__table-row--highlighted{border-color:#29abe2;background-color:#e8f5ff}.gallery__table-column--image{width:68px;max-width:68px;height:69px;text-align:center}.gallery__table .gallery__table-row>.gallery__table-column--image{padding:0;vertical-align:middle}.gallery__table .gallery__table-row>.gallery__table-column--image:first-child{max-width:none;padding-left:1.5385rem}.gallery__table-image{background-repeat:no-repeat;background-position:50%;height:68px;width:68px;-webkit-background-size:calc(68px - 1.5385rem) auto;background-size:calc(68px - 1.5385rem) auto}.gallery__table-image--image{-webkit-background-size:68px auto;background-size:68px auto}.gallery__table-image--folder{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGYAAAB6CAYAAABNyyaCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXxJREFUeNrs2q9Ow0AcwPEdXQerAY3FDBQBNbcQwCJnwE4jAD83Am+A4AHgBXgKLJLAE2D4Y3ocvAPJL/TzTbra9j69a3NZyjn3FK8lQwBGYMAIDBiBERgwAgNGYAQGjMD8l9Lo5vGy9/V5EeFi8sf7+dPZ3jWWnxkTBOX3KRk2V6PFwwJLxKVsZXiwMT6uwERbW+vBTjk1YALWPzo5BBPxi2SwPAETsaoag4k4Y/r1bvkAaMAErJ7O9sHEnDUTMDHfM9Ot+9c1MNFq2/Xy+1xwtrsIkzbvXmL+eTm35eo6ucf6Vo7TuHeeOrvxvVqOW9v+3jECA0ZgwAiMwIARGDACIzBgBAaMwIARGIEBIzBgBEZgwAgMGIEBIzACA0ZgwAiMwIARGDACA8YQgBEYMAIDRmAEBozAgBEYgQEjMGAEBozACAwYgQEjMAIDRmDACAwYgREYMALTIZi5YQjXPOWcDYOlTGDACAwYgREYMAIDRmAEBozAgNHf9S3AAJeuKdi1sikAAAAAAElFTkSuQmCC)}.gallery__table-image--archive{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArlJREFUeNrs3c9qE1EUx/F7JxmDf/APSCWbancK/kFXQi1CXkDciKCIz6ArC+6k4KKufAARBXe+QBGhDyAUF7pJoZtgF1aamEkzTeIkBdf3jp1z7/V+fxCyOZMMH2ZO7klmiJ5MJorIRduCt9vt08XTm+Jx5zB3ZOXdJ/Vta9uo9tmDlrp0fs6oNk1TVa/XnzabzVc+gCcltvl82NiVH1Var3Y6nSfBgRdH9+Pi6VqQp7In6LZH+IWg+6cH6ImKLK7RowN3jR4luEv0aMFdoUcN7gI9enBp9HqIQOsbm8ZT6b3WdRt0VfVE6g348sOWce2jlQ/GtabgUui0FOH2ArgwOuDC6IALowMujA64MDrgwuiAC6MDLozuzaT5cf2rce3F+Tkf0EtNpEGCv12+b1zb6w9UN9utYpdXgwavKo20prr9seple17sTxQ9/Oyp4+rE0QbgMaJHtUrxAT26ZaFr9CjX4S7Rox18XKFHPWm6QI9+tJdG92bwubt0uZKp1OR1p+izqVRgOAoS3OZXe9PXlULn20Lh9gK4MDrgwuiAC6MDLowOuDA64MLogAujAy6M7s2kaXPr99LVhb+ToQv0f5lIg/wR+daVBeN77atEp6UEgA64cAAHHHACOOAktHX4YLhvXLv1Y8e41uV63Wvw7Z2uce37tS/GtTaXNkfVUubPnaGHE8ABJ4CzLDTJ9Dtu35Zw/z04LYUADjgBHHACOOCAE8ABJ4ADTgAHHHACOOAEcMAJ4IADTjwB/9XLjkB2EJvLq0uDZ3t5OuZPq2cZ5gLg+Wic/Nztg52Ppmd7qW2tr7ya3vK8Pxqrk8caKkni+wjIhrnq/h6osme6FbhWavOgf+WzR9zRvcpbyu2bN14Xb/SdDq5ULdEvRZaFjbS2mGi9FvORXUuS58XB96LU1hNWHaL5I8AAi1XlrYdFnTIAAAAASUVORK5CYII=)}.gallery__table-image--audio{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABH1JREFUeNrsnE9u2kAUxp2oe7gB9AThAJVwThB6Alype8i2m7Dqtsm+UuAG9ASxpe4DNzA3ICdI50mvKYV5D57/xcbfk6wqUDz2z998881gc/H6+hqgqqsLAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMABHAXgJdanr99nO39uf//8dg/g5QLfh7Fw0KMi27gEZrXG7iLMAbx66BGAl1Nr4fVHB30A4MVXqEBfOuhdAC+w3AC5Zegbz9s9t+X281qnFFYURbM+KayMmCa0S/YRu63jefvaHUd8dsDdSYesqN7Oyx/dyaYZ90cXa9eHp25fK+X/T90/Pzxvbdzn+mdjKaRqhvO0BztgpWctgj3c2WJtIOTelPisZW+C1FzgO115UkFznRMGQoqDL57Xp1kH0MsawSbVPLvtqsJmqQctFZWnPIb4Lta0kcBJ1W4jL70ruSkpYQzZr6W6F1JL1DjgfKJxFap2aiXgt8LbM3csfSUqzgQvjxoBnE7ObTGngE6FOZvUuhAsQhsIl4KXj2oPnFWx4qTwHjUVLGLMUVRSuc+SbqyD54ccaaKb8WRvyuo1e7FxxaAO4PFFfxJ8OVa8fCKofF6awvlgn/mArdtNicqN9tqKFWuJhYw9Vrw8FdZZRmVbymNDlkaueAIlleTZI2PSCRs90yy4Joovx4JiteTh6zUdy9LtOQHfGvN3IExqrhRbWQlpJWwd8CNrH5ES9wIjQN+CV7+tliKufShxb20E7rOVVlqKtvYh2oQAUFNsCoWf5tmhwSKGRuC91gJnlScGFaZVHt+5xsKVQeFpAftuPfCtsUf4ZtTaugqAN6VaD1xZ7VsB+OkVGgAOLNYhWU1rgbNih4bBsVvl8Z2jwkeGCY6k8ETZv+8CvbQSOKt75nlro9z0Exqj4iCP35+bwu+FWd9c+czQCHCQJ8tfnpG6yUrGQne/Vz5jsR8AP5Y2yGKUyUpksR9eAOsZL1Crcngi3XHL8HzfsS6NcTOw3E2bBfi6IbA3gf795Ex4fW5MQEnZsTCsKfQ4+He/Cd3sM1ImLwPB7xPFTroZesRBme9L4ZPI9LwLD1KkoMLvtuJu3TekGYvqJb83A6/Uwx2UJUP59Y5pZiZEweSIF/u+pltbHxCofNCkHuI2UvpnywytINhkh3dWdfOX0D1DT6lfStlR+6Ii2AOl+z9kUPeL1U7ePRay2kk914H/BsuiZ6EdIXUdU7fvdup5li8japHDWV2kwIeKmyaVRkqa6SoXI9MTdbWZ+LDapxWp/S15aE+yMeyeYEFpo4GfqPZtgU194XFEG2AnQq+YZW207g/Ghtx1yUNz/5QG+zHZxFJTKFtJKnj+bZ4HdBvxeym07pG1C2dsbyUMlJTVwzz7xg/UHMKeB/Iy7yDvhQfw02D/9fx53jZwX8r/JcFeFAEbwE+rpMjfvQJwvWgWOipyhwB+CPhN2W4L895LiEHz+MBJk65tWTEUwCsuAAdwAEcBOICjABzAUQAO4ACOAnAARwE4gKMAHMDbUH8EGABZtyoqqLbafgAAAABJRU5ErkJggg==)}.gallery__table-image--video{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrs3UFOwkAUxvFi2MMN9Abq3kRuoDegC/eyZmPduLXuSYATiCegJOzFE1huQE+Ar+E1BBITF/I60/l/yYTEhW1+TvoN00lsbbfbiNjlDALAASeAA04AB5wADjjgBHDACeCAE8ABB5wADjgBHHBSpV3XhW8eXjL5uJXxJWOwHA2zEMBbdRyTEOyefMyPfryQEQt8ziPFJuVs/5Y/xkTGBeB26ctYCXoiowu4TToynmTkgh4Dbgs/FvRcn/uAG+W8LNlyZSPjCnDbYv30uVh9/eLT1xWNd8Xq+zfNqlgHgNsW66sW6z3gtsX6rsXaA9y2WOeuFmuTdwurYk1dKtYQtmcftVgTwI23CrRYY8Bti3VcZ7GG+sanKtaZdbGG/ortLtrvwXcBt13R5BZbBYAfFWu0e/kRA25frKtTbAUD/nsuZaSA24YZbpwB4DYpz8hcL0fDyX//4ja2B1lHu8NI2akuAPgeOjnFjAb8MIWuRFLB3lhcMGTwabQ7RLqxvGiI4LUeGg0J3Ilj0SGAmxVi6OCFlmHi0k01FfxNZ/XGtRtrGviHPqdzV2+wKeALndGZ6zfqO7hThdhk8EKhU99u3EfwZ8uv4iGDT3VW55HH8QHcm0L0HXytS7xZk9atLoIXCj2JGpi2Y9Cme9Mhga8UuNOkQvxLWnX9Dwg9RFmOPATo2sFDDcckAAecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDACeB15UeAAQBIj8DeaiiktQAAAABJRU5ErkJggg==)}.gallery__table-image--document{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAYAAADj79JYAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsFJREFUeNrs3c1qE1EYxvF3JjNNbUQjaEs2re4URMGVUIrQhVtxJ+hCvARdWXAjgrioKy9ARNdegEWEXoAgBXWT0m5Cq2hsPptpEicpgguVJM15T4/n/8CQTWc6/fXMc85MUhp0u10heolG2alYLObTl+fpds2FHzKOY4mi6F6hUHhq+1zCEfd75wr2rwRBsFwqle46B56O7tvpy0UXL+fDgD7KCD/tcofaRg/Fw9hE9xLcJrq34LbQvQa3ge49uDY64MrogCujA66MDrgyOuDK6IArowOujA64MjrgyuiAK6MDrowOuDI64MrokcmT+vqjJqsf1o0c++zstJybmx7oa6v1plQaOyZOY3nYTwIYBf9Srsnr1TUjx76+cH5g8GyckUq9I9XGrvUrw5tKOXk8J0ePZAH3Dd27SdM2utEOn5vJy/2bi0aOfSqfOxB6fzK10OlGwacmJwae2GyMdBvoXq/DbdSL9zc+2ujcaSqjG+3wjxvb8vjVW+d+AQ/vXGWE/y8B/A8xWS+AK3e60Q7PTcb9p3quoptYpxsFn505IUu3Fp0e6eNGp1KU6wVwZXTAldGNdni92ZKNrbJzuH974DaOTjcK3sN28U7zxdINYxMplaJcLxF8B1syMsIPObqzb7G5Gm/fYrMVKgVwwIkrHb659V1evnlv5NgLF870N8B/S62ZyKfNbdXbbyqFAA44k+b4evZfT94Y4QRwwAnggBPAAQecAA44ARxwAjjggBPAASeAA04ABxxwAjjgBHDAiQHwcrUxAdt+mq098+CN3STu8I+r+2klCuBJuxN+26mDnbR7V/vQ+4306dne35nvtTtybCorYejfNNBoJVKpNWWUK31o8EBkfb+/kv7md4Kq8Uq5cvnSs/QbfabBRTJh8ERlWZiNM/NhEKz4PLIzYfggHXyPht6zy4pDNT8FGAAqQOmy57wEGAAAAABJRU5ErkJggg==)}.gallery__table-image--error{background:#d40404;height:68px;width:68px}.gallery__table-image--error:after{content:"<";line-height:68px;font-size:30px;display:inline;font-family:silverstripe,sans-serif;color:#fff;opacity:.8}.gallery__progress-bar-progress{height:100%;background:#29abe2;width:0}.gallery__progress-bar{height:16px;width:30%;border-radius:10px;overflow:hidden}.gallery__progress-bar--complete:after{color:#3fa142;font-size:20px;display:inline;font-family:silverstripe,sans-serif;content:"I"}th.sort--disabled>span:after{content:""}.editor{background-color:#fafbfc;z-index:2;position:absolute;height:100%;left:0}@media (min-width:992px){.editor{width:300px;border-left:1px solid #ced5e1;position:relative;padding-bottom:0}}@media (min-width:1200px){.editor{width:448px}}.editor .nav-tabs{z-index:1;position:relative}.editor .editor__details{-webkit-transform:translateZ(0);transform:translateZ(0)}.editor .editor__details .btn--close-panel{margin-right:0}.editor .editor__details fieldset{overflow-y:auto}.editor--asset-dropzone--disable .asset-dropzone{pointer-events:none}.editor__heading{margin-right:2.4616rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}.editor__status-flag{color:#f46b00;background-color:#fff7f2;border-color:#f46b00;clear:both;text-transform:uppercase;display:inline-block;position:relative;line-height:1rem;margin-left:3px}.editor__specs{color:#566b8d;font-size:.846rem;margin-bottom:1.2308rem}.editor__top-message{margin:-1.5385rem -1.5385rem 1.2308rem}.editor__file-preview{text-align:center;margin:0 -1.5385rem .76925rem;position:relative;max-height:336px;min-height:60px;overflow:hidden;display:block;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none}.editor__file-preview:not(.editor__file-preview--folder):hover .editor__thumbnail{-webkit-transform:scale(1.04);-o-transform:scale(1.04);transform:scale(1.04)}.editor__file-preview--folder{margin-left:0;margin-right:0;width:100%}.editor__file-preview-link:before{position:absolute;top:50%;left:50%;margin-top:-25px;margin-left:-25px;padding:11px;height:50px;width:50px;border-radius:50%;background-color:rgba(0,0,0,.6);color:#fff;font-size:22px;opacity:0;content:"=";font-family:silverstripe;line-height:27px;z-index:1;-webkit-transition:all .5s;-o-transition:all .5s;transition:all .5s}.editor__file-preview-link:active:before,.editor__file-preview-link:hover,.editor__file-preview-link:hover:before{text-decoration:none;opacity:1}.editor__thumbnail{max-width:100%;max-height:336px;min-height:60px;margin:auto;-webkit-transform:scale(1);-o-transform:scale(1);transform:scale(1);-webkit-transition:all .5s;-o-transition:all .5s;transition:all .5s}.editor__file-preview-message--file-missing{margin:2.4616rem 0 1.2308rem;font-size:1.231rem;color:#d40404;text-align:center}@media (max-width:991.98px){.editor__heading,.editor__specs{text-align:center;margin-right:1.8462rem;margin-left:1.8462rem}.btn--close-panel{float:left;right:auto;margin-right:0;margin-left:-15px;color:#566b8d}.btn--close-panel:before{content:"5"}}.relative-time[title]{cursor:pointer;text-decoration:underline}.asset-admin .popover-field .popover{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.1),0 2px 10px 0 rgba(0,0,0,.1);box-shadow:0 2px 5px 0 rgba(0,0,0,.1),0 2px 10px 0 rgba(0,0,0,.1);font-size:1rem;min-width:230px}.asset-admin .popover-field .popover:focus{outline:none}.asset-admin .popover-field .popover.bottom .arrow,.asset-admin .popover-field .popover.top .arrow{margin-left:-5px}.asset-admin .popover-field .popover.top{margin-top:-10px}.asset-admin .popover-field .popover.left .arrow,.asset-admin .popover-field .popover.right .arrow{margin-top:-3px}.asset-admin .popover-field .popover.left{margin-left:-10px}.asset-admin .popover-field .popover-body{padding:.5rem .75rem}.asset-admin .popover-field .popover-body ul{padding-left:0!important;list-style-type:none;margin-left:-1.2308rem + 1px;margin-right:-1.2308rem + 1px;margin-bottom:0}.asset-admin .popover-field .popover-body a{display:block;padding:.3077rem 1.2308rem;color:#43536d}.asset-admin .popover-field .popover-body a:hover{text-decoration:none;background-color:#eef0f4;color:#43536d}.asset-admin .popover-field .popover-body .btn{padding-left:calc(1.2308rem - 1px);padding-right:calc(1.2308rem - 1px);margin-left:calc(-.75rem + 1px);margin-right:calc(-.75rem + 1px);display:block;width:calc(100% + 1.5rem - 2px);text-align:left;border-radius:0}.asset-admin .popover-field .popover-body .btn:hover{background-color:#e9f0f4}.asset-admin__toolbar-extra{width:auto}.insert-media-modal.modal-lg{width:calc(100% - 4.9232rem);max-width:1600px;margin-top:0;margin-left:auto;margin-right:auto;height:calc(100% - 53px)}@media (max-width:991.98px){.insert-media-modal.modal-lg{width:calc(100% - 1rem);height:calc(100% - .5rem);margin:0 auto}}.insert-media-modal .modal-content{height:100%;border-top-left-radius:0;border-top-right-radius:0}.insert-media-modal .modal-body{padding:0;height:100%}@media (max-width:991.98px){.insert-media-modal .editor__details{height:100%}}@media (min-width:992px){.insert-media-modal .btn--close-panel{display:none}}.insert-media-modal .tab-content{margin-bottom:1.2308rem}.insert-media-modal .fieldgroup.fill-width .field.flexbox-area-grow:first-child{margin-right:1.5385rem}.insert-media-modal .asset-admin--multi-select [name=action_insert]{display:none}@media (min-width:992px){.insert-media-modal .asset-admin--single-select [name=action_insert]{display:none}}@media (max-width:991.98px){.insert-media-modal .asset-admin--multi-select [name=action_insert]{display:block}}.insert-media-modal__main{height:calc(100vh - 106px)}.insert-media-modal__close-button{float:right;height:32px;margin:10px -10px 10px 0}.insert-media-modal__close-button:before{top:0}.history-item{padding-top:1rem}.history-item:focus,.history-item:hover{background-color:#f4f6f8}.history-item p{margin-bottom:0}.list-group-flush:first-child .history-item:first-child{border-top:1px solid #ced5e1}.history-item__date,.history-item__version{opacity:.7;font-size:.846rem;margin-bottom:1px}.history-item__date{display:block}.history-item__version{position:absolute;right:1.5385rem;top:.9231rem;font-size:.846rem;opacity:.7}.history-item__status-flag{color:#3fa142;text-transform:uppercase;font-size:.923rem}.history-list{position:relative;min-height:50vh}.history-list>form{display:block}.history-list>.list-group{margin-top:calc(-1.5385rem - 1px)}.history-list .editor__file-preview-link,.history-list .editor__file-preview-message--file-missing{max-width:50%;position:relative;display:block;text-align:center;font-size:10px;padding:10px;background:#f4f6f8;border:1px solid #dbe0e9;margin:0 auto 10px}.history-list .editor__specs{text-align:center}.history-list__back{padding:5px;position:absolute;top:0;left:-.76925rem;z-index:2} \ No newline at end of file