this.primereact=this.primereact||{},this.primereact.editor=function(e,t,l){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var l=0;l

"===n&&(n=null),e.props.onTextChange&&e.props.onTextChange({htmlValue:n,textValue:r,delta:t,source:l})})),e.quill.on("selection-change",(function(t,l,n){e.props.onSelectionChange&&e.props.onSelectionChange({range:t,oldRange:l,source:n})})))})).then((function(){e.quill&&e.quill.getModule("toolbar")&&e.props.onLoad&&e.props.onLoad(e.quill)}))}},{key:"componentDidUpdate",value:function(e){this.props.value!==e.value&&this.quill&&!this.quill.hasFocus()&&(this.props.value?this.quill.setContents(this.quill.clipboard.convert(this.props.value)):this.quill.setText(""))}},{key:"render",value:function(){var e=this,t=l.classNames("p-component p-editor-container",this.props.className),n=null;return!1===this.props.showHeader?(n="",this.toolbarElement=void 0):n=this.props.headerTemplate?r.default.createElement("div",{ref:function(t){return e.toolbarElement=t},className:"p-editor-toolbar"},this.props.headerTemplate):r.default.createElement("div",{ref:function(t){return e.toolbarElement=t},className:"p-editor-toolbar"},r.default.createElement("span",{className:"ql-formats"},r.default.createElement("select",{className:"ql-header",defaultValue:"0"},r.default.createElement("option",{value:"1"},"Heading"),r.default.createElement("option",{value:"2"},"Subheading"),r.default.createElement("option",{value:"0"},"Normal")),r.default.createElement("select",{className:"ql-font"},r.default.createElement("option",null),r.default.createElement("option",{value:"serif"}),r.default.createElement("option",{value:"monospace"}))),r.default.createElement("span",{className:"ql-formats"},r.default.createElement("button",{type:"button",className:"ql-bold","aria-label":"Bold"}),r.default.createElement("button",{type:"button",className:"ql-italic","aria-label":"Italic"}),r.default.createElement("button",{type:"button",className:"ql-underline","aria-label":"Underline"})),r.default.createElement("span",{className:"ql-formats"},r.default.createElement("select",{className:"ql-color"}),r.default.createElement("select",{className:"ql-background"})),r.default.createElement("span",{className:"ql-formats"},r.default.createElement("button",{type:"button",className:"ql-list",value:"ordered","aria-label":"Ordered List"}),r.default.createElement("button",{type:"button",className:"ql-list",value:"bullet","aria-label":"Unordered List"}),r.default.createElement("select",{className:"ql-align"},r.default.createElement("option",{defaultValue:!0}),r.default.createElement("option",{value:"center"}),r.default.createElement("option",{value:"right"}),r.default.createElement("option",{value:"justify"}))),r.default.createElement("span",{className:"ql-formats"},r.default.createElement("button",{type:"button",className:"ql-link","aria-label":"Insert Link"}),r.default.createElement("button",{type:"button",className:"ql-image","aria-label":"Insert Image"}),r.default.createElement("button",{type:"button",className:"ql-code-block","aria-label":"Insert Code Block"})),r.default.createElement("span",{className:"ql-formats"},r.default.createElement("button",{type:"button",className:"ql-clean","aria-label":"Remove Styles"}))),r.default.createElement("div",{id:this.props.id,className:t},n,r.default.createElement("div",{ref:function(t){return e.editorElement=t},className:"p-editor-content",style:this.props.style}))}}])&&a(u.prototype,i),s&&a(u,s),Object.defineProperty(u,"prototype",{writable:!1}),m}(t.Component);return d(h,"defaultProps",{id:null,value:null,style:null,className:null,placeholder:null,readOnly:!1,modules:null,formats:null,theme:"snow",showHeader:!0,headerTemplate:null,onTextChange:null,onSelectionChange:null,onLoad:null}),e.Editor=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils);