UNPKG

@techdocs/cli

Version:

Utility CLI for managing TechDocs sites in Backstage.

2 lines • 27.3 kB
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["3589"],{97519(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>ed});let o=Object.entries,a=Object.setPrototypeOf,i=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,u=Object.freeze,s=Object.seal,f=Object.create,p="u">typeof Reflect&&Reflect,m=p.apply,d=p.construct;u||(u=function(e){return e}),s||(s=function(e){return e}),m||(m=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),d||(d=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let h=M(Array.prototype.forEach),g=M(Array.prototype.lastIndexOf),y=M(Array.prototype.pop),T=M(Array.prototype.push),b=M(Array.prototype.splice),_=Array.isArray,E=M(String.prototype.toLowerCase),S=M(String.prototype.toString),A=M(String.prototype.match),N=M(String.prototype.replace),w=M(String.prototype.indexOf),O=M(String.prototype.trim),v=M(Number.prototype.toString),R=M(Boolean.prototype.toString),C="u"<typeof BigInt?null:M(BigInt.prototype.toString),D="u"<typeof Symbol?null:M(Symbol.prototype.toString),k=M(Object.prototype.hasOwnProperty),I=M(Object.prototype.toString),x=M(RegExp.prototype.test),L=(em=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(em,t)});function M(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return m(e,t,r)}}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;if(a&&a(e,null),!_(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){let e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function U(e){let t=f(null);for(let a of o(e)){var n=function(e){if(Array.isArray(e))return e}(a)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,a,i=[],l=!0,c=!1;try{o=(t=t.call(e)).next,!1;for(;!(l=(n=o.call(t)).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw r}}return i}}(a)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,2):void 0}}(a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let o=n[0],i=n[1];k(e,o)&&(_(i)?t[o]=function(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=U(i):t[o]=i)}return t}function z(e,t){for(;null!==e;){let n=c(e,t);if(n){if(n.get)return M(n.get);if("function"==typeof n.value)return M(n.value)}e=l(e)}return function(){return null}}let F=u(["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","search","section","select","shadow","slot","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"]),H=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=u(["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"]),B=u(["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"]),G=u(["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"]),W=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=u(["#text"]),q=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),X=u(["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","mask-type","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"]),$=u(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),K=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=s(/{{[\w\W]*|^[\w\W]*}}/g),Z=s(/<%[\w\W]*|^[\w\W]*%>/g),J=s(/\${[\w\W]*/g),Q=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=s(/^aria-[\-\w]+$/),et=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),en=s(/^(?:\w+script|data):/i),er=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eo=s(/^html$/i),ea=s(/^[a-z][.\w]*(-[.\w]+)+$/i),ei=s(/<[/\w!]/g),el=s(/<[/\w]/g),ec=s(/<\/no(script|embed|frames)/i),eu=s(/\/>/i),es=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let 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}},ef=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ep=function(e,t,n,r){return k(e,t)&&_(e[t])?P(r.base?U(r.base):{},e[t],r.transform):n};var em,ed=function e(){let t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,a=t=>e(t);if(a.version="3.4.11",a.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return a.isSupported=!1,a;let i=r.document,l=i,c=l.currentScript;r.DocumentFragment;let p=r.HTMLTemplateElement,m=r.Node,d=r.Element,M=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let em=r.DOMParser,ed=r.trustedTypes,eh=d.prototype,eg=z(eh,"cloneNode"),ey=z(eh,"remove"),eT=z(eh,"nextSibling"),eb=z(eh,"childNodes"),e_=z(eh,"parentNode"),eE=z(eh,"shadowRoot"),eS=z(eh,"attributes"),eA=m&&m.prototype?z(m.prototype,"nodeType"):null,eN=m&&m.prototype?z(m.prototype,"nodeName"):null;if("function"==typeof p){let e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ew="",eO=!1,ev=0,eR=function(){if(ev>0)throw L('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},eC=function(e){eR(),ev++;try{return t.createHTML(e)}finally{ev--}},eD=function(e){eR(),ev++;try{return t.createScriptURL(e)}finally{ev--}},ek=i,eI=ek.implementation,ex=ek.createNodeIterator,eL=ek.createDocumentFragment,eM=ek.getElementsByTagName,eP=l.importNode,eU=ef();a.isSupported="function"==typeof o&&"function"==typeof e_&&eI&&void 0!==eI.createHTMLDocument;let ez=et,eF=null,eH=P({},[...F,...H,...j,...G,...Y]),ej=null,eB=P({},[...q,...X,...$,...K]),eG=Object.seal(f(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}})),eW=null,eY=null,eq=Object.seal(f(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eX=!0,e$=!0,eK=!1,eV=!0,eZ=!1,eJ=!0,eQ=!1,e0=!1,e1=null,e2=null,e9=!1,e3=!1,e8=!1,e5=!1,e4=!0,e6=!1,e7="user-content-",te=!0,tt=!1,tn={},tr=null,to=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),ta=null,ti=P({},["audio","video","img","source","image","track"]),tl=null,tc=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tu="http://www.w3.org/1998/Math/MathML",ts="http://www.w3.org/2000/svg",tf="http://www.w3.org/1999/xhtml",tp=tf,tm=!1,td=null,th=P({},[tu,ts,tf],S),tg=u(["mi","mo","mn","ms","mtext"]),ty=P({},tg),tT=u(["annotation-xml"]),tb=P({},tT),t_=P({},["title","style","font","a","script"]),tE=null,tS=["application/xhtml+xml","text/html"],tA=null,tN=null,tw=i.createElement("form"),tO=function(e){return e instanceof RegExp||e instanceof Function},tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tN&&tN===e)return;e&&"object"==typeof e||(e={}),e=U(e),tA="application/xhtml+xml"===(tE=-1===tS.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?S:E,eF=ep(e,"ALLOWED_TAGS",eH,{transform:tA}),ej=ep(e,"ALLOWED_ATTR",eB,{transform:tA}),td=ep(e,"ALLOWED_NAMESPACES",th,{transform:S}),tl=ep(e,"ADD_URI_SAFE_ATTR",tc,{transform:tA,base:tc}),ta=ep(e,"ADD_DATA_URI_TAGS",ti,{transform:tA,base:ti}),tr=ep(e,"FORBID_CONTENTS",to,{transform:tA}),eW=ep(e,"FORBID_TAGS",U({}),{transform:tA}),eY=ep(e,"FORBID_ATTR",U({}),{transform:tA}),tn=!!k(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?U(e.USE_PROFILES):e.USE_PROFILES),eX=!1!==e.ALLOW_ARIA_ATTR,e$=!1!==e.ALLOW_DATA_ATTR,eK=e.ALLOW_UNKNOWN_PROTOCOLS||!1,eV=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,eZ=e.SAFE_FOR_TEMPLATES||!1,eJ=!1!==e.SAFE_FOR_XML,eQ=e.WHOLE_DOCUMENT||!1,e3=e.RETURN_DOM||!1,e8=e.RETURN_DOM_FRAGMENT||!1,e5=e.RETURN_TRUSTED_TYPE||!1,e9=e.FORCE_BODY||!1,e4=!1!==e.SANITIZE_DOM,e6=e.SANITIZE_NAMED_PROPS||!1,te=!1!==e.KEEP_CONTENT,tt=e.IN_PLACE||!1,ez=!function(e){try{return x(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?et:e.ALLOWED_URI_REGEXP,tp="string"==typeof e.NAMESPACE?e.NAMESPACE:tf,ty=k(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?U(e.MATHML_TEXT_INTEGRATION_POINTS):P({},tg),tb=k(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?U(e.HTML_INTEGRATION_POINTS):P({},tT);let r=k(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?U(e.CUSTOM_ELEMENT_HANDLING):f(null);if(eG=f(null),k(r,"tagNameCheck")&&tO(r.tagNameCheck)&&(eG.tagNameCheck=r.tagNameCheck),k(r,"attributeNameCheck")&&tO(r.attributeNameCheck)&&(eG.attributeNameCheck=r.attributeNameCheck),k(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(eG.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),s(eG),eZ&&(e$=!1),e8&&(e3=!0),tn&&(eF=P({},Y),ej=f(null),!0===tn.html&&(P(eF,F),P(ej,q)),!0===tn.svg&&(P(eF,H),P(ej,X),P(ej,K)),!0===tn.svgFilters&&(P(eF,j),P(ej,X),P(ej,K)),!0===tn.mathMl&&(P(eF,G),P(ej,$),P(ej,K))),eq.tagCheck=null,eq.attributeCheck=null,k(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?eq.tagCheck=e.ADD_TAGS:_(e.ADD_TAGS)&&(eF===eH&&(eF=U(eF)),P(eF,e.ADD_TAGS,tA))),k(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?eq.attributeCheck=e.ADD_ATTR:_(e.ADD_ATTR)&&(ej===eB&&(ej=U(ej)),P(ej,e.ADD_ATTR,tA))),k(e,"ADD_URI_SAFE_ATTR")&&_(e.ADD_URI_SAFE_ATTR)&&P(tl,e.ADD_URI_SAFE_ATTR,tA),k(e,"FORBID_CONTENTS")&&_(e.FORBID_CONTENTS)&&(tr===to&&(tr=U(tr)),P(tr,e.FORBID_CONTENTS,tA)),k(e,"ADD_FORBID_CONTENTS")&&_(e.ADD_FORBID_CONTENTS)&&(tr===to&&(tr=U(tr)),P(tr,e.ADD_FORBID_CONTENTS,tA)),te&&(eF["#text"]=!0),eQ&&P(eF,["html","head","body"]),eF.table&&(P(eF,["tbody"]),delete eW.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw L('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{ew=eC("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,ew=""):(void 0===t&&(eO||(n=es(ed,c),eO=!0),t=n),t&&"string"==typeof ew&&(ew=eC("")));u&&u(e),tN=e},tR=P({},[...H,...j,...B]),tC=P({},[...G,...W]),tD=function(e){var t,n,r;let o=e_(e);o&&o.tagName||(o={namespaceURI:tp,tagName:"template"});let a=E(e.tagName),i=E(o.tagName);return!!td[e.namespaceURI]&&(e.namespaceURI===ts?(t=o).namespaceURI===tf?"svg"===a:t.namespaceURI===tu?"svg"===a&&("annotation-xml"===i||ty[i]):!!tR[a]:e.namespaceURI===tu?(n=o).namespaceURI===tf?"math"===a:n.namespaceURI===ts?"math"===a&&tb[i]:!!tC[a]:e.namespaceURI===tf?((r=o).namespaceURI!==ts||!!tb[i])&&(r.namespaceURI!==tu||!!ty[i])&&!tC[a]&&(t_[a]||!tR[a]):"application/xhtml+xml"===tE&&!!td[e.namespaceURI])},tk=function(e){T(a.removed,{element:e});try{e_(e).removeChild(e)}catch(t){if(ey(e),!e_(e))throw L("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tI=function(e){let t=eb(e);if(t){let e=[];h(t,t=>{T(e,t)}),h(e,e=>{try{ey(e)}catch(e){}})}let n=eS(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],o=r&&r.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},tx=function(e,t){try{T(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(e3||e8)try{tk(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tL=function(e){let t=eS(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],o=r&&r.name;if("string"==typeof o&&!ej[tA(o)])try{e.removeAttribute(o)}catch(e){}}},tM=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(eA?eA(e):e.nodeType)===1&&tL(e);let n=eb(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tP=function(e){let n=null,r=null;if(e9)e="<remove></remove>"+e;else{let t=A(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tE&&tp===tf&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let o=t?eC(e):e;if(tp===tf)try{n=new em().parseFromString(o,tE)}catch(e){}if(!n||!n.documentElement){n=eI.createDocument(tp,"template",null);try{n.documentElement.innerHTML=tm?ew:o}catch(e){}}let a=n.body||n.documentElement;return(e&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),tp===tf)?eM.call(n,eQ?"html":"body")[0]:eQ?n.documentElement:a},tU=function(e){return ex.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT|M.SHOW_PROCESSING_INSTRUCTION|M.SHOW_CDATA_SECTION,null)},tz=function(e){return e=N(e,V," "),e=N(e,Z," "),e=N(e,J," ")},tF=function(e){var t;e.normalize();let n=ex.call(e.ownerDocument||e,e,M.SHOW_TEXT|M.SHOW_COMMENT|M.SHOW_CDATA_SECTION|M.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=tz(r.data),r=n.nextNode();let o=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");o&&h(o,e=>{tj(e.content)&&tF(e.content)})},tH=function(e){let t=eN?eN(e):null;return"string"==typeof t&&"form"===tA(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==eS(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==eA(e)||e.childNodes!==eb(e))},tj=function(e){if(!eA||"object"!=typeof e||null===e)return!1;try{return 11===eA(e)}catch(e){return!1}},tB=function(e){if(!eA||"object"!=typeof e||null===e)return!1;try{return"number"==typeof eA(e)}catch(e){return!1}};function tG(e,t,n){0!==e.length&&h(e,e=>{e.call(a,t,n,tN)})}let tW=function(e,t){if(!eW[t]&&t$(t)&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,t)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(t)))return!1;if(te&&!tr[t]){let t=e_(e),n=eb(e);if(n&&t){let r=n.length;for(let o=r-1;o>=0;--o){let r=tt?n[o]:eg(n[o],!0);t.insertBefore(r,eT(e))}}}return tk(e),!0},tY=function(e){if(tG(eU.beforeSanitizeElements,e,null),tH(e))return tk(e),!0;let t=tA(eN?eN(e):e.nodeName);if(tG(eU.uponSanitizeElement,e,{tagName:t,allowedTags:eF}),eJ&&e.hasChildNodes()&&!tB(e.firstElementChild)&&x(ei,e.textContent)&&x(ei,e.innerHTML)||eJ&&e.namespaceURI===tf&&"style"===t&&tB(e.firstElementChild)||7===e.nodeType||eJ&&8===e.nodeType&&x(el,e.data)||0)return tk(e),!0;if(eW[t]||!(eq.tagCheck instanceof Function&&eq.tagCheck(t))&&!eF[t])return tW(e,t);if((eA?eA(e):e.nodeType)===1&&!tD(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&x(ec,e.innerHTML))return tk(e),!0;if(eZ&&3===e.nodeType){let t=tz(e.textContent);e.textContent!==t&&(T(a.removed,{element:e.cloneNode()}),e.textContent=t)}return tG(eU.afterSanitizeElements,e,null),!1},tq=function(e,t,n){if(eY[t]||e4&&("id"===t||"name"===t)&&(n in i||n in tw))return!1;let r=ej[t]||eq.attributeCheck instanceof Function&&eq.attributeCheck(t,e);if(e$&&x(Q,t));else if(eX&&x(ee,t));else if(r){if(tl[t]);else if(x(ez,N(n,er,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===w(n,"data:")&&ta[e]);else if(eK&&!x(en,N(n,er,"")));else if(n)return!1}else if(!(t$(e)&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,e)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(e))&&(eG.attributeNameCheck instanceof RegExp&&x(eG.attributeNameCheck,t)||eG.attributeNameCheck instanceof Function&&eG.attributeNameCheck(t,e))||"is"===t&&eG.allowCustomizedBuiltInElements&&(eG.tagNameCheck instanceof RegExp&&x(eG.tagNameCheck,n)||eG.tagNameCheck instanceof Function&&eG.tagNameCheck(n))))return!1;return!0},tX=P({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),t$=function(e){return!tX[E(e)]&&x(ea,e)},tK=function(e,n,r,o){if(t&&"object"==typeof ed&&"function"==typeof ed.getAttributeType&&!r)switch(ed.getAttributeType(e,n)){case"TrustedHTML":return eC(o);case"TrustedScriptURL":return eD(o)}return o},tV=function(e,t,n,r){try{n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),tH(e)?tk(e):y(a.removed)}catch(n){tx(t,e)}},tZ=function(e){tG(eU.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||tH(e))return;let n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ej,forceKeepAttr:void 0},r=t.length,o=tA(e.nodeName);for(;r--;){let a=t[r],i=a.name,l=a.namespaceURI,c=a.value,u=tA(i),s="value"===i?c:O(c);if(n.attrName=u,n.attrValue=s,n.keepAttr=!0,n.forceKeepAttr=void 0,tG(eU.uponSanitizeAttribute,e,n),s=n.attrValue,e6&&("id"===u||"name"===u)&&0!==w(s,e7)&&(tx(i,e),s=e7+s),eJ&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,s)||"attributename"===u&&A(s,"href")){tx(i,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr||!eV&&x(eu,s)||(eZ&&(s=tz(s)),!tq(o,u,s))){tx(i,e);continue}(s=tK(o,u,l,s))!==c&&tV(e,i,l,s)}}tG(eU.afterSanitizeAttributes,e,null)},tJ=function(e){let t=null,n=tU(e);for(tG(eU.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(tG(eU.uponSanitizeShadowNode,t,null),tY(t),tZ(t),tj(t.content)&&tJ(t.content),(eA?eA(t):t.nodeType)===1){let e=eE(t);tj(e)&&(tQ(e),tJ(e))}tG(eU.afterSanitizeShadowDOM,e,null)},tQ=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){tJ(e.shadow);continue}let n=e.node,r=(eA?eA(n):n.nodeType)===1,o=eb(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){let e=eN?eN(n):null;if("string"==typeof e&&"template"===tA(e)){let e=n.content;tj(e)&&t.push({node:e,shadow:null})}}if(r){let e=eE(n);tj(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return a.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,i=null,c=null;if((tm=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tB(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return v(e);case"boolean":return R(e);case"bigint":return C?C(e):"0";case"symbol":return D?D(e):"Symbol()";case"undefined":default:return I(e);case"function":case"object":{if(null===e)return I(e);let t=z(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:I(n)}return I(e)}}}(e)))throw L("dirty is not a string, aborting");if(!a.isSupported)return e;e0?(eF=e1,ej=e2):tv(n),(eU.uponSanitizeElement.length>0||eU.uponSanitizeAttribute.length>0)&&(eF=U(eF)),eU.uponSanitizeAttribute.length>0&&(ej=U(ej)),a.removed=[];let u=tt&&"string"!=typeof e&&tB(e);if(u){let t=eN?eN(e):e.nodeName;if("string"==typeof t){let e=tA(t);if(!eF[e]||eW[e])throw L("root node is forbidden and cannot be sanitized in-place")}if(tH(e))throw L("root node is clobbered and cannot be sanitized in-place");try{tQ(e)}catch(t){throw tI(e),t}}else if(tB(e))1===(o=(r=tP("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),tQ(o);else{if(!e3&&!eZ&&!eQ&&-1===e.indexOf("<"))return t&&e5?eC(e):e;if(!(r=tP(e)))return e3?null:e5?ew:""}r&&e9&&tk(r.firstChild);let s=tU(u?e:r);try{for(;i=s.nextNode();)tY(i),tZ(i),tj(i.content)&&tJ(i.content)}catch(t){throw u&&tI(e),t}if(u)return h(a.removed,e=>{e.element&&tM(e.element)}),eZ&&tF(e),e;if(e3){if(eZ&&tF(r),e8)for(c=eL.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(ej.shadowroot||ej.shadowrootmode)&&(c=eP.call(l,c,!0)),c}let f=eQ?r.outerHTML:r.innerHTML;return eQ&&eF["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&x(eo,r.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+f),eZ&&(f=tz(f)),t&&e5?eC(f):f},a.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tv(e),e0=!0,e1=eF,e2=ej},a.clearConfig=function(){tN=null,e0=!1,e1=null,e2=null,t=n,ew=""},a.isValidAttribute=function(e,t,n){return tN||tv({}),tq(tA(e),tA(t),n)},a.addHook=function(e,t){"function"!=typeof t||k(eU,e)&&T(eU[e],t)},a.removeHook=function(e,t){if(k(eU,e)){if(void 0!==t){let n=g(eU[e],t);return -1===n?void 0:b(eU[e],n,1)[0]}return y(eU[e])}},a.removeHooks=function(e){k(eU,e)&&(eU[e]=[])},a.removeAllHooks=function(){eU=ef()},a}()}}]); //# sourceMappingURL=module-dompurify.b9b41a29cecf.js.map