Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=63)}([function(t,e){t.exports=React},function(t,e){t.exports=window.yoast.draftJs},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(33),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return a(t)?t:H(t)}function r(t){return u(t)?t:J(t)}function o(t){return s(t)?t:$(t)}function i(t){return a(t)&&!c(t)?t:G(t)}function a(t){return!(!t||!t[l])}function u(t){return!(!t||!t[p])}function s(t){return!(!t||!t[h])}function c(t){return u(t)||s(t)}function f(t){return!(!t||!t[d])}e(r,n),e(o,n),e(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=o,n.Set=i;var l="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v=5,y=1<>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?x(t)+e:e}function j(){return!0}function C(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function I(t,e){return k(t,e,0)}function P(t,e){return k(t,e,e)}function k(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var R=0,z=1,A=2,D="function"==typeof Symbol&&Symbol.iterator,T="@@iterator",q=D||T;function V(t){this.next=t}function F(t,e,n,r){var o=0===t?e:1===t?n:[e,n];return r?r.value=o:r={value:o,done:!1},r}function B(){return{value:void 0,done:!0}}function K(t){return!!W(t)}function L(t){return t&&"function"==typeof t.next}function U(t){var e=W(t);return e&&e.call(t)}function W(t){var e=t&&(D&&t[D]||t[T]);if("function"==typeof e)return e}function N(t){return t&&"number"==typeof t.length}function H(t){return null===t||void 0===t?it():a(t)?t.toSeq():function(t){var e=st(t)||"object"==typeof t&&new et(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function J(t){return null===t||void 0===t?it().toKeyedSeq():a(t)?u(t)?t.toSeq():t.fromEntrySeq():at(t)}function $(t){return null===t||void 0===t?it():a(t)?u(t)?t.entrySeq():t.toIndexedSeq():ut(t)}function G(t){return(null===t||void 0===t?it():a(t)?u(t)?t.entrySeq():t:ut(t)).toSetSeq()}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=R,V.VALUES=z,V.ENTRIES=A,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[q]=function(){return this},e(H,n),H.of=function(){return H(arguments)},H.prototype.toSeq=function(){return this},H.prototype.toString=function(){return this.__toString("Seq {","}")},H.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},H.prototype.__iterate=function(t,e){return ct(this,t,e,!0)},H.prototype.__iterator=function(t,e){return ft(this,t,e,!0)},e(J,H),J.prototype.toKeyedSeq=function(){return this},e($,H),$.of=function(){return $(arguments)},$.prototype.toIndexedSeq=function(){return this},$.prototype.toString=function(){return this.__toString("Seq [","]")},$.prototype.__iterate=function(t,e){return ct(this,t,e,!1)},$.prototype.__iterator=function(t,e){return ft(this,t,e,!1)},e(G,H),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},H.isSeq=ot,H.Keyed=J,H.Set=G,H.Indexed=$;var Y,X,Z,Q="@@__IMMUTABLE_SEQ__@@";function tt(t){this._array=t,this.size=t.length}function et(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function nt(t){this._iterable=t,this.size=t.length||t.size}function rt(t){this._iterator=t,this._iteratorCache=[]}function ot(t){return!(!t||!t[Q])}function it(){return Y||(Y=new tt([]))}function at(t){var e=Array.isArray(t)?new tt(t).fromEntrySeq():L(t)?new rt(t).fromEntrySeq():K(t)?new nt(t).fromEntrySeq():"object"==typeof t?new et(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function ut(t){var e=st(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function st(t){return N(t)?new tt(t):L(t)?new rt(t):K(t)?new nt(t):void 0}function ct(t,e,n,r){var o=t._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var u=o[n?i-a:a];if(!1===e(u[1],r?u[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function ft(t,e,n,r){var o=t._cache;if(o){var i=o.length-1,a=0;return new V(function(){var t=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:F(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function lt(t,e){return e?function t(e,n,r,o){return Array.isArray(n)?e.call(o,r,$(n).map(function(r,o){return t(e,r,o,n)})):ht(n)?e.call(o,r,J(n).map(function(r,o){return t(e,r,o,n)})):n}(e,t,"",{"":t}):pt(t)}function pt(t){return Array.isArray(t)?$(t).map(pt).toList():ht(t)?J(t).map(pt).toMap():t}function ht(t){return t&&(t.constructor===Object||void 0===t.constructor)}function dt(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function vt(t,e){if(t===e)return!0;if(!a(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||u(t)!==u(e)||s(t)!==s(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every(function(t,e){var o=r.next().value;return o&&dt(o[1],t)&&(n||dt(o[0],e))})&&r.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var i=t;t=e,e=i}var l=!0,p=e.__iterate(function(e,r){if(n?!t.has(e):o?!dt(e,t.get(r,g)):!dt(t.get(r,g),e))return l=!1,!1});return l&&t.size===p}function yt(t,e){if(!(this instanceof yt))return new yt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(X)return X;X=this}}function _t(t,e){if(!t)throw new Error(e)}function gt(t,e,n){if(!(this instanceof gt))return new gt(t,e,n);if(_t(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),er?{value:void 0,done:!0}:F(t,o,n[e?r-o++:o++])})},e(et,J),et.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},et.prototype.has=function(t){return this._object.hasOwnProperty(t)},et.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[e?o-i:i];if(!1===t(n[a],a,this))return i+1}return i},et.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,o=r.length-1,i=0;return new V(function(){var a=r[e?o-i:i];return i++>o?{value:void 0,done:!0}:F(t,a,n[a])})},et.prototype[d]=!0,e(nt,$),nt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=U(n),o=0;if(L(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,o++,this););return o},nt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=U(n);if(!L(r))return new V(B);var o=0;return new V(function(){var e=r.next();return e.done?e:F(t,o++,e.value)})},e(rt,$),rt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[o]=e.value}return F(t,o,r[o++])})},e(yt,$),yt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},yt.prototype.get=function(t,e){return this.has(t)?this._value:e},yt.prototype.includes=function(t){return dt(this._value,t)},yt.prototype.slice=function(t,e){var n=this.size;return C(t,e,n)?this:new yt(this._value,P(e,n)-I(t,n))},yt.prototype.reverse=function(){return this},yt.prototype.indexOf=function(t){return dt(this._value,t)?0:-1},yt.prototype.lastIndexOf=function(t){return dt(this._value,t)?this.size:-1},yt.prototype.__iterate=function(t,e){for(var n=0;n1?" by "+this._step:"")+" ]"},gt.prototype.get=function(t,e){return this.has(t)?this._start+M(this,t)*this._step:e},gt.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=0&&nn?{value:void 0,done:!0}:F(t,i++,a)})},gt.prototype.equals=function(t){return t instanceof gt?this._start===t._start&&this._end===t._end&&this._step===t._step:vt(this,t)},e(mt,n),e(bt,mt),e(St,mt),e(wt,mt),mt.Keyed=bt,mt.Indexed=St,mt.Set=wt;var Ot="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function Et(t){return t>>>1&1073741824|3221225471&t}function xt(t){if(!1===t||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return Et(n)}if("string"===e)return t.length>zt?function(t){var e=Tt[t];return void 0===e&&(e=Mt(t),Dt===At&&(Dt=0,Tt={}),Dt++,Tt[t]=e),e}(t):Mt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Pt&&void 0!==(e=jt.get(t)))return e;if(void 0!==(e=t[Rt]))return e;if(!It){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Rt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++kt,1073741824&kt&&(kt=0),Pt)jt.set(t,e);else{if(void 0!==Ct&&!1===Ct(t))throw new Error("Non-extensible objects are not allowed as keys.");if(It)Object.defineProperty(t,Rt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Rt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Rt]=e}}return e}(t);if("function"==typeof t.toString)return Mt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Mt(t){for(var e=0,n=0;n>>n)&_,u=(0===n?r:r>>>n)&_,s=a===u?[ne(t,e,n+v,r,o)]:(i=new Jt(e,r,o),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function se(t,e,n,r){var o=r?t:E(t);return o[e]=n,o}Lt[Kt]=!0,Lt.delete=Lt.remove,Lt.removeIn=Lt.deleteIn,Ut.prototype.get=function(t,e,n,r){for(var o=this.entries,i=0,a=o.length;i=ce)return function(t,e,n,r){t||(t=new O);for(var o=new Jt(t,xt(n),[n,r]),i=0;i>>t)&_),i=this.bitmap;return 0==(i&o)?r:this.nodes[ue(i&o-1)].get(t+v,e,n,r)},Wt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=xt(r));var u=(0===e?n:n>>>e)&_,s=1<=fe)return function(t,e,n,r,o){for(var i=0,a=new Array(y),u=0;0!==n;u++,n>>>=1)a[u]=1&n?e[i++]:void 0;return a[r]=o,new Nt(t,i+1,a)}(t,p,c,u,d);if(f&&!d&&2===p.length&&ee(p[1^l]))return p[1^l];if(f&&d&&1===p.length&&ee(d))return d;var m=t&&t===this.ownerID,b=f?d?c:c^s:c|s,S=f?d?se(p,l,d,m):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var o=new Array(r),i=0,a=0;a>>t)&_,i=this.nodes[o];return i?i.get(t+v,e,n,r):r},Nt.prototype.update=function(t,e,n,r,o,i,a){void 0===n&&(n=xt(r));var u=(0===e?n:n>>>e)&_,s=o===g,c=this.nodes,f=c[u];if(s&&!f)return this;var l=te(f,t,e+v,n,r,o,i,a);if(l===f)return this;var p=this.count;if(f){if(!l&&--p0&&r=0&&t=t.size||e<0)return t.withMutations(function(t){e<0?Me(t,e).set(0,n):Me(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,o=t._root,i=S(b);return e>=Ce(t._capacity)?r=Oe(r,t.__ownerID,0,e,n,i):o=Oe(o,t.__ownerID,t._level,e,n,i),i.value?t.__ownerID?(t._root=o,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Se(t._origin,t._capacity,t._level,o,r):t}(this,t,e)},pe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},pe.prototype.insert=function(t,e){return this.splice(t,0,e)},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=v,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):we()},pe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){Me(n,0,e+t.length);for(var r=0;r>>e&_;if(r>=this.array.length)return new ye([],t);var o,i=0===r;if(e>0){var a=this.array[r];if((o=a&&a.removeBefore(t,e-v,n))===a&&i)return this}if(i&&!o)return this;var u=Ee(this,t);if(!i)for(var s=0;s>>e&_;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((r=i&&i.removeAfter(t,e-v,n))===i&&o===this.array.length-1)return this}var a=Ee(this,t);return a.array.splice(o+1),r&&(a.array[o]=r),a};var _e,ge,me={};function be(t,e){var n=t._origin,r=t._capacity,o=Ce(r),i=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===o?i&&i.array:t&&t.array,s=a>n?0:n-a,c=r-a;return c>y&&(c=y),function(){if(s===c)return me;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,o,i){var u,s=t&&t.array,c=i>n?0:n-i>>o,f=1+(r-i>>o);return f>y&&(f=y),function(){for(;;){if(u){var t=u();if(t!==me)return t;u=null}if(c===f)return me;var n=e?--f:c++;u=a(s&&s[n],o-v,i+(n<>>n&_,s=t&&u0){var c=t&&t.array[u],f=Oe(c,e,n-v,r,o,i);return f===c?t:((a=Ee(t,e)).array[u]=f,a)}return s&&t.array[u]===o?t:(w(i),a=Ee(t,e),void 0===o&&u===a.array.length-1?a.array.pop():a.array[u]=o,a)}function Ee(t,e){return e&&t&&e===t.ownerID?t:new ye(t?t.array.slice():[],e)}function xe(t,e){if(e>=Ce(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&_],r-=v;return n}}function Me(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new O,o=t._origin,i=t._capacity,a=o+e,u=void 0===n?i:n<0?i+n:o+n;if(a===o&&u===i)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,f=0;a+f<0;)c=new ye(c&&c.array.length?[void 0,c]:[],r),f+=1<<(s+=v);f&&(a+=f,o+=f,u+=f,i+=f);for(var l=Ce(i),p=Ce(u);p>=1<l?new ye([],r):h;if(h&&p>l&&av;g-=v){var m=l>>>g&_;y=y.array[m]=Ee(y.array[m],r)}y.array[l>>>v&_]=h}if(u=p)a-=p,u-=p,s=v,c=null,d=d&&d.removeBefore(r,0,a);else if(a>o||p>>s&_;if(b!==p>>>s&_)break;b&&(f+=(1<o&&(c=c.removeBefore(r,s,a-f)),c&&pi&&(i=c.size),a(s)||(c=c.map(function(t){return lt(t)})),r.push(c)}return i>t.size&&(t=t.setSize(i)),ae(t,e,r)}function Ce(t){return t>>v<=y&&a.size>=2*i.size?(o=a.filter(function(t,e){return void 0!==t&&u!==e}),r=o.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=o.__ownerID=t.__ownerID)):(r=i.remove(e),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=i,o=a.set(u,[e,n])}else r=i.set(e,a.size),o=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=o,t.__hash=void 0,t):ke(r,o)}function Ae(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function De(t){this._iter=t,this.size=t.size}function Te(t){this._iter=t,this.size=t.size}function qe(t){this._iter=t,this.size=t.size}function Ve(t){var e=Qe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=tn,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===A){var r=t.__iterator(e,n);return new V(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===z?R:z,n)},e}function Fe(t,e,n){var r=Qe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,o){var i=t.get(r,g);return i===g?o:e.call(n,i,r,t)},r.__iterateUncached=function(r,o){var i=this;return t.__iterate(function(t,o,a){return!1!==r(e.call(n,t,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=t.__iterator(A,o);return new V(function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return F(r,u,e.call(n,a[1],u,t),o)})},r}function Be(t,e){var n=Qe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Ve(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=tn,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function Ke(t,e,n,r){var o=Qe(t);return r&&(o.has=function(r){var o=t.get(r,g);return o!==g&&!!e.call(n,o,r,t)},o.get=function(r,o){var i=t.get(r,g);return i!==g&&e.call(n,i,r,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return t.__iterate(function(t,i,s){if(e.call(n,t,i,s))return u++,o(t,r?i:u-1,a)},i),u},o.__iteratorUncached=function(o,i){var a=t.__iterator(A,i),u=0;return new V(function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],f=s[1];if(e.call(n,f,c,t))return F(o,r?c:u++,f,i)}})},o}function Le(t,e,n,r){var o=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n|=0),C(e,n,o))return t;var i=I(e,o),a=P(n,o);if(i!=i||a!=a)return Le(t.toSeq().cacheResult(),e,n,r);var u,s=a-i;s==s&&(u=s<0?0:s);var c=Qe(t);return c.size=0===u?u:t.size&&u||void 0,!r&&ot(t)&&u>=0&&(c.get=function(e,n){return(e=M(this,e))>=0&&eu)return{value:void 0,done:!0};var t=o.next();return r||e===z?t:F(e,s-1,e===R?void 0:t.value[1],t)})},c}function Ue(t,e,n,r){var o=Qe(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return t.__iterate(function(t,i,c){if(!u||!(u=e.call(n,t,i,c)))return s++,o(t,r?i:s-1,a)}),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=t.__iterator(A,i),s=!0,c=0;return new V(function(){var t,i,f;do{if((t=u.next()).done)return r||o===z?t:F(o,c++,o===R?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],s&&(s=e.call(n,f,i,a))}while(s);return o===A?t:F(o,i,f,t)})},o}function We(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,o){var i=0,u=!1;return function t(s,c){var f=this;s.__iterate(function(o,s){return(!e||c0}function $e(t,e,r){var o=Qe(t);return o.size=new tt(r).map(function(t){return t.size}).min(),o.__iterate=function(t,e){for(var n,r=this.__iterator(z,e),o=0;!(n=r.next()).done&&!1!==t(n.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map(function(t){return t=n(t),U(o?t.reverse():t)}),a=0,u=!1;return new V(function(){var n;return u||(n=i.map(function(t){return t.next()}),u=n.some(function(t){return t.done})),u?{value:void 0,done:!0}:F(t,a++,e.apply(null,n.map(function(t){return t.value})))})},o}function Ge(t,e){return ot(t)?e:t.constructor(e)}function Ye(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Xe(t){return qt(t.size),x(t)}function Ze(t){return u(t)?r:s(t)?o:i}function Qe(t){return Object.create((u(t)?J:s(t)?$:G).prototype)}function tn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):H.prototype.cacheResult.call(this)}function en(t,e){return t>e?1:t=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):jn(t,e)},wn.prototype.pushAll=function(t){if(0===(t=o(t)).size)return this;qt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):jn(e,n)},wn.prototype.pop=function(){return this.slice(1)},wn.prototype.unshift=function(){return this.push.apply(this,arguments)},wn.prototype.unshiftAll=function(t){return this.pushAll(t)},wn.prototype.shift=function(){return this.pop.apply(this,arguments)},wn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Cn()},wn.prototype.slice=function(t,e){if(C(t,e,this.size))return this;var n=I(t,this.size),r=P(e,this.size);if(r!==this.size)return St.prototype.slice.call(this,t,e);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):jn(o,i)},wn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?jn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},wn.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},wn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new V(function(){if(r){var e=r.value;return r=r.next,F(t,n++,e)}return{value:void 0,done:!0}})},wn.isStack=On;var En,xn="@@__IMMUTABLE_STACK__@@",Mn=wn.prototype;function jn(t,e,n,r){var o=Object.create(Mn);return o.size=t,o._head=e,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Cn(){return En||(En=jn(0))}function In(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}Mn[xn]=!0,Mn.withMutations=Lt.withMutations,Mn.asMutable=Lt.asMutable,Mn.asImmutable=Lt.asImmutable,Mn.wasAltered=Lt.wasAltered,n.Iterator=V,In(n,{toArray:function(){qt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new De(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new Ae(this,!0)},toMap:function(){return Vt(this.toKeyedSeq())},toObject:function(){qt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Ie(this.toKeyedSeq())},toOrderedSet:function(){return yn(u(this)?this.valueSeq():this)},toSet:function(){return sn(u(this)?this.valueSeq():this)},toSetSeq:function(){return new Te(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return wn(u(this)?this.valueSeq():this)},toList:function(){return pe(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var e=t.call(arguments,0);return Ge(this,function(t,e){var n=u(t),o=[t].concat(e).map(function(t){return a(t)?n&&(t=r(t)):t=n?at(t):ut(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===o.length)return t;if(1===o.length){var i=o[0];if(i===t||n&&u(i)||s(t)&&s(i))return i}var c=new tt(o);return n?c=c.toKeyedSeq():s(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}(this,e))},includes:function(t){return this.some(function(e){return dt(e,t)})},entries:function(){return this.__iterator(A)},every:function(t,e){qt(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!t.call(e,r,o,i))return n=!1,!1}),n},filter:function(t,e){return Ge(this,Ke(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,o,i){if(t.call(e,r,o,i))return n=[o,r],!1}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return qt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){qt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(R)},map:function(t,e){return Ge(this,Fe(this,t,e))},reduce:function(t,e,n){var r,o;return qt(this.size),arguments.length<2?o=!0:r=e,this.__iterate(function(e,i,a){o?(o=!1,r=e):r=t.call(n,r,e,i,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Ge(this,Be(this,!0))},slice:function(t,e){return Ge(this,Le(this,t,e,!0))},some:function(t,e){return!this.every(An(t),e)},sort:function(t){return Ge(this,Ne(this,t))},values:function(){return this.__iterator(z)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return x(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Vt().asMutable();return t.__iterate(function(o,i){r.update(e.call(n,o,i,t),0,function(t){return t+1})}),r.asImmutable()}(this,t,e)},equals:function(t){return vt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new tt(t._cache);var e=t.toSeq().map(zn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(An(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(j)},flatMap:function(t,e){return Ge(this,function(t,e,n){var r=Ze(t);return t.toSeq().map(function(o,i){return r(e.call(n,o,i,t))}).flatten(!0)}(this,t,e))},flatten:function(t){return Ge(this,We(this,t,!0))},fromEntrySeq:function(){return new qe(this)},get:function(t,e){return this.find(function(e,n){return dt(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,o=nn(t);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,g):g)===g)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=u(t),o=(f(t)?Ie():Vt()).asMutable();t.__iterate(function(i,a){o.update(e.call(n,i,a,t),function(t){return(t=t||[]).push(r?[a,i]:i),t})});var i=Ze(t);return o.map(function(e){return Ge(t,i(e))})}(this,t,e)},has:function(t){return this.get(t,g)!==g},hasIn:function(t){return this.getIn(t,g)!==g},isSubset:function(t){return t="function"==typeof t.includes?t:n(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:n(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(Rn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return He(this,t)},maxBy:function(t,e){return He(this,e,t)},min:function(t){return He(this,t?Dn(t):Vn)},minBy:function(t,e){return He(this,e?Dn(e):Vn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ge(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ge(this,Ue(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(An(t),e)},sortBy:function(t,e){return Ge(this,Ne(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ge(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ge(this,function(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return t.__iterate(function(t,o,u){return e.call(n,t,o,u)&&++a&&r(t,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=t.__iterator(A,o),u=!0;return new V(function(){if(!u)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(n,c,s,i)?r===A?t:F(r,s,c,t):(u=!1,{value:void 0,done:!0})})},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(An(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),n=u(t),r=e?1:0;return function(t,e){return e=Ot(e,3432918353),e=Ot(e<<15|e>>>-15,461845907),e=Ot(e<<13|e>>>-13,5),e=Ot((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Et((e=Ot(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Fn(xt(t),xt(e))|0}:function(t,e){r=r+Fn(xt(t),xt(e))|0}:e?function(t){r=31*r+xt(t)|0}:function(t){r=r+xt(t)|0}),r)}(this))}});var Pn=n.prototype;Pn[l]=!0,Pn[q]=Pn.values,Pn.__toJS=Pn.toArray,Pn.__toStringMapper=Tn,Pn.inspect=Pn.toSource=function(){return this.toString()},Pn.chain=Pn.flatMap,Pn.contains=Pn.includes,function(){try{Object.defineProperty(Pn,"length",{get:function(){if(!n.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),In(r,{flip:function(){return Ge(this,Ve(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return dt(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return dt(e,t)})},mapEntries:function(t,e){var n=this,r=0;return Ge(this,this.toSeq().map(function(o,i){return t.call(e,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Ge(this,this.toSeq().flip().map(function(r,o){return t.call(e,r,o,n)}).flip())}});var kn=r.prototype;function Rn(t,e){return e}function zn(t,e){return[e,t]}function An(t){return function(){return!t.apply(this,arguments)}}function Dn(t){return function(){return-t.apply(this,arguments)}}function Tn(t){return"string"==typeof t?JSON.stringify(t):t}function qn(){return E(arguments)}function Vn(t,e){return te?-1:0}function Fn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return kn[p]=!0,kn[q]=Pn.entries,kn.__toJS=Pn.toObject,kn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Tn(t)},In(o,{toKeyedSeq:function(){return new Ae(this,!1)},filter:function(t,e){return Ge(this,Ke(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return Ge(this,Be(this,!1))},slice:function(t,e){return Ge(this,Le(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=I(t,t<0?this.count():this.size);var r=this.slice(0,t);return Ge(this,1===n?r:r.concat(E(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Ge(this,We(this,t,!1))},get:function(t,e){return(t=M(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=M(this,t))>=0&&(void 0!==this.size?this.size===1/0||t-1&&t%1==0&&t<=n}},function(t,e,n){(function(t){var r=n(3),o=n(120),i="object"==typeof e&&e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;t.exports=s}).call(this,n(48)(t))},function(t,e,n){var r=n(121),o=n(122),i=n(123),a=i&&i.isTypedArray,u=a?o(a):r;t.exports=u},function(t,e,n){var r=n(146),o=n(153),i=n(155),a=n(156),u=n(157);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{this.ref=t,v(t)},ariaLabelledBy:this.uniqueId})))}}h.propTypes={editorRef:o.default.func,content:o.default.string.isRequired,onChange:o.default.func.isRequired,onBlur:o.default.func,replacementVariables:f.replacementVariablesShape,recommendedReplacementVariables:f.recommendedReplacementVariablesShape,isActive:o.default.bool,isHovered:o.default.bool,withCaret:o.default.bool,onFocus:o.default.func,label:o.default.string,placeholder:o.default.string,type:o.default.oneOf(["title","description"]).isRequired,fieldId:o.default.string,onMouseEnter:o.default.func,onMouseLeave:o.default.func},h.defaultProps={onFocus:()=>{},onBlur:()=>{},replacementVariables:[],recommendedReplacementVariables:[],fieldId:"",placeholder:"",label:"",withCaret:!1,isHovered:!1,isActive:!1,editorRef:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{}},e.default=h},function(t,e,n){var r=n(68);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(34))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n(0,m.positionSuggestions)(e,t),mentionComponent:b.Mention}),this.singleLinePlugin=(0,u.default)({stripEntities:!1})}serializeContent(t){const e=(0,S.serializeEditor)(t.getCurrentContent());this._serializedContent!==e&&(this._serializedContent=e,this.props.onChange(this._serializedContent))}onChange(t){return new Promise(e=>{t=(0,S.replaceReplacementVariables)(t,this.props.replacementVariables),t=(0,O.selectReplacementVariables)(t,this.state.editorState),this.setState({editorState:t},()=>{this.serializeContent(t),e()})})}mapReplacementVariablesToSuggestions(t){return t.map(t=>r({},t,{name:t.label,replaceName:t.name}))}suggestionsFilter(t,e){const n=t.toLowerCase();return e.filter(function(t){return!n||0===t.name.toLowerCase().indexOf(n)})}determineCurrentReplacementVariables(t,e,n=""){if(""===n&&!(0,c.default)(e)){const n=(0,f.default)(t,t=>(0,l.default)(e,t.name));if(0!==n.length)return n}return t}onSearchChange({value:t}){const e=this.determineCurrentReplacementVariables(this.props.replacementVariables,this.props.recommendedReplacementVariables,t),n=this.mapReplacementVariablesToSuggestions(e);this.setState({searchValue:t,suggestions:this.suggestionsFilter(t,n)}),setTimeout(()=>{this.announceSearchResults()})}announceSearchResults(){const t=this.state.suggestions;t.length?this.debouncedA11ySpeak((0,v.sprintf)((0,v._n)("%d result found, use up and down arrow keys to navigate","%d results found, use up and down arrow keys to navigate",t.length,"yoast-components"),t.length),"assertive"):this.debouncedA11ySpeak((0,v.__)("No results","yoast-components"),"assertive")}focus(){this.editor.focus()}setEditorRef(t){this.editor=t}setEditorFieldId(){(0,p.default)(this.editor,"editor.editor").id=this.props.fieldId}triggerReplacementVariableSuggestions(){let t=(0,w.removeSelectedText)(this.state.editorState);const e=t.getSelection(),n=t.getCurrentContent(),r=(0,w.getAnchorBlock)(n,e).getText(),o=(0,w.getCaretOffset)(e),i=!(0,w.hasWhitespaceAt)(r,o-1),a=!(0,w.hasWhitespaceAt)(r,o),u=(0,w.getTrigger)(i,a);if(t=(0,w.insertText)(t,u),a){const e=o+u.length-1;t=(0,w.moveCaret)(t,e)}this.onChange(t).then(()=>this.focus())}componentWillReceiveProps(t){var e=this.props;const n=e.content,r=e.replacementVariables,o=e.recommendedReplacementVariables,i=this.state.searchValue;if(t.content!==this._serializedContent&&t.content!==n||t.replacementVariables!==r){this._serializedContent=t.content;const e=(0,S.unserializeEditor)(t.content,t.replacementVariables),n=this.determineCurrentReplacementVariables(t.replacementVariables,o,i),r=this.mapReplacementVariablesToSuggestions(n);this.setState({editorState:e,suggestions:this.suggestionsFilter(i,r)})}}handleCopyCutEvent(t){const e=this.state.editorState,n=e.getSelection();if(n.getHasFocus())try{const r=t.clipboardData,o=e.getCurrentContent(),i=(0,S.serializeSelection)(o,n);r.setData("text/plain",i),t.preventDefault()}catch(t){console.error("Couldn't copy content of editor to clipboard, defaulting to browser copy behavior."),console.error("Original error: ",t)}}componentDidMount(){document.addEventListener("copy",this.handleCopyCutEvent),document.addEventListener("cut",this.handleCopyCutEvent),this.setEditorFieldId()}componentWillUnmount(){this.debouncedA11ySpeak.cancel(),document.removeEventListener("copy",this.handleCopyCutEvent),document.removeEventListener("cut",this.handleCopyCutEvent)}render(){const t=this.mentionsPlugin.MentionSuggestions;var e=this.props;const n=e.onFocus,r=e.onBlur,a=e.ariaLabelledBy,u=e.placeholder,s=e.theme;var c=this.state;const f=c.editorState,l=c.suggestions;return o.default.createElement(o.default.Fragment,null,o.default.createElement(i.default,{textDirectionality:s.isRtl?"RTL":"LTR",editorState:f,onChange:this.onChange,onFocus:n,onBlur:r,plugins:[this.mentionsPlugin,this.singleLinePlugin],ref:this.setEditorRef,stripPastedStyles:!0,ariaLabelledBy:a,placeholder:u,spellCheck:!0}),o.default.createElement(x,null,o.default.createElement(t,{onSearchChange:this.onSearchChange,suggestions:l})))}}M.propTypes={content:h.default.string.isRequired,replacementVariables:g.replacementVariablesShape.isRequired,recommendedReplacementVariables:g.recommendedReplacementVariablesShape,ariaLabelledBy:h.default.string.isRequired,onChange:h.default.func.isRequired,onFocus:h.default.func,onBlur:h.default.func,theme:h.default.object,placeholder:h.default.string,fieldId:h.default.string.isRequired},M.defaultProps={onFocus:()=>{},onBlur:()=>{},placeholder:"",theme:{isRtl:!1},recommendedReplacementVariables:[]},e.ReplacementVariableEditorStandaloneInnerComponent=M,e.default=(0,y.withTheme)(M)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e-1&&t%1==0&&tp))return!1;var d=f.get(t);if(d&&f.get(e))return d==e;var v=-1,y=!0,_=n&u?new r:void 0;for(f.set(t,e),f.set(e,t);++vt.padding?t.padding:"0 20px");class l extends r.default.Component{constructor(t){super(t),this.elements={title:null,description:null},this.setRef=this.setRef.bind(this),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this)}setRef(t,e){this.elements[t]=e}componentDidUpdate(t){this.focusOnActiveFieldChange(t.activeField)}focusOnActiveFieldChange(t){const e=this.props.activeField;if(e&&e!==t){this.elements[e].focus()}}triggerReplacementVariableSuggestions(t){this.elements[t].triggerReplacementVariableSuggestions()}render(){var t=this.props;const e=t.descriptionEditorFieldPlaceholder,n=t.activeField,o=t.hoveredField,a=t.replacementVariables,s=t.recommendedReplacementVariables,c=t.onFocus,l=t.onBlur,p=t.onChange;var h=t.data;const d=h.title,v=h.description,y=t.containerPadding,_=t.fieldIds;return r.default.createElement(f,{padding:y},r.default.createElement(u.default,{type:"title",label:(0,i.__)("SEO title","yoast-components"),onFocus:()=>c("title"),onBlur:l,isActive:"title"===n,isHovered:"title"===o,editorRef:t=>this.setRef("title",t),replacementVariables:a,recommendedReplacementVariables:s,content:d,onChange:t=>p("title",t),fieldId:_.title}),r.default.createElement(u.default,{type:"description",placeholder:e,label:(0,i.__)("Meta description","yoast-components"),onFocus:()=>c("description"),onBlur:l,isActive:"description"===n,isHovered:"description"===o,editorRef:t=>this.setRef("description",t),replacementVariables:a,recommendedReplacementVariables:s,content:v,onChange:t=>p("description",t),fieldId:_.description}))}}l.propTypes={replacementVariables:s.replacementVariablesShape,recommendedReplacementVariables:s.recommendedReplacementVariablesShape,onChange:o.default.func.isRequired,onFocus:o.default.func,onBlur:o.default.func,data:o.default.shape({title:o.default.string,description:o.default.string}).isRequired,activeField:o.default.oneOf(["title","description"]),hoveredField:o.default.oneOf(["title","description"]),descriptionEditorFieldPlaceholder:o.default.string,containerPadding:o.default.string,fieldIds:o.default.shape({title:o.default.string.isRequired,description:o.default.string.isRequired}).isRequired},l.defaultProps={replacementVariables:[],onFocus:()=>{},onBlur:()=>{},containerPadding:"0 20px"},e.default=l},function(t,e,n){"use strict";window.yoast=window.yoast||{},window.yoast.replacementVariableEditor=n(64)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(31);Object.defineProperty(e,"ReplacementVariableEditor",{enumerable:!0,get:function(){return c(r).default}});var o=n(36);Object.defineProperty(e,"ReplacementVariableEditorStandalone",{enumerable:!0,get:function(){return c(o).default}});var i=n(202);Object.defineProperty(e,"SettingsSnippetEditor",{enumerable:!0,get:function(){return c(i).default}});var a=n(62);Object.defineProperty(e,"StyledEditor",{enumerable:!0,get:function(){return a.StyledEditor}});var u=n(61);Object.defineProperty(e,"StandardButton",{enumerable:!0,get:function(){return u.StandardButton}}),Object.defineProperty(e,"TriggerReplacementVariableSuggestionsButton",{enumerable:!0,get:function(){return u.TriggerReplacementVariableSuggestionsButton}});var s=n(10);function c(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"replacementVariablesShape",{enumerable:!0,get:function(){return s.replacementVariablesShape}}),Object.defineProperty(e,"recommendedReplacementVariablesShape",{enumerable:!0,get:function(){return s.recommendedReplacementVariablesShape}})},function(t,e,n){"use strict";var r=n(66);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var u=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 u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){var r=n(32),o=0;t.exports=function(t){var e=++o;return r(t)+e}},function(t,e,n){var r=n(11),o=n(35),i=n(2),a=n(12),u=1/0,s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-u?"-0":n}},function(t,e,n){var r=n(11),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[u]=n:delete t[u]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.composeDecorators=e.createEditorStateWithText=e.default=void 0;var r=a(n(72)),o=a(n(73)),i=a(n(74));function a(t){return t&&t.__esModule?t:{default:t}}e.default=i.default;e.createEditorStateWithText=r.default,e.composeDecorators=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1);e.default=function(t){return r.EditorState.createWithContent(r.ContentState.createFromText(t))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){for(var t=arguments.length,e=Array(t),n=0;n=0;n-=1){t=(0,e[n])(t)}return t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function _(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{},e={keyBindingFn:void 0,handleKeyCommand:void 0,onDownArrow:void 0,onUpArrow:void 0,onTab:void 0,onEscape:void 0,handleReturn:void 0,onChange:void 0},n={ariaHasPopup:"false",ariaExpanded:!1,ariaOwneeID:void 0,ariaActiveDescendantID:void 0},r=(0,i.Map)(),p=void 0,h=(0,i.Map)(),d=void 0,v={getEditorState:void 0,setEditorState:void 0,getPortalClientRect:function(t){return h.get(t)()},getAllSearches:function(){return r},isEscaped:function(t){return p===t},escapeSearch:function(t){p=t},resetEscapedSearch:function(){p=void 0},register:function(t){r=r.set(t,t)},updatePortalClientRect:function(t,e){h=h.set(t,e)},unregister:function(t){r=r.delete(t),h=h.delete(t)},getIsOpened:function(){return d},setIsOpened:function(t){d=t}},_=t.mentionPrefix,m=void 0===_?"":_,b=t.theme,S=void 0===b?g:b,w=t.positionSuggestions,O=void 0===w?y.default:w,E=t.mentionComponent,x=t.mentionSuggestionsComponent,M=void 0===x?u.default:x,j=t.entityMutability,C=void 0===j?"SEGMENTED":j,I=t.mentionTrigger,P=void 0===I?"@":I,k=t.mentionRegExp,R=void 0===k?c.default:k,z={ariaProps:n,callbacks:e,theme:S,store:v,entityMutability:C,positionSuggestions:O,mentionTrigger:P,mentionPrefix:m};return{MentionSuggestions:(0,o.default)(M,z),decorators:[{strategy:(0,f.default)(P),component:(0,o.default)(a.default,{theme:S,mentionComponent:E})},{strategy:(0,l.default)(P,R),component:(0,o.default)(s.default,{store:v})}],getAccessibilityProps:function(){return{role:"combobox",ariaAutoComplete:"list",ariaHasPopup:n.ariaHasPopup,ariaExpanded:n.ariaExpanded,ariaActiveDescendantID:n.ariaActiveDescendantID,ariaOwneeID:n.ariaOwneeID}},initialize:function(t){var e=t.getEditorState,n=t.setEditorState;v.getEditorState=e,v.setEditorState=n},onDownArrow:function(t){return e.onDownArrow&&e.onDownArrow(t)},onTab:function(t){return e.onTab&&e.onTab(t)},onUpArrow:function(t){return e.onUpArrow&&e.onUpArrow(t)},onEscape:function(t){return e.onEscape&&e.onEscape(t)},handleReturn:function(t){return e.handleReturn&&e.handleReturn(t)},onChange:function(t){return e.onChange?e.onChange(t):t}}};e.defaultSuggestionsFilter=v.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MentionSuggestions=void 0;var r=Object.assign||function(t){for(var e=1;e0&&r.state.focusedOptionIndex>=n&&r.setState({focusedOptionIndex:n-1}),!r.props.store.getAllSearches().has(r.activeOffsetKey))return;var o=r.props.store.getPortalClientRect(r.activeOffsetKey),i=r.props.positionSuggestions({decoratorRect:o,prevProps:t,prevState:e,props:r.props,state:r.state,popover:r.popover});Object.keys(i).forEach(function(t){r.popover.style[t]=i[t]})}},r.componentWillUnmount=function(){r.props.callbacks.onChange=void 0},r.onEditorStateChange=function(t){var e=r.props.store.getAllSearches();if(0===e.size)return t;var n=function(){return r.props.store.resetEscapedSearch(),r.closeDropdown(),t},o=t.getSelection(),i=o.getAnchorKey(),a=o.getAnchorOffset();if(!o.isCollapsed()||!o.getHasFocus())return n();var u=e.map(function(t){return(0,p.default)(t)}).filter(function(t){return t.blockKey===i}).map(function(e){var n=e.blockKey,r=e.decoratorKey;return t.getBlockTree(n).getIn([r])});if(u.every(function(t){return void 0===t}))return n();var s=t.getCurrentContent().getPlainText(),f=u.filter(function(t){return void 0!==t}).map(function(t){var e=t.start,n=t.end;return 0===e&&a===r.props.mentionTrigger.length&&s.charAt(a)!==r.props.mentionTrigger&&new RegExp(String.raw({raw:""+(0,c.default)(r.props.mentionTrigger)}),"g").test(s)&&a<=n||a>e+r.props.mentionTrigger.length&&a<=n});if(f.every(function(t){return!1===t}))return n();var l=r.activeOffsetKey;return r.activeOffsetKey=f.filter(function(t){return!0===t}).keySeq().first(),r.onSearchChange(t,o,r.activeOffsetKey,l),r.props.store.isEscaped(r.activeOffsetKey)||r.props.store.resetEscapedSearch(),!r.state.isActive&&!r.props.store.isEscaped(r.activeOffsetKey)&&r.props.suggestions.length>0&&r.openDropdown(),void 0!==r.lastSelectionIsInsideWord&&f.equals(r.lastSelectionIsInsideWord)||r.setState({focusedOptionIndex:0}),r.lastSelectionIsInsideWord=f,t},r.onSearchChange=function(t,e,n,o){var i=(0,h.default)(t,e,r.props.mentionTrigger).word,a=i.substring(r.props.mentionTrigger.length,i.length);r.lastSearchValue===a&&n===o||(r.lastSearchValue=a,r.props.onSearchChange({value:a}))},r.onDownArrow=function(t){t.preventDefault();var e=r.state.focusedOptionIndex+1;r.onMentionFocus(e>=r.props.suggestions.length?0:e)},r.onTab=function(t){t.preventDefault(),r.commitSelection()},r.onUpArrow=function(t){if(t.preventDefault(),r.props.suggestions.length>0){var e=r.state.focusedOptionIndex-1;r.onMentionFocus(e<0?r.props.suggestions.length-1:e)}},r.onEscape=function(t){t.preventDefault();var e=r.lastSelectionIsInsideWord.filter(function(t){return!0===t}).keySeq().first();r.props.store.escapeSearch(e),r.closeDropdown(),r.props.store.setEditorState(r.props.store.getEditorState())},r.onMentionSelect=function(t){if(t){r.props.onAddMention&&r.props.onAddMention(t),r.closeDropdown();var e=(0,l.default)(r.props.store.getEditorState(),t,r.props.mentionPrefix,r.props.mentionTrigger,r.props.entityMutability);r.props.store.setEditorState(e)}},r.onMentionFocus=function(t){var e="mention-option-"+r.key+"-"+t;r.props.ariaProps.ariaActiveDescendantID=e,r.setState({focusedOptionIndex:t}),r.props.store.setEditorState(r.props.store.getEditorState())},r.commitSelection=function(){return r.props.store.getIsOpened()?(r.onMentionSelect(r.props.suggestions[r.state.focusedOptionIndex]),"handled"):"not-handled"},r.openDropdown=function(){r.props.callbacks.onDownArrow=r.onDownArrow,r.props.callbacks.onUpArrow=r.onUpArrow,r.props.callbacks.onEscape=r.onEscape,r.props.callbacks.handleReturn=r.commitSelection,r.props.callbacks.onTab=r.onTab;var t="mention-option-"+r.key+"-"+r.state.focusedOptionIndex;r.props.ariaProps.ariaActiveDescendantID=t,r.props.ariaProps.ariaOwneeID="mentions-list-"+r.key,r.props.ariaProps.ariaHasPopup="true",r.props.ariaProps.ariaExpanded=!0,r.setState({isActive:!0}),r.props.onOpen&&r.props.onOpen()},r.closeDropdown=function(){r.props.callbacks.onDownArrow=void 0,r.props.callbacks.onUpArrow=void 0,r.props.callbacks.onTab=void 0,r.props.callbacks.onEscape=void 0,r.props.callbacks.handleReturn=void 0,r.props.ariaProps.ariaHasPopup="false",r.props.ariaProps.ariaExpanded=!1,r.props.ariaProps.ariaActiveDescendantID=void 0,r.props.ariaProps.ariaOwneeID=void 0,r.setState({isActive:!1}),r.props.onClose&&r.props.onClose()},y(r,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),o(e,[{key:"componentWillMount",value:function(){this.key=(0,s.genKey)(),this.props.callbacks.onChange=this.onEditorStateChange}},{key:"componentWillReceiveProps",value:function(t){0===t.suggestions.length&&this.state.isActive?this.closeDropdown():t.suggestions.length>0&&t.suggestions!==this.props.suggestions&&!this.state.isActive&&this.openDropdown()}},{key:"render",value:function(){var t=this;if(!this.state.isActive)return null;var e=this.props,n=e.entryComponent,o=e.popoverComponent,i=void 0===o?a.default.createElement("div",null):o,u=(e.onClose,e.onOpen,e.onAddMention,e.onSearchChange,e.suggestions,e.ariaProps,e.callbacks,e.theme),s=void 0===u?{}:u,c=(e.store,e.entityMutability,e.positionSuggestions,e.mentionTrigger,e.mentionPrefix,function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(e,["entryComponent","popoverComponent","onClose","onOpen","onAddMention","onSearchChange","suggestions","ariaProps","callbacks","theme","store","entityMutability","positionSuggestions","mentionTrigger","mentionPrefix"]));return a.default.cloneElement(i,r({},c,{className:s.mentionSuggestions,role:"listbox",id:"mentions-list-"+this.key,ref:function(e){t.popover=e}}),this.props.suggestions.map(function(e,r){return a.default.createElement(f.default,{key:null!=e.id?e.id:e.name,onMentionSelect:t.onMentionSelect,onMentionFocus:t.onMentionFocus,isFocused:t.state.focusedOptionIndex===r,mention:e,index:r,id:"mention-option-"+t.key+"-"+r,theme:s,searchValue:t.lastSearchValue,entryComponent:n||d.default})}))}}]),e}();_.propTypes={entityMutability:u.default.oneOf(["SEGMENTED","IMMUTABLE","MUTABLE"]),entryComponent:u.default.func,onAddMention:u.default.func,suggestions:u.default.array},e.default=_},function(t,e,n){"use strict";var r=n(88);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var u=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 u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n>>0,o=n.slice(0,r+1).search(/\S+$/),i=n.slice(r).search(/\s/);return i<0?{word:n.slice(o),begin:o,end:n.length}:{word:n.slice(o,i+r),begin:o,end:i+r}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();e.default=function(t){var e=t.split("-"),n=r(e,3),o=n[0],i=n[1],a=n[2];return{blockKey:o,decoratorKey:parseInt(i,10),leafKey:parseInt(a,10)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(0)),o=i(n(94));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e=t.mention,n=t.theme,i=(t.isFocused,t.searchValue,function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["mention","theme","isFocused","searchValue"]));return r.default.createElement("div",i,r.default.createElement(o.default,{mention:e,theme:n}),r.default.createElement("span",{className:n.mentionSuggestionsEntryText},e.name))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(0));e.default=function(t){var e=t.mention,n=t.theme,o=void 0===n?{}:n;return e.avatar?r.default.createElement("img",{src:e.avatar,className:o.mentionSuggestionsEntryAvatar,role:"presentation"}):null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(0)),o=i(n(96));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){var e=t.mention,n=t.children,o=t.className;return r.default.createElement("a",{href:e.link,className:o,spellCheck:!1},n)},u=function(t){var e=t.children,n=t.className;return r.default.createElement("span",{className:n,spellCheck:!1},e)};e.default=function(t){var e=t.entityKey,n=t.theme,i=void 0===n?{}:n,s=t.mentionComponent,c=t.children,f=t.decoratedText,l=t.className,p=t.contentState,h=(0,o.default)(i.mention,l),d=p.getEntity(e).getData().mention,v=s||(d.link?a:u);return r.default.createElement(v,{entityKey:e,mention:d,theme:i,className:h,decoratedText:f},c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.default=function(t,e){return t||e?t?e?o(t.split(" "),e.split(" ")).join(" "):t:e:""};var o=function(){for(var t=arguments.length,e=Array(t),n=0;n-1}),o=r.length<5?r.length:5;return r.slice(0,o)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=t.decoratorRect,n=t.popover,r=t.state,o=t.props,i=function t(e){return e?"static"!==window.getComputedStyle(e).getPropertyValue("position")?e:t(e.parentElement):null}(n.parentElement),a={};if(i){a.scrollLeft=i.scrollLeft,a.scrollTop=i.scrollTop;var u=i.getBoundingClientRect();a.left=e.left-u.left,a.top=e.bottom-u.top}else a.scrollTop=window.pageYOffset||document.documentElement.scrollTop,a.scrollLeft=window.pageXOffset||document.documentElement.scrollLeft,a.top=e.bottom,a.left=e.left;var s=a.left+a.scrollLeft,c=a.top+a.scrollTop,f=void 0,l=void 0;return r.isActive&&(o.suggestions.length>0?(f="scale(1)",l="all 0.25s cubic-bezier(.3,1.2,.2,1)"):(f="scale(0)",l="all 0.35s cubic-bezier(.3,1,.2,1)")),{left:s+"px",top:c+"px",transform:f,transformOrigin:"1em 0%",transition:l}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),o=n(1),i=n(105),a={stripEntities:!0};e.default=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return t=Object.assign({},a,t),{blockRenderMap:(0,r.Map)({unstyled:{element:"div"}}),onChange:function(e){var n=e.getCurrentContent().getBlocksAsArray();if(n.length>1)e=(0,i.condenseBlocks)(e,n,t);else{var r=n[0],a=r.getText(),u=r.getCharacterList(),s=t.stripEntities&&(0,i.characterListhasEntities)(u);if(i.NEWLINE_REGEX.test(a)||s){a=(0,i.replaceNewlines)(a),t.stripEntities&&(u=u.map(i.stripEntityFromCharacterMetadata)),r=new o.ContentBlock({key:(0,o.genKey)(),text:a,type:"unstyled",characterList:u,depth:0});var c=o.ContentState.createFromBlockArray([r]);e=o.EditorState.push(e,c,"insert-characters")}}return e},handleReturn:function(t){return"handled"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NEWLINE_REGEX=void 0,e.replaceNewlines=a,e.condenseBlocks=function(t,e,n){e=e||t.getCurrentContent().getBlocksAsArray();var i=(0,o.List)(),s=(0,o.List)();e.forEach(function(t){"atomic"!==t.getType()&&(i=i.push(a(t.getText())),s=s.concat(t.getCharacterList()))}),n.stripEntities&&(s=s.map(u));var c=new r.ContentBlock({key:(0,r.genKey)(),text:i.join(""),type:"unstyled",characterList:s,depth:0}),f=r.ContentState.createFromBlockArray([c]);return t=r.EditorState.push(t,f,"remove-range"),r.EditorState.moveFocusToEnd(t)},e.stripEntityFromCharacterMetadata=u,e.characterListhasEntities=function(t){var e=!1;return t.forEach(function(t){null!==t.get("entity")&&(e=!0)}),e};var r=n(1),o=n(4),i=e.NEWLINE_REGEX=/\n/g;function a(t){var e=arguments.length<=1||void 0===arguments[1]?" ":arguments[1];return t.replace(i,e)}function u(t){return t.set("entity",null)}},function(t,e,n){var r=n(9),o=n(107),i=n(42),a="Expected a function",u=Math.max,s=Math.min;t.exports=function(t,e,n){var c,f,l,p,h,d,v=0,y=!1,_=!1,g=!0;if("function"!=typeof t)throw new TypeError(a);function m(e){var n=c,r=f;return c=f=void 0,v=e,p=t.apply(r,n)}function b(t){var n=t-d;return void 0===d||n>=e||n<0||_&&t-v>=l}function S(){var t=o();if(b(t))return w(t);h=setTimeout(S,function(t){var n=e-(t-d);return _?s(n,l-(t-v)):n}(t))}function w(t){return h=void 0,g&&c?m(t):(c=f=void 0,p)}function O(){var t=o(),n=b(t);if(c=arguments,f=this,d=t,n){if(void 0===h)return function(t){return v=t,h=setTimeout(S,e),y?m(t):p}(d);if(_)return h=setTimeout(S,e),m(d)}return void 0===h&&(h=setTimeout(S,e)),p}return e=i(e)||0,r(n)&&(y=!!n.leading,l=(_="maxWait"in n)?u(i(n.maxWait)||0,e):l,g="trailing"in n?!!n.trailing:g),O.cancel=function(){void 0!==h&&clearTimeout(h),v=0,c=d=f=h=void 0},O.flush=function(){return void 0===h?p:w(o())},O}},function(t,e,n){var r=n(3);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(43),o=n(45),i=n(23),a=n(2),u=n(13),s=n(25),c=n(44),f=n(26),l="[object Map]",p="[object Set]",h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||s(t)||f(t)||i(t)))return!t.length;var e=o(t);if(e==l||e==p)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e,n){var r=n(110)(Object.keys,Object);t.exports=r},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(8)(n(3),"DataView");t.exports=r},function(t,e,n){var r=n(46),o=n(113),i=n(9),a=n(47),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,l=c.hasOwnProperty,p=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:u).test(a(t))}},function(t,e,n){var r=n(114),o=function(){var t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(3)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(8)(n(3),"Promise");t.exports=r},function(t,e,n){var r=n(8)(n(3),"Set");t.exports=r},function(t,e,n){var r=n(8)(n(3),"WeakMap");t.exports=r},function(t,e,n){var r=n(6),o=n(7),i="[object Arguments]";t.exports=function(t){return o(t)&&r(t)==i}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(6),o=n(24),i=n(7),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(33),o="object"==typeof e&&e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,n(48)(t))},function(t,e,n){var r=n(49),o=n(125),i=n(133),a=n(2);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(126);t.exports=function(t,e){var n=[];return r(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}},function(t,e,n){var r=n(127),o=n(132)(r);t.exports=o},function(t,e,n){var r=n(128),o=n(14);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(129)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===n(i[s],s,i))break}return e}}},function(t,e,n){var r=n(131),o=n(23),i=n(2),a=n(25),u=n(50),s=n(26),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),p=!n&&!f&&!l&&s(t),h=n||f||l||p,d=h?r(t.length,String):[],v=d.length;for(var y in t)!e&&!c.call(t,y)||h&&("length"==y||l&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,v))||d.push(y);return d}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n-1}},function(t,e,n){var r=n(16);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(15);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(15),o=n(22),i=n(27),a=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var u=n.__data__;if(!o||u.length-1:!!f&&r(t,e,n)>-1}},function(t,e,n){var r=n(188),o=n(189),i=n(190);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e){t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i{if(!t)return document.documentElement;return"static"!==window.getComputedStyle(t).getPropertyValue("position")?t:o(t.parentElement)},i=e.getVerticalPosition=((t,e,n)=>{const r=e.top-t.top,o=e.bottom-e.top;return e.bottom+n+3>window.innerHeight?r-o-n:r+o}),a=e.getHorizontalPosition=((t,e,n,r=!1)=>{let o=e.left-t.left;r&&(o-=n);let i=e.left+n+3;if(r&&(i-=n),i>window.innerWidth){return o-(i-window.innerWidth)}return o}),u=e.getAnimationStyles=((t,e)=>{let n="scale(0)",r="all 0.35s cubic-bezier(.3,1,.2,1)";return t.isActive&&e.suggestions.length>0&&(n="scale(1)",r="all 0.25s cubic-bezier(.3,1.2,.2,1)"),{transform:n,transformOrigin:"1em 0%",transition:r}});e.positionSuggestions=(({decoratorRect:t,popover:e,state:n,props:s},c=!1)=>{const f=o(e.parentElement).getBoundingClientRect(),l=(t=>({width:t.offsetWidth,height:t.offsetHeight}))(e),p=i(f,t,l.height),h=a(f,t,l.width,c),d=u(n,s);return r({top:p+"px",left:h+"px"},d)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mention=void 0;var r=u(n(0)),o=u(n(20)),i=u(n(5)),a=n(29);function u(t){return t&&t.__esModule?t:{default:t}}const s=o.default.span.withConfig({displayName:"Mention__StyledMention",componentId:"kg5ia6-0"})(["color:",";background-color:",";padding:0px 8px;margin:2px 2px;border-radius:17px;cursor:default;&:hover{color:",";background-color:",";}"],a.colors.$color_white,a.colors.$color_pink_dark,a.colors.$color_white,a.colors.$color_pink_dark);(e.Mention=(({children:t,className:e})=>r.default.createElement(s,{className:e,spellCheck:!1},t))).propTypes={children:i.default.node.isRequired,className:i.default.string.isRequired}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;ed(e,e=>t.getEntity(e))).join(e)},e.serializeSelection=function(t,e,n=" "){const r=e.getStartKey(),o=e.getEndKey();let i=!1;return t.getBlockMap().skipUntil(function(t){return t.getKey()===r}).takeUntil(function(t){const e=i;return t.getKey()===o&&(i=!0),e}).map(function(n){const i=n.getKey(),a={};return i===r&&(a.start=e.getStartOffset()),i===o&&(a.end=e.getEndOffset()),d(n,e=>t.getEntity(e),a)}).join(n)},e.getReplacementVariableLabel=v,e.findReplacementVariables=y,e.addLabel=_,e.addPositionInformation=g,e.moveSelectionAfterReplacement=m,e.createEntityInContent=b,e.replaceVariableWithEntity=S,e.getSelectedText=w,e.replaceReplacementVariables=O,e.unserializeEditor=function(t,e){return O(i.EditorState.createWithContent(i.ContentState.createFromText(t)),e)};var i=n(1),a=n(60);const u="%%",s=/%%([A-Za-z0-9_]+)%%/g,c="%mention",f="IMMUTABLE";function l(t){return u+t+u}function p(t,e=[]){return[...e].reverse().forEach(e=>{const n=e.start,r=e.end,o=e.replacementText,i=t.slice(0,n),a=t.slice(r,t.length);t=i+o+a}),t}function h(t,e,n){return t>=e&&t<=n}function d(t,e,{start:n=0,end:r=t.getText().length}={}){const o=t.getText().slice(n,r),i=[];return t.findEntityRanges(t=>!!t.getEntity(),(o,a)=>{if(h(o,n,r)&&h(a,n,r)){const r=e(t.getEntityAt(o));i.push({start:o-n,end:a-n,replacementText:l(r.data.mention.replaceName)})}}),p(o,i)}function v(t,e){let n=e;return t.forEach(t=>{t.name===e&&t.label&&(n=t.label)}),n}function y(t){const e=[];let n;for(;n=s.exec(t);){var r=o(n,2);const t=r[0],i=r[1];e.push({name:i,start:n.index,length:t.length})}return e}function _(t,e){return r({},t,{label:v(e,t.name)})}function g(t){return r({},t,{start:t.start,end:t.start+t.length,delta:t.label.length-t.length})}function m(t,e,n){const r=n.start,o=n.end,i=n.delta;if(t.hasEdgeWithin(e,r,o)){const e=o+i;t=t.merge({anchorOffset:e,focusOffset:e})}else t.focusOffset>o&&(t=t.merge({anchorOffset:t.anchorOffset+i,focusOffset:t.focusOffset+i}));return t}function b(t,e){const n={mention:{replaceName:e.name}};return t.createEntity(c,f,n)}function S(t,e,n){let r=t.getCurrentContent();const o=i.SelectionState.createEmpty(n).merge({anchorOffset:e.start,focusOffset:e.end});r=b(r,e);const a=i.Modifier.replaceText(r,o,e.label,null,r.getLastCreatedEntityKey());return i.EditorState.push(t,a,"apply-entity")}function w(t,e){const n=e.getAnchorKey(),r=t.getCurrentContent().getBlockForKey(n),o=e.getStartOffset(),i=e.getEndOffset();return r.getText().slice(o,i)}function O(t,e){let n=t;return t.getCurrentContent().getBlockMap().forEach(t=>{const r=t.text,o=t.key;[...y(r)].reverse().forEach(t=>{t=g(t=_(t,e));let r=n.getSelection();r=m(r,o,t);const u=function(t,e,n,r){const o=t.getCurrentContent(),u=w(t,i.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end+1}));if(!(0,a.getWordBoundaries)().includes(u)){const a=i.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end}),u=i.Modifier.insertText(o,a," ");t=i.EditorState.push(t,u,"insert-characters"),e.getAnchorOffset()>=r.start&&(e=e.merge({anchorOffset:e.getAnchorOffset()+1,focusOffset:e.getFocusOffset()+1}))}return{editorState:t,selection:e}}(n,r,o,t);n=S(u.editorState,t,o),n=i.EditorState.acceptSelection(n,u.selection)})}),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.moveCaret=e.removeSelectedText=e.insertText=e.getAnchorBlock=e.getCaretOffset=e.hasWhitespaceAt=e.getTrigger=void 0;var r=n(1);e.getTrigger=((t,e)=>{let n="%";return t&&(n=" "+n),e&&(n+=" "),n}),e.hasWhitespaceAt=((t,e)=>{const n=t.charAt(e);return 0===n.length||/\s/.test(n)}),e.getCaretOffset=(t=>{return t.getIsBackward()?t.getEndOffset():t.getStartOffset()});const o=e.getAnchorBlock=((t,e)=>{const n=e.getAnchorKey();return t.getBlockForKey(n)});e.insertText=((t,e)=>{const n=t.getCurrentContent(),o=t.getSelection();if(!o.isCollapsed())return t;const i=r.Modifier.insertText(n,o,e);return r.EditorState.push(t,i,"insert-characters")}),e.removeSelectedText=(t=>{const e=t.getCurrentContent(),n=t.getSelection(),o=r.Modifier.removeRange(e,n,"backward");return r.EditorState.push(t,o,"remove-range")}),e.moveCaret=((t,e,n="")=>{const i=t.getCurrentContent(),a=t.getSelection();""===n&&(n=o(i,a).getKey());const u=r.SelectionState.createEmpty(n).merge({anchorOffset:e,focusOffset:e});return r.EditorState.acceptSelection(t,u)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEntityRange=o,e.getEntityAtPosition=i,e.selectReplacementVariables=function(t,e){const n=t.getSelection(),s=e.getSelection(),c=t.getCurrentContent();if(n===s)return t;const f=function(t,e,n){const r=t.getStartOffset(),s=t.getStartKey(),c=t.getEndOffset(),f=t.getEndKey();var l=a(t.getIsBackward());const p=l.startOffsetProperty,h=l.endOffsetProperty,d=i(n,s,r);if(null!==d){const r=o(n,s,d),i=r.start,a=r.end;t=u(e,r)?t.merge({[p]:a}):t.merge({[p]:i})}const v=i(n,f,c);if(null!==v){const r=o(n,s,v),i=r.start,a=r.end;t=u(e,r)?t.merge({[h]:i}):t.merge({[h]:a})}return t}(n,s,c);f!==n&&(t=r.EditorState.forceSelection(t,f));return t};var r=n(1);function o(t,e,n){let r=null;return t.getBlockForKey(e).findEntityRanges(t=>t.getEntity()===n,(t,e)=>{r={start:t,end:e}}),r}function i(t,e,n){const r=t.getBlockForKey(e).getEntityAt(n),i=o(t,e,r);return null===i?null:i.start===n?null:r}const a=function(t){let e="anchorOffset",n="focusOffset";return t&&(e="focusOffset",n="anchorOffset"),{startOffsetProperty:e,endOffsetProperty:n}};function u(t,e){const n=e.start,r=e.end;return t.getStartOffset()<=n&&t.getEndOffset()>=r}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(0)),o=s(n(5)),i=n(30),a=s(n(62)),u=n(10);function s(t){return t&&t.__esModule?t:{default:t}}class c extends r.default.Component{constructor(t){super(t),this.state={activeField:null,hoveredField:null},this.setFieldFocus=this.setFieldFocus.bind(this),this.handleChange=this.handleChange.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this)}handleChange(t,e){this.props.onChange(t,e)}setFieldFocus(t){this.setState({activeField:t})}onBlur(){this.setState({activeField:null})}onClick(t){this.setFieldFocus(t)}render(){var t=this.props;const e=t.data,n=t.replacementVariables,o=t.recommendedReplacementVariables,u=t.descriptionEditorFieldPlaceholder,s=t.hasPaperStyle,c=t.fieldIds;var f=this.state;const l=f.activeField,p=f.hoveredField;return r.default.createElement(i.ErrorBoundary,null,r.default.createElement(a.default,{descriptionEditorFieldPlaceholder:u,data:e,activeField:l,hoveredField:p,onChange:this.handleChange,onFocus:this.setFieldFocus,onBlur:this.onBlur,replacementVariables:n,recommendedReplacementVariables:o,containerPadding:s?"0 20px":"0",fieldIds:c}))}}c.propTypes={replacementVariables:u.replacementVariablesShape,recommendedReplacementVariables:u.recommendedReplacementVariablesShape,data:o.default.shape({title:o.default.string.isRequired,description:o.default.string.isRequired}).isRequired,onChange:o.default.func.isRequired,descriptionEditorFieldPlaceholder:o.default.string,hasPaperStyle:o.default.bool,fieldIds:o.default.shape({title:o.default.string.isRequired,description:o.default.string.isRequired}).isRequired},c.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],hasPaperStyle:!0,descriptionEditorFieldPlaceholder:""},e.default=c}]);