react-session-ui 1.18.10 → 1.18.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -45,5 +45,5 @@ let r=n?.map(e=>({...e,stepId:qt()}));const i=new Set(["group","pre","post","scr
|
|
|
45
45
|
Copyright (c) 2017 Jed Watson.
|
|
46
46
|
Licensed under the MIT License (MIT), see
|
|
47
47
|
http://jedwatson.github.io/classnames
|
|
48
|
-
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function C(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function p(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,C,p,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,C=y,p=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,C)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:p,selectionAfter:p}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return C(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){_[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function V(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},_.color,{},_.bgcolor,{},_.fontSize,{},_.fontFamily,{CODE:_.CODE,SUPERSCRIPT:_.SUPERSCRIPT,SUBSCRIPT:_.SUBSCRIPT})}var _={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(_[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function N(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function z(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=z(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==z(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function D(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return V}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return N}),n.d(t,"removeAllInlineStyles",function(){return D}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return C}),n.d(t,"clearEditorContent",function(){return p}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function C(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var p=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,V=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);V&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==V&&"ordered-list-item"!==V&&(m="",i=-1),v?(S=s(V,C(t)),v=!1):S=c(V,i,C(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var _=t.firstChild;_;){var O=e(_,n,i,m,p(_)||g,y).chunk;S=u(S,O),_=_.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function C(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function p(e,t){if(!(this instanceof p))return new p(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},p.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},p.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(C(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(C(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},p.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var C,p=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){C=!0},y=function(){C=!1},w=function(){return C};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var D=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(o,r.Component);var e,t,n=z(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(_(e={},"rdw-option-active ".concat(o),a),_(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}D.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},D.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(D,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(D,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,C=t.translations,p=this.state.blockTypes.filter(function(e){return e.label===l}),m=p&&p[0]&&p[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||C["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||C["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ce=he;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||Ce,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,C=e.translations,p=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),p=p||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||C["components.controls.fontsize.fontsize"]},p?i.a.createElement("span",null,p):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:p===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return(Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ne=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(o,r.Component);var e,t,n=_e(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ze(e){return(ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t){return(De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ne.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(o,r.Component);var e,t,n=Ie(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,C=t.doExpand,p=this.props.currentState.fontFamily;return p=p||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:C,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:p===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(D,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(D,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(D,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(D,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,C=n.dropdownClassName,p=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(C),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:p||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(D,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(D,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(D,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(D,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,C=t.right,p=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:C.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var i=pt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=Ct(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(D,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(D,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Vt=St,_t=n(7),Ot=n.n(_t);function Nt(e){return(Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=It(e);if(t){var i=It(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(o,r.Component);var e,t,n=Dt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(D,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(D,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,C=l.className,p=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",C),optionWrapperClassName:d()(p),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),C=l.EditorState.push(o,h,"insert-characters");d=C.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),C=l.EditorState.acceptSelection(C,d),h=l.Modifier.insertText(C.getCurrentContent(),d," ",C.getCurrentInlineStyle(),void 0),a(l.EditorState.push(C,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pn(e,t){return(pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&Cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=_n(e);if(t){var i=_n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=Vn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,C=u.uploadEnabled,p=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},C&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),p&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var Nn=On;function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dn(e,t){return(Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dn(e,t)}(o,r.Component);var e,t,n=In(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Nn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(D,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,C=t.redo,p=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",p),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",C.className),title:C.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(D,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(D,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:Ne,fontFamily:We,list:it,textAlign:mt,colorPicker:Vt,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=pr(e);if(t){var i=pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=Cr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var C=e.getSelection().merge({anchorOffset:f,focusOffset:u}),p=l.EditorState.acceptSelection(e,C),m=l.Modifier.replaceText(p.getCurrentContent(),C,"".concat(r).concat(o),p.getCurrentInlineStyle(),c);p=l.EditorState.push(p,m,"insert-characters"),h||(C=p.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),p=l.EditorState.acceptSelection(p,C),m=l.Modifier.insertText(p.getCurrentContent(),C," ",p.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(p,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,C=t.getWrapperRef,p=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:C,caseSensitive:p,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function Vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function _r(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=Vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),Nr=function(e){return new Or(e).getHashtagDecorator()};_r.propTypes={block:a.a.object,contentState:a.a.object};var zr=_r;function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ir(e,t){return(Ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ir(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(D,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(D,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(D,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,C=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:C,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Dr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:zr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(Nr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new p,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,C=o.toolbarOnFocus,p=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!C;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",p),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&C).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,eB(),sz())),rB.exports);const oB=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},aB=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:C,analyticsClasses:p=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),V=a(null),_=a(null),O=new nB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:oB}]),N=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:nB.convertToRaw(nB.ContentState.createFromText(e))}catch(t){return nB.convertToRaw(nB.ContentState.createFromText(e))}};l(()=>{let e;try{if(Q(t))e="view"===h||g&&!L?nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O):nB.EditorState.createEmpty(O);else{const n=N(t);e=n?nB.EditorState.createWithContent(nB.convertFromRaw(n),O):nB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=nB.EditorState.createWithContent(nB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=nB.ContentState.createFromText("---");e=nB.EditorState.createWithContent(t,O)}else e=nB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!V.current)return;const e=e=>{const t=e.target.closest("a");if(t&&V.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=V.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);K(V,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=N(H),t=e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O);b(t)}},[_]);const z=iB.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(P,{className:"required-asterisk",children:"* "}),d&&e(P,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:_,className:"ff-textEditor-buttons",children:[e(G,{title:"Update",placement:"bottom",children:e(B,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=nB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(nB.convertToRaw(nB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(G,{title:"Cancel",placement:"bottom",children:e(B,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=N(H),t=e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:V,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=N(t),n="---"===e?.blocks[0]?.text?nB.EditorState.createEmpty(O):e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createEmpty(O);b(n)}},children:w&&e(z,{editorState:w,onEditorStateChange:e=>{b(e);const t=nB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(p?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=nB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||C&&m?e(P,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:C}):null]})},lB=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(B,{name:t,width:r,height:i}),e(P,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),sB=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:C="",style:p={}}=t;return n("section",{className:`ff-card ${C}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...p},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},cB=e=>xt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),dB=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},uB=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!Q(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return Q(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function fB(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function hB(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const CB=e=>new Promise(t=>setTimeout(t,e)),pB=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},mB=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Ia.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Ia.error(r)}catch(e){Ia.error(n),console.error("Permission query error:",e)}},gB=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,C]=c(0),[p,m]=c(null);l(()=>{if(p&&u.current[p]){const e=u.current[p],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;C(r)}},[p]);const g=h(()=>p?[{id:p,label:p,icon:o?.[p]}]:[],[p,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(F,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(p===t?"active":""),children:t})},t))}),p&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Us,{tabsData:g,activeTabId:p,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[p]??e(B,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(P,{children:r?.[p]})})]})]})};gB.displayName="DebugToolsPanel";const vB=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[C,p]=c(null),m=()=>{h(null),p(null)};return e("div",{ref:u,className:`ff-body-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(G,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-body-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&p(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&p(C===t?null:t))})(l,a),id:a,children:[e(B,{className:"ff-body-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&C===a&&e("div",{className:"ff-body-container__modal"})]})},a)})})});vB.displayName="SessionManager";const yB=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(G,{title:`${fC(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(B,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(P,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},wB=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(P,{children:t.label}),o&&s&&e(B,{name:s})]},t.value)})});var bB=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let C=null;void 0!==e.token&&null!==e.token&&(C=e.token);let p=null;void 0!==e.apisecret&&null!==e.apisecret&&(p=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),C&&(n=n+"&token="+encodeURIComponent(C)),p&&(n=n+"&apisecret="+encodeURIComponent(p)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};C&&(e.token=C),p&&(e.apisecret=p),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),C&&(u.token=C),p&&(u.apisecret=p),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),p&&(d.apisecret=p),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function V(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),p&&(a.apisecret=p),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function _(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(_(e,a,n.protocol,!1,o,n.protocol),void n.success())}function N(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function z(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),p&&(l.apisecret=p),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?V(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&V(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function D(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function I(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),_(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),_(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){if("firefox"!==t.webRTCAdapter.browserDetails.browser){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else if(t.log("Enabling Simulcasting for Firefox (RID)"),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream]}),d=s?s.sender:null,d){let e=d.getParameters();e||(e={});let t=v(n.simulcastMaxBitrates);e.encodings=n.sendEncodings||[{rid:"h",active:!0,maxBitrate:t.high},{rid:"m",active:!0,maxBitrate:t.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:t.low,scaleResolutionDownBy:4}],d.setParameters(e)}}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),p&&(i.apisecret=p),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};C&&(o.token=C);p&&(o.apisecret=p);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())z(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};C&&(u.token=C);p&&(u.apisecret=p);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:C,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);p&&(d.apisecret=p);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){N(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){D(r,!0,e)},createAnswer:function(e){D(r,!1,e)},handleRemoteJsep:function(e){I(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){z(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){N(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){D(r,!0,e)},createAnswer:function(e){D(r,!1,e)},handleRemoteJsep:function(e){I(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){z(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let EB=!0,MB=!0;function AB(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function xB(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function LB(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(EB=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function kB(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(MB=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function HB(){if("object"==typeof window){if(EB)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function SB(e,t){MB&&console.warn(e+" is deprecated, please use "+t+" instead.")}function VB(e){return"[object Object]"===Object.prototype.toString.call(e)}function _B(e){return VB(e)?Object.keys(e).reduce(function(t,n){const r=VB(e[n]),i=r?_B(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function OB(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?OB(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{OB(e,e.get(t),n)})}))}function NB(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&OB(e,n,i)})}),i}const zB=HB;function TB(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),zB("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return zB("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function DB(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function IB(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else xB(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function ZB(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function jB(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>NB(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),xB(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>NB(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function RB(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function BB(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return RB(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function PB(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function FB(e,t){xB(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var UB=Object.freeze({__proto__:null,fixNegotiationNeeded:FB,shimAddTrackRemoveTrack:BB,shimAddTrackRemoveTrackWithNative:RB,shimGetSendersWithDtmf:ZB,shimGetUserMedia:TB,shimMediaStream:DB,shimOnTrack:IB,shimPeerConnection:PB,shimSenderReceiverGetStats:jB});function qB(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){SB("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function WB(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function QB(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function GB(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function KB(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),xB(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function YB(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){SB("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function XB(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function JB(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function $B(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function eP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function tP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var nP=Object.freeze({__proto__:null,shimAddTransceiver:JB,shimCreateAnswer:tP,shimCreateOffer:eP,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:$B,shimGetUserMedia:qB,shimOnTrack:WB,shimPeerConnection:QB,shimRTCDataChannel:XB,shimReceiverGetStats:KB,shimRemoveStream:YB,shimSenderGetStats:GB});function rP(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function iP(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function oP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function aP(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(lP(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function lP(e){return e&&void 0!==e.video?Object.assign({},e,{video:_B(e.video)}):e}function sP(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(SB("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function cP(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function dP(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function uP(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var fP,hP=Object.freeze({__proto__:null,shimAudioContext:uP,shimCallbacksAPI:oP,shimConstraints:lP,shimCreateOfferLegacy:dP,shimGetUserMedia:aP,shimLocalStreamsAPI:rP,shimRTCIceServerUrls:sP,shimRemoteStreamsAPI:iP,shimTrackEventTransceiver:cP}),CP={exports:{}};var pP=(fP||(fP=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(CP)),CP.exports),mP=H(pP),gP=L({__proto__:null,default:mP},[pP]);function vP(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=mP.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,xB(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function yP(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||xB(e,"icecandidate",e=>{if(e.candidate){const t=mP.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function wP(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=mP.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=mP.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=mP.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function bP(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},xB(e,"datachannel",e=>(t(e.channel,e.target),e))}function EP(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function MP(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function AP(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function xP(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var LP=Object.freeze({__proto__:null,removeExtmapAllowMixed:MP,shimAddIceCandidateNullOrEmpty:AP,shimConnectionState:EP,shimMaxMessageSize:wP,shimParameterlessSetLocalDescription:xP,shimRTCIceCandidate:vP,shimRTCIceCandidateRelayProtocol:yP,shimSendThrowTypeError:bP});const kP=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=HB,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(AB(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(AB(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(AB(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=AB(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:LP,extractVersion:AB,disableLog:LB,disableWarnings:kB,sdp:gP};switch(r.browser){case"chrome":if(!UB||!PB||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=UB,AP(e,r),xP(e),TB(e,r),DB(e),PB(e,r),IB(e),BB(e,r),ZB(e),jB(e),FB(e,r),vP(e),yP(e),EP(e),wP(e,r),bP(e),MP(e,r);break;case"firefox":if(!nP||!QB||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=nP,AP(e,r),xP(e),qB(e,r),QB(e,r),WB(e),YB(e),GB(e),KB(e),XB(e),JB(e),$B(e),eP(e),tP(e),vP(e),EP(e),wP(e,r),bP(e);break;case"safari":if(!hP||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=hP,AP(e,r),xP(e),sP(e),dP(e),oP(e),rP(e),iP(e),cP(e),aP(e),uP(e),vP(e),yP(e),wP(e,r),bP(e),MP(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),HP=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(P,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},SP=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},VP=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n};export{Ze as AADHAAR_REGEX,ve as ALPHABET_ONLY_REGEX,Rt as ALPHABET_WITH_SPACES_ONLY_REGEX,ft as ALPHANUMERIC_PARENTHESIS_REGEX,we as ALPHANUMERIC_REGEX,Zt as ALPHANUMERIC_WITH_DOT_REGEX,be as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,It as ALPHA_NUM_EXTENDED_REGEX,_t as ALPHA_NUM_REGEX,J as Accordion,pE as AddContentButton,Ha as AddResourceButton,cE as AiToggle,Rf as AllProjectsDropdown,dE as AnimatedSetting,Qf as AppHeader,av as AttachMedia,aC as AttachmentButton,sC as Avatar,Ke as BASE64_REGEX,Oe as BIG_END_WHITESPACE,Ye as BINARY_NUMBER_REGEX,Et as BODY_TAG_TYPE_VALIDATION,oA as BarChart,sB as Box,qs as BrowserTabs,F as Button,Ct as CAMEL_CASE_REGEX,wt as CERTIFICATES_NAME_REGEX,xt as CHECK_CAMEL_CASE,Le as CREDIT_CARD_REGEX,$e as CURRENCY_GENERIC_REGEX,aE as ChatModal,lE as ChatModalAi,ee as Checkbox,tn as Chip,hE as ChipWithCount,$b as ChooseFile,$t as Col,OL as Comments,ZL as ConditionalDropdown,LL as ConnectingBranch,Xt as Container,dC as ContentCard,Yb as CreateVariableSlider,Ee as DATE_REGEX,qe as DECIMAL_NUMBER_REGEX,Fe as DRIVING_LICENSE_REGEX,gt as DYNAMIC_VALUE_PATTERN_REGEX,vt as DYNAMIC_VALUE_TYPE_REGEX,yt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,mt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,eh as DashboardDonutChart,Of as DatePicker,gB as DebugToolsPanel,Oa as DonutChart,Wb as DownloadClient,Zf as DragAndDrop,Y as Drawer,Pa as Dropzone,ct as ELEMENTS_TRAILING_SPACE_REGEX,dt as ELEMENTS_WHITE_SPACE_REGEX,Ut as EMAIL_FORMAT_REGEX,ce as EMAIL_REGEX,Tt as EMAIL_VALIDATION_REGEX,jt as EXCEL_SPACING_REGEX,Is as EditLabel,hC as EditTextField,yL as Editor,CE as ErrorBoundary,nv as Excel,an as ExpandableMenu,Bt as FILENAME_VALIDATION_REGEX,Ae as FILE_EXTENSION_REGEX,st as FILE_NAME_REGEX,Qb as FieldSet,Ua as FileDropzone,Fa as FilePreview,Ss as Form,DL as FormatString,De as GSTIN_REGEX,Xe as HEXADECIMAL_NUMBER_REGEX,pe as HEX_COLOR_REGEX,Ge as HSL_COLOR_REGEX,We as HTML_ATTRIBUTE_REGEX,bt as HTML_FILE_TYPE_VALIDATION,Se as HTML_TAG_REGEX,X as HighlightText,sE as HistoryCard,Re as INDIAN_CURRENCY_REGEX,Pe as INDIAN_PASSPORT_REGEX,ze as INDIAN_PHONE_REGEX,Te as INDIAN_PIN_CODE_REGEX,Be as INTERNATIONAL_PHONE_REGEX,he as IPV4_REGEX,Ce as IPV6_REGEX,B as Icon,zf as IconButton,ov as IconRadialChart,Jh as IconRadioGroup,nn as Input,Vs as InputWithDropdown,At as JAVASCRIPT_FILE_TYPE_VALIDATION,bB as Janus,et as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,uC as LabelEditTextField,tr as LazyLoad,qb as LineChart,cC as LineLoader,fE as Link,xe as MAC_ADDRESS_REGEX,ot as MEMORY_VALIDATION_REGEX,$h as MachineInputField,nE as MediaPreview,wE as MediaViewerModel,fr as MenuOption,oE as MessageBox,_s as MiniModal,rE as MobileSkin,Tf as Modal,rv as ModuleChip,lA as MultiRadialChart,Kt as MultiSelect,Xh as NLPInput,lt as NLP_DESCRIPTION_REGEX,Pt as NO_LEADING_TRAILING_SPACE_REGEX,ye as NUMBERS_ONLY_REGEX,nt as NUMBER_REGEX,lB as NoDataContent,vE as OsTree,yE as OtpVerification,Os as OverviewModal,Ie as PAN_CARD_REGEX,ut as PARAMETER_ALPHANUMERIC_REGEX,ge as PASSWORD_COMPLEX_REGEX,me as PASSWORD_SIMPLE_REGEX,ue as PHONE_REGEX,fe as POSTAL_CODE_REGEX,Gf as Paper,F_ as PhoneInputField,Pf as PieChart,zL as PopUpModal,sO as PrePostTable,Jb as ProgressBar,iE as Prompt,uE as PromptContainer,Qe as RGB_COLOR_REGEX,Je as ROMAN_NUMERALS_REGEX,on as RadialChart,ja as RadioButton,Ra as RadioGroup,Wh as Recaptcha,Jt as Row,it as SCRIPT_REGEX,Ft as SERVER_HOST_REGEX,ke as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,at as STEP_GROUP_NAME_REGEX,HP as ScriptGenerationLoader,eE as ScriptSwitchButton,Ws as Search,ar as Select,wB as SelectionSwitcher,oC as SequentialConnectingBranch,bE as SessionDropdown,vB as SessionManager,Nf as StateDropdown,yB as StatusBadge,cr as StatusButton,lv as StatusCard,gE as StatusIndicator,MO as StepLandingTable,bO as StepResultStats,tE as SwitchButton,Me as TIME_REGEX,tt as TWITTER_HANDLE_REGEX,La as Table,Fs as TableTree,OE as TableTreeFn,Xb as TableWithAccordion,Us as Tabs,mE as TabsWithSilder,sr as TextArea,aB as TextEditor,W as ThemeProvider,Yt as Toaster,Da as Toastify,en as Toggle,lC as ToggleSwitch,G as Tooltip,sn as TruncatedTooltip,P as Typography,rt as UNIT_REGEX,de as URL_REGEX,Ne as USERNAME_REGEX,Ue as USERNAME_SPECIAL_REGEX,_e as US_ZIP_CODE_REGEX,He as UUID_REGEX,je as VEHICLE_REGISTRATION_REGEX,Ub as VariableDropdown,jf as VariableInput,Kb as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,Mt as XML_FILE_TYPE_VALIDATION,kP as adapter,eO as addPrePostStepGroup,tO as addStepGroup,dB as autoScrollToTableLastRow,fC as capitalize,Q as checkEmpty,mB as checkMicrophoneAccess,Wf as clearStore,TE as compareArrays,zE as compareObjects,W_ as convertFormDataToObject,rA as convertToBytes,iA as convertToGB,nO as convertToISO,VP as copyToClipboard,xa as debounce,qf as deleteStoreValue,qt as ffid,NE as findAndInsert,$_ as formatDate,q_ as formatResponseDate,nA as getEncryptedData,Na as getExtension,za as getExtensionWithPeriod,pB as getNavigateToKey,wL as getSequentialPayload,Uf as getStoreValue,hB as getTopVisibleNodeKey,Q_ as getTreeDetails,rO as handleTimeZoneChange,uB as handleTreeExpandAllCollapseAll,J_ as handleTreeNodeExpandCollapse,Y_ as handleTreeNodeSect,X_ as handleUnCheckAllTreeNodesWithUpdates,jL as hasDuplicateFile,tC as isEmptyObject,ie as isTextTruncated,CB as nlpInputDelay,U_ as rearrangeDragItem,kL as saveFileFromBlob,lO as scrollToView,Ff as setStoreValue,$g as throttle,cB as toCamelCase,Ia as toast,fB as toggleShowHideEntity,re as truncateText,G_ as updateTreeState,K_ as useBeforeUnload,K as useClickOutside,SP as useDeviceType,Za as useFileDropzone,se as useKeyboardActions,qa as useTheme,NL as useTriggerControl};
|
|
48
|
+
*/!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"==o||"number"==o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"==o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function C(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function p(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,C,p,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,C=y,p=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,C)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:p,selectionAfter:p}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return C(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){_[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function V(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},_.color,{},_.bgcolor,{},_.fontSize,{},_.fontFamily,{CODE:_.CODE,SUPERSCRIPT:_.SUPERSCRIPT,SUBSCRIPT:_.SUBSCRIPT})}var _={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(_[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function N(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function z(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=z(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==z(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function D(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return V}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return N}),n.d(t,"removeAllInlineStyles",function(){return D}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return C}),n.d(t,"clearEditorContent",function(){return p}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.Map({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function C(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var p=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp(" ","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,V=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);V&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==V&&"ordered-list-item"!==V&&(m="",i=-1),v?(S=s(V,C(t)),v=!1):S=c(V,i,C(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var _=t.firstChild;_;){var O=e(_,n,i,m,p(_)||g,y).chunk;S=u(S,O),_=_.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function C(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function p(e,t){if(!(this instanceof p))return new p(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},p.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},p.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(C(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(C(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},p.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var C,p=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){C=!0},y=function(){C=!1},w=function(){return C};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function V(e){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t){return(N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var D=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(o,r.Component);var e,t,n=z(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(_(e={},"rdw-option-active ".concat(o),a),_(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}D.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},D.defaultProps={activeClassName:""},n(12);var P=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(D,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(D,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,C=t.translations,p=this.state.blockTypes.filter(function(e){return e.label===l}),m=p&&p[0]&&p[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||C["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||C["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ce=he;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||Ce,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,C=e.translations,p=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),p=p||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||C["components.controls.fontsize.fontsize"]},p?i.a.createElement("span",null,p):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:p===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return(Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Ne=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(o,r.Component);var e,t,n=_e(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ze(e){return(ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t){return(De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ne.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(o,r.Component);var e,t,n=Ie(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,C=t.doExpand,p=this.props.currentState.fontFamily;return p=p||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:C,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},p||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:p===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(D,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(D,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(D,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(D,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,C=n.dropdownClassName,p=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(C),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:p||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&<(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(D,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(D,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(D,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(D,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,C=t.right,p=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:C.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var i=pt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(o,r.Component);var e,t,n=Ct(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(D,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(D,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Vt=St,_t=n(7),Ot=n.n(_t);function Nt(e){return(Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=It(e);if(t){var i=It(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function It(e){return(It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tt(e,t)}(o,r.Component);var e,t,n=Dt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(D,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(D,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,C=l.className,p=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",C),optionWrapperClassName:d()(p),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&zt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),C=l.EditorState.push(o,h,"insert-characters");d=C.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),C=l.EditorState.acceptSelection(C,d),h=l.Modifier.insertText(C.getCurrentContent(),d," ",C.getCurrentInlineStyle(),void 0),a(l.EditorState.push(C,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pn(e,t){return(pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&Cn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=_n(e);if(t){var i=_n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sn(e,t)}(o,r.Component);var e,t,n=Vn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,C=u.uploadEnabled,p=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},C&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),p&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(D,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var Nn=On;function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dn(e,t){return(Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function In(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dn(e,t)}(o,r.Component);var e,t,n=In(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Nn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(D,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,C=t.redo,p=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",p),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",C.className),title:C.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(D,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(D,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:Ne,fontFamily:We,list:it,textAlign:mt,colorPicker:Vt,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=pr(e);if(t){var i=pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}(a,r.Component);var e,t,o=Cr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var C=e.getSelection().merge({anchorOffset:f,focusOffset:u}),p=l.EditorState.acceptSelection(e,C),m=l.Modifier.replaceText(p.getCurrentContent(),C,"".concat(r).concat(o),p.getCurrentInlineStyle(),c);p=l.EditorState.push(p,m,"insert-characters"),h||(C=p.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),p=l.EditorState.acceptSelection(p,C),m=l.Modifier.insertText(p.getCurrentContent(),C," ",p.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(p,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,C=t.getWrapperRef,p=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:C,caseSensitive:p,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function Vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function _r(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=Vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),Nr=function(e){return new Or(e).getHashtagDecorator()};_r.propTypes={block:a.a.object,contentState:a.a.object};var zr=_r;function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ir(e,t){return(Ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ir(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(D,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(D,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(D,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,C=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:C,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Dr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:zr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(Nr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new p,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,C=o.toolbarOnFocus,p=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!C;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",p),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&C).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,eB(),sz())),rB.exports);const oB=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},aB=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:C,analyticsClasses:p=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),V=a(null),_=a(null),O=new nB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:oB}]),N=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:nB.convertToRaw(nB.ContentState.createFromText(e))}catch(t){return nB.convertToRaw(nB.ContentState.createFromText(e))}};l(()=>{let e;try{if(Q(t))e="view"===h||g&&!L?nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O):nB.EditorState.createEmpty(O);else{const n=N(t);e=n?nB.EditorState.createWithContent(nB.convertFromRaw(n),O):nB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=nB.EditorState.createWithContent(nB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=nB.ContentState.createFromText("---");e=nB.EditorState.createWithContent(t,O)}else e=nB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!V.current)return;const e=e=>{const t=e.target.closest("a");if(t&&V.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=V.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);K(V,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=N(H),t=e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O);b(t)}},[_]);const z=iB.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(P,{className:"required-asterisk",children:"* "}),d&&e(P,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:_,className:"ff-textEditor-buttons",children:[e(G,{title:"Update",placement:"bottom",children:e(B,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=nB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(nB.convertToRaw(nB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(G,{title:"Cancel",placement:"bottom",children:e(B,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=N(H),t=e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createWithContent(nB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:V,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=N(t),n="---"===e?.blocks[0]?.text?nB.EditorState.createEmpty(O):e?nB.EditorState.createWithContent(nB.convertFromRaw(e),O):nB.EditorState.createEmpty(O);b(n)}},children:w&&e(z,{editorState:w,onEditorStateChange:e=>{b(e);const t=nB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(p?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=nB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||C&&m?e(P,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:C}):null]})},lB=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(B,{name:t,width:r,height:i}),e(P,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),sB=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:C="",style:p={}}=t;return n("section",{className:`ff-card ${C}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...p},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},cB=e=>xt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),dB=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},uB=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!Q(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return Q(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function fB(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function hB(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const CB=e=>new Promise(t=>setTimeout(t,e)),pB=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},mB=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Ia.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Ia.error(r)}catch(e){Ia.error(n),console.error("Permission query error:",e)}},gB=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,C]=c(0),[p,m]=c(null);l(()=>{if(p&&u.current[p]){const e=u.current[p],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;C(r)}},[p]);const g=h(()=>p?[{id:p,label:p,icon:o?.[p]}]:[],[p,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(F,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(p===t?"active":""),children:t})},t))}),p&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(Us,{tabsData:g,activeTabId:p,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[p]??e(B,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(P,{children:r?.[p]})})]})]})};gB.displayName="DebugToolsPanel";const vB=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d="",variant:u="default",backgroundColor:f="#71347B"},h)=>{const[C,p]=c(null),[m,g]=c(null),v=()=>{p(null),g(null)};return e("div",{ref:h,className:`ff-body-container ${"vertical-free"===u?"vertical-free":t?"vertical":"horizontal"} ${l}`,style:"vertical-free"===u?{backgroundColor:f}:void 0,children:a.map((a,l)=>{const c=s.includes(a);return e(G,{title:o?.[a]||"",placement:"vertical-free"===u||t?"right":"bottom",children:n("div",{className:"ff-body-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(p(e),r.includes(t)&&g(t))})(l,a),onMouseLeave:v,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&g(m===t?null:t))})(l,a),id:a,children:[e(B,{className:"ff-body-container__icon",name:a,width:24,height:24,color:C===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&m===a&&e("div",{className:"ff-body-container__modal"})]})},a)})})});vB.displayName="SessionManager";const yB=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(G,{title:`${fC(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(B,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(P,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},wB=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(P,{children:t.label}),o&&s&&e(B,{name:s})]},t.value)})});var bB=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let C=null;void 0!==e.token&&null!==e.token&&(C=e.token);let p=null;void 0!==e.apisecret&&null!==e.apisecret&&(p=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),C&&(n=n+"&token="+encodeURIComponent(C)),p&&(n=n+"&apisecret="+encodeURIComponent(p)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};C&&(e.token=C),p&&(e.apisecret=p),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),C&&(u.token=C),p&&(u.apisecret=p),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),p&&(d.apisecret=p),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function V(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),p&&(a.apisecret=p),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function _(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(_(e,a,n.protocol,!1,o,n.protocol),void n.success())}function N(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function z(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),p&&(l.apisecret=p),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?V(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&V(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function D(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function I(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),_(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),_(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){if("firefox"!==t.webRTCAdapter.browserDetails.browser){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else if(t.log("Enabling Simulcasting for Firefox (RID)"),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream]}),d=s?s.sender:null,d){let e=d.getParameters();e||(e={});let t=v(n.simulcastMaxBitrates);e.encodings=n.sendEncodings||[{rid:"h",active:!0,maxBitrate:t.high},{rid:"m",active:!0,maxBitrate:t.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:t.low,scaleResolutionDownBy:4}],d.setParameters(e)}}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),p&&(i.apisecret=p),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};C&&(o.token=C);p&&(o.apisecret=p);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())z(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};C&&(u.token=C);p&&(u.apisecret=p);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:C,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);p&&(d.apisecret=p);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){N(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){D(r,!0,e)},createAnswer:function(e){D(r,!1,e)},handleRemoteJsep:function(e){I(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){z(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){N(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){D(r,!0,e)},createAnswer:function(e){D(r,!1,e)},handleRemoteJsep:function(e){I(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){z(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let EB=!0,MB=!0;function AB(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function xB(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function LB(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(EB=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function kB(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(MB=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function HB(){if("object"==typeof window){if(EB)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function SB(e,t){MB&&console.warn(e+" is deprecated, please use "+t+" instead.")}function VB(e){return"[object Object]"===Object.prototype.toString.call(e)}function _B(e){return VB(e)?Object.keys(e).reduce(function(t,n){const r=VB(e[n]),i=r?_B(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function OB(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?OB(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{OB(e,e.get(t),n)})}))}function NB(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&OB(e,n,i)})}),i}const zB=HB;function TB(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),zB("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return zB("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function DB(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function IB(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else xB(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function ZB(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function jB(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>NB(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),xB(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>NB(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function RB(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function BB(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return RB(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function PB(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function FB(e,t){xB(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var UB=Object.freeze({__proto__:null,fixNegotiationNeeded:FB,shimAddTrackRemoveTrack:BB,shimAddTrackRemoveTrackWithNative:RB,shimGetSendersWithDtmf:ZB,shimGetUserMedia:TB,shimMediaStream:DB,shimOnTrack:IB,shimPeerConnection:PB,shimSenderReceiverGetStats:jB});function qB(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){SB("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function WB(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function QB(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function GB(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function KB(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),xB(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function YB(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){SB("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function XB(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function JB(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function $B(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function eP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function tP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var nP=Object.freeze({__proto__:null,shimAddTransceiver:JB,shimCreateAnswer:tP,shimCreateOffer:eP,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:$B,shimGetUserMedia:qB,shimOnTrack:WB,shimPeerConnection:QB,shimRTCDataChannel:XB,shimReceiverGetStats:KB,shimRemoveStream:YB,shimSenderGetStats:GB});function rP(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function iP(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function oP(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function aP(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(lP(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function lP(e){return e&&void 0!==e.video?Object.assign({},e,{video:_B(e.video)}):e}function sP(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(SB("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function cP(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function dP(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function uP(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var fP,hP=Object.freeze({__proto__:null,shimAudioContext:uP,shimCallbacksAPI:oP,shimConstraints:lP,shimCreateOfferLegacy:dP,shimGetUserMedia:aP,shimLocalStreamsAPI:rP,shimRTCIceServerUrls:sP,shimRemoteStreamsAPI:iP,shimTrackEventTransceiver:cP}),CP={exports:{}};var pP=(fP||(fP=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(CP)),CP.exports),mP=H(pP),gP=L({__proto__:null,default:mP},[pP]);function vP(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=mP.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,xB(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function yP(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||xB(e,"icecandidate",e=>{if(e.candidate){const t=mP.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function wP(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=mP.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=mP.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=mP.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function bP(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},xB(e,"datachannel",e=>(t(e.channel,e.target),e))}function EP(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function MP(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function AP(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function xP(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var LP=Object.freeze({__proto__:null,removeExtmapAllowMixed:MP,shimAddIceCandidateNullOrEmpty:AP,shimConnectionState:EP,shimMaxMessageSize:wP,shimParameterlessSetLocalDescription:xP,shimRTCIceCandidate:vP,shimRTCIceCandidateRelayProtocol:yP,shimSendThrowTypeError:bP});const kP=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=HB,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(AB(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(AB(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(AB(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=AB(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:LP,extractVersion:AB,disableLog:LB,disableWarnings:kB,sdp:gP};switch(r.browser){case"chrome":if(!UB||!PB||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=UB,AP(e,r),xP(e),TB(e,r),DB(e),PB(e,r),IB(e),BB(e,r),ZB(e),jB(e),FB(e,r),vP(e),yP(e),EP(e),wP(e,r),bP(e),MP(e,r);break;case"firefox":if(!nP||!QB||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=nP,AP(e,r),xP(e),qB(e,r),QB(e,r),WB(e),YB(e),GB(e),KB(e),XB(e),JB(e),$B(e),eP(e),tP(e),vP(e),EP(e),wP(e,r),bP(e);break;case"safari":if(!hP||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=hP,AP(e,r),xP(e),sP(e),dP(e),oP(e),rP(e),iP(e),cP(e),aP(e),uP(e),vP(e),yP(e),wP(e,r),bP(e),MP(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),HP=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(P,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},SP=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},VP=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n};export{Ze as AADHAAR_REGEX,ve as ALPHABET_ONLY_REGEX,Rt as ALPHABET_WITH_SPACES_ONLY_REGEX,ft as ALPHANUMERIC_PARENTHESIS_REGEX,we as ALPHANUMERIC_REGEX,Zt as ALPHANUMERIC_WITH_DOT_REGEX,be as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,It as ALPHA_NUM_EXTENDED_REGEX,_t as ALPHA_NUM_REGEX,J as Accordion,pE as AddContentButton,Ha as AddResourceButton,cE as AiToggle,Rf as AllProjectsDropdown,dE as AnimatedSetting,Qf as AppHeader,av as AttachMedia,aC as AttachmentButton,sC as Avatar,Ke as BASE64_REGEX,Oe as BIG_END_WHITESPACE,Ye as BINARY_NUMBER_REGEX,Et as BODY_TAG_TYPE_VALIDATION,oA as BarChart,sB as Box,qs as BrowserTabs,F as Button,Ct as CAMEL_CASE_REGEX,wt as CERTIFICATES_NAME_REGEX,xt as CHECK_CAMEL_CASE,Le as CREDIT_CARD_REGEX,$e as CURRENCY_GENERIC_REGEX,aE as ChatModal,lE as ChatModalAi,ee as Checkbox,tn as Chip,hE as ChipWithCount,$b as ChooseFile,$t as Col,OL as Comments,ZL as ConditionalDropdown,LL as ConnectingBranch,Xt as Container,dC as ContentCard,Yb as CreateVariableSlider,Ee as DATE_REGEX,qe as DECIMAL_NUMBER_REGEX,Fe as DRIVING_LICENSE_REGEX,gt as DYNAMIC_VALUE_PATTERN_REGEX,vt as DYNAMIC_VALUE_TYPE_REGEX,yt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,mt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,eh as DashboardDonutChart,Of as DatePicker,gB as DebugToolsPanel,Oa as DonutChart,Wb as DownloadClient,Zf as DragAndDrop,Y as Drawer,Pa as Dropzone,ct as ELEMENTS_TRAILING_SPACE_REGEX,dt as ELEMENTS_WHITE_SPACE_REGEX,Ut as EMAIL_FORMAT_REGEX,ce as EMAIL_REGEX,Tt as EMAIL_VALIDATION_REGEX,jt as EXCEL_SPACING_REGEX,Is as EditLabel,hC as EditTextField,yL as Editor,CE as ErrorBoundary,nv as Excel,an as ExpandableMenu,Bt as FILENAME_VALIDATION_REGEX,Ae as FILE_EXTENSION_REGEX,st as FILE_NAME_REGEX,Qb as FieldSet,Ua as FileDropzone,Fa as FilePreview,Ss as Form,DL as FormatString,De as GSTIN_REGEX,Xe as HEXADECIMAL_NUMBER_REGEX,pe as HEX_COLOR_REGEX,Ge as HSL_COLOR_REGEX,We as HTML_ATTRIBUTE_REGEX,bt as HTML_FILE_TYPE_VALIDATION,Se as HTML_TAG_REGEX,X as HighlightText,sE as HistoryCard,Re as INDIAN_CURRENCY_REGEX,Pe as INDIAN_PASSPORT_REGEX,ze as INDIAN_PHONE_REGEX,Te as INDIAN_PIN_CODE_REGEX,Be as INTERNATIONAL_PHONE_REGEX,he as IPV4_REGEX,Ce as IPV6_REGEX,B as Icon,zf as IconButton,ov as IconRadialChart,Jh as IconRadioGroup,nn as Input,Vs as InputWithDropdown,At as JAVASCRIPT_FILE_TYPE_VALIDATION,bB as Janus,et as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,uC as LabelEditTextField,tr as LazyLoad,qb as LineChart,cC as LineLoader,fE as Link,xe as MAC_ADDRESS_REGEX,ot as MEMORY_VALIDATION_REGEX,$h as MachineInputField,nE as MediaPreview,wE as MediaViewerModel,fr as MenuOption,oE as MessageBox,_s as MiniModal,rE as MobileSkin,Tf as Modal,rv as ModuleChip,lA as MultiRadialChart,Kt as MultiSelect,Xh as NLPInput,lt as NLP_DESCRIPTION_REGEX,Pt as NO_LEADING_TRAILING_SPACE_REGEX,ye as NUMBERS_ONLY_REGEX,nt as NUMBER_REGEX,lB as NoDataContent,vE as OsTree,yE as OtpVerification,Os as OverviewModal,Ie as PAN_CARD_REGEX,ut as PARAMETER_ALPHANUMERIC_REGEX,ge as PASSWORD_COMPLEX_REGEX,me as PASSWORD_SIMPLE_REGEX,ue as PHONE_REGEX,fe as POSTAL_CODE_REGEX,Gf as Paper,F_ as PhoneInputField,Pf as PieChart,zL as PopUpModal,sO as PrePostTable,Jb as ProgressBar,iE as Prompt,uE as PromptContainer,Qe as RGB_COLOR_REGEX,Je as ROMAN_NUMERALS_REGEX,on as RadialChart,ja as RadioButton,Ra as RadioGroup,Wh as Recaptcha,Jt as Row,it as SCRIPT_REGEX,Ft as SERVER_HOST_REGEX,ke as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,at as STEP_GROUP_NAME_REGEX,HP as ScriptGenerationLoader,eE as ScriptSwitchButton,Ws as Search,ar as Select,wB as SelectionSwitcher,oC as SequentialConnectingBranch,bE as SessionDropdown,vB as SessionManager,Nf as StateDropdown,yB as StatusBadge,cr as StatusButton,lv as StatusCard,gE as StatusIndicator,MO as StepLandingTable,bO as StepResultStats,tE as SwitchButton,Me as TIME_REGEX,tt as TWITTER_HANDLE_REGEX,La as Table,Fs as TableTree,OE as TableTreeFn,Xb as TableWithAccordion,Us as Tabs,mE as TabsWithSilder,sr as TextArea,aB as TextEditor,W as ThemeProvider,Yt as Toaster,Da as Toastify,en as Toggle,lC as ToggleSwitch,G as Tooltip,sn as TruncatedTooltip,P as Typography,rt as UNIT_REGEX,de as URL_REGEX,Ne as USERNAME_REGEX,Ue as USERNAME_SPECIAL_REGEX,_e as US_ZIP_CODE_REGEX,He as UUID_REGEX,je as VEHICLE_REGISTRATION_REGEX,Ub as VariableDropdown,jf as VariableInput,Kb as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,Mt as XML_FILE_TYPE_VALIDATION,kP as adapter,eO as addPrePostStepGroup,tO as addStepGroup,dB as autoScrollToTableLastRow,fC as capitalize,Q as checkEmpty,mB as checkMicrophoneAccess,Wf as clearStore,TE as compareArrays,zE as compareObjects,W_ as convertFormDataToObject,rA as convertToBytes,iA as convertToGB,nO as convertToISO,VP as copyToClipboard,xa as debounce,qf as deleteStoreValue,qt as ffid,NE as findAndInsert,$_ as formatDate,q_ as formatResponseDate,nA as getEncryptedData,Na as getExtension,za as getExtensionWithPeriod,pB as getNavigateToKey,wL as getSequentialPayload,Uf as getStoreValue,hB as getTopVisibleNodeKey,Q_ as getTreeDetails,rO as handleTimeZoneChange,uB as handleTreeExpandAllCollapseAll,J_ as handleTreeNodeExpandCollapse,Y_ as handleTreeNodeSect,X_ as handleUnCheckAllTreeNodesWithUpdates,jL as hasDuplicateFile,tC as isEmptyObject,ie as isTextTruncated,CB as nlpInputDelay,U_ as rearrangeDragItem,kL as saveFileFromBlob,lO as scrollToView,Ff as setStoreValue,$g as throttle,cB as toCamelCase,Ia as toast,fB as toggleShowHideEntity,re as truncateText,G_ as updateTreeState,K_ as useBeforeUnload,K as useClickOutside,SP as useDeviceType,Za as useFileDropzone,se as useKeyboardActions,qa as useTheme,NL as useTriggerControl};
|
|
49
49
|
//# sourceMappingURL=index.js.map
|