1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[918],{918:function(n,e,t){"use strict";t.d(e,{M:function(){return f}});var o,r,i,a=t(7294),s=t(5697),__assign=function(){return(__assign=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)},c={onActivate:s.func,onAddUndo:s.func,onBeforeAddUndo:s.func,onBeforeExecCommand:s.func,onBeforeGetContent:s.func,onBeforeRenderUI:s.func,onBeforeSetContent:s.func,onBeforePaste:s.func,onBlur:s.func,onChange:s.func,onClearUndos:s.func,onClick:s.func,onContextMenu:s.func,onCommentChange:s.func,onCopy:s.func,onCut:s.func,onDblclick:s.func,onDeactivate:s.func,onDirty:s.func,onDrag:s.func,onDragDrop:s.func,onDragEnd:s.func,onDragGesture:s.func,onDragOver:s.func,onDrop:s.func,onExecCommand:s.func,onFocus:s.func,onFocusIn:s.func,onFocusOut:s.func,onGetContent:s.func,onHide:s.func,onInit:s.func,onKeyDown:s.func,onKeyPress:s.func,onKeyUp:s.func,onLoadContent:s.func,onMouseDown:s.func,onMouseEnter:s.func,onMouseLeave:s.func,onMouseMove:s.func,onMouseOut:s.func,onMouseOver:s.func,onMouseUp:s.func,onNodeChange:s.func,onObjectResizeStart:s.func,onObjectResized:s.func,onObjectSelected:s.func,onPaste:s.func,onPostProcess:s.func,onPostRender:s.func,onPreProcess:s.func,onProgressState:s.func,onRedo:s.func,onRemove:s.func,onReset:s.func,onSaveContent:s.func,onSelectionChange:s.func,onSetAttrib:s.func,onSetContent:s.func,onShow:s.func,onSubmit:s.func,onUndo:s.func,onVisualAid:s.func,onSkinLoadError:s.func,onThemeLoadError:s.func,onModelLoadError:s.func,onPluginLoadError:s.func,onIconsLoadError:s.func,onLanguageLoadError:s.func,onScriptsLoad:s.func,onScriptsLoadError:s.func},u=__assign({apiKey:s.string,id:s.string,inline:s.bool,init:s.object,initialValue:s.string,onEditorChange:s.func,value:s.string,tagName:s.string,cloudChannel:s.string,plugins:s.oneOfType([s.string,s.array]),toolbar:s.oneOfType([s.string,s.array]),disabled:s.bool,textareaName:s.string,tinymceScriptSrc:s.oneOfType([s.string,s.arrayOf(s.string),s.arrayOf(s.shape({src:s.string,async:s.bool,defer:s.bool}))]),rollback:s.oneOfType([s.number,s.oneOf([!1])]),scriptLoading:s.shape({async:s.bool,defer:s.bool,delay:s.number})},c),isFunction=function(n){return"function"==typeof n},isEventProp=function(n){return n in c},eventAttrToEventName=function(n){return n.substr(2)},configHandlers2=function(n,e,t,o,r,i,a){var s=Object.keys(r).filter(isEventProp),c=Object.keys(i).filter(isEventProp),u=s.filter(function(n){return void 0===i[n]}),l=c.filter(function(n){return void 0===r[n]});u.forEach(function(n){var e=eventAttrToEventName(n),o=a[e];t(e,o),delete a[e]}),l.forEach(function(t){var r=o(n,t),i=eventAttrToEventName(t);a[i]=r,e(i,r)})},l=0,uuid=function(n){var e=Date.now();return n+"_"+Math.floor(1e9*Math.random())+ ++l+String(e)},isTextareaOrInput=function(n){return null!==n&&("textarea"===n.tagName.toLowerCase()||"input"===n.tagName.toLowerCase())},normalizePluginArray=function(n){return void 0===n||""===n?[]:Array.isArray(n)?n:n.split(" ")},isInDoc=function(n){if(!("isConnected"in Node.prototype)){for(var e=n,t=n.parentNode;null!=t;)t=(e=t).parentNode;return e===n.ownerDocument}return n.isConnected},setMode=function(n,e){void 0!==n&&(null!=n.mode&&"object"==typeof n.mode&&"function"==typeof n.mode.set?n.mode.set(e):n.setMode(e))},ScriptLoader2_assign=function(){return(ScriptLoader2_assign=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)},injectScriptTag=function(n,e,t){var o,r,i=n.createElement("script");i.referrerPolicy="origin",i.type="application/javascript",i.id=e.id,i.src=e.src,i.async=null!==(o=e.async)&&void 0!==o&&o,i.defer=null!==(r=e.defer)&&void 0!==r&&r;var loadHandler=function(){i.removeEventListener("load",loadHandler),i.removeEventListener("error",errorHandler),t(e.src)},errorHandler=function(n){i.removeEventListener("load",loadHandler),i.removeEventListener("error",errorHandler),t(e.src,n)};i.addEventListener("load",loadHandler),i.addEventListener("error",errorHandler),n.head&&n.head.appendChild(i)},createDocumentScriptLoader=function(n){var e={},scriptLoadOrErrorHandler=function(n,t){var o=e[n];o.done=!0,o.error=t;for(var r=0,i=o.handlers;r<i.length;r++)(0,i[r])(n,t);o.handlers=[]};return{loadScripts:function(t,o,r){var failureOrLog=function(n){return void 0!==r?r(n):console.error(n)};if(0===t.length){failureOrLog(Error("At least one script must be provided"));return}for(var i=0,a=!1,loaded=function(n,e){a||(e?(a=!0,failureOrLog(e)):++i===t.length&&o())},s=0;s<t.length;s++){var c=t[s],u=e[c.src];if(u)u.done?loaded(c.src,u.error):u.handlers.push(loaded);else{var l=uuid("tiny-");e[c.src]={id:l,src:c.src,done:!1,error:null,handlers:[loaded]},injectScriptTag(n,ScriptLoader2_assign({id:l},c),scriptLoadOrErrorHandler)}}},deleteScripts:function(){for(var t,o=0,r=Object.values(e);o<r.length;o++){var i=r[o],a=n.getElementById(i.id);null!=a&&"SCRIPT"===a.tagName&&(null===(t=a.parentNode)||void 0===t||t.removeChild(a))}e={}},getDocument:function(){return n}}},d=(o=[],r=function(n){var e=o.find(function(e){return e.getDocument()===n});return void 0===e&&(e=createDocumentScriptLoader(n),o.push(e)),e},{loadList:function(n,e,t,o,i){var doLoad=function(){return r(n).loadScripts(e,o,i)};t>0?setTimeout(doLoad,t):doLoad()},reinitialize:function(){for(var n=o.pop();null!=n;n=o.pop())n.deleteScripts()}}),getTinymce=function(n){return n&&n.tinymce?n.tinymce:null}
1,p=(i=function(n,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])})(n,e)},function(n,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function __(){this.constructor=n}i(n,e),n.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),Editor_assign=function(){return(Editor_assign=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)},f=function(n){function Editor(e){var t,o,r,i=this;return(i=n.call(this,e)||this).rollbackTimer=void 0,i.valueCursor=void 0,i.rollbackChange=function(){var n=i.editor,e=i.props.value;n&&e&&e!==i.currentContent&&n.undoManager.ignore(function(){if(n.setContent(e),i.valueCursor&&(!i.inline||n.hasFocus()))try{n.selection.moveToBookmark(i.valueCursor)}catch(n){}}),i.rollbackTimer=void 0},i.handleBeforeInput=function(n){if(void 0!==i.props.value&&i.props.value===i.currentContent&&i.editor&&(!i.inline||i.editor.hasFocus()))try{i.valueCursor=i.editor.selection.getBookmark(3)}catch(n){}},i.handleBeforeInputSpecial=function(n){("Enter"===n.key||"Backspace"===n.key||"Delete"===n.key)&&i.handleBeforeInput(n)},i.handleEditorChange=function(n){var e=i.editor;if(e&&e.initialized){var t=e.getContent();void 0===i.props.value||i.props.value===t||!1===i.props.rollback||i.rollbackTimer||(i.rollbackTimer=window.setTimeout(i.rollbackChange,"number"==typeof i.props.rollback?i.props.rollback:200)),t!==i.currentContent&&(i.currentContent=t,isFunction(i.props.onEditorChange)&&i.props.onEditorChange(t,e))}},i.handleEditorChangeSpecial=function(n){("Backspace"===n.key||"Delete"===n.key)&&i.handleEditorChange(n)},i.initialise=function(n){void 0===n&&(n=0);var e,t,o,r,a,s=i.elementRef.current;if(s){if(!isInDoc(s)){if(0===n)setTimeout(function(){return i.initialise(1)},1);else if(n<100)setTimeout(function(){return i.initialise(n+1)},100);else throw Error("tinymce can only be initialised when in a document");return}var c=getTinymce(i.view);if(!c)throw Error("tinymce should have been loaded into global scope");var u=Editor_assign(Editor_assign({},i.props.init),{selector:void 0,target:s,readonly:i.props.disabled,inline:i.inline,plugins:(e=null===(o=i.props.init)||void 0===o?void 0:o.plugins,t=i.props.plugins,normalizePluginArray(e).concat(normalizePluginArray(t))),toolbar:null!==(r=i.props.toolbar)&&void 0!==r?r:null===(a=i.props.init)||void 0===a?void 0:a.toolbar,setup:function(n){i.editor=n,i.bindHandlers({}),i.inline&&!isTextareaOrInput(s)&&n.once("PostRender",function(e){n.setContent(i.getInitialValue(),{no_events:!0})}),i.props.init&&isFunction(i.props.init.setup)&&i.props.init.setup(n)},init_instance_callback:function(n){var e,t,o=i.getInitialValue();i.currentContent=null!==(e=i.currentContent)&&void 0!==e?e:n.getContent(),i.currentContent!==o&&(i.currentContent=o,n.setContent(o),n.undoManager.clear(),n.undoManager.add(),n.setDirty(!1));var r=null!==(t=i.props.disabled)&&void 0!==t&&t;setMode(i.editor,r?"readonly":"design"),i.props.init&&isFunction(i.props.init.init_instance_callback)&&i.props.init.init_instance_callback(n)}});i.inline||(s.style.visibility=""),isTextareaOrInput(s)&&(s.value=i.getInitialValue()),c.init(u)}},i.id=i.props.id||uuid("tiny-react"),i.elementRef=a.createRef(),i.inline=null!==(r=null!==(t=i.props.inline)&&void 0!==t?t:null===(o=i.props.init)||void 0===o?void 0:o.inline)&&void 0!==r&&r,i.boundHandlers={},i}return p(Editor,n),Object.defineProperty(Editor.prototype,"view",{get:function(){var n,e;return null!==(e=null===(n=this.elementRef.current)||void 0===n?void 0:n.ownerDocument.defaultView)&&void 0!==e?e:window},enumerable:!1,configurable:!0}),Editor.prototype.componentDidUpdate=function(n){var e,t,o=this;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(n),this.editor.initialized)){if(this.currentContent=null!==(e=this.currentContent)&&void 0!==e?e:this.editor.getContent(),"string"==typeof this.props.initialValue&&this.props.initialValue!==n.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if("string"==typeof this.props.value&&this.props.value!==this.currentContent){var r=this.editor;
1r.undoManager.transact(function(){if(!o.inline||r.hasFocus())try{n=r.selection.getBookmark(3)}catch(n){}var n,e=o.valueCursor;if(r.setContent(o.props.value),!o.inline||r.hasFocus())for(var t=0,i=[n,e];t<i.length;t++){var a=i[t];if(a)try{r.selection.moveToBookmark(a),o.valueCursor=a;break}catch(n){}}})}if(this.props.disabled!==n.disabled){var i=null!==(t=this.props.disabled)&&void 0!==t&&t;setMode(this.editor,i?"readonly":"design")}}},Editor.prototype.componentDidMount=function(){var n,e,t,o,r,i=this;null!==getTinymce(this.view)?this.initialise():Array.isArray(this.props.tinymceScriptSrc)&&0===this.props.tinymceScriptSrc.length?null===(e=(n=this.props).onScriptsLoadError)||void 0===e||e.call(n,Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.")):(null===(t=this.elementRef.current)||void 0===t?void 0:t.ownerDocument)&&d.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),null!==(r=null===(o=this.props.scriptLoading)||void 0===o?void 0:o.delay)&&void 0!==r?r:0,function(){var n,e;null===(e=(n=i.props).onScriptsLoad)||void 0===e||e.call(n),i.initialise()},function(n){var e,t;null===(t=(e=i.props).onScriptsLoadError)||void 0===t||t.call(e,n)})},Editor.prototype.componentWillUnmount=function(){var n=this,e=this.editor;e&&(e.off(this.changeEvents(),this.handleEditorChange),e.off(this.beforeInputEvent(),this.handleBeforeInput),e.off("keypress",this.handleEditorChangeSpecial),e.off("keydown",this.handleBeforeInputSpecial),e.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(t){e.off(t,n.boundHandlers[t])}),this.boundHandlers={},e.remove(),this.editor=void 0)},Editor.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},Editor.prototype.changeEvents=function(){var n,e,t;return(null===(t=null===(e=null===(n=getTinymce(this.view))||void 0===n?void 0:n.Env)||void 0===e?void 0:e.browser)||void 0===t?void 0:t.isIE())?"change keyup compositionend setcontent CommentChange":"change input compositionend setcontent CommentChange"},Editor.prototype.beforeInputEvent=function(){return window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges?"beforeinput SelectionChange":"SelectionChange"},Editor.prototype.renderInline=function(){var n=this.props.tagName,e=void 0===n?"div":n;return a.createElement(e,{ref:this.elementRef,id:this.id})},Editor.prototype.renderIframe=function(){return a.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id})},Editor.prototype.getScriptSources=function(){var n,e,t=null===(n=this.props.scriptLoading)||void 0===n?void 0:n.async,o=null===(e=this.props.scriptLoading)||void 0===e?void 0:e.defer;if(void 0!==this.props.tinymceScriptSrc)return"string"==typeof this.props.tinymceScriptSrc?[{src:this.props.tinymceScriptSrc,async:t,defer:o}]:this.props.tinymceScriptSrc.map(function(n){return"string"==typeof n?{src:n,async:t,defer:o}:n});var r=this.props.cloudChannel,i=this.props.apiKey?this.props.apiKey:"no-api-key";return[{src:"https://cdn.tiny.cloud/1/".concat(i,"/tinymce/").concat(r,"/tinymce.min.js"),async:t,defer:o}]},Editor.prototype.getInitialValue=function(){return"string"==typeof this.props.initialValue?this.props.initialValue:"string"==typeof this.props.value?this.props.value:""},Editor.prototype.bindHandlers=function(n){var e=this;if(void 0!==this.editor){t=this.editor,o=this.props,r=this.boundHandlers,configHandlers2(function(n){return e.props[n]},t.on.bind(t),t.off.bind(t),function(n,e){return function(o){var r;return null===(r=n(e))||void 0===r?void 0:r(o,t)}},n,o,r);var t,o,r,isValueControlled=function(n){return void 0!==n.onEditorChange||void 0!==n.value},i=isValueControlled(n),a=isValueControlled(this.props);!i&&a?(this.editor.on(this.changeEvents(),this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):i&&!a&&(this.editor.off(this.changeEvents(),this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},Editor.propTypes=u,Editor.defaultProps={cloudChannel:"6"},Editor}(a.Component)},2703:function(n,e,t){"use strict";var o=t(414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,n.exports=function(){function shim(n,e,t,r,i,a){if(a!==o){var s=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 s.name="Invariant Violation",s}}function getShim(){return shim}shim.isRequired=shim;var n={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol
1:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n,n}},5697:function(n,e,t){n.exports=t(2703)()},414:function(n){"use strict";n.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.