@kky42/pievo-server 2.4.1 → 2.4.2

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.
Files changed (77) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/MachinesModal-CSbnrUER.js +1 -0
  3. package/.output/public/assets/{SignIn-BdkKWOSs.js → SignIn-0Tjqs-Ma.js} +1 -1
  4. package/.output/public/assets/{actionUi-BYBeYy7U.js → actionUi-DpwGIGpw.js} +1 -1
  5. package/.output/public/assets/app-CaZpuwOS.css +2 -0
  6. package/.output/public/assets/index-CaS_SmDq.js +10 -0
  7. package/.output/public/assets/invite._token-Btg_0aLp.js +1 -0
  8. package/.output/public/assets/{invite._token-ZnVQqqq4.js → invite._token-KMD2JAgE.js} +1 -1
  9. package/.output/public/assets/loops._loopId-D5usF3DO.js +67 -0
  10. package/.output/public/assets/{loops._loopId_.runs._runId-CA0-q1y5.js → loops._loopId_.runs._runId-DRCgXaCq.js} +2 -2
  11. package/.output/public/assets/{preload-helper-CUIO87nJ.js → preload-helper-DsxECZIS.js} +3 -3
  12. package/.output/public/assets/routes-CtFgwdgW.js +1 -0
  13. package/.output/public/assets/routes-LDbnnQ3f.js +1 -0
  14. package/.output/public/assets/t._teamId-D41xcbsF.js +1 -0
  15. package/.output/public/assets/t._teamId-DUena1pV.js +1 -0
  16. package/.output/public/assets/{ui-DGOT8AoZ.js → ui-Do4gqMyP.js} +1 -1
  17. package/.output/server/_ssr/{DashboardView-D_hKsCsv.mjs → DashboardView-C2LdV6J0.mjs} +61 -245
  18. package/.output/server/_ssr/{MachinesModal-DZ_9ErAU.mjs → MachinesModal-BjkcVjjx.mjs} +6 -8
  19. package/.output/server/_ssr/{SignIn-DjSrg0nO.mjs → SignIn-DEGrvJvb.mjs} +3 -3
  20. package/.output/server/_ssr/{SocialLinks-BTjsnVOm.mjs → SocialLinks-Cm4H8pUJ.mjs} +5 -12
  21. package/.output/server/_ssr/{actionUi-D15R8L7R.mjs → actionUi-DJBWuNwr.mjs} +2 -2
  22. package/.output/server/_ssr/{artifactFiles-CV3OXxRD.mjs → artifactFiles-DtpRidFZ.mjs} +3 -3
  23. package/.output/server/_ssr/{artifactKind-ByzVa7fg.mjs → artifactKind-FBYbgSuf.mjs} +3 -3
  24. package/.output/server/_ssr/artifacts-BR3jj0NC.mjs +2 -0
  25. package/.output/server/_ssr/{auth-CPCDf6Wr.mjs → auth-C0zoZCGe.mjs} +9 -9
  26. package/.output/server/_ssr/boot-CdOO4xOo.mjs +2 -0
  27. package/.output/server/_ssr/{boot-BbWxaF-z.mjs → boot-sNlIkoLe.mjs} +66 -129
  28. package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-8MIh9jN1.mjs → bun-sqlite-dialect-BW9W1_Ps-DmlZWqO7.mjs} +2 -2
  29. package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CcMQ01_d.mjs → d1-sqlite-dialect-BLC8LXE6-CCNzqZwZ.mjs} +2 -2
  30. package/.output/server/_ssr/db-CwLD-5w1.mjs +2 -0
  31. package/.output/server/_ssr/{dist-AxCsRawm.mjs → dist-B3SxDOpW.mjs} +2 -2
  32. package/.output/server/_ssr/{factory-S7MaMVC2.mjs → factory-Dv3Zopis.mjs} +2 -2
  33. package/.output/server/_ssr/{invite._token-B1UgMbNQ.mjs → invite._token-CJ6-H-s3.mjs} +4 -12
  34. package/.output/server/_ssr/{invite._token-D296YVGd.mjs → invite._token-dLKDJKVs.mjs} +8 -16
  35. package/.output/server/_ssr/{invite._token-BliJIGk4.mjs → invite._token-l1SjouDz.mjs} +6 -14
  36. package/.output/server/_ssr/{kysely-adapter-DUdpqcCJ.mjs → kysely-adapter-nL7WKSgw.mjs} +1 -1
  37. package/.output/server/_ssr/logger-B8m8F1Qu.mjs +2 -0
  38. package/.output/server/_ssr/{loopApi-Dy8ztANM.mjs → loopApi-BKyFB4KM.mjs} +12 -59
  39. package/.output/server/_ssr/{loopProjection-BZ1_IYCr.mjs → loopProjection-B8a829ij.mjs} +2 -2
  40. package/.output/server/_ssr/{loops._loopId-CKsAnxMl.mjs → loops._loopId-DS16Phmq.mjs} +31 -15
  41. package/.output/server/_ssr/{loops._loopId_.runs._runId-DG405pQs.mjs → loops._loopId_.runs._runId-BEJI6iK5.mjs} +6 -6
  42. package/.output/server/_ssr/{loops._loopId_.runs._runId-a_SyY8rX.mjs → loops._loopId_.runs._runId-CduETLqH.mjs} +3 -3
  43. package/.output/server/_ssr/{machineFns-BSaE7K88.mjs → machineFns-ByMsgG12.mjs} +3 -3
  44. package/.output/server/_ssr/{node-sqlite-dialect-rWwVyt2J.mjs → node-sqlite-dialect-CjNineno.mjs} +2 -2
  45. package/.output/server/_ssr/{router-lMkobh5r.mjs → router-CXyrnvx-.mjs} +65 -118
  46. package/.output/server/_ssr/{routes-CRHc9cLG.mjs → routes-BulNEUEE.mjs} +5 -5
  47. package/.output/server/_ssr/{routes-DNCZrs8z.mjs → routes-DD94baie.mjs} +2 -2
  48. package/.output/server/_ssr/{routes-ufPbrGHs.mjs → routes-Wjexi35W.mjs} +5 -5
  49. package/.output/server/_ssr/runDiff-Ba8Lg1vg.mjs +2 -0
  50. package/.output/server/_ssr/ssr.mjs +39 -47
  51. package/.output/server/_ssr/store-Cujtg2QE.mjs +2 -0
  52. package/.output/server/_ssr/{t._teamId-QD2nN0wn.mjs → t._teamId-1CreIlPV.mjs} +5 -5
  53. package/.output/server/_ssr/{t._teamId-DcWOYjPf.mjs → t._teamId-Bd6-zZsy.mjs} +2 -2
  54. package/.output/server/_ssr/{t._teamId-BoBoYEHL.mjs → t._teamId-COuMKQ4r.mjs} +5 -5
  55. package/.output/server/_ssr/{teamFns-BsmconJ1.mjs → teamFns-H438WnZC.mjs} +12 -30
  56. package/.output/server/_ssr/{teamFns-DcoVuWyH.mjs → teamFns-j2JKjorZ.mjs} +2 -2
  57. package/.output/server/_ssr/tokens-DgG_Syq3.mjs +2 -0
  58. package/.output/server/_ssr/{ui-DmFKW2H_.mjs → ui-D5KWstlb.mjs} +3 -4
  59. package/.output/server/{_tanstack-start-manifest_v-Xd5bMpJe.mjs → _tanstack-start-manifest_v-3H7yBKLz.mjs} +24 -26
  60. package/.output/server/index.mjs +81 -81
  61. package/package.json +1 -2
  62. package/.output/public/assets/MachinesModal-CEddj7la.js +0 -1
  63. package/.output/public/assets/app-BAgHQVvr.css +0 -2
  64. package/.output/public/assets/index-BZLqD3JI.js +0 -12
  65. package/.output/public/assets/invite._token-BCLgmTO7.js +0 -1
  66. package/.output/public/assets/loops._loopId-X8PSlgdB.js +0 -67
  67. package/.output/public/assets/routes-BjKcDy6D.js +0 -1
  68. package/.output/public/assets/routes-bfMcArTT.js +0 -1
  69. package/.output/public/assets/t._teamId-B75J8h0x.js +0 -1
  70. package/.output/public/assets/t._teamId-D7WVPMDr.js +0 -1
  71. package/.output/server/_ssr/artifacts-BhQvaGjF.mjs +0 -2
  72. package/.output/server/_ssr/boot-COHf8Gv3.mjs +0 -2
  73. package/.output/server/_ssr/db-dw61xIt1.mjs +0 -2
  74. package/.output/server/_ssr/logger-DdUWuMdh.mjs +0 -2
  75. package/.output/server/_ssr/runDiff-CrZzjokj.mjs +0 -2
  76. package/.output/server/_ssr/store-CirPHuib.mjs +0 -2
  77. package/.output/server/_ssr/tokens-XngoyCU8.mjs +0 -2
@@ -1 +0,0 @@
1
- import{A as e,M as t}from"./ui-DGOT8AoZ.js";import{r as n}from"./actionUi-BYBeYy7U.js";var r=t();function i({error:t}){let i=e();return(0,r.jsx)(`main`,{className:`mx-auto max-w-[1180px] px-8 pt-12`,children:(0,r.jsx)(n,{title:`Couldn't open this invite.`,detail:String(t),onRetry:()=>void i.invalidate()})})}export{i as errorComponent};
@@ -1,67 +0,0 @@
1
- import{C as e,D as t,F as n,M as r,N as i,O as a,S as o,T as s,a as c,b as l,d as u,f as d,g as f,h as p,k as ee,l as te,m as ne,n as re,o as ie,r as m,s as h,t as g,y as _}from"./ui-DGOT8AoZ.js";import{C as ae,E as oe,M as se,N as ce,S as le,T as ue,b as de,d as v,f as fe,g as pe,s as me,u as he,w as ge}from"./preload-helper-CUIO87nJ.js";import{a as y,o as _e,t as ve}from"./MachinesModal-CEddj7la.js";import{i as ye,n as be,r as xe,t as Se}from"./lifecycleUi-C7dwHtbw.js";import{c as Ce,r as we}from"./index-BZLqD3JI.js";import{t as Te}from"./SignIn-BdkKWOSs.js";import{i as b,n as Ee,r as x,t as De}from"./actionUi-BYBeYy7U.js";var S=n(i(),1),Oe={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,avif:`image/avif`,bmp:`image/bmp`,ico:`image/x-icon`,svg:`image/svg+xml`};function ke(e){return(e.match(/\.([a-z0-9]+)$/i)?.[1]??``).toLowerCase()}function C(e){return Oe[ke(e)]??null}var w=e=>C(e)!==null,Ae=e=>ke(e)===`html`||ke(e)===`htm`,je=e=>ke(e)===`md`||ke(e)===`markdown`;function Me(e){return w(e)?`image`:Ae(e)?`html`:je(e)?`markdown`:`text`}var T=r();function E(e,t){let n=t.split(`/`).map(encodeURIComponent).join(`/`);return`/api/artifact/${encodeURIComponent(e)}/${n}`}function D(e,t){return`${E(e,t)}?view=inline`}function O(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 k(e){if(Array.isArray(e))return e}function Ne(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)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 Pe(){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 A(e,t){return k(e)||Ne(e,t)||Fe(e,t)||Pe()}function Fe(e,t){if(e){if(typeof e==`string`)return O(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)?O(e,t):void 0}}var Ie=Object.entries,j=Object.setPrototypeOf,Le=Object.isFrozen,Re=Object.getPrototypeOf,ze=Object.getOwnPropertyDescriptor,M=Object.freeze,N=Object.seal,Be=Object.create,Ve=typeof Reflect<`u`&&Reflect,He=Ve.apply,Ue=Ve.construct;M||=function(e){return e},N||=function(e){return e},He||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Ue||=function(e){return new e(...[...arguments].slice(1))};var We=L(Array.prototype.forEach),Ge=L(Array.prototype.lastIndexOf),Ke=L(Array.prototype.pop),qe=L(Array.prototype.push),Je=L(Array.prototype.splice),Ye=Array.isArray,Xe=L(String.prototype.toLowerCase),Ze=L(String.prototype.toString),Qe=L(String.prototype.match),$e=L(String.prototype.replace),et=L(String.prototype.indexOf),tt=L(String.prototype.trim),P=L(Number.prototype.toString),nt=L(Boolean.prototype.toString),rt=typeof BigInt>`u`?null:L(BigInt.prototype.toString),it=typeof Symbol>`u`?null:L(Symbol.prototype.toString),F=L(Object.prototype.hasOwnProperty),at=L(Object.prototype.toString),I=L(RegExp.prototype.test),ot=st(TypeError);function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return He(e,t,n)}}function st(e){return function(){return Ue(e,[...arguments])}}function R(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xe;if(j&&j(e,null),!Ye(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Le(t)||(t[r]=e),i=e)}e[i]=!0}return e}function ct(e){for(let t=0;t<e.length;t++)F(e,t)||(e[t]=null);return e}function z(e){let t=Be(null);for(let r of Ie(e)){var n=A(r,2);let i=n[0],a=n[1];F(e,i)&&(Ye(a)?t[i]=ct(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=z(a):t[i]=a)}return t}function lt(e){switch(typeof e){case`string`:return e;case`number`:return P(e);case`boolean`:return nt(e);case`bigint`:return rt?rt(e):`0`;case`symbol`:return it?it(e):`Symbol()`;case`undefined`:return at(e);case`function`:case`object`:{if(e===null)return at(e);let t=e,n=B(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:at(e)}return at(e)}default:return at(e)}}function B(e,t){for(;e!==null;){let n=ze(e,t);if(n){if(n.get)return L(n.get);if(typeof n.value==`function`)return L(n.value)}e=Re(e)}function n(){return null}return n}function ut(e){try{return I(e,``),!0}catch{return!1}}var dt=M(`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(`.`)),ft=M(`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(`.`)),pt=M([`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`]),mt=M([`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`]),ht=M(`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(`.`)),gt=M([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),_t=M([`#text`]),vt=M(`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(`.`)),yt=M(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),bt=M(`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(`.`)),xt=M([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),St=N(/{{[\w\W]*|^[\w\W]*}}/g),Ct=N(/<%[\w\W]*|^[\w\W]*%>/g),wt=N(/\${[\w\W]*/g),Tt=N(/^data-[\-\w.\u00B7-\uFFFF]+$/),Et=N(/^aria-[\-\w]+$/),Dt=N(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ot=N(/^(?:\w+script|data):/i),kt=N(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=N(/^html$/i),jt=N(/^[a-z][.\w]*(-[.\w]+)+$/i),Mt=N(/<[/\w!]/g),Nt=N(/<[/\w]/g),Pt=N(/<\/no(script|embed|frames)/i),Ft=N(/\/>/i),V={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},It=function(){return typeof window>`u`?null:window},Lt=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:[]}},zt=function(e,t,n,r){return F(e,t)&&Ye(e[t])?R(r.base?z(r.base):{},e[t],r.transform):n};function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:It(),t=e=>Bt(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==V.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=B(d,`cloneNode`),p=B(d,`remove`),ee=B(d,`nextSibling`),te=B(d,`childNodes`),ne=B(d,`parentNode`),re=B(d,`shadowRoot`),ie=B(d,`attributes`),m=o&&o.prototype?B(o.prototype,`nodeType`):null,h=o&&o.prototype?B(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let g,_=``,ae,oe=!1,se=0,ce=function(){if(se>0)throw ot(`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.`)},le=function(e){ce(),se++;try{return g.createHTML(e)}finally{se--}},ue=function(e){ce(),se++;try{return g.createScriptURL(e)}finally{se--}},de=function(){return oe||=(ae=Lt(u,i),!0),ae},v=n,fe=v.implementation,pe=v.createNodeIterator,me=v.createDocumentFragment,he=v.getElementsByTagName,ge=r.importNode,y=Rt();t.isSupported=typeof Ie==`function`&&typeof ne==`function`&&fe&&fe.createHTMLDocument!==void 0;let _e=St,ve=Ct,ye=wt,be=Tt,xe=Et,Se=Ot,Ce=kt,we=jt,Te=Dt,b=null,Ee=R({},[...dt,...ft,...pt,...ht,..._t]),x=null,De=R({},[...vt,...yt,...bt,...xt]),S=Object.seal(Be(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}})),Oe=null,ke=null,C=Object.seal(Be(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),w=!0,Ae=!0,je=!1,Me=!0,T=!1,E=!0,D=!1,O=!1,k=null,Ne=null,Pe=!1,A=!1,Fe=!1,j=!1,Le=!0,Re=!1,ze=`user-content-`,Ve=!0,He=!1,Ue={},P=null,nt=R({},`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(`.`)),rt=null,it=R({},[`audio`,`video`,`img`,`source`,`image`,`track`]),at=null,L=R({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),st=`http://www.w3.org/1998/Math/MathML`,ct=`http://www.w3.org/2000/svg`,H=`http://www.w3.org/1999/xhtml`,U=H,W=!1,Vt=null,Ht=R({},[st,ct,H],Ze),Ut=M([`mi`,`mo`,`mn`,`ms`,`mtext`]),G=R({},Ut),Wt=M([`annotation-xml`]),K=R({},Wt),Gt=R({},[`title`,`style`,`font`,`a`,`script`]),Kt=null,qt=[`application/xhtml+xml`,`text/html`],q=null,Jt=null,Yt=n.createElement(`form`),Xt=function(e){return e instanceof RegExp||e instanceof Function},Zt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Jt&&Jt===e)return;(!e||typeof e!=`object`)&&(e={}),e=z(e),Kt=qt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,q=Kt===`application/xhtml+xml`?Ze:Xe,b=zt(e,`ALLOWED_TAGS`,Ee,{transform:q}),x=zt(e,`ALLOWED_ATTR`,De,{transform:q}),Vt=zt(e,`ALLOWED_NAMESPACES`,Ht,{transform:Ze}),at=zt(e,`ADD_URI_SAFE_ATTR`,L,{transform:q,base:L}),rt=zt(e,`ADD_DATA_URI_TAGS`,it,{transform:q,base:it}),P=zt(e,`FORBID_CONTENTS`,nt,{transform:q}),Oe=zt(e,`FORBID_TAGS`,z({}),{transform:q}),ke=zt(e,`FORBID_ATTR`,z({}),{transform:q}),Ue=F(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?z(e.USE_PROFILES):e.USE_PROFILES:!1,w=e.ALLOW_ARIA_ATTR!==!1,Ae=e.ALLOW_DATA_ATTR!==!1,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,T=e.SAFE_FOR_TEMPLATES||!1,E=e.SAFE_FOR_XML!==!1,D=e.WHOLE_DOCUMENT||!1,A=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,j=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Le=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,Ve=e.KEEP_CONTENT!==!1,He=e.IN_PLACE||!1,Te=ut(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Dt,U=typeof e.NAMESPACE==`string`?e.NAMESPACE:H,G=F(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?z(e.MATHML_TEXT_INTEGRATION_POINTS):R({},Ut),K=F(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?z(e.HTML_INTEGRATION_POINTS):R({},Wt);let t=F(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?z(e.CUSTOM_ELEMENT_HANDLING):Be(null);if(S=Be(null),F(t,`tagNameCheck`)&&Xt(t.tagNameCheck)&&(S.tagNameCheck=t.tagNameCheck),F(t,`attributeNameCheck`)&&Xt(t.attributeNameCheck)&&(S.attributeNameCheck=t.attributeNameCheck),F(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(S.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),N(S),T&&(Ae=!1),Fe&&(A=!0),Ue&&(b=R({},_t),x=Be(null),Ue.html===!0&&(R(b,dt),R(x,vt)),Ue.svg===!0&&(R(b,ft),R(x,yt),R(x,xt)),Ue.svgFilters===!0&&(R(b,pt),R(x,yt),R(x,xt)),Ue.mathMl===!0&&(R(b,ht),R(x,bt),R(x,xt))),C.tagCheck=null,C.attributeCheck=null,F(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?C.tagCheck=e.ADD_TAGS:Ye(e.ADD_TAGS)&&(b===Ee&&(b=z(b)),R(b,e.ADD_TAGS,q))),F(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?C.attributeCheck=e.ADD_ATTR:Ye(e.ADD_ATTR)&&(x===De&&(x=z(x)),R(x,e.ADD_ATTR,q))),F(e,`ADD_URI_SAFE_ATTR`)&&Ye(e.ADD_URI_SAFE_ATTR)&&R(at,e.ADD_URI_SAFE_ATTR,q),F(e,`FORBID_CONTENTS`)&&Ye(e.FORBID_CONTENTS)&&(P===nt&&(P=z(P)),R(P,e.FORBID_CONTENTS,q)),F(e,`ADD_FORBID_CONTENTS`)&&Ye(e.ADD_FORBID_CONTENTS)&&(P===nt&&(P=z(P)),R(P,e.ADD_FORBID_CONTENTS,q)),Ve&&(b[`#text`]=!0),D&&R(b,[`html`,`head`,`body`]),b.table&&(R(b,[`tbody`]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ot(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ot(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=g;g=e.TRUSTED_TYPES_POLICY;try{_=le(``)}catch(e){throw g=t,e}}else e.TRUSTED_TYPES_POLICY===null?(g=void 0,_=``):(g===void 0&&(g=de()),g&&typeof _==`string`&&(_=le(``)));M&&M(e),Jt=e},Qt=R({},[...ft,...pt,...mt]),$t=R({},[...ht,...gt]),en=function(e,t,n){return t.namespaceURI===H?e===`svg`:t.namespaceURI===st?e===`svg`&&(n===`annotation-xml`||G[n]):!!Qt[e]},tn=function(e,t,n){return t.namespaceURI===H?e===`math`:t.namespaceURI===ct?e===`math`&&K[n]:!!$t[e]},nn=function(e,t,n){return t.namespaceURI===ct&&!K[n]||t.namespaceURI===st&&!G[n]?!1:!$t[e]&&(Gt[e]||!Qt[e])},rn=function(e){let t=ne(e);(!t||!t.tagName)&&(t={namespaceURI:U,tagName:`template`});let n=Xe(e.tagName),r=Xe(t.tagName);return Vt[e.namespaceURI]?e.namespaceURI===ct?en(n,t,r):e.namespaceURI===st?tn(n,t,r):e.namespaceURI===H?nn(n,t,r):!!(Kt===`application/xhtml+xml`&&Vt[e.namespaceURI]):!1},J=function(e){qe(t.removed,{element:e});try{ne(e).removeChild(e)}catch{if(p(e),!ne(e))throw ot(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},an=function(e){let t=te(e);if(t){let e=[];We(t,t=>{qe(e,t)}),We(e,e=>{try{p(e)}catch{}})}let n=ie(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},on=function(e,n){try{qe(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{qe(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(A||Fe)try{J(n)}catch{}else try{n.setAttribute(e,``)}catch{}},sn=function(e){let t=ie(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||x[q(i)]))try{e.removeAttribute(i)}catch{}}},cn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(m?m(e):e.nodeType)===V.element&&sn(e);let n=te(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},ln=function(e){let t=null,r=null;if(Pe)e=`<remove></remove>`+e;else{let t=Qe(e,/^[\r\n\t ]+/);r=t&&t[0]}Kt===`application/xhtml+xml`&&U===H&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=g?le(e):e;if(U===H)try{t=new l().parseFromString(i,Kt)}catch{}if(!t||!t.documentElement){t=fe.createDocument(U,`template`,null);try{t.documentElement.innerHTML=W?_:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),U===H?he.call(t,D?`html`:`body`)[0]:D?t.documentElement:a},un=function(e){return pe.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},dn=function(e){return e=$e(e,_e,` `),e=$e(e,ve,` `),e=$e(e,ye,` `),e},fn=function(e){e.normalize();let t=pe.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=dn(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&We(r,e=>{mn(e.content)&&fn(e.content)})},pn=function(e){let t=h?h(e):null;return typeof t!=`string`||q(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ie(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==m(e)||e.childNodes!==te(e)},mn=function(e){if(!m||typeof e!=`object`||!e)return!1;try{return m(e)===V.documentFragment}catch{return!1}},hn=function(e){if(!m||typeof e!=`object`||!e)return!1;try{return typeof m(e)==`number`}catch{return!1}};function Y(e,n,r){e.length!==0&&We(e,e=>{e.call(t,n,r,Jt)})}let gn=function(e,t){return!!(E&&e.hasChildNodes()&&!hn(e.firstElementChild)&&I(Mt,e.textContent)&&I(Mt,e.innerHTML)||E&&e.namespaceURI===H&&t===`style`&&hn(e.firstElementChild)||e.nodeType===V.processingInstruction||E&&e.nodeType===V.comment&&I(Nt,e.data))},_n=function(e,t){if(!Oe[t]&&xn(t)&&(S.tagNameCheck instanceof RegExp&&I(S.tagNameCheck,t)||S.tagNameCheck instanceof Function&&S.tagNameCheck(t)))return!1;if(Ve&&!P[t]){let t=ne(e),n=te(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=He?n[i]:f(n[i],!0);t.insertBefore(r,ee(e))}}}return J(e),!0},vn=function(e){if(Y(y.beforeSanitizeElements,e,null),pn(e))return J(e),!0;let n=q(h?h(e):e.nodeName);if(Y(y.uponSanitizeElement,e,{tagName:n,allowedTags:b}),gn(e,n))return J(e),!0;if(Oe[n]||!(C.tagCheck instanceof Function&&C.tagCheck(n))&&!b[n])return _n(e,n);if((m?m(e):e.nodeType)===V.element&&!rn(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&I(Pt,e.innerHTML))return J(e),!0;if(T&&e.nodeType===V.text){let n=dn(e.textContent);e.textContent!==n&&(qe(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Y(y.afterSanitizeElements,e,null),!1},yn=function(e,t,r){if(ke[t]||Le&&(t===`id`||t===`name`)&&(r in n||r in Yt))return!1;let i=x[t]||C.attributeCheck instanceof Function&&C.attributeCheck(t,e);if(!(Ae&&I(be,t))&&!(w&&I(xe,t))){if(!i){if(!(xn(e)&&(S.tagNameCheck instanceof RegExp&&I(S.tagNameCheck,e)||S.tagNameCheck instanceof Function&&S.tagNameCheck(e))&&(S.attributeNameCheck instanceof RegExp&&I(S.attributeNameCheck,t)||S.attributeNameCheck instanceof Function&&S.attributeNameCheck(t,e))||t===`is`&&S.allowCustomizedBuiltInElements&&(S.tagNameCheck instanceof RegExp&&I(S.tagNameCheck,r)||S.tagNameCheck instanceof Function&&S.tagNameCheck(r))))return!1}else if(!at[t]&&!I(Te,$e(r,Ce,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&et(r,`data:`)===0&&rt[e])&&!(je&&!I(Se,$e(r,Ce,``)))&&r)return!1}return!0},bn=R({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),xn=function(e){return!bn[Xe(e)]&&I(we,e)},Sn=function(e,t,n,r){if(g&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return le(r);case`TrustedScriptURL`:return ue(r)}return r},Cn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),pn(e)?J(e):Ke(t.removed)}catch{on(n,e)}},wn=function(e){Y(y.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||pn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:x,forceKeepAttr:void 0},r=t.length,i=q(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=q(o),u=c,d=o===`value`?u:tt(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Y(y.uponSanitizeAttribute,e,n),d=n.attrValue,Re&&(l===`id`||l===`name`)&&et(d,ze)!==0&&(on(o,e),d=ze+d),E&&I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){on(o,e);continue}if(l===`attributename`&&Qe(d,`href`)){on(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){on(o,e);continue}if(!Me&&I(Ft,d)){on(o,e);continue}if(T&&(d=dn(d)),!yn(i,l,d)){on(o,e);continue}d=Sn(i,l,s,d),d!==u&&Cn(e,o,s,d)}}Y(y.afterSanitizeAttributes,e,null)},Tn=function(e){let t=null,n=un(e);for(Y(y.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Y(y.uponSanitizeShadowNode,t,null),vn(t),wn(t),mn(t.content)&&Tn(t.content),(m?m(t):t.nodeType)===V.element){let e=re(t);mn(e)&&(En(e),Tn(e))}Y(y.afterSanitizeShadowDOM,e,null)},En=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Tn(e.shadow);continue}let n=e.node,r=(m?m(n):n.nodeType)===V.element,i=te(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=h?h(n):null;if(typeof e==`string`&&q(e)===`template`){let e=n.content;mn(e)&&t.push({node:e,shadow:null})}}if(r){let e=re(n);mn(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(W=!e,W&&(e=`<!-->`),typeof e!=`string`&&!hn(e)&&(e=lt(e),typeof e!=`string`))throw ot(`dirty is not a string, aborting`);if(!t.isSupported)return e;O?(b=k,x=Ne):Zt(n),(y.uponSanitizeElement.length>0||y.uponSanitizeAttribute.length>0)&&(b=z(b)),y.uponSanitizeAttribute.length>0&&(x=z(x)),t.removed=[];let c=He&&typeof e!=`string`&&hn(e);if(c){let t=h?h(e):e.nodeName;if(typeof t==`string`){let e=q(t);if(!b[e]||Oe[e])throw ot(`root node is forbidden and cannot be sanitized in-place`)}if(pn(e))throw ot(`root node is clobbered and cannot be sanitized in-place`);try{En(e)}catch(t){throw an(e),t}}else if(hn(e))i=ln(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===V.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),En(a);else{if(!A&&!T&&!D&&e.indexOf(`<`)===-1)return g&&j?le(e):e;if(i=ln(e),!i)return A?null:j?_:``}i&&Pe&&J(i.firstChild);let l=un(c?e:i);try{for(;o=l.nextNode();)vn(o),wn(o),mn(o.content)&&Tn(o.content)}catch(t){throw c&&an(e),t}if(c)return We(t.removed,e=>{e.element&&cn(e.element)}),T&&fn(e),e;if(A){if(T&&fn(i),Fe)for(s=me.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(x.shadowroot||x.shadowrootmode)&&(s=ge.call(r,s,!0)),s}let u=D?i.outerHTML:i.innerHTML;return D&&b[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&I(At,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3
- `+u),T&&(u=dn(u)),g&&j?le(u):u},t.setConfig=function(){Zt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),O=!0,k=b,Ne=x},t.clearConfig=function(){Jt=null,O=!1,k=null,Ne=null,g=ae,_=``},t.isValidAttribute=function(e,t,n){return Jt||Zt({}),yn(q(e),q(t),n)},t.addHook=function(e,t){typeof t==`function`&&F(y,e)&&qe(y[e],t)},t.removeHook=function(e,t){if(F(y,e)){if(t!==void 0){let n=Ge(y[e],t);return n===-1?void 0:Je(y[e],n,1)[0]}return Ke(y[e])}},t.removeHooks=function(e){F(y,e)&&(y[e]=[])},t.removeAllHooks=function(){y=Rt()},t}var H=Bt();function U(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var W=U();function Vt(e){W=e}var Ht={exec:()=>null};function Ut(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 G(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(K.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Wt=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),K={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,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,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:Ut(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ut(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ut(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ut(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Ut(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:Ut(e=>RegExp(`^ {0,${e}}>`))},Gt=/^(?:[ \t]*(?:\n|$))+/,Kt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yt=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zt=G(Xt).replace(/bull/g,Yt).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Qt=G(Xt).replace(/bull/g,Yt).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),$t=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,en=/^[^\n]+/,tn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,nn=G(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,tn).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rn=G(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Yt).getRegex(),J=`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`,an=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,on=G(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,an).replace(`tag`,J).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sn=G($t).replace(`hr`,q).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,J).getRegex(),cn={blockquote:G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,sn).getRegex(),code:Kt,def:nn,fences:qt,heading:Jt,hr:q,html:on,lheading:Zt,list:rn,newline:Gt,paragraph:sn,table:Ht,text:en},ln=G(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,q).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,J).getRegex(),un={...cn,lheading:Qt,table:ln,paragraph:G($t).replace(`hr`,q).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,ln).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,J).getRegex()},dn={...cn,html:G(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,an).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:Ht,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G($t).replace(`hr`,q).replace(`heading`,` *#{1,6} *[^
4
- ]`).replace(`lheading`,Zt).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},fn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mn=/^( {2,}|\\)\n(?!\s*$)/,hn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Y=/[\p{P}\p{S}]/u,gn=/[\s\p{P}\p{S}]/u,_n=/[^\s\p{P}\p{S}]/u,vn=G(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,gn).getRegex(),yn=/(?!~)[\p{P}\p{S}]/u,bn=/(?!~)[\s\p{P}\p{S}]/u,xn=/(?:[^\s\p{P}\p{S}]|~)/u,Sn=G(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Wt?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Cn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wn=G(Cn,`u`).replace(/punct/g,Y).getRegex(),Tn=G(Cn,`u`).replace(/punct/g,yn).getRegex(),En=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Dn=G(En,`gu`).replace(/notPunctSpace/g,_n).replace(/punctSpace/g,gn).replace(/punct/g,Y).getRegex(),On=G(En,`gu`).replace(/notPunctSpace/g,xn).replace(/punctSpace/g,bn).replace(/punct/g,yn).getRegex(),kn=G(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,_n).replace(/punctSpace/g,gn).replace(/punct/g,Y).getRegex(),An=G(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Y).getRegex(),jn=G(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,_n).replace(/punctSpace/g,gn).replace(/punct/g,Y).getRegex(),Mn=G(/\\(punct)/,`gu`).replace(/punct/g,Y).getRegex(),Nn=G(/^<(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(),Pn=G(an).replace(`(?:-->|$)`,`-->`).getRegex(),Fn=G(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Pn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),In=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ln=G(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,In).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Rn=G(/^!?\[(label)\]\[(ref)\]/).replace(`label`,In).replace(`ref`,tn).getRegex(),zn=G(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,tn).getRegex(),Bn=G(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Rn).replace(`nolink`,zn).getRegex(),Vn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Hn={_backpedal:Ht,anyPunctuation:Mn,autolink:Nn,blockSkip:Sn,br:mn,code:pn,del:Ht,delLDelim:Ht,delRDelim:Ht,emStrongLDelim:wn,emStrongRDelimAst:Dn,emStrongRDelimUnd:kn,escape:fn,link:Ln,nolink:zn,punctuation:vn,reflink:Rn,reflinkSearch:Bn,tag:Fn,text:hn,url:Ht},Un={...Hn,link:G(/^!?\[(label)\]\((.*?)\)/).replace(`label`,In).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,In).getRegex()},Wn={...Hn,emStrongRDelimAst:On,emStrongLDelim:Tn,delLDelim:An,delRDelim:jn,url:G(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Vn).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:G(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Vn).getRegex()},Gn={...Wn,br:G(mn).replace(`{2,}`,`*`).getRegex(),text:G(Wn.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Kn={normal:cn,gfm:un,pedantic:dn},qn={normal:Hn,gfm:Wn,breaks:Gn,pedantic:Un},Jn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Yn=e=>Jn[e];function X(e,t){if(t){if(K.escapeTest.test(e))return e.replace(K.escapeReplace,Yn)}else if(K.escapeTestNoEncode.test(e))return e.replace(K.escapeReplaceNoEncode,Yn);return e}function Xn(e){try{e=encodeURI(e).replace(K.percentDecode,`%`)}catch{return null}return e}function Zn(e,t){let n=e.replace(K.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(K.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(K.slashPipe,`|`);return n}function Qn(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 $n(e){let t=e.split(`
5
- `),n=t.length-1;for(;n>=0&&K.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
6
- `)}function er(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function tr(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function nr(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function rr(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
7
- `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
8
- `)}var ir=class{options;rules;lexer;constructor(e){this.options=e||W}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:$n(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=rr(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Qn(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Qn(t[0],`
9
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Qn(t[0],`
10
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Qn(t[0],`
11
- `).split(`
12
- `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
13
- `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
14
- $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
15
- ${s}`:s,r=r?`${r}
16
- ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
17
- `+e.join(`
18
- `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
19
- `+e.join(`
20
- `),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(`
21
- `);continue}}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=tr(t[2].split(`
22
- `,1)[0],t[1].length),l=e.split(`
23
- `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
24
- `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
25
- `,1)[0],ee;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),ee=l):ee=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(ee.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
26
- `+ee.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
27
- `+l}u=!l.trim(),r+=p+`
28
- `,e=e.substring(p.length+1),c=ee.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1;if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=$n(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Qn(t[0],`
29
- `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Zn(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
30
- `):[],a={type:`table`,raw:Qn(t[0],`
31
- `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Zn(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Qn(t[0],`
32
- `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
33
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Qn(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=er(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),nr(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return nr(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Z=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||W,this.options.tokenizer=this.options.tokenizer||new ir,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:K,block:Kn.normal,inline:qn.normal};this.options.pedantic?(t.block=Kn.pedantic,t.inline=qn.pedantic):this.options.gfm&&(t.block=Kn.gfm,this.options.breaks?t.inline=qn.breaks:t.inline=qn.gfm),this.tokenizer.rules=t}static get rules(){return{block:Kn,inline:qn}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(K.carriageReturn,`
34
- `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(K.tabCharGlobal,` `).replace(K.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
35
- `: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(`
36
- `)?``:`
37
- `)+i.raw,n.text+=`
38
- `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(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(`
39
- `)?``:`
40
- `)+i.raw,n.text+=`
41
- `+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)){e=e.substring(i.raw.length),t.push(i);continue}if(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(`
42
- `)?``:`
43
- `)+i.raw,r.text+=`
44
- `+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);continue}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(`
45
- `)?``:`
46
- `)+i.raw,n.text+=`
47
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}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}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``,s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=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&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}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)}},ar=class{options;parser;constructor(e){this.options=e||W}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(K.notSpaceStart)?.[0],i=e.replace(K.endingNewline,``)+`
48
- `;return r?`<pre><code class="language-`+X(r)+`">`+(n?i:X(i,!0))+`</code></pre>
49
- `:`<pre><code>`+(n?i:X(i,!0))+`</code></pre>
50
- `}blockquote({tokens:e}){return`<blockquote>
51
- ${this.parser.parse(e)}</blockquote>
52
- `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
53
- `}hr(e){return`<hr>
54
- `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
55
- `+r+`</`+i+`>
56
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
57
- `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
58
- `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
59
- <thead>
60
- `+t+`</thead>
61
- `+r+`</table>
62
- `}tablerow({text:e}){return`<tr>
63
- ${e}</tr>
64
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
65
- `}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>${X(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Xn(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+X(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Xn(e);if(i===null)return X(n);e=i;let a=`<img src="${e}" alt="${X(n)}"`;return t&&(a+=` title="${X(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:X(e.text)}},or=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}},Q=class e{options;renderer;textRenderer;constructor(e){this.options=e||W,this.options.renderer=this.options.renderer||new ar,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new or}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`,`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`,`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}},sr=class{options;block;constructor(e){this.options=e||W}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?Z.lex:Z.lexInline}provideParser(e=this.block){return e?Q.parse:Q.parseInline}},cr=new class{defaults=U();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Q;Renderer=ar;TextRenderer=or;Lexer=Z;Tokenizer=ir;Hooks=sr;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 ar(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 ir(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 sr;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];sr.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&sr.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)}: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 Z.lex(e,t??this.defaults)}parser(e,t){return Q.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?Z.lex:Z.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?Q.parse:Q.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?Z.lex:Z.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?Q.parse:Q.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+=`
66
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+X(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return cr.parse(e,t)}$.options=$.setOptions=function(e){return cr.setOptions(e),$.defaults=cr.defaults,Vt($.defaults),$},$.getDefaults=U,$.defaults=W,$.use=function(...e){return cr.use(...e),$.defaults=cr.defaults,Vt($.defaults),$},$.walkTokens=function(e,t){return cr.walkTokens(e,t)},$.parseInline=cr.parseInline,$.Parser=Q,$.parser=Q.parse,$.Renderer=ar,$.TextRenderer=or,$.Lexer=Z,$.lexer=Z.lex,$.Tokenizer=ir,$.Hooks=sr,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,Q.parse,Z.lex;var lr={ALLOWED_TAGS:`h1.h2.h3.h4.h5.h6.p.br.hr.strong.b.em.i.del.s.code.pre.blockquote.ul.ol.li.a.span.table.thead.tbody.tr.th.td.img`.split(`.`),ALLOWED_ATTR:[`href`,`title`,`target`,`rel`,`src`,`alt`]};function ur(e){return H.sanitize($.parse(e,{async:!1,gfm:!0}),lr)}function dr({content:e}){return(0,T.jsx)(`div`,{className:`artifact-markdown px-5 py-4`,dangerouslySetInnerHTML:{__html:(0,S.useMemo)(()=>ur(e),[e])}})}function fr({path:e,meta:t,action:n}){return(0,T.jsxs)(`div`,{className:`sticky top-0 z-10 flex flex-wrap items-center gap-x-2 gap-y-1 border-b border-hairline bg-surface px-5 py-2.5`,children:[(0,T.jsx)(`span`,{className:`break-all font-mono text-label text-primary`,children:e}),t&&(0,T.jsxs)(`span`,{className:`font-mono text-caption text-disabled`,children:[`· `,t]}),n&&(0,T.jsx)(`span`,{className:`ml-auto shrink-0`,children:n})]})}function pr({loopId:e,path:t,oversize:n}){return(0,T.jsx)(`div`,{className:`px-5 py-8 text-body text-secondary`,children:n?(0,T.jsx)(`span`,{className:`text-disabled`,children:`Too large to preview - stored as metadata only (no synced bytes).`}):(0,T.jsxs)(T.Fragment,{children:[`Binary file - not previewable.`,` `,(0,T.jsx)(`a`,{href:E(e,t),download:!0,className:`text-interactive underline underline-offset-2 transition-colors hover:text-display`,children:`Download`})]})})}function mr({loopId:e,path:t,mode:n,onMode:r,showToggle:i}){return(0,T.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-hairline bg-surface px-5 py-1.5`,children:[i&&n&&r&&(0,T.jsx)(`div`,{className:`inline-flex overflow-hidden rounded-control border border-hairline`,children:[`preview`,`source`].map(e=>(0,T.jsx)(`button`,{type:`button`,onClick:()=>r(e),className:`cursor-pointer border-none px-2.5 py-0.5 text-caption font-medium transition-colors ${n===e?`bg-raised text-display`:`bg-transparent text-secondary hover:text-display`}`,children:e===`preview`?`Preview`:`Source`},e))}),(0,T.jsx)(`a`,{href:E(e,t),download:!0,className:`ml-auto shrink-0 text-caption font-medium text-interactive underline underline-offset-2 transition-colors hover:text-display`,children:`Download ↓`})]})}function hr({html:e}){return(0,T.jsx)(`iframe`,{title:`Rendered HTML artifact (sandboxed)`,srcDoc:e,sandbox:`allow-scripts`,referrerPolicy:`no-referrer`,className:`h-[min(70vh,620px)] w-full border-0 bg-white`})}function gr({loopId:e,file:t}){let[n,r]=(0,S.useState)(!1);return(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(mr,{loopId:e,path:t.path,showToggle:!1}),n?(0,T.jsxs)(`div`,{className:`px-5 py-8 text-body text-secondary`,children:[`Couldn't load this image.`,` `,(0,T.jsx)(`a`,{href:E(e,t.path),download:!0,className:`text-interactive underline underline-offset-2 transition-colors hover:text-display`,children:`Download`}),` `,`instead.`]}):(0,T.jsx)(`div`,{className:`flex justify-center overflow-auto px-5 py-6`,children:(0,T.jsx)(`img`,{src:D(e,t.path),alt:t.path,onError:()=>r(!0),className:`max-w-full rounded-control border border-hairline bg-white object-contain`})})]})}function _r({loopId:e,file:t,kind:n}){let[r,i]=(0,S.useState)({loading:!0}),[a,o]=(0,S.useState)(`preview`);if((0,S.useEffect)(()=>{let n=!0;return i({loading:!0}),v({data:{loopId:e,path:t.path}}).then(e=>n&&i(e)).catch(e=>n&&i({error:String(e)})),()=>{n=!1}},[e,t.path,t.updatedAt]),`loading`in r)return(0,T.jsx)(`div`,{className:`px-5 py-6 text-body text-disabled`,children:`Loading…`});if(`binary`in r)return(0,T.jsx)(pr,{loopId:e,path:t.path,oversize:r.oversize});if(`error`in r)return(0,T.jsxs)(`div`,{className:`px-5 py-6 text-body text-accent`,children:[`Couldn't load this file - `,r.error]});let s=r.text||`(empty file)`,c=n===`html`||n===`markdown`,l=!c||a===`source`;return(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(mr,{loopId:e,path:t.path,mode:a,onMode:o,showToggle:c}),n===`html`&&!l?(0,T.jsx)(hr,{html:r.text||``}):n===`markdown`&&!l?(0,T.jsx)(dr,{content:s}):(0,T.jsx)(`pre`,{className:`m-0 overflow-x-auto whitespace-pre-wrap px-5 py-4 font-mono text-label leading-relaxed text-secondary`,children:s})]})}function vr({loopId:e,file:t}){let n=Me(t.path);return t.oversize?(0,T.jsx)(pr,{loopId:e,path:t.path,oversize:!0}):n===`image`?(0,T.jsx)(gr,{loopId:e,file:t},`${t.path}:${t.updatedAt??``}`):t.binary?(0,T.jsx)(pr,{loopId:e,path:t.path,oversize:!1}):(0,T.jsx)(_r,{loopId:e,file:t,kind:n},t.path)}var yr=e=>e.split(`/`).pop()||e;function br({loopId:t,configuredPaths:n,running:r}){let[i,a]=(0,S.useState)(null),[o,c]=(0,S.useState)(null),l=(0,S.useRef)(0),u=(0,S.useCallback)(async()=>{let e=++l.current;try{let n=await fe({data:{loopId:t}});e===l.current&&a(n)}catch{e===l.current&&a(e=>e??[])}},[t]);(0,S.useEffect)(()=>{a(null),c(null),u()},[t,u]),(0,S.useEffect)(()=>{let e=setInterval(()=>void u(),r?4e3:12e3);return()=>clearInterval(e)},[r,u]);let d=i??[],f=o&&d.some(e=>e.path===o)?o:d[0]?.path??null,p=d.find(e=>e.path===f)??null;return(0,T.jsxs)(`section`,{id:`files`,className:`min-w-0`,children:[(0,T.jsxs)(`div`,{className:`mb-2.5 flex items-end justify-between gap-3 border-b border-hairline pb-1.5`,children:[(0,T.jsxs)(`h2`,{className:`text-label font-semibold text-secondary`,children:[`Artifacts`,i?` (${d.length})`:``]}),(0,T.jsxs)(`span`,{className:`text-caption font-medium text-disabled`,children:[`Configured exact paths: `,n.length]})]}),d.length===0?(0,T.jsx)(`div`,{className:`rounded-card border border-hairline bg-surface px-5 py-10 text-center text-body text-disabled shadow-card`,children:i==null?`Loading…`:n.length?`No configured artifact has been collected yet.`:`No artifact paths configured.`}):(0,T.jsxs)(`div`,{className:`grid h-[min(600px,68vh)] grid-cols-1 overflow-hidden rounded-card border border-hairline bg-surface shadow-card sm:grid-cols-[210px_1fr]`,children:[(0,T.jsx)(`nav`,{className:`max-h-44 overflow-y-auto border-b border-hairline sm:max-h-none sm:border-b-0 sm:border-r`,children:(0,T.jsx)(`ul`,{className:`py-1.5`,children:d.map(e=>{let t=e.path===f;return(0,T.jsx)(`li`,{children:(0,T.jsx)(`button`,{type:`button`,onClick:()=>c(e.path),className:`flex w-full items-center border-l-2 px-3 py-2 text-left transition-colors ${t?`border-display bg-raised`:`border-transparent hover:bg-raised/60`}`,children:(0,T.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,T.jsx)(`span`,{className:`block truncate font-mono text-label ${t?`text-display`:`text-primary`}`,title:e.path,children:yr(e.path)}),(0,T.jsx)(`span`,{className:`block truncate font-mono text-micro text-disabled`,title:e.path,children:e.path})]})})},e.path)})})}),(0,T.jsx)(`div`,{className:`min-w-0 overflow-y-auto`,children:p&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(fr,{path:p.path,meta:[p.size==null?``:s(p.size),`collected ${e(p.updatedAt)}`].filter(Boolean).join(` · `)}),(0,T.jsx)(vr,{loopId:t,file:p})]})})]})]})}var xr=[`claude-code`,`codex`],Sr={"claude-code":`Claude Code`,codex:`Codex`},Cr=`mt-1 text-caption leading-snug text-disabled`;function wr(e){let t=e?.schedule;return{name:e?.name??``,mode:t?.mode??`cron`,cron:t?.mode===`cron`?t.cron:`0 */3 * * *`,timezone:t?.mode===`cron`?t.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,overlap:t?.mode===`cron`?t.overlap:`queue-one`,delayMinutes:String(t?.mode===`continuous`?t.delayMinutes:1),workdir:e?.workdir??``,agent:e?.agent??`claude-code`,model:e?.model??``,reasoningEffort:e?.reasoningEffort??``,prompt:e?.prompt??``,keep:e?.statusDefinitions?.keep??``,noChange:e?.statusDefinitions?.noChange??``,block:e?.statusDefinitions?.block??``,artifacts:(e?.artifacts??[]).join(`
67
- `)}}function Tr({title:e,hint:t}){return(0,T.jsxs)(`div`,{className:`mb-3 mt-7 border-b border-hairline pb-1.5 first:mt-2`,children:[(0,T.jsx)(`h2`,{className:p,children:e}),t&&(0,T.jsx)(`div`,{className:`mt-0.5 text-caption text-disabled`,children:t})]})}function Er({label:e,value:t,onChange:n,mono:r,hint:i,placeholder:a}){let o=(0,S.useId)();return(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`label`,{htmlFor:o,className:d,children:e}),(0,T.jsx)(`input`,{id:o,className:`${u} ${r?`font-mono`:``}`,value:t,placeholder:a,onChange:e=>n(e.target.value)}),i&&(0,T.jsx)(`div`,{className:Cr,children:i})]})}function Dr({label:e,value:t,onChange:n,rows:r=4,mono:i,hint:a}){let o=(0,S.useId)();return(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`label`,{htmlFor:o,className:d,children:e}),(0,T.jsx)(`textarea`,{id:o,rows:r,className:`${u} h-auto resize-y ${i?`font-mono`:``}`,value:t,onChange:e=>n(e.target.value)}),a&&(0,T.jsx)(`div`,{className:Cr,children:a})]})}var Or=(0,S.forwardRef)(function({initial:e},t){let[n,r]=(0,S.useState)(()=>wr(e)),[i,a]=(0,S.useState)(null),o=(e,t)=>r(n=>({...n,[e]:t}));return(0,S.useImperativeHandle)(t,()=>({read(){let e=[[`Name`,n.name],[`Working directory`,n.workdir],[`Prompt`,n.prompt],[`Keep definition`,n.keep],[`No-change definition`,n.noChange],[`Block definition`,n.block]].find(([,e])=>!e.trim());if(e)return a(`${e[0]} is required.`),null;let t=Number(n.delayMinutes);if(n.mode===`continuous`&&(!Number.isInteger(t)||t<1))return a(`Continuous delay must be an integer of at least 1 minute.`),null;let r=n.mode===`cron`?{mode:`cron`,cron:n.cron.trim(),timezone:n.timezone.trim(),overlap:n.overlap}:{mode:`continuous`,delayMinutes:t};return a(null),{name:n.name.trim(),schedule:r,workdir:n.workdir.trim(),agent:n.agent,model:n.model.trim()||null,reasoningEffort:n.reasoningEffort.trim()||null,prompt:n.prompt,statusDefinitions:{keep:n.keep,noChange:n.noChange,block:n.block},artifacts:n.artifacts.split(/\r?\n/).filter(e=>e.length>0)}}})),(0,T.jsxs)(`div`,{className:`grid gap-x-10 lg:grid-cols-[minmax(300px,380px)_minmax(0,1fr)]`,children:[(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(Tr,{title:`Basics`}),(0,T.jsx)(Er,{label:`Name`,value:n.name,onChange:e=>o(`name`,e)}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`label`,{className:d,children:`Schedule`}),(0,T.jsxs)(`select`,{"aria-label":`Schedule`,className:f,value:n.mode,onChange:e=>o(`mode`,e.target.value),children:[(0,T.jsx)(`option`,{value:`cron`,children:`Cron`}),(0,T.jsx)(`option`,{value:`continuous`,children:`Continuous`})]})]}),n.mode===`cron`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Er,{label:`Cron expression`,value:n.cron,onChange:e=>o(`cron`,e),mono:!0}),(0,T.jsx)(Er,{label:`Timezone`,value:n.timezone,onChange:e=>o(`timezone`,e),mono:!0,hint:`IANA timezone, for example America/Los_Angeles.`}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`label`,{className:d,children:`Cron overlap`}),(0,T.jsxs)(`select`,{"aria-label":`Cron overlap`,className:f,value:n.overlap,onChange:e=>o(`overlap`,e.target.value),children:[(0,T.jsx)(`option`,{value:`skip`,children:`Skip occurrence`}),(0,T.jsx)(`option`,{value:`queue-one`,children:`Queue one follow-up`})]}),(0,T.jsx)(`div`,{className:Cr,children:`Applies only when a cron occurrence is due while a run is still open.`})]})]}):(0,T.jsx)(Er,{label:`Delay after terminal run (minutes)`,value:n.delayMinutes,onChange:e=>o(`delayMinutes`,e),mono:!0}),(0,T.jsx)(Tr,{title:`Execution`}),(0,T.jsx)(Er,{label:`Working directory`,value:n.workdir,onChange:e=>o(`workdir`,e),mono:!0,placeholder:`/Users/you/project`}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(`label`,{className:d,children:`Coding agent`}),(0,T.jsx)(`select`,{"aria-label":`Coding agent`,className:f,value:n.agent,onChange:e=>o(`agent`,e.target.value),children:xr.map(e=>(0,T.jsx)(`option`,{value:e,children:Sr[e]??e},e))})]}),(0,T.jsx)(Er,{label:`Model`,value:n.model,onChange:e=>o(`model`,e),placeholder:`default`,hint:`Optional. Empty uses the agent default.`}),(0,T.jsx)(Er,{label:`Reasoning effort`,value:n.reasoningEffort,onChange:e=>o(`reasoningEffort`,e),placeholder:`default`,hint:`Optional. Empty uses the agent default.`})]}),(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsx)(Tr,{title:`Prompt`,hint:`Sent unchanged before Pievo appends the report contract.`}),(0,T.jsx)(Dr,{label:`User prompt`,value:n.prompt,onChange:e=>o(`prompt`,e),rows:10}),(0,T.jsx)(Tr,{title:`Status definitions`,hint:`All three definitions are required and are appended to every run.`}),(0,T.jsx)(Dr,{label:`keep`,value:n.keep,onChange:e=>o(`keep`,e),rows:2}),(0,T.jsx)(Dr,{label:`no-change`,value:n.noChange,onChange:e=>o(`noChange`,e),rows:2}),(0,T.jsx)(Dr,{label:`block`,value:n.block,onChange:e=>o(`block`,e),rows:2}),(0,T.jsx)(Tr,{title:`Artifacts`,hint:`Optional exact paths relative to the working directory. One path per line; globs are not supported.`}),(0,T.jsx)(Dr,{label:`Artifact paths`,value:n.artifacts,onChange:e=>o(`artifacts`,e),rows:6,mono:!0}),i&&(0,T.jsx)(`div`,{className:`mt-4 text-body text-accent`,children:i})]})]})}),kr={"claude-code":`Claude Code`,codex:`Codex`};function Ar({id:n}){let r=ce(),[i,a]=(0,S.useState)(null),[o,s]=(0,S.useState)(null),[l,u]=(0,S.useState)(null),[d,f]=(0,S.useState)(!1),[te,ne]=(0,S.useState)(!1),[_,v]=(0,S.useState)(null),[fe,me]=(0,S.useState)(!1),[y,we]=b(),[Te,Oe]=(0,S.useState)([]),ke=(0,S.useRef)(null),C=(0,S.useRef)(!1),w=(0,S.useCallback)(async(e=!1)=>{try{let e=await pe({data:n});a(e),C.current=e.summary.deleteRequestedAt!=null,s(null)}catch(t){C.current?r({to:`/`}):e||s(String(t))}},[n]);(0,S.useEffect)(()=>{a(null),f(!1),me(!1),Oe([]),w()},[n,w]);let Ae=!!i?.summary.running;(0,S.useEffect)(()=>{if(d)return;let e=setInterval(()=>void w(!0),Ae||C.current?3e3:8e3);return()=>clearInterval(e)},[d,Ae,w]);async function je(){u(null),v(`run`);try{let e=await ge({data:n});if(e.error)return u(`Run failed: ${e.error}`);we({label:e.coalesced?`Already queued`:`Queued`,hold:4e3}),await w()}finally{v(null)}}async function Me(e){u(null),v(`lifecycle`);try{let t=e===`pause`?await ae({data:n}):e===`start`?await ue({data:n}):e===`stop`?await oe({data:n}):await he({data:n});if(t.error)return u(`${e[0].toUpperCase()+e.slice(1)} failed: ${t.error}`);if(me(!1),t.deleted)return r({to:`/`});e===`delete`&&(C.current=!0),await w(),we({label:e===`start`?`Started`:e===`pause`?`Paused`:e===`stop`?`Stop requested`:`Deleting`})}finally{v(null)}}async function E(){let e=ke.current?.read();if(e){u(null),v(`save`);try{let t=await le({data:{id:n,patch:e}});if(t.error)return u(`Save failed: ${t.error}`);f(!1),await w(),we({label:`Saved`})}finally{v(null)}}}let D=(0,T.jsxs)(se,{to:`/`,className:`inline-flex items-center gap-1.5 text-meta font-medium text-secondary hover:text-display`,children:[(0,T.jsx)(`span`,{"aria-hidden":!0,children:`←`}),` Loops`]});if(o)return(0,T.jsx)(Fr,{back:D,children:(0,T.jsx)(x,{title:`Couldn't load this loop.`,detail:o,onRetry:()=>void w()})});if(!i)return(0,T.jsx)(Fr,{back:D,children:(0,T.jsx)(re,{})});let{loop:O,summary:k,runs:Ne}=i,Pe=xe(k),A=Pe===`deleting`,Fe=k.enabled&&!A,Ie=!k.enabled&&!A,j=_!=null,Le=be(i.machine.daemonProtocol),Re=!A&&!!k.running&&Le.supported,ze=i.machine.online,M=i.machine.presence===`asleep`,N=i.team&&!i.team.isActive?i.team:null;if(d)return(0,T.jsxs)(Fr,{back:D,children:[(0,T.jsx)(Pr,{name:k.name,onBack:()=>f(!1)}),(0,T.jsxs)(`div`,{className:`mt-5 rounded-card border border-hairline bg-surface px-6 pb-6 pt-2 shadow-card`,children:[(0,T.jsx)(Or,{ref:ke,initial:O}),(0,T.jsxs)(`div`,{className:`mt-7 border-t border-hairline pt-4`,children:[l&&(0,T.jsx)(g,{message:l,onDismiss:()=>u(null),className:`mb-3`}),(0,T.jsxs)(`div`,{className:`flex gap-2.5`,children:[(0,T.jsx)(`button`,{className:h,disabled:_===`save`,onClick:()=>void E(),children:_===`save`?`Saving…`:`Save`}),(0,T.jsx)(`button`,{className:c,disabled:_===`save`,onClick:()=>f(!1),children:`Cancel`})]})]})]})]});let Be=O.schedule.mode===`cron`?`${O.schedule.cron} · ${O.schedule.timezone} · overlap ${O.schedule.overlap}`:`continuous · ${O.schedule.delayMinutes}m after terminal`,Ve=O.model||`default`,He=O.reasoningEffort||`default`;return(0,T.jsxs)(Fr,{back:D,children:[(0,T.jsxs)(`header`,{className:`rounded-card border border-hairline bg-surface px-6 pb-5 pt-[22px] shadow-card`,children:[(0,T.jsx)(`div`,{className:`flex flex-wrap items-start justify-between gap-x-6 gap-y-4`,children:(0,T.jsxs)(`div`,{className:`min-w-0`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(`h1`,{className:`text-[28px] font-semibold leading-tight tracking-[-0.015em] text-display`,children:k.name}),(0,T.jsx)(m,{tone:Pe===`stopping`?`running`:void 0,dot:Pe===`stopping`?`pulse`:void 0,children:ye(i)}),k.queued&&Pe===`active`&&(0,T.jsx)(m,{tone:`outline`,children:`Queued`}),(0,T.jsx)(m,{tone:`outline`,children:kr[O.agent]}),N&&(0,T.jsx)(m,{tone:`outline`,children:N.name})]}),(0,T.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-x-2.5 gap-y-1 text-meta text-secondary`,children:[(0,T.jsx)(`span`,{className:`font-mono text-primary`,children:Be}),(0,T.jsx)(`span`,{className:`text-wire`,children:`·`}),(0,T.jsxs)(`span`,{children:[`next `,e(k.nextRun)]}),k.nextRun&&k.enabled&&(0,T.jsxs)(`span`,{className:`text-disabled`,children:[`(`,ee(k.nextRun),`)`]}),(0,T.jsx)(`span`,{className:`text-wire`,children:`·`}),(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,T.jsx)(`span`,{className:`size-1.5 rounded-full ${ze?`bg-rubik-green`:M?`bg-rubik-yellow`:`bg-disabled`}`}),i.machine.name||`machine`]})]})]})}),(0,T.jsxs)(`div`,{className:`mt-5 border-t border-hairline pt-4`,children:[N&&(0,T.jsx)(Mr,{team:N,onSwitch:()=>{Ce(N.id),r({to:`/t/$teamId`,params:{teamId:N.id}})}}),i.machine.needsUpdate&&(0,T.jsx)(Nr,{tone:`warn`,text:`Daemon update required · server requires v${i.machine.requiredDaemonVersion}; machine reports ${i.machine.daemonVersion?`v${i.machine.daemonVersion}`:`an unknown version`}.`,action:`Update daemon`,onAction:()=>ne(!0)}),!ze&&(0,T.jsx)(Nr,{text:`Machine ${M?`seems asleep or offline`:`is offline`}; queued work starts when it reconnects.${i.machine.lastSeen?` Last seen ${t(i.machine.lastSeen)}.`:``}`,action:`Reconnect`,onAction:()=>ne(!0)}),l&&(0,T.jsx)(g,{message:l,onDismiss:()=>u(null),className:`mb-2.5`}),y&&(0,T.jsx)(`div`,{className:`mb-2.5`,children:(0,T.jsx)(Ee,{label:y.label,tone:y.tone,onUndo:y.undo})}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,T.jsx)(`button`,{className:h,disabled:j||A,onClick:()=>void je(),children:_===`run`?`Queuing…`:`Run once`}),(0,T.jsx)(`button`,{className:c,disabled:j||A,onClick:()=>f(!0),children:`Settings`}),(0,T.jsx)(`button`,{className:c,disabled:j||!Ie,onClick:()=>void Me(`start`),children:`Start`}),(0,T.jsx)(`button`,{className:c,disabled:j||!Fe,onClick:()=>void Me(`pause`),children:`Pause`}),(0,T.jsx)(`button`,{className:ie,disabled:j||!Re,title:k.running&&!Le.supported?Se:k.running?void 0:`No run is currently running`,onClick:()=>void Me(`stop`),children:`Stop`}),(0,T.jsx)(`button`,{className:ie,disabled:j||A,onClick:()=>me(!0),children:A?`Deleting…`:`Delete`})]}),fe&&!A&&(0,T.jsx)(`div`,{className:`mt-3`,children:(0,T.jsx)(De,{prompt:`Stop this loop and delete its server data?`,note:`This stops the loop and deletes server history and collected artifacts. Files in the working directory are not deleted. If the machine is unreachable, its local process may continue running.`,cta:`Delete`,danger:!0,busy:j,onConfirm:()=>void Me(`delete`),onCancel:()=>me(!1)})})]})]}),(0,T.jsxs)(`section`,{className:`mt-6 min-w-0 rounded-card border border-hairline bg-surface px-6 py-5 shadow-card`,children:[(0,T.jsx)(`h2`,{className:`mb-4 border-b border-hairline pb-1.5 ${p}`,children:`Configuration`}),(0,T.jsxs)(`dl`,{className:`grid min-w-0 gap-x-6 gap-y-4 md:grid-cols-[180px_minmax(0,1fr)]`,children:[(0,T.jsx)(jr,{label:`Schedule`,children:(0,T.jsx)(`code`,{className:`break-all font-mono`,children:Be})}),(0,T.jsx)(jr,{label:`Working directory`,children:(0,T.jsx)(`code`,{className:`break-all font-mono`,children:O.workdir})}),(0,T.jsx)(jr,{label:`Agent`,children:kr[O.agent]}),(0,T.jsxs)(jr,{label:`Model / effort`,children:[Ve,` / `,He]}),(0,T.jsx)(jr,{label:`Prompt`,children:(0,T.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-sans`,children:O.prompt})}),(0,T.jsx)(jr,{label:`Status definitions`,children:(0,T.jsxs)(`ul`,{className:`space-y-1`,children:[(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`b`,{children:`keep:`}),` `,O.statusDefinitions.keep]}),(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`b`,{children:`no-change:`}),` `,O.statusDefinitions.noChange]}),(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`b`,{children:`block:`}),` `,O.statusDefinitions.block]})]})}),(0,T.jsx)(jr,{label:`Artifact paths`,children:O.artifacts.length?(0,T.jsx)(`ul`,{className:`space-y-1`,children:O.artifacts.map(e=>(0,T.jsx)(`li`,{children:(0,T.jsx)(`code`,{className:`break-all font-mono`,children:e})},e))}):(0,T.jsx)(`span`,{className:`text-disabled`,children:`None`})})]})]}),(0,T.jsxs)(`div`,{className:`mt-6 grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(300px,360px)]`,children:[(0,T.jsx)(br,{loopId:n,configuredPaths:O.artifacts,running:Ae}),(0,T.jsx)(Ir,{loopId:n,summary:k,runs:Ne,older:Te,onPickRun:e=>r({to:`/loops/$loopId/runs/$runId`,params:{loopId:n,runId:e.id}}),onMore:async()=>{let e=(Te.length?_e(k.runs,Te):k.runs)[0];if(!e)return 0;let t=await de({data:{loopId:n,beforeTs:e.ts,limit:16}});return t.length&&Oe(e=>_e(e,t)),t.length}})]}),(0,T.jsx)(ve,{open:te,onClose:()=>ne(!1)})]})}function jr({label:e,children:t}){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`dt`,{className:`text-label font-medium text-secondary`,children:e}),(0,T.jsx)(`dd`,{className:`min-w-0 text-body text-primary`,children:t})]})}function Mr({team:e,onSwitch:t}){return(0,T.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-center gap-3 rounded-control border border-hairline bg-raised px-4 py-2.5 text-meta text-secondary`,children:[(0,T.jsxs)(`span`,{children:[`Viewing a loop in `,e.name,` - not your active team.`]}),(0,T.jsx)(`button`,{onClick:t,className:`ml-auto font-medium text-interactive underline`,children:`Switch to this team`})]})}function Nr({text:e,action:t,onAction:n,tone:r}){return(0,T.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-center gap-3 rounded-control border px-4 py-2.5 text-meta ${r===`warn`?`border-warn/40 bg-warn/10`:`border-hairline bg-raised`}`,children:[(0,T.jsx)(`span`,{className:`text-secondary`,children:e}),(0,T.jsx)(`button`,{onClick:n,className:`ml-auto font-medium text-interactive underline`,children:t})]})}function Pr({name:e,onBack:t}){return(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`button`,{type:`button`,onClick:t,className:te,children:[(0,T.jsx)(`span`,{"aria-hidden":!0,children:`←`}),` Back to loop`]}),(0,T.jsxs)(`h1`,{className:`mt-2.5 text-[24px] font-semibold text-display`,children:[`Settings · `,e]}),(0,T.jsx)(`p`,{className:`mt-1.5 text-meta text-secondary`,children:`Edit the stored schedule, execution settings, prompt, status definitions, and exact artifact paths.`})]})}function Fr({back:e,children:t}){return(0,T.jsxs)(`main`,{className:`mx-auto max-w-[1360px] px-8 pb-24 pt-10`,children:[(0,T.jsx)(`div`,{className:`mb-5`,children:e}),t]})}function Ir({loopId:e,summary:t,runs:n,older:r,onMore:i,onPickRun:s}){let c=(0,S.useMemo)(()=>r.length?_e(t.runs,r):t.runs,[t.runs,r]);return(0,T.jsxs)(`section`,{className:`min-w-0`,children:[(0,T.jsx)(`div`,{className:`mb-2.5 border-b border-hairline pb-1.5`,children:(0,T.jsxs)(`h2`,{className:p,children:[`Runs (`,t.runCount,`)`]})}),t.runCount===0?(0,T.jsx)(`div`,{className:`rounded-card border border-hairline bg-surface px-5 py-10 text-center text-body text-disabled`,children:`Never run`}):(0,T.jsxs)(`div`,{className:`rounded-card border border-hairline bg-surface px-5 pb-4 pt-5 shadow-card`,children:[(0,T.jsx)(y,{loop:t,runs:c,total:t.runCount,onLoadMore:i,onPickRun:s}),(0,T.jsx)(`ul`,{className:`mt-5 max-h-[clamp(280px,46vh,520px)] divide-y divide-hairline overflow-y-auto border-t border-hairline`,children:n.map(t=>(0,T.jsx)(`li`,{children:(0,T.jsxs)(se,{to:`/loops/$loopId/runs/$runId`,params:{loopId:e,runId:t.id},className:`flex items-start gap-2.5 py-2.5 hover:bg-raised`,children:[(0,T.jsx)(`span`,{className:`mt-1 inline-block size-2.5 shrink-0 rounded-[2px]`,style:{background:_(t)},title:l(t)}),(0,T.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`span`,{className:`flex justify-between gap-2`,children:[(0,T.jsx)(`span`,{className:`font-mono text-label text-secondary`,children:a(t.ts)}),(0,T.jsx)(`span`,{className:`font-mono text-caption text-disabled`,children:o(t.durationMs)})]}),(0,T.jsx)(`span`,{className:`mt-0.5 block line-clamp-2 text-meta text-primary`,children:t.phase===`pending`?`Queued`:t.phase===`running`?(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`size-1.5 rounded-full`,style:ne}),`Running`]}):t.error||t.message||l(t)})]})]})},t.id))})]})]})}function Lr(){let{loopId:e}=we.useParams(),{auth:t}=we.useLoaderData()??{auth:{enabled:!1}},{data:n,isPending:r}=me();return t?.enabled&&!r&&!n?(0,T.jsx)(Te,{callbackURL:`/loops/${e}`}):(0,T.jsx)(Ar,{id:e})}export{Lr as component};
@@ -1 +0,0 @@
1
- import{A as e,M as t}from"./ui-DGOT8AoZ.js";import{r as n}from"./actionUi-BYBeYy7U.js";var r=t();function i({error:t}){let i=e();return(0,r.jsx)(`main`,{className:`mx-auto max-w-[1180px] px-8 pt-12`,children:(0,r.jsx)(n,{title:`Couldn't load the dashboard.`,detail:String(t),onRetry:()=>void i.invalidate()})})}export{i as errorComponent};
@@ -1 +0,0 @@
1
- import{M as e}from"./ui-DGOT8AoZ.js";import{s as t}from"./preload-helper-CUIO87nJ.js";import{a as n,o as r}from"./index-BZLqD3JI.js";import{t as i}from"./SignIn-BdkKWOSs.js";var a=e();function o(){let e=n.useLoaderData(),{data:o,isPending:s}=t();return e?.auth?.enabled&&!s&&!o||e?.mode===`signin`?(0,a.jsx)(i,{}):(0,a.jsx)(r,{initial:e.initial})}export{o as component};
@@ -1 +0,0 @@
1
- import{A as e,M as t}from"./ui-DGOT8AoZ.js";import{r as n}from"./actionUi-BYBeYy7U.js";var r=t();function i({error:t}){let i=e();return(0,r.jsx)(`main`,{className:`mx-auto max-w-[1180px] px-8 pt-12`,children:(0,r.jsx)(n,{title:`Couldn't open this team.`,detail:String(t),onRetry:()=>void i.invalidate()})})}export{i as errorComponent};
@@ -1 +0,0 @@
1
- import{M as e}from"./ui-DGOT8AoZ.js";import{s as t}from"./preload-helper-CUIO87nJ.js";import{i as n,o as r}from"./index-BZLqD3JI.js";import{t as i}from"./SignIn-BdkKWOSs.js";var a=e();function o(){let e=n.useLoaderData(),{data:o,isPending:s}=t();return e?.auth?.enabled&&!s&&!o||e?.mode===`signin`?(0,a.jsx)(i,{}):(0,a.jsx)(r,{teamId:e.teamId,initial:e.initial},e.teamId)}export{o as component};
@@ -1,2 +0,0 @@
1
- import { d as SYNC_BODY_CAP, i as BLOB_CAP, wt as parseArtifactSyncBody } from "./boot-BbWxaF-z.mjs";
2
- export { BLOB_CAP, SYNC_BODY_CAP, parseArtifactSyncBody };
@@ -1,2 +0,0 @@
1
- import { B as getGateway, F as getArtifactSync, R as getCliGateway } from "./boot-BbWxaF-z.mjs";
2
- export { getArtifactSync, getCliGateway, getGateway };
@@ -1,2 +0,0 @@
1
- import { T as db } from "./boot-BbWxaF-z.mjs";
2
- export { db };
@@ -1,2 +0,0 @@
1
- import { _t as logger } from "./boot-BbWxaF-z.mjs";
2
- export { logger };
@@ -1,2 +0,0 @@
1
- import { g as computeRunDiff } from "./boot-BbWxaF-z.mjs";
2
- export { computeRunDiff };
@@ -1,2 +0,0 @@
1
- import { U as getLoop } from "./boot-BbWxaF-z.mjs";
2
- export { getLoop };
@@ -1,2 +0,0 @@
1
- import { At as rememberConnectKey, St as mintDeviceToken } from "./boot-BbWxaF-z.mjs";
2
- export { mintDeviceToken, rememberConnectKey };