/*!CK:3391756117!*//*1402281444,*/
if (self.CavalryLogger) { CavalryLogger.start_js(["og2wH"]); }
__d("ComposerXEmptyAttachment",["ComposerXAttachment"],function(a,b,c,d,e,f,g){for(var h in g)if(g.hasOwnProperty(h))j[h]=g[h];var i=g===null?null:g.prototype;j.prototype=Object.create(i);j.prototype.constructor=j;j.__superConstructor__=g;function j(k,l){"use strict";g.call(this);this._root=k;if(l)this.attachmentClassName=l;}j.prototype.getRoot=function(){"use strict";return this._root;};e.exports=j;},null);
__d("Collection",[],function(a,b,c,d,e,f){function g(h,i){if(!h.__collection__){var j=new Function();for(var k in h.prototype)j.prototype[k]=g._call.bind(null,k);h.__collection__=j;}var l=new h.__collection__();l._elements=i;return l;}g._call=function(h){var i=Array.prototype.slice.call(arguments,1);this._elements.forEach(function(j){j[h].apply(j,i);});return this;};e.exports=g;},null);
__d("Drag",["Event","Arbiter","DOM","Style","Vector"],function(a,b,c,d,e,f,g,h,i,j,k){var l={};l.currentDraggable=null;l.grab=function(m){if(l.currentDraggable)l._onmouseup();m.lastDragOver=null;l.attachDragEvents();l.currentDraggable=m;};l.attachDragEvents=function(){document.onselectstart=function(){document.onselectstart=null;return false;};if(l.dragEventsAttached)return;l.dragEventsAttached=true;h.subscribe('scroller/scroll',l._onmousemove);g.listen(document,{mousemove:l._onmousemove,mouseup:l._onmouseup});};l.droppables={};l.addDroppable=function(m,n){(l.droppables[m]=l.droppables[m]||[]).push(n);};l.removeDroppable=function(m,n){l.droppables[m]=l.droppables[m].filter(function(o){return o!=n;});};l.getOffsetParent=function(m){if(i.isNodeOfType(m,['body','html']))return document.body;while((m=m.parentNode)&&m!==document.body)if(j.get(m,'position')!=='static')return m;return document.body;};l._onmousemove=function(event,m){if(!l.currentDraggable)return;var n=m||k.getEventPosition(event),o=l.currentDraggable,p=l.droppables[o.namespace];if(o.namespace&&o.active&&p){var q={};p.forEach(function(w){q[w.zIndex]=w.zIndex;});var r=[];for(var s in q)r.push(q[s]);r.sort();var t=o.lastDragOver,u=null;for(var v=r.length-1;v>=0;v--)if(t&&t.dom!=null&&t.zIndex==r[v]&&t.isDraggedOver(n)){u=t;break;}else for(s=0;s
=0?Math.min(s,this.scrollZone):Math.max(s,-this.scrollZone));return Math.floor(Math.pow(s/this.scrollZone*this.velocity,this.coefficient));};p.findScrollParent=function(s){"use strict";var t;s=s.parentNode;while(s){if(s.scrollHeight!=s.offsetTop){t=m.get(s,'overflowY');if(t=='scroll'||t=='auto')return s;}s=s.parentNode;}return document.body;};function q(s){"use strict";if(!s)throw new Error('Element should be a DOM node');if(!(this instanceof q)){if(s instanceof Array){var t=[];s.forEach(function(u){t.push(new q(u));});return new i(q,t);}else return new q(s);}else{this.data={};this.handles=[];this.dom=s;this.boundingBox=null;this.useScroller=true;this.grabPctX=this.grabPctY=0;this.addHandle(this.dom);}}q.prototype.destroy=function(){"use strict";this.handles.forEach(function(s){this.removeHandle(s.obj);}.bind(this));this.data=this.dom=null;};q.prototype.adjustCursorPosition=function(){"use strict";var s=n.getElementDimensions(this.dom);this.cursorPositionVector=new n(parseInt(this.grabPctX*s.x,10),parseInt(this.grabPctY*s.y,10));};q.prototype._onclick=function(event){"use strict";if(this.active)return g.kill(event);};q.prototype._ongrab=function(s){"use strict";this.ongrab();if(this.useScroller){if(!this.scroller)this.scroller=new p(p.findScrollParent(this.dom));this.scroller.activate();}if(this.active){if(!this.oldPosition)this.oldPosition=this.dom.style.position;this.dom.style.position=this.absolute?'absolute':'relative';s.sub(this.cursorPositionVector).setElementPosition(this.dom);}};q.prototype._onmousedown=function(event){"use strict";if(!((event.which&&event.which===1)||(event.button&&event.button===1)))return;var s=event.getTarget();if(j.isNodeOfType(s,['input','select','textarea','object','embed']))return true;var t=n.getEventPosition(event),u=n.getElementDimensions(this.dom);this.draggableInitialVector=n.getElementPosition(this.dom);this.cursorPositionVector=t.sub(this.draggableInitialVector);this.grabPctX=u.x===0?0:this.cursorPositionVector.x/u.x;this.grabPctY=u.y===0?0:this.cursorPositionVector.y/u.y;k.grab(this,event);if(this.gutter){this.cursorInitialVector=t;}else{this._setActive(true);this._ongrab(t);}return g.kill(event);};q.prototype._onmousemove=function(s){"use strict";if(!this.active)if(s.distanceTo(this.cursorInitialVector)>=this.gutter){this._setActive(true);this._ongrab(s);}if(this.active){var t=s.sub(this.cursorPositionVector),u;if(this.boundingBox){var v=l.newFromVectors(t,n.getElementDimensions(this.dom));v=v.boundWithin(this.boundingBox);t=v.getPositionVector();if(this.boundingBox.w()===0){u=new n(this.draggableInitialVector.x,t.y,'document');}else if(this.boundingBox.h()===0){u=new n(t.x,this.draggableInitialVector.y,'document');}else u=t;}else u=t;var w=k.getOffsetParent(this.dom);if(w!==document.body)u=u.sub(n.getElementPosition(w));u.setElementPosition(this.dom);this.ondrag(s);}};q.prototype._ondrop=function(){"use strict";this.scroller&&this.scroller.deactivate();if(this.active){setTimeout((function(){this._setActive(false);}).bind(this),0);this.ondrop();if(this.lastDragOver)this.lastDragOver.ondrop(this);}};q.prototype.killDrag=function(){"use strict";this._setActive(false);k._onmouseup();};q.prototype.forceDrop=function(){"use strict";k._onmouseup();};q.prototype.setBoundingBox=function(s){"use strict";this.boundingBox=s;return this;};q.prototype.resetPosition=function(){"use strict";this.dom.style.position=this.oldPosition;this.oldPosition=null;this.dom.style.left='';this.dom.style.top='';return this;};q.prototype.setUseAbsolute=function(s){"use strict";this.absolute=s;return this;};q.prototype.setDragHandler=function(s){"use strict";this.ondrag=s;return this;};q.prototype.setGrabHandler=function(s){"use strict";this.ongrab=s;return this;};q.prototype.setDropHandler=function(s){"use strict";this.ondrop=s;return this;};q.prototype.setGutter=function(s){"use strict";this.gutter=s;return this;};q.prototype.setNamespace=function(s){"use strict";this.namespace=s;return this;};q.prototype.setUseScroller=function(s){"use strict";this.useScroller=s;return this;};q.prototype.addHandle=function(s){"use strict";if(this.handles.length==1&&this.handles[0].obj==this.dom)this.removeHandle(this.dom);this.handles.push({obj:s,evt:[g.listen(s,'mousedown',this._onmousedown.bind(this)),g.listen(s,'click',this._onclick.bind(this)),g.listen(s,'drag',r),g.listen(s,'selectstart',r)]});return this;};q.prototype.removeHandle=function(s){"use strict";this.handles=this.handles.filter(function(t){if(t.obj!=s){return true;}else{t.evt.forEach(function(u){u.remove();});return false;}});};q.prototype.getDOM=function(){"use strict";return this.dom;};q.prototype.setKey=function(s,t){"use strict";this.data[s]=t;return this;};q.prototype.getKey=function(s){"use strict";return this.data[s];};q.prototype._setActive=function(s){"use strict";this.dom.activeDrag=this.active=s;for(var t=0;tm.x;};l.prototype.hasPointMovedVertically=function(m){"use strict";var n=j.getElementPosition(this.dom);return n.y<=m.y&&this.dom.offsetHeight+n.y>m.y;};l.prototype.hasPointMovedInside=function(m){"use strict";return this.hasPointMovedHorizontally(m)&&this.hasPointMovedVertically(m);};l.prototype.setDragOverHandler=function(m){"use strict";this.ondragover=m;return this;};l.prototype.setDragOverVectically=function(){"use strict";this.isDraggedOver=l.prototype.hasPointMovedVertically;return this;};l.prototype.setDragOverHorizontally=function(){"use strict";this.isDraggedOver=l.prototype.hasPointMovedHorizontally;return this;};l.prototype.setDragMoveHandler=function(m){"use strict";this.ondragmove=m;return this;};l.prototype.setDropHandler=function(m){"use strict";this.ondrop=m;return this;};l.prototype.zIndex=0;l.prototype.isDraggedOver=l.prototype.hasPointMovedInside;l.prototype.ondragover=k;l.prototype.ondragmove=k;l.prototype.ondrop=k;l.prototype.getDOM=i.prototype.getDOM;l.prototype.setKey=i.prototype.setKey;l.prototype.getKey=i.prototype.getKey;e.exports=l;},null);
__d("SortableGroup",["CSS","DOM","Draggable","Droppable","Style","Vector","copyProperties","emptyFunction","removeFromArray"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(){"use strict";this.namespace='sortable'+(++p.instanceCount);this.draggables={};this.droppables={};this.sortables={};this.linkedGroups=[];this.linkedGroups.onbeforelinkjump=n;this.linkedGroups.onlinkjump=n;this.rootNode=null;this.boundingBox=null;this.neverEmpty=false;this.hasEmptyMessage=false;this.isDroppable=true;this.isDraggable=true;this.useScroller=true;this.dragOverCriteria='inside';this.requireSameParent=true;this.anchor=null;this.disabled=false;this.autoWidth=false;}p.prototype.addEmptyMessage=function(q,r){"use strict";var s='placeholder';if(q.parentNode!=r)h.appendContent(r,q);this.emptyMessage=q;this._initializeAdded(s,q);this.hasEmptyMessage=true;this.sortables[s]=q;this.droppables[s]=(new j(q)).setNamespace(this.namespace).setDragOverHandler(this._dragOverHandlerShim.bind(this,s));return this;};p.prototype.setAutoWidth=function(q){"use strict";this.autoWidth=q;return this;};p.prototype.setUseScroller=function(q){"use strict";this.useScroller=q;return this;};p.prototype.setDragOverHorizontally=function(){"use strict";this.dragOverCriteria='horizontal';return this;};p.prototype.setDragOverVertically=function(){"use strict";this.dragOverCriteria='vertical';return this;};p.prototype.removeEmptyMessage=function(){"use strict";if(this.emptyMessage)o(h,this.emptyMessage);this.hasEmptyMessage=false;this.removeSortable('placeholder');return this;};p.prototype.addSortable=function(q,r,s){"use strict";this._initializeAdded(q,r);this.sortables[q]=r;this.draggables[q]=(new i(r)).setNamespace(this.namespace).setGutter(this.gutter).setUseAbsolute(true).setUseScroller(this.useScroller).setGrabHandler(this.grabHandler.bind(this,q)).setDropHandler(this.dropHandler.bind(this,q)).setKey('key',q).setBoundingBox(this.boundingBox);if(s)this.draggables[q].addHandle(s);this.droppables[q]=(new j(r)).setNamespace(this.namespace).setDragOverHandler(this._dragOverHandlerShim.bind(this,q));if(this.dragOverCriteria==='horizontal'){this.droppables[q].setDragOverHorizontally();}else if(this.dragOverCriteria==='vertical')this.droppables[q].setDragOverVectically();return this;};p.prototype.destroy=function(){"use strict";for(var q in this.droppables)this.droppables[q].destroy();for(var r in this.draggables)this.draggables[r].destroy();this.droppables=this.draggables=this.rootNode=null;o(this.linkedGroups,this);for(var s=0;s400,z=k.scry(this._composerRoot,"._9lb");j.conditionClass(this._composerRoot,"_2wq",y);for(var aa=0;aa