colonel-kurtz
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(37),s=r(11),c=r(19),u=r(25),l=r(1),p=r(51),f=r(27);r(61);var d=function(){function e(t){var r=this;o(this,e),this.id=f(),this.el=t.el,this._callbacks=[],c(n({id:this.id,block:p(void 0,t.seed||[])},t)),s.subscribe(function(){return r.simulateChange()}),setTimeout(this.simulateChange.bind(this),10)}return i(e,null,{render:{value:function(){return l.render(this._rootComponent(),this._getDomElement()),this},writable:!0,configurable:!0},simulateChange:{value:function(){this._runCallbacks()},writable:!0,configurable:!0},addCallback:{value:function(e){this._callbacks=this._callbacks.concat(e)},writable:!0,configurable:!0},removeCallback:{value:function(e){this._callbacks=this._callbacks.filter(function(t){return t!==e})},writable:!0,configurable:!0},toJSON:{value:function(){return u.find(this.id).block.toJSON().blocks},writable:!0,configurable:!0},toHtml:{value:function(){return l.renderToStaticMarkup(this._rootComponent())},writable:!0,configurable:!0},_rootComponent:{value:function(){return l.createElement(a,{editorId:this.id})},writable:!0,configurable:!0},_getDomElement:{value:function(){return this.el},writable:!0,configurable:!0},_runCallbacks:{value:function(){var e=this.toJSON();this._callbacks.forEach(function(t){t(e)})},writable:!0,configurable:!0}}),e}();d.createBlock=r(26),d.addBlockType=r(49),e.exports=d},function(e){e.exports=require("react")},function(e,t,r){"use strict";var n=r(52).Dispatcher;e.exports=new n},function(e,t,r){"use strict";var n=r(56);e.exports=n({EDIT_MODE:null,PREVIEW_MODE:null})},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){"use strict";var n=r(6),i=r(1),o=r(8);e.exports={mixins:[o],propTypes:{block:i.PropTypes.any.isRequired},getState:function(){return{blocks:n.childrenFor(this.props.block)}}}},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(11),o=r(48),a=r(2),s=r(4),c=[],u={childrenFor:function(e){return c.filter(function(t){return t.parent===e})},all:function(){return c},last:function(){return c[c.length-1]},find:function(e){var t=c.filter(function(t){return t.id===e})[0];return s(t,"Unable to find block with id of %s",e),t},_create:function(e,t){var r=e.content,n=e.type,a=e.parent,s=new o({content:r,type:n,parent:a});return t instanceof o?t=u._indexOf(t.id)+1:void 0==t&&(t=c.length),c.splice(t,0,s),i.publish(),s},_destroy:function(e){c=c.filter(function(t){for(var r=t;r;r=r.parent)if(r.id==e)return!1;return!0}),i.publish()},_update:function(e,t){var r=u.find(e);r.content=n({},r.content,t),i.publish()},_indexOf:function(e){return c.indexOf(u.find(e))},_move:function(e,t){var r=u._indexOf(e),n=u._indexOf(t);c.splice(n,0,c.splice(r,1)[0]),i.publish()},_seed:function(){for(var e,t=void 0===arguments[0]?u._create({}):arguments[0],r=void 0===arguments[1]?[]:arguments[1],n=r[Symbol.iterator]();!(e=n.next()).done;){var i=e.value,o=i.blocks,a=i.content,s=i.type;u._seed(u._create({content:a,parent:t,type:s}),o)}return t},dispatchToken:a.register(function(e){switch(e.type){case r(14):u._create(e.params,e.position);break;case r(15):u._destroy(e.id);break;case r(17):u._update(e.id,e.content);break;case r(16):u._move(e.fromId,e.toId)}})};e.exports=u},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(2),o=(r(1),r(4)),a=[],s={icon:null,types:null},c={keys:function(){return a.map(function(e){return e.id})},find:function(e){var t=a.filter(function(t){return t.id===e})[0];return o(t,"Unable to find block type with an id of %s"),t},_create:function(e){var t=n({},s,e);o(t.id,"BlockType must have an identifier"),a=a.concat(t)},_remove:function(e){a=a.filter(function(t){return t.id!==e})},dispatchToken:i.register(function(e){switch(e.type){case r(18):c._create(e.params)}})};e.exports=c},function(e){e.exports=require("diode/stateful")},,function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},i=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},o=n(r(1)),a=o.createClass({displayName:"Button",getDefaultProps:function(){return{tagName:"button",type:"button"}},render:function(){var e=this.props,t=e.children,r=e.tagName,n=i(e,["children","tagName"]);return o.createElement(r,n,[t])}});e.exports=a},function(e){e.exports=require("diode")},,,function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,params:e,position:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,id:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,fromId:e,toId:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,content:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,params:t})}},function(e,t,r){"use strict";var n=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(7),a=r(24),s=r(8),c=r(1),u=r(17),l=c.createClass({displayName:"Block",mixins:[s,a],propTypes:{block:c.PropTypes.any.isRequired},getState:function(){return o.find(this.props.block.type)},render:function(){var e=this.props,t=e.block,r=n(e,["block"]),o=this.state.component;return c.createElement(o,i({initialContent:t.content,updateContent:this._onUpdateContent},r))},_onUpdateContent:function(e){u(this.props.block.id,e)}});e.exports=l},function(e,t,r){"use strict";var n=r(36),i=r(7),o=r(1),a=r(8),s=o.createClass({displayName:"BlockMenu",mixins:[a],propTypes:{editor:o.PropTypes.any.isRequired},getDefaultProps:function(){return{position:0}},getState:function(){var e=this.props,t=e.editor,r=e.block;return{types:r.type?i.find(r.type).types:t.types}},getButton:function(e){var t=this.props,r=t.block,i=t.position;return o.createElement(n,{key:e,type:e,block:r,position:i})},getNavigation:function(){return o.createElement("nav",{className:"col-menu",role:"navigation"},this.state.types.map(this.getButton))},render:function(){return this.state.types?this.getNavigation():null}});e.exports=s},function(e){"use strict";e.exports={remove:"Remove this block",fullscreen:"Toggle fullscreen mode"}},function(e,t,r){"use strict";var n=r(57),i={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};e.exports=i},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(7),o=r(11),a=r(2),s=r(3),c=r(4),u=[],l=function(){return{mode:s.EDIT_MODE,types:i.keys(),preview:!0}},p={find:function(e,t){var r=u.filter(function(t){return t.id===e})[0];return t||c(r,"Unable to find editor with an id of %s",e),r},_create:function(e){var t=n({},l(),e);c(s[t.mode],"Unacceptable mode for editor: "+t.mode),c(!p.find(t.id,!0),"Editors must have a unique identifier"),u=u.concat(t),o.publish()},_update:function(e,t){var r=p.find(e),i=u.indexOf(r);u=u.concat(),u[i]=n({},l(),r,t),o.publish()},dispatchToken:a.register(function(e){switch(e.type){case r(19):p._create(e.params);break;case r(20):p._update(e.id,e.params)}})};e.exports=p},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(1),o=r(47);e.exports=function(e){var t=e.mixins||[];return t.indexOf(o)<0&&(t=t.concat(o)),i.createClass(n({},e,{React:i,mixins:t}))}},function(e){"use strict";var t=0,r=function(){return t+=1};e.exports=r},function(e){e.exports=require("react/lib/ReactCSSTransitionGroup")},,,,,,,,function(e,t,r){"use strict";var n=r(7),i=r(10),o=r(14),a=r(1),s=a.createClass({displayName:"AddBlock",getInitialState:function(){return n.find(this.props.type)},render:function(){var e=this.state,t=e.icon,r=e.id,n=e.label;return a.createElement(i,{"aria-label":n,className:"col-btn-icon",onClick:this._onClick},a.createElement("img",{src:t,alt:r,"aria-hidden":"true"}))},_onClick:function(e){var t=this.props,r=t.block,n=t.position,i=t.type;o({content:null,parent:r,type:i},n),e.preventDefault()}});e.exports=s},function(e,t,r){"use strict";var n=r(38),i=r(25),o=(r(3),r(41)),a=r(1),s=r(8),c=r(23),u=r(50),l=a.createClass({displayName:"App",mixins:[s],getState:function(){return{editor:i.find(this.props.editorId)}},fullscreen:function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){u(this.getDOMNode())}),render:function(){var e=this.state.editor;return a.createElement("div",{className:"colonel"},a.createElement(o,{editor:e}),a.createElement(n,{editor:e}),a.createElement("button",{type:"button","aria-label":c.fullscreen,className:"col-fullscreen",onClick:this._onFullscreenClick},"Fullscreen"))},_onFullscreenClick:function(e){e.preventDefault(),this.fullscreen()}});e.exports=l},function(e,t,r){"use strict";var n=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},i=r(1),o=r(3),a=function(){var e={};return n(e,o.EDIT_MODE,r(39)),n(e,o.PREVIEW_MODE,r(43)),e}(),s=i.createClass({displayName:"ContentSection",render:function(){var e=this.props.editor,t=e.block;return i.createElement(a[e.mode],{block:t,editor:e})}});e.exports=s},function(e,t,r){"use strict";var n=r(28),i=r(22),o=r(40),a=r(5),s=r(1),c=s.createClass({displayName:"Editor",mixins:[a],getBlock:function(e){return s.createElement(o,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return s.createElement(n,{component:"div",className:"col-content",transitionName:"col-block"},s.createElement(i,{key:"block_menu",block:t,editor:r}),this.state.blocks.map(this.getBlock))}});e.exports=c},function(e,t,r){"use strict";var n=r(28),i=r(21),o=r(22),a=r(5),s=r(42),c=r(1),u=r(46),l=c.createClass({displayName:"EditorBlock",mixins:[a],getBlock:function(e){return c.createElement(l,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return c.createElement("div",null,c.createElement(s,{block:t},c.createElement(o,{ref:"prepend",block:t,editor:r,position:t.parent}),c.createElement(i,{block:t,mode:r.mode}),c.createElement(n,{component:"div",className:"col-blocks",transitionName:"col-block"},this.state.blocks.map(this.getBlock)),c.createElement(u,{block:t})),c.createElement(o,{ref:"append",block:t.parent,editor:r,position:t}))}});e.exports=l},function(e,t,r){"use strict";var n=r(10),i=r(1),o=i.PropTypes,a=r(20),s=r(3),c=r(24),u=i.createClass({displayName:"ModeSelection",mixins:[c],propType:{editor:o.object.isRequired,modes:o.object},getDefaultProps:function(){return{modes:s}},getTab:function(e){var t=this,r=this.props,o=r.editor,a=r.modes,s={className:"col-tabs-btn",disabled:o.mode===a[e],onClick:function(r){return t._onModeClick(r,a[e])}};return i.createElement("li",{key:e,className:"col-tabs-list-item",role:"tab"},i.createElement(n,s,e.replace("_"," ")))},getTabs:function(){return Object.keys(this.props.modes).map(this.getTab)},render:function(){return this.props.editor.preview?i.createElement("nav",{role:"navigation",className:"col-tabs"},i.createElement("ul",{className:"col-tabs-list",role:"tablist"},this.getTabs())):null},_onModeClick:function(e,t){e.preventDefault(),a(this.props.editor.id,{mode:t})}});e.exports=u},function(e,t,r){"use strict";var n=r(55),i=r(16),o=r(1),a=o.createClass({displayName:"Orderable",render:function(){var e=this.props,t=e.block,r=e.children;return o.createElement(n,{className:"col-block",message:t.id,onDrop:this._onDrop},r)},_onDrop:function(e){i(e,this.props.block.id)}});e.exports=a},function(e,t,r){"use strict";var n=(r(6),r(5)),i=r(44),o=r(1),a=o.createClass({displayName:"Previewer",mixins:[n],getBlock:function(e){return o.createElement(i,{key:e.id,block:e,editor:this.props.editor})},render:function(){return o.createElement("div",{className:"col-blocks"},this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(21),i=r(5),o=r(1),a=o.createClass({displayName:"PreviewerBlock",mixins:[i],getBlock:function(e){return o.createElement(a,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return o.createElement("div",null,o.createElement(n,{block:t,mode:r.mode}),this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(10),i=r(15),o=r(23),a=r(1),s=a.createClass({displayName:"RemoveBlock",render:function(){return a.createElement(n,{"aria-label":o.remove,className:"col-btn-remove",onClick:this._onClick},"×")},_onClick:function(e){e.preventDefault(),i(this.props.block.id)}});e.exports=s},function(e,t,r){"use strict";var n=r(1),i=r(45),o=n.createClass({displayName:"Toolbar",render:function(){return n.createElement("div",{className:"col-toolbar"},n.createElement(i,{block:this.props.block}))}});e.exports=o},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=(r(1),r(3)),o=r(4),a={getDefaultProps:function(){return{mode:i.EDIT_MODE}},getInitialState:function(){return o(this.defaultContent,"BlockType mixin requires `defaultContent` implementation."),{content:this.props.initialContent||this.defaultContent()}},setContent:function(e){var t=n({},this.state.content,e);this.setState({content:t},function(){this.props.updateContent(this.state.content)})},editMode:function(){return this.props.mode===i.EDIT_MODE},render:function(){return o(this.renderEditor,"BlockType mixin requires `renderEditor` implementation."),o(this.renderPreviewer,"BlockType mixin requires `renderPreviewer` implementation."),this.editMode()?this.renderEditor():this.renderPreviewer()}};e.exports=a},function(e,t,r){"use strict";var n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=r(27),a=function(){function e(t){i(this,e),this.id=o(),this.content=t.content||null,this.parent=t.parent,this.type=t.type}return n(e,null,{toJSON:{value:function(){var e=r(6);return{blocks:e.childrenFor(this).map(function(e){return e.toJSON()}),content:this.content,type:this.type}},writable:!0,configurable:!0}}),e}();e.exports=a},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(18),o=r(1),a=r(26);e.exports=function(e){var t=e.component;o.isValidElement(t)===!1&&(t=a(t)),i(n({},e,{component:t}))}},function(e){"use strict";e.exports=function(e){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){return n._seed(e,t)}},function(e,t,r){e.exports.Dispatcher=r(53)},function(e,t,r){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=r(54),o=1,a="ID_";n.prototype.register=function(e){var t=a+o++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){i(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var r=e[t];this.$Dispatcher_isPending[r]?i(this.$Dispatcher_isHandled[r],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",r):(i(this.$Dispatcher_callbacks[r],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",r),this.$Dispatcher_invokeCallback(r))}},n.prototype.dispatch=function(e){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){!function(t,n){e.exports=n(r(1))}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){"use strict";var n=t.interopRequire(r(1)),i=t.interopRequire(r(2)),o=t.interopRequire(r(3)),a=n.PropTypes,s=n.createClass({displayName:"Draggable",propTypes:{draggableChildren:a.bool,message:a.any.isRequired,onDrop:a.func.isRequired},getDefaultProps:function(){return{draggableChildren:!1,dropEffect:"copy",effectAllowed:"all"}},getInitialState:function(){return{draggable:!0,dragging:!1,droppable:!1}},render:function(){var e=i(this.props.className,i({dragon:!0,"dragon-dragging":this.state.dragging,"dragon-droppable":this.state.droppable}));return n.createElement("div",{className:e,draggable:this.state.draggable,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,onDragStart:this._onDragStart,onDragEnd:this._onDragEnd},n.createElement("div",{ref:"children",className:"dragon-children",onFocus:this._onFocus,onBlur:this._onBlur},this.props.children))},_isDraggableAt:function(e,t){if(this.props.draggableChildren)return!0;var r=document.elementFromPoint(e,t),n=this.refs.children.getDOMNode();return r==n||o(r,n)},_onFocus:function(){this.setState({draggable:!1})},_onBlur:function(){this.setState({draggable:!0})},_onDragStart:function(e){return this._isDraggableAt(e.pageX,e.pageY)?e.preventDefault():(e.dataTransfer.setData("text/plain",JSON.stringify(this.props.message)),e.dataTransfer.dropEffect=this.props.dropEffect,e.dataTransfer.effectAllowed=this.props.effectAllowed,void this.setState({dragging:!0}))},_onDragEnd:function(e){e.preventDefault(),this.setState({droppable:!1,dragging:!1})},_onDragOver:function(e){e.preventDefault(),this.setState({droppable:!0})},_onDragLeave:function(e){e.preventDefault(),this.setState({droppable:!1})},_onDrop:function(e){e.preventDefault();var t=JSON.parse(e.dataTransfer.getData("text/plain")),r=this.props.message;this.props.onDrop(t,r),this.setState({droppable:!1,dragging:!1})}});e.exports=s}).call(t,r(4))},function(t){t.exports=e},function(e){"use strict";function t(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}e.exports=t},function(e){"use strict";function t(e,t){for(var r=e;r;){if(r==t)return!0;r=r.parentNode}return!1}e.exports=t},function(e){var t={};!function(e){var t=e.to5Runtime={};t.inherits=function(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&&(e.__proto__=t)},t.defaults=function(e,t){for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},t.prototypeProperties=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},t.applyConstructor=function(e,t){var r=Object.create(e.prototype),n=e.apply(r,t);return null==n||"object"!=typeof n&&"function"!=typeof n?r:n},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.interopRequire=function(e){return e&&(e["default"]||e)},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.slicedToArray=function(e,t){if(Array.isArray(e))return e;for(var r,n=[],i=e[Symbol.iterator]();!(r=i.next()).done&&(n.push(r.value),!t||n.length!==t););return n},t.objectWithoutProperties=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},t.interopRequireWildcard=function(e){return e&&e.constructor===Object?e:{"default":e}},t._extends=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e},t.get=function r(e,r,t){var n=Object.getOwnPropertyDescriptor(e,r);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:r(i,r,t)}if("value"in n&&n.writable)return n.value;var o=n.get;return void 0===o?void 0:o.call(t)}}("undefined"==typeof t?self:t),e.exports=t.to5Runtime}])})},function(e,t,r){"use strict";var n=r(4),i=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;var r;for(r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||e[r]!==t[r]))return!1;for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}e.exports=t},,,,function(){}]); | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(37),s=r(11),c=r(19),u=r(25),l=r(1),p=r(51),f=r(27);r(61);var d=function(){function e(t){var r=this;o(this,e),this.id=f(),this.el=t.el,this._callbacks=[],c(n({id:this.id,block:p(void 0,t.seed||[])},t)),s.subscribe(function(){return r.simulateChange()}),setTimeout(this.simulateChange.bind(this),10)}return i(e,null,{render:{value:function(){return l.render(this._rootComponent(),this._getDomElement()),this},writable:!0,configurable:!0},simulateChange:{value:function(){this._runCallbacks()},writable:!0,configurable:!0},addCallback:{value:function(e){this._callbacks=this._callbacks.concat(e)},writable:!0,configurable:!0},removeCallback:{value:function(e){this._callbacks=this._callbacks.filter(function(t){return t!==e})},writable:!0,configurable:!0},toJSON:{value:function(){return u.find(this.id).block.toJSON().blocks},writable:!0,configurable:!0},toHtml:{value:function(){return l.renderToStaticMarkup(this._rootComponent())},writable:!0,configurable:!0},_rootComponent:{value:function(){return l.createElement(a,{editorId:this.id})},writable:!0,configurable:!0},_getDomElement:{value:function(){return this.el},writable:!0,configurable:!0},_runCallbacks:{value:function(){var e=this.toJSON();this._callbacks.forEach(function(t){t(e)})},writable:!0,configurable:!0}}),e}();d.createBlock=r(26),d.addBlockType=r(49),e.exports=d},function(e){e.exports=require("react")},function(e,t,r){"use strict";var n=r(52).Dispatcher;e.exports=new n},function(e,t,r){"use strict";var n=r(56);e.exports=n({EDIT_MODE:null,PREVIEW_MODE:null})},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){"use strict";var n=r(6),i=r(1),o=r(8);e.exports={mixins:[o],propTypes:{block:i.PropTypes.any.isRequired},getState:function(){return{blocks:n.childrenFor(this.props.block)}}}},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(11),o=r(48),a=r(2),s=r(4),c=[],u={childrenFor:function(e){return c.filter(function(t){return t.parent===e})},all:function(){return c},last:function(){return c[c.length-1]},find:function(e){var t=c.filter(function(t){return t.id===e})[0];return s(t,"Unable to find block with id of %s",e),t},_create:function(e,t){var r=e.content,n=e.type,a=e.parent,s=new o({content:r,type:n,parent:a});return t instanceof o?t=u._indexOf(t.id)+1:void 0==t&&(t=c.length),c.splice(t,0,s),i.publish(),s},_destroy:function(e){c=c.filter(function(t){for(var r=t;r;r=r.parent)if(r.id==e)return!1;return!0}),i.publish()},_update:function(e,t){var r=u.find(e);r.content=n({},r.content,t),i.publish()},_indexOf:function(e){return c.indexOf(u.find(e))},_move:function(e,t){var r=u._indexOf(e),n=u._indexOf(t);c.splice(n,0,c.splice(r,1)[0]),i.publish()},_seed:function(){for(var e,t=void 0===arguments[0]?u._create({}):arguments[0],r=void 0===arguments[1]?[]:arguments[1],n=r[Symbol.iterator]();!(e=n.next()).done;){var i=e.value,o=i.blocks,a=i.content,s=i.type;u._seed(u._create({content:a,parent:t,type:s}),o)}return t}};e.exports=u,a.register(function(e){switch(e.type){case r(14):u._create(e.params,e.position);break;case r(15):u._destroy(e.id);break;case r(17):u._update(e.id,e.content);break;case r(16):u._move(e.fromId,e.toId)}})},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(2),o=(r(1),r(4)),a=[],s={icon:null,types:null},c={keys:function(){return a.map(function(e){return e.id})},find:function(e){var t=a.filter(function(t){return t.id===e})[0];return o(t,"Unable to find block type with an id of %s"),t},_create:function(e){var t=n({},s,e);o(t.id,"BlockType must have an identifier"),a=a.concat(t)}};e.exports=c,i.register(function(e){switch(e.type){case r(18):c._create(e.params)}})},function(e){e.exports=require("diode/stateful")},,function(e,t,r){"use strict";var n=function(e){return e&&e.__esModule?e["default"]:e},i=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},o=n(r(1)),a=o.createClass({displayName:"Button",getDefaultProps:function(){return{tagName:"button",type:"button"}},render:function(){var e=this.props,t=e.children,r=e.tagName,n=i(e,["children","tagName"]);return o.createElement(r,n,[t])}});e.exports=a},function(e){e.exports=require("diode")},,,function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,params:e,position:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,id:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,fromId:e,toId:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,content:t})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e){n.dispatch({type:i,params:e})}},function(e,t,r){"use strict";var n=r(2);e.exports=function i(e,t){n.dispatch({type:i,id:e,params:t})}},function(e,t,r){"use strict";var n=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(7),a=r(24),s=r(8),c=r(1),u=r(17),l=c.createClass({displayName:"Block",mixins:[s,a],propTypes:{block:c.PropTypes.any.isRequired},getState:function(){return o.find(this.props.block.type)},render:function(){var e=this.props,t=e.block,r=n(e,["block"]),o=this.state.component;return c.createElement(o,i({initialContent:t.content,updateContent:this._onUpdateContent},r))},_onUpdateContent:function(e){u(this.props.block.id,e)}});e.exports=l},function(e,t,r){"use strict";var n=r(36),i=r(7),o=r(1),a=r(8),s=o.createClass({displayName:"BlockMenu",mixins:[a],propTypes:{editor:o.PropTypes.any.isRequired},getDefaultProps:function(){return{position:0}},getState:function(){var e=this.props,t=e.editor,r=e.block;return{types:r.type?i.find(r.type).types:t.types}},getButton:function(e){var t=this.props,r=t.block,i=t.position;return o.createElement(n,{key:e,type:e,block:r,position:i})},getNavigation:function(){return o.createElement("nav",{className:"col-menu",role:"navigation"},this.state.types.map(this.getButton))},render:function(){return this.state.types?this.getNavigation():null}});e.exports=s},function(e){"use strict";e.exports={remove:"Remove this block",fullscreen:"Toggle fullscreen mode"}},function(e,t,r){"use strict";var n=r(57),i={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};e.exports=i},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(7),o=r(11),a=r(2),s=r(3),c=r(4),u=[],l=function(){return{mode:s.EDIT_MODE,types:i.keys(),preview:!0}},p={find:function(e,t){var r=u.filter(function(t){return t.id===e})[0];return t||c(r,"Unable to find editor with an id of %s",e),r},_create:function(e){var t=n({},l(),e);c(s[t.mode],"Unacceptable mode for editor: "+t.mode),c(!p.find(t.id,!0),"Editors must have a unique identifier"),u=u.concat(t),o.publish()},_update:function(e,t){var r=p.find(e),i=u.indexOf(r);u=u.concat(),u[i]=n({},l(),r,t),o.publish()}};e.exports=p,a.register(function(e){switch(e.type){case r(19):p._create(e.params);break;case r(20):p._update(e.id,e.params)}})},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(1),o=r(47);e.exports=function(e){var t=e.mixins||[];return t.indexOf(o)<0&&(t=t.concat(o)),i.createClass(n({},e,{React:i,mixins:t}))}},function(e){"use strict";var t=0,r=function(){return t+=1};e.exports=r},function(e){e.exports=require("react/lib/ReactCSSTransitionGroup")},,,,,,,,function(e,t,r){"use strict";var n=r(7),i=r(10),o=r(14),a=r(1),s=a.createClass({displayName:"AddBlock",getInitialState:function(){return n.find(this.props.type)},render:function(){var e=this.state,t=e.icon,r=e.id,n=e.label;return a.createElement(i,{"aria-label":n,className:"col-btn-icon",onClick:this._onClick},a.createElement("img",{src:t,alt:r,"aria-hidden":"true"}))},_onClick:function(e){var t=this.props,r=t.block,n=t.position,i=t.type;o({content:null,parent:r,type:i},n),e.preventDefault()}});e.exports=s},function(e,t,r){"use strict";var n=r(38),i=r(25),o=(r(3),r(41)),a=r(1),s=r(8),c=r(23),u=r(50),l=a.createClass({displayName:"App",mixins:[s],getState:function(){return{editor:i.find(this.props.editorId)}},fullscreen:function(e){var t=function(){return e.apply(this,arguments)};return t.toString=function(){return e.toString()},t}(function(){u(this.getDOMNode())}),render:function(){var e=this.state.editor;return a.createElement("div",{className:"colonel"},a.createElement(o,{editor:e}),a.createElement(n,{editor:e}),a.createElement("button",{type:"button","aria-label":c.fullscreen,className:"col-fullscreen",onClick:this._onFullscreenClick},"Fullscreen"))},_onFullscreenClick:function(e){e.preventDefault(),this.fullscreen()}});e.exports=l},function(e,t,r){"use strict";var n=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},i=r(1),o=r(3),a=function(){var e={};return n(e,o.EDIT_MODE,r(39)),n(e,o.PREVIEW_MODE,r(43)),e}(),s=i.createClass({displayName:"ContentSection",render:function(){var e=this.props.editor,t=e.block;return i.createElement(a[e.mode],{block:t,editor:e})}});e.exports=s},function(e,t,r){"use strict";var n=r(28),i=r(22),o=r(40),a=r(5),s=r(1),c=s.createClass({displayName:"Editor",mixins:[a],getBlock:function(e){return s.createElement(o,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return s.createElement(n,{component:"div",className:"col-content",transitionName:"col-block"},s.createElement(i,{key:"block_menu",block:t,editor:r}),this.state.blocks.map(this.getBlock))}});e.exports=c},function(e,t,r){"use strict";var n=r(28),i=r(21),o=r(22),a=r(5),s=r(42),c=r(1),u=r(46),l=c.createClass({displayName:"EditorBlock",mixins:[a],getBlock:function(e){return c.createElement(l,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return c.createElement("div",null,c.createElement(s,{block:t},c.createElement(o,{ref:"prepend",block:t,editor:r,position:t.parent}),c.createElement(i,{block:t,mode:r.mode}),c.createElement(n,{component:"div",className:"col-blocks",transitionName:"col-block"},this.state.blocks.map(this.getBlock)),c.createElement(u,{block:t})),c.createElement(o,{ref:"append",block:t.parent,editor:r,position:t}))}});e.exports=l},function(e,t,r){"use strict";var n=r(10),i=r(1),o=i.PropTypes,a=r(20),s=r(3),c=r(24),u=i.createClass({displayName:"ModeSelection",mixins:[c],propType:{editor:o.object.isRequired,modes:o.object},getDefaultProps:function(){return{modes:s}},getTab:function(e){var t=this,r=this.props,o=r.editor,a=r.modes,s={className:"col-tabs-btn",disabled:o.mode===a[e],onClick:function(r){return t._onModeClick(r,a[e])}};return i.createElement("li",{key:e,className:"col-tabs-list-item",role:"tab"},i.createElement(n,s,e.replace("_"," ")))},getTabs:function(){return Object.keys(this.props.modes).map(this.getTab)},render:function(){return this.props.editor.preview?i.createElement("nav",{role:"navigation",className:"col-tabs"},i.createElement("ul",{className:"col-tabs-list",role:"tablist"},this.getTabs())):null},_onModeClick:function(e,t){e.preventDefault(),a(this.props.editor.id,{mode:t})}});e.exports=u},function(e,t,r){"use strict";var n=r(55),i=r(16),o=r(1),a=o.createClass({displayName:"Orderable",render:function(){var e=this.props,t=e.block,r=e.children;return o.createElement(n,{className:"col-block",message:t.id,onDrop:this._onDrop},r)},_onDrop:function(e){i(e,this.props.block.id)}});e.exports=a},function(e,t,r){"use strict";var n=(r(6),r(5)),i=r(44),o=r(1),a=o.createClass({displayName:"Previewer",mixins:[n],getBlock:function(e){return o.createElement(i,{key:e.id,block:e,editor:this.props.editor})},render:function(){return o.createElement("div",{className:"col-blocks"},this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(21),i=r(5),o=r(1),a=o.createClass({displayName:"PreviewerBlock",mixins:[i],getBlock:function(e){return o.createElement(a,{key:e.id,block:e,editor:this.props.editor})},render:function(){var e=this.props,t=e.block,r=e.editor;return o.createElement("div",null,o.createElement(n,{block:t,mode:r.mode}),this.state.blocks.map(this.getBlock))}});e.exports=a},function(e,t,r){"use strict";var n=r(10),i=r(15),o=r(23),a=r(1),s=a.createClass({displayName:"RemoveBlock",render:function(){return a.createElement(n,{"aria-label":o.remove,className:"col-btn-remove",onClick:this._onClick},"×")},_onClick:function(e){e.preventDefault(),i(this.props.block.id)}});e.exports=s},function(e,t,r){"use strict";var n=r(1),i=r(45),o=n.createClass({displayName:"Toolbar",render:function(){return n.createElement("div",{className:"col-toolbar"},n.createElement(i,{block:this.props.block}))}});e.exports=o},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=(r(1),r(3)),o=r(4),a={getDefaultProps:function(){return{mode:i.EDIT_MODE}},getInitialState:function(){return o(this.defaultContent,"BlockType mixin requires `defaultContent` implementation."),{content:this.props.initialContent||this.defaultContent()}},setContent:function(e){var t=n({},this.state.content,e);this.setState({content:t},function(){this.props.updateContent(this.state.content)})},editMode:function(){return this.props.mode===i.EDIT_MODE},render:function(){return o(this.renderEditor,"BlockType mixin requires `renderEditor` implementation."),o(this.renderPreviewer,"BlockType mixin requires `renderPreviewer` implementation."),this.editMode()?this.renderEditor():this.renderPreviewer()}};e.exports=a},function(e,t,r){"use strict";var n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=r(27),a=function(){function e(t){i(this,e),this.id=o(),this.content=t.content||null,this.parent=t.parent,this.type=t.type}return n(e,null,{toJSON:{value:function(){var e=r(6);return{blocks:e.childrenFor(this).map(function(e){return e.toJSON()}),content:this.content,type:this.type}},writable:!0,configurable:!0}}),e}();e.exports=a},function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(18),o=r(1),a=r(26);e.exports=function(e){var t=e.component;o.isValidElement(t)===!1&&(t=a(t)),i(n({},e,{component:t}))}},function(e){"use strict";e.exports=function(e){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}},function(e,t,r){"use strict";var n=r(6);e.exports=function(e,t){return n._seed(e,t)}},function(e,t,r){e.exports.Dispatcher=r(53)},function(e,t,r){"use strict";function n(){this.$Dispatcher_callbacks={},this.$Dispatcher_isPending={},this.$Dispatcher_isHandled={},this.$Dispatcher_isDispatching=!1,this.$Dispatcher_pendingPayload=null}var i=r(54),o=1,a="ID_";n.prototype.register=function(e){var t=a+o++;return this.$Dispatcher_callbacks[t]=e,t},n.prototype.unregister=function(e){i(this.$Dispatcher_callbacks[e],"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e),delete this.$Dispatcher_callbacks[e]},n.prototype.waitFor=function(e){i(this.$Dispatcher_isDispatching,"Dispatcher.waitFor(...): Must be invoked while dispatching.");for(var t=0;t<e.length;t++){var r=e[t];this.$Dispatcher_isPending[r]?i(this.$Dispatcher_isHandled[r],"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",r):(i(this.$Dispatcher_callbacks[r],"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",r),this.$Dispatcher_invokeCallback(r))}},n.prototype.dispatch=function(e){i(!this.$Dispatcher_isDispatching,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."),this.$Dispatcher_startDispatching(e);try{for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]||this.$Dispatcher_invokeCallback(t)}finally{this.$Dispatcher_stopDispatching()}},n.prototype.isDispatching=function(){return this.$Dispatcher_isDispatching},n.prototype.$Dispatcher_invokeCallback=function(e){this.$Dispatcher_isPending[e]=!0,this.$Dispatcher_callbacks[e](this.$Dispatcher_pendingPayload),this.$Dispatcher_isHandled[e]=!0},n.prototype.$Dispatcher_startDispatching=function(e){for(var t in this.$Dispatcher_callbacks)this.$Dispatcher_isPending[t]=!1,this.$Dispatcher_isHandled[t]=!1;this.$Dispatcher_pendingPayload=e,this.$Dispatcher_isDispatching=!0},n.prototype.$Dispatcher_stopDispatching=function(){this.$Dispatcher_pendingPayload=null,this.$Dispatcher_isDispatching=!1},e.exports=n},function(e){"use strict";var t=function(e,t,r,n,i,o,a,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[l++]}))}throw c.framesToPop=1,c}};e.exports=t},function(e,t,r){!function(t,n){e.exports=n(r(1))}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){"use strict";var n=t.interopRequire(r(1)),i=t.interopRequire(r(2)),o=t.interopRequire(r(3)),a=n.PropTypes,s=n.createClass({displayName:"Draggable",propTypes:{draggableChildren:a.bool,message:a.any.isRequired,onDrop:a.func.isRequired},getDefaultProps:function(){return{draggableChildren:!1,dropEffect:"copy",effectAllowed:"all"}},getInitialState:function(){return{draggable:!0,dragging:!1,droppable:!1}},render:function(){var e=i(this.props.className,i({dragon:!0,"dragon-dragging":this.state.dragging,"dragon-droppable":this.state.droppable}));return n.createElement("div",{className:e,draggable:this.state.draggable,onDragOver:this._onDragOver,onDragLeave:this._onDragLeave,onDrop:this._onDrop,onDragStart:this._onDragStart,onDragEnd:this._onDragEnd},n.createElement("div",{ref:"children",className:"dragon-children",onFocus:this._onFocus,onBlur:this._onBlur},this.props.children))},_isDraggableAt:function(e,t){if(this.props.draggableChildren)return!0;var r=document.elementFromPoint(e,t),n=this.refs.children.getDOMNode();return r==n||o(r,n)},_onFocus:function(){this.setState({draggable:!1})},_onBlur:function(){this.setState({draggable:!0})},_onDragStart:function(e){return this._isDraggableAt(e.pageX,e.pageY)?e.preventDefault():(e.dataTransfer.setData("text/plain",JSON.stringify(this.props.message)),e.dataTransfer.dropEffect=this.props.dropEffect,e.dataTransfer.effectAllowed=this.props.effectAllowed,void this.setState({dragging:!0}))},_onDragEnd:function(e){e.preventDefault(),this.setState({droppable:!1,dragging:!1})},_onDragOver:function(e){e.preventDefault(),this.setState({droppable:!0})},_onDragLeave:function(e){e.preventDefault(),this.setState({droppable:!1})},_onDrop:function(e){e.preventDefault();var t=JSON.parse(e.dataTransfer.getData("text/plain")),r=this.props.message;this.props.onDrop(t,r),this.setState({droppable:!1,dragging:!1})}});e.exports=s}).call(t,r(4))},function(t){t.exports=e},function(e){"use strict";function t(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}e.exports=t},function(e){"use strict";function t(e,t){for(var r=e;r;){if(r==t)return!0;r=r.parentNode}return!1}e.exports=t},function(e){var t={};!function(e){var t=e.to5Runtime={};t.inherits=function(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&&(e.__proto__=t)},t.defaults=function(e,t){for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},t.prototypeProperties=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},t.applyConstructor=function(e,t){var r=Object.create(e.prototype),n=e.apply(r,t);return null==n||"object"!=typeof n&&"function"!=typeof n?r:n},t.taggedTemplateLiteral=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},t.interopRequire=function(e){return e&&(e["default"]||e)},t.toArray=function(e){return Array.isArray(e)?e:Array.from(e)},t.slicedToArray=function(e,t){if(Array.isArray(e))return e;for(var r,n=[],i=e[Symbol.iterator]();!(r=i.next()).done&&(n.push(r.value),!t||n.length!==t););return n},t.objectWithoutProperties=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},t.hasOwn=Object.prototype.hasOwnProperty,t.slice=Array.prototype.slice,t.bind=Function.prototype.bind,t.defineProperty=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0})},t.interopRequireWildcard=function(e){return e&&e.constructor===Object?e:{"default":e}},t._extends=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e},t.get=function r(e,r,t){var n=Object.getOwnPropertyDescriptor(e,r);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:r(i,r,t)}if("value"in n&&n.writable)return n.value;var o=n.get;return void 0===o?void 0:o.call(t)}}("undefined"==typeof t?self:t),e.exports=t.to5Runtime}])})},function(e,t,r){"use strict";var n=r(4),i=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};e.exports=i},function(e){"use strict";function t(e,t){if(e===t)return!0;var r;for(r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||e[r]!==t[r]))return!1;for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}e.exports=t},,,,function(){}]); | ||
//# sourceMappingURL=colonel-kurtz.js.map |
{ | ||
"name": "colonel-kurtz", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "A block editor", | ||
@@ -5,0 +5,0 @@ "main": "build/colonel-kurtz.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2448440
10666