(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([["8381"],{823416:function(t,e,r){"use strict";function n(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:p;return t.call(this,g(e))||this}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t;var r=e.prototype;return r.getKey=function(){return this.get("key")},r.getType=function(){return this.get("type")},r.getText=function(){return this.get("text")},r.getCharacterList=function(){return this.get("characterList")},r.getLength=function(){return this.getText().length},r.getDepth=function(){return this.get("depth")},r.getData=function(){return this.get("data")},r.getInlineStyleAt=function(t){var e=this.getCharacterList().get(t);return e?e.getStyle():f},r.getEntityAt=function(t){var e=this.getCharacterList().get(t);return e?e.getEntity():null},r.getChildKeys=function(){return this.get("children")},r.getParentKey=function(){return this.get("parent")},r.getPrevSiblingKey=function(){return this.get("prevSibling")},r.getNextSiblingKey=function(){return this.get("nextSibling")},r.findStyleRanges=function(t,e){i(this.getCharacterList(),h,t,e)},r.findEntityRanges=function(t,e){i(this.getCharacterList(),d,t,e)},e}(c(p))},449168:function(t,e,r){"use strict";var n=r(512972),i=r(359282),o=r(879154),a=r(214788),u=r(493428),s=r(116514),c=r(551558),l=r(223138),f=r(65183),p=r(555159),h=f.List,d=f.Record,g=f.Repeat;t.exports=function(t){function e(){return t.apply(this,arguments)||this}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t;var r=e.prototype;return r.getEntityMap=function(){return u},r.getBlockMap=function(){return this.get("blockMap")},r.getSelectionBefore=function(){return this.get("selectionBefore")},r.getSelectionAfter=function(){return this.get("selectionAfter")},r.getBlockForKey=function(t){return this.getBlockMap().get(t)},r.getKeyBefore=function(t){return this.getBlockMap().reverse().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},r.getKeyAfter=function(t){return this.getBlockMap().keySeq().skipUntil(function(e){return e===t}).skip(1).first()},r.getBlockAfter=function(t){return this.getBlockMap().skipUntil(function(e,r){return r===t}).skip(1).first()},r.getBlockBefore=function(t){return this.getBlockMap().reverse().skipUntil(function(e,r){return r===t}).skip(1).first()},r.getBlocksAsArray=function(){return this.getBlockMap().toArray()},r.getFirstBlock=function(){return this.getBlockMap().first()},r.getLastBlock=function(){return this.getBlockMap().last()},r.getPlainText=function(t){return this.getBlockMap().map(function(t){return t?t.getText():""}).join(t||"\n")},r.getLastCreatedEntityKey=function(){return u.__getLastCreatedEntityKey()},r.hasText=function(){var t=this.getBlockMap();return t.size>1||escape(t.first().getText()).replace(/%u200B/g,"").length>0},r.createEntity=function(t,e,r){return u.__create(t,e,r),this},r.mergeEntityData=function(t,e){return u.__mergeData(t,e),this},r.replaceEntityData=function(t,e){return u.__replaceData(t,e),this},r.addEntity=function(t){return u.__add(t),this},r.getEntity=function(t){return u.__get(t)},e.createFromBlockArray=function(t,r){var i=Array.isArray(t)?t:t.contentBlocks,o=n.createFromArray(i),a=o.isEmpty()?new s:s.createEmpty(o.first().getKey());return new e({blockMap:o,entityMap:r||u,selectionBefore:a,selectionAfter:a})},e.createFromText=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=t.split(r).map(function(t){return t=p(t),new(l("draft_tree_data_support")?a:o)({key:c(),text:t,type:"unstyled",characterList:h(g(i.EMPTY,t.length))})});return e.createFromBlockArray(n)},e}(d({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}))},716818:function(t,e,r){"use strict";var n=r(359282),i=r(65183).Map;function o(t,e,r,o){var a=t.getBlockMap(),u=e.getStartKey(),s=e.getStartOffset(),c=e.getEndKey(),l=e.getEndOffset(),f=a.skipUntil(function(t,e){return e===u}).takeUntil(function(t,e){return e===c}).concat(i([[c,a.get(c)]])).map(function(t,e){u===c?(i=s,a=l):(i=e===u?s:0,a=e===c?l:t.getLength());for(var i,a,f,p=t.getCharacterList();i0&&window.scrollTo(o.x,o.y+t+10)}else v(n)||y(!1),(t=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&s.setTop(i,s.getTop(i)+t+10)}}}},r._renderChildren=function(){var t=this,e=this.props.block,r=e.getKey(),n=e.getText(),s=this.props.tree.size-1,c=_(this.props.selection,r);return this.props.tree.map(function(p,h){var d=p.get("leaves");if(0===d.size)return null;var g=d.size-1,y=d.map(function(i,l){var f=a.encode(r,h,l),p=i.get("start"),d=i.get("end");return u.createElement(o,{key:f,offsetKey:f,block:e,start:p,selection:c?t.props.selection:null,forceSelection:t.props.forceSelection,text:n.slice(p,d),styleSet:e.getInlineStyleAt(p),customStyleMap:t.props.customStyleMap,customStyleFn:t.props.customStyleFn,isLast:h===s&&l===g})}).toArray(),v=p.get("decoratorKey");if(null==v||!t.props.decorator)return y;var _=m(t.props.decorator),b=_.getComponentForKey(v);if(!b)return y;var S=_.getPropsForKey(v),w=a.encode(r,h,0),x=d.first().get("start"),k=d.last().get("end"),C=n.slice(x,k),E=e.getEntityAt(p.get("start")),D=f.getHTMLDirIfDifferent(l.getDirection(C),t.props.direction),O={contentState:t.props.contentState,decoratedText:C,dir:D,start:x,end:k,blockKey:r,entityKey:E,offsetKey:w};return u.createElement(b,i({},S,O,{key:w}),y)}).toArray()},r.render=function(){var t=this,e=this.props,r=e.direction,n=e.offsetKey,i=p({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===r,"public/DraftStyleDefault/rtl":"RTL"===r});return u.createElement("div",{"data-offset-key":n,className:i,ref:function(e){return t._node=e}},this._renderChildren())},e}(u.Component)},691099:function(t,e,r){"use strict";var n=r(381538);function i(){return(i=n||function(t){for(var e=1;e0&&window.scrollTo(o.x,o.y+t+10)}else v(n)||y(!1),(t=n.offsetHeight+n.offsetTop-(i.offsetHeight+o.y))>0&&l.setTop(i,l.getTop(i)+t+10)}}},r.render=function(){var t=this,r=this.props,n=r.block,a=r.blockRenderMap,l=r.blockRendererFn,f=r.blockStyleFn,p=r.contentState,h=r.decorator,d=r.editorKey,g=r.editorState,y=r.customStyleFn,v=r.customStyleMap,k=r.direction,C=r.forceSelection,E=r.selection,D=r.tree,O=null;n.children.size&&(O=n.children.reduce(function(r,n){var i=s.encode(n,0,0),u=p.getBlockForKey(n),h=w(u,l),y=h.CustomComponent||e,v=S(u,a),m=v.Element,k=v.wrapperTemplate,C=x(u,d,i,f,h,null),E=o({},t.props,{tree:g.getBlockTree(n),blockProps:h.customProps,offsetKey:i,block:u});return r.push(c.createElement(m,C,c.createElement(y,E))),!k||_(u,p)||b(k,m,r),r},[]));var K=n.getKey(),T=s.encode(K,0,0),M=w(n,l),A=M.CustomComponent,I=null!=A?c.createElement(A,i({},this.props,{tree:g.getBlockTree(K),blockProps:M.customProps,offsetKey:T,block:n})):c.createElement(u,{block:n,children:O,contentState:p,customStyleFn:y,customStyleMap:v,decorator:h,direction:k,forceSelection:C,hasSelection:m(E,K),selection:E,tree:D});if(n.getParentKey())return I;var B=S(n,a).Element,L=x(n,d,T,f,M,this.wrapperRef);return c.createElement(B,L,I)},e}(c.Component)},66115:function(t,e,r){"use strict";var n=r(497727),i=r(621796),o=r(152477),a=r(172367),u=r(574369),s=r(536574),c=r(15543),l=r(683289),f=r(596464),p=r(467159),h=!1,d=!1,g=null,y={onCompositionStart:function(t){d=!0,g||(g=new n(c(t))).start()},onCompositionEnd:function(t){h=!1,d=!1,setTimeout(function(){h||y.resolveComposition(t)},20)},onSelect:s,onKeyDown:function(t,e){if(!d){y.resolveComposition(t),t._onKeyDown(e);return}(e.which===u.RIGHT||e.which===u.LEFT)&&e.preventDefault()},onKeyPress:function(t,e){e.which===u.RETURN&&e.preventDefault()},resolveComposition:function(t){if(!d){var e=p(g).stopAndFlushMutations();g=null,h=!0;var r=a.set(t._latestEditorState,{inCompositionMode:!1});if(t.exitCurrentMode(),!e.size)return void t.update(r);var n=r.getCurrentContent();e.forEach(function(t,e){var u=o.decode(e),s=u.blockKey,c=u.decoratorKey,l=u.leafKey,p=r.getBlockTree(s).getIn([c,"leaves",l]),h=p.start,d=p.end,g=r.getSelection().merge({anchorKey:s,focusKey:s,anchorOffset:h,focusOffset:d,isBackward:!1}),y=f(n,g),v=n.getBlockForKey(s).getInlineStyleAt(h);n=i.replaceText(n,g,t,v,y),r=a.set(r,{currentContent:n})});var u=l(r,c(t)).selectionState;t.restoreEditorDOM();var s=a.acceptSelection(r,u);t.update(a.push(s,n,"insert-characters"))}}};t.exports=y},984880:function(t,e,r){"use strict";var n=r(381538);function i(){return(i=n||function(t){for(var e=1;ek,"public/DraftStyleDefault/depth0":0===P,"public/DraftStyleDefault/depth1":1===P,"public/DraftStyleDefault/depth2":2===P,"public/DraftStyleDefault/depth3":3===P,"public/DraftStyleDefault/depth4":P>=4,"public/DraftStyleDefault/listLTR":"LTR"===B,"public/DraftStyleDefault/listRTL":"RTL"===B})));var U=M||o,q={className:j,"data-block":!0,"data-editor":d,"data-offset-key":L,key:O};void 0!==I&&(q=function(t){for(var e=1;e0){if(t.props.handleDroppedFiles&&f(t.props.handleDroppedFiles(g,_)))return;s(_,function(e){e&&t.update(d(l,g,e))});return}var b=t._internalDrag?"internal":"external";t.props.handleDrop&&f(t.props.handleDrop(g,r,b))||(t._internalDrag?t.update((y=l,v=g,m=i.moveText(y.getCurrentContent(),y.getSelection(),v),o.push(y,m,"insert-fragment"))):t.update(d(l,g,r.getText()))),h(t)}}}},938054:function(t,e,r){"use strict";var n=r(169774),i=r(973588),o=r(741930),a=r(289281),u=r(142893),s=r(931280),c=r(658422),l=r(752985),f=r(549157),p=r(931264),h=r(993083),d=r(681116),g=r(536574),y=n.isBrowser("Chrome")?g:function(t){};t.exports={onBeforeInput:i,onBlur:o,onCompositionStart:a,onCopy:u,onCut:s,onDragOver:c,onDragStart:l,onFocus:f,onInput:p,onKeyDown:h,onPaste:d,onSelect:g,onMouseUp:y,onKeyUp:y}},398891:function(t,e,r){"use strict";t.exports=r(867309).unstable_flushControlled},963956:function(t,e,r){"use strict";var n=r(381538),i=r(846434),o=r(73800),a=r(581079),u=r(318720),s=r(609627).setDraftEditorSelection;t.exports=function(t){function e(){for(var e,r,n,i,o=arguments.length,a=Array(o),u=0;u0)return" "+t}else if(e3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(h(t,e),e);return c(i,i.getSelectionAfter(),r,n)},removeRange:function(t,e,r){e.getIsBackward()&&(e=e.merge({anchorKey:e.getFocusKey(),anchorOffset:e.getFocusOffset(),focusKey:e.getAnchorKey(),focusOffset:e.getAnchorOffset(),isBackward:!1})),n=e.getAnchorKey(),i=e.getFocusKey(),o=t.getBlockForKey(n);var n,i,o,u=t.getBlockForKey(i),s=e.getStartOffset(),c=e.getEndOffset(),l=o.getEntityAt(s),f=u.getEntityAt(c-1);if(n===i&&l&&l===f){var p=a(t.getEntityMap(),o,u,e,r);return d(t,p)}return d(h(t,e),e)},splitBlock:function(t,e){var r=d(h(t,e),e);return g(r,r.getSelectionAfter())},applyInlineStyle:function(t,e,r){return i.add(t,e,r)},removeInlineStyle:function(t,e,r){return i.remove(t,e,r)},setBlockType:function(t,e,r){return p(t,e,function(t){return t.merge({type:r,depth:0})})},setBlockData:function(t,e,r){return p(t,e,function(t){return t.merge({data:r})})},mergeBlockData:function(t,e,r){return p(t,e,function(t){return t.merge({data:t.getData().merge(r)})})},applyEntity:function(t,e,r){return o(h(t,e),e,r)}};t.exports=v},152477:function(t){"use strict";t.exports={encode:function(t,e,r){return t+"-"+e+"-"+r},decode:function(t){var e=t.split("-").reverse(),r=e[0],n=e[1];return{blockKey:e.slice(2).reverse().join("-"),decoratorKey:parseInt(n,10),leafKey:parseInt(r,10)}}}},659796:function(t,e,r){"use strict";var n=r(879154),i=r(214788),o=r(738766),a=r(551558),u=r(982716),s=r(223138),c=r(65183),l=r(555159),f=c.List,p=c.Repeat,h=s("draft_tree_data_support"),d=h?i:n;t.exports={processHTML:function(t,e){return o(t,u,e)},processText:function(t,e,r){return t.reduce(function(t,n,i){n=l(n);var o=a(),u={key:o,type:r,text:n,characterList:f(p(e,n.length))};if(h&&0!==i){var s=i-1;u=function(t){for(var e=1;e0)||(delete e.children,r.push(e))}),t.blocks=r,n({},t,{blocks:r})):t},fromRawStateToRawTreeState:function(t){var e=[],r=[];return t.blocks.forEach(function(t){var o=u(t),a=t.depth||0,s=n({},t,{children:[]});if(!o)return void e.push(s);var c=r[0];if(null==c&&0===a)e.push(s);else if(null==c||c.depth=a;)r.shift(),c=r[0];a>0?c.children.push(s):e.push(s)}}),n({},t,{blocks:e})}}},61175:function(t,e,r){"use strict";r(42547),t.exports={isValidBlock:function(t,e){var r=t.getKey(),n=t.getParentKey();if(null!=n&&!e.get(n).getChildKeys().includes(r)||!t.getChildKeys().map(function(t){return e.get(t)}).every(function(t){return t.getParentKey()===r}))return!1;var i=t.getPrevSiblingKey();if(null!=i&&e.get(i).getNextSiblingKey()!==r)return!1;var o=t.getNextSiblingKey();return(null==o||e.get(o).getPrevSiblingKey()===r)&&(null===o||null===i||i!==o)&&(""==t.text||!(t.getChildKeys().size>0))},isConnectedTree:function(t){var e=t.toArray().filter(function(t){return null==t.getParentKey()&&null==t.getPrevSiblingKey()});if(1!==e.length)return!1;for(var r=e.shift(),n=0,i=r.getKey(),o=[];null!=i;){var a=t.get(i),u=a.getChildKeys(),s=a.getNextSiblingKey();if(u.size>0){null!=s&&o.unshift(s);var c=u.map(function(e){return t.get(e)}).find(function(t){return null==t.getPrevSiblingKey()});if(null==c)return!1;i=c.getKey()}else i=null!=a.getNextSiblingKey()?a.getNextSiblingKey():o.shift();n++}return n===t.size},isValidTree:function(t){var e=this;return!!t.toArray().every(function(r){return e.isValidBlock(r,t)})&&this.isConnectedTree(t)}}},497218:function(t,e,r){"use strict";var n,i=r(166898),o=r(65183),a=r(467159),u=o.OrderedMap;t.exports={getDirectionMap:function(t,e){n?n.reset():n=new i;var r=t.getBlockMap(),s=r.valueSeq().map(function(t){return a(n).getDirection(t.getText())}),c=u(r.keySeq().zip(s));return null!=e&&o.is(e,c)?e:c}}},172367:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(968514),o=r(449168),a=r(497218),u=r(116514),s=r(65183),c=s.OrderedSet,l=s.Record,f=s.Stack,p=l({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:f(),selection:null,treeMap:null,undoStack:f()}),h=function(){e.createEmpty=function(t){return e.createWithContent(o.createFromText(""),t)},e.createWithContent=function(t,r){if(0===t.getBlockMap().count())return e.createEmpty(r);var n=t.getBlockMap().first().getKey();return e.create({currentContent:t,undoStack:f(),redoStack:f(),decorator:r||null,selection:u.createEmpty(n)})},e.create=function(t){var r=t.currentContent,i=t.decorator;return new e(new p(function(t){for(var e=1;e0?i.getInlineStyleAt(n-1):i.getLength()?i.getInlineStyleAt(0):y(t,r)):(o=f,u=(a=p).getStartKey(),s=a.getStartOffset(),s<(c=o.getBlockForKey(u)).getLength()?c.getInlineStyleAt(s):s>0?c.getInlineStyleAt(s-1):y(o,u))},t.getBlockTree=function(t){return this.getImmutable().getIn(["treeMap",t])},t.isSelectionAtStartOfContent=function(){var t=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(t,0,0)},t.isSelectionAtEndOfContent=function(){var t=this.getCurrentContent().getBlockMap().last(),e=t.getLength();return this.getSelection().hasEdgeWithin(t.getKey(),e,e)},t.getDirectionMap=function(){return this.getImmutable().get("directionMap")},e.acceptSelection=function(t,e){return d(t,e,!1)},e.forceSelection=function(t,e){return e.getHasFocus()||(e=e.set("hasFocus",!0)),d(t,e,!0)},e.moveSelectionToEnd=function(t){var r=t.getCurrentContent().getLastBlock(),n=r.getKey(),i=r.getLength();return e.acceptSelection(t,new u({anchorKey:n,anchorOffset:i,focusKey:n,focusOffset:i,isBackward:!1}))},e.moveFocusToEnd=function(t){var r=e.moveSelectionToEnd(t);return e.forceSelection(r,r.getSelection())},e.push=function(t,r,n){var i,o,u=!(arguments.length>3)||void 0===arguments[3]||arguments[3];if(t.getCurrentContent()===r)return t;var s=a.getDirectionMap(r,t.getDirectionMap());if(!t.getAllowUndo())return e.set(t,{currentContent:r,directionMap:s,lastChangeType:n,selection:r.getSelectionAfter(),forceSelection:u,inlineStyleOverride:null});var c=t.getSelection(),l=t.getCurrentContent(),p=t.getUndoStack(),h=r;c!==l.getSelectionAfter()||(i=t,(o=n)!==i.getLastChangeType()||"insert-characters"!==o&&"backspace-character"!==o&&"delete-character"!==o)?(p=p.push(l),h=h.set("selectionBefore",c)):("insert-characters"===n||"backspace-character"===n||"delete-character"===n)&&(h=h.set("selectionBefore",l.getSelectionBefore()));var d=t.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(d=null);var g={currentContent:h,directionMap:s,undoStack:p,redoStack:f(),lastChangeType:n,selection:r.getSelectionAfter(),forceSelection:u,inlineStyleOverride:d};return e.set(t,g)},e.undo=function(t){if(!t.getAllowUndo())return t;var r=t.getUndoStack(),n=r.peek();if(!n)return t;var i=t.getCurrentContent(),o=a.getDirectionMap(n,t.getDirectionMap());return e.set(t,{currentContent:n,directionMap:o,undoStack:r.shift(),redoStack:t.getRedoStack().push(i),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:i.getSelectionBefore()})},e.redo=function(t){if(!t.getAllowUndo())return t;var r=t.getRedoStack(),n=r.peek();if(!n)return t;var i=t.getCurrentContent(),o=a.getDirectionMap(n,t.getDirectionMap());return e.set(t,{currentContent:n,directionMap:o,undoStack:t.getUndoStack().push(i),redoStack:r.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},t.getImmutable=function(){return this._immutable},e}();function d(t,e,r){return h.set(t,{selection:e,forceSelection:r,nativelyRenderedContent:null,inlineStyleOverride:null})}function g(t,e){return t.getBlockMap().map(function(r){return i.generate(t,r,e)}).toOrderedMap()}function y(t,e){var r=t.getBlockMap().reverse().skipUntil(function(t,r){return r===e}).skip(1).skipUntil(function(t,e){return t.getLength()}).first();return r?r.getInlineStyleAt(r.getLength()-1):c()}t.exports=h},147521:function(t,e,r){"use strict";var n=r(169774),i=r(727584),o=n.isPlatform("Mac OS X"),a={isCtrlKeyCommand:function(t){return!!t.ctrlKey&&!t.altKey},isOptionKeyCommand:function(t){return o&&t.altKey},usesMacOSHeuristics:function(){return o},hasCommandModifier:function(t){return o?!!t.metaKey&&!t.altKey:a.isCtrlKeyCommand(t)},isSoftNewlineEvent:i};t.exports=a},540087:function(){},505904:function(t,e,r){"use strict";var n=r(621796),i=r(172367),o=r(668370),a=r(467159),u={currentBlockContainsLink:function(t){var e=t.getSelection(),r=t.getCurrentContent(),n=r.getEntityMap();return r.getBlockForKey(e.getAnchorKey()).getCharacterList().slice(e.getStartOffset(),e.getEndOffset()).some(function(t){var e=t.getEntity();return!!e&&"LINK"===n.__get(e).getType()})},getCurrentBlockType:function(t){var e=t.getSelection();return t.getCurrentContent().getBlockForKey(e.getStartKey()).getType()},getDataObjectForLinkURL:function(t){return{url:t.toString()}},handleKeyCommand:function(t,e,r){switch(e){case"bold":return u.toggleInlineStyle(t,"BOLD");case"italic":return u.toggleInlineStyle(t,"ITALIC");case"underline":return u.toggleInlineStyle(t,"UNDERLINE");case"code":return u.toggleCode(t);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return u.onBackspace(t);case"delete":case"delete-word":case"delete-to-end-of-block":return u.onDelete(t);default:return null}},insertSoftNewline:function(t){var e=n.insertText(t.getCurrentContent(),t.getSelection(),"\n",t.getCurrentInlineStyle(),null),r=i.push(t,e,"insert-characters");return i.forceSelection(r,e.getSelectionAfter())},onBackspace:function(t){var e=t.getSelection();if(!e.isCollapsed()||e.getAnchorOffset()||e.getFocusOffset())return null;var r=t.getCurrentContent(),n=e.getStartKey(),o=r.getBlockBefore(n);if(o&&"atomic"===o.getType()){var a=r.getBlockMap().delete(o.getKey()),s=r.merge({blockMap:a,selectionAfter:e});if(s!==r)return i.push(t,s,"remove-range")}var c=u.tryToRemoveBlockStyle(t);return c?i.push(t,c,"change-block-type"):null},onDelete:function(t){var e=t.getSelection();if(!e.isCollapsed())return null;var r=t.getCurrentContent(),o=e.getStartKey(),a=r.getBlockForKey(o).getLength();if(e.getStartOffset()=u},r.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},r.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},r.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},r.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},r.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},e.createEmpty=function(t){return new e({anchorKey:t,anchorOffset:0,focusKey:t,focusOffset:0,isBackward:!1,hasFocus:!1})},e}((0,r(65183).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}))},668370:function(t){"use strict";t.exports=function(t,e,r,n){var i=e.getStartKey(),o=e.getEndKey(),a=t.getBlockMap(),u=a.toSeq().skipUntil(function(t,e){return e===i}).takeUntil(function(t,e){return e===o}).concat([[o,a.get(o)]]).map(function(t){var e=t.getDepth()+r;return e=Math.max(0,Math.min(e,n)),t.set("depth",e)});return a=a.merge(u),t.merge({blockMap:a,selectionBefore:e,selectionAfter:e})}},159063:function(t,e,r){"use strict";var n=r(359282);t.exports=function(t,e,r,i){for(var o=e,a=t.getCharacterList();o1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(L).some(function(r){t.classList.contains(r)&&(e=L[r])}),e},z=function(t,e){if(!w(t))return e;var r=t.style.fontWeight,n=t.style.fontStyle,i=t.style.textDecoration;return e.withMutations(function(t){M.indexOf(r)>=0?t.add("BOLD"):A.indexOf(r)>=0&&t.remove("BOLD"),"italic"===n?t.add("ITALIC"):"normal"===n&&t.remove("ITALIC"),"underline"===i&&t.add("UNDERLINE"),"line-through"===i&&t.add("STRIKETHROUGH"),"none"===i&&(t.remove("UNDERLINE"),t.remove("STRIKETHROUGH"))})},P=function(t){return"ul"===t||"ol"===t},j=function(){function t(t,e){i(this,"characterList",v()),i(this,"currentBlockType","unstyled"),i(this,"currentDepth",0),i(this,"currentEntity",null),i(this,"currentText",""),i(this,"wrapper",null),i(this,"blockConfigs",[]),i(this,"contentBlocks",[]),i(this,"entityMap",l),i(this,"blockTypeMap",void 0),i(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=t,this.disambiguate=e}var e=t.prototype;return e.clear=function(){this.characterList=v(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},e.addDOMNode=function(t){var e;return this.contentBlocks=[],this.currentDepth=0,(e=this.blockConfigs).push.apply(e,this._toBlockConfigs([t],_())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},e.getContentBlocks=function(){return 0===this.contentBlocks.length&&(k?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},e._makeBlockConfig=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n({key:t.key||h(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:v(),prevSibling:null,nextSibling:null,childConfigs:[]},t);return this.characterList=v(),this.currentBlockType="unstyled",this.currentText="",e},e._toBlockConfigs=function(t,e){for(var r=[],n=0;n(r=void 0!==(n=this.characterList.reverse().findEntry(function(t){return null!==t.getEntity()}))?Math.max(r,t-n[0]):r)?(this.currentText="",this.characterList=v()):(this.currentText=this.currentText.slice(e,r),this.characterList=this.characterList.slice(e,r))},e._addTextNode=function(t,e){var r=t.textContent;""===r.trim()&&"pre"!==this.wrapper&&(r=" "),"pre"!==this.wrapper&&(r=(r=r.replace(D,"")).replace(E," ")),this._appendText(r,e)},e._addBreakNode=function(t,e){S(t)&&this._appendText("\n",e)},e._addImgNode=function(t,e){if(x(t)){var r={};B.forEach(function(e){var n=t.getAttribute(e);n&&(r[e]=n)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),g("draftjs_fix_paste_for_img")?"presentation"!==t.getAttribute("role")&&this._appendText("\uD83D\uDCF7",e):this._appendText("\uD83D\uDCF7",e),this.currentEntity=null}},e._addAnchorNode=function(t,e,r){if(b(t)){var n={};I.forEach(function(e){var r=t.getAttribute(e);r&&(n[e]=r)}),n.url=new f(t.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",n||{}),e.push.apply(e,this._toBlockConfigs(Array.from(t.childNodes),r)),this.currentEntity=null}},e._toContentBlocks=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t.length-1,i=0;i<=r;i++){var o=t[i];o.parent=e,o.prevSibling=i>0?t[i-1].key:null,o.nextSibling=i1&&void 0!==arguments[1]?arguments[1]:d,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,n=e(t=t.trim().replace(C,"").replace(O," ").replace(K,"").replace(T,""));return n?new j(N(r),function(t,e){return"li"===t?"ol"===e?"ordered-list-item":"unordered-list-item":null}).addDOMNode(n).getContentBlocks():null}},842818:function(t,e,r){"use strict";function n(t){for(var e=1;e0}),u=v&&!a?s.fromRawStateToRawTreeState(t).blocks:t.blocks;return v?u.map(x).reduce(function(t,r,i){Array.isArray(r.children)||y(!1);var a=r.children.map(x),s=new o(n({},S(r,e),{prevSibling:0===i?null:u[i-1].key,nextSibling:i===u.length-1?null:u[i+1].key,children:m(a.map(function(t){return t.key}))}));t=t.set(s.getKey(),s);for(var c=k([],a,s);c.length>0;){var l=c.pop(),f=l.parentRef,p=f.getChildKeys(),h=p.indexOf(l.key),d=Array.isArray(l.children);if(!d){d||y(!1);break}var g=l.children.map(x),v=new o(n({},S(l,e),{parent:f.getKey(),children:m(g.map(function(t){return t.key})),prevSibling:0===h?null:p.get(h-1),nextSibling:h===p.size-1?null:p.get(h+1)}));t=t.set(v.getKey(),v),c=k(c,g,v)}return t},b()):(r=a?s.fromRawTreeStateToRawState(t).blocks:u,b(r.map(function(t){var r=new i(S(t,e));return[r.getKey(),r]})))},E=function(t){var e=t.entityMap,r={};return Object.keys(e).forEach(function(t){var n=e[t],i=n.type,o=n.mutability,a=n.data;r[t]=u.__create(i,o,a||{})}),r};t.exports=function(t){Array.isArray(t.blocks)||y(!1);var e=E(t),r=C(t,e),n=r.isEmpty()?new c:c.createEmpty(r.first().getKey());return new a({blockMap:r,entityMap:e,selectionBefore:n,selectionAfter:n})}},5626:function(t,e,r){"use strict";var n=r(359282),i=r(65183).List;t.exports=function(t,e){return i(t.map(function(t,r){var i=e[r];return n.create({style:t,entity:i})}))}},124132:function(t,e,r){"use strict";var n=r(733359).substr;t.exports=function(t,e){var r=Array(t.length).fill(null);return e&&e.forEach(function(e){for(var i=n(t,0,e.offset).length,o=i+n(t,e.offset,e.length).length,a=i;a=h?n.length:0),a=e.get("end"),u=a+(a>=h?n.length:0),s=r.get("start"),c=r.get("end"),l=r.get("decoratorKey");return e.get("decoratorKey")!==l||e.get("leaves").size!==r.get("leaves").size||o!==s||u!==c||null!=l&&c-s!=a-i})}if(y||(y=f&&("'"==n||"/"==n)),y||(y=c(g.getDirectionMap()).get(d)!==c(r.getDirectionMap()).get(d)),y){e.preventDefault(),g=i.set(g,{forceSelection:!0}),t.update(g);return}t._pendingStateFromBeforeInput=g=i.set(g,{nativelyRenderedContent:g.getCurrentContent()}),l(function(){void 0!==t._pendingStateFromBeforeInput&&(t.update(t._pendingStateFromBeforeInput),t._pendingStateFromBeforeInput=void 0)})}}},741930:function(t,e,r){"use strict";var n=r(172367),i=r(808570),o=r(924125);t.exports=function(t,e){var r=e.currentTarget.ownerDocument;if(!t.props.preserveSelectionOnBlur&&o(r)===r.body){var a=r.defaultView.getSelection(),u=t.editor;1===a.rangeCount&&i(u,a.anchorNode)&&i(u,a.focusNode)&&a.removeAllRanges()}var s=t._latestEditorState,c=s.getSelection();if(c.getHasFocus()){var l=c.set("hasFocus",!1);t.props.onBlur&&t.props.onBlur(e),t.update(n.acceptSelection(s,l))}}},289281:function(t,e,r){"use strict";var n=r(172367);t.exports=function(t,e){t.setMode("composite"),t.update(n.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(e)}},142893:function(t,e,r){"use strict";var n=r(458545);t.exports=function(t,e){if(t._latestEditorState.getSelection().isCollapsed())return void e.preventDefault();t.setClipboard(n(t._latestEditorState))}},931280:function(t,e,r){"use strict";var n=r(621796),i=r(172367),o=r(292489),a=r(458545),u=r(685536),s=r(302354);t.exports=function(t,e){var r,c=t._latestEditorState,l=c.getSelection(),f=e.target;if(l.isCollapsed())return void e.preventDefault();s(f)&&(r=u(o.getScrollParent(f)));var p=a(c);t.setClipboard(p),t.setMode("cut"),setTimeout(function(){var e,o;t.restoreEditorDOM(r),t.exitCurrentMode(),t.update((e=c,o=n.removeRange(e.getCurrentContent(),e.getSelection(),"forward"),i.push(e,o,"remove-range")))},0)}},658422:function(t){"use strict";t.exports=function(t,e){t.setMode("drag"),e.preventDefault()}},752985:function(t){"use strict";t.exports=function(t){t._internalDrag=!0,t.setMode("drag")}},549157:function(t,e,r){"use strict";var n=r(172367),i=r(169774);t.exports=function(t,e){var r=t._latestEditorState,o=r.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);t.props.onFocus&&t.props.onFocus(e),i.isBrowser("Chrome < 60.0.3081.0")?t.update(n.forceSelection(r,a)):t.update(n.acceptSelection(r,a))}}},931264:function(t,e,r){"use strict";var n=r(621796),i=r(152477),o=r(172367),a=r(169774),u=r(94553).notEmptyKey,s=r(630685),c=r(803068),l=r(467159),f=a.isEngine("Gecko");t.exports=function(t,e){void 0!==t._pendingStateFromBeforeInput&&(t.update(t._pendingStateFromBeforeInput),t._pendingStateFromBeforeInput=void 0);var r=t.editor.ownerDocument.defaultView.getSelection(),a=r.anchorNode,p=r.isCollapsed;if((null==a?void 0:a.nodeType)===Node.TEXT_NODE||(null==a?void 0:a.nodeType)===Node.ELEMENT_NODE){if(a.nodeType===Node.TEXT_NODE&&(null!==a.previousSibling||null!==a.nextSibling)){var h=a.parentNode;a.nodeValue=h.textContent;for(var d=h.firstChild;null!==d;d=d.nextSibling)d!==a&&h.removeChild(d)}var g=a.textContent,y=t._latestEditorState,v=l(s(a)),m=i.decode(v),_=m.blockKey,b=m.decoratorKey,S=m.leafKey,w=y.getBlockTree(_).getIn([b,"leaves",S]),x=w.start,k=w.end,C=y.getCurrentContent(),E=C.getBlockForKey(_),D=E.getText().slice(x,k);if(g.endsWith("\n\n")&&(g=g.slice(0,-1)),g===D){var O=e.nativeEvent.inputType;if(O){var K,T,M,A,I="deleteContentBackward"===O?c(y):y;I!==y&&(t.restoreEditorDOM(),t.update(I))}return}var B=y.getSelection(),L=B.merge({anchorOffset:x,focusOffset:k,isBackward:!1}),R=E.getEntityAt(x),N=u(R)?C.getEntity(R):null,F="MUTABLE"===(null!=N?N.getMutability():null),z=n.replaceText(C,L,g,E.getInlineStyleAt(x),F?E.getEntityAt(x):null);if(f)A=(M=x+Math.min(K=r.anchorOffset,T=r.focusOffset))+Math.abs(K-T),K=M,T=A;else{var P=g.length-D.length;M=B.getStartOffset(),A=B.getEndOffset(),K=p?A+P:M,T=A+P}var j=z.merge({selectionBefore:C.getSelectionAfter(),selectionAfter:B.merge({anchorOffset:K,focusOffset:T})});t.update(o.push(y,j,F?"spellcheck-change":"apply-entity"))}}},993083:function(t,e,r){"use strict";var n=r(621796),i=r(172367),o=r(147521),a=r(574369),u=r(805797),s=r(169774),c=r(352582),l=r(476363),f=r(963782),p=r(904112),h=r(727813),d=r(599552),g=r(544611),y=r(803068),v=r(561099),m=r(655e3),_=r(920267),b=o.isOptionKeyCommand,S=s.isBrowser("Chrome");t.exports=function(t,e){var r=e.which,o=t._latestEditorState;function s(r){var n=t.props[r];return!!n&&(n(e),!0)}switch(r){case a.RETURN:if(e.preventDefault(),t.props.handleReturn&&c(t.props.handleReturn(e,o)))return;break;case a.ESC:if(e.preventDefault(),s("onEscape"))return;break;case a.TAB:if(s("onTab"))return;break;case a.UP:if(s("onUpArrow"))return;break;case a.RIGHT:if(s("onRightArrow"))return;break;case a.DOWN:if(s("onDownArrow"))return;break;case a.LEFT:if(s("onLeftArrow"))return;break;case a.SPACE:S&&b(e)&&e.preventDefault()}var w=t.props.keyBindingFn(e);if(null==w||""===w){if(r===a.SPACE&&S&&b(e)){var x=n.replaceText(o.getCurrentContent(),o.getSelection(),"\xa0");t.update(i.push(o,x,"insert-characters"))}return}if("undo"===w)return void _(e,o,t.update);if(e.preventDefault(),!(t.props.handleKeyCommand&&c(t.props.handleKeyCommand(w,o,e.timeStamp)))){var k=function(t,e,r){switch(t){case"redo":return i.redo(e);case"delete":return v(e);case"delete-word":return p(e);case"backspace":return y(e);case"backspace-word":return f(e);case"backspace-to-start-of-line":return l(e,r);case"split-block":return h(e);case"transpose-characters":return m(e);case"move-selection-to-start-of-block":return g(e);case"move-selection-to-end-of-block":return d(e);case"secondary-cut":return u.cut(e);case"secondary-paste":return u.paste(e);default:return e}}(w,o,e);k!==o&&t.update(k)}}},681116:function(t,e,r){"use strict";var n=r(512972),i=r(359282),o=r(198392),a=r(621796),u=r(659796),s=r(172367),c=r(505904),l=r(596464),f=r(992456),p=r(352582),h=r(359565);function d(t,e,r){var n=a.replaceWithFragment(t.getCurrentContent(),t.getSelection(),e);return s.push(t,n.set("entityMap",r),"insert-fragment")}t.exports=function(t,e){e.preventDefault();var r=new o(e.clipboardData);if(!r.isRichText()){var g=r.getFiles(),y=r.getText();if(g.length>0){if(t.props.handlePastedFiles&&p(t.props.handlePastedFiles(g)))return;f(g,function(e){if(e=e||y){var r=t._latestEditorState,o=h(e),f=i.create({style:r.getCurrentInlineStyle(),entity:l(r.getCurrentContent(),r.getSelection())}),p=c.getCurrentBlockType(r),d=u.processText(o,f,p),g=n.createFromArray(d),v=a.replaceWithFragment(r.getCurrentContent(),r.getSelection(),g);t.update(s.push(r,v,"insert-fragment"))}});return}}var v=[],m=r.getText(),_=r.getHTML(),b=t._latestEditorState;if(!(t.props.handlePastedText&&p(t.props.handlePastedText(m,_,b)))){if(m&&(v=h(m)),!t.props.stripPastedStyles){var S,w,x=t.getClipboard();if(r.isRichText()&&x){if(-1!==_.indexOf(t.getEditorKey())||1===v.length&&1===x.size&&x.first().getText()===m)return void t.update(d(t._latestEditorState,x))}else{if(x&&r.types.includes("com.apple.webarchive")&&!r.types.includes("text/html")&&(S=v,w=x,S.length===w.size&&w.valueSeq().every(function(t,e){return t.getText()===S[e]})))return void t.update(d(t._latestEditorState,x))}if(_){var k=u.processHTML(_,t.props.blockRenderMap);if(k){var C=k.contentBlocks,E=k.entityMap;if(C){var D=n.createFromArray(C);t.update(d(t._latestEditorState,D,E));return}}}t.setClipboard(null)}if(v.length){var O=i.create({style:b.getCurrentInlineStyle(),entity:l(b.getCurrentContent(),b.getSelection())}),K=c.getCurrentBlockType(b),T=u.processText(v,O,K),M=n.createFromArray(T);t.update(d(t._latestEditorState,M))}}}},536574:function(t,e,r){"use strict";var n=r(754387),i=r(172367),o=r(15543),a=r(683289);t.exports=function(t){if(t._blockSelectEvents||t._latestEditorState!==t.props.editorState){if(t._blockSelectEvents){var e=t.props.editorState.getSelection();n.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:Error().stack}),selectionState:JSON.stringify(e.toJS())})}return}var r=t.props.editorState,u=a(r,o(t)),s=u.selectionState;s!==r.getSelection()&&(r=u.needsRecovery?i.forceSelection(r,s):i.acceptSelection(r,s),t.update(r))}},653192:function(t,e,r){"use strict";var n=r(370260),i=r(733359).strlen;t.exports=function(t,e){var r=[];return t.findEntityRanges(function(t){return!!t.getEntity()},function(o,a){var u=t.getText(),s=t.getEntityAt(o);r.push({offset:i(u.slice(0,o)),length:i(u.slice(o,a)),key:Number(e[n.stringify(s)])})}),r}},330296:function(t,e,r){"use strict";var n=r(733359),i=r(720379),o=function(t,e){return t===e},a=function(t){return!!t},u=[];t.exports=function(t){var e=t.getCharacterList().map(function(t){return t.getStyle()}).toList(),r=e.flatten().toSet().map(function(r){var u;return u=[],i(e.map(function(t){return t.has(r)}).toList(),o,a,function(e,i){var o=t.getText();u.push({offset:n.strlen(o.slice(0,e)),length:n.strlen(o.slice(e,i)),style:r})}),u});return Array.prototype.concat.apply(u,r.toJS())}},788276:function(t,e,r){"use strict";var n=r(733359),i=r(961271),o=r(195691),a=r(581079);function u(t,e){for(var r=1/0,n=1/0,i=-1/0,o=-1/0,a=0;a=0;_--)if(!(null!=m&&_>0&&n.isSurrogatePair(m,_-1)))if(t.setStart(y,_),u(o(t),h))d=y,g=_;else break;if(-1===_||0===y.childNodes.length)break;v=function(t){switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return t.length;default:return t.childNodes.length}}(y=y.childNodes[_])}return t.setStart(d,g),t}},630685:function(t,e,r){"use strict";var n=r(961271),i=r(295864);t.exports=function(t){for(var e=t;e&&e!==n(t).documentElement;){var r=i(e);if(null!=r)return r;e=e.parentNode}return null}},720379:function(t){"use strict";t.exports=function(t,e,r,n){if(t.size){var i=0;t.reduce(function(t,o,a){return e(t,o)||(r(t)&&n(i,a),i=a),o}),r(t.last())&&n(i,t.count())}}},551558:function(t){"use strict";var e={};t.exports=function(){for(var t;void 0===t||e.hasOwnProperty(t)||!isNaN(+t);)t=Math.floor(0x1000000*Math.random()).toString(32);return e[t]=!0,t}},108267:function(t,e,r){"use strict";var n=r(39472),i=r(38465),o=r(581079);function a(t,e,r,a,u,s,c){var l=r.getStartOffset(),f=r.getEndOffset(),p=t.__get(u).getMutability(),h=c?l:f;if("MUTABLE"===p)return r;var d=i(e,u).filter(function(t){return h<=t.end&&h>=t.start});1!=d.length&&o(!1);var g=d[0];if("IMMUTABLE"===p)return r.merge({anchorOffset:g.start,focusOffset:g.end,isBackward:!1});s||(c?f=g.end:l=g.start);var y=n.getRemovalRange(l,f,e.getText().slice(g.start,g.end),g.start,a);return r.merge({anchorOffset:y.start,focusOffset:y.end,isBackward:!1})}t.exports=function(t,e,r,n,i){var o=n.getStartOffset(),u=n.getEndOffset(),s=e.getEntityAt(o),c=r.getEntityAt(u-1);if(!s&&!c)return n;var l=n;if(s&&s===c)l=a(t,e,l,i,s,!0,!0);else if(s&&c){var f=a(t,e,l,i,s,!1,!0),p=a(t,r,l,i,c,!1,!1);l=l.merge({anchorOffset:f.getAnchorOffset(),focusOffset:p.getFocusOffset(),isBackward:!1})}else if(s){var h=a(t,e,l,i,s,!1,!0);l=l.merge({anchorOffset:h.getStartOffset(),isBackward:!1})}else if(c){var d=a(t,r,l,i,c,!1,!1);l=l.merge({focusOffset:d.getEndOffset(),isBackward:!1})}return l}},15543:function(t,e,r){"use strict";var n=r(581079),i=r(217492);t.exports=function(t){var e=t.editorContainer;return e||n(!1),i(e.firstChild)||n(!1),e.firstChild}},148727:function(t,e,r){"use strict";var n=r(250010),i=r(999296);t.exports=function(t,e){var r=e.getStartKey(),o=e.getStartOffset(),a=e.getEndKey(),u=e.getEndOffset(),s=i(t,e).getBlockMap(),c=s.keySeq(),l=c.indexOf(r),f=c.indexOf(a)+1;return n(s.slice(l,f).map(function(t,e){var n=t.getText(),i=t.getCharacterList();return r===a?t.merge({text:n.slice(o,u),characterList:i.slice(o,u)}):e===r?t.merge({text:n.slice(o),characterList:i.slice(o)}):e===a?t.merge({text:n.slice(0,u),characterList:i.slice(0,u)}):t}))}},961271:function(t){"use strict";t.exports=function(t){return t&&t.ownerDocument?t.ownerDocument:document}},598335:function(t,e,r){"use strict";var n=r(147521),i=r(574369),o=r(169774),a=o.isPlatform("Mac OS X"),u=a&&o.isBrowser("Firefox < 29"),s=n.hasCommandModifier,c=n.isCtrlKeyCommand;function l(t){return a&&t.altKey||c(t)}t.exports=function(t){switch(t.keyCode){case 66:return s(t)?"bold":null;case 68:return c(t)?"delete":null;case 72:return c(t)?"backspace":null;case 73:return s(t)?"italic":null;case 74:return s(t)?"code":null;case 75:return a&&c(t)?"secondary-cut":null;case 77:case 79:return c(t)?"split-block":null;case 84:return a&&c(t)?"transpose-characters":null;case 85:return s(t)?"underline":null;case 87:return a&&c(t)?"backspace-word":null;case 89:if(c(t))return a?"secondary-paste":"redo";return null;case 90:return(s(t)?t.shiftKey?"redo":"undo":null)||null;case i.RETURN:return"split-block";case i.DELETE:return!a&&t.shiftKey?null:l(t)?"delete-word":"delete";case i.BACKSPACE:return s(t)&&a?"backspace-to-start-of-line":l(t)?"backspace-word":"backspace";case i.LEFT:return u&&s(t)?"move-selection-to-start-of-block":null;case i.RIGHT:return u&&s(t)?"move-selection-to-end-of-block":null;default:return null}}},683289:function(t,e,r){"use strict";var n=r(979162);t.exports=function(t,e){var r=e.ownerDocument.defaultView.getSelection();return 0===r.rangeCount?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:n(t,e,r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}},979162:function(t,e,r){"use strict";var n=r(630685),i=r(295864),o=r(534978),a=r(581079),u=r(613078),s=r(467159);function c(t,e,r){var o=e,c=n(o);if(null!=c||t&&(t===o||t.firstChild===o)||a(!1),t===o&&(u(o=o.firstChild)||a(!1),"true"!==o.getAttribute("data-contents")&&a(!1),r>0&&(r=o.childNodes.length)),0===r){var f=null;if(null!=c)f=c;else{var p=function(t){for(;t.firstChild&&(u(t.firstChild)&&"true"===t.firstChild.getAttribute("data-blocks")||i(t.firstChild));)t=t.firstChild;return t}(o);f=s(i(p))}return{key:f,offset:0}}var h=o.childNodes[r-1],d=null,g=null;if(i(h)){var y=function(t){for(;t.lastChild&&(u(t.lastChild)&&"true"===t.lastChild.getAttribute("data-blocks")||i(t.lastChild));)t=t.lastChild;return t}(h);d=s(i(y)),g=l(y)}else d=s(c),g=l(h);return{key:d,offset:g}}function l(t){var e=t.textContent;return"\n"===e?0:e.length}t.exports=function(t,e,r,i,a,u){var l=r.nodeType===Node.TEXT_NODE,f=a.nodeType===Node.TEXT_NODE;if(l&&f)return{selectionState:o(t,s(n(r)),i,s(n(a)),u),needsRecovery:!1};var p=null,h=null,d=!0;return l?(p={key:s(n(r)),offset:i},h=c(e,a,u)):f?(h={key:s(n(a)),offset:u},p=c(e,r,i)):(p=c(e,r,i),h=c(e,a,u),r===a&&i===u&&(d=!!r.firstChild&&"BR"!==r.firstChild.nodeName)),{selectionState:o(t,p.key,p.offset,h.key,h.offset),needsRecovery:d}}},596464:function(t,e,r){"use strict";var n=r(94553).notEmptyKey;function i(t,e){return n(e)&&"MUTABLE"===t.__get(e).getMutability()?e:null}t.exports=function(t,e){if(e.isCollapsed()){var r,n=e.getAnchorKey(),o=e.getAnchorOffset();return o>0?(r=t.getBlockForKey(n).getEntityAt(o-1))!==t.getBlockForKey(n).getEntityAt(o)?null:i(t.getEntityMap(),r):null}var a=e.getStartKey(),u=e.getStartOffset(),s=t.getBlockForKey(a);return r=u===s.getLength()?null:s.getEntityAt(u),i(t.getEntityMap(),r)}},458545:function(t,e,r){"use strict";var n=r(148727);t.exports=function(t){var e=t.getSelection();return e.isCollapsed()?null:n(t.getCurrentContent(),e)}},260284:function(t,e,r){"use strict";var n=r(214788);t.exports=function(t,e){if(!(t instanceof n))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=e.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?e.get(a):null}return o?o.getNextSiblingKey():null}},682146:function(t,e,r){"use strict";var n=r(195691);t.exports=function(t){var e=n(t),r=0,i=0,o=0,a=0;if(e.length){if(e.length>1&&0===e[0].width){var u=e[1];r=u.top,i=u.right,o=u.bottom,a=u.left}else{var s=e[0];r=s.top,i=s.right,o=s.bottom,a=s.left}for(var c=1;c6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",s=r.get(i),c=s.getText(),l=s.getCharacterList(),f=o+n.getText().length,p=null;switch(u){case"MERGE_OLD_DATA_TO_NEW_DATA":p=n.getData().merge(s.getData());break;case"REPLACE_WITH_NEW_DATA":p=n.getData()}var h=s.merge({text:c.slice(0,o)+n.getText()+c.slice(o),characterList:a(l,n.getCharacterList(),o),data:p});return t.merge({blockMap:r.set(i,h),selectionBefore:e,selectionAfter:e.merge({anchorKey:i,anchorOffset:f,focusKey:i,focusOffset:f,isBackward:!1})})},f=function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.slice(0,e),a=i.slice(0,e),u=r.first();return t.merge({text:o+u.getText(),characterList:a.concat(u.getCharacterList()),type:o?t.getType():u.getType(),data:u.getData()})},p=function(t,e,r){var n=t.getText(),i=t.getCharacterList(),o=n.length,a=n.slice(e,o),u=i.slice(e,o),s=r.last();return s.merge({text:s.getText()+a,characterList:s.getCharacterList().concat(u),data:s.getData()})},h=function(t,e){var r=t.getKey(),n=t,i=[];for(e.get(r)&&i.push(r);n&&n.getNextSiblingKey();){var o=n.getNextSiblingKey();if(!o)break;i.push(o),n=e.get(o)}return i},d=function(t,e,r,o,a,u){var s,l=r.first()instanceof i,d=[],g=o.size,y=r.get(a),v=o.first(),m=o.last(),_=m.getLength(),b=m.getKey(),S=l&&(!y.getChildKeys().isEmpty()||!v.getChildKeys().isEmpty());r.forEach(function(t,e){if(e!==a)return void d.push(t);S?d.push(t):d.push(f(t,u,o)),o.slice(+!S,g-1).forEach(function(t){return d.push(t)}),d.push(p(t,u,o))});var w=n.createFromArray(d);return l&&(w=(s=w).withMutations(function(t){var e=y.getKey(),r=v.getKey(),n=y.getNextSiblingKey(),i=y.getParentKey(),o=h(v,s),a=o[o.length-1];if(t.get(r)?(t.setIn([e,"nextSibling"],r),t.setIn([r,"prevSibling"],e)):(t.setIn([e,"nextSibling"],v.getNextSiblingKey()),t.setIn([v.getNextSiblingKey(),"prevSibling"],e)),t.setIn([a,"nextSibling"],n),n&&t.setIn([n,"prevSibling"],a),o.forEach(function(e){return t.setIn([e,"parent"],i)}),i){var u=s.get(i).getChildKeys(),l=u.indexOf(e),f=u.toArray();f.splice.apply(f,[l+1,0].concat(o)),t.setIn([i,"children"],c(f))}})),t.merge({blockMap:w,selectionBefore:e,selectionAfter:e.merge({anchorKey:b,anchorOffset:_,focusKey:b,focusOffset:_,isBackward:!1})})};t.exports=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";e.isCollapsed()||u(!1);var o=t.getBlockMap(),a=s(r),c=e.getStartKey(),f=e.getStartOffset(),p=o.get(c);return(p instanceof i&&(p.getChildKeys().isEmpty()||u(!1)),1===a.size)?l(t,e,o,a.first(),c,f,n):d(t,e,o,a,c,f)}},475854:function(t){"use strict";t.exports=function(t,e,r){var n=t;if(r===n.count())e.forEach(function(t){n=n.push(t)});else if(0===r)e.reverse().forEach(function(t){n=n.unshift(t)});else{var i=n.slice(0,r),o=n.slice(r);n=i.concat(e,o).toList()}return n}},661785:function(t,e,r){"use strict";var n=r(65183),i=r(475854),o=r(581079),a=n.Repeat;t.exports=function(t,e,r,n){e.isCollapsed()||o(!1);var u=null;if(null!=r&&(u=r.length),null==u||0===u)return t;var s=t.getBlockMap(),c=e.getStartKey(),l=e.getStartOffset(),f=s.get(c),p=f.getText(),h=f.merge({text:p.slice(0,l)+r+p.slice(l,f.getLength()),characterList:i(f.getCharacterList(),a(n,u).toList(),l)}),d=l+u;return t.merge({blockMap:s.set(c,h),selectionAfter:e.merge({anchorOffset:d,focusOffset:d})})}},613078:function(t){"use strict";t.exports=function(t){return!!t&&!!t.ownerDocument&&t.nodeType===Node.ELEMENT_NODE}},352582:function(t){"use strict";t.exports=function(t){return"handled"===t||!0===t}},797187:function(t,e,r){"use strict";var n=r(613078);t.exports=function(t){return!!t&&!!t.ownerDocument&&n(t)&&"A"===t.nodeName}},318720:function(t,e,r){"use strict";var n=r(613078);t.exports=function(t){return!!t&&!!t.ownerDocument&&n(t)&&"BR"===t.nodeName}},217492:function(t){"use strict";t.exports=function(t){return!!t&&!!t.ownerDocument&&(t.ownerDocument.defaultView?t instanceof t.ownerDocument.defaultView.HTMLElement:t instanceof HTMLElement)}},570508:function(t,e,r){"use strict";var n=r(613078);t.exports=function(t){return!!t&&!!t.ownerDocument&&n(t)&&"IMG"===t.nodeName}},302354:function(t){"use strict";t.exports=function(t){if(!t||!("ownerDocument"in t))return!1;if("ownerDocument"in t){if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1}},358076:function(t){"use strict";t.exports=function(t){var e=t.getSelection(),r=e.getAnchorKey(),n=t.getBlockTree(r),i=e.getStartOffset(),o=!1;return n.some(function(t){return i===t.get("start")?(o=!0,!0):io){var s=n.getKeyBefore(i);null==s?a=i:(a=s,u=n.getBlockForKey(s).getText().length)}else u=o-e;return r.merge({focusKey:a,focusOffset:u,isBackward:!0})}},802801:function(t,e,r){"use strict";r(42547),t.exports=function(t,e){var r,n=t.getSelection(),i=n.getStartKey(),o=n.getStartOffset(),a=t.getCurrentContent(),u=i;return e>a.getBlockForKey(i).getText().length-o?(u=a.getKeyAfter(i),r=0):r=o+e,n.merge({focusKey:u,focusOffset:r})}},250010:function(t,e,r){"use strict";var n=r(214788),i=r(551558),o=r(65183).OrderedMap,a=function(t){var e,r={};return o(t.withMutations(function(t){t.forEach(function(n,o){var a=n.getKey(),u=n.getNextSiblingKey(),s=n.getPrevSiblingKey(),c=n.getChildKeys(),l=n.getParentKey(),f=i();if(r[a]=f,u&&(t.get(u)?t.setIn([u,"prevSibling"],f):t.setIn([a,"nextSibling"],null)),s&&(t.get(s)?t.setIn([s,"nextSibling"],f):t.setIn([a,"prevSibling"],null)),l&&t.get(l)){var p=t.get(l).getChildKeys();t.setIn([l,"children"],p.set(p.indexOf(n.getKey()),f))}else t.setIn([a,"parent"],null),e&&(t.setIn([e.getKey(),"nextSibling"],f),t.setIn([a,"prevSibling"],r[e.getKey()])),e=t.get(a);c.forEach(function(e){t.get(e)?t.setIn([e,"parent"],f):t.setIn([a,"children"],n.getChildKeys().filter(function(t){return t!==e}))})})}).toArray().map(function(t){return[r[t.getKey()],t.set("key",r[t.getKey()])]}))};t.exports=function(t){return t.first()instanceof n?a(t):o(t.toArray().map(function(t){var e=i();return[e,t.set("key",e)]}))}},999296:function(t,e,r){"use strict";var n=r(359282),i=r(720379),o=r(581079);function a(t,e,r){var a=e.getCharacterList(),u=r>0?a.get(r-1):void 0,s=r=r&&(f={start:t,end:e})}),"object"!=typeof f&&o(!1),f),d=h.start,g=h.end;de;)t=t.pop(),r--;else{var n=t.slice(0,e),i=t.slice(r);t=n.concat(i).toList()}return t};t.exports=function(t,e){if(e.isCollapsed())return t;var r,o,h=t.getBlockMap(),d=e.getStartKey(),g=e.getStartOffset(),y=e.getEndKey(),v=e.getEndOffset(),m=h.get(d),_=h.get(y),b=m instanceof n,S=[];if(b){var w=_.getChildKeys(),x=s(y,h);_.getNextSiblingKey()&&(S=S.concat(x)),w.isEmpty()||(S=S.concat(x.concat([y]))),S=S.concat(s(i(_,h),h))}o=m===_?p(m.getCharacterList(),g,v):m.getCharacterList().slice(0,g).concat(_.getCharacterList().slice(v));var k=m.merge({text:m.getText().slice(0,g)+_.getText().slice(v),characterList:o}),C=b&&0===g&&0===v&&_.getParentKey()===d&&null==_.getPrevSiblingKey()?a([[d,null]]):h.toSeq().skipUntil(function(t,e){return e===d}).takeUntil(function(t,e){return e===y}).filter(function(t,e){return -1===S.indexOf(e)}).concat(a([[y,null]])).map(function(t,e){return e===d?k:null}),E=h.merge(C).filter(function(t){return!!t});return b&&m!==_&&(E=(r=E).withMutations(function(t){if(u(m.getKey(),t,function(e){return e.merge({nextSibling:l(e,t,h),prevSibling:f(e,t,h)})}),u(_.getKey(),t,function(e){return e.merge({nextSibling:l(e,t,h),prevSibling:f(e,t,h)})}),s(m.getKey(),h).forEach(function(e){return u(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:l(e,t,h),prevSibling:f(e,t,h)})})}),u(m.getNextSiblingKey(),t,function(t){return t.merge({prevSibling:m.getPrevSiblingKey()})}),u(m.getPrevSiblingKey(),t,function(e){return e.merge({nextSibling:l(e,t,h)})}),u(_.getNextSiblingKey(),t,function(e){return e.merge({prevSibling:f(e,t,h)})}),u(_.getPrevSiblingKey(),t,function(t){return t.merge({nextSibling:_.getNextSiblingKey()})}),s(_.getKey(),h).forEach(function(e){u(e,t,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return t.get(e)}),nextSibling:l(e,t,h),prevSibling:f(e,t,h)})})}),c(_,h).forEach(function(e){return u(e,t,function(e){return e.merge({nextSibling:l(e,t,h),prevSibling:f(e,t,h)})})}),null==r.get(m.getKey())&&null!=r.get(_.getKey())&&_.getParentKey()===m.getKey()&&null==_.getPrevSiblingKey()){var e=m.getPrevSiblingKey();u(_.getKey(),t,function(t){return t.merge({prevSibling:e})}),u(e,t,function(t){return t.merge({nextSibling:_.getKey()})});var n=e?r.get(e):null,i=n?n.getParentKey():null;if(m.getChildKeys().forEach(function(e){u(e,t,function(t){return t.merge({parent:i})})}),null!=i){var o=r.get(i);u(i,t,function(t){return t.merge({children:o.getChildKeys().concat(m.getChildKeys())})})}u(m.getChildKeys().find(function(t){return null===r.get(t).getNextSiblingKey()}),t,function(t){return t.merge({nextSibling:m.getNextSiblingKey()})})}})),t.merge({blockMap:E,selectionBefore:e,selectionAfter:e.merge({anchorKey:d,anchorOffset:g,focusKey:d,focusOffset:g,isBackward:!1})})}},473297:function(t,e,r){"use strict";var n=r(621796),i=r(223138)("draft_tree_data_support");t.exports=function(t,e,r){var o=t.getSelection(),a=t.getCurrentContent(),u=o,s=o.getAnchorKey(),c=o.getFocusKey(),l=a.getBlockForKey(s);if(i&&"forward"===r&&s!==c)return a;if(o.isCollapsed()){if("forward"===r){if(t.isSelectionAtEndOfContent())return a;if(i&&o.getAnchorOffset()===a.getBlockForKey(s).getLength()){var f=a.getBlockForKey(l.nextSibling);if(!f||0===f.getLength())return a}}else if(t.isSelectionAtStartOfContent())return a;if((u=e(t))===o)return a}return n.removeRange(a,u,r)}},555159:function(t){"use strict";var e=RegExp("\r","g");t.exports=function(t){return t.replace(e,"")}},609627:function(t,e,r){"use strict";var n=r(484216),i=r(754387),o=r(169774),a=r(808570),u=r(924125),s=r(961271),c=r(581079),l=r(613078),f=o.isBrowser("IE");function p(t,e){for(var r=t,n=r;r;)if(l(r)&&n.hasAttribute("contenteditable"))return function(t,e){if(!t)return"[empty]";var r=function t(e,r){var n=void 0!==r?r(e):[];if(e.nodeType===Node.TEXT_NODE){var i=e.textContent.length;return s(e).createTextNode("[text "+i+(n.length?" | "+n.join(", "):"")+"]")}var o=e.cloneNode();1===o.nodeType&&n.length&&o.setAttribute("data-labels",n.join(", "));for(var a=e.childNodes,u=0;uh(e)&&i.logSelectionStateFailure({anonymizedDom:p(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(n.toJS())});var s=e===t.focusNode;try{t.extend(e,r)}catch(a){throw i.logSelectionStateFailure({anonymizedDom:p(e,function(e){var r=[];return e===o&&r.push("active element"),e===t.anchorNode&&r.push("selection anchor node"),e===t.focusNode&&r.push("selection focus node"),r}),extraParams:JSON.stringify({activeElementName:o?o.nodeName:null,nodeIsFocus:e===t.focusNode,nodeWasFocus:s,selectionRangeCount:t.rangeCount,selectionAnchorNodeName:t.anchorNode?t.anchorNode.nodeName:null,selectionAnchorOffset:t.anchorOffset,selectionFocusNodeName:t.focusNode?t.focusNode.nodeName:null,selectionFocusOffset:t.focusOffset,message:a?""+a:null,offset:r},null,2),selectionState:JSON.stringify(n.toJS(),null,2)}),a}}else if(t.rangeCount>0){var c=t.getRangeAt(0);c.setEnd(e,r),t.addRange(c.cloneRange())}}function g(t,e,r,o){var a=s(e).createRange();if(r>h(e)&&(i.logSelectionStateFailure({anonymizedDom:p(e),extraParams:JSON.stringify({offset:r}),selectionState:JSON.stringify(o.toJS())}),n.handleExtensionCausedError()),a.setStart(e,r),f)try{t.addRange(a)}catch(t){}else t.addRange(a)}t.exports={setDraftEditorSelection:function(t,e,r,n,i){var o=s(e);if(a(o.documentElement,e)){var u=o.defaultView.getSelection(),c=t.getAnchorKey(),l=t.getAnchorOffset(),f=t.getFocusKey(),p=t.getFocusOffset(),h=t.getIsBackward();if(!u.extend&&h){var y=c,v=l;c=f,l=p,f=y,p=v,h=!1}var m=c===r&&n<=l&&i>=l,_=f===r&&n<=p&&i>=p;if(m&&_){u.removeAllRanges(),g(u,e,l-n,t),d(u,e,p-n,t);return}if(h){if(_&&(u.removeAllRanges(),g(u,e,p-n,t)),m){var b=u.focusNode,S=u.focusOffset;u.removeAllRanges(),g(u,e,l-n,t),d(u,b,S,t)}}else m&&(u.removeAllRanges(),g(u,e,l-n,t)),_&&d(u,e,p-n,t)}},addFocusToSelection:d}},653216:function(t,e,r){"use strict";var n=r(214788),i=r(551558),o=r(65183),a=r(581079),u=r(170261),s=o.List,c=o.Map,l=function(t,e,r){if(t){var n=e.get(t);n&&e.set(t,r(n))}};t.exports=function(t,e){e.isCollapsed()||a(!1);var r=e.getAnchorKey(),o=t.getBlockMap(),f=o.get(r),p=f.getText();if(!p){var h=f.getType();if("unordered-list-item"===h||"ordered-list-item"===h)return u(t,e,function(t){return t.merge({type:"unstyled",depth:0})})}var d=e.getAnchorOffset(),g=f.getCharacterList(),y=i(),v=f instanceof n,m=f.merge({text:p.slice(0,d),characterList:g.slice(0,d)}),_=m.merge({key:y,text:p.slice(d),characterList:g.slice(d),data:c()}),b=o.toSeq().takeUntil(function(t){return t===f}),S=o.toSeq().skipUntil(function(t){return t===f}).rest(),w=b.concat([[r,m],[y,_]],S).toOrderedMap();return v&&(f.getChildKeys().isEmpty()||a(!1),w=w.withMutations(function(t){var e=m.getKey(),r=_.getKey();l(m.getParentKey(),t,function(t){var n=t.getChildKeys(),i=n.indexOf(e)+1,o=n.toArray();return o.splice(i,0,r),t.merge({children:s(o)})}),l(m.getNextSiblingKey(),t,function(t){return t.merge({prevSibling:r})}),l(e,t,function(t){return t.merge({nextSibling:r})}),l(r,t,function(t){return t.merge({prevSibling:e})})})),t.merge({blockMap:w,selectionBefore:e,selectionAfter:e.merge({anchorKey:y,anchorOffset:0,focusKey:y,focusOffset:0,isBackward:!1})})}},359565:function(t){"use strict";var e=/\r\n?|\n/g;t.exports=function(t){return t.split(e)}},198392:function(t,e,r){"use strict";var n=r(8235),i=r(392919),o=r(304611),a=RegExp("\r\n","g"),u={"text/rtf":1,"text/html":1};function s(t){if("file"==t.kind)return t.getAsFile()}t.exports=function(){function t(t){this.data=t,this.types=t.types?i(t.types):[]}var e=t.prototype;return e.isRichText=function(){return!!(this.getHTML()&&this.getText())||!this.isImage()&&this.types.some(function(t){return u[t]})},e.getText=function(){var t;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(t=this.data.getData("text/plain")):t=this.data.getData("Text")),t?t.replace(a,"\n"):null},e.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");else if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},e.isLink=function(){return this.types.some(function(t){return -1!=t.indexOf("Url")||-1!=t.indexOf("text/uri-list")||t.indexOf("text/x-moz-url")})},e.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},e.isImage=function(){if(this.types.some(function(t){return -1!=t.indexOf("application/x-moz-file")}))return!0;for(var t=this.getFiles(),e=0;e0},t}()},574369:function(t){"use strict";t.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105}},8235:function(t){"use strict";var e={isImage:function(t){return"image"===r(t)[0]},isJpeg:function(t){var n=r(t);return e.isImage(t)&&("jpeg"===n[1]||"pjpeg"===n[1])}};function r(t){return t.split("/")}t.exports=e},1231:function(t){"use strict";function e(t,e){return!!e&&(t===e.documentElement||t===e.body)}t.exports={getTop:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollTop||r.documentElement.scrollTop:t.scrollTop},setTop:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollTop=n.documentElement.scrollTop=r:t.scrollTop=r},getLeft:function(t){var r=t.ownerDocument;return e(t,r)?r.body.scrollLeft||r.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,r){var n=t.ownerDocument;e(t,n)?n.body.scrollLeft=n.documentElement.scrollLeft=r:t.scrollLeft=r}}},292489:function(t,e,r){"use strict";function n(t,e){var r=i.get(t,e);return"auto"===r||"scroll"===r}var i={get:r(858255),getScrollParent:function(t){if(!t)return null;for(var e=t.ownerDocument;t&&t!==e.body;){if(n(t,"overflow")||n(t,"overflowY")||n(t,"overflowX"))return t;t=t.parentNode}return e.defaultView||e.parentWindow}};t.exports=i},207549:function(t){"use strict";t.exports={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞\xa1-\xb1\xb4-\xb8\xba\xbb\xbf]"}}},946572:function(t){"use strict";t.exports=function(){function t(t){var e,r;r=void 0,(e="_uri")in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r,this._uri=t}return t.prototype.toString=function(){return this._uri},t}()},746117:function(t,e,r){"use strict";var n=r(856084),i=r(581079),o="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",a="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",u=RegExp("[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+o+a+"]"),s=RegExp("["+o+a+"]");function c(t){var e=u.exec(t);return null==e?null:e[0]}function l(t){var e=c(t);return null==e?n.NEUTRAL:s.exec(e)?n.RTL:n.LTR}function f(t,e){if(e=e||n.NEUTRAL,!t.length)return e;var r=l(t);return r===n.NEUTRAL?e:r}function p(t,e){return e||(e=n.getGlobalDir()),n.isStrong(e)||i(!1),f(t,e)}t.exports={firstStrongChar:c,firstStrongCharDir:l,resolveBlockDir:f,getDirection:p,isDirectionLTR:function(t,e){return p(t,e)===n.LTR},isDirectionRTL:function(t,e){return p(t,e)===n.RTL}}},856084:function(t,e,r){"use strict";var n=r(581079),i=null;function o(t){return"LTR"===t||"RTL"===t}function a(t){return o(t)||n(!1),"LTR"===t?"ltr":"rtl"}t.exports={NEUTRAL:"NEUTRAL",LTR:"LTR",RTL:"RTL",isStrong:o,getHTMLDir:a,getHTMLDirIfDifferent:function(t,e){return o(t)||n(!1),o(e)||n(!1),t===e?null:a(t)},setGlobalDir:function(t){i=t},initGlobalDir:function(){i="LTR"},getGlobalDir:function(){return i||this.initGlobalDir(),i||n(!1),i}}},166898:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i=r(746117),o=r(856084),a=r(581079);t.exports=function(){function t(t){n(this,"_defaultDir",void 0),n(this,"_lastDir",void 0),t?o.isStrong(t)||a(!1):t=o.getGlobalDir(),this._defaultDir=t,this.reset()}var e=t.prototype;return e.reset=function(){this._lastDir=this._defaultDir},e.getDirection=function(t){return this._lastDir=i.getDirection(t,this._lastDir),this._lastDir},t}()},733359:function(t,e,r){"use strict";var n=r(581079),i=/[\uD800-\uDFFF]/;function o(t){return 55296<=t&&t<=57343}function a(t){return i.test(t)}function u(t,e){return 1+o(t.charCodeAt(e))}function s(t,e,r){if(e=e||0,r=void 0===r?1/0:r||0,!a(t))return t.substr(e,r);var n=t.length;if(n<=0||e>n||r<=0)return"";var i=0;if(e>0){for(;e>0&&i=n)return""}else if(e<0){for(i=n;e<0&&00&&o=|~>|~|>|)?\s*(.+)/,s=/^(\d*)(.*)/;function c(t,e){if(""===(t=t.trim()))return!0;var r,n,o,a,u,s,c,h=e.split(i),d=f(t),g=d.modifier,v=d.rangeComponents;switch(g){case"<":return -1===y(h,v);case"<=":return -1===(r=y(h,v))||0===r;case">=":return l(h,v);case">":return 1===y(h,v);case"~":case"~>":return n=h,a=(o=v).slice(),(u=o.slice()).length>1&&u.pop(),s=u.length-1,p(c=parseInt(u[s],10))&&(u[s]=c+1+""),l(n,a)&&-1===y(n,u);default:return 0===y(h,v)}}function l(t,e){var r=y(t,e);return 1===r||0===r}function f(t){var e=t.split(i),r=e[0].match(u);return r||n(!1),{modifier:r[1],rangeComponents:[r[2]].concat(e.slice(1))}}function p(t){return!isNaN(t)&&isFinite(t)}function h(t){return!f(t).modifier}function d(t,e){for(var r=t.length;re)?1:t1?u.some(function(t){return v.contains(t,i)}):function(t,e){var r=t.split(a);if(r.length>0&&r.length<=2||n(!1),1===r.length)return c(r[0],e);var i=r[0],o=r[1];return h(i)&&h(o)||n(!1),c(">="+i,e)&&c("<="+o,e)}(r=u[0].trim(),i)}};t.exports=v},322273:function(t){"use strict";var e=/-(.)/g;t.exports=function(t){return t.replace(e,function(t,e){return e.toUpperCase()})}},808570:function(t,e,r){"use strict";var n=r(656566);t.exports=function t(e,r){if(!e||!r)return!1;if(e===r)return!0;if(n(e))return!1;if(n(r))return t(e,r.parentNode);if("contains"in e)return e.contains(r);else if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(r));else return!1}},392919:function(t,e,r){"use strict";var n=r(581079);t.exports=function(t){if(!(t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)))return[t];if(Array.isArray(t))return t.slice();var e=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&n(!1),"number"!=typeof e&&n(!1),0===e||e-1 in t||n(!1),"function"==typeof t.callee&&n(!1),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var r=Array(e),i=0;i-1;t.exports=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}},675411:function(t,e,r){"use strict";var n=r(222671);t.exports=function(t){var e=n(t);return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}},222671:function(t,e,r){"use strict";var n=r(808570);t.exports=function(t){var e=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!n(e,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-e.clientLeft,right:Math.round(r.right)-e.clientLeft,top:Math.round(r.top)-e.clientTop,bottom:Math.round(r.bottom)-e.clientTop}}},685536:function(t,e,r){"use strict";var n=r(143310),i=r(688411);t.exports=function(t){var e=n(t.ownerDocument||t.document);t.Window&&t instanceof t.Window&&(t=e);var r=i(t),o=t===e?t.ownerDocument.documentElement:t,a=t.scrollWidth-o.clientWidth,u=t.scrollHeight-o.clientHeight;return r.x=Math.max(0,Math.min(r.x,a)),r.y=Math.max(0,Math.min(r.y,u)),r}},858255:function(t,e,r){"use strict";var n=r(322273),i=r(550782);function o(t){return null==t?t:String(t)}t.exports=function(t,e){var r;if(window.getComputedStyle&&(r=window.getComputedStyle(t,null)))return o(r.getPropertyValue(i(e)));if(document.defaultView&&document.defaultView.getComputedStyle){if(r=document.defaultView.getComputedStyle(t,null))return o(r.getPropertyValue(i(e)));if("display"===e)return"none"}return t.currentStyle?"float"===e?o(t.currentStyle.cssFloat||t.currentStyle.styleFloat):o(t.currentStyle[n(e)]):o(t.style&&t.style[n(e)])}},688411:function(t){"use strict";t.exports=function(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}},126502:function(t){"use strict";function e(){var t;return document.documentElement&&(t=document.documentElement.clientWidth),!t&&document.body&&(t=document.body.clientWidth),t||0}function r(){var t;return document.documentElement&&(t=document.documentElement.clientHeight),!t&&document.body&&(t=document.body.clientHeight),t||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||r()}}n.withoutScrollbars=function(){return{width:e(),height:r()}},t.exports=n},550782:function(t){"use strict";var e=/([A-Z])/g;t.exports=function(t){return t.replace(e,"-$1").toLowerCase()}},581079:function(t){"use strict";var e=function(t){if(void 0===t)throw Error("invariant(...): Second argument must be a string.")};t.exports=function(t,r){for(var n,i=arguments.length,o=Array(i>2?i-2:0),a=2;a1)for(var n=1;n>>0;if(""+r!==e||0xffffffff===r)return NaN;e=r}return e<0?I(t)+e:e}function L(){return!0}function R(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function N(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var F="function"==typeof Symbol&&Symbol.iterator,z="@@iterator",P=F||z;function j(t){this.next=t}function U(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function q(){return{value:void 0,done:!0}}function H(t){return t&&"function"==typeof t.next}function W(t){var e=V(t);return e&&e.call(t)}function V(t){var e=t&&(F&&t[F]||t[z]);if("function"==typeof e)return e}function G(t){return t&&"number"==typeof t.length}function J(t){return null==t?ti():y(t)?t.toSeq():function(t){var e=tu(t)||"object"==typeof t&&new tt(t);if(!e)throw TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function X(t){return null==t?ti().toKeyedSeq():y(t)?v(t)?t.toSeq():t.fromEntrySeq():to(t)}function Y(t){return null==t?ti():y(t)?v(t)?t.entrySeq():t.toIndexedSeq():ta(t)}function $(t){return(null==t?ti():!y(t)?ta(t):v(t)?t.entrySeq():t).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=0,j.VALUES=1,j.ENTRIES=2,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[P]=function(){return this},f(J,p),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(t,e){return ts(this,t,e,!0)},J.prototype.__iterator=function(t,e){return tc(this,t,e,!0)},f(X,J),X.prototype.toKeyedSeq=function(){return this},f(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(t,e){return ts(this,t,e,!1)},Y.prototype.__iterator=function(t,e){return tc(this,t,e,!1)},f($,J),$.of=function(){return $(arguments)},$.prototype.toSetSeq=function(){return this},J.isSeq=tn,J.Keyed=X,J.Set=$,J.Indexed=Y;var Z="@@__IMMUTABLE_SEQ__@@";function Q(t){this._array=t,this.size=t.length}function tt(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function te(t){this._iterable=t,this.size=t.length||t.size}function tr(t){this._iterator=t,this._iteratorCache=[]}function tn(t){return!!(t&&t[Z])}function ti(){return t||(t=new Q([]))}function to(t){var e=Array.isArray(t)?new Q(t).fromEntrySeq():H(t)?new tr(t).fromEntrySeq():V(t)?new te(t).fromEntrySeq():"object"==typeof t?new tt(t):void 0;if(!e)throw TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function ta(t){var e=tu(t);if(!e)throw TypeError("Expected Array or iterable object of values: "+t);return e}function tu(t){return G(t)?new Q(t):H(t)?new tr(t):V(t)?new te(t):void 0}function ts(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var u=i[r?o-a:a];if(!1===e(u[1],n?u[0]:a,t))return a+1}return a}return t.__iterateUncached(e,r)}function tc(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,a=0;return new j(function(){var t=i[r?o-a:a];return a++>o?q():U(e,n?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,r)}function tl(t,e){return e?function t(e,r,n,i){return Array.isArray(r)?e.call(i,n,Y(r).map(function(n,i){return t(e,n,i,r)})):tf(r)?e.call(i,n,X(r).map(function(n,i){return t(e,n,i,r)})):r}(e,t,"",{"":t}):function t(e){return Array.isArray(e)?Y(e).map(t).toList():tf(e)?X(e).map(t).toMap():e}(t)}function tf(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tp(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!("function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e))}function th(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||v(t)!==v(e)||m(t)!==m(e)||b(t)!==b(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!_(t);if(b(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&tp(i[1],t)&&(r||tp(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,u=e.__iterate(function(e,n){if(r?!t.has(e):i?!tp(e,t.get(n,E)):!tp(t.get(n,E),e))return a=!1,!1});return a&&t.size===u}function td(t,r){if(!(this instanceof td))return new td(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(e)return e;e=this}}function tg(t,e){if(!t)throw Error(e)}function ty(t,e,n){if(!(this instanceof ty))return new ty(t,e,n);if(tg(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),en?q():U(t,i,r[e?n-i++:i++])})},f(tt,X),tt.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},tt.prototype.has=function(t){return this._object.hasOwnProperty(t)},tt.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var a=n[e?i-o:o];if(!1===t(r[a],a,this))return o+1}return o},tt.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new j(function(){var a=n[e?i-o:o];return o++>i?q():U(t,a,r[a])})},tt.prototype[k]=!0,f(te,Y),te.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r,n=W(this._iterable),i=0;if(H(n))for(;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},te.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=W(this._iterable);if(!H(r))return new j(q);var n=0;return new j(function(){var e=r.next();return e.done?e:U(t,n++,e.value)})},f(tr,Y),tr.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return U(t,i,n[i++])})},f(td,Y),td.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},td.prototype.get=function(t,e){return this.has(t)?this._value:e},td.prototype.includes=function(t){return tp(this._value,t)},td.prototype.slice=function(t,e){var r=this.size;return R(t,e,r)?this:new td(this._value,N(e,r,r)-N(t,r,0))},td.prototype.reverse=function(){return this},td.prototype.indexOf=function(t){return tp(this._value,t)?0:-1},td.prototype.lastIndexOf=function(t){return tp(this._value,t)?this.size:-1},td.prototype.__iterate=function(t,e){for(var r=0;r1?" by "+this._step:"")+" ]"},ty.prototype.get=function(t,e){return this.has(t)?this._start+B(this,t)*this._step:e},ty.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=0&&rr?q():U(t,o++,a)})},ty.prototype.equals=function(t){return t instanceof ty?this._start===t._start&&this._end===t._end&&this._step===t._step:th(this,t)},f(tv,p),f(tm,tv),f(t_,tv),f(tb,tv),tv.Keyed=tm,tv.Indexed=t_,tv.Set=tb;var tS="function"==typeof Math.imul&&-2===Math.imul(0xffffffff,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function tw(t){return t>>>1&0x40000000|0xbfffffff&t}function tx(t){if(!1===t||null==t||"function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=0xffffffff*t);t>0xffffffff;)t/=0xffffffff,r^=t;return tw(r)}if("string"===e){return t.length>tT?(void 0===(o=tI[i=t])&&(o=tk(i),tA===tM&&(tA=0,tI={}),tA++,tI[i]=o),o):tk(t)}if("function"==typeof t.hashCode)return t.hashCode();if("object"===e){var i,o,a,u=t;if(tD&&void 0!==(a=n.get(u))||void 0!==(a=u[tK])||!tE&&(void 0!==(a=u.propertyIsEnumerable&&u.propertyIsEnumerable[tK])||void 0!==(a=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(u))))return a;if(a=++tO,0x40000000&tO&&(tO=0),tD)n.set(u,a);else if(void 0!==tC&&!1===tC(u))throw Error("Non-extensible objects are not allowed as keys.");else if(tE)Object.defineProperty(u,tK,{enumerable:!1,configurable:!1,writable:!1,value:a});else if(void 0!==u.propertyIsEnumerable&&u.propertyIsEnumerable===u.constructor.prototype.propertyIsEnumerable)u.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},u.propertyIsEnumerable[tK]=a;else if(void 0!==u.nodeType)u[tK]=a;else throw Error("Unable to set a non-enumerable property on object.");return a}if("function"==typeof t.toString)return tk(t.toString());throw Error("Value type "+e+" cannot be hashed.")}function tk(t){for(var e=0,r=0;r>>r)&31,u=(0===r?n:n>>>r)&31,s=a===u?[tZ(t,e,r+5,n,i)]:(o=new tq(e,n,i),a>1&0x55555555,t=(t=(0x33333333&t)+(t>>2&0x33333333))+(t>>4)&0xf0f0f0f,t+=t>>8,127&(t+=t>>16)}function t6(t,e,r,n){var i=n?t:A(t);return i[e]=r,i}tF[tN]=!0,tF[C]=tF.remove,tF.removeIn=tF.deleteIn,tz.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o=t7){var p=t,h=s,d=n,g=i;p||(p=new M);for(var y=new tq(p,tx(d),[d,g]),v=0;v>>t)&31),o=this.bitmap;return(o&i)==0?n:this.nodes[t2(o&i-1)].get(t+5,e,r,n)},tP.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=tx(n));var u=(0===e?r:r>>>e)&31,s=1<=t3){for(var g=t,y=p,v=c,m=u,_=d,b=0,S=Array(32),w=0;0!==v;w++,v>>>=1)S[w]=1&v?y[b++]:void 0;return S[m]=_,new tj(g,b+1,S)}if(l&&!d&&2===p.length&&t$(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&t$(d))return d;var x=t&&t===this.ownerID,k=l?d?c:c^s:c|s,C=l?d?t6(p,f,d,x):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,a=0;a>>t)&31,o=this.nodes[i];return o?o.get(t+5,e,r,n):n},tj.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=tx(n));var u=(0===e?r:r>>>e)&31,s=i===E,c=this.nodes,l=c[u];if(s&&!l)return this;var f=tY(l,t,e+5,r,n,i,o,a);if(f===l)return this;var p=this.count;if(l){if(!f&&--p0&&n<32)?eo(0,n,5,null,new er(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})})}function t4(t){return!!(t&&t[et])}f(t9,t_),t9.of=function(){return this(arguments)},t9.prototype.toString=function(){return this.__toString("List [","]")},t9.prototype.get=function(t,e){if((t=B(this,t))>=0&&t=t.size||e<0)return t.withMutations(function(t){e<0?el(t,e).set(0,r):el(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=K(O);return(e>=ep(t._capacity)?n=eu(n,t.__ownerID,0,e,r,o):i=eu(i,t.__ownerID,t._level,e,r,o),o.value)?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):eo(t._origin,t._capacity,t._level,i,n):t}(this,t,e)},t9.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},t9.prototype.insert=function(t,e){return this.splice(t,0,e)},t9.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ea()},t9.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){el(r,0,e+t.length);for(var n=0;n>>e&31;if(i>=this.array.length)return new er([],t);var o=0===i;if(e>0){var a=this.array[i];if((n=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!n)return this;var u=es(this,t);if(!o)for(var s=0;s>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=es(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var en={};function ei(t,e){var r=t._origin,n=t._capacity,i=ep(n),o=t._tail;return function t(a,u,s){var c,l,f,p,h,d,g,y,v,m,_,b;return 0===u?(c=a,f=(l=s)===i?o&&o.array:c&&c.array,p=l>r?0:r-l,(h=n-l)>32&&(h=32),function(){if(p===h)return en;var t=e?--h:p++;return f&&f[t]}):(d=a,g=u,y=s,m=d&&d.array,_=y>r?0:r-y>>g,(b=(n-y>>g)+1)>32&&(b=32),function(){for(;;){if(v){var r=v();if(r!==en)return r;v=null}if(_===b)return en;var n=e?--b:_++;v=t(m&&m[n],g-5,y+(n<>>r&31,s=t&&u0){var c=t&&t.array[u],l=eu(c,e,r-5,n,i,o);return l===c?t:((a=es(t,e)).array[u]=l,a)}return s&&t.array[u]===i?t:(T(o),a=es(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function es(t,e){return e&&t&&e===t.ownerID?t:new er(t?t.array.slice():[],e)}function ec(t,e){if(e>=ep(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&31],n-=5;return r}}function el(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new M,i=t._origin,o=t._capacity,a=i+e,u=void 0===r?o:r<0?o+r:i+r;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,l=0;a+l<0;)c=new er(c&&c.array.length?[void 0,c]:[],n),s+=5,l+=1<=1<f?new er([],n):h;if(h&&p>f&&a5;y-=5){var v=f>>>y&31;g=g.array[v]=es(g.array[v],n)}g.array[f>>>5&31]=h}if(u=p)a-=p,u-=p,s=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||p>>s&31;if(m!==p>>>s&31)break;m&&(l+=(1<i&&(c=c.removeBefore(n,s,a-l)),c&&pi&&(i=u.size),y(a)||(u=u.map(function(t){return tl(t)})),n.push(u)}return i>t.size&&(t=t.setSize(i)),t5(t,e,n)}function ep(t){return t<32?0:t-1>>>5<<5}function eh(t){return null==t?ey():ed(t)?t:ey().withMutations(function(e){var r=h(t);tB(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function ed(t){return tR(t)&&b(t)}function eg(t,e,r,n){var i=Object.create(eh.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ey(){return a||(a=eg(tJ(),ea()))}function ev(t,e,r){var n,i,o=t._map,a=t._list,u=o.get(e),s=void 0!==u;if(r===E){if(!s)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter(function(t,e){return void 0!==t&&u!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(r===a.get(u)[1])return t;n=o,i=a.set(u,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):eg(n,i)}function em(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function e_(t){this._iter=t,this.size=t.size}function eb(t){this._iter=t,this.size=t.size}function eS(t){this._iter=t,this.size=t.size}function ew(t){var e=eN(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=eF,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return!1!==e(r,t,n)},r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new j(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(+(1!==e),r)},e}function ex(t,e,r){var n=eN(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,E);return o===E?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,a){return!1!==n(e.call(r,t,i,a),i,o)},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(2,i);return new j(function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return U(n,u,e.call(r,a[1],u,t),i)})},n}function ek(t,e){var r=eN(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=ew(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=eF,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function eC(t,e,r,n){var i=eN(t);return n&&(i.has=function(n){var i=t.get(n,E);return i!==E&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,E);return o!==E&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate(function(t,o,s){if(e.call(r,t,o,s))return u++,i(t,n?o:u-1,a)},o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(2,o),u=0;return new j(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],l=s[1];if(e.call(r,l,c,t))return U(i,n?c:u++,l,o)}})},i}function eE(t,e,r,n){var i,o=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r|=0),R(e,r,o))return t;var a=N(e,o,0),u=N(r,o,o);if(a!=a||u!=u)return eE(t.toSeq().cacheResult(),e,r,n);var s=u-a;s==s&&(i=s<0?0:s);var c=eN(t);return c.size=0===i?i:t.size&&i||void 0,!n&&tn(t)&&i>=0&&(c.get=function(e,r){return(e=B(this,e))>=0&&ei)return q();var t=o.next();return n||1===e?t:0===e?U(e,s-1,void 0,t):U(e,s-1,t.value[1],t)})},c}function eD(t,e,r,n){var i=eN(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate(function(t,o,c){if(!(u&&(u=e.call(r,t,o,c))))return s++,i(t,n?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(2,o),s=!0,c=0;return new j(function(){var t,o,l;do{if((t=u.next()).done)if(n||1===i)return t;else if(0===i)return U(i,c++,void 0,t);else return U(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],s&&(s=e.call(r,l,o,a))}while(s);return 2===i?t:U(i,o,l,t)})},i}function eO(t,e,r){var n=eN(t);return n.__iterateUncached=function(n,i){var o=0,a=!1;return!function t(u,s){var c=this;u.__iterate(function(i,u){return(!e||s0}function eA(t,e,r){var n=eN(t);return n.size=new Q(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),W(n?t.reverse():t)}),o=0,a=!1;return new j(function(){var r;return(a||(a=(r=i.map(function(t){return t.next()})).some(function(t){return t.done})),a)?q():U(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function eI(t,e){return tn(t)?e:t.constructor(e)}function eB(t){if(t!==Object(t))throw TypeError("Expected [K, V] tuple: "+t)}function eL(t){return tB(t.size),I(t)}function eR(t){return v(t)?h:m(t)?d:g}function eN(t){return Object.create((v(t)?X:m(t)?Y:$).prototype)}function eF(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function ez(t,e){return t>e?1:t=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):e9(t,e)},e6.prototype.pushAll=function(t){if(0===(t=d(t)).size)return this;tB(t.size);var e=this.size,r=this._head;return(t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID)?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):e9(e,r)},e6.prototype.pop=function(){return this.slice(1)},e6.prototype.unshift=function(){return this.push.apply(this,arguments)},e6.prototype.unshiftAll=function(t){return this.pushAll(t)},e6.prototype.shift=function(){return this.pop.apply(this,arguments)},e6.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):e4()},e6.prototype.slice=function(t,e){if(R(t,e,this.size))return this;var r,n=N(t,this.size,0);if(N(e,r=this.size,r)!==this.size)return t_.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):e9(i,o)},e6.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?e9(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},e6.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},e6.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new j(function(){if(n){var e=n.value;return n=n.next,U(t,r++,e)}return q()})},e6.isStack=e7;var e3="@@__IMMUTABLE_STACK__@@",e8=e6.prototype;function e9(t,e,r,n){var i=Object.create(e8);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function e4(){return c||(c=e9(0))}function rt(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}e8[e3]=!0,e8.withMutations=tF.withMutations,e8.asMutable=tF.asMutable,e8.asImmutable=tF.asImmutable,e8.wasAltered=tF.wasAltered,p.Iterator=j,rt(p,{toArray:function(){tB(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new e_(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new em(this,!0)},toMap:function(){return tL(this.toKeyedSeq())},toObject:function(){tB(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return eh(this.toKeyedSeq())},toOrderedSet:function(){return eQ(v(this)?this.valueSeq():this)},toSet:function(){return eV(v(this)?this.valueSeq():this)},toSetSeq:function(){return new eb(this)},toSeq:function(){return m(this)?this.toIndexedSeq():v(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return e6(v(this)?this.valueSeq():this)},toList:function(){return t9(v(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=l.call(arguments,0);return eI(this,function(t,e){var r=v(t),n=[t].concat(e).map(function(t){return y(t)?r&&(t=h(t)):t=r?to(t):ta(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&v(i)||m(t)&&m(i))return i}var o=new Q(n);return r?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}(this,t))},includes:function(t){return this.some(function(e){return tp(e,t)})},entries:function(){return this.__iterator(2)},every:function(t,e){tB(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return eI(this,eC(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},findEntry:function(t,e){var r;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return tB(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){tB(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""}),e},keys:function(){return this.__iterator(0)},map:function(t,e){return eI(this,ex(this,t,e))},reduce:function(t,e,r){var n,i;return tB(this.size),arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return eI(this,ek(this,!0))},slice:function(t,e){return eI(this,eE(this,t,e,!0))},some:function(t,e){return!this.every(ro(t),e)},sort:function(t){return eI(this,eK(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return I(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){var r,n;return r=this,n=tL().asMutable(),r.__iterate(function(i,o){n.update(t.call(e,i,o,r),0,function(t){return t+1})}),n.asImmutable()},equals:function(t){return th(this,t)},entrySeq:function(){var t=this;if(t._cache)return new Q(t._cache);var e=t.toSeq().map(ri).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(ro(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(L)},flatMap:function(t,e){var r,n;return eI(this,(r=this,n=eR(r),r.toSeq().map(function(i,o){return n(t.call(e,i,o,r))}).flatten(!0)))},flatten:function(t){return eI(this,eO(this,t,!0))},fromEntrySeq:function(){return new eS(this)},get:function(t,e){return this.find(function(e,r){return tp(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=eP(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,E):E)===E)return e}return n},groupBy:function(t,e){var r,n,i,o;return r=this,n=v(r),i=(b(r)?eh():tL()).asMutable(),r.__iterate(function(o,a){i.update(t.call(e,o,a,r),function(t){return(t=t||[]).push(n?[a,o]:o),t})}),o=eR(r),i.map(function(t){return eI(r,o(t))})},has:function(t){return this.get(t,E)!==E},hasIn:function(t){return this.getIn(t,E)!==E},isSubset:function(t){return t="function"==typeof t.includes?t:p(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:p(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(rn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return eT(this,t)},maxBy:function(t,e){return eT(this,e,t)},min:function(t){return eT(this,t?ra(t):rc)},minBy:function(t,e){return eT(this,e?ra(e):rc,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return eI(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return eI(this,eD(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(ro(t),e)},sortBy:function(t,e){return eI(this,eK(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return eI(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){var r,n;return eI(this,(r=this,(n=eN(r)).__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return r.__iterate(function(r,i,u){return t.call(e,r,i,u)&&++a&&n(r,i,o)}),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=r.__iterator(2,i),u=!0;return new j(function(){if(!u)return q();var r=a.next();if(r.done)return r;var i=r.value,s=i[0],c=i[1];return t.call(e,c,s,o)?2===n?r:U(n,s,c,r):(u=!1,q())})},n))},takeUntil:function(t,e){return this.takeWhile(ro(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e,r,n=b(t),i=v(t),o=+!!n;return e=t.__iterate(i?n?function(t,e){o=31*o+rl(tx(t),tx(e))|0}:function(t,e){o=o+rl(tx(t),tx(e))|0}:n?function(t){o=31*o+tx(t)|0}:function(t){o=o+tx(t)|0}),r=tS(r=o,0xcc9e2d51),r=tS(r<<15|r>>>-15,0x1b873593),r=((r=tS(r<<13|r>>>-13,5))+0xe6546b64|0)^e,r=tS(r^r>>>16,0x85ebca6b),r=tw((r=tS(r^r>>>13,0xc2b2ae35))^r>>>16)}(this))}});var re=p.prototype;re[S]=!0,re[P]=re.values,re.__toJS=re.toArray,re.__toStringMapper=ru,re.inspect=re.toSource=function(){return this.toString()},re.chain=re.flatMap,re.contains=re.includes;try{Object.defineProperty(re,"length",{get:function(){if(!p.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}rt(h,{flip:function(){return eI(this,ew(this))},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return tp(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return tp(e,t)})},mapEntries:function(t,e){var r=this,n=0;return eI(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return eI(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var rr=h.prototype;function rn(t,e){return e}function ri(t,e){return[e,t]}function ro(t){return function(){return!t.apply(this,arguments)}}function ra(t){return function(){return-t.apply(this,arguments)}}function ru(t){return"string"==typeof t?JSON.stringify(t):t}function rs(){return A(arguments)}function rc(t,e){return te?-1:0}function rl(t,e){return t^e+0x9e3779b9+(t<<6)+(t>>2)|0}return rr[w]=!0,rr[P]=re.entries,rr.__toJS=re.toObject,rr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+ru(t)},rt(d,{toKeyedSeq:function(){return new em(this,!1)},filter:function(t,e){return eI(this,eC(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return eI(this,ek(this,!1))},slice:function(t,e){return eI(this,eE(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=N(t,t<0?this.count():this.size,0);var n=this.slice(0,t);return eI(this,1===r?n:n.concat(A(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return eI(this,eO(this,t,!1))},get:function(t,e){return(t=B(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return(t=B(this,t))>=0&&(void 0!==this.size?this.size===1/0||t0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):void 0:this[s[0]]=l?s[1].call(this,l,s[2]):void 0:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):n):this[s]=l||n;f+=2}},J=function(t,e){for(var r in e)if(typeof e[r]===a&&e[r].length>0){for(var i=0;i2&&(t[c]="iPad",t[f]=v),t},this.getEngine=function(){var t={};return t[l]=n,t[h]=n,G.call(t,m,b.engine),t},this.getOS=function(){var t={};return t[l]=n,t[h]=n,G.call(t,m,b.os),S&&!t[l]&&_&&_.platform&&"Unknown"!=_.platform&&(t[l]=_.platform.replace(/chrome os/i,z).replace(/macos/i,P)),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return m},this.setUA=function(t){return m=typeof t===u&&t.length>500?V(t,500):t,this},this.setUA(m),this};$.VERSION="0.7.40",$.BROWSER=q([l,h,s]),$.CPU=q([d]),$.DEVICE=q([c,p,f,g,y,m,v,_,b]),$.ENGINE=$.OS=q([l,h]),typeof e!==o?(t.exports&&(e=t.exports=$),e.UAParser=$):typeof define===i&&define.amd?define(function(){return $}):typeof r!==o&&(r.UAParser=$);var Z=typeof r!==o&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var Q=new $;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(t){Q.setUA(t);var e=Q.getResult();for(var r in e)Z.ua[r]=e[r]}}}("object"==typeof window?window:this)}}]); //# sourceMappingURL=bb25e7976f9c129b.js.map