diff --git a/client/dist/js/TinyMCE_sslink-file.js b/client/dist/js/TinyMCE_sslink-file.js index 8f7539d5c..a1dc29b00 100644 --- a/client/dist/js/TinyMCE_sslink-file.js +++ b/client/dist/js/TinyMCE_sslink-file.js @@ -27,4 +27,4 @@ } ${s.fileInterface} ${s.file} -`;t.mutation=l;const a={props:e=>{let{mutate:t,ownProps:{actions:n={}}}=e;return{actions:Object.assign({},n,{files:Object.assign({},n.files,{moveFiles:(e,n)=>t({variables:{folderId:e,fileIds:n},update:()=>{window.ss.apolloClient.resetStore()}})})})}}};t.config=a;var u=(0,o.graphql)(l,a);t.default=u},6307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(3732),i=(r=n(6821))&&r.__esModule?r:{default:r};const{mutation:s,config:l}=(0,i.default)("publishFiles");t.config=l,t.mutation=s;var a=(0,o.graphql)(s,l);t.default=a},168:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(3732),i=(r=n(6821))&&r.__esModule?r:{default:r};const{mutation:s,config:l}=(0,i.default)("unpublishFiles");t.config=l,t.mutation=s;var a=(0,o.graphql)(s,l);t.default=a},8750:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["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(((e,t)=>Object.assign(e,{[t]:`GALLERY.${t}`})),{});t.default=n},3669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateModal=function(e){return t=>{t({type:o.default.ACTIVATE_MODAL,payload:e})}},t.clearFileBadge=i,t.deactivateModal=function(){return e=>{e({type:o.default.DEACTIVATE_MODAL})}},t.deselectFiles=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>t({type:o.default.DESELECT_FILES,payload:{ids:e}})},t.loadFile=function(e,t){return n=>{n({type:o.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}},t.selectFiles=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>t({type:o.default.SELECT_FILES,payload:{ids:e}})},t.setConcatenateSelect=function(e){return t=>t({type:o.default.CONCATENATE_SELECT,payload:!!e})},t.setEnableDropzone=function(e){return t=>t({type:o.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})},t.setErrorMessage=function(e){return t=>t({type:o.default.SET_ERROR_MESSAGE,payload:{message:e}})},t.setFileBadge=function(e,t,n,r){return(s,l)=>{const{assetAdmin:a}=l(),u=a.gallery.badges.find((t=>t.id===e));u&&u.timer&&clearTimeout(u.timer);const d=r>0?setTimeout((()=>i(e)(s)),r):null;s({type:o.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:d}})}},t.setLastSelected=function(e){return t=>{t({type:o.default.SET_LAST_SELECTED,payload:{id:e}})}},t.setLoading=function(e){return t=>{t({type:o.default.SET_LOADING,payload:!!e})}},t.setNoticeMessage=function(e){return t=>t({type:o.default.SET_NOTICE_MESSAGE,payload:{message:e}})},t.setSelectedFiles=function(e){return t=>{t({type:o.default.SET_SELECTED_FILES,payload:{files:e}})}};var r,o=(r=n(8750))&&r.__esModule?r:{default:r};function i(e){return t=>{t({type:o.default.CLEAR_FILE_BADGE,payload:{id:e}})}}},9905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultImageFactory=t.default=void 0;var r=i(n(2175)),o=i(n(270));function i(e){return e&&e.__esModule?e:{default:e}}const s={minRetry:0,maxRetry:0,expiry:0,onStatusChange:()=>null,onRetry:()=>null,onReset:()=>null,onTimeout:()=>null},l=(e,t,n)=>{const r=new Image;r.onload=t,r.onerror=n,r.src=e};t.defaultImageFactory=l;var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;this.options={...s,...e},this.factory=t}loadImage(e){return this.options.minRetry&&o.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}loadImageLoop(e,t){return this.options.onStatusChange(e,r.default.LOADING),new Promise(((t,n)=>this.factory(e,t,n))).then((()=>this.handleSuccess(e))).catch((()=>this.handleError(e,t)))}handleReset(e,t){this.options.onReset(e),t()}handleTimeout(e,t){const n=setTimeout(e,t);return this.options.onTimeout(n,t),n}handleSuccess(e){o.default.unlock(e),this.options.onStatusChange(e,r.default.SUCCESS)}handleFailure(e){return o.default.unlock(e),this.options.onStatusChange(e,r.default.FAILED),this.options.expiry?new Promise((t=>{this.handleTimeout((()=>this.handleReset(e,t)),1e3*this.options.expiry)})):null}handleError(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,r.default.WAITING),this.handleRetry(e,t))}handleRetry(e,t){const n=new Promise((n=>{this.handleTimeout((()=>n(this.loadImageLoop(e,2*t))),1e3*t)}));return this.options.onRetry(e,t,n),n}setOnRetry(e){this.options.onRetry=e}setOnReset(e){this.options.onReset=e}setOnStatusChange(e){this.options.onStatusChange=e}setOnTimeout(e){this.options.onTimeout=e}};t.default=a},9505:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},3521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadImage=function(e,t){return(n,i)=>{if(!e)return null;if(i().assetAdmin.imageLoad.files.find((t=>t.url===e)))return null;const s={...t,onStatusChange:(e,t)=>n({type:r.default.SET_STATUS,payload:{status:t,url:e}}),onReset:e=>n({type:r.default.RESET,payload:{url:e}})};return new o.default(s).loadImage(e)}};var r=i(n(9505)),o=i(n(9905));function i(e){return e&&e.__esModule?e:{default:e}}},270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;class n{constructor(){this.urls=[]}lock(e){return!(this.urls.indexOf(e)>=0)&&(this.urls=[...this.urls,e],!0)}unlock(e){this.urls=this.urls.filter((t=>t!==e))}}t.Component=n,window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new n;var r=window.ss.imagelocker;t.default=r},2175:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DISABLED:"DISABLED",NONE:"NONE",SUCCESS:"SUCCESS",LOADING:"LOADING",WAITING:"WAITING",FAILED:"FAILED"}},3576:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DEFINE_IMAGE_SIZE_PRESETS:"DEFINE_IMAGE_SIZE_PRESETS",INIT_FORM_SCHEMA_STACK:"INIT_FORM_SCHEMA_STACK",POP_FORM_SCHEMA:"POP_FORM_SCHEMA",PUSH_FORM_SCHEMA:"PUSH_FORM_SCHEMA",RESET:"RESET",RESET_FORM_STACK:"RESET_FORM_STACK"}},4478:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineImageSizePresets=function(e){return{type:r.default.DEFINE_IMAGE_SIZE_PRESETS,payload:{imageSizePresets:e}}},t.initFormStack=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:r.default.INIT_FORM_SCHEMA_STACK,payload:{formSchema:{type:e,nextType:t}}}},t.popFormStackEntry=function(){return{type:r.default.POP_FORM_SCHEMA}},t.pushFormStackEntry=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:r.default.PUSH_FORM_SCHEMA,payload:{formSchema:{type:e,nextType:t}}}},t.reset=function(){return{type:r.default.RESET}},t.resetFormStack=function(){return{type:r.default.RESET_FORM_STACK}},t.stashFormValues=function(e,t){return(n,r)=>{const l=r(),a=(0,o.default)(l.form.formState,`${e}.values`),u=(0,o.default)(l.form.formSchemas,`${t}.schema.fields`);if(a){const e=Object.keys(a).filter((e=>null!==a[e]&&(0,s.default)(e,u))).map((e=>({name:e,value:a[e]})));n((0,i.setSchemaStateOverrides)(t,{fields:e}))}}};var r=l(n(3576)),o=l(n(9298)),i=n(3573),s=l(n(4916));function l(e){return e&&e.__esModule?e:{default:e}}},4916:function(e,t){"use strict";function n(e,t){let r;for(r=0;rt({type:o.default.ADD_QUEUED_FILE,payload:{file:e}})},t.failUpload=function(e,t,n){return r=>{let i=t.message;return t.errors&&t.errors.length&&(i=t.errors[0]),"string"==typeof t&&(i={value:n||t,type:"error"}),r({type:o.default.FAIL_UPLOAD,payload:{queuedId:e,message:i}})}},t.purgeUploadQueue=function(){return e=>e({type:o.default.PURGE_UPLOAD_QUEUE,payload:null})},t.removeQueuedFile=function(e){return t=>t({type:o.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})},t.succeedUpload=function(e,t){return n=>n({type:o.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})},t.updateQueuedFile=function(e,t){return n=>n({type:o.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})};var r,o=(r=n(4973))&&r.__esModule?r:{default:r}},6511:function(e,t,n){"use strict";var r=n(7418),o={};var i=function(e){};function s(e,t,n,r,o,s,l,a){if(i(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,r,o,s,l,a],c=0;(u=new Error(t.replace(/%s/g,(function(){return d[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}var l="mixins";e.exports=function(e,t,n){var i=[],a={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},u={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},d={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return l(e,(function(e){var n=s(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=a(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=u},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.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=r.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,o=null,s=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};s=i({textAlign:"right",width:"34%"},l),o=i({textAlign:"center",width:"33%"},l),n=i({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:s},t))}});e.exports=s},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=(n(3059),n(7024)),s=n(3560),l=n(7287),a=n(8583),u=n(1747),d=n(3220),c=n(2569),p=o({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&&s(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&s(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&s(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&s(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&s(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 o=this.props.columnSettings.getColumns(),p=l(o,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(i.pick(f,c(o,"children"))).map((function(t,o){var i=null,s=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=s)if(void 0!==s.customComponent&&null!==s.customComponent){var u=r.createElement(s.customComponent,{data:t[1],rowData:f,metadata:s});i=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:s.cssClassName,key:o,style:n},u)}else i=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:s.cssClassName,key:o,style:n},l,e.formatData(t[1]));return i||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},l,t[1])}));if(null!==this.props.onRowClick&&s(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var y=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?y="child-row":t.props.hasChildren&&(y=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:y},g)}});e.exports=p},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=(n(3059),n(8718)),s=o({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 r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?i(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 o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var i=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(i,{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 r.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:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=s},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=n(4721),s=n(2569),l=n(3311),a=o({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===i(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(s(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=i(e.props.selectedColumns,t),s=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==s&&void 0!==s.displayName&&null!=s.displayName&&(a=s.displayName),void 0!==s&&null!=s&&s.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),a)):void 0!==s&&null!=s&&void 0!==s.visible&&!1===s.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),a))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=a},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=n(4769),s=n(3302),l=(n(3059),n(5203),o({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,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-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,o=null,i=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"};o=r.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};i=r.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map((function(n,o){var i=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,o);return i&&(t=i),r.createElement(s,{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:i,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(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),i&&f.push(i),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,s=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),a=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");s=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:a},d)))}var c=this.props.showTableHeading?r.createElement(i,{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=r.createElement("tbody",null,e));var p=r.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=r.createElement("tbody",null,r.createElement("tr",null,r.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"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,s,p)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,s,p))}}));e.exports=l},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=N(O(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return j(b.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),j(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return T(n,(function(n){var o=b.getAt(n,r||""),i=e[r];return t(r||"",o,i)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=M(n,t);else{var r={};r[t]=e,n=P({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=this.getMaxPage(n.filteredResults),(D(e)||A(e)||I(e))&&(n.filter=e,n.filteredResults=null),this.setState(n),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 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)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=O(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})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),i={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};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=b.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,N(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?b.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new v(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 r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var i,s=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:s}),a={columns:[],orders:[]};if(l.length>0&&(i=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof i)2===i.length?(e=e.sort((function(e,t){return i(k(e,s),k(t,s))})),"desc"===this.state.sortDirection&&e.reverse()):1===i.length&&(e=R(e,(function(e){return i(k(e,s))}),[this.state.sortDirection]));else{var u=[function(e){return(k(e,s)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach((function(e,t){u.push((function(t){return(k(t,e)||"").toString().toLowerCase()})),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(r.state.sortDirection)})),e=R(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=_(e,(c+1)*this.state.resultsPerPage);else{var p=C(e,c*this.state.resultsPerPage);e=(E||x)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.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)),r=this;w(e,(function(e){r._updateSelectedRowIds(e[r.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),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,N(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_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===F(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?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.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,r=null,i=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),i=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:i},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.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}):o.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?o.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 o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,i){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:i,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,i){var s=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:s,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,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:i,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,r,o,i){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,i):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.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(),r=this.getTopSection(t,n),i=[],s=this.columnSettings.getColumns(),l=this.getDataForRender(e,s,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?w(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||i.push(e.columnName)})):i=b.keys(M(e[0],a)),i=this.columnSettings.orderColumns(i);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(c=a,p=!1,t=new r(t));e:for(;++d0&&i(d)?n>1?e(d,n-1,i,s,l):r(l,d):s||(l[l.length]=d)}return l}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var v=-1,b=h[0];e:for(;++vo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++rt||s&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!i)return 1;if(!o&&!s&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,l&&o(n[0],n[1],l)&&(s=i<3?void 0:s,i=1),t=Object(t);++r-1?l[a?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),i=n(8776),s=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?i(t):"[object Set]"==n?s(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,s,l,a){var u=1&n,d=e.length,c=t.length;if(d!=c&&!(u&&c>d))return!1;var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=l},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=o(i.length-t,0),a=Array(l);++s0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&i(t[0],t[1],u)&&(r=1);++n-1:!!d&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),i=n(5976),s=n(4387),l=i((function(e){var t=r(e,s);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=l},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,s=i.hasOwnProperty,l=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return o(e)&&s.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,l=s&&s.exports===i?r.Buffer:void 0,a=(l?l.isBuffer:void 0)||o;e.exports=a},1609:function(e,t,n){var r=n(280),o=n(4160),i=n(5694),s=n(1469),l=n(8612),a=n(4144),u=n(5726),d=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(l(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||a(e)||d(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(c.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),s=i&&i.isMap,l=s?o(s):r;e.exports=l},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),i=n(7005),s=Function.prototype,l=Object.prototype,a=s.toString,u=l.hasOwnProperty,d=a.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==d}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),s=i&&i.isSet,l=s?o(s):r;e.exports=l},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),s=i&&i.isTypedArray,l=s?o(s):r;e.exports=l},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),i=n(9199),s=n(1469);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),i=n(7406),s=n(1811),l=n(8363),a=n(696),u=n(9021),d=n(6904),c=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=s(t,e),u||(u=t.length>1),t})),l(e,d(e),n),u&&(n=o(n,7,a));for(var c=t.length;c--;)i(n,t[c]);return n}));e.exports=c},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=i?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),i=n(5403),s=n(327);e.exports=function(e){return i(e)?r(s(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),i=n(5076),s=n(1469),l=n(6612);e.exports=function(e,t,n){var a=s(e)?r:i;return n&&l(e,t,n)&&(t=void 0),a(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),i=n(5976),s=n(6612),l=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&s(e,t[0],t[1])?t=[]:n>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=l},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),i=n(3448),s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},84:function(e,t,n){var r=n(9932),o=n(278),i=n(1469),s=n(3448),l=n(5514),a=n(327),u=n(9833);e.exports=function(e){return i(e)?r(e,a):s(e)?[e]:o(l(u(e)))}},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),i=n(9246),s=o((function(e,t){return i(e)?r(e,t):[]}));e.exports=s},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=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 r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a1)for(var n=1;n1?t-1:0),r=1;r2?n-2:0),i=2;i1&&void 0!==arguments[1]&&arguments[1],n=this.props,r=n.tolerance,o=n.onSelection,i=n.onEndSelection,s=[],l=(0,d.findDOMNode)(this.refs.selectbox);l&&(this._registry.forEach((function(e){e.domNode&&(0,g.default)(l,e.domNode,r)&&!s.includes(e.key)&&s.push(e.key)})),t?"function"==typeof i&&i(s,e):"function"==typeof o&&o(s,e))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.enabled,r=e.fixedPosition,o=e.className,i=e.selectingClassName,s=this.state,l=s.isBoxSelecting,a=s.boxLeft,d=s.boxTop,c=s.boxWidth,f=s.boxHeight,h=this.props.component;if(!n)return u.default.createElement(h,{className:o},t);var m={left:a,top:d,width:c,height:f,zIndex:9e3,position:r?"fixed":"absolute",cursor:"default"},g={backgroundColor:"transparent",border:"1px dashed #999",width:"100%",height:"100%",float:"left"},y={position:"relative",overflow:"visible"};return u.default.createElement(h,{className:(0,p.default)(o,l?i:null),style:y},l?u.default.createElement("div",{style:m,ref:"selectbox"},u.default.createElement("span",{style:g})):null,t)}}]),t}(a.Component);v.propTypes={children:c.default.node,onBeginSelection:c.default.func,onEndSelection:c.default.func,onSelection:c.default.func,component:c.default.node,tolerance:c.default.number,fixedPosition:c.default.bool,preventDefault:c.default.bool,onNonItemClick:c.default.func,enabled:c.default.bool,className:c.default.string,selectingClassName:c.default.string},v.defaultProps={component:"div",tolerance:0,fixedPosition:!1,preventDefault:!0,enabled:!0},v.childContextTypes={selectable:c.default.object},t.default=v},function(e,t,n){"use strict";(function(t){var 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=n(1),i=n(2),s=n(8),l=n(15),a=n(3),u=n(16);e.exports=function(e,n){function d(e){var t=e&&(I&&e[I]||e[A]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){this.message=e,this.stack=""}function f(e){function r(r,u,d,c,f,h,m){if(c=c||D,h=h||d,m!==a)if(n)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+d;!o[g]&&l<3&&(s(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,c),o[g]=!0,l++)}return null==u[d]?r?new p(null===u[d]?"The "+f+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+f+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,d,c,f,h)}if("production"!==t.env.NODE_ENV)var o={},l=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,s){var l=t[n];return w(l)!==e?new p("Invalid "+o+" `"+i+"` of type `"+x(l)+"` supplied to `"+r+"`, expected `"+e+"`."):null}return f(t)}function m(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new p("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;ln+l||t+o-ar+s)};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e instanceof HTMLElement?(0,r.default)(e):e,s=t instanceof HTMLElement?(0,r.default)(t):t;return o(i.top,i.left,s.top,s.left,i.offsetWidth,i.offsetHeight,s.offsetWidth,s.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function r(t){var n=m,r=g;return m=g=void 0,w=t,v=e.apply(r,n)}function i(e){return w=e,b=setTimeout(d,t),x?r(e):v}function s(e){var n=t-(e-C);return F?S(n,y-(e-w)):n}function a(e){var n=e-C;return void 0===C||n>=t||n<0||F&&e-w>=y}function d(){var e=_();if(a(e))return c(e);b=setTimeout(d,s(e))}function c(e){return b=void 0,O&&m?r(e):(m=g=void 0,v)}function p(){void 0!==b&&clearTimeout(b),w=0,m=C=g=b=void 0}function f(){return void 0===b?v:c(_())}function h(){var e=_(),n=a(e);if(m=arguments,g=this,C=e,n){if(void 0===b)return i(C);if(F)return b=setTimeout(d,t),r(C)}return void 0===b&&(b=setTimeout(d,t)),v}var m,g,y,v,b,C,w=0,x=!1,F=!1,O=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,o(n)&&(x=!!n.leading,y=(F="maxWait"in n)?E(l(n.maxWait)||0,t):y,O="trailing"in n?!!n.trailing:O),h.cancel=p,h.flush=f,h}function r(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new TypeError(u);return o(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:i,maxWait:t,trailing:s})}function o(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function s(e){return"symbol"==(void 0===e?"undefined":a(e))||i(e)&&C.call(e)==c}function l(e){if("number"==typeof e)return e;if(s(e))return d;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(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,v="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,b=y||v||Function("return this")(),C=Object.prototype.toString,E=Math.max,S=Math.min,_=function(){return b.Date.now()};e.exports=r}).call(t,n(21))},function(e,t,n){"use strict";var r,o="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};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n'),this.element.appendChild(e));let t=e.getElementsByTagName("span")[0];return t&&(null!=t.textContent?t.textContent=this.options.dictFallbackMessage:null!=t.innerText&&(t.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(e,t,n,r){let o={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},i=e.width/e.height;null==t&&null==n?(t=o.srcWidth,n=o.srcHeight):null==t?t=n*i:null==n&&(n=t/i);let s=(t=Math.min(t,o.srcWidth))/(n=Math.min(n,o.srcHeight));if(o.srcWidth>t||o.srcHeight>n)if("crop"===r)i>s?(o.srcHeight=e.height,o.srcWidth=o.srcHeight*s):(o.srcWidth=e.width,o.srcHeight=o.srcWidth/s);else{if("contain"!==r)throw new Error(`Unknown resizeMethod '${r}'`);i>s?n=t/i:t=n*i}return o.srcX=(e.width-o.srcWidth)/2,o.srcY=(e.height-o.srcHeight)/2,o.trgWidth=t,o.trgHeight=n,o},transformFile(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:i('
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n'),drop(e){return this.element.classList.remove("dz-drag-hover")},dragstart(e){},dragend(e){return this.element.classList.remove("dz-drag-hover")},dragenter(e){return this.element.classList.add("dz-drag-hover")},dragover(e){return this.element.classList.add("dz-drag-hover")},dragleave(e){return this.element.classList.remove("dz-drag-hover")},paste(e){},reset(){return this.element.classList.remove("dz-started")},addedfile(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){for(var t of(e.previewElement=a.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),e.previewElement.querySelectorAll("[data-dz-name]")))t.textContent=e.name;for(t of e.previewElement.querySelectorAll("[data-dz-size]"))t.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=a.createElement(`${this.options.dictRemoveFile}`),e.previewElement.appendChild(e._removeLink));let n=t=>(t.preventDefault(),t.stopPropagation(),e.status===a.UPLOADING?a.confirm(this.options.dictCancelUploadConfirmation,(()=>this.removeFile(e))):this.options.dictRemoveFileConfirmation?a.confirm(this.options.dictRemoveFileConfirmation,(()=>this.removeFile(e))):this.removeFile(e));for(let t of e.previewElement.querySelectorAll("[data-dz-remove]"))t.addEventListener("click",n)}},removedfile(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(let n of e.previewElement.querySelectorAll("[data-dz-thumbnail]"))n.alt=e.name,n.src=t;return setTimeout((()=>e.previewElement.classList.add("dz-image-preview")),1)}},error(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);for(let n of e.previewElement.querySelectorAll("[data-dz-errormessage]"))n.textContent=t}},errormultiple(){},processing(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(e,t,n){if(e.previewElement)for(let n of e.previewElement.querySelectorAll("[data-dz-uploadprogress]"))"PROGRESS"===n.nodeName?n.value=t:n.style.width=`${t}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple(){},canceled(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple(){},complete(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class a extends s{static initClass(){this.prototype.Emitter=s,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter((e=>e.accepted)).map((e=>e))}getRejectedFiles(){return this.files.filter((e=>!e.accepted)).map((e=>e))}getFilesWithStatus(e){return this.files.filter((t=>t.status===e)).map((e=>e))}getQueuedFiles(){return this.getFilesWithStatus(a.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(a.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(a.ADDED)}getActiveFiles(){return this.files.filter((e=>e.status===a.UPLOADING||e.status===a.QUEUED)).map((e=>e))}init(){if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(a.createElement(`
`)),this.clickableElements.length){let e=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(null===this.options.maxFiles||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",null!==this.options.acceptedFiles&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),null!==this.options.capture&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",a.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",(()=>{let{files:t}=this.hiddenFileInput;if(t.length)for(let e of t)this.addFile(e);this.emit("addedfiles",t),e()}))};e()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(let e of this.events)this.on(e,this.options[e]);this.on("uploadprogress",(()=>this.updateTotalUploadProgress())),this.on("removedfile",(()=>this.updateTotalUploadProgress())),this.on("canceled",(e=>this.emit("complete",e))),this.on("complete",(e=>{if(0===this.getAddedFiles().length&&0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length)return setTimeout((()=>this.emit("queuecomplete")),0)}));let e=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;tthis.emit("dragstart",e),dragenter:t=>(e(t),this.emit("dragenter",t)),dragover:t=>{let n;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",e(t),this.emit("dragover",t)},dragleave:e=>this.emit("dragleave",e),drop:t=>(e(t),this.drop(t)),dragend:e=>this.emit("dragend",e)}}],this.clickableElements.forEach((e=>this.listeners.push({element:e,events:{click:t=>((e!==this.element||t.target===this.element||a.elementInside(t.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}}))),this.enable(),this.options.init.call(this)}destroy(){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,a.instances.splice(a.instances.indexOf(this),1)}updateTotalUploadProgress(){let e,t=0,n=0;if(this.getActiveFiles().length){for(let e of this.getActiveFiles())t+=e.upload.bytesSent,n+=e.upload.total;e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}_getParamName(e){return"function"==typeof this.options.paramName?this.options.paramName(e):`${this.options.paramName}${this.options.uploadMultiple?`[${e}]`:""}`}_renameFile(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}getFallbackForm(){let e,t;if(e=this.getExistingFallback())return e;let n='
';this.options.dictFallbackText&&(n+=`

${this.options.dictFallbackText}

`),n+=`
`;let r=a.createElement(n);return"FORM"!==this.element.tagName?(t=a.createElement(`
`),t.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:r}getExistingFallback(){let e=function(e){for(let t of e)if(/(^| )fallback($| )/.test(t.className))return t};for(let n of["div","form"]){var t;if(t=e(this.element.getElementsByTagName(n)))return t}}setupEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.addEventListener(n,r,!1))}return t})()))}removeEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.removeEventListener(n,r,!1))}return t})()))}disable(){return this.clickableElements.forEach((e=>e.classList.remove("dz-clickable"))),this.removeEventListeners(),this.disabled=!0,this.files.map((e=>this.cancelUpload(e)))}enable(){return delete this.disabled,this.clickableElements.forEach((e=>e.classList.add("dz-clickable"))),this.setupEventListeners()}filesize(e){let t=0,n="b";if(e>0){let r=["tb","gb","mb","kb","b"];for(let o=0;o=Math.pow(this.options.filesizeBase,4-o)/10){t=e/Math.pow(this.options.filesizeBase,4-o),n=i;break}}t=Math.round(10*t)/10}return`${t} ${this.options.dictFileSizeUnits[n]}`}_updateMaxFilesReachedClass(){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")}drop(e){if(!e.dataTransfer)return;this.emit("drop",e);let t=[];for(let n=0;ne.items,null!=t?n(t):void 0))return;var t,n;this.emit("paste",e);let{items:r}=e.clipboardData;return r.length?this._addFilesFromItems(r):void 0}handleFiles(e){for(let t of e)this.addFile(t)}_addFilesFromItems(e){return(()=>{let t=[];for(let r of e){var n;null!=r.webkitGetAsEntry&&(n=r.webkitGetAsEntry())?n.isFile?t.push(this.addFile(r.getAsFile())):n.isDirectory?t.push(this._addFilesFromDirectory(n,n.name)):t.push(void 0):null!=r.getAsFile&&(null==r.kind||"file"===r.kind)?t.push(this.addFile(r.getAsFile())):t.push(void 0)}return t})()}_addFilesFromDirectory(e,t){let n=e.createReader(),r=e=>{return t=console,n="log",r=t=>t.log(e),null!=t&&"function"==typeof t[n]?r(t,n):void 0;var t,n,r};var o=()=>n.readEntries((e=>{if(e.length>0){for(let n of e)n.isFile?n.file((e=>{if(!this.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=`${t}/${e.name}`,this.addFile(e)})):n.isDirectory&&this._addFilesFromDirectory(n,`${t}/${n.name}`);o()}return null}),r);return o()}accept(e,t){this.options.maxFilesize&&e.size>1048576*this.options.maxFilesize?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):a.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}addFile(e){e.upload={uuid:a.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=a.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(t=>{t?(e.accepted=!1,this._errorProcessing([e],t)):(e.accepted=!0,this.options.autoQueue&&this.enqueueFile(e)),this._updateMaxFilesReachedClass()}))}enqueueFiles(e){for(let t of e)this.enqueueFile(t);return null}enqueueFile(e){if(e.status!==a.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=a.QUEUED,this.options.autoProcessQueue)return setTimeout((()=>this.processQueue()),0)}_enqueueThumbnail(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1048576*this.options.maxThumbnailFilesize)return this._thumbnailQueue.push(e),setTimeout((()=>this._processThumbnailQueue()),0)}_processThumbnailQueue(){if(this._processingThumbnail||0===this._thumbnailQueue.length)return;this._processingThumbnail=!0;let e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(t=>(this.emit("thumbnail",e,t),this._processingThumbnail=!1,this._processThumbnailQueue())))}removeFile(e){if(e.status===a.UPLOADING&&this.cancelUpload(e),this.files=u(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}removeAllFiles(e){null==e&&(e=!1);for(let t of this.files.slice())(t.status!==a.UPLOADING||e)&&this.removeFile(t);return null}resizeImage(e,t,n,r,o){return this.createThumbnail(e,t,n,r,!0,((t,n)=>{if(null==n)return o(e);{let{resizeMimeType:t}=this.options;null==t&&(t=e.type);let r=n.toDataURL(t,this.options.resizeQuality);return"image/jpeg"!==t&&"image/jpg"!==t||(r=p.restore(e.dataURL,r)),o(a.dataURItoBlob(r))}}))}createThumbnail(e,t,n,r,o,i){let s=new FileReader;s.onload=()=>{e.dataURL=s.result,"image/svg+xml"!==e.type?this.createThumbnailFromUrl(e,t,n,r,o,i):null!=i&&i(s.result)},s.readAsDataURL(e)}displayExistingFile(e,t,n,r,o=!0){if(this.emit("addedfile",e),this.emit("complete",e),o){let o=t=>{this.emit("thumbnail",e,t),n&&n()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,o,r)}else this.emit("thumbnail",e,t),n&&n()}createThumbnailFromUrl(e,t,n,r,o,i,s){let l=document.createElement("img");return s&&(l.crossOrigin=s),o="from-image"!=getComputedStyle(document.body).imageOrientation&&o,l.onload=()=>{let s=e=>e(1);return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(s=e=>EXIF.getData(l,(function(){return e(EXIF.getTag(this,"Orientation"))}))),s((o=>{e.width=l.width,e.height=l.height;let s=this.options.resize.call(this,e,t,n,r),a=document.createElement("canvas"),u=a.getContext("2d");switch(a.width=s.trgWidth,a.height=s.trgHeight,o>4&&(a.width=s.trgHeight,a.height=s.trgWidth),o){case 2:u.translate(a.width,0),u.scale(-1,1);break;case 3:u.translate(a.width,a.height),u.rotate(Math.PI);break;case 4:u.translate(0,a.height),u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI),u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI),u.translate(0,-a.width);break;case 7:u.rotate(.5*Math.PI),u.translate(a.height,-a.width),u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI),u.translate(-a.height,0)}c(u,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);let d=a.toDataURL("image/png");if(null!=i)return i(d,a)}))},null!=i&&(l.onerror=i),l.src=e.dataURL}processQueue(){let{parallelUploads:e}=this.options,t=this.getUploadingFiles().length,n=t;if(t>=e)return;let r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-t));for(;nt.xhr===e)).map((e=>e))}cancelUpload(e){if(e.status===a.UPLOADING){let t=this._getFilesWithXhr(e.xhr);for(let e of t)e.status=a.CANCELED;void 0!==e.xhr&&e.xhr.abort();for(let e of t)this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",t)}else e.status!==a.ADDED&&e.status!==a.QUEUED||(e.status=a.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(e,...t){return"function"==typeof e?e.apply(this,t):e}uploadFile(e){return this.uploadFiles([e])}uploadFiles(e){this._transformFiles(e,(t=>{if(this.options.chunking){let n=t[0];e[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||n.size>this.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(n.size/this.options.chunkSize)}if(e[0].upload.chunked){let n=e[0],r=t[0],o=0;n.upload.chunks=[];let i=()=>{let t=0;for(;void 0!==n.upload.chunks[t];)t++;if(t>=n.upload.totalChunkCount)return;o++;let i=t*this.options.chunkSize,s=Math.min(i+this.options.chunkSize,r.size),l={name:this._getParamName(0),data:r.webkitSlice?r.webkitSlice(i,s):r.slice(i,s),filename:n.upload.filename,chunkIndex:t};n.upload.chunks[t]={file:n,index:t,dataBlock:l,status:a.UPLOADING,progress:0,retries:0},this._uploadData(e,[l])};if(n.upload.finishedChunkUpload=(t,r)=>{let o=!0;t.status=a.SUCCESS,t.dataBlock=null,t.response=t.xhr.responseText,t.responseHeaders=t.xhr.getAllResponseHeaders(),t.xhr=null;for(let e=0;e{this._finished(e,r,null)}))},this.options.parallelChunkUploads)for(let e=0;e{this._finishedUploading(e,n,t)},n.ontimeout=()=>{this._handleUploadError(e,n,`Request timedout after ${this.options.timeout/1e3} seconds`)},n.onerror=()=>{this._handleUploadError(e,n)},(null!=n.upload?n.upload:n).onprogress=t=>this._updateFilesUploadProgress(e,n,t);let s=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(s["Content-Type"]=e[0].type),this.options.headers&&r(s,this.options.headers);for(let e in s){let t=s[e];t&&n.setRequestHeader(e,t)}if(this.options.binaryBody){for(let t of e)this.emit("sending",t,n);this.options.uploadMultiple&&this.emit("sendingmultiple",e,n),this.submitRequest(n,null,e)}else{let r=new FormData;if(this.options.params){let t=this.options.params;"function"==typeof t&&(t=t.call(this,e,n,e[0].upload.chunked?this._getChunk(e[0],n):null));for(let e in t){let n=t[e];if(Array.isArray(n))for(let t=0;t{n[o]=i,++r===e.length&&t(n)}))}_addFormElementData(e){if("FORM"===this.element.tagName)for(let t of this.element.querySelectorAll("input, textarea, select, button")){let n=t.getAttribute("name"),r=t.getAttribute("type");if(r&&(r=r.toLowerCase()),null!=n)if("SELECT"===t.tagName&&t.hasAttribute("multiple"))for(let r of t.options)r.selected&&e.append(n,r.value);else(!r||"checkbox"!==r&&"radio"!==r||t.checked)&&e.append(n,t.value)}}_updateFilesUploadProgress(e,t,n){if(e[0].upload.chunked){let r=e[0],o=this._getChunk(r,t);n?(o.progress=100*n.loaded/n.total,o.total=n.total,o.bytesSent=n.loaded):(o.progress=100,o.bytesSent=o.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(let e=0;ethis.options.renameFilename.call(this,e.name,e)),"string"==typeof this.options.method&&(this.options.method=this.options.method.toUpperCase()),(n=this.getExistingFallback())&&n.parentNode&&n.parentNode.removeChild(n),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=a.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=a.getElements(this.options.clickable,"clickable")),this.init()}}a.initClass(),a.options={},a.optionsForElement=function(e){return e.getAttribute("id")?a.options[d(e.getAttribute("id"))]:void 0},a.instances=[],a.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},a.discover=function(){let e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];let t=t=>(()=>{let n=[];for(let r of t)/(^| )dropzone($| )/.test(r.className)?n.push(e.push(r)):n.push(void 0);return n})();t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return(()=>{let t=[];for(let n of e)!1!==a.optionsForElement(n)?t.push(new a(n)):t.push(void 0);return t})()},a.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],a.isBrowserSupported=function(){let e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==a.blacklistedBrowsers&&(a.blockedBrowsers=a.blacklistedBrowsers);for(let t of a.blockedBrowsers)if(t.test(navigator.userAgent)){e=!1;continue}}else e=!1;else e=!1;return e},a.dataURItoBlob=function(e){let t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),o=new Uint8Array(r);for(let e=0,n=t.length,r=0<=n;r?e<=n:e>=n;r?e++:e--)o[e]=t.charCodeAt(e);return new Blob([r],{type:n})};const u=(e,t)=>e.filter((e=>e!==t)).map((e=>e)),d=e=>e.replace(/[\-_](\w)/g,(e=>e.charAt(1).toUpperCase()));a.createElement=function(e){let t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},a.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},a.getElement=function(e,t){let n;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},a.getElements=function(e,t){let n,r;if(e instanceof Array){r=[];try{for(n of e)r.push(this.getElement(n,t))}catch(e){r=null}}else if("string"==typeof e)for(n of(r=[],document.querySelectorAll(e)))r.push(n);else null!=e.nodeType&&(r=[e]);if(null==r||!r.length)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return r},a.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},a.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");let n=e.type,r=n.replace(/\/.*$/,"");for(let o of t)if(o=o.trim(),"."===o.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(o.toLowerCase(),e.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(r===o.replace(/\/.*$/,""))return!0}else if(n===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new a(this,e)}))}),a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success";var c=function(e,t,n,r,o,i,s,l,a,u){let d=function(e){e.naturalWidth;let t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;let r=n.getContext("2d");r.drawImage(e,0,0);let{data:o}=r.getImageData(1,0,1,t),i=0,s=t,l=t;for(;l>i;)0===o[4*(l-1)+3]?s=l:i=l,l=s+i>>1;let a=l/t;return 0===a?1:a}(t);return e.drawImage(t,n,r,o,i,s,l,a,u/d)};class p{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(e){let t,n,r,o,i,s="",l="",a="",u=0;for(;t=e[u++],n=e[u++],l=e[u++],r=t>>2,o=(3&t)<<4|n>>4,i=(15&n)<<2|l>>6,a=63&l,isNaN(n)?i=a=64:isNaN(l)&&(a=64),s=s+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(a),t=n=l="",r=o=i=a="",ue.length)break}return n}static decode64(e){let t,n,r,o,i,s="",l="",a=0,u=[];for(/[^A-Za-z0-9\+\/\=]/g.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++)),o=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|o>>4,n=(15&o)<<4|i>>2,s=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(s),t=n=s="",r=o=i=l="",ae.execCommand(f),priority:80},editorIdentifier).addCommandWithUrlTest(f,/^\[file_link/);const h={init(e){e.addCommand(f,(()=>{(0,i.default)(`#${e.id}`).entwine("ss").openLinkFileDialog()}))}},m="insert-link__dialog-wrapper--file",g=(0,a.loadComponent)(l.default);i.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkFileDialog(){let t=e(`#${m}`);t.length||(t=e(`
`),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`.js-injector-boot #${m}`).entwine({ReactRoot:null,renderModal(e){var t=this;const{dispatch:n}=a.default.reducer.store;n(u.initFormStack("insert-link","admin"));const i=this.getOriginalAttributes(),s=this.getElement().getEditor(),l=s.getInstance().selection,d=s.getSelection(),c="A"!==l.getNode().tagName&&""===d.trim();let p=this.getReactRoot();p||(p=(0,o.createRoot)(this[0]),this.setReactRoot(p)),p.render(r.default.createElement(g,{isOpen:e,type:"insert-link",onInsert:function(){return t.handleInsert(...arguments)},onClosed:()=>{n(u.reset()),this.close()},title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:i,requireLinkText:c}))},buildAttributes(e){return{href:`${s.default.serialise({name:"file_link",properties:{id:e.ID}},!0)}${e.Anchor&&e.Anchor.length?`#${e.Anchor}`:""}`,target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes(){const t=this.getElement().getEditor(),n=e(t.getSelectedNode()),r=(n.attr("href")||"").split("#");if(!r[0])return{};const o=s.default.match("file_link",!1,r[0]);return o?{ID:o.properties.id?parseInt(o.properties.id,10):0,Anchor:r[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})})),tinymce.PluginManager.add(f,(e=>h.init(e)))}()}(); \ No newline at end of file +`;t.mutation=l;const a={props:e=>{let{mutate:t,ownProps:{actions:n={}}}=e;return{actions:Object.assign({},n,{files:Object.assign({},n.files,{moveFiles:(e,n)=>t({variables:{folderId:e,fileIds:n},update:()=>{window.ss.apolloClient.resetStore()}})})})}}};t.config=a;var u=(0,o.graphql)(l,a);t.default=u},6307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(3732),i=(r=n(6821))&&r.__esModule?r:{default:r};const{mutation:s,config:l}=(0,i.default)("publishFiles");t.config=l,t.mutation=s;var a=(0,o.graphql)(s,l);t.default=a},168:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mutation=t.default=t.config=void 0;var r,o=n(3732),i=(r=n(6821))&&r.__esModule?r:{default:r};const{mutation:s,config:l}=(0,i.default)("unpublishFiles");t.config=l,t.mutation=s;var a=(0,o.graphql)(s,l);t.default=a},8750:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["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(((e,t)=>Object.assign(e,{[t]:`GALLERY.${t}`})),{});t.default=n},3669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateModal=function(e){return t=>{t({type:o.default.ACTIVATE_MODAL,payload:e})}},t.clearFileBadge=i,t.deactivateModal=function(){return e=>{e({type:o.default.DEACTIVATE_MODAL})}},t.deselectFiles=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>t({type:o.default.DESELECT_FILES,payload:{ids:e}})},t.loadFile=function(e,t){return n=>{n({type:o.default.LOAD_FILE_SUCCESS,payload:{id:e,file:t}})}},t.selectFiles=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t=>t({type:o.default.SELECT_FILES,payload:{ids:e}})},t.setConcatenateSelect=function(e){return t=>t({type:o.default.CONCATENATE_SELECT,payload:!!e})},t.setEnableDropzone=function(e){return t=>t({type:o.default.SET_ENABLE_DROPZONE,payload:{enableDropzone:e}})},t.setErrorMessage=function(e){return t=>t({type:o.default.SET_ERROR_MESSAGE,payload:{message:e}})},t.setFileBadge=function(e,t,n,r){return(s,l)=>{const{assetAdmin:a}=l(),u=a.gallery.badges.find((t=>t.id===e));u&&u.timer&&clearTimeout(u.timer);const d=r>0?setTimeout((()=>i(e)(s)),r):null;s({type:o.default.SET_FILE_BADGE,payload:{id:e,message:t,status:n,timer:d}})}},t.setLastSelected=function(e){return t=>{t({type:o.default.SET_LAST_SELECTED,payload:{id:e}})}},t.setLoading=function(e){return t=>{t({type:o.default.SET_LOADING,payload:!!e})}},t.setNoticeMessage=function(e){return t=>t({type:o.default.SET_NOTICE_MESSAGE,payload:{message:e}})},t.setSelectedFiles=function(e){return t=>{t({type:o.default.SET_SELECTED_FILES,payload:{files:e}})}};var r,o=(r=n(8750))&&r.__esModule?r:{default:r};function i(e){return t=>{t({type:o.default.CLEAR_FILE_BADGE,payload:{id:e}})}}},9905:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultImageFactory=t.default=void 0;var r=i(n(2175)),o=i(n(270));function i(e){return e&&e.__esModule?e:{default:e}}const s={minRetry:0,maxRetry:0,expiry:0,onStatusChange:()=>null,onRetry:()=>null,onReset:()=>null,onTimeout:()=>null},l=(e,t,n)=>{const r=new Image;r.onload=t,r.onerror=n,r.src=e};t.defaultImageFactory=l;var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;this.options={...s,...e},this.factory=t}loadImage(e){return this.options.minRetry&&o.default.lock(e)?this.loadImageLoop(e,this.options.minRetry):null}loadImageLoop(e,t){return this.options.onStatusChange(e,r.default.LOADING),new Promise(((t,n)=>this.factory(e,t,n))).then((()=>this.handleSuccess(e))).catch((()=>this.handleError(e,t)))}handleReset(e,t){this.options.onReset(e),t()}handleTimeout(e,t){const n=setTimeout(e,t);return this.options.onTimeout(n,t),n}handleSuccess(e){o.default.unlock(e),this.options.onStatusChange(e,r.default.SUCCESS)}handleFailure(e){return o.default.unlock(e),this.options.onStatusChange(e,r.default.FAILED),this.options.expiry?new Promise((t=>{this.handleTimeout((()=>this.handleReset(e,t)),1e3*this.options.expiry)})):null}handleError(e,t){return t>this.options.maxRetry?this.handleFailure(e):(this.options.onStatusChange(e,r.default.WAITING),this.handleRetry(e,t))}handleRetry(e,t){const n=new Promise((n=>{this.handleTimeout((()=>n(this.loadImageLoop(e,2*t))),1e3*t)}));return this.options.onRetry(e,t,n),n}setOnRetry(e){this.options.onRetry=e}setOnReset(e){this.options.onReset=e}setOnStatusChange(e){this.options.onStatusChange=e}setOnTimeout(e){this.options.onTimeout=e}};t.default=a},9505:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_STATUS:"IMAGE_LOAD_SET_STATUS",RESET:"IMAGE_LOAD_RESET"}},3521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadImage=function(e,t){return(n,i)=>{if(!e)return null;if(i().assetAdmin.imageLoad.files.find((t=>t.url===e)))return null;const s={...t,onStatusChange:(e,t)=>n({type:r.default.SET_STATUS,payload:{status:t,url:e}}),onReset:e=>n({type:r.default.RESET,payload:{url:e}})};return new o.default(s).loadImage(e)}};var r=i(n(9505)),o=i(n(9905));function i(e){return e&&e.__esModule?e:{default:e}}},270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;class n{constructor(){this.urls=[]}lock(e){return!(this.urls.indexOf(e)>=0)&&(this.urls=[...this.urls,e],!0)}unlock(e){this.urls=this.urls.filter((t=>t!==e))}}t.Component=n,window.ss=window.ss||{},window.ss.imagelocker=window.ss.imagelocker||new n;var r=window.ss.imagelocker;t.default=r},2175:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DISABLED:"DISABLED",NONE:"NONE",SUCCESS:"SUCCESS",LOADING:"LOADING",WAITING:"WAITING",FAILED:"FAILED"}},3576:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DEFINE_IMAGE_SIZE_PRESETS:"DEFINE_IMAGE_SIZE_PRESETS",INIT_FORM_SCHEMA_STACK:"INIT_FORM_SCHEMA_STACK",POP_FORM_SCHEMA:"POP_FORM_SCHEMA",PUSH_FORM_SCHEMA:"PUSH_FORM_SCHEMA",RESET:"RESET",RESET_FORM_STACK:"RESET_FORM_STACK"}},4478:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineImageSizePresets=function(e){return{type:r.default.DEFINE_IMAGE_SIZE_PRESETS,payload:{imageSizePresets:e}}},t.initFormStack=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:r.default.INIT_FORM_SCHEMA_STACK,payload:{formSchema:{type:e,nextType:t}}}},t.popFormStackEntry=function(){return{type:r.default.POP_FORM_SCHEMA}},t.pushFormStackEntry=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:r.default.PUSH_FORM_SCHEMA,payload:{formSchema:{type:e,nextType:t}}}},t.reset=function(){return{type:r.default.RESET}},t.resetFormStack=function(){return{type:r.default.RESET_FORM_STACK}},t.stashFormValues=function(e,t){return(n,r)=>{const l=r(),a=(0,o.default)(l.form.formState,`${e}.values`),u=(0,o.default)(l.form.formSchemas,`${t}.schema.fields`);if(a){const e=Object.keys(a).filter((e=>null!==a[e]&&(0,s.default)(e,u))).map((e=>({name:e,value:a[e]})));n((0,i.setSchemaStateOverrides)(t,{fields:e}))}}};var r=l(n(3576)),o=l(n(9298)),i=n(3573),s=l(n(4916));function l(e){return e&&e.__esModule?e:{default:e}}},4916:function(e,t){"use strict";function n(e,t){let r;for(r=0;rt({type:o.default.ADD_QUEUED_FILE,payload:{file:e}})},t.failUpload=function(e,t,n){return r=>{let i=t.message;return t.errors&&t.errors.length&&(i=t.errors[0]),"string"==typeof t&&(i={value:n||t,type:"error"}),r({type:o.default.FAIL_UPLOAD,payload:{queuedId:e,message:i}})}},t.purgeUploadQueue=function(){return e=>e({type:o.default.PURGE_UPLOAD_QUEUE,payload:null})},t.removeQueuedFile=function(e){return t=>t({type:o.default.REMOVE_QUEUED_FILE,payload:{queuedId:e}})},t.succeedUpload=function(e,t){return n=>n({type:o.default.SUCCEED_UPLOAD,payload:{queuedId:e,json:t}})},t.updateQueuedFile=function(e,t){return n=>n({type:o.default.UPDATE_QUEUED_FILE,payload:{queuedId:e,updates:t}})};var r,o=(r=n(4973))&&r.__esModule?r:{default:r}},6511:function(e,t,n){"use strict";var r=n(7418),o={};var i=function(e){};function s(e,t,n,r,o,s,l,a){if(i(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,r,o,s,l,a],c=0;(u=new Error(t.replace(/%s/g,(function(){return d[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}var l="mixins";e.exports=function(e,t,n){var i=[],a={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},u={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},d={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return l(e,(function(e){var n=s(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=a(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=u},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.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=r.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,o=null,s=null;if(!0===this.props.useGriddleStyles){var l={float:"left",minHeight:"1px",marginTop:"5px"};s=i({textAlign:"right",width:"34%"},l),o=i({textAlign:"center",width:"33%"},l),n=i({width:"33%"},l)}for(var a=[],u=1;u<=this.props.maxPage;u++)a.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},a)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:s},t))}});e.exports=s},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=(n(3059),n(7024)),s=n(3560),l=n(7287),a=n(8583),u=n(1747),d=n(3220),c=n(2569),p=o({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&&s(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&s(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&s(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&s(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&s(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 o=this.props.columnSettings.getColumns(),p=l(o,[]),f=a({},this.props.data);u(f,p);var h,m,g=d(i.pick(f,c(o,"children"))).map((function(t,o){var i=null,s=e.props.columnSettings.getColumnMetadataByName(t[0]),l=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=a(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=s)if(void 0!==s.customComponent&&null!==s.customComponent){var u=r.createElement(s.customComponent,{data:t[1],rowData:f,metadata:s});i=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:s.cssClassName,key:o,style:n},u)}else i=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:s.cssClassName,key:o,style:n},l,e.formatData(t[1]));return i||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},l,t[1])}));if(null!==this.props.onRowClick&&s(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var y=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?y="child-row":t.props.hasChildren&&(y=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:y},g)}});e.exports=p},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=(n(3059),n(8718)),s=o({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 r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?i(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 o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var i=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(i,{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 r.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:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=s},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=n(4721),s=n(2569),l=n(3311),a=o({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===i(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(s(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=i(e.props.selectedColumns,t),s=l(e.props.columnMetadata,{columnName:t}),a=t;return void 0!==s&&void 0!==s.displayName&&null!=s.displayName&&(a=s.displayName),void 0!==s&&null!=s&&s.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),a)):void 0!==s&&null!=s&&void 0!==s.visible&&!1===s.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),a))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=a},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),i=n(4769),s=n(3302),l=(n(3059),n(5203),o({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,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-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,o=null,i=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"};o=r.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*l+"px"};i=r.createElement("tr",{key:"below-"+p.height,style:p})}var f=n.map((function(n,o){var i=void 0!==n.children&&n.children.length>0,l=e.props.rowSettings.getRowKey(n,o);return i&&(t=i),r.createElement(s,{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:i,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(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),i&&f.push(i),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,s=null,l={width:"100%"};if(this.props.useFixedLayout&&(l.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var a,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),a=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");s=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:a},d)))}var c=this.props.showTableHeading?r.createElement(i,{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=r.createElement("tbody",null,e));var p=r.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=r.createElement("tbody",null,r.createElement("tr",null,r.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"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},e,s,p)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&l||null},c,e,s,p))}}));e.exports=l},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=N(O(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return j(b.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),j(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return T(n,(function(n){var o=b.getAt(n,r||""),i=e[r];return t(r||"",o,i)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=M(n,t);else{var r={};r[t]=e,n=P({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=this.getMaxPage(n.filteredResults),(D(e)||A(e)||I(e))&&(n.filter=e,n.filteredResults=null),this.setState(n),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 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)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=O(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})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),i={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};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=b.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,N(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?b.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new v(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 r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var i,s=this.state.sortColumn,l=T(this.props.columnMetadata,{columnName:s}),a={columns:[],orders:[]};if(l.length>0&&(i=l[0].hasOwnProperty("customCompareFn")&&l[0].customCompareFn,l[0].multiSort&&(a=l[0].multiSort)),this.state.sortDirection)if("function"==typeof i)2===i.length?(e=e.sort((function(e,t){return i(k(e,s),k(t,s))})),"desc"===this.state.sortDirection&&e.reverse()):1===i.length&&(e=R(e,(function(e){return i(k(e,s))}),[this.state.sortDirection]));else{var u=[function(e){return(k(e,s)||"").toString().toLowerCase()}],d=[this.state.sortDirection];a.columns.forEach((function(e,t){u.push((function(t){return(k(t,e)||"").toString().toLowerCase()})),"asc"===a.orders[t]||"desc"===a.orders[t]?d.push(a.orders[t]):d.push(r.state.sortDirection)})),e=R(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=_(e,(c+1)*this.state.resultsPerPage);else{var p=C(e,c*this.state.resultsPerPage);e=(E||x)(p,p.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.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)),r=this;w(e,(function(e){r._updateSelectedRowIds(e[r.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),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,N(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_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===F(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?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(a,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.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,r=null,i=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),i=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:i},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.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}):o.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?o.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 o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,i){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:i,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,i){var s=this.getSortObject(),a=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(l,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:s,multipleSelectionSettings:a,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,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:i,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,r,o,i){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,i):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.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(),r=this.getTopSection(t,n),i=[],s=this.columnSettings.getColumns(),l=this.getDataForRender(e,s,!0),a=this.columnSettings.getMetadataColumns();this.props.columnMetadata?w(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||i.push(e.columnName)})):i=b.keys(M(e[0],a)),i=this.columnSettings.orderColumns(i);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=L},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(c=a,p=!1,t=new r(t));e:for(;++d0&&i(d)?n>1?e(d,n-1,i,s,l):r(l,d):s||(l[l.length]=d)}return l}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n=120&&y.length>=120)?new r(f&&y):void 0}y=e[0];var v=-1,b=h[0];e:for(;++vo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++rt||s&&l&&u&&!a&&!d||o&&l&&u||!n&&u||!i)return 1;if(!o&&!s&&!d&&e=a?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,l&&o(n[0],n[1],l)&&(s=i<3?void 0:s,i=1),t=Object(t);++r-1?l[a?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),i=n(8776),s=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?i(t):"[object Set]"==n?s(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,s,l,a){var u=1&n,d=e.length,c=t.length;if(d!=c&&!(u&&c>d))return!1;var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=l},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=o(i.length-t,0),a=Array(l);++s0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&i(t[0],t[1],u)&&(r=1);++n-1:!!d&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),i=n(5976),s=n(4387),l=i((function(e){var t=r(e,s);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=l},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,s=i.hasOwnProperty,l=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return o(e)&&s.call(e,"callee")&&!l.call(e,"callee")};e.exports=a},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,l=s&&s.exports===i?r.Buffer:void 0,a=(l?l.isBuffer:void 0)||o;e.exports=a},1609:function(e,t,n){var r=n(280),o=n(4160),i=n(5694),s=n(1469),l=n(8612),a=n(4144),u=n(5726),d=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(l(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||a(e)||d(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(c.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),s=i&&i.isMap,l=s?o(s):r;e.exports=l},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),i=n(7005),s=Function.prototype,l=Object.prototype,a=s.toString,u=l.hasOwnProperty,d=a.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==d}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),s=i&&i.isSet,l=s?o(s):r;e.exports=l},7037:function(e,t,n){var r=n(4239),o=n(1469),i=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),s=i&&i.isTypedArray,l=s?o(s):r;e.exports=l},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),i=n(9199),s=n(1469);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),i=n(7406),s=n(1811),l=n(8363),a=n(696),u=n(9021),d=n(6904),c=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=s(t,e),u||(u=t.length>1),t})),l(e,d(e),n),u&&(n=o(n,7,a));for(var c=t.length;c--;)i(n,t[c]);return n}));e.exports=c},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,i){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=i?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),i=n(5403),s=n(327);e.exports=function(e){return i(e)?r(s(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),i=n(5076),s=n(1469),l=n(6612);e.exports=function(e,t,n){var a=s(e)?r:i;return n&&l(e,t,n)&&(t=void 0),a(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),i=n(5976),s=n(6612),l=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&s(e,t[0],t[1])?t=[]:n>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=l},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),i=n(3448),s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):s.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},84:function(e,t,n){var r=n(9932),o=n(278),i=n(1469),s=n(3448),l=n(5514),a=n(327),u=n(9833);e.exports=function(e){return i(e)?r(e,a):s(e)?[e]:o(l(u(e)))}},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),i=n(9246),s=o((function(e,t){return i(e)?r(e,t):[]}));e.exports=s},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=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 r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var i,s,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a1)for(var n=1;n1?t-1:0),r=1;r2?n-2:0),i=2;i1&&void 0!==arguments[1]&&arguments[1],n=this.props,r=n.tolerance,o=n.onSelection,i=n.onEndSelection,s=[],l=(0,d.findDOMNode)(this.refs.selectbox);l&&(this._registry.forEach((function(e){e.domNode&&(0,g.default)(l,e.domNode,r)&&!s.includes(e.key)&&s.push(e.key)})),t?"function"==typeof i&&i(s,e):"function"==typeof o&&o(s,e))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.enabled,r=e.fixedPosition,o=e.className,i=e.selectingClassName,s=this.state,l=s.isBoxSelecting,a=s.boxLeft,d=s.boxTop,c=s.boxWidth,f=s.boxHeight,h=this.props.component;if(!n)return u.default.createElement(h,{className:o},t);var m={left:a,top:d,width:c,height:f,zIndex:9e3,position:r?"fixed":"absolute",cursor:"default"},g={backgroundColor:"transparent",border:"1px dashed #999",width:"100%",height:"100%",float:"left"},y={position:"relative",overflow:"visible"};return u.default.createElement(h,{className:(0,p.default)(o,l?i:null),style:y},l?u.default.createElement("div",{style:m,ref:"selectbox"},u.default.createElement("span",{style:g})):null,t)}}]),t}(a.Component);v.propTypes={children:c.default.node,onBeginSelection:c.default.func,onEndSelection:c.default.func,onSelection:c.default.func,component:c.default.node,tolerance:c.default.number,fixedPosition:c.default.bool,preventDefault:c.default.bool,onNonItemClick:c.default.func,enabled:c.default.bool,className:c.default.string,selectingClassName:c.default.string},v.defaultProps={component:"div",tolerance:0,fixedPosition:!1,preventDefault:!0,enabled:!0},v.childContextTypes={selectable:c.default.object},t.default=v},function(e,t,n){"use strict";(function(t){var 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=n(1),i=n(2),s=n(8),l=n(15),a=n(3),u=n(16);e.exports=function(e,n){function d(e){var t=e&&(I&&e[I]||e[A]);if("function"==typeof t)return t}function c(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){this.message=e,this.stack=""}function f(e){function r(r,u,d,c,f,h,m){if(c=c||D,h=h||d,m!==a)if(n)i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+d;!o[g]&&l<3&&(s(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,c),o[g]=!0,l++)}return null==u[d]?r?new p(null===u[d]?"The "+f+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+f+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(u,d,c,f,h)}if("production"!==t.env.NODE_ENV)var o={},l=0;var u=r.bind(null,!1);return u.isRequired=r.bind(null,!0),u}function h(e){function t(t,n,r,o,i,s){var l=t[n];return w(l)!==e?new p("Invalid "+o+" `"+i+"` of type `"+x(l)+"` supplied to `"+r+"`, expected `"+e+"`."):null}return f(t)}function m(e){function t(t,n,r,o,i){if("function"!=typeof e)return new p("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new p("Invalid "+o+" `"+i+"` of type `"+w(s)+"` supplied to `"+r+"`, expected an array.");for(var l=0;ln+l||t+o-ar+s)};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e instanceof HTMLElement?(0,r.default)(e):e,s=t instanceof HTMLElement?(0,r.default)(t):t;return o(i.top,i.left,s.top,s.left,i.offsetWidth,i.offsetHeight,s.offsetWidth,s.offsetHeight,n)}},function(e,t,n){"use strict";(function(t){function n(e,t,n){function r(t){var n=m,r=g;return m=g=void 0,w=t,v=e.apply(r,n)}function i(e){return w=e,b=setTimeout(d,t),x?r(e):v}function s(e){var n=t-(e-C);return F?S(n,y-(e-w)):n}function a(e){var n=e-C;return void 0===C||n>=t||n<0||F&&e-w>=y}function d(){var e=_();if(a(e))return c(e);b=setTimeout(d,s(e))}function c(e){return b=void 0,O&&m?r(e):(m=g=void 0,v)}function p(){void 0!==b&&clearTimeout(b),w=0,m=C=g=b=void 0}function f(){return void 0===b?v:c(_())}function h(){var e=_(),n=a(e);if(m=arguments,g=this,C=e,n){if(void 0===b)return i(C);if(F)return b=setTimeout(d,t),r(C)}return void 0===b&&(b=setTimeout(d,t)),v}var m,g,y,v,b,C,w=0,x=!1,F=!1,O=!0;if("function"!=typeof e)throw new TypeError(u);return t=l(t)||0,o(n)&&(x=!!n.leading,y=(F="maxWait"in n)?E(l(n.maxWait)||0,t):y,O="trailing"in n?!!n.trailing:O),h.cancel=p,h.flush=f,h}function r(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new TypeError(u);return o(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),n(e,t,{leading:i,maxWait:t,trailing:s})}function o(e){var t=void 0===e?"undefined":a(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==(void 0===e?"undefined":a(e))}function s(e){return"symbol"==(void 0===e?"undefined":a(e))||i(e)&&C.call(e)==c}function l(e){if("number"==typeof e)return e;if(s(e))return d;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(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,v="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,b=y||v||Function("return this")(),C=Object.prototype.toString,E=Math.max,S=Math.min,_=function(){return b.Date.now()};e.exports=r}).call(t,n(21))},function(e,t,n){"use strict";var r,o="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};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function 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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n
'),this.element.appendChild(e));let t=e.getElementsByTagName("span")[0];return t&&(null!=t.textContent?t.textContent=this.options.dictFallbackMessage:null!=t.innerText&&(t.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(e,t,n,r){let o={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},i=e.width/e.height;null==t&&null==n?(t=o.srcWidth,n=o.srcHeight):null==t?t=n*i:null==n&&(n=t/i);let s=(t=Math.min(t,o.srcWidth))/(n=Math.min(n,o.srcHeight));if(o.srcWidth>t||o.srcHeight>n)if("crop"===r)i>s?(o.srcHeight=e.height,o.srcWidth=o.srcHeight*s):(o.srcWidth=e.width,o.srcHeight=o.srcWidth/s);else{if("contain"!==r)throw new Error(`Unknown resizeMethod '${r}'`);i>s?n=t/i:t=n*i}return o.srcX=(e.width-o.srcWidth)/2,o.srcY=(e.height-o.srcHeight)/2,o.trgWidth=t,o.trgHeight=n,o},transformFile(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:i('
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n \n \n
\n
\n \n \n \n
\n
\n'),drop(e){return this.element.classList.remove("dz-drag-hover")},dragstart(e){},dragend(e){return this.element.classList.remove("dz-drag-hover")},dragenter(e){return this.element.classList.add("dz-drag-hover")},dragover(e){return this.element.classList.add("dz-drag-hover")},dragleave(e){return this.element.classList.remove("dz-drag-hover")},paste(e){},reset(){return this.element.classList.remove("dz-started")},addedfile(e){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){for(var t of(e.previewElement=a.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),e.previewElement.querySelectorAll("[data-dz-name]")))t.textContent=e.name;for(t of e.previewElement.querySelectorAll("[data-dz-size]"))t.innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=a.createElement(`${this.options.dictRemoveFile}`),e.previewElement.appendChild(e._removeLink));let n=t=>(t.preventDefault(),t.stopPropagation(),e.status===a.UPLOADING?a.confirm(this.options.dictCancelUploadConfirmation,(()=>this.removeFile(e))):this.options.dictRemoveFileConfirmation?a.confirm(this.options.dictRemoveFileConfirmation,(()=>this.removeFile(e))):this.removeFile(e));for(let t of e.previewElement.querySelectorAll("[data-dz-remove]"))t.addEventListener("click",n)}},removedfile(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(let n of e.previewElement.querySelectorAll("[data-dz-thumbnail]"))n.alt=e.name,n.src=t;return setTimeout((()=>e.previewElement.classList.add("dz-image-preview")),1)}},error(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);for(let n of e.previewElement.querySelectorAll("[data-dz-errormessage]"))n.textContent=t}},errormultiple(){},processing(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(e,t,n){if(e.previewElement)for(let n of e.previewElement.querySelectorAll("[data-dz-uploadprogress]"))"PROGRESS"===n.nodeName?n.value=t:n.style.width=`${t}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple(){},canceled(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple(){},complete(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};class a extends s{static initClass(){this.prototype.Emitter=s,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter((e=>e.accepted)).map((e=>e))}getRejectedFiles(){return this.files.filter((e=>!e.accepted)).map((e=>e))}getFilesWithStatus(e){return this.files.filter((t=>t.status===e)).map((e=>e))}getQueuedFiles(){return this.getFilesWithStatus(a.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(a.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(a.ADDED)}getActiveFiles(){return this.files.filter((e=>e.status===a.UPLOADING||e.status===a.QUEUED)).map((e=>e))}init(){if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(a.createElement(`
`)),this.clickableElements.length){let e=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(null===this.options.maxFiles||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",null!==this.options.acceptedFiles&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),null!==this.options.capture&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",a.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",(()=>{let{files:t}=this.hiddenFileInput;if(t.length)for(let e of t)this.addFile(e);this.emit("addedfiles",t),e()}))};e()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(let e of this.events)this.on(e,this.options[e]);this.on("uploadprogress",(()=>this.updateTotalUploadProgress())),this.on("removedfile",(()=>this.updateTotalUploadProgress())),this.on("canceled",(e=>this.emit("complete",e))),this.on("complete",(e=>{if(0===this.getAddedFiles().length&&0===this.getUploadingFiles().length&&0===this.getQueuedFiles().length)return setTimeout((()=>this.emit("queuecomplete")),0)}));let e=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;tthis.emit("dragstart",e),dragenter:t=>(e(t),this.emit("dragenter",t)),dragover:t=>{let n;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",e(t),this.emit("dragover",t)},dragleave:e=>this.emit("dragleave",e),drop:t=>(e(t),this.drop(t)),dragend:e=>this.emit("dragend",e)}}],this.clickableElements.forEach((e=>this.listeners.push({element:e,events:{click:t=>((e!==this.element||t.target===this.element||a.elementInside(t.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}}))),this.enable(),this.options.init.call(this)}destroy(){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,a.instances.splice(a.instances.indexOf(this),1)}updateTotalUploadProgress(){let e,t=0,n=0;if(this.getActiveFiles().length){for(let e of this.getActiveFiles())t+=e.upload.bytesSent,n+=e.upload.total;e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}_getParamName(e){return"function"==typeof this.options.paramName?this.options.paramName(e):`${this.options.paramName}${this.options.uploadMultiple?`[${e}]`:""}`}_renameFile(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}getFallbackForm(){let e,t;if(e=this.getExistingFallback())return e;let n='
';this.options.dictFallbackText&&(n+=`

${this.options.dictFallbackText}

`),n+=`
`;let r=a.createElement(n);return"FORM"!==this.element.tagName?(t=a.createElement(`
`),t.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:r}getExistingFallback(){let e=function(e){for(let t of e)if(/(^| )fallback($| )/.test(t.className))return t};for(let n of["div","form"]){var t;if(t=e(this.element.getElementsByTagName(n)))return t}}setupEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.addEventListener(n,r,!1))}return t})()))}removeEventListeners(){return this.listeners.map((e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.removeEventListener(n,r,!1))}return t})()))}disable(){return this.clickableElements.forEach((e=>e.classList.remove("dz-clickable"))),this.removeEventListeners(),this.disabled=!0,this.files.map((e=>this.cancelUpload(e)))}enable(){return delete this.disabled,this.clickableElements.forEach((e=>e.classList.add("dz-clickable"))),this.setupEventListeners()}filesize(e){let t=0,n="b";if(e>0){let r=["tb","gb","mb","kb","b"];for(let o=0;o=Math.pow(this.options.filesizeBase,4-o)/10){t=e/Math.pow(this.options.filesizeBase,4-o),n=i;break}}t=Math.round(10*t)/10}return`${t} ${this.options.dictFileSizeUnits[n]}`}_updateMaxFilesReachedClass(){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")}drop(e){if(!e.dataTransfer)return;this.emit("drop",e);let t=[];for(let n=0;ne.items,null!=t?n(t):void 0))return;var t,n;this.emit("paste",e);let{items:r}=e.clipboardData;return r.length?this._addFilesFromItems(r):void 0}handleFiles(e){for(let t of e)this.addFile(t)}_addFilesFromItems(e){return(()=>{let t=[];for(let r of e){var n;null!=r.webkitGetAsEntry&&(n=r.webkitGetAsEntry())?n.isFile?t.push(this.addFile(r.getAsFile())):n.isDirectory?t.push(this._addFilesFromDirectory(n,n.name)):t.push(void 0):null!=r.getAsFile&&(null==r.kind||"file"===r.kind)?t.push(this.addFile(r.getAsFile())):t.push(void 0)}return t})()}_addFilesFromDirectory(e,t){let n=e.createReader(),r=e=>{return t=console,n="log",r=t=>t.log(e),null!=t&&"function"==typeof t[n]?r(t,n):void 0;var t,n,r};var o=()=>n.readEntries((e=>{if(e.length>0){for(let n of e)n.isFile?n.file((e=>{if(!this.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=`${t}/${e.name}`,this.addFile(e)})):n.isDirectory&&this._addFilesFromDirectory(n,`${t}/${n.name}`);o()}return null}),r);return o()}accept(e,t){this.options.maxFilesize&&e.size>1048576*this.options.maxFilesize?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):a.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}addFile(e){e.upload={uuid:a.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=a.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(t=>{t?(e.accepted=!1,this._errorProcessing([e],t)):(e.accepted=!0,this.options.autoQueue&&this.enqueueFile(e)),this._updateMaxFilesReachedClass()}))}enqueueFiles(e){for(let t of e)this.enqueueFile(t);return null}enqueueFile(e){if(e.status!==a.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=a.QUEUED,this.options.autoProcessQueue)return setTimeout((()=>this.processQueue()),0)}_enqueueThumbnail(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1048576*this.options.maxThumbnailFilesize)return this._thumbnailQueue.push(e),setTimeout((()=>this._processThumbnailQueue()),0)}_processThumbnailQueue(){if(this._processingThumbnail||0===this._thumbnailQueue.length)return;this._processingThumbnail=!0;let e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(t=>(this.emit("thumbnail",e,t),this._processingThumbnail=!1,this._processThumbnailQueue())))}removeFile(e){if(e.status===a.UPLOADING&&this.cancelUpload(e),this.files=u(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}removeAllFiles(e){null==e&&(e=!1);for(let t of this.files.slice())(t.status!==a.UPLOADING||e)&&this.removeFile(t);return null}resizeImage(e,t,n,r,o){return this.createThumbnail(e,t,n,r,!0,((t,n)=>{if(null==n)return o(e);{let{resizeMimeType:t}=this.options;null==t&&(t=e.type);let r=n.toDataURL(t,this.options.resizeQuality);return"image/jpeg"!==t&&"image/jpg"!==t||(r=p.restore(e.dataURL,r)),o(a.dataURItoBlob(r))}}))}createThumbnail(e,t,n,r,o,i){let s=new FileReader;s.onload=()=>{e.dataURL=s.result,"image/svg+xml"!==e.type?this.createThumbnailFromUrl(e,t,n,r,o,i):null!=i&&i(s.result)},s.readAsDataURL(e)}displayExistingFile(e,t,n,r,o=!0){if(this.emit("addedfile",e),this.emit("complete",e),o){let o=t=>{this.emit("thumbnail",e,t),n&&n()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,o,r)}else this.emit("thumbnail",e,t),n&&n()}createThumbnailFromUrl(e,t,n,r,o,i,s){let l=document.createElement("img");return s&&(l.crossOrigin=s),o="from-image"!=getComputedStyle(document.body).imageOrientation&&o,l.onload=()=>{let s=e=>e(1);return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(s=e=>EXIF.getData(l,(function(){return e(EXIF.getTag(this,"Orientation"))}))),s((o=>{e.width=l.width,e.height=l.height;let s=this.options.resize.call(this,e,t,n,r),a=document.createElement("canvas"),u=a.getContext("2d");switch(a.width=s.trgWidth,a.height=s.trgHeight,o>4&&(a.width=s.trgHeight,a.height=s.trgWidth),o){case 2:u.translate(a.width,0),u.scale(-1,1);break;case 3:u.translate(a.width,a.height),u.rotate(Math.PI);break;case 4:u.translate(0,a.height),u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI),u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI),u.translate(0,-a.width);break;case 7:u.rotate(.5*Math.PI),u.translate(a.height,-a.width),u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI),u.translate(-a.height,0)}c(u,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);let d=a.toDataURL("image/png");if(null!=i)return i(d,a)}))},null!=i&&(l.onerror=i),l.src=e.dataURL}processQueue(){let{parallelUploads:e}=this.options,t=this.getUploadingFiles().length,n=t;if(t>=e)return;let r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-t));for(;nt.xhr===e)).map((e=>e))}cancelUpload(e){if(e.status===a.UPLOADING){let t=this._getFilesWithXhr(e.xhr);for(let e of t)e.status=a.CANCELED;void 0!==e.xhr&&e.xhr.abort();for(let e of t)this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",t)}else e.status!==a.ADDED&&e.status!==a.QUEUED||(e.status=a.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(e,...t){return"function"==typeof e?e.apply(this,t):e}uploadFile(e){return this.uploadFiles([e])}uploadFiles(e){this._transformFiles(e,(t=>{if(this.options.chunking){let n=t[0];e[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||n.size>this.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(n.size/this.options.chunkSize)}if(e[0].upload.chunked){let n=e[0],r=t[0],o=0;n.upload.chunks=[];let i=()=>{let t=0;for(;void 0!==n.upload.chunks[t];)t++;if(t>=n.upload.totalChunkCount)return;o++;let i=t*this.options.chunkSize,s=Math.min(i+this.options.chunkSize,r.size),l={name:this._getParamName(0),data:r.webkitSlice?r.webkitSlice(i,s):r.slice(i,s),filename:n.upload.filename,chunkIndex:t};n.upload.chunks[t]={file:n,index:t,dataBlock:l,status:a.UPLOADING,progress:0,retries:0},this._uploadData(e,[l])};if(n.upload.finishedChunkUpload=(t,r)=>{let o=!0;t.status=a.SUCCESS,t.dataBlock=null,t.response=t.xhr.responseText,t.responseHeaders=t.xhr.getAllResponseHeaders(),t.xhr=null;for(let e=0;e{this._finished(e,r,null)}))},this.options.parallelChunkUploads)for(let e=0;e{this._finishedUploading(e,n,t)},n.ontimeout=()=>{this._handleUploadError(e,n,`Request timedout after ${this.options.timeout/1e3} seconds`)},n.onerror=()=>{this._handleUploadError(e,n)},(null!=n.upload?n.upload:n).onprogress=t=>this._updateFilesUploadProgress(e,n,t);let s=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(s["Content-Type"]=e[0].type),this.options.headers&&r(s,this.options.headers);for(let e in s){let t=s[e];t&&n.setRequestHeader(e,t)}if(this.options.binaryBody){for(let t of e)this.emit("sending",t,n);this.options.uploadMultiple&&this.emit("sendingmultiple",e,n),this.submitRequest(n,null,e)}else{let r=new FormData;if(this.options.params){let t=this.options.params;"function"==typeof t&&(t=t.call(this,e,n,e[0].upload.chunked?this._getChunk(e[0],n):null));for(let e in t){let n=t[e];if(Array.isArray(n))for(let t=0;t{n[o]=i,++r===e.length&&t(n)}))}_addFormElementData(e){if("FORM"===this.element.tagName)for(let t of this.element.querySelectorAll("input, textarea, select, button")){let n=t.getAttribute("name"),r=t.getAttribute("type");if(r&&(r=r.toLowerCase()),null!=n)if("SELECT"===t.tagName&&t.hasAttribute("multiple"))for(let r of t.options)r.selected&&e.append(n,r.value);else(!r||"checkbox"!==r&&"radio"!==r||t.checked)&&e.append(n,t.value)}}_updateFilesUploadProgress(e,t,n){if(e[0].upload.chunked){let r=e[0],o=this._getChunk(r,t);n?(o.progress=100*n.loaded/n.total,o.total=n.total,o.bytesSent=n.loaded):(o.progress=100,o.bytesSent=o.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(let e=0;ethis.options.renameFilename.call(this,e.name,e)),"string"==typeof this.options.method&&(this.options.method=this.options.method.toUpperCase()),(n=this.getExistingFallback())&&n.parentNode&&n.parentNode.removeChild(n),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=a.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=a.getElements(this.options.clickable,"clickable")),this.init()}}a.initClass(),a.options={},a.optionsForElement=function(e){return e.getAttribute("id")?a.options[d(e.getAttribute("id"))]:void 0},a.instances=[],a.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},a.discover=function(){let e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];let t=t=>(()=>{let n=[];for(let r of t)/(^| )dropzone($| )/.test(r.className)?n.push(e.push(r)):n.push(void 0);return n})();t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return(()=>{let t=[];for(let n of e)!1!==a.optionsForElement(n)?t.push(new a(n)):t.push(void 0);return t})()},a.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],a.isBrowserSupported=function(){let e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){void 0!==a.blacklistedBrowsers&&(a.blockedBrowsers=a.blacklistedBrowsers);for(let t of a.blockedBrowsers)if(t.test(navigator.userAgent)){e=!1;continue}}else e=!1;else e=!1;return e},a.dataURItoBlob=function(e){let t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(t.length),o=new Uint8Array(r);for(let e=0,n=t.length,r=0<=n;r?e<=n:e>=n;r?e++:e--)o[e]=t.charCodeAt(e);return new Blob([r],{type:n})};const u=(e,t)=>e.filter((e=>e!==t)).map((e=>e)),d=e=>e.replace(/[\-_](\w)/g,(e=>e.charAt(1).toUpperCase()));a.createElement=function(e){let t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},a.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},a.getElement=function(e,t){let n;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},a.getElements=function(e,t){let n,r;if(e instanceof Array){r=[];try{for(n of e)r.push(this.getElement(n,t))}catch(e){r=null}}else if("string"==typeof e)for(n of(r=[],document.querySelectorAll(e)))r.push(n);else null!=e.nodeType&&(r=[e]);if(null==r||!r.length)throw new Error(`Invalid \`${t}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return r},a.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},a.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");let n=e.type,r=n.replace(/\/.*$/,"");for(let o of t)if(o=o.trim(),"."===o.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(o.toLowerCase(),e.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(r===o.replace(/\/.*$/,""))return!0}else if(n===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new a(this,e)}))}),a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success";var c=function(e,t,n,r,o,i,s,l,a,u){let d=function(e){e.naturalWidth;let t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;let r=n.getContext("2d");r.drawImage(e,0,0);let{data:o}=r.getImageData(1,0,1,t),i=0,s=t,l=t;for(;l>i;)0===o[4*(l-1)+3]?s=l:i=l,l=s+i>>1;let a=l/t;return 0===a?1:a}(t);return e.drawImage(t,n,r,o,i,s,l,a,u/d)};class p{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(e){let t,n,r,o,i,s="",l="",a="",u=0;for(;t=e[u++],n=e[u++],l=e[u++],r=t>>2,o=(3&t)<<4|n>>4,i=(15&n)<<2|l>>6,a=63&l,isNaN(n)?i=a=64:isNaN(l)&&(a=64),s=s+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(a),t=n=l="",r=o=i=a="",ue.length)break}return n}static decode64(e){let t,n,r,o,i,s="",l="",a=0,u=[];for(/[^A-Za-z0-9\+\/\=]/g.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++)),o=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|o>>4,n=(15&o)<<4|i>>2,s=(3&i)<<6|l,u.push(t),64!==i&&u.push(n),64!==l&&u.push(s),t=n=s="",r=o=i=l="",ae.execCommand(f),priority:80},editorIdentifier).addCommandWithUrlTest(f,/^\[file_link/);const h={init(e){e.addCommand(f,(()=>{(0,i.default)(`#${e.id}`).entwine("ss").openLinkFileDialog()}))}},m="insert-link__dialog-wrapper--file",g=(0,a.loadComponent)(l.default);i.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkFileDialog(){let t=e(`#${m}`);t.length||(t=e(`
`),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`.js-injector-boot #${m}`).entwine({ReactRoot:null,renderModal(e){var t=this;const{dispatch:n}=a.default.reducer.store;n(u.initFormStack("insert-link","admin"));const i=this.getOriginalAttributes(),s=this.getElement().getEditor(),l=s.getInstance().selection,d=this.getFolderId(),c=s.getSelection(),p="A"!==l.getNode().tagName&&""===c.trim();let f=this.getReactRoot();f||(f=(0,o.createRoot)(this[0]),this.setReactRoot(f)),f.render(r.default.createElement(g,{isOpen:e,type:"insert-link",folderId:d,onInsert:function(){return t.handleInsert(...arguments)},onClosed:()=>{n(u.reset()),this.close()},title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:i,requireLinkText:p}))},buildAttributes(e){return{href:`${s.default.serialise({name:"file_link",properties:{id:e.ID}},!0)}${e.Anchor&&e.Anchor.length?`#${e.Anchor}`:""}`,target:e.TargetBlank?"_blank":"",title:e.Description}},getFolderId(){const e=this.getElement();if(!e)return null;const t=Number(e.data("config").upload_folder_id);return isNaN(t)?null:t},getOriginalAttributes(){const t=this.getElement().getEditor(),n=e(t.getSelectedNode()),r=(n.attr("href")||"").split("#");if(!r[0])return{};const o=s.default.match("file_link",!1,r[0]);return o?{ID:o.properties.id?parseInt(o.properties.id,10):0,Anchor:r[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})})),tinymce.PluginManager.add(f,(e=>h.init(e)))}()}(); \ No newline at end of file diff --git a/client/src/entwine/TinyMCE_sslink-file.js b/client/src/entwine/TinyMCE_sslink-file.js index e0829500e..ce11e62c0 100644 --- a/client/src/entwine/TinyMCE_sslink-file.js +++ b/client/src/entwine/TinyMCE_sslink-file.js @@ -72,6 +72,7 @@ jQuery.entwine('ss', ($) => { const attrs = this.getOriginalAttributes(); const editor = this.getElement().getEditor(); const selection = editor.getInstance().selection; + const folderId = this.getFolderId(); const selectionContent = editor.getSelection(); const tagName = selection.getNode().tagName; const requireLinkText = tagName !== 'A' && selectionContent.trim() === ''; @@ -86,6 +87,7 @@ jQuery.entwine('ss', ($) => { { }; }, + /** + * Get default upload folder + * + * @returns {(number|null)} + */ + getFolderId() { + const $field = this.getElement(); + if (!$field) { + return null; + } + + // Check type safely + const folderId = Number($field.data('config').upload_folder_id); + return isNaN(folderId) ? null : folderId; + }, + getOriginalAttributes() { const editor = this.getElement().getEditor(); const node = $(editor.getSelectedNode()); diff --git a/code/Forms/AssetFormFactory.php b/code/Forms/AssetFormFactory.php index 3731e755f..cd7aad4c3 100644 --- a/code/Forms/AssetFormFactory.php +++ b/code/Forms/AssetFormFactory.php @@ -152,9 +152,9 @@ protected function getSaveAction($record) ->setIcon('save') ->setSchemaState([ 'data' => [ - 'pristineTitle' => _t(__CLASS__.'SAVED', 'Saved'), + 'pristineTitle' => _t(__CLASS__.'.SAVED', 'Saved'), 'pristineIcon' => 'tick', - 'dirtyTitle' => _t(__CLASS__.'SAVE', 'Save'), + 'dirtyTitle' => _t(__CLASS__.'.SAVE', 'Save'), 'dirtyIcon' => 'save', 'pristineClass' => 'btn-outline-primary', 'dirtyClass' => '', diff --git a/code/Forms/FileFormFactory.php b/code/Forms/FileFormFactory.php index 2e4222343..f977c0cd0 100644 --- a/code/Forms/FileFormFactory.php +++ b/code/Forms/FileFormFactory.php @@ -249,9 +249,9 @@ protected function getPublishAction($record) 'data' => [ 'isPublished' => $record->isPublished(), 'isModified' => $record->isModifiedOnDraft(), - 'pristineTitle' => _t(__CLASS__ . 'PUBLISHED', 'Published'), + 'pristineTitle' => _t(__CLASS__ . '.PUBLISHED', 'Published'), 'pristineIcon' => 'tick', - 'dirtyTitle' => _t(__CLASS__ . 'PUBLISH', 'Publish'), + 'dirtyTitle' => _t(__CLASS__ . '.PUBLISH', 'Publish'), 'dirtyIcon' => 'rocket', 'pristineClass' => 'btn-outline-primary', 'dirtyClass' => 'btn-primary', diff --git a/code/Forms/MoveFormFactory.php b/code/Forms/MoveFormFactory.php index 24442a125..8488ca13d 100644 --- a/code/Forms/MoveFormFactory.php +++ b/code/Forms/MoveFormFactory.php @@ -23,13 +23,13 @@ public function getForm(RequestHandler $controller = null, $name = self::DEFAULT FieldList::create( TreeDropdownField::create( 'FolderID', - _t(__CLASS__.'CHOOSEFOLDER', 'Choose a folder'), + _t(__CLASS__.'.CHOOSEFOLDER', 'Choose a folder'), Folder::class )->setValue((int) $context['FolderID']) ->setTitleField('Filename') ), FieldList::create( - FormAction::create('move', _t(__CLASS__.'MOVE', 'Move')) + FormAction::create('move', _t(__CLASS__.'.MOVE', 'Move')) ->addExtraClass('btn-primary font-icon-folder-move') ) ); diff --git a/lang/af.yml b/lang/af.yml index a533eac2c..c103b5872 100644 --- a/lang/af.yml +++ b/lang/af.yml @@ -16,8 +16,6 @@ af: EDITINFO: 'Verander die lêer' FIELDNOTSET: 'Die lêer informasie kan nie gevind word nie' REMOVE: Verwyder - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/ar.yml b/lang/ar.yml index a5f974b3f..a787a1545 100644 --- a/lang/ar.yml +++ b/lang/ar.yml @@ -17,8 +17,6 @@ ar: EDITINFO: 'قم بتعديل هذا الملف' FIELDNOTSET: 'لا يوجد معلومات عن الملف' REMOVE: حذف - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/bg.yml b/lang/bg.yml index e11fd0d17..61d2ab95b 100644 --- a/lang/bg.yml +++ b/lang/bg.yml @@ -18,8 +18,6 @@ bg: EDITINFO: 'Редактирай този файл' FIELDNOTSET: 'Информация за файла не беше намерена' REMOVE: Премахни - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/bs.yml b/lang/bs.yml index df0ab6cc2..43b0cd6b2 100644 --- a/lang/bs.yml +++ b/lang/bs.yml @@ -10,8 +10,6 @@ bs: Filetype: 'File type' ImageSpecs: Dimensions LASTEDIT: 'Last changed' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/cs.yml b/lang/cs.yml index c4559dd2a..538d742e4 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -19,8 +19,6 @@ cs: EDITINFO: 'Editovat tento soubor' FIELDNOTSET: 'Žádná informace o souboru' REMOVE: Odstranit - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/da.yml b/lang/da.yml index 57a6f5a1c..0e5d6944d 100644 --- a/lang/da.yml +++ b/lang/da.yml @@ -1,13 +1,4 @@ da: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Gem - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Gemt - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Udgiv - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Udgivet - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Vælg en mappe' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Flyt SilverStripe\AssetAdmin\BatchAction\DeleteAssets: TITLE: 'Slet mapper' SilverStripe\AssetAdmin\Controller\AssetAdmin: diff --git a/lang/de.yml b/lang/de.yml index 61f1a9191..37b68c47d 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -1,13 +1,4 @@ de: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Speichern - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Gespeichert - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Veröffentlichen - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Veröffentlicht - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Ordner auswählen' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Verschieben SilverStripe\AssetAdmin\BatchAction\DeleteAssets: TITLE: 'Ordner löschen' SilverStripe\AssetAdmin\Controller\AssetAdmin: diff --git a/lang/el.yml b/lang/el.yml index bd6d11cce..9e7a8ec1e 100644 --- a/lang/el.yml +++ b/lang/el.yml @@ -8,8 +8,6 @@ el: Filetype: 'File type' ImageSpecs: Dimensions LASTEDIT: 'Last changed' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/en.yml b/lang/en.yml index de90fd073..a7c04cfcb 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -2,15 +2,6 @@ en: AssetAdmin: INSERT_FILE: 'Insert file' UPDATE_FILE: 'Update file' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Saved - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Publish - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Published - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Choose a folder' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Move SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Restricted access' TRACKED_FORM_UPLOAD_RESTRICTED: 'Form submission' @@ -80,6 +71,7 @@ en: ONLY_GROUPS: 'Only these groups (choose from list)' ROOTNAME: '(Top level)' SAVE: Save + SAVED: Saved VIEWERGROUPS: 'Viewer Groups' SilverStripe\AssetAdmin\Forms\FileFormFactory: DOWNLOAD_FILE: 'Download file' @@ -89,6 +81,8 @@ en: LINKOPTIONS: 'Link options' LINKTEXT: 'Link text' OTHER_ACTIONS: 'Other actions' + PUBLISH: Publish + PUBLISHED: Published REPLACE_FILE: 'Replace file' UNEMEDABLE_MESSAGE: '

This file type can only be inserted as a link. You can edit the link once it is inserted.

' USAGE: 'Used on' @@ -99,6 +93,9 @@ en: CREATE: Create SilverStripe\AssetAdmin\Forms\FolderFormFactory: FOLDERNAME: 'Folder name' + SilverStripe\AssetAdmin\Forms\MoveFormFactory: + CHOOSEFOLDER: 'Choose a folder' + MOVE: Move SilverStripe\AssetAdmin\Forms\RemoteFileFormFactory: AddMedia: 'Add media' Cancel: Cancel diff --git a/lang/eo.yml b/lang/eo.yml index bce0cf8e6..5d332f2af 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -2,15 +2,6 @@ eo: AssetAdmin: INSERT_FILE: 'Enmeti dosieron' UPDATE_FILE: 'Ĝisdatigi dosieron' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Konservi - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Konservita - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Publikigi - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Publikigita - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Elekti dosierujon' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Movi SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Limigita aliro' TRACKED_FORM_UPLOAD_RESTRICTED: 'Sendi formularon' diff --git a/lang/es.yml b/lang/es.yml index 8fe0d9bfa..0bfc95573 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -19,8 +19,6 @@ es: EDITINFO: 'Editar este archivo' FIELDNOTSET: 'No ha sido encontrada la información del archivo' REMOVE: Eliminar - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/et_EE.yml b/lang/et_EE.yml index 1cd2bbcf6..014d49925 100644 --- a/lang/et_EE.yml +++ b/lang/et_EE.yml @@ -17,8 +17,6 @@ et_EE: EDITINFO: 'Muuda seda faili' FIELDNOTSET: 'Failiteavet ei leitud' REMOVE: Eemalda - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/fa_IR.yml b/lang/fa_IR.yml index 215822e85..3415ac50a 100644 --- a/lang/fa_IR.yml +++ b/lang/fa_IR.yml @@ -19,8 +19,6 @@ fa_IR: EDITINFO: 'ویرایش این فایل' FIELDNOTSET: 'اطلاعات فایل پیدا نشد' REMOVE: حذف - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/fi.yml b/lang/fi.yml index eba10a017..f835fb389 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -19,8 +19,6 @@ fi: EDITINFO: 'Muokkaa tätä tiedostoa' FIELDNOTSET: 'Tietoja tiedostosta ei löytynyt' REMOVE: Poista - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/fr.yml b/lang/fr.yml index 32bbc314a..9bb25e6ba 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -1,13 +1,4 @@ fr: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Sauvegarder - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Sauvegardé - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Publier - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Publié - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Choisir un dossier' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Déplacer SilverStripe\AssetAdmin\BatchAction\DeleteAssets: TITLE: 'Supprimer les dossiers' SilverStripe\AssetAdmin\Controller\AssetAdmin: diff --git a/lang/gl_ES.yml b/lang/gl_ES.yml index 6e0130951..c61dfbd83 100644 --- a/lang/gl_ES.yml +++ b/lang/gl_ES.yml @@ -11,8 +11,6 @@ gl_ES: SilverStripe\AssetAdmin\Forms\UploadField: EDITINFO: 'Editar este ficheiro' FIELDNOTSET: 'Ficheiro de información non atopado' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/he_IL.yml b/lang/he_IL.yml index 3e63627cb..ef519462e 100644 --- a/lang/he_IL.yml +++ b/lang/he_IL.yml @@ -11,8 +11,6 @@ he_IL: Filetype: 'File type' ImageSpecs: Dimensions LASTEDIT: 'Last changed' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/hr.yml b/lang/hr.yml index c96d42e3f..9501593f1 100644 --- a/lang/hr.yml +++ b/lang/hr.yml @@ -1,13 +1,4 @@ hr: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Spremi - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Spremljeno - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Objavi - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Objavljeno - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Odaberi direktorij' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Premjesti SilverStripe\AssetAdmin\BatchAction\DeleteAssets: TITLE: 'Obriši direktorije' SilverStripe\AssetAdmin\Controller\AssetAdmin: diff --git a/lang/hu.yml b/lang/hu.yml index 816b15f47..1c2faf7e8 100644 --- a/lang/hu.yml +++ b/lang/hu.yml @@ -10,8 +10,6 @@ hu: Filetype: 'File type' ImageSpecs: Dimensions LASTEDIT: 'Last changed' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/id.yml b/lang/id.yml index c8de223b7..08408e53b 100644 --- a/lang/id.yml +++ b/lang/id.yml @@ -17,8 +17,6 @@ id: EDITINFO: 'Edit berkas ini' FIELDNOTSET: 'Informasi berkas tidak ada' REMOVE: Buang - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/is.yml b/lang/is.yml index 60faecf0e..9e2fd834d 100644 --- a/lang/is.yml +++ b/lang/is.yml @@ -1,6 +1,4 @@ is: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Controller\AssetAdmin: CREATED: 'First uploaded' DELETE_BUTTON: Delete diff --git a/lang/it.yml b/lang/it.yml index ff8693ef7..ed17c7e57 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -2,15 +2,6 @@ it: AssetAdmin: INSERT_FILE: 'Inserire file' UPDATE_FILE: 'Aggiorna file' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Salva - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Salvato - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Pubblica - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Pubblicato - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Scegli una cartella' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Sposta SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Accesso ristretto' TRACKED_FORM_UPLOAD_RESTRICTED: 'Inoltro modulo' diff --git a/lang/ja.yml b/lang/ja.yml index d739f38cf..c4de0a7e5 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -17,8 +17,6 @@ ja: EDITINFO: このファイルを編集 FIELDNOTSET: ファイル情報が見つかりませんでした REMOVE: 削除 - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/ko.yml b/lang/ko.yml index 254f01ba6..f6936b746 100644 --- a/lang/ko.yml +++ b/lang/ko.yml @@ -8,8 +8,6 @@ ko: Filetype: 'File type' ImageSpecs: Dimensions LASTEDIT: 'Last changed' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/lt.yml b/lang/lt.yml index b720487c1..8e488c7a5 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -22,13 +22,6 @@ lt: EDITINFO: 'Redaguoti šią bylą' FIELDNOTSET: 'Informacija apie bylą nerasta' REMOVE: Pašalinti - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Publikuoti - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Publikuota - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Perkelti SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Ribotas priėjimas' SilverStripe\AssetAdmin\Forms\AssetFormFactory: diff --git a/lang/mi.yml b/lang/mi.yml index 33383fde6..e7a2d6514 100644 --- a/lang/mi.yml +++ b/lang/mi.yml @@ -17,8 +17,6 @@ mi: EDITINFO: 'Whakatikatia tēnei kōnae' FIELDNOTSET: 'Kāore i kitea te mōhiohio kōnae' REMOVE: Tango - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/nb.yml b/lang/nb.yml index 7bdc68fb0..22df06e26 100644 --- a/lang/nb.yml +++ b/lang/nb.yml @@ -17,8 +17,6 @@ nb: EDITINFO: 'Rediger denne filen' FIELDNOTSET: 'Filinformasjon ikke funnet' REMOVE: Fjern - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/nl.yml b/lang/nl.yml index eff4c52ae..23172ed37 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -2,15 +2,6 @@ nl: AssetAdmin: INSERT_FILE: 'Bestand invoegen' UPDATE_FILE: 'Bestand aanpassen' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Opslaan - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Opgeslagen - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Publiceer - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Gepubliceerd - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Kies een map' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Verplaats SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Toegang beperkt' TRACKED_FORM_UPLOAD_RESTRICTED: 'Formulier inzending' diff --git a/lang/pl.yml b/lang/pl.yml index 835c13bbd..f11fa3b11 100644 --- a/lang/pl.yml +++ b/lang/pl.yml @@ -1,13 +1,4 @@ pl: - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Zapisz - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Zapisano - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Opublikuj - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Opublikowano - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Wybierz folder' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Przenieś SilverStripe\AssetAdmin\BatchAction\DeleteAssets: TITLE: 'Usuń folder' SilverStripe\AssetAdmin\Controller\AssetAdmin: diff --git a/lang/pt.yml b/lang/pt.yml index 018fe0b31..369c460c4 100644 --- a/lang/pt.yml +++ b/lang/pt.yml @@ -11,8 +11,6 @@ pt: SilverStripe\AssetAdmin\Forms\UploadField: EDITINFO: 'Editar este ficheiro' FIELDNOTSET: 'Informação do ficheiro não encontrada' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/ro.yml b/lang/ro.yml index da21fc2f4..0839edede 100644 --- a/lang/ro.yml +++ b/lang/ro.yml @@ -10,8 +10,6 @@ ro: LASTEDIT: 'Last changed' SilverStripe\AssetAdmin\Forms\UploadField: EDITINFO: 'Editeaza acest fisier' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/ru.yml b/lang/ru.yml index 30ab6298a..0e585c65c 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -19,8 +19,6 @@ ru: EDITINFO: 'Редактировать этот файл' FIELDNOTSET: 'Информация о файле не найдена' REMOVE: Удалить - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/sk.yml b/lang/sk.yml index 37330ca6b..746f55f1b 100644 --- a/lang/sk.yml +++ b/lang/sk.yml @@ -19,8 +19,6 @@ sk: EDITINFO: 'Editovať súbor' FIELDNOTSET: 'Žiadna informácia o súbore' REMOVE: Odstrániť - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/sl.yml b/lang/sl.yml index 462234092..d299874ec 100644 --- a/lang/sl.yml +++ b/lang/sl.yml @@ -2,15 +2,6 @@ sl: AssetAdmin: INSERT_FILE: 'Vstavi datoteko' UPDATE_FILE: 'Posodobi datoteko' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Shrani - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVED: Shranjeno - FileFormFactory: - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISH: Objavi - php.SilverStripe\AssetAdmin\Forms\FileFormFactoryPUBLISHED: Objavljeno - MoveFormFactory: - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryCHOOSEFOLDER: 'Izberite mapo' - php.SilverStripe\AssetAdmin\Forms\MoveFormFactoryMOVE: Premakni SilverStripe\Admin\FileStatusIcon: ACCESS_RESTRICTED: 'Dostop omejen' TRACKED_FORM_UPLOAD_RESTRICTED: 'Uporaba obrazca' diff --git a/lang/sr.yml b/lang/sr.yml index 7f5f8b13c..cfdb7c421 100644 --- a/lang/sr.yml +++ b/lang/sr.yml @@ -17,8 +17,6 @@ sr: EDITINFO: 'Измени ову датотеку' FIELDNOTSET: 'Информације о датотеци нису пронађене' REMOVE: Уклони - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/sr_RS@latin.yml b/lang/sr_RS@latin.yml index bb071fc1e..9d02fbecf 100644 --- a/lang/sr_RS@latin.yml +++ b/lang/sr_RS@latin.yml @@ -17,8 +17,6 @@ sr_RS@latin: EDITINFO: 'Izmeni ovu datoteku' FIELDNOTSET: 'Informacije o datoteci nisu pronađene' REMOVE: Ukloni - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/sv.yml b/lang/sv.yml index 47edcad64..08cc69a6a 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -19,8 +19,6 @@ sv: EDITINFO: 'Redigera filen' FIELDNOTSET: 'Hittade ingen filinformation' REMOVE: 'Ta bort' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/th.yml b/lang/th.yml index 5f3a99bb9..ad6c0330e 100644 --- a/lang/th.yml +++ b/lang/th.yml @@ -16,8 +16,6 @@ th: EDITINFO: แก้ไขไฟล์นี้ FIELDNOTSET: ไม่พบข้อมูลเกี่ยวกับไฟล์ REMOVE: ลบออก - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/uk.yml b/lang/uk.yml index bfce25550..0f6327d43 100644 --- a/lang/uk.yml +++ b/lang/uk.yml @@ -12,8 +12,6 @@ uk: LASTEDIT: 'Last changed' SilverStripe\AssetAdmin\Forms\UploadField: EDITINFO: 'Редагувати цей файл' - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/lang/zh.yml b/lang/zh.yml index 7ef5501ae..196c5370a 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -17,8 +17,6 @@ zh: EDITINFO: 编辑该文件 FIELDNOTSET: 没有找到文件信息 REMOVE: 移除 - AssetFormFactory: - php.SilverStripe\AssetAdmin\Forms\AssetFormFactorySAVE: Save SilverStripe\AssetAdmin\Forms\AssetFormFactory: FILENAME: Filename SAVE: Save diff --git a/yarn.lock b/yarn.lock index 6dafd9407..a6d52daf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2854,11 +2854,6 @@ binary-extensions@^2.0.0, binary-extensions@^2.2.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - bootstrap@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.6.2.tgz#8e0cd61611728a5bf65a3a2b8d6ff6c77d5d7479" @@ -3356,22 +3351,6 @@ css-loader@^6.7.1: postcss-value-parser "^4.2.0" semver "^7.3.8" -css-select@^4.1.3: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -3627,13 +3606,6 @@ dom-accessibility-api@^0.5.9: resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== -dom-converter@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" - integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== - dependencies: - utila "~0.4" - dom-helpers@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" @@ -3641,20 +3613,6 @@ dom-helpers@^3.4.0: dependencies: "@babel/runtime" "^7.1.2" -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - domexception@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" @@ -3662,22 +3620,6 @@ domexception@^4.0.0: dependencies: webidl-conversions "^7.0.0" -domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@^2.5.2, domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - dropzone@^6.0.0-beta.2: version "6.0.0-beta.2" resolved "https://registry.yarnpkg.com/dropzone/-/dropzone-6.0.0-beta.2.tgz#098be8fa84bdc08674cf0b74f4c889e2679083d6" @@ -3731,11 +3673,6 @@ enhanced-resolve@^5.14.1: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - entities@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" @@ -4865,16 +4802,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -htmlparser2@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - http-cache-semantics@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" @@ -6878,13 +6805,6 @@ npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -7754,17 +7674,6 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -renderkid@^2.0.4: - version "2.0.7" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.7.tgz#464f276a6bdcee606f4a15993f9b29fc74ca8609" - integrity sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ== - dependencies: - css-select "^4.1.3" - dom-converter "^0.2.0" - htmlparser2 "^6.1.0" - lodash "^4.17.21" - strip-ansi "^3.0.1" - repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" @@ -8323,7 +8232,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: +strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== @@ -8784,11 +8693,6 @@ util@^0.10.3: dependencies: inherits "2.0.3" -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== - uuid@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"