@fvc/richtext 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.js +2 -2
- package/dist/lib/richtext/src/LinkModal.d.ts +3 -0
- package/dist/lib/richtext/src/Richtext.d.ts +4 -4
- package/dist/lib/richtext/src/constants/defaultSettings.d.ts +14 -0
- package/dist/lib/richtext/src/helpers/locale.d.ts +298 -0
- package/dist/lib/richtext/src/hooks/useModalHandlers.d.ts +12 -0
- package/dist/lib/richtext/src/hooks/useToolbarHandlers.d.ts +15 -0
- package/dist/lib/richtext/src/index.d.ts +2 -0
- package/dist/lib/richtext/src/types/Richtext.types.d.ts +12 -0
- package/dist/lib/richtext/src/utils/linkUtils.d.ts +7 -0
- package/dist/lib/richtext/src/utils/toolbarUtils.d.ts +6 -0
- package/package.json +8 -2
package/dist/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{RichTextEditorComponent as
|
|
1
|
+
import*as e from"react";import t,{useState as n,useEffect as i,useCallback as a,useRef as r,useMemo as o}from"react";import{RichTextEditorComponent as l,Inject as s,Toolbar as c,HtmlEditor as d,Table as m,QuickToolbar as u}from"@cyber-wysiwyg/richtexteditor";import{L10n as p}from"@cyber-wysiwyg/richtexteditor/ej2-base";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";var f=function(){return f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},f.apply(this,arguments)};function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,a,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(e){a={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function b(e,t,n){if(n||2===arguments.length)for(var i,a=0,r=t.length;a<r;a++)!i&&a in t||(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var g=function(e){var a=e.visible,r=e.onConfirm,o=e.onClose,l=e.initialLink,s=void 0===l?"":l,c=e.initialText,d=void 0===c?"":c,m=e.initialOpenInNewTab,u=void 0!==m&&m,p=h(n(""),2),f=p[0],b=p[1],g=h(n(""),2),y=g[0],v=g[1],k=h(n(!1),2),x=k[0],T=k[1];i(function(){a&&(b(s),v(d),T(u))},[a,s,d,u]);var w=function(){f.trim()&&r(f.trim(),y.trim()||f.trim(),x)},S=function(e){"Enter"===e.key?(e.preventDefault(),w()):"Escape"===e.key?(e.preventDefault(),o()):(e.stopPropagation(),e.preventDefault())};return a?t.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"link-modal-title",className:"link-modal-overlay",onClick:o},t.createElement("div",{className:"link-modal",onClick:function(e){return e.stopPropagation()}},t.createElement("h2",{id:"link-modal-title"},"Insert Link"),t.createElement("div",{className:"link-modal-form"},t.createElement("div",{className:"link-modal-field"},t.createElement("label",{htmlFor:"link-url"},"URL:"),t.createElement("input",{id:"link-url",type:"url",value:f,onChange:function(e){return b(e.target.value)},onKeyDown:S,placeholder:"https://example.com",autoFocus:!0})),t.createElement("div",{className:"link-modal-field"},t.createElement("label",{htmlFor:"link-text"},"Display Text:"),t.createElement("input",{id:"link-text",type:"text",value:y,onChange:function(e){return v(e.target.value)},onKeyDown:S,placeholder:"Link text (optional)"})),t.createElement("div",{className:"link-modal-checkbox"},t.createElement("input",{id:"open-new-tab",type:"checkbox",checked:x,onChange:function(e){return T(e.target.checked)}}),t.createElement("label",{htmlFor:"open-new-tab"},"Open in new tab"))),t.createElement("div",{className:"link-modal-buttons"},t.createElement("button",{onClick:o,type:"button",className:"link-modal-btn link-modal-cancel-btn"},"Cancel"),t.createElement("button",{onClick:w,type:"button",className:"link-modal-btn link-modal-confirm-btn",disabled:!f.trim()},"Confirm")))):null},y={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|",{tooltipText:"Keçid əlavə et",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-link-btn" tabindex="-1"><span class="e-btn-icon e-icons e-link"></span></button>'},"CreateTable","|",{tooltipText:"Simvol əlavə et",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">Ω</span></button>'},"|","ClearFormat","|"]},v={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},k={initialLink:"",initialText:"",initialOpenInNewTab:!1};
|
|
2
2
|
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
3
|
-
const{entries:m,setPrototypeOf:d,isFrozen:f,getPrototypeOf:h,getOwnPropertyDescriptor:g}=Object;let{freeze:y,seal:b,create:T}=Object,{apply:E,construct:v}="undefined"!=typeof Reflect&&Reflect;y||(y=function(e){return e}),b||(b=function(e){return e}),E||(E=function(e,t,n){return e.apply(t,n)}),v||(v=function(e,t){return new e(...t)});const S=P(Array.prototype.forEach),x=P(Array.prototype.lastIndexOf),A=P(Array.prototype.pop),w=P(Array.prototype.push),N=P(Array.prototype.splice),_=P(String.prototype.toLowerCase),C=P(String.prototype.toString),R=P(String.prototype.match),k=P(String.prototype.replace),O=P(String.prototype.indexOf),L=P(String.prototype.trim),D=P(Object.prototype.hasOwnProperty),I=P(RegExp.prototype.test),M=(z=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return v(z,t)});var z;function P(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return E(e,t,r)}}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;d&&d(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(f(t)||(t[r]=e),o=e)}e[o]=!0}return e}function H(e){for(let t=0;t<e.length;t++){D(e,t)||(e[t]=null)}return e}function F(e){const t=T(null);for(const[n,r]of m(e)){D(e,n)&&(Array.isArray(r)?t[n]=H(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=F(r):t[n]=r)}return t}function j(e,t){for(;null!==e;){const n=g(e,t);if(n){if(n.get)return P(n.get);if("function"==typeof n.value)return P(n.value)}e=h(e)}return function(){return null}}const B=y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),W=y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),G=y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Y=y(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),q=y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K=y(["#text"]),$=y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),V=y(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Z=y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=b(/<%[\w\W]*|[\w\W]*%>/gm),te=b(/\$\{[\w\W]*/gm),ne=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),re=b(/^aria-[\-\w]+$/),oe=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=b(/^(?:\w+script|data):/i),ae=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=b(/^html$/i),ce=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var se=Object.freeze({__proto__:null,ARIA_ATTR:re,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:ce,DATA_ATTR:ne,DOCTYPE_NAME:le,ERB_EXPR:ee,IS_ALLOWED_URI:oe,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:Q,TMPLIT_EXPR:te});const ue=1,pe=3,me=7,de=8,fe=9,he=function(){return"undefined"==typeof window?null:window};var ge=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==fe||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=t,g=s.prototype,b=j(g,"cloneNode"),E=j(g,"remove"),v=j(g,"nextSibling"),z=j(g,"childNodes"),P=j(g,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let H,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=r,{importNode:ie}=o;let ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof m&&"function"==typeof P&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:ge,TMPLIT_EXPR:ye,DATA_ATTR:be,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:ve,CUSTOM_ELEMENT:Se}=se;let{IS_ALLOWED_URI:xe}=se,Ae=null;const we=U({},[...B,...W,...G,...q,...K]);let Ne=null;const _e=U({},[...$,...V,...Z,...J]);let Ce=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,ke=null,Oe=!0,Le=!0,De=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,He=!1,Fe=!1,je=!1,Be=!1,We=!0,Ge=!1,Ye=!0,qe=!1,Xe={},Ke=null;const $e=U({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=U({},["audio","video","img","source","image","track"]);let Je=null;const Qe=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let rt=nt,ot=!1,it=null;const at=U({},[et,tt,nt],C);let lt=U({},["mi","mo","mn","ms","mtext"]),ct=U({},["annotation-xml"]);const st=U({},["title","style","font","a","script"]);let ut=null;const pt=["application/xhtml+xml","text/html"];let mt=null,dt=null;const ft=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=F(e),ut=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===ut?C:_,Ae=D(e,"ALLOWED_TAGS")?U({},e.ALLOWED_TAGS,mt):we,Ne=D(e,"ALLOWED_ATTR")?U({},e.ALLOWED_ATTR,mt):_e,it=D(e,"ALLOWED_NAMESPACES")?U({},e.ALLOWED_NAMESPACES,C):at,Je=D(e,"ADD_URI_SAFE_ATTR")?U(F(Qe),e.ADD_URI_SAFE_ATTR,mt):Qe,Ve=D(e,"ADD_DATA_URI_TAGS")?U(F(Ze),e.ADD_DATA_URI_TAGS,mt):Ze,Ke=D(e,"FORBID_CONTENTS")?U({},e.FORBID_CONTENTS,mt):$e,Re=D(e,"FORBID_TAGS")?U({},e.FORBID_TAGS,mt):F({}),ke=D(e,"FORBID_ATTR")?U({},e.FORBID_ATTR,mt):F({}),Xe=!!D(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,xe=e.ALLOWED_URI_REGEXP||oe,rt=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Le=!1),je&&(Fe=!0),Xe&&(Ae=U({},K),Ne=[],!0===Xe.html&&(U(Ae,B),U(Ne,$)),!0===Xe.svg&&(U(Ae,W),U(Ne,V),U(Ne,J)),!0===Xe.svgFilters&&(U(Ae,G),U(Ne,V),U(Ne,J)),!0===Xe.mathMl&&(U(Ae,q),U(Ne,Z),U(Ne,J))),e.ADD_TAGS&&(Ae===we&&(Ae=F(Ae)),U(Ae,e.ADD_TAGS,mt)),e.ADD_ATTR&&(Ne===_e&&(Ne=F(Ne)),U(Ne,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&U(Je,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Ke===$e&&(Ke=F(Ke)),U(Ke,e.FORBID_CONTENTS,mt)),Ye&&(Ae["#text"]=!0),Pe&&U(Ae,["html","head","body"]),Ae.table&&(U(Ae,["tbody"]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=e.TRUSTED_TYPES_POLICY,Q=H.createHTML("")}else void 0===H&&(H=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,i)),null!==H&&"string"==typeof Q&&(Q=H.createHTML(""));y&&y(e),dt=e}},yt=U({},[...W,...G,...Y]),bt=U({},[...q,...X]),Tt=function(e){w(n.removed,{element:e});try{P(e).removeChild(e)}catch(t){E(e)}},Et=function(e,t){try{w(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){w(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},vt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=R(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&rt===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=H?H.createHTML(e):e;if(rt===nt)try{t=(new f).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===nt?re.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},xt=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof c&&e instanceof c};function wt(e,t,r){S(e,e=>{e.call(n,t,r,dt)})}const Nt=function(e){let t=null;if(wt(ae.beforeSanitizeElements,e,null),xt(e))return Tt(e),!0;const r=mt(e.nodeName);if(wt(ae.uponSanitizeElement,e,{tagName:r,allowedTags:Ae}),ze&&e.hasChildNodes()&&!At(e.firstElementChild)&&I(/<[/\w!]/g,e.innerHTML)&&I(/<[/\w!]/g,e.textContent))return Tt(e),!0;if(e.nodeType===me)return Tt(e),!0;if(ze&&e.nodeType===de&&I(/<[/\w]/g,e.data))return Tt(e),!0;if(!Ae[r]||Re[r]){if(!Re[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ye&&!Ke[r]){const t=P(e)||e.parentNode,n=z(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=b(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,v(e))}}}return Tt(e),!0}return e instanceof s&&!function(e){let t=P(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=_(e.tagName),r=_(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[r]:Boolean(bt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[r])&&!(t.namespaceURI===et&&!lt[r])&&!bt[n]&&(st[n]||!yt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!I(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===pe&&(t=e.textContent,S([ce,ge,ye],e=>{t=k(t,e," ")}),e.textContent!==t&&(w(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ae.afterSanitizeElements,e,null),!1):(Tt(e),!0)},_t=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Le&&!ke[t]&&I(be,t));else if(Oe&&I(Te,t));else if(!Ne[t]||ke[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&I(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Je[t]);else if(I(xe,k(n,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!Ve[e]){if(De&&!I(Ee,k(n,ve,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&R(e,Se)},Rt=function(e){wt(ae.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||xt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:c}=i,s=mt(a),u=c;let p="value"===a?u:L(u);if(r.attrName=s,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ae.uponSanitizeAttribute,e,r),p=r.attrValue,!Ge||"id"!==s&&"name"!==s||(Et(a,e),p="user-content-"+p),ze&&I(/((--!?|])>)|<\/(style|title)/i,p)){Et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Et(a,e);continue}if(!Ie&&I(/\/>/i,p)){Et(a,e);continue}Me&&S([ce,ge,ye],e=>{p=k(p,e," ")});const m=mt(e.nodeName);if(_t(m,s,p)){if(H&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(m,s)){case"TrustedHTML":p=H.createHTML(p);break;case"TrustedScriptURL":p=H.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),xt(e)?Tt(e):A(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}wt(ae.afterSanitizeAttributes,e,null)},kt=function e(t){let n=null;const r=St(t);for(wt(ae.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ae.uponSanitizeShadowNode,n,null),Nt(n),Rt(n),n.content instanceof a&&e(n.content);wt(ae.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,s=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw M("toString is not a function");if("string"!=typeof(e=e.toString()))throw M("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||gt(t),n.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=mt(e.nodeName);if(!Ae[t]||Re[t])throw M("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=vt("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ue&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Fe&&!Me&&!Pe&&-1===e.indexOf("<"))return H&&Be?H.createHTML(e):e;if(r=vt(e),!r)return Fe?null:Be?Q:""}r&&He&&Tt(r.firstChild);const u=St(qe?e:r);for(;l=u.nextNode();)Nt(l),Rt(l),l.content instanceof a&&kt(l.content);if(qe)return e;if(Fe){if(je)for(s=ne.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Ne.shadowroot||Ne.shadowrootmode)&&(s=ie.call(o,s,!0)),s}let p=Pe?r.outerHTML:r.innerHTML;return Pe&&Ae["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&I(le,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Me&&S([ce,ge,ye],e=>{p=k(p,e," ")}),H&&Be?H.createHTML(p):p},n.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||gt({});const r=mt(e),o=mt(t);return _t(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&w(ae[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=x(ae[e],t);return-1===n?void 0:N(ae[e],n,1)[0]}return A(ae[e])},n.removeHooks=function(e){ae[e]=[]},n.removeAllHooks=function(){ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();var ye=function(e){var t=document.createElement("div");t.innerHTML=e;var n=function(e){if(e.hasAttribute("style")){var t=e.getAttribute("style");if(t){var r=t.split(";").map(function(e){return e.trim()}).filter(function(e){return!/^font-(size|family)\s*:/i.test(e)}).join("; ");""===r.trim()?e.removeAttribute("style"):e.setAttribute("style",r)}}e.hasAttribute("font-size")&&e.removeAttribute("font-size"),e.hasAttribute("font-family")&&e.removeAttribute("font-family"),Array.from(e.children).forEach(function(e){return n(e)})};return Array.from(t.children).forEach(function(e){return n(e)}),t.innerHTML},be=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(ye(function(e){var t=new RegExp('style="([^"]*?)color\\s*:\\s*('.concat(["activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext"].join("|"),');?\\s*([^"]*?)"'),"gi");return e.replace(t,function(e,t,n,r){var o=[t,r].filter(Boolean).join("; ").trim();return o?'style="'.concat(o,'"'):""})}(e)))},Te=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","-","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],Ee=function(e){var t=e.visible,n=e.onSelect,r=e.onClose,o=p(c(null),2),i=o[0],a=o[1];if(!t)return null;return l.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},l.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},l.createElement("h2",{id:"special-char-modal-title"},"Special Characters"),l.createElement("div",{className:"special-char-btn-container"},Te.map(function(e){return l.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return a(e)},className:"special-char-btn ".concat(i===e?"selected":""),title:"Select ".concat(e)},e)})),l.createElement("div",{className:"special-char-btn-footer"},l.createElement("button",{onClick:function(){i&&(n(i),a(null))},type:"button",className:"special-char-insert-btn",disabled:!i},"Insert"),l.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Cancel")),l.createElement("div",{className:"clearfix"})))};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n width: 100%;\n max-width: 634px;\n max-height: 480px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n font-family: monospace;\n white-space: pre;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-btn-footer {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n\n.special-char-cancel-btn,\n.special-char-insert-btn {\n margin-top: 16px;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-insert-btn:hover,\n.special-char-cancel-btn:hover,\n.special-char-insert-btn:focus,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}');var ve={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|",{tooltipText:"Insert Symbol",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">Ω</span></button>'},"|","ClearFormat","|"]},Se={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},xe=function(l){var c=l.autoSanitize,m=void 0===c||c;l.testId;var d=l.toolbarSettings,f=void 0===d?ve:d,h=l.quickToolbarSettings,g=void 0===h?Se:h,y=l.height,b=void 0===y?450:y,T=l.enableTabKey,E=void 0===T||T,v=l.enableHtmlSanitizer,S=void 0===v||v,x=l.change,A=l.value,w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(l,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),N=a.useRef(null),_=p(a.useState(!1),2),C=_[0],R=_[1],k=a.useRef(null),O=a.useMemo(function(){return"function"==typeof f?f(ve):f},[f]),L=s(function(e){var t=m?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(ye(ge.sanitize(e))))}(e.value):e.value;null==x||x(u(u({},e),{value:t}))},[m,x]);a.useEffect(function(){var e=document.getElementById("insert-symbol-btn");return e&&e.addEventListener("click",function(){var e=window.getSelection();e&&e.rangeCount>0&&(k.current=e.getRangeAt(0)),R(!0)}),function(){e&&e.removeEventListener("click",function(){})}},[]);var D=m&&A?be(A):A;return a.createElement(a.Fragment,null,a.createElement(e,u({locale:"az",ref:N,tabIndex:0,height:b,enableTabKey:E,toolbarSettings:O,quickToolbarSettings:g,enableHtmlSanitizer:S,change:L,onPaste:function(e){var t,n,r=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(r){var o=be(r);null==x||x({value:o}),null===(n=e.preventDefault)||void 0===n||n.call(e);var i=N.current;i&&i.executeCommand("insertHTML",o)}},value:D},w),a.createElement(t,{services:[n,r,o,i]}),a.createElement(Ee,{visible:C,onSelect:function(e){R(!1);var t=N.current;if(t&&k.current){var n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(k.current),t.executeCommand("insertText",e)}},onClose:function(){return R(!1)}})))};export{xe as Richtext};
|
|
3
|
+
const{entries:x,setPrototypeOf:T,isFrozen:w,getPrototypeOf:S,getOwnPropertyDescriptor:E}=Object;let{freeze:A,seal:D,create:C}=Object,{apply:L,construct:N}="undefined"!=typeof Reflect&&Reflect;A||(A=function(e){return e}),D||(D=function(e){return e}),L||(L=function(e,t,n){return e.apply(t,n)}),N||(N=function(e,t){return new e(...t)});const I=V(Array.prototype.forEach),_=V(Array.prototype.lastIndexOf),R=V(Array.prototype.pop),M=V(Array.prototype.push),O=V(Array.prototype.splice),z=V(String.prototype.toLowerCase),H=V(String.prototype.toString),U=V(String.prototype.match),F=V(String.prototype.replace),B=V(String.prototype.indexOf),P=V(String.prototype.trim),j=V(Object.prototype.hasOwnProperty),q=V(RegExp.prototype.test),W=(G=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(G,t)});var G;function V(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return L(e,t,i)}}function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;T&&T(e,null);let i=t.length;for(;i--;){let a=t[i];if("string"==typeof a){const e=n(a);e!==a&&(w(t)||(t[i]=e),a=e)}e[a]=!0}return e}function K(e){for(let t=0;t<e.length;t++){j(e,t)||(e[t]=null)}return e}function X(e){const t=C(null);for(const[n,i]of x(e)){j(e,n)&&(Array.isArray(i)?t[n]=K(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=X(i):t[n]=i)}return t}function $(e,t){for(;null!==e;){const n=E(e,t);if(n){if(n.get)return V(n.get);if("function"==typeof n.value)return V(n.value)}e=S(e)}return function(){return null}}const Q=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Z=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),J=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ee=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),te=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ne=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ie=A(["#text"]),ae=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),re=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),oe=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),se=D(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ce=D(/<%[\w\W]*|[\w\W]*%>/gm),de=D(/\$\{[\w\W]*/gm),me=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),ue=D(/^aria-[\-\w]+$/),pe=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fe=D(/^(?:\w+script|data):/i),he=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),be=D(/^html$/i),ge=D(/^[a-z][.\w]*(-[.\w]+)+$/i);var ye=Object.freeze({__proto__:null,ARIA_ATTR:ue,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:ge,DATA_ATTR:me,DOCTYPE_NAME:be,ERB_EXPR:ce,IS_ALLOWED_URI:pe,IS_SCRIPT_OR_DATA:fe,MUSTACHE_EXPR:se,TMPLIT_EXPR:de});const ve=1,ke=3,xe=7,Te=8,we=9,Se=function(){return"undefined"==typeof window?null:window};var Ee=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Se();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==we||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const a=i,r=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:s,Element:c,NodeFilter:d,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:p,trustedTypes:f}=t,h=c.prototype,b=$(h,"cloneNode"),g=$(h,"remove"),y=$(h,"nextSibling"),v=$(h,"childNodes"),k=$(h,"parentNode");if("function"==typeof l){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let T,w="";const{implementation:S,createNodeIterator:E,createDocumentFragment:D,getElementsByTagName:L}=i,{importNode:N}=a;let G={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof x&&"function"==typeof k&&S&&void 0!==S.createHTMLDocument;const{MUSTACHE_EXPR:V,ERB_EXPR:K,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:ue,CUSTOM_ELEMENT:fe}=ye;let{IS_ALLOWED_URI:he}=ye,ge=null;const Ee=Y({},[...Q,...Z,...J,...te,...ie]);let Ae=null;const De=Y({},[...ae,...re,...oe,...le]);let Ce=Object.seal(C(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Ne=null,Ie=!0,_e=!0,Re=!1,Me=!0,Oe=!1,ze=!0,He=!1,Ue=!1,Fe=!1,Be=!1,Pe=!1,je=!1,qe=!0,We=!1,Ge=!0,Ve=!1,Ye={},Ke=null;const Xe=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Qe=Y({},["audio","video","img","source","image","track"]);let Ze=null;const Je=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let it=nt,at=!1,rt=null;const ot=Y({},[et,tt,nt],H);let lt=Y({},["mi","mo","mn","ms","mtext"]),st=Y({},["annotation-xml"]);const ct=Y({},["title","style","font","a","script"]);let dt=null;const mt=["application/xhtml+xml","text/html"];let ut=null,pt=null;const ft=i.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=X(e),dt=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===dt?H:z,ge=j(e,"ALLOWED_TAGS")?Y({},e.ALLOWED_TAGS,ut):Ee,Ae=j(e,"ALLOWED_ATTR")?Y({},e.ALLOWED_ATTR,ut):De,rt=j(e,"ALLOWED_NAMESPACES")?Y({},e.ALLOWED_NAMESPACES,H):ot,Ze=j(e,"ADD_URI_SAFE_ATTR")?Y(X(Je),e.ADD_URI_SAFE_ATTR,ut):Je,$e=j(e,"ADD_DATA_URI_TAGS")?Y(X(Qe),e.ADD_DATA_URI_TAGS,ut):Qe,Ke=j(e,"FORBID_CONTENTS")?Y({},e.FORBID_CONTENTS,ut):Xe,Le=j(e,"FORBID_TAGS")?Y({},e.FORBID_TAGS,ut):X({}),Ne=j(e,"FORBID_ATTR")?Y({},e.FORBID_ATTR,ut):X({}),Ye=!!j(e,"USE_PROFILES")&&e.USE_PROFILES,Ie=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,Re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,He=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,je=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,qe=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ve=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||pe,it=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(_e=!1),Pe&&(Be=!0),Ye&&(ge=Y({},ie),Ae=[],!0===Ye.html&&(Y(ge,Q),Y(Ae,ae)),!0===Ye.svg&&(Y(ge,Z),Y(Ae,re),Y(Ae,le)),!0===Ye.svgFilters&&(Y(ge,J),Y(Ae,re),Y(Ae,le)),!0===Ye.mathMl&&(Y(ge,te),Y(Ae,oe),Y(Ae,le))),e.ADD_TAGS&&(ge===Ee&&(ge=X(ge)),Y(ge,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ae===De&&(Ae=X(Ae)),Y(Ae,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&Y(Ze,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Ke===Xe&&(Ke=X(Ke)),Y(Ke,e.FORBID_CONTENTS,ut)),Ge&&(ge["#text"]=!0),He&&Y(ge,["html","head","body"]),ge.table&&(Y(ge,["tbody"]),delete Le.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw W('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,w=T.createHTML("")}else void 0===T&&(T=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(f,r)),null!==T&&"string"==typeof w&&(w=T.createHTML(""));A&&A(e),pt=e}},gt=Y({},[...Z,...J,...ee]),yt=Y({},[...te,...ne]),vt=function(e){M(n.removed,{element:e});try{k(e).removeChild(e)}catch(t){g(e)}},kt=function(e,t){try{M(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){M(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Pe)try{vt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},xt=function(e){let t=null,n=null;if(Fe)e="<remove></remove>"+e;else{const t=U(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===dt&&it===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=T?T.createHTML(e):e;if(it===nt)try{t=(new p).parseFromString(a,dt)}catch(e){}if(!t||!t.documentElement){t=S.createDocument(it,"template",null);try{t.documentElement.innerHTML=at?w:a}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(i.createTextNode(n),r.childNodes[0]||null),it===nt?L.call(t,He?"html":"body")[0]:He?t.documentElement:r},Tt=function(e){return E.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof u&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof s&&e instanceof s};function Et(e,t,i){I(e,e=>{e.call(n,t,i,pt)})}const At=function(e){let t=null;if(Et(G.beforeSanitizeElements,e,null),wt(e))return vt(e),!0;const i=ut(e.nodeName);if(Et(G.uponSanitizeElement,e,{tagName:i,allowedTags:ge}),ze&&e.hasChildNodes()&&!St(e.firstElementChild)&&q(/<[/\w!]/g,e.innerHTML)&&q(/<[/\w!]/g,e.textContent))return vt(e),!0;if(e.nodeType===xe)return vt(e),!0;if(ze&&e.nodeType===Te&&q(/<[/\w]/g,e.data))return vt(e),!0;if(!ge[i]||Le[i]){if(!Le[i]&&Ct(i)){if(Ce.tagNameCheck instanceof RegExp&&q(Ce.tagNameCheck,i))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(i))return!1}if(Ge&&!Ke[i]){const t=k(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const a=b(n[i],!0);a.__removalCount=(e.__removalCount||0)+1,t.insertBefore(a,y(e))}}}return vt(e),!0}return e instanceof c&&!function(e){let t=k(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});const n=z(e.tagName),i=z(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===i||lt[i]):Boolean(gt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&st[i]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!st[i])&&!(t.namespaceURI===et&&!lt[i])&&!yt[n]&&(ct[n]||!gt[n]):!("application/xhtml+xml"!==dt||!rt[e.namespaceURI]))}(e)?(vt(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!q(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&e.nodeType===ke&&(t=e.textContent,I([V,K,se],e=>{t=F(t,e," ")}),e.textContent!==t&&(M(n.removed,{element:e.cloneNode()}),e.textContent=t)),Et(G.afterSanitizeElements,e,null),!1):(vt(e),!0)},Dt=function(e,t,n){if(qe&&("id"===t||"name"===t)&&(n in i||n in ft))return!1;if(_e&&!Ne[t]&&q(ce,t));else if(Ie&&q(de,t));else if(!Ae[t]||Ne[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&q(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&q(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&q(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Ze[t]);else if(q(he,F(n,ue,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==B(n,"data:")||!$e[e]){if(Re&&!q(me,F(n,ue,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&U(e,fe)},Lt=function(e){Et(G.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||wt(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let a=t.length;for(;a--;){const r=t[a],{name:o,namespaceURI:l,value:s}=r,c=ut(o),d=s;let m="value"===o?d:P(d);if(i.attrName=c,i.attrValue=m,i.keepAttr=!0,i.forceKeepAttr=void 0,Et(G.uponSanitizeAttribute,e,i),m=i.attrValue,!We||"id"!==c&&"name"!==c||(kt(o,e),m="user-content-"+m),ze&&q(/((--!?|])>)|<\/(style|title)/i,m)){kt(o,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){kt(o,e);continue}if(!Me&&q(/\/>/i,m)){kt(o,e);continue}Oe&&I([V,K,se],e=>{m=F(m,e," ")});const u=ut(e.nodeName);if(Dt(u,c,m)){if(T&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(l);else switch(f.getAttributeType(u,c)){case"TrustedHTML":m=T.createHTML(m);break;case"TrustedScriptURL":m=T.createScriptURL(m)}if(m!==d)try{l?e.setAttributeNS(l,o,m):e.setAttribute(o,m),wt(e)?vt(e):R(n.removed)}catch(t){kt(o,e)}}else kt(o,e)}Et(G.afterSanitizeAttributes,e,null)},Nt=function e(t){let n=null;const i=Tt(t);for(Et(G.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Et(G.uponSanitizeShadowNode,n,null),At(n),Lt(n),n.content instanceof o&&e(n.content);Et(G.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,r=null,l=null,c=null;if(at=!e,at&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw W("toString is not a function");if("string"!=typeof(e=e.toString()))throw W("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||bt(t),n.removed=[],"string"==typeof e&&(Ve=!1),Ve){if(e.nodeName){const t=ut(e.nodeName);if(!ge[t]||Le[t])throw W("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)i=xt("\x3c!----\x3e"),r=i.ownerDocument.importNode(e,!0),r.nodeType===ve&&"BODY"===r.nodeName||"HTML"===r.nodeName?i=r:i.appendChild(r);else{if(!Be&&!Oe&&!He&&-1===e.indexOf("<"))return T&&je?T.createHTML(e):e;if(i=xt(e),!i)return Be?null:je?w:""}i&&Fe&&vt(i.firstChild);const d=Tt(Ve?e:i);for(;l=d.nextNode();)At(l),Lt(l),l.content instanceof o&&Nt(l.content);if(Ve)return e;if(Be){if(Pe)for(c=D.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(Ae.shadowroot||Ae.shadowrootmode)&&(c=N.call(a,c,!0)),c}let m=He?i.outerHTML:i.innerHTML;return He&&ge["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&q(be,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Oe&&I([V,K,se],e=>{m=F(m,e," ")}),T&&je?T.createHTML(m):m},n.setConfig=function(){bt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){pt=null,Ue=!1},n.isValidAttribute=function(e,t,n){pt||bt({});const i=ut(e),a=ut(t);return Dt(i,a,n)},n.addHook=function(e,t){"function"==typeof t&&M(G[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=_(G[e],t);return-1===n?void 0:O(G[e],n,1)[0]}return R(G[e])},n.removeHooks=function(e){G[e]=[]},n.removeAllHooks=function(){G={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();var Ae=function(e){var t=document.createElement("div");t.innerHTML=e;var n=function(e){if(e.hasAttribute("style")){var t=e.getAttribute("style");if(t){var i=t.split(";").map(function(e){return e.trim()}).filter(function(e){return!/^font-(size|family)\s*:/i.test(e)}).join("; ");""===i.trim()?e.removeAttribute("style"):e.setAttribute("style",i)}}e.hasAttribute("font-size")&&e.removeAttribute("font-size"),e.hasAttribute("font-family")&&e.removeAttribute("font-family"),Array.from(e.children).forEach(function(e){return n(e)})};return Array.from(t.children).forEach(function(e){return n(e)}),t.innerHTML},De=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(Ae(function(e){var t=new RegExp('style="([^"]*?)color\\s*:\\s*('.concat(["activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext"].join("|"),');?\\s*([^"]*?)"'),"gi");return e.replace(t,function(e,t,n,i){var a=[t,i].filter(Boolean).join("; ").trim();return a?'style="'.concat(a,'"'):""})}(function(e){var t=window.location.origin;return e.replace(/<a[^>]*>([0-9]{16})<\/a>/g,"$1").replace(/(?<!href="[^"]*\/redirect-to-doc\?id=)(?<![0-9])([0-9]{16})(?![0-9])(?!(<\/a>))/g,'<a href="'.concat(t,'/member/documents/redirect-to-doc?id=$1" target="_blank">$1</a>'))}(e))))},Ce=function(){var e=window.getSelection();if(!e||0===e.rangeCount)return null;var t=e.getRangeAt(0),n=null,i=t.commonAncestorContainer;for(i.nodeType===Node.TEXT_NODE&&(i=i.parentNode);i&&i!==document.body;){if("A"===i.nodeName){n=i;break}i=i.parentNode}if(!n&&t.startContainer===t.endContainer){var a=t.cloneContents().querySelector("a");a&&(n=a)}return n?{href:n.href||"",text:n.textContent||"",target:"_blank"===n.target,element:n}:null},Le=function(e){if(!e)return!1;var t=window.getSelection();return null==t||t.removeAllRanges(),null==t||t.addRange(e),!0},Ne=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","-","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],Ie=function(e){var i=e.visible,a=e.onSelect,r=e.onClose,o=h(n(null),2),l=o[0],s=o[1];if(!i)return null;return t.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},t.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},t.createElement("h2",{id:"special-char-modal-title"},"Xüsusi Simvollar"),t.createElement("div",{className:"special-char-btn-container"},Ne.map(function(e){return t.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return s(e)},className:"special-char-btn ".concat(l===e?"selected":""),title:"Select ".concat(e)},e)})),t.createElement("div",{className:"special-char-btn-footer"},t.createElement("button",{onClick:function(){l&&(a(l),s(null))},type:"button",className:"special-char-insert-btn",disabled:!l},"Əlavə et"),t.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Ləğv et")),t.createElement("div",{className:"clearfix"})))};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n width: 100%;\n max-width: 634px;\n max-height: 480px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n font-family: monospace;\n white-space: pre;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-btn-footer {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n\n.special-char-cancel-btn,\n.special-char-insert-btn {\n margin-top: 16px;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-insert-btn:hover,\n.special-char-cancel-btn:hover,\n.special-char-insert-btn:focus,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}\n\n.link-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.link-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n min-width: 400px;\n max-width: 90vw;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.link-modal h2 {\n margin-bottom: 20px;\n margin-top: 0;\n font-size: 18px;\n color: #333;\n}\n\n.link-modal-form {\n margin-bottom: 20px;\n}\n\n.link-modal-field {\n margin-bottom: 16px;\n}\n\n.link-modal-field label {\n display: block;\n margin-bottom: 6px;\n font-weight: 500;\n color: #333;\n font-size: 14px;\n}\n\n.link-modal-field input[type=url],\n.link-modal-field input[type=text] {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 14px;\n transition: border-color 0.15s ease;\n box-sizing: border-box;\n}\n\n.link-modal-field input[type=url]:focus,\n.link-modal-field input[type=text]:focus {\n outline: none;\n border-color: #007acc;\n box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);\n}\n\n.link-modal-checkbox {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 16px;\n}\n\n.link-modal-checkbox input[type=checkbox] {\n margin: 0;\n}\n\n.link-modal-checkbox label {\n margin: 0;\n font-size: 14px;\n color: #333;\n cursor: pointer;\n user-select: none;\n}\n\n.link-modal-buttons {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n}\n\n.link-modal-btn {\n padding: 8px 16px;\n border: none;\n border-radius: 4px;\n font-size: 14px;\n cursor: pointer;\n transition: background-color 0.15s ease;\n}\n\n.link-modal-cancel-btn {\n background-color: #f5f5f5;\n color: #333;\n}\n\n.link-modal-cancel-btn:hover {\n background-color: #e9e9e9;\n}\n\n.link-modal-confirm-btn {\n background-color: #007acc;\n color: white;\n}\n\n.link-modal-confirm-btn:hover:not(:disabled) {\n background-color: #005a9e;\n}\n\n.link-modal-confirm-btn:disabled {\n background-color: #ccc;\n cursor: not-allowed;\n}');var _e=function(e,t,n,i){if(!t||0===Object.keys(n).length)return e;var a=function(e,t){var n=Object.keys(e).map(function(e){return'<option value="'.concat(e,'">').concat(e,"</option>")}).join("");return{template:'\n <select \n class="e-rte-dropdown e-control e-lib e-rte-elements template-dropdown" \n style="\n width: 140px;\n margin: 2px;\n padding: 6px 10px;\n border-radius: 6px;\n border: 1px solid #d1d5db;\n background: #f9fafb;\n font-size: 15px;\n color: #222;\n transition: border-color 0.2s, box-shadow 0.2s;\n "\n onfocus="this.style.borderColor=\'#6366f1\';this.style.boxShadow=\'0 0 0 2px #6366f133\'"\n onblur="this.style.borderColor=\'#d1d5db\';this.style.boxShadow=\'none\'"\n onmouseover="this.style.background=\'#f3f4f6\'"\n onmouseout="this.style.background=\'#f9fafb\'"\n >\n <option value="">'.concat(t,"</option>\n ").concat(n,"\n </select>\n "),tooltipText:"Insert Template"}}(n,i);return f(f({},e),{items:b(b([],h((null==e?void 0:e.items)||[]),!1),[a],!1)})};p.load({az:{richtexteditor:{alignments:"Hizalamalar",justifyLeft:"Sola hizala",justifyCenter:"Mərkəzə hizala",justifyRight:"Sağa hizala",justifyFull:"Hər iki tərəfə hizala",fontName:"Şrift adı",fontSize:"Şrift ölçüsü",fontColor:"Şrift rəngi",backgroundColor:"Arxa fon rəngi",importWord:"Word-dən idxal et",exportWord:"Word-ə ixrac et",exportPdf:"PDF-ə ixrac et",bold:"Qalın",italic:"Kursiv",underline:"Alt xətt",strikethrough:"Üstündən xətt",clearFormat:"Formatı təmizlə",clearAll:"Hamısını təmizlə",cut:"Kəs",copy:"Kopyala",paste:"Yapışdır",unorderedList:"Sırasız siyahı",orderedList:"Sıralı siyahı",indent:"Girintini artır",outdent:"Girintini azalt",undo:"Geri al",redo:"Təkrar et",superscript:"Yuxarı indeks",subscript:"Aşağı indeks",uppercase:"Böyük hərflər",lowercase:"Kiçik hərflər",createLink:"Link əlavə et",openLink:"Linki aç",editLink:"Linki redaktə et",removeLink:"Linki sil",image:"Şəkil əlavə et",audio:"Səs əlavə et",video:"Video əlavə et",replace:"Əvəz et",numberFormatList:"Nömrə formatlı siyahı",bulletFormatList:"Maddə işarəli siyahı",audioReplace:"Səsi əvəz et",videoReplace:"Videonu əvəz et",videoAlign:"Video hizalaması",videoDimension:"Video ölçüsü",audioRemove:"Səsi sil",videoRemove:"Videonu sil",audioLayoutOption:"Səs düzəni seçimi",videoLayoutOption:"Video düzəni seçimi",align:"Hizala",caption:"Başlıq",remove:"Sil",insertLink:"Link əlavə et",display:"Göstəriləcək mətn",altText:"Alternativ mətn",dimension:"Ölçüləri dəyiş",fullscreen:"Tam ekran",maximize:"Böyüt",minimize:"Kiçilt",lowerCase:"Kiçik hərflər",upperCase:"Böyük hərflər",print:"Çap et",formats:"Formatlar",sourcecode:"Mənbə kodu",preview:"Ön izləmə",viewside:"Yan görünüş",insertCode:"Kod əlavə et",blockquote:"Blok sitat",linkText:"Göstəriləcək mətn",linkTooltipLabel:"İpucu",linkWebUrl:"Veb ünvanı",linkTitle:"Başlıq daxil et",linkurl:"https://misal.com",linkOpenInNewWindow:"Linki yeni pəncərədə aç",linkHeader:"Link əlavə et",dialogInsert:"Əlavə et",dialogCancel:"Ləğv et",dialogUpdate:"Yenilə",imageHeader:"Şəkil əlavə et",audioHeader:"Səs əlavə et",videoHeader:"Video əlavə et",imageLinkHeader:"Vebdən şəkil linki daxil edə bilərsiniz",audioLinkHeader:"Vebdən səs linki daxil edə bilərsiniz",videoLinkHeader:"Veb URL",embedVideoLinkHeader:"Media daxil etmə URL-i",mdimageLink:"Şəkil üçün URL daxil edin",imageUploadMessage:"Şəkli buraya atın və ya yükləmək üçün bura klikləyin",audioUploadMessage:"Səs faylını buraya atın və ya yükləmək üçün bura klikləyin",videoUploadMessage:"Video faylını buraya atın və ya yükləmək üçün bura klikləyin",imageDeviceUploadMessage:"Yükləmək üçün bura klikləyin",audioDeviceUploadMessage:"Yükləmək üçün bura klikləyin",videoDeviceUploadMessage:"Yükləmək üçün bura klikləyin",imageAlternateText:"Alternativ mətn",alternateHeader:"Alternativ mətn",browse:"Axtar",imageUrl:"https://misal.com/seKil.png",audioUrl:"https://misal.com/ses.mp3",videoUrl:"https://misal.com/video.mp4",webUrl:"Veb URL",embedUrl:"Daxil etmə kodu",imageCaption:"Şəkil başlığı",imageSizeHeader:"Şəkil ölçüsü",videoSizeHeader:"Video ölçüsü",imageHeight:"Hündürlük",imageWidth:"En",videoHeight:"Hündürlük",videoWidth:"En",textPlaceholder:"Mətn daxil edin",inserttablebtn:"Cədvəl əlavə et",tabledialogHeader:"Cədvəl əlavə et",tableWidth:"Cədvəl eni",cellpadding:"Xana dolgusu",cellspacing:"Xana boşluğu",columns:"Sütun sayı",rows:"Sətir sayı",tableRows:"Sətirlər",tableColumns:"Sütunlar",tableCellHorizontalAlign:"Xana üfüqi hizalaması",tableCellVerticalAlign:"Şaquli hizalanma",createTable:"Cədvəl yarat",removeTable:"Cədvəli sil",tableHeader:"Başlıq sətri",tableRemove:"Cədvəli sil",tableCellBackground:"Xana arxa fonu",tableEditProperties:"Cədvəl xüsusiyyətlərini redaktə et",styles:"Stillər",insertColumnLeft:"Sola sütun əlavə et",insertColumnRight:"Sağa sütun əlavə et",deleteColumn:"Sütunu sil",insertRowBefore:"Yuxarıya sətir əlavə et",insertRowAfter:"Aşağıya sətir əlavə et",deleteRow:"Sətiri sil",tableEditHeader:"Cədvəli redaktə et",TableHeadingText:"Başlıq",TableColText:"Sütun",imageInsertLinkHeader:"Link əlavə et",editImageHeader:"Şəkili redaktə et",editAudioHeader:"Səsi redaktə et",editVideoHeader:"Videonu redaktə et",alignmentsDropDownLeft:"Sola hizala",alignmentsDropDownCenter:"Mərkəzə hizala",alignmentsDropDownRight:"Sağa hizala",alignmentsDropDownJustify:"Hər iki tərəfə hizala",imageDisplayDropDownInline:"Sətir içi",imageDisplayDropDownBreak:"Sətir ayırıcı",audioLayoutOptionDropDownInline:"Sətir içi",audioLayoutOptionDropDownBreak:"Sətir ayırıcı",videoLayoutOptionDropDownInline:"Sətir içi",videoLayoutOptionDropDownBreak:"Sətir ayırıcı",tableInsertRowDropDownBefore:"Yuxarıya sətir əlavə et",tableInsertRowDropDownAfter:"Aşağıya sətir əlavə et",tableInsertRowDropDownDelete:"Sətiri sil",tableInsertColumnDropDownLeft:"Sola sütun əlavə et",tableInsertColumnDropDownRight:"Sağa sütun əlavə et",tableInsertColumnDropDownDelete:"Sütunu sil",tableVerticalAlignDropDownTop:"Yuxarı hizala",tableVerticalAlignDropDownMiddle:"Ortaya hizala",tableVerticalAlignDropDownBottom:"Aşağı hizala",tableStylesDropDownDashedBorder:"Nöqtəli sərhədlər",tableStylesDropDownAlternateRows:"Alternativ sətirlər",pasteFormat:"Formatı yapışdır",pasteFormatContent:"Formatlaşdırma hərəkətini seçin",plainText:"Sadə mətn",cleanFormat:"Təmizlə",keepFormat:"Formatı saxla",pasteDialogOk:"Tamam",pasteDialogCancel:"Ləğv et",fileManager:"Fayl meneceri",fileDialogHeader:"Fayl axtarışı",formatsDropDownParagraph:"Abzas",formatsDropDownCode:"Önformatlaşdırılmış",formatsDropDownQuotation:"Blok sitat",formatsDropDownHeading1:"Başlıq 1",formatsDropDownHeading2:"Başlıq 2",formatsDropDownHeading3:"Başlıq 3",formatsDropDownHeading4:"Başlıq 4",fontNameSegoeUI:"Segoe UI",fontNameArial:"Arial",fontNameGeorgia:"Georgia",fontNameImpact:"Impact",fontNameTahoma:"Tahoma",fontNameTimesNewRoman:"Times New Roman",fontNameVerdana:"Verdana",numberFormatListNumber:"Nömrə",numberFormatListLowerAlpha:"Kiçik alfa",numberFormatListUpperAlpha:"Böyük alfa",numberFormatListLowerRoman:"Kiçik roma",numberFormatListUpperRoman:"Böyük roma",numberFormatListLowerGreek:"Kiçik yunan",bulletFormatListDisc:"Disk",bulletFormatListCircle:"Dairə",bulletFormatListSquare:"Kvadrat",numberFormatListNone:"Heç biri",bulletFormatListNone:"Heç biri",formatPainter:"Format rəssamı",emojiPicker:"Emoji seçici",embeddedCode:"Daxil edilmiş kod",pasteEmbeddedCodeHere:"Daxil edilmiş kodu buraya yapışdırın",emojiPickerTypeToFind:"Tapmaq üçün yazın",emojiPickerNoResultFound:"Nəticə tapılmadı",emojiPickerTrySomethingElse:"Başqa bir şey sınayın",linkAriaLabel:"Yeni pəncərədə aç",imageLinkAriaLabel:"Yeni pəncərədə aç",unsupportedImage:"Dəstəklənməyən fayl formatı",mergecells:"Xanaları birləşdir",verticalsplit:"Şaquli bölünmə",horizontalsplit:"Üfüqi bölünmə",inlinecode:"Daxili kod",slashMenuItemHeadingOneText:"Başlıq 1",slashMenuItemHeadingOneDescription:"Əsas başlıq və ya titul üçün istifadə edin",slashMenuItemHeadingTwoText:"Başlıq 2",slashMenuItemHeadingTwoDescription:"Əsas bölmələr üçün istifadə edin",slashMenuItemHeadingThreeText:"Başlıq 3",slashMenuItemHeadingThreeDescription:"Alt bölmələr və qrup başlıqları üçün istifadə edin",slashMenuItemHeadingFourText:"Başlıq 4",slashMenuItemHeadingFourDescription:"Alt mövzuların əsas nöqtələri üçün istifadə edin",slashMenuItemParagraphText:"Abzas",slashMenuItemParagraphDescription:"Abzaslarla yazı",slashMenuItemBlockquoteText:"Blok sitat",slashMenuItemBlockquoteDescription:"Sitat və ya istinad yaradın",slashMenuItemOrderedListText:"Sıralı siyahı",slashMenuItemOrderedListDescription:"Sıralı siyahı yaradın",slashMenuItemUnorderedListText:"Sırasız siyahı",slashMenuItemUnorderedListDescription:"Sırasız siyahı yaradın",slashMenuItemCodeText:"Kod bloku",slashMenuItemCodeDescription:"Önformatlaşdırılmış kod bloku yaradın",slashMenuItemTableText:"Cədvəl",slashMenuItemTableDescription:"Cədvəl əlavə et",slashMenuItemLinkText:"Link",slashMenuItemLinkDescription:"Link əlavə et",slashMenuItemImageText:"Şəkil",slashMenuItemImageDescription:"Şəkil əlavə et",slashMenuItemAudioText:"Səs",slashMenuItemAudioDescription:"Səs əlavə et",slashMenuItemVideoText:"Video",slashMenuItemVideoDescription:"Video əlavə et",slashMenuItemEmojiText:"Emoji seçici",slashMenuItemEmojiDescription:"Fikirləri və emosiyaları ifadə etmək üçün emojilərdən istifadə edin",preferredWidth:"İstənilən en",points:"Nöqtələr",percent:"Faiz",cellMargins:"Xana kənarları",defaultCellMargins:"Standart xana kənarları",allowSpacingBetweenCells:"Xanalar arasında boşluğa icazə ver",sameAsWholeTable:"Bütöv cədvəl kimi",borders:"Sərhədlər",none:"Heç biri",box:"Qutu",all:"Hamısı",custom:"Xüsusi",outsideBorders:"Xarici sərhədlər",insideBorders:"Daxili sərhədlər",leftBorder:"Sol sərhəd",rightBorder:"Sağ sərhəd",topBorder:"Yuxarı sərhəd",bottomBorder:"Aşağı sərhəd",insideVerticalBorder:"Daxili şaquli sərhəd",insideHorizontalBorder:"Daxili üfüqi sərhəd",toolbarTooltip:{bold:"Qalın (Ctrl+B)",italic:"Kursiv (Ctrl+I)",underline:"Alt xətt (Ctrl+U)",strikethrough:"Üstündən xətt (Ctrl+Shift+K)",superscript:"Yuxarı indeks (Ctrl+Shift++)",subscript:"Aşağı indeks (Ctrl+=)",uppercase:"Böyük hərflərə çevir (Ctrl+Shift+U)",lowercase:"Kiçik hərflərə çevir (Ctrl+Shift+L)",fontColor:"Şrift rəngini seçin",backgroundColor:"Arxa fon rəngini seçin",fontName:"Şrift ailəsini seçin",fontSize:"Şrift ölçüsünü seçin",formats:"Mətn formatını seçin",alignments:"Mətn hizalamasını seçin",orderedList:"Sıralı siyahı əlavə et (Ctrl+Shift+O)",unorderedList:"Sırasız siyahı əlavə et (Ctrl+Alt+O)",indent:"Girintini artır (Ctrl+])",outdent:"Girintini azalt (Ctrl+[)",createLink:"Hiperlink əlavə et (Ctrl+K)",image:"Şəkil əlavə et",audio:"Səs əlavə et",video:"Video əlavə et",table:"Cədvəl əlavə et",createTable:"Cədvəl əlavə et",undo:"Son əməliyyatı geri al (Ctrl+Z)",redo:"Son əməliyyatı təkrar et (Ctrl+Y)",sourcecode:"Mənbə koduna keçid et",preview:"Ön izləməyə keçid et",maximize:"Redaktoru böyüt",minimize:"Redaktoru kiçilt",insertCode:"Kod əlavə et",formatPainter:"Format rəssamı",emojiPicker:"Emoji seçici"}}}});var Re=function(t){var p=t.autoSanitize,b=void 0===p||p;t.testId;var x=t.toolbarSettings,T=void 0===x?y:x,w=t.quickToolbarSettings,S=void 0===w?v:w,E=t.height,A=void 0===E?450:E,D=t.enableTabKey,C=void 0===D||D,L=t.enableHtmlSanitizer,N=void 0===L||L,I=t.enableTemplateDropdown,_=void 0!==I&&I,R=t.templateMap,M=void 0===R?{}:R,O=t.templateDropdownLabel,z=void 0===O?"Template":O,H=t.change,U=t.value,F=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}(t,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","enableTemplateDropdown","templateMap","templateDropdownLabel","change","value"]),B=r(null),P=r(null),j=h(n(!1),2),q=j[0],W=j[1],G=h(n(!1),2),V=G[0],Y=G[1],K=h(n(k),2),X=K[0],$=K[1],Q=o(function(){var e="function"==typeof T?T(y):T;return _e(e,_,M,z)},[T,_,M,z]),Z=a(function(e){var t=b?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(Ae(Ee.sanitize(e))))}(e.value):e.value;null==H||H(f(f({},e),{value:t}))},[b,H]),J=a(function(e){var t,n,i=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(i){var a=De(i);null==H||H({value:a}),null===(n=e.preventDefault)||void 0===n||n.call(e);var r=B.current;r&&r.executeCommand("insertHTML",a)}},[]);!function(e){var t=e.ref,n=e.lastSelectionRef,r=e.templateMap,o=e.setShowSymbolDialog,l=e.setShowLinkDialog,s=e.setLinkModalData,c=a(function(){var e=window.getSelection();e&&e.rangeCount>0&&(n.current=e.getRangeAt(0))},[n]),d=a(function(){c(),o(!0)},[c,o]),m=a(function(){c();var e=Ce();s(e?{initialLink:e.href,initialText:e.text,initialOpenInNewTab:e.target}:{initialLink:"",initialText:"",initialOpenInNewTab:!1}),l(!0)},[c,s,l]),u=a(function(e){var n=e.target,i=n.value;if(i&&r[i]){var a=t.current;a&&(a.executeCommand("insertText",r[i]),n.selectedIndex=0)}},[t,r]);i(function(){var e=document.getElementById("insert-symbol-btn"),t=document.getElementById("insert-link-btn"),n=document.querySelector(".template-dropdown");return null==e||e.addEventListener("click",d),null==t||t.addEventListener("click",m),null==n||n.addEventListener("change",u),function(){null==e||e.removeEventListener("click",d),null==t||t.removeEventListener("click",m),null==n||n.removeEventListener("change",u)}},[d,m,u])}({ref:B,lastSelectionRef:P,templateMap:M,setShowSymbolDialog:W,setShowLinkDialog:Y,setLinkModalData:$});var ee=function(e){var t=e.ref,n=e.lastSelectionRef,i=e.setShowSymbolDialog,r=e.setShowLinkDialog,o=a(function(e){i(!1);var a=t.current;a&&Le(n.current)&&a.executeCommand("insertText",e)},[t,n,i]),l=a(function(e,i,a){r(!1);var o=t.current;if(o&&Le(n.current)){var l=Ce();if(null==l?void 0:l.element)l.element.href=e,l.element.textContent=i,a?(l.element.target="_blank",l.element.rel="noopener noreferrer"):(l.element.removeAttribute("target"),l.element.removeAttribute("rel"));else{var s=a?' target="_blank" rel="noopener noreferrer"':"",c='<a href="'.concat(e,'"').concat(s,">").concat(i,"</a>");o.executeCommand("insertHTML",c)}}},[t,n,r]);return{insertSymbol:o,insertLink:l}}({ref:B,lastSelectionRef:P,setShowSymbolDialog:W,setShowLinkDialog:Y}),te=ee.insertSymbol,ne=ee.insertLink,ie=o(function(){return b&&U?De(U):U},[b,U]);return e.createElement(e.Fragment,null,e.createElement(l,f({locale:"az",ref:B,tabIndex:0,height:A,enableTabKey:C,toolbarSettings:Q,quickToolbarSettings:S,enableHtmlSanitizer:N,change:Z,onPaste:J,value:ie},F),e.createElement(s,{services:[c,d,m,u]}),e.createElement(Ie,{visible:q,onSelect:te,onClose:function(){return W(!1)}}),e.createElement(g,{visible:V,onConfirm:ne,onClose:function(){return Y(!1)},initialLink:X.initialLink,initialText:X.initialText,initialOpenInNewTab:X.initialOpenInNewTab})))};export{g as LinkModal,Re as Richtext};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RichTextProps } from './types';
|
|
3
2
|
import './styles/RichText.scss';
|
|
3
|
+
import { RichTextProps } from './types';
|
|
4
4
|
import '@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css';
|
|
5
|
-
import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
|
|
6
5
|
import '@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css';
|
|
7
|
-
import '@cyber-wysiwyg/richtexteditor/ej2-
|
|
6
|
+
import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
|
|
8
7
|
import '@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css';
|
|
9
8
|
import '@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css';
|
|
10
9
|
import '@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css';
|
|
11
10
|
import '@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css';
|
|
12
11
|
import '@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css';
|
|
13
|
-
|
|
12
|
+
import '@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css';
|
|
13
|
+
export declare const Richtext: ({ autoSanitize, testId, toolbarSettings, quickToolbarSettings, height, enableTabKey, enableHtmlSanitizer, enableTemplateDropdown, templateMap, templateDropdownLabel, change, value, ...rest }: RichTextProps) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEFAULT_TOOLBAR_SETTINGS: {
|
|
2
|
+
items: (string | {
|
|
3
|
+
tooltipText: string;
|
|
4
|
+
template: string;
|
|
5
|
+
})[];
|
|
6
|
+
};
|
|
7
|
+
export declare const DEFAULT_QUICK_TOOLBAR_SETTINGS: {
|
|
8
|
+
table: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const DEFAULT_LINK_MODAL_DATA: {
|
|
11
|
+
initialLink: string;
|
|
12
|
+
initialText: string;
|
|
13
|
+
initialOpenInNewTab: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
declare const azerbaijaniTranslations: {
|
|
2
|
+
richtexteditor: {
|
|
3
|
+
alignments: string;
|
|
4
|
+
justifyLeft: string;
|
|
5
|
+
justifyCenter: string;
|
|
6
|
+
justifyRight: string;
|
|
7
|
+
justifyFull: string;
|
|
8
|
+
fontName: string;
|
|
9
|
+
fontSize: string;
|
|
10
|
+
fontColor: string;
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
importWord: string;
|
|
13
|
+
exportWord: string;
|
|
14
|
+
exportPdf: string;
|
|
15
|
+
bold: string;
|
|
16
|
+
italic: string;
|
|
17
|
+
underline: string;
|
|
18
|
+
strikethrough: string;
|
|
19
|
+
clearFormat: string;
|
|
20
|
+
clearAll: string;
|
|
21
|
+
cut: string;
|
|
22
|
+
copy: string;
|
|
23
|
+
paste: string;
|
|
24
|
+
unorderedList: string;
|
|
25
|
+
orderedList: string;
|
|
26
|
+
indent: string;
|
|
27
|
+
outdent: string;
|
|
28
|
+
undo: string;
|
|
29
|
+
redo: string;
|
|
30
|
+
superscript: string;
|
|
31
|
+
subscript: string;
|
|
32
|
+
uppercase: string;
|
|
33
|
+
lowercase: string;
|
|
34
|
+
createLink: string;
|
|
35
|
+
openLink: string;
|
|
36
|
+
editLink: string;
|
|
37
|
+
removeLink: string;
|
|
38
|
+
image: string;
|
|
39
|
+
audio: string;
|
|
40
|
+
video: string;
|
|
41
|
+
replace: string;
|
|
42
|
+
numberFormatList: string;
|
|
43
|
+
bulletFormatList: string;
|
|
44
|
+
audioReplace: string;
|
|
45
|
+
videoReplace: string;
|
|
46
|
+
videoAlign: string;
|
|
47
|
+
videoDimension: string;
|
|
48
|
+
audioRemove: string;
|
|
49
|
+
videoRemove: string;
|
|
50
|
+
audioLayoutOption: string;
|
|
51
|
+
videoLayoutOption: string;
|
|
52
|
+
align: string;
|
|
53
|
+
caption: string;
|
|
54
|
+
remove: string;
|
|
55
|
+
insertLink: string;
|
|
56
|
+
display: string;
|
|
57
|
+
altText: string;
|
|
58
|
+
dimension: string;
|
|
59
|
+
fullscreen: string;
|
|
60
|
+
maximize: string;
|
|
61
|
+
minimize: string;
|
|
62
|
+
lowerCase: string;
|
|
63
|
+
upperCase: string;
|
|
64
|
+
print: string;
|
|
65
|
+
formats: string;
|
|
66
|
+
sourcecode: string;
|
|
67
|
+
preview: string;
|
|
68
|
+
viewside: string;
|
|
69
|
+
insertCode: string;
|
|
70
|
+
blockquote: string;
|
|
71
|
+
linkText: string;
|
|
72
|
+
linkTooltipLabel: string;
|
|
73
|
+
linkWebUrl: string;
|
|
74
|
+
linkTitle: string;
|
|
75
|
+
linkurl: string;
|
|
76
|
+
linkOpenInNewWindow: string;
|
|
77
|
+
linkHeader: string;
|
|
78
|
+
dialogInsert: string;
|
|
79
|
+
dialogCancel: string;
|
|
80
|
+
dialogUpdate: string;
|
|
81
|
+
imageHeader: string;
|
|
82
|
+
audioHeader: string;
|
|
83
|
+
videoHeader: string;
|
|
84
|
+
imageLinkHeader: string;
|
|
85
|
+
audioLinkHeader: string;
|
|
86
|
+
videoLinkHeader: string;
|
|
87
|
+
embedVideoLinkHeader: string;
|
|
88
|
+
mdimageLink: string;
|
|
89
|
+
imageUploadMessage: string;
|
|
90
|
+
audioUploadMessage: string;
|
|
91
|
+
videoUploadMessage: string;
|
|
92
|
+
imageDeviceUploadMessage: string;
|
|
93
|
+
audioDeviceUploadMessage: string;
|
|
94
|
+
videoDeviceUploadMessage: string;
|
|
95
|
+
imageAlternateText: string;
|
|
96
|
+
alternateHeader: string;
|
|
97
|
+
browse: string;
|
|
98
|
+
imageUrl: string;
|
|
99
|
+
audioUrl: string;
|
|
100
|
+
videoUrl: string;
|
|
101
|
+
webUrl: string;
|
|
102
|
+
embedUrl: string;
|
|
103
|
+
imageCaption: string;
|
|
104
|
+
imageSizeHeader: string;
|
|
105
|
+
videoSizeHeader: string;
|
|
106
|
+
imageHeight: string;
|
|
107
|
+
imageWidth: string;
|
|
108
|
+
videoHeight: string;
|
|
109
|
+
videoWidth: string;
|
|
110
|
+
textPlaceholder: string;
|
|
111
|
+
inserttablebtn: string;
|
|
112
|
+
tabledialogHeader: string;
|
|
113
|
+
tableWidth: string;
|
|
114
|
+
cellpadding: string;
|
|
115
|
+
cellspacing: string;
|
|
116
|
+
columns: string;
|
|
117
|
+
rows: string;
|
|
118
|
+
tableRows: string;
|
|
119
|
+
tableColumns: string;
|
|
120
|
+
tableCellHorizontalAlign: string;
|
|
121
|
+
tableCellVerticalAlign: string;
|
|
122
|
+
createTable: string;
|
|
123
|
+
removeTable: string;
|
|
124
|
+
tableHeader: string;
|
|
125
|
+
tableRemove: string;
|
|
126
|
+
tableCellBackground: string;
|
|
127
|
+
tableEditProperties: string;
|
|
128
|
+
styles: string;
|
|
129
|
+
insertColumnLeft: string;
|
|
130
|
+
insertColumnRight: string;
|
|
131
|
+
deleteColumn: string;
|
|
132
|
+
insertRowBefore: string;
|
|
133
|
+
insertRowAfter: string;
|
|
134
|
+
deleteRow: string;
|
|
135
|
+
tableEditHeader: string;
|
|
136
|
+
TableHeadingText: string;
|
|
137
|
+
TableColText: string;
|
|
138
|
+
imageInsertLinkHeader: string;
|
|
139
|
+
editImageHeader: string;
|
|
140
|
+
editAudioHeader: string;
|
|
141
|
+
editVideoHeader: string;
|
|
142
|
+
alignmentsDropDownLeft: string;
|
|
143
|
+
alignmentsDropDownCenter: string;
|
|
144
|
+
alignmentsDropDownRight: string;
|
|
145
|
+
alignmentsDropDownJustify: string;
|
|
146
|
+
imageDisplayDropDownInline: string;
|
|
147
|
+
imageDisplayDropDownBreak: string;
|
|
148
|
+
audioLayoutOptionDropDownInline: string;
|
|
149
|
+
audioLayoutOptionDropDownBreak: string;
|
|
150
|
+
videoLayoutOptionDropDownInline: string;
|
|
151
|
+
videoLayoutOptionDropDownBreak: string;
|
|
152
|
+
tableInsertRowDropDownBefore: string;
|
|
153
|
+
tableInsertRowDropDownAfter: string;
|
|
154
|
+
tableInsertRowDropDownDelete: string;
|
|
155
|
+
tableInsertColumnDropDownLeft: string;
|
|
156
|
+
tableInsertColumnDropDownRight: string;
|
|
157
|
+
tableInsertColumnDropDownDelete: string;
|
|
158
|
+
tableVerticalAlignDropDownTop: string;
|
|
159
|
+
tableVerticalAlignDropDownMiddle: string;
|
|
160
|
+
tableVerticalAlignDropDownBottom: string;
|
|
161
|
+
tableStylesDropDownDashedBorder: string;
|
|
162
|
+
tableStylesDropDownAlternateRows: string;
|
|
163
|
+
pasteFormat: string;
|
|
164
|
+
pasteFormatContent: string;
|
|
165
|
+
plainText: string;
|
|
166
|
+
cleanFormat: string;
|
|
167
|
+
keepFormat: string;
|
|
168
|
+
pasteDialogOk: string;
|
|
169
|
+
pasteDialogCancel: string;
|
|
170
|
+
fileManager: string;
|
|
171
|
+
fileDialogHeader: string;
|
|
172
|
+
formatsDropDownParagraph: string;
|
|
173
|
+
formatsDropDownCode: string;
|
|
174
|
+
formatsDropDownQuotation: string;
|
|
175
|
+
formatsDropDownHeading1: string;
|
|
176
|
+
formatsDropDownHeading2: string;
|
|
177
|
+
formatsDropDownHeading3: string;
|
|
178
|
+
formatsDropDownHeading4: string;
|
|
179
|
+
fontNameSegoeUI: string;
|
|
180
|
+
fontNameArial: string;
|
|
181
|
+
fontNameGeorgia: string;
|
|
182
|
+
fontNameImpact: string;
|
|
183
|
+
fontNameTahoma: string;
|
|
184
|
+
fontNameTimesNewRoman: string;
|
|
185
|
+
fontNameVerdana: string;
|
|
186
|
+
numberFormatListNumber: string;
|
|
187
|
+
numberFormatListLowerAlpha: string;
|
|
188
|
+
numberFormatListUpperAlpha: string;
|
|
189
|
+
numberFormatListLowerRoman: string;
|
|
190
|
+
numberFormatListUpperRoman: string;
|
|
191
|
+
numberFormatListLowerGreek: string;
|
|
192
|
+
bulletFormatListDisc: string;
|
|
193
|
+
bulletFormatListCircle: string;
|
|
194
|
+
bulletFormatListSquare: string;
|
|
195
|
+
numberFormatListNone: string;
|
|
196
|
+
bulletFormatListNone: string;
|
|
197
|
+
formatPainter: string;
|
|
198
|
+
emojiPicker: string;
|
|
199
|
+
embeddedCode: string;
|
|
200
|
+
pasteEmbeddedCodeHere: string;
|
|
201
|
+
emojiPickerTypeToFind: string;
|
|
202
|
+
emojiPickerNoResultFound: string;
|
|
203
|
+
emojiPickerTrySomethingElse: string;
|
|
204
|
+
linkAriaLabel: string;
|
|
205
|
+
imageLinkAriaLabel: string;
|
|
206
|
+
unsupportedImage: string;
|
|
207
|
+
mergecells: string;
|
|
208
|
+
verticalsplit: string;
|
|
209
|
+
horizontalsplit: string;
|
|
210
|
+
inlinecode: string;
|
|
211
|
+
slashMenuItemHeadingOneText: string;
|
|
212
|
+
slashMenuItemHeadingOneDescription: string;
|
|
213
|
+
slashMenuItemHeadingTwoText: string;
|
|
214
|
+
slashMenuItemHeadingTwoDescription: string;
|
|
215
|
+
slashMenuItemHeadingThreeText: string;
|
|
216
|
+
slashMenuItemHeadingThreeDescription: string;
|
|
217
|
+
slashMenuItemHeadingFourText: string;
|
|
218
|
+
slashMenuItemHeadingFourDescription: string;
|
|
219
|
+
slashMenuItemParagraphText: string;
|
|
220
|
+
slashMenuItemParagraphDescription: string;
|
|
221
|
+
slashMenuItemBlockquoteText: string;
|
|
222
|
+
slashMenuItemBlockquoteDescription: string;
|
|
223
|
+
slashMenuItemOrderedListText: string;
|
|
224
|
+
slashMenuItemOrderedListDescription: string;
|
|
225
|
+
slashMenuItemUnorderedListText: string;
|
|
226
|
+
slashMenuItemUnorderedListDescription: string;
|
|
227
|
+
slashMenuItemCodeText: string;
|
|
228
|
+
slashMenuItemCodeDescription: string;
|
|
229
|
+
slashMenuItemTableText: string;
|
|
230
|
+
slashMenuItemTableDescription: string;
|
|
231
|
+
slashMenuItemLinkText: string;
|
|
232
|
+
slashMenuItemLinkDescription: string;
|
|
233
|
+
slashMenuItemImageText: string;
|
|
234
|
+
slashMenuItemImageDescription: string;
|
|
235
|
+
slashMenuItemAudioText: string;
|
|
236
|
+
slashMenuItemAudioDescription: string;
|
|
237
|
+
slashMenuItemVideoText: string;
|
|
238
|
+
slashMenuItemVideoDescription: string;
|
|
239
|
+
slashMenuItemEmojiText: string;
|
|
240
|
+
slashMenuItemEmojiDescription: string;
|
|
241
|
+
preferredWidth: string;
|
|
242
|
+
points: string;
|
|
243
|
+
percent: string;
|
|
244
|
+
cellMargins: string;
|
|
245
|
+
defaultCellMargins: string;
|
|
246
|
+
allowSpacingBetweenCells: string;
|
|
247
|
+
sameAsWholeTable: string;
|
|
248
|
+
borders: string;
|
|
249
|
+
none: string;
|
|
250
|
+
box: string;
|
|
251
|
+
all: string;
|
|
252
|
+
custom: string;
|
|
253
|
+
outsideBorders: string;
|
|
254
|
+
insideBorders: string;
|
|
255
|
+
leftBorder: string;
|
|
256
|
+
rightBorder: string;
|
|
257
|
+
topBorder: string;
|
|
258
|
+
bottomBorder: string;
|
|
259
|
+
insideVerticalBorder: string;
|
|
260
|
+
insideHorizontalBorder: string;
|
|
261
|
+
toolbarTooltip: {
|
|
262
|
+
bold: string;
|
|
263
|
+
italic: string;
|
|
264
|
+
underline: string;
|
|
265
|
+
strikethrough: string;
|
|
266
|
+
superscript: string;
|
|
267
|
+
subscript: string;
|
|
268
|
+
uppercase: string;
|
|
269
|
+
lowercase: string;
|
|
270
|
+
fontColor: string;
|
|
271
|
+
backgroundColor: string;
|
|
272
|
+
fontName: string;
|
|
273
|
+
fontSize: string;
|
|
274
|
+
formats: string;
|
|
275
|
+
alignments: string;
|
|
276
|
+
orderedList: string;
|
|
277
|
+
unorderedList: string;
|
|
278
|
+
indent: string;
|
|
279
|
+
outdent: string;
|
|
280
|
+
createLink: string;
|
|
281
|
+
image: string;
|
|
282
|
+
audio: string;
|
|
283
|
+
video: string;
|
|
284
|
+
table: string;
|
|
285
|
+
createTable: string;
|
|
286
|
+
undo: string;
|
|
287
|
+
redo: string;
|
|
288
|
+
sourcecode: string;
|
|
289
|
+
preview: string;
|
|
290
|
+
maximize: string;
|
|
291
|
+
minimize: string;
|
|
292
|
+
insertCode: string;
|
|
293
|
+
formatPainter: string;
|
|
294
|
+
emojiPicker: string;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
export default azerbaijaniTranslations;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RichTextEditorComponent } from '@cyber-wysiwyg/richtexteditor';
|
|
2
|
+
interface UseModalHandlersProps {
|
|
3
|
+
ref: React.RefObject<RichTextEditorComponent>;
|
|
4
|
+
lastSelectionRef: React.MutableRefObject<Range | null>;
|
|
5
|
+
setShowSymbolDialog: (show: boolean) => void;
|
|
6
|
+
setShowLinkDialog: (show: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useModalHandlers: ({ ref, lastSelectionRef, setShowSymbolDialog, setShowLinkDialog, }: UseModalHandlersProps) => {
|
|
9
|
+
insertSymbol: (symbol: string) => void;
|
|
10
|
+
insertLink: (link: string, text: string, openInNewTab: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RichTextEditorComponent } from '@cyber-wysiwyg/richtexteditor';
|
|
2
|
+
interface UseToolbarHandlersProps {
|
|
3
|
+
ref: React.RefObject<RichTextEditorComponent>;
|
|
4
|
+
lastSelectionRef: React.MutableRefObject<Range | null>;
|
|
5
|
+
templateMap: Record<string, string>;
|
|
6
|
+
setShowSymbolDialog: (show: boolean) => void;
|
|
7
|
+
setShowLinkDialog: (show: boolean) => void;
|
|
8
|
+
setLinkModalData: (data: {
|
|
9
|
+
initialLink: string;
|
|
10
|
+
initialText: string;
|
|
11
|
+
initialOpenInNewTab: boolean;
|
|
12
|
+
}) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const useToolbarHandlers: ({ ref, lastSelectionRef, templateMap, setShowSymbolDialog, setShowLinkDialog, setLinkModalData, }: UseToolbarHandlersProps) => void;
|
|
15
|
+
export {};
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { RichTextEditor } from '@cyber-wysiwyg/richtexteditor/ej2-react-richtexteditor';
|
|
2
|
+
export type TemplateMap = Record<string, string>;
|
|
2
3
|
export type RichTextProps = Partial<Omit<RichTextEditor, 'toolbarSettings'>> & {
|
|
3
4
|
testId?: string;
|
|
4
5
|
toolbarSettings?: RichTextEditor['toolbarSettings'] | ((defaultToolbarSettings: RichTextEditor['toolbarSettings']) => RichTextEditor['toolbarSettings']);
|
|
5
6
|
autoSanitize?: boolean;
|
|
7
|
+
enableTemplateDropdown?: boolean;
|
|
8
|
+
templateMap?: TemplateMap;
|
|
9
|
+
templateDropdownLabel?: string;
|
|
6
10
|
};
|
|
7
11
|
export type SpecialCharModalProps = {
|
|
8
12
|
visible: boolean;
|
|
9
13
|
onSelect: (char: string) => void;
|
|
10
14
|
onClose: () => void;
|
|
11
15
|
};
|
|
16
|
+
export type LinkModalProps = {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
onConfirm: (link: string, text: string, openInNewTab: boolean) => void;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
initialLink?: string;
|
|
21
|
+
initialText?: string;
|
|
22
|
+
initialOpenInNewTab?: boolean;
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RichTextEditor } from '@cyber-wysiwyg/richtexteditor/ej2-richtexteditor';
|
|
2
|
+
export declare const buildTemplateDropdown: (templateMap: Record<string, string>, label: string) => {
|
|
3
|
+
template: string;
|
|
4
|
+
tooltipText: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const buildToolbarSettings: (baseSettings: RichTextEditor["toolbarSettings"], enableTemplateDropdown: boolean, templateMap: Record<string, string>, templateDropdownLabel: string) => RichTextEditor["toolbarSettings"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/richtext",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/richtext/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
21
|
+
"build": "rollup -c ./rollup.config.mjs",
|
|
22
|
+
"clean": "rm -rf dist && rm -rf .rollup.cache",
|
|
23
|
+
"lint": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\"",
|
|
24
|
+
"lint:fix": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\" --fix",
|
|
25
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
26
|
+
"type-check": "tsc --noEmit",
|
|
27
|
+
"test": "find src -name '*.test.*' -o -name '*.spec.*' | grep -q . && bun test || echo 'No tests found - skipping'"
|
|
22
28
|
},
|
|
23
29
|
"dependencies": {
|
|
24
30
|
"@cyber-wysiwyg/richtexteditor": "^1.0.10",
|