@dmrlzz/davecode 0.3.0 → 0.5.0
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/README.md +5 -4
- package/bin/davecode.js +0 -0
- package/dist/{ChatApp-FO5SABXB.js → ChatApp-CJBICQGA.js} +289 -137
- package/dist/ChatApp-CJBICQGA.js.map +1 -0
- package/dist/{RunnerView-DLVR7C22.js → RunnerView-A7JSPUW5.js} +5 -5
- package/dist/account-QWDPJWAA.js +23 -0
- package/dist/accounts-IQMR72FC.js +37 -0
- package/dist/{budget-RBHCEDPP.js → budget-XANOUVWO.js} +6 -6
- package/dist/chat-KDDRNC5V.js +359 -0
- package/dist/chat-KDDRNC5V.js.map +1 -0
- package/dist/{accounts-MTMGYKEP.js → chunk-44AFJL2X.js} +24 -17
- package/dist/chunk-44AFJL2X.js.map +1 -0
- package/dist/{chunk-BOLFK3BH.js → chunk-5LKOJBUL.js} +2 -2
- package/dist/{chunk-23KTE7IK.js → chunk-AZKACMME.js} +2 -2
- package/dist/{chunk-PIIJ3RSI.js → chunk-FYPMA55O.js} +1269 -1265
- package/dist/chunk-FYPMA55O.js.map +1 -0
- package/dist/{chunk-OYEYNDOO.js → chunk-GE22VBCY.js} +3 -3
- package/dist/{chunk-C7FDRA3U.js → chunk-HSBJDV3O.js} +660 -139
- package/dist/chunk-HSBJDV3O.js.map +1 -0
- package/dist/chunk-JLATEHS7.js +20 -0
- package/dist/chunk-JLATEHS7.js.map +1 -0
- package/dist/{chunk-VVCXGQMY.js → chunk-MC7RIPL7.js} +17 -8
- package/dist/chunk-MC7RIPL7.js.map +1 -0
- package/dist/{chunk-MSLLH5XP.js → chunk-PGAJIGUF.js} +4 -4
- package/dist/{chunk-OXRMGR72.js → chunk-PGPXE6LF.js} +2 -2
- package/dist/chunk-QA3O6RA2.js +81 -0
- package/dist/chunk-QA3O6RA2.js.map +1 -0
- package/dist/chunk-W7GPBEBZ.js +144 -0
- package/dist/chunk-W7GPBEBZ.js.map +1 -0
- package/dist/{chunk-IVZHKUCD.js → chunk-WQ7MEWDF.js} +3 -3
- package/dist/{config-FRMY5OHG.js → config-YTUPIYZT.js} +5 -5
- package/dist/dashboard/assets/Accounts-cq8RLMoI.js +1 -0
- package/dist/dashboard/assets/Badge-Z4RBdO9j.js +55 -0
- package/dist/dashboard/assets/Callout-w8BTYh4k.js +1 -0
- package/dist/dashboard/assets/Field-Cmpgg_1z.js +1 -0
- package/dist/dashboard/assets/Goals-Bw02to72.js +1 -0
- package/dist/dashboard/assets/Library-DK7mlpRb.js +1 -0
- package/dist/dashboard/assets/{Markdown-ClRsddnB.js → Markdown-DCZ4Awcc.js} +8 -8
- package/dist/dashboard/assets/Panes-_KTf8pbZ.js +8 -0
- package/dist/dashboard/assets/Panes-kHJ-D0s7.css +1 -0
- package/dist/dashboard/assets/RoutesPage-QV0oPRW9.js +4 -0
- package/dist/dashboard/assets/Runner-CkHBLQl0.js +1 -0
- package/dist/dashboard/assets/Settings-BLz2gTBR.js +1 -0
- package/dist/dashboard/assets/Switch-DPYlLseH.js +1 -0
- package/dist/dashboard/assets/Tasks-BiUQSTpt.js +2 -0
- package/dist/dashboard/assets/Traffic-BVfBuC70.js +1 -0
- package/dist/dashboard/assets/Workspace-CJTgiiU5.js +1 -0
- package/dist/dashboard/assets/arrow-up-DjhzZprp.js +1 -0
- package/dist/dashboard/assets/cn-BwE4cei0.js +1 -0
- package/dist/dashboard/assets/forms-DVIUAxAc.js +1 -0
- package/dist/dashboard/assets/index-BDBa5cb0.js +104 -0
- package/dist/dashboard/assets/index-BEmBgsbP.css +2 -0
- package/dist/dashboard/assets/task-errors-Daqwi0ue.js +1 -0
- package/dist/dashboard/assets/trash-BTuDcSaQ.js +1 -0
- package/dist/dashboard/favicon.svg +1 -7
- package/dist/dashboard/index.html +4 -4
- package/dist/{dist-ZPXEVBEC.js → dist-37VQSHHA.js} +24 -2
- package/dist/dist-37VQSHHA.js.map +1 -0
- package/dist/{doctor-7RUD4D3A.js → doctor-PYUQRRCB.js} +5 -5
- package/dist/{goal-JFRNPBSD.js → goal-SXZUDUCL.js} +5 -5
- package/dist/index.js +48 -30
- package/dist/index.js.map +1 -1
- package/dist/{init-NFYNO3A3.js → init-Z2AFQEEP.js} +6 -6
- package/dist/{prompts-L37J72YW.js → prompts-TZ7UC42M.js} +9 -5
- package/dist/prompts-TZ7UC42M.js.map +1 -0
- package/dist/{run-ARUPXFFB.js → run-AOS7L3RT.js} +10 -10
- package/dist/runtime.js +18 -0
- package/dist/runtime.js.map +1 -0
- package/dist/{start-CFPOVIAR.js → start-CEPXKZUE.js} +5 -5
- package/dist/{status-E4EACVE2.js → status-WNJ3GGKU.js} +6 -6
- package/dist/status-WNJ3GGKU.js.map +1 -0
- package/dist/{tasks-ZIK6BVEX.js → tasks-TFUTUMWB.js} +6 -6
- package/package.json +21 -15
- package/dist/ChatApp-FO5SABXB.js.map +0 -1
- package/dist/accounts-MTMGYKEP.js.map +0 -1
- package/dist/chat-ZDXX3N6X.js +0 -95
- package/dist/chat-ZDXX3N6X.js.map +0 -1
- package/dist/chunk-C7FDRA3U.js.map +0 -1
- package/dist/chunk-DYQ56FBT.js +0 -47
- package/dist/chunk-DYQ56FBT.js.map +0 -1
- package/dist/chunk-PIIJ3RSI.js.map +0 -1
- package/dist/chunk-VVCXGQMY.js.map +0 -1
- package/dist/dashboard/assets/Accounts-BR3ZfVk4.js +0 -1
- package/dist/dashboard/assets/Badge-B-qzNRrZ.js +0 -55
- package/dist/dashboard/assets/Callout-B9g_wPDi.js +0 -1
- package/dist/dashboard/assets/Field-BfabPEcY.js +0 -1
- package/dist/dashboard/assets/Goals-BsV-6m94.js +0 -1
- package/dist/dashboard/assets/Library-CEA9P1m-.js +0 -1
- package/dist/dashboard/assets/Panel-B9tSgX6l.js +0 -1
- package/dist/dashboard/assets/RoutesPage-Dh-BJ3ir.js +0 -4
- package/dist/dashboard/assets/Runner-C_e9l5l2.js +0 -1
- package/dist/dashboard/assets/Settings-C6Yc1Gjg.js +0 -1
- package/dist/dashboard/assets/Switch-CUpOJjUT.js +0 -1
- package/dist/dashboard/assets/Tasks-CTku0rR3.js +0 -2
- package/dist/dashboard/assets/Traffic-CE6wZSMr.js +0 -1
- package/dist/dashboard/assets/Workspace-CxFxvkA6.js +0 -1
- package/dist/dashboard/assets/arrow-up-DL3CuFOO.js +0 -1
- package/dist/dashboard/assets/forms-D6UIYgC5.js +0 -1
- package/dist/dashboard/assets/index-1iH716Xy.css +0 -2
- package/dist/dashboard/assets/index-BMWr9EKo.js +0 -104
- package/dist/dashboard/assets/task-errors-CE4oEr8H.js +0 -1
- package/dist/dashboard/assets/trash-CWqeZ7eg.js +0 -1
- package/dist/prompts-L37J72YW.js.map +0 -1
- /package/dist/{RunnerView-DLVR7C22.js.map → RunnerView-A7JSPUW5.js.map} +0 -0
- /package/dist/{dist-ZPXEVBEC.js.map → account-QWDPJWAA.js.map} +0 -0
- /package/dist/{status-E4EACVE2.js.map → accounts-IQMR72FC.js.map} +0 -0
- /package/dist/{budget-RBHCEDPP.js.map → budget-XANOUVWO.js.map} +0 -0
- /package/dist/{chunk-BOLFK3BH.js.map → chunk-5LKOJBUL.js.map} +0 -0
- /package/dist/{chunk-23KTE7IK.js.map → chunk-AZKACMME.js.map} +0 -0
- /package/dist/{chunk-OYEYNDOO.js.map → chunk-GE22VBCY.js.map} +0 -0
- /package/dist/{chunk-MSLLH5XP.js.map → chunk-PGAJIGUF.js.map} +0 -0
- /package/dist/{chunk-OXRMGR72.js.map → chunk-PGPXE6LF.js.map} +0 -0
- /package/dist/{chunk-IVZHKUCD.js.map → chunk-WQ7MEWDF.js.map} +0 -0
- /package/dist/{config-FRMY5OHG.js.map → config-YTUPIYZT.js.map} +0 -0
- /package/dist/{doctor-7RUD4D3A.js.map → doctor-PYUQRRCB.js.map} +0 -0
- /package/dist/{goal-JFRNPBSD.js.map → goal-SXZUDUCL.js.map} +0 -0
- /package/dist/{init-NFYNO3A3.js.map → init-Z2AFQEEP.js.map} +0 -0
- /package/dist/{run-ARUPXFFB.js.map → run-AOS7L3RT.js.map} +0 -0
- /package/dist/{start-CFPOVIAR.js.map → start-CEPXKZUE.js.map} +0 -0
- /package/dist/{tasks-ZIK6BVEX.js.map → tasks-TFUTUMWB.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(e,t){return l(e)||u(e,t)||p(e,t)||d()}function p(e,t){if(e){if(typeof e==`string`)return c(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function m(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,c=o instanceof s;Promise.resolve(c?o.v:o).then(function(n){if(c){var s=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(s,n);n=e[s](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}m.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},m.prototype.next=function(e){return this._invoke(`next`,e)},m.prototype.throw=function(e){return this._invoke(`throw`,e)},m.prototype.return=function(e){return this._invoke(`return`,e)};var ee=Object.entries,te=Object.setPrototypeOf,ne=Object.isFrozen,re=Object.getPrototypeOf,ie=Object.getOwnPropertyDescriptor,h=Object.freeze,g=Object.seal,ae=Object.create,oe=typeof Reflect<`u`&&Reflect,_=oe.apply,se=oe.construct;h||=function(e){return e},g||=function(e){return e},_||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},se||=function(e){return new e(...[...arguments].slice(1))};var ce=C(Array.prototype.forEach);Array.prototype.indexOf;var le=C(Array.prototype.lastIndexOf),ue=C(Array.prototype.pop),de=C(Array.prototype.push);Array.prototype.slice;var fe=C(Array.prototype.splice),pe=Array.isArray,me=C(String.prototype.toLowerCase),he=C(String.prototype.toString),ge=C(String.prototype.match),_e=C(String.prototype.replace),ve=C(String.prototype.indexOf),ye=C(String.prototype.trim),be=C(Number.prototype.toString),xe=C(Boolean.prototype.toString),Se=typeof BigInt>`u`?null:C(BigInt.prototype.toString),v=typeof Symbol>`u`?null:C(Symbol.prototype.toString),y=C(Object.prototype.hasOwnProperty),b=C(Object.prototype.toString),x=C(RegExp.prototype.test),S=Ce(TypeError);function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return _(e,t,n)}}function Ce(e){return function(){return se(e,[...arguments])}}function w(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me;if(te&&te(e,null),!pe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ne(t)||(t[r]=e),i=e)}e[i]=!0}return e}function we(e){for(let t=0;t<e.length;t++)y(e,t)||(e[t]=null);return e}function T(e){let t=ae(null);for(let r of ee(e)){var n=f(r,2);let i=n[0],a=n[1];y(e,i)&&(t[i]=pe(a)?we(a):a&&typeof a==`object`&&a.constructor===Object?T(a):a)}return t}function Te(e){switch(typeof e){case`string`:return e;case`number`:return be(e);case`boolean`:return xe(e);case`bigint`:return Se?Se(e):`0`;case`symbol`:return v?v(e):`Symbol()`;case`undefined`:return b(e);case`function`:case`object`:{if(e===null)return b(e);let t=e,n=E(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:b(e)}return b(e)}default:return b(e)}}function E(e,t){for(;e!==null;){let n=ie(e,t);if(n){if(n.get)return C(n.get);if(typeof n.value==`function`)return C(n.value)}e=re(e)}function n(){return null}return n}function Ee(e){try{return x(e,``),!0}catch{return!1}}var De=h(`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`.split(`.`)),Oe=h(`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`.split(`.`)),ke=h([`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`]),Ae=h([`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`]),je=h(`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`.split(`.`)),Me=h([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ne=h([`#text`]),Pe=h(`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`.split(`.`)),Fe=h(`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.dominant-baseline.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.pointer-events.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.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`.split(`.`)),Ie=h(`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`.split(`.`)),Le=h([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Re=g(/{{[\w\W]*|^[\w\W]*}}/g),ze=g(/<%[\w\W]*|^[\w\W]*%>/g),Be=g(/\${[\w\W]*/g),Ve=g(/^data-[\-\w.\u00B7-\uFFFF]+$/),He=g(/^aria-[\-\w]+$/),Ue=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),We=g(/^(?:\w+script|data):/i),Ge=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ke=g(/^html$/i),qe=g(/^[a-z][.\w]*(-[.\w]+)+$/i),Je=g(/<[/\w!]/g),Ye=g(/<[/\w]/g),Xe=g(/<\/no(script|embed|frames)/i),Ze=g(/\/>/i),D={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qe=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],$e=h(w({},Qe)),et=function(){let e={};return ce(Qe,t=>{e[t]=g(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),h(e)}(),tt=function(){return typeof window>`u`?null:window},nt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},O=function(e,t,n,r){return y(e,t)&&pe(e[t])?w(r.base?T(r.base):{},e[t],r.transform):n},it=function(e,t,n){let r=y(e,t)?e[t]:void 0;return r&&typeof r==`object`?T(r):n()};function at(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt(),t=e=>at(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==D.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=E(d,`cloneNode`),p=E(d,`remove`),m=E(d,`removeAttributeNode`),te=E(d,`nextSibling`),ne=E(d,`childNodes`),re=E(d,`parentNode`),ie=E(d,`shadowRoot`),oe=E(d,`attributes`),_=o&&o.prototype?E(o.prototype,`nodeType`):null,se=o&&o.prototype?E(o.prototype,`nodeName`):null,be=o&&o.prototype?E(o.prototype,`ownerDocument`):null,xe=function(e){return _?_(e):e.nodeType},Se=function(e){return se?se(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,b=``,C,Ce=!1,we=0,Qe=function(){if(we>0)throw S(`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.`)},ot=function(e){Qe(),we++;try{return v.createHTML(e)}finally{we--}},st=function(e){Qe(),we++;try{return v.createScriptURL(e)}finally{we--}},ct=function(){return Ce||=(C=nt(u,i),!0),C},lt=n,k=lt.implementation,A=lt.createNodeIterator,j=lt.createDocumentFragment,ut=lt.getElementsByTagName,M=r.importNode,N=rt();t.isSupported=typeof ee==`function`&&typeof re==`function`&&k&&k.createHTMLDocument!==void 0;let dt=Re,ft=ze,pt=Be,mt=Ve,ht=He,gt=We,_t=Ge,vt=qe,yt=Ue,P=null,bt=w({},[...De,...Oe,...ke,...je,...Ne]),F=null,xt=w({},[...Pe,...Fe,...Ie,...Le]),I=Object.seal(ae(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}})),L=null,St=null,R=Object.seal(ae(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ct=!0,wt=!0,Tt=!1,Et=!0,z=!1,Dt=!0,Ot=!1,kt=!1,At=null,jt=null,B=!1,V=!1,H=!1,Mt=!1,Nt=!0,Pt=!1,Ft=`user-content-`,It=!0,Lt=!1,U={},Rt=null,zt=w({},`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`.split(`.`)),Bt=null,Vt=w({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ht=null,Ut=w({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Wt=`http://www.w3.org/1998/Math/MathML`,Gt=`http://www.w3.org/2000/svg`,W=`http://www.w3.org/1999/xhtml`,Kt=W,qt=!1,Jt=null,Yt=w({},[Wt,Gt,W],he),Xt=h([`mi`,`mo`,`mn`,`ms`,`mtext`]),Zt=w({},Xt),Qt=h([`annotation-xml`]),$t=w({},Qt),en=w({},[`title`,`style`,`font`,`a`,`script`]),tn=null,nn=[`application/xhtml+xml`,`text/html`],G=null,rn=null,an=n.createElement(`form`),on=function(e){return e instanceof RegExp||e instanceof Function},sn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rn&&rn===e)return;(!e||typeof e!=`object`)&&(e={}),e=T(e),tn=nn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,G=tn===`application/xhtml+xml`?he:me,P=O(e,`ALLOWED_TAGS`,bt,{transform:G}),F=O(e,`ALLOWED_ATTR`,xt,{transform:G}),Jt=O(e,`ALLOWED_NAMESPACES`,Yt,{transform:he}),Ht=O(e,`ADD_URI_SAFE_ATTR`,Ut,{transform:G,base:Ut}),Bt=O(e,`ADD_DATA_URI_TAGS`,Vt,{transform:G,base:Vt}),Rt=O(e,`FORBID_CONTENTS`,zt,{transform:G}),L=O(e,`FORBID_TAGS`,T({}),{transform:G}),St=O(e,`FORBID_ATTR`,T({}),{transform:G}),U=y(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?T(e.USE_PROFILES):e.USE_PROFILES:!1,Ct=e.ALLOW_ARIA_ATTR!==!1,wt=e.ALLOW_DATA_ATTR!==!1,Tt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=e.SAFE_FOR_TEMPLATES||!1,Dt=e.SAFE_FOR_XML!==!1,Ot=e.WHOLE_DOCUMENT||!1,V=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,Mt=e.RETURN_TRUSTED_TYPE||!1,B=e.FORCE_BODY||!1,Nt=e.SANITIZE_DOM!==!1,Pt=e.SANITIZE_NAMED_PROPS||!1,It=e.KEEP_CONTENT!==!1,Lt=e.IN_PLACE||!1,yt=Ee(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ue,Kt=typeof e.NAMESPACE==`string`?e.NAMESPACE:W,Zt=it(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>w({},Xt)),$t=it(e,`HTML_INTEGRATION_POINTS`,()=>w({},Qt));let t=it(e,`CUSTOM_ELEMENT_HANDLING`,()=>ae(null));if(I=ae(null),y(t,`tagNameCheck`)&&on(t.tagNameCheck)&&(I.tagNameCheck=t.tagNameCheck),y(t,`attributeNameCheck`)&&on(t.attributeNameCheck)&&(I.attributeNameCheck=t.attributeNameCheck),y(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(I.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),g(I),z&&(wt=!1),H&&(V=!0),U&&(P=w({},Ne),F=ae(null),U.html===!0&&(w(P,De),w(F,Pe)),U.svg===!0&&(w(P,Oe),w(F,Fe),w(F,Le)),U.svgFilters===!0&&(w(P,ke),w(F,Fe),w(F,Le)),U.mathMl===!0&&(w(P,je),w(F,Ie),w(F,Le))),R.tagCheck=null,R.attributeCheck=null,y(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?R.tagCheck=e.ADD_TAGS:pe(e.ADD_TAGS)&&(P===bt&&(P=T(P)),w(P,e.ADD_TAGS,G))),y(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?R.attributeCheck=e.ADD_ATTR:pe(e.ADD_ATTR)&&(F===xt&&(F=T(F)),w(F,e.ADD_ATTR,G))),y(e,`ADD_FORBID_CONTENTS`)&&pe(e.ADD_FORBID_CONTENTS)&&(Rt===zt&&(Rt=T(Rt)),w(Rt,e.ADD_FORBID_CONTENTS,G)),It&&(P[`#text`]=!0),Ot&&w(P,[`html`,`head`,`body`]),P.table&&(w(P,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw S(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw S(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=v;v=e.TRUSTED_TYPES_POLICY;try{b=ot(``)}catch(e){throw v=t,e}}else e.TRUSTED_TYPES_POLICY===null?(v=void 0,b=``):(v===void 0&&(v=ct()),v&&typeof b==`string`&&(b=ot(``)));h&&h(e),rn=e},cn=w({},[...Oe,...ke,...Ae]),ln=w({},[...je,...Me]),un=function(e,t,n){return t.namespaceURI===W?e===`svg`:t.namespaceURI===Wt?e===`svg`&&(n===`annotation-xml`||Zt[n]):!!cn[e]},dn=function(e,t,n){return t.namespaceURI===W?e===`math`:t.namespaceURI===Gt?e===`math`&&$t[n]:!!ln[e]},fn=function(e,t,n){return t.namespaceURI===Gt&&!$t[n]||t.namespaceURI===Wt&&!Zt[n]?!1:!ln[e]&&(en[e]||!cn[e])},pn=function(e){let t=re(e);(!t||!t.tagName)&&(t={namespaceURI:Kt,tagName:`template`});let n=me(e.tagName),r=me(t.tagName);return Jt[e.namespaceURI]?e.namespaceURI===Gt?un(n,t,r):e.namespaceURI===Wt?dn(n,t,r):e.namespaceURI===W?fn(n,t,r):!!(tn===`application/xhtml+xml`&&Jt[e.namespaceURI]):!1},K=function(e){de(t.removed,{element:e});try{re(e).removeChild(e)}catch{if(p(e),!re(e))throw S(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},mn=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},q=function(e){_n(e);let t=ne(e);if(t){let e=[];ce(t,t=>{de(e,t)}),ce(e,e=>{try{p(e)}catch{}})}let n=oe(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&mn(e,r,i)}},hn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}de(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(V||H)try{K(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},gn=function(e){let t=oe(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||F[G(i)]||mn(e,r,i)}},_n=function(e){let t=[e];for(;t.length>0;){let e=t.pop();xe(e)===D.element&&gn(e);let n=ne(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},J=function(e,t){return Dt?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},vn=function(e){if(!Dt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=xe(e);if(n===D.processingInstruction||n===D.comment&&x(Ye,e.data)){try{p(e)}catch{}continue}if(n===D.element){let t=e,n=G(Se(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&J(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=ne(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},yn=function(e){let t=null,r=null;if(B)e=`<remove></remove>`+e;else{let t=ge(e,/^[\r\n\t ]+/);r=t&&t[0]}tn===`application/xhtml+xml`&&Kt===W&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?ot(e):e;if(Kt===W)try{t=new l().parseFromString(i,tn)}catch{}if(!t||!t.documentElement){t=k.createDocument(Kt,`template`,null);try{t.documentElement.innerHTML=qt?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Kt===W?ut.call(t,Ot?`html`:`body`)[0]:Ot?t.documentElement:a},bn=function(e){let t=be?be(e):e.ownerDocument;return A.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xn=function(e){return e=_e(e,dt,` `),e=_e(e,ft,` `),e=_e(e,pt,` `),e},Sn=function(e){e.normalize();let t=be?be(e):e.ownerDocument,n=A.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=xn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ce(i,e=>{wn(e.content)&&Sn(e.content)})},Cn=function(e){let t=se?se(e):null;return typeof t!=`string`||G(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==oe(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==_(e)||e.childNodes!==ne(e)},wn=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return _(e)===D.documentFragment}catch{return!1}},Y=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return typeof _(e)==`number`}catch{return!1}};function X(e,n,r){e.length!==0&&ce(e,e=>{e.call(t,n,r,rn)})}let Tn=function(e,t){return!!(Dt&&e.hasChildNodes()&&!Y(e.firstElementChild)&&x(Je,e.textContent)&&x(Je,e.innerHTML)||Dt&&e.namespaceURI===W&&$e[t]&&(Y(e.firstElementChild)||typeof e.textContent==`string`&&x(et[t],e.textContent))||e.nodeType===D.processingInstruction||Dt&&e.nodeType===D.comment&&x(Ye,e.data))},En=function(e,t){return e instanceof RegExp?x(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Z=function(e,t,n){if(!L[t]&&An(t)&&En(I.tagNameCheck,t))return!1;if(It&&!Rt[t]){let t=re(e),r=ne(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return K(e),!0},Dn=function(e,t,n,r){return e.length===0?t:t===n||t===r?T(t):t},Q=function(e,t){return e===t||re(e)!==null?!1:(Lt&&_n(e),!0)},$=function(e,n){if(X(N.beforeSanitizeElements,e,null),Q(e,n))return!0;if(Cn(e))return K(e),!0;let r=G(Se(e));if(P=Dn(N.uponSanitizeElement,P,bt,At),X(N.uponSanitizeElement,e,{tagName:r,allowedTags:P}),Q(e,n))return!0;if(Tn(e,r))return K(e),!0;if(L[r]||!(R.tagCheck instanceof Function&&R.tagCheck(r))&&!P[r]){let t=Z(e,r,n);return t===!1&&(X(N.afterSanitizeElements,e,null),Q(e,n))?!0:t}if(xe(e)===D.element&&!pn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&x(Xe,e.innerHTML))return K(e),!0;if(z&&e.nodeType===D.text){let n=xn(e.textContent);e.textContent!==n&&(de(t.removed,{element:e.cloneNode()}),e.textContent=n)}return X(N.afterSanitizeElements,e,null),Q(e,n)},On=function(e,t,r){if(St[t]||J(t,e)||Nt&&(t===`id`||t===`name`)&&(r in n||r in an))return!1;let i=F[t]||R.attributeCheck instanceof Function&&R.attributeCheck(t,e);return wt&&x(mt,t)||Ct&&x(ht,t)?!0:i?Ht[t]||x(yt,_e(r,_t,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ve(r,`data:`)===0&&Bt[e]||Tt&&!x(gt,_e(r,_t,``))?!0:!r:An(e)&&En(I.tagNameCheck,e)&&En(I.attributeNameCheck,t,e)||t===`is`&&I.allowCustomizedBuiltInElements&&En(I.tagNameCheck,r)},kn=w({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[me(e)]&&x(vt,e)},jn=function(e,t,n,r){if(v&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ot(r);case`TrustedScriptURL`:return st(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Cn(e)||(K(e),!1)}catch{return hn(t,e),!1}},Nn=function(e,n){if(X(N.beforeSanitizeAttributes,e,null),Q(e,n))return;let r=e.attributes;if(!r||Cn(e))return;F=Dn(N.uponSanitizeAttribute,F,xt,jt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},a=r.length,o=G(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=G(s),d=l,f=s===`value`?d:ye(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,X(N.uponSanitizeAttribute,e,i),f=i.attrValue,Pt&&(u===`id`||u===`name`)&&ve(f,Ft)!==0&&(hn(s,e,n),f=Ft+f,p=!0),Dt&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){hn(s,e,n);continue}if(u===`attributename`&&ge(f,`href`)){hn(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){hn(s,e,n);continue}if(!Et&&x(Ze,f)){hn(s,e,n);continue}if(z&&(f=xn(f)),!On(o,u,f)){hn(s,e,n);continue}f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&ue(t.removed)}}X(N.afterSanitizeAttributes,e,null),Q(e,n)},Pn=function(e){let t=null,n=bn(e);for(X(N.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(X(N.uponSanitizeShadowNode,t,null),$(t,e),Nn(t,e),wn(t.content)&&Pn(t.content),xe(t)===D.element){let e=ie(t);wn(e)&&(Fn(e),Pn(e))}X(N.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=xe(n)===D.element,i=ne(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=se?se(n):null;if(typeof e==`string`&&G(e)===`template`){let e=n.content;wn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ie(n);wn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(qt=!e,qt&&(e=`<!-->`),typeof e!=`string`&&!Y(e)&&(e=Te(e),typeof e!=`string`))throw S(`dirty is not a string, aborting`);if(!t.isSupported)return e;kt?(P=At,F=jt):sn(n),(N.uponSanitizeElement.length>0||N.uponSanitizeAttribute.length>0)&&(P=T(P)),N.uponSanitizeAttribute.length>0&&(F=T(F)),t.removed=[];let c=Lt&&typeof e!=`string`&&Y(e);if(c){vn(e);let t=Se(e);if(typeof t==`string`){let n=G(t);if(!P[n]||L[n])throw q(e),S(`root node is forbidden and cannot be sanitized in-place`)}if(Cn(e))throw q(e),S(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw q(e),t}}else if(Y(e))i=yn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===D.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!V&&!z&&!Ot&&e.indexOf(`<`)===-1)return v&&Mt?ot(e):e;if(i=yn(e),!i)return V?null:Mt?b:``}i&&B&&K(i.firstChild);let l=c?e:i;try{let e=bn(l);for(;o=e.nextNode();)$(o,l),Nn(o,l),wn(o.content)&&Pn(o.content)}catch(n){throw c&&(q(e),ce(t.removed,e=>{e.element&&_n(e.element)})),n}if(c){let n=!1;if(ce(t.removed,t=>{t.element&&(t.element===e&&(n=!0),_n(t.element))}),n)throw S(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return z&&Sn(e),e}if(V){if(z&&Sn(i),H)for(s=j.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=M.call(r,s,!0)),s}let u=Ot?i.outerHTML:i.innerHTML;return Ot&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&x(Ke,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
1
|
+
import{i as e,n as t,o as n,r,t as i}from"./cn-BwE4cei0.js";var a={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};a.node;var o=t(a);function s(e,t){this.v=e,this.k=t}function c(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e){if(Array.isArray(e))return e}function u(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function d(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(e,t){return l(e)||u(e,t)||p(e,t)||d()}function p(e,t){if(e){if(typeof e==`string`)return c(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function m(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,c=o instanceof s;Promise.resolve(c?o.v:o).then(function(n){if(c){var s=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(s,n);n=e[s](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}m.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},m.prototype.next=function(e){return this._invoke(`next`,e)},m.prototype.throw=function(e){return this._invoke(`throw`,e)},m.prototype.return=function(e){return this._invoke(`return`,e)};var ee=Object.entries,te=Object.setPrototypeOf,ne=Object.isFrozen,re=Object.getPrototypeOf,ie=Object.getOwnPropertyDescriptor,h=Object.freeze,g=Object.seal,ae=Object.create,oe=typeof Reflect<`u`&&Reflect,_=oe.apply,se=oe.construct;h||=function(e){return e},g||=function(e){return e},_||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},se||=function(e){return new e(...[...arguments].slice(1))};var ce=C(Array.prototype.forEach);Array.prototype.indexOf;var le=C(Array.prototype.lastIndexOf),ue=C(Array.prototype.pop),de=C(Array.prototype.push);Array.prototype.slice;var fe=C(Array.prototype.splice),pe=Array.isArray,me=C(String.prototype.toLowerCase),he=C(String.prototype.toString),ge=C(String.prototype.match),_e=C(String.prototype.replace),ve=C(String.prototype.indexOf),ye=C(String.prototype.trim),be=C(Number.prototype.toString),xe=C(Boolean.prototype.toString),Se=typeof BigInt>`u`?null:C(BigInt.prototype.toString),v=typeof Symbol>`u`?null:C(Symbol.prototype.toString),y=C(Object.prototype.hasOwnProperty),b=C(Object.prototype.toString),x=C(RegExp.prototype.test),S=Ce(TypeError);function C(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return _(e,t,n)}}function Ce(e){return function(){return se(e,[...arguments])}}function w(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me;if(te&&te(e,null),!pe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ne(t)||(t[r]=e),i=e)}e[i]=!0}return e}function we(e){for(let t=0;t<e.length;t++)y(e,t)||(e[t]=null);return e}function T(e){let t=ae(null);for(let r of ee(e)){var n=f(r,2);let i=n[0],a=n[1];y(e,i)&&(t[i]=pe(a)?we(a):a&&typeof a==`object`&&a.constructor===Object?T(a):a)}return t}function Te(e){switch(typeof e){case`string`:return e;case`number`:return be(e);case`boolean`:return xe(e);case`bigint`:return Se?Se(e):`0`;case`symbol`:return v?v(e):`Symbol()`;case`undefined`:return b(e);case`function`:case`object`:{if(e===null)return b(e);let t=e,n=E(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:b(e)}return b(e)}default:return b(e)}}function E(e,t){for(;e!==null;){let n=ie(e,t);if(n){if(n.get)return C(n.get);if(typeof n.value==`function`)return C(n.value)}e=re(e)}function n(){return null}return n}function Ee(e){try{return x(e,``),!0}catch{return!1}}var De=h(`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`.split(`.`)),Oe=h(`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`.split(`.`)),ke=h([`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`]),Ae=h([`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`]),je=h(`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`.split(`.`)),Me=h([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ne=h([`#text`]),Pe=h(`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`.split(`.`)),Fe=h(`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.dominant-baseline.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.pointer-events.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-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.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`.split(`.`)),Ie=h(`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`.split(`.`)),Le=h([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Re=g(/{{[\w\W]*|^[\w\W]*}}/g),ze=g(/<%[\w\W]*|^[\w\W]*%>/g),Be=g(/\${[\w\W]*/g),Ve=g(/^data-[\-\w.\u00B7-\uFFFF]+$/),He=g(/^aria-[\-\w]+$/),Ue=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),We=g(/^(?:\w+script|data):/i),Ge=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ke=g(/^html$/i),qe=g(/^[a-z][.\w]*(-[.\w]+)+$/i),Je=g(/<[/\w!]/g),Ye=g(/<[/\w]/g),Xe=g(/<\/no(script|embed|frames)/i),Ze=g(/\/>/i),D={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qe=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],$e=h(w({},Qe)),et=function(){let e={};return ce(Qe,t=>{e[t]=g(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),h(e)}(),tt=function(){return typeof window>`u`?null:window},nt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},rt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},O=function(e,t,n,r){return y(e,t)&&pe(e[t])?w(r.base?T(r.base):{},e[t],r.transform):n},it=function(e,t,n){let r=y(e,t)?e[t]:void 0;return r&&typeof r==`object`?T(r):n()};function at(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt(),t=e=>at(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==D.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=E(d,`cloneNode`),p=E(d,`remove`),m=E(d,`removeAttributeNode`),te=E(d,`nextSibling`),ne=E(d,`childNodes`),re=E(d,`parentNode`),ie=E(d,`shadowRoot`),oe=E(d,`attributes`),_=o&&o.prototype?E(o.prototype,`nodeType`):null,se=o&&o.prototype?E(o.prototype,`nodeName`):null,be=o&&o.prototype?E(o.prototype,`ownerDocument`):null,xe=function(e){return _?_(e):e.nodeType},Se=function(e){return se?se(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,b=``,C,Ce=!1,we=0,Qe=function(){if(we>0)throw S(`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.`)},ot=function(e){Qe(),we++;try{return v.createHTML(e)}finally{we--}},st=function(e){Qe(),we++;try{return v.createScriptURL(e)}finally{we--}},ct=function(){return Ce||=(C=nt(u,i),!0),C},lt=n,k=lt.implementation,A=lt.createNodeIterator,j=lt.createDocumentFragment,ut=lt.getElementsByTagName,M=r.importNode,N=rt();t.isSupported=typeof ee==`function`&&typeof re==`function`&&k&&k.createHTMLDocument!==void 0;let dt=Re,ft=ze,pt=Be,mt=Ve,ht=He,gt=We,_t=Ge,vt=qe,yt=Ue,P=null,bt=w({},[...De,...Oe,...ke,...je,...Ne]),F=null,xt=w({},[...Pe,...Fe,...Ie,...Le]),I=Object.seal(ae(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}})),L=null,St=null,R=Object.seal(ae(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ct=!0,wt=!0,Tt=!1,Et=!0,z=!1,Dt=!0,Ot=!1,kt=!1,At=null,jt=null,B=!1,V=!1,H=!1,Mt=!1,Nt=!0,Pt=!1,Ft=`user-content-`,It=!0,Lt=!1,U={},Rt=null,zt=w({},`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`.split(`.`)),Bt=null,Vt=w({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ht=null,Ut=w({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Wt=`http://www.w3.org/1998/Math/MathML`,Gt=`http://www.w3.org/2000/svg`,W=`http://www.w3.org/1999/xhtml`,Kt=W,qt=!1,Jt=null,Yt=w({},[Wt,Gt,W],he),Xt=h([`mi`,`mo`,`mn`,`ms`,`mtext`]),Zt=w({},Xt),Qt=h([`annotation-xml`]),$t=w({},Qt),en=w({},[`title`,`style`,`font`,`a`,`script`]),tn=null,nn=[`application/xhtml+xml`,`text/html`],G=null,rn=null,an=n.createElement(`form`),on=function(e){return e instanceof RegExp||e instanceof Function},sn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rn&&rn===e)return;e&&typeof e==`object`||(e={}),e=T(e),tn=nn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,G=tn===`application/xhtml+xml`?he:me,P=O(e,`ALLOWED_TAGS`,bt,{transform:G}),F=O(e,`ALLOWED_ATTR`,xt,{transform:G}),Jt=O(e,`ALLOWED_NAMESPACES`,Yt,{transform:he}),Ht=O(e,`ADD_URI_SAFE_ATTR`,Ut,{transform:G,base:Ut}),Bt=O(e,`ADD_DATA_URI_TAGS`,Vt,{transform:G,base:Vt}),Rt=O(e,`FORBID_CONTENTS`,zt,{transform:G}),L=O(e,`FORBID_TAGS`,T({}),{transform:G}),St=O(e,`FORBID_ATTR`,T({}),{transform:G}),U=y(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?T(e.USE_PROFILES):e.USE_PROFILES:!1,Ct=e.ALLOW_ARIA_ATTR!==!1,wt=e.ALLOW_DATA_ATTR!==!1,Tt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=e.SAFE_FOR_TEMPLATES||!1,Dt=e.SAFE_FOR_XML!==!1,Ot=e.WHOLE_DOCUMENT||!1,V=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,Mt=e.RETURN_TRUSTED_TYPE||!1,B=e.FORCE_BODY||!1,Nt=e.SANITIZE_DOM!==!1,Pt=e.SANITIZE_NAMED_PROPS||!1,It=e.KEEP_CONTENT!==!1,Lt=e.IN_PLACE||!1,yt=Ee(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ue,Kt=typeof e.NAMESPACE==`string`?e.NAMESPACE:W,Zt=it(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>w({},Xt)),$t=it(e,`HTML_INTEGRATION_POINTS`,()=>w({},Qt));let t=it(e,`CUSTOM_ELEMENT_HANDLING`,()=>ae(null));if(I=ae(null),y(t,`tagNameCheck`)&&on(t.tagNameCheck)&&(I.tagNameCheck=t.tagNameCheck),y(t,`attributeNameCheck`)&&on(t.attributeNameCheck)&&(I.attributeNameCheck=t.attributeNameCheck),y(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(I.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),g(I),z&&(wt=!1),H&&(V=!0),U&&(P=w({},Ne),F=ae(null),U.html===!0&&(w(P,De),w(F,Pe)),U.svg===!0&&(w(P,Oe),w(F,Fe),w(F,Le)),U.svgFilters===!0&&(w(P,ke),w(F,Fe),w(F,Le)),U.mathMl===!0&&(w(P,je),w(F,Ie),w(F,Le))),R.tagCheck=null,R.attributeCheck=null,y(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?R.tagCheck=e.ADD_TAGS:pe(e.ADD_TAGS)&&(P===bt&&(P=T(P)),w(P,e.ADD_TAGS,G))),y(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?R.attributeCheck=e.ADD_ATTR:pe(e.ADD_ATTR)&&(F===xt&&(F=T(F)),w(F,e.ADD_ATTR,G))),y(e,`ADD_FORBID_CONTENTS`)&&pe(e.ADD_FORBID_CONTENTS)&&(Rt===zt&&(Rt=T(Rt)),w(Rt,e.ADD_FORBID_CONTENTS,G)),It&&(P[`#text`]=!0),Ot&&w(P,[`html`,`head`,`body`]),P.table&&(w(P,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw S(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw S(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=v;v=e.TRUSTED_TYPES_POLICY;try{b=ot(``)}catch(e){throw v=t,e}}else e.TRUSTED_TYPES_POLICY===null?(v=void 0,b=``):(v===void 0&&(v=ct()),v&&typeof b==`string`&&(b=ot(``)));h&&h(e),rn=e},cn=w({},[...Oe,...ke,...Ae]),ln=w({},[...je,...Me]),un=function(e,t,n){return t.namespaceURI===W?e===`svg`:t.namespaceURI===Wt?e===`svg`&&(n===`annotation-xml`||Zt[n]):!!cn[e]},dn=function(e,t,n){return t.namespaceURI===W?e===`math`:t.namespaceURI===Gt?e===`math`&&$t[n]:!!ln[e]},fn=function(e,t,n){return t.namespaceURI===Gt&&!$t[n]||t.namespaceURI===Wt&&!Zt[n]?!1:!ln[e]&&(en[e]||!cn[e])},pn=function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:Kt,tagName:`template`});let n=me(e.tagName),r=me(t.tagName);return Jt[e.namespaceURI]?e.namespaceURI===Gt?un(n,t,r):e.namespaceURI===Wt?dn(n,t,r):e.namespaceURI===W?fn(n,t,r):!!(tn===`application/xhtml+xml`&&Jt[e.namespaceURI]):!1},K=function(e){de(t.removed,{element:e});try{re(e).removeChild(e)}catch{if(p(e),!re(e))throw S(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},mn=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},q=function(e){_n(e);let t=ne(e);if(t){let e=[];ce(t,t=>{de(e,t)}),ce(e,e=>{try{p(e)}catch{}})}let n=oe(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&mn(e,r,i)}},hn=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}de(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(V||H)try{K(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},gn=function(e){let t=oe(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||F[G(i)]||mn(e,r,i)}},_n=function(e){let t=[e];for(;t.length>0;){let e=t.pop();xe(e)===D.element&&gn(e);let n=ne(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},J=function(e,t){return Dt?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},vn=function(e){if(!Dt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=xe(e);if(n===D.processingInstruction||n===D.comment&&x(Ye,e.data)){try{p(e)}catch{}continue}if(n===D.element){let t=e,n=G(Se(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&J(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=ne(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},yn=function(e){let t=null,r=null;if(B)e=`<remove></remove>`+e;else{let t=ge(e,/^[\r\n\t ]+/);r=t&&t[0]}tn===`application/xhtml+xml`&&Kt===W&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?ot(e):e;if(Kt===W)try{t=new l().parseFromString(i,tn)}catch{}if(!t||!t.documentElement){t=k.createDocument(Kt,`template`,null);try{t.documentElement.innerHTML=qt?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Kt===W?ut.call(t,Ot?`html`:`body`)[0]:Ot?t.documentElement:a},bn=function(e){let t=be?be(e):e.ownerDocument;return A.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xn=function(e){return e=_e(e,dt,` `),e=_e(e,ft,` `),e=_e(e,pt,` `),e},Sn=function(e){e.normalize();let t=be?be(e):e.ownerDocument,n=A.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=xn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ce(i,e=>{wn(e.content)&&Sn(e.content)})},Cn=function(e){let t=se?se(e):null;return typeof t!=`string`||G(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==oe(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==_(e)||e.childNodes!==ne(e)},wn=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return _(e)===D.documentFragment}catch{return!1}},Y=function(e){if(!_||typeof e!=`object`||!e)return!1;try{return typeof _(e)==`number`}catch{return!1}};function X(e,n,r){e.length!==0&&ce(e,e=>{e.call(t,n,r,rn)})}let Tn=function(e,t){return!!(Dt&&e.hasChildNodes()&&!Y(e.firstElementChild)&&x(Je,e.textContent)&&x(Je,e.innerHTML)||Dt&&e.namespaceURI===W&&$e[t]&&(Y(e.firstElementChild)||typeof e.textContent==`string`&&x(et[t],e.textContent))||e.nodeType===D.processingInstruction||Dt&&e.nodeType===D.comment&&x(Ye,e.data))},En=function(e,t){return e instanceof RegExp?x(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Z=function(e,t,n){if(!L[t]&&An(t)&&En(I.tagNameCheck,t))return!1;if(It&&!Rt[t]){let t=re(e),r=ne(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return K(e),!0},Dn=function(e,t,n,r){return e.length===0?t:t===n||t===r?T(t):t},Q=function(e,t){return e===t||re(e)!==null?!1:(Lt&&_n(e),!0)},$=function(e,n){if(X(N.beforeSanitizeElements,e,null),Q(e,n))return!0;if(Cn(e))return K(e),!0;let r=G(Se(e));if(P=Dn(N.uponSanitizeElement,P,bt,At),X(N.uponSanitizeElement,e,{tagName:r,allowedTags:P}),Q(e,n))return!0;if(Tn(e,r))return K(e),!0;if(L[r]||!(R.tagCheck instanceof Function&&R.tagCheck(r))&&!P[r]){let t=Z(e,r,n);return t===!1&&(X(N.afterSanitizeElements,e,null),Q(e,n))?!0:t}if(xe(e)===D.element&&!pn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&x(Xe,e.innerHTML))return K(e),!0;if(z&&e.nodeType===D.text){let n=xn(e.textContent);e.textContent!==n&&(de(t.removed,{element:e.cloneNode()}),e.textContent=n)}return X(N.afterSanitizeElements,e,null),Q(e,n)},On=function(e,t,r){if(St[t]||J(t,e)||Nt&&(t===`id`||t===`name`)&&(r in n||r in an))return!1;let i=F[t]||R.attributeCheck instanceof Function&&R.attributeCheck(t,e);return wt&&x(mt,t)||Ct&&x(ht,t)?!0:i?Ht[t]||x(yt,_e(r,_t,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ve(r,`data:`)===0&&Bt[e]||Tt&&!x(gt,_e(r,_t,``))?!0:!r:An(e)&&En(I.tagNameCheck,e)&&En(I.attributeNameCheck,t,e)||t===`is`&&I.allowCustomizedBuiltInElements&&En(I.tagNameCheck,r)},kn=w({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),An=function(e){return!kn[me(e)]&&x(vt,e)},jn=function(e,t,n,r){if(v&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ot(r);case`TrustedScriptURL`:return st(r)}return r},Mn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Cn(e)||(K(e),!1)}catch{return hn(t,e),!1}},Nn=function(e,n){if(X(N.beforeSanitizeAttributes,e,null),Q(e,n))return;let r=e.attributes;if(!r||Cn(e))return;F=Dn(N.uponSanitizeAttribute,F,xt,jt);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},a=r.length,o=G(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=G(s),d=l,f=s===`value`?d:ye(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,X(N.uponSanitizeAttribute,e,i),f=i.attrValue,Pt&&(u===`id`||u===`name`)&&ve(f,Ft)!==0&&(hn(s,e,n),f=Ft+f,p=!0),Dt&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)||u===`attributename`&&ge(f,`href`)?hn(s,e,n):i.forceKeepAttr||(i.keepAttr?!Et&&x(Ze,f)?hn(s,e,n):(z&&(f=xn(f)),On(o,u,f)?(f=jn(o,u,c,f),f!==d&&Mn(e,s,c,f)&&p&&ue(t.removed)):hn(s,e,n)):hn(s,e,n))}X(N.afterSanitizeAttributes,e,null),Q(e,n)},Pn=function(e){let t=null,n=bn(e);for(X(N.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(X(N.uponSanitizeShadowNode,t,null),$(t,e),Nn(t,e),wn(t.content)&&Pn(t.content),xe(t)===D.element){let e=ie(t);wn(e)&&(Fn(e),Pn(e))}X(N.afterSanitizeShadowDOM,e,null)},Fn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pn(e.shadow);continue}let n=e.node,r=xe(n)===D.element,i=ne(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=se?se(n):null;if(typeof e==`string`&&G(e)===`template`){let e=n.content;wn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ie(n);wn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(qt=!e,qt&&(e=`<!-->`),typeof e!=`string`&&!Y(e)&&(e=Te(e),typeof e!=`string`))throw S(`dirty is not a string, aborting`);if(!t.isSupported)return e;kt?(P=At,F=jt):sn(n),(N.uponSanitizeElement.length>0||N.uponSanitizeAttribute.length>0)&&(P=T(P)),N.uponSanitizeAttribute.length>0&&(F=T(F)),t.removed=[];let c=Lt&&typeof e!=`string`&&Y(e);if(c){vn(e);let t=Se(e);if(typeof t==`string`){let n=G(t);if(!P[n]||L[n])throw q(e),S(`root node is forbidden and cannot be sanitized in-place`)}if(Cn(e))throw q(e),S(`root node is clobbered and cannot be sanitized in-place`);try{Fn(e)}catch(t){throw q(e),t}}else if(Y(e))i=yn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===D.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Fn(i);else{if(!V&&!z&&!Ot&&e.indexOf(`<`)===-1)return v&&Mt?ot(e):e;if(i=yn(e),!i)return V?null:Mt?b:``}i&&B&&K(i.firstChild);let l=c?e:i;try{let e=bn(l);for(;o=e.nextNode();)$(o,l),Nn(o,l),wn(o.content)&&Pn(o.content)}catch(n){throw c&&(q(e),ce(t.removed,e=>{e.element&&_n(e.element)})),n}if(c){let n=!1;if(ce(t.removed,t=>{t.element&&(t.element===e&&(n=!0),_n(t.element))}),n)throw S(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return z&&Sn(e),e}if(V){if(z&&Sn(i),H)for(s=j.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(F.shadowroot||F.shadowrootmode)&&(s=M.call(r,s,!0)),s}let u=Ot?i.outerHTML:i.innerHTML;return Ot&&P[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&x(Ke,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
3
|
`+u),z&&(u=xn(u)),v&&Mt?ot(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};sn(e),kt=!0,At=P,jt=F},t.clearConfig=function(){rn=null,kt=!1,At=null,jt=null,v=C,b=``},t.isValidAttribute=function(e,t,n){rn||sn({});let r=G(e),i=G(t);return On(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&y(N,e)&&de(N[e],t)},t.removeHook=function(e,t){if(y(N,e)){if(t!==void 0){let n=le(N[e],t);return n===-1?void 0:fe(N[e],n,1)[0]}return ue(N[e])}},t.removeHooks=function(e){y(N,e)&&(N[e]=[])},t.removeAllHooks=function(){N=rt()},t}var ot=at();function st(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ct=st();function lt(e){ct=e}var k={exec:()=>null};function A(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function j(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(M.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ut=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),M={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:A(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:A(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:A(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:A(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:A(e=>RegExp(`^ {0,${e}}(?:</?(?:${I})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:A(e=>RegExp(`^ {0,${e}}>`))},N=/^(?:[ \t]*(?:\n|$))+/,dt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ft=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,pt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ht=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_t=j(gt).replace(/bull/g,ht).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),vt=j(gt).replace(/bull/g,ht).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,P=/^[^\n]+/,bt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,F=j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,bt).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xt=j(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ht).getRegex(),I=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,L=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,St=j(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,L).replace(`tag`,I).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R=e=>j(yt).replace(`hr`,pt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,I).getRegex(),Ct=R(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),wt=R(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Tt={blockquote:j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,wt).getRegex(),code:dt,def:F,fences:ft,heading:mt,hr:pt,html:St,lheading:_t,list:xt,newline:N,paragraph:Ct,table:k,text:P},Et=j(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,pt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,I).getRegex(),z={...Tt,lheading:vt,table:Et,paragraph:j(yt).replace(`hr`,pt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Et).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,I).getRegex()},Dt={...Tt,html:j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,L).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:k,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:j(yt).replace(`hr`,pt).replace(`heading`,` *#{1,6} *[^
|
|
4
4
|
]`).replace(`lheading`,_t).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Ot=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,At=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,jt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,B=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,H=/[^\s\p{P}\p{S}]/u,Mt=j(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,V).getRegex(),Nt=/[\p{Pi}\p{Ps}"']/u,Pt=/(?!~)[\p{P}\p{S}]/u,Ft=/(?!~)[\s\p{P}\p{S}]/u,It=/(?:[^\s\p{P}\p{S}]|~)/u,Lt=j(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ut?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),U=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rt=j(U,`u`).replace(/punct/g,B).getRegex(),zt=j(U,`u`).replace(/punct/g,Pt).getRegex(),Bt=j(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Nt).replace(/punct/g,B).getRegex(),Vt=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Ht=j(Vt,`gu`).replace(/notPunctSpace/g,H).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Ut=j(Vt,`gu`).replace(/notPunctSpace/g,It).replace(/punctSpace/g,Ft).replace(/punct/g,Pt).getRegex(),Wt=j(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,H).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Gt=j(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,H).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),W=j(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,H).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Kt=j(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,B).getRegex(),qt=j(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,H).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Jt=j(/\\(punct)/,`gu`).replace(/punct/g,B).getRegex(),Yt=j(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Xt=j(L).replace(`(?:-->|$)`,`-->`).getRegex(),Zt=j(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Xt).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qt=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,$t=j(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Qt).getRegex(),en=j(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,$t).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tn=j(/^!?\[(label)\]\[(ref)\]/).replace(`label`,$t).replace(`ref`,bt).getRegex(),nn=j(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,bt).getRegex(),G=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,rn=j(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Qt).getRegex(),an=j(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,j(/^!?\[(label)\]\[(ref)\]/).replace(`label`,rn).replace(`ref`,G).getRegex()).replace(`nolink`,j(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,G).getRegex()).getRegex(),on=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sn=j(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),cn={_backpedal:k,anyPunctuation:Jt,autolink:Yt,blockSkip:Lt,br:At,code:kt,del:k,delLDelim:k,delRDelim:k,emStrongLDelim:Rt,emStrongRDelimAst:Ht,emStrongRDelimUnd:Gt,escape:Ot,link:en,nolink:nn,punctuation:Mt,reflink:tn,reflinkSearch:an,tag:Zt,text:jt,url:k},ln={...cn,emStrongLDelim:Bt,emStrongRDelimAst:Wt,emStrongRDelimUnd:W,link:j(/^!?\[(label)\]\((.*?)\)/).replace(`label`,$t).getRegex(),reflink:j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,$t).getRegex()},un={...cn,emStrongRDelimAst:Ut,emStrongLDelim:zt,delLDelim:Kt,delRDelim:qt,url:j(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,sn).replace(`protocol`,on).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:j(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,on).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},dn={...un,br:j(At).replace(`{2,}`,`*`).getRegex(),text:j(un.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},fn={normal:Tt,gfm:z,pedantic:Dt},pn={normal:cn,gfm:un,breaks:dn,pedantic:ln},K={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},mn=e=>K[e];function q(e,t){if(t){if(M.escapeTest.test(e))return e.replace(M.escapeReplace,mn)}else if(M.escapeTestNoEncode.test(e))return e.replace(M.escapeReplaceNoEncode,mn);return e}function hn(e){return e.replace(M.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function gn(e){try{e=encodeURI(e).replace(M.percentDecode,`%`)}catch{return null}return e}function _n(e,t){let n=e.replace(M.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(M.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(M.slashPipe,`|`);return n}function J(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function vn(e){let t=e.split(`
|
|
5
5
|
`),n=t.length-1;for(;n>=0&&M.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
@@ -21,7 +21,7 @@ ${d.join(`
|
|
|
21
21
|
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
22
22
|
`+e.join(`
|
|
23
23
|
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
24
|
-
`)
|
|
24
|
+
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
25
25
|
`,1)[0],l=t[1].length,u=this.options.pedantic?xn(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>xn(e,l)),d=e.split(`
|
|
26
26
|
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
27
27
|
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
@@ -38,16 +38,16 @@ ${d.join(`
|
|
|
38
38
|
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
39
39
|
`)?``:`
|
|
40
40
|
`)+i.raw,n.text+=`
|
|
41
|
-
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e))
|
|
41
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
42
42
|
`)?``:`
|
|
43
43
|
`)+i.raw,n.text+=`
|
|
44
|
-
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e))
|
|
44
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
45
45
|
`)?``:`
|
|
46
46
|
`)+i.raw,r.text+=`
|
|
47
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)
|
|
47
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
48
48
|
`)?``:`
|
|
49
49
|
`)+i.raw,n.text+=`
|
|
50
|
-
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)
|
|
50
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,yn(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,yn(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Tn=class{options;parser;constructor(e){this.options=e||ct}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(M.notSpaceStart)?.[0],i=e?e.replace(M.endingNewline,``)+`
|
|
51
51
|
`:``;return r?`<pre><code class="language-`+q(r)+`">`+(n?i:q(i,!0))+`</code></pre>
|
|
52
52
|
`:`<pre><code>`+(n?i:q(i,!0))+`</code></pre>
|
|
53
53
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
@@ -66,4 +66,4 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
66
66
|
${e}</tr>
|
|
67
67
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
68
68
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${q(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?q(n,!0):this.parser.parseInline(r),o=gn(e);if(o===null)return a;e=q(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+q(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=gn(e);if(i===null)return q(n);e=i;let a=`<img src="${q(e)}" alt="${q(n)}"`;return t&&(a+=` title="${q(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:q(e.text)}},En=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Z=class e{options;renderer;textRenderer;constructor(e){this.options=e||ct,this.options.renderer=this.options.renderer||new Tn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new En}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Dn=class{options;block;constructor(e){this.options=e||ct}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?X.lex:X.lexInline}provideParser(e=this.block){return e?Z.parse:Z.parseInline}},Q=new class{defaults=st();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Z;Renderer=Tn;TextRenderer=En;Lexer=X;Tokenizer=Y;Hooks=Dn;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Tn(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Y(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Dn;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Dn.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Dn.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return X.lex(e,t??this.defaults)}parser(e,t){return Z.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?X.lex:X.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?X.lex:X.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
69
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+q(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Q.parse(e,t)}$.options=$.setOptions=function(e){return Q.setOptions(e),$.defaults=Q.defaults,lt($.defaults),$},$.getDefaults=st,$.defaults=ct;function On(...e){return Q.use(...e),$.defaults=Q.defaults,lt($.defaults),$}$.use=On,$.walkTokens=function(e,t){return Q.walkTokens(e,t)},$.parseInline=Q.parseInline,$.Parser=Z,$.parser=Z.parse,$.Renderer=Tn,$.TextRenderer=En,$.Lexer=X,$.lexer=X.lex,$.Tokenizer=Y,$.Hooks=Dn,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,Z.parse,X.lex;var kn=
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+q(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Q.parse(e,t)}$.options=$.setOptions=function(e){return Q.setOptions(e),$.defaults=Q.defaults,lt($.defaults),$},$.getDefaults=st,$.defaults=ct;function On(...e){return Q.use(...e),$.defaults=Q.defaults,lt($.defaults),$}$.use=On,$.walkTokens=function(e,t){return Q.walkTokens(e,t)},$.parseInline=Q.parseInline,$.Parser=Z,$.parser=Z.parse,$.Renderer=Tn,$.TextRenderer=En,$.Lexer=X,$.lexer=X.lex,$.Tokenizer=Y,$.Hooks=Dn,$.parse=$,$.options,$.setOptions,$.walkTokens,$.parseInline,Z.parse,X.lex;var kn=n(e(),1),An=r();function jn({source:e,className:t}){let n=(0,kn.useMemo)(()=>{let t=$.parse(e,{async:!1,gfm:!0,breaks:!1});return ot.sanitize(t,{USE_PROFILES:{html:!0}})},[e]);return(0,An.jsx)(`div`,{className:i(`prose-dc`,t),dangerouslySetInnerHTML:{__html:n}})}export{o as n,jn as t};
|