@pixelmatters/markup 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/widget.js CHANGED
@@ -248,21 +248,77 @@ e = h.slice, t = { __e: function(e, t, n, r) {
248
248
  }, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = te(!1), p = te(!0);
249
249
  //#endregion
250
250
  //#region src/styles.css?inline
251
- var ue = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-fab.is-icon-only{gap:0;padding:9px}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.5}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-top:4px;font-size:10px}.markup-screenshot-redacted-chip{cursor:pointer;color:var(--markup-muted);font:inherit;background:0 0;border:none;align-items:center;gap:3px;padding:0;display:inline-flex}.markup-screenshot-redacted-chip:hover{color:var(--markup-ink)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", de, F, fe, pe, me = 0, he = [], I = t, ge = I.__b, _e = I.__r, ve = I.diffed, ye = I.__c, be = I.unmount, xe = I.__;
252
- function Se(e, t) {
253
- I.__h && I.__h(F, e, me || t), me = 0;
251
+ var ue = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-fab.is-icon-only{gap:0;padding:9px}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-hud-hidden-toast-center{width:max-content;margin-inline:auto;left:0;right:0}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s,opacity .15s,top .2s,left .2s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin.is-unresolved{opacity:.5}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-top:4px;font-size:10px}.markup-screenshot-redacted-chip{cursor:pointer;color:var(--markup-muted);font:inherit;background:0 0;border:none;align-items:center;gap:3px;padding:0;display:inline-flex}.markup-screenshot-redacted-chip:hover{color:var(--markup-ink)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", de = class extends C {
252
+ state = { hasError: !1 };
253
+ static getDerivedStateFromError() {
254
+ return { hasError: !0 };
255
+ }
256
+ componentDidCatch(e) {
257
+ try {
258
+ this.props.onError(e);
259
+ } catch {}
260
+ }
261
+ render() {
262
+ return this.state.hasError ? null : this.props.children;
263
+ }
264
+ }, fe = 1e3;
265
+ function pe(e) {
266
+ let t = !1, n = 0;
267
+ return (r) => {
268
+ let i = Date.now();
269
+ t || i - n < fe || (t = !0, n = i, fetch(`${e.apiUrl.replace(/\/+$/, "")}/widget/error`, {
270
+ method: "POST",
271
+ headers: {
272
+ "content-type": "application/json",
273
+ "x-markup-api-key": e.apiKey
274
+ },
275
+ body: JSON.stringify({
276
+ ...r,
277
+ widgetVersion: e.widgetVersion
278
+ }),
279
+ keepalive: !0
280
+ }).catch(() => {}).finally(() => {
281
+ t = !1;
282
+ }));
283
+ };
284
+ }
285
+ function me() {
286
+ return typeof window < "u" ? window.location.href : void 0;
287
+ }
288
+ function he() {
289
+ return typeof navigator < "u" ? navigator.userAgent : void 0;
290
+ }
291
+ var ge = /* @__PURE__ */ new WeakMap();
292
+ function _e(e, t, n) {
293
+ let r = ge.get(e);
294
+ r || (r = pe(e), ge.set(e, r));
295
+ let i = t instanceof Error ? t : Error(String(t));
296
+ r({
297
+ message: i.message,
298
+ name: i.name,
299
+ stack: i.stack,
300
+ url: me(),
301
+ userAgent: he(),
302
+ context: n?.context
303
+ });
304
+ }
305
+ //#endregion
306
+ //#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/hooks/dist/hooks.module.js
307
+ var ve, F, ye, be, xe = 0, Se = [], I = t, L = I.__b, Ce = I.__r, we = I.diffed, Te = I.__c, Ee = I.unmount, De = I.__;
308
+ function Oe(e, t) {
309
+ I.__h && I.__h(F, e, xe || t), xe = 0;
254
310
  var n = F.__H ||= {
255
311
  __: [],
256
312
  __h: []
257
313
  };
258
314
  return e >= n.__.length && n.__.push({}), n.__[e];
259
315
  }
260
- function L(e) {
261
- return me = 1, Ce(je, e);
316
+ function R(e) {
317
+ return xe = 1, ke(Le, e);
262
318
  }
263
- function Ce(e, t, n) {
264
- var r = Se(de++, 2);
265
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : je(void 0, t), function(e) {
319
+ function ke(e, t, n) {
320
+ var r = Oe(ve++, 2);
321
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Le(void 0, t), function(e) {
266
322
  var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
267
323
  t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
268
324
  }], r.__c = F, !F.__f)) {
@@ -294,99 +350,99 @@ function Ce(e, t, n) {
294
350
  }
295
351
  return r.__N || r.__;
296
352
  }
297
- function R(e, t) {
298
- var n = Se(de++, 3);
299
- !I.__s && Ae(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
353
+ function z(e, t) {
354
+ var n = Oe(ve++, 3);
355
+ !I.__s && Ie(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
300
356
  }
301
- function z(e) {
302
- return me = 5, we(function() {
357
+ function B(e) {
358
+ return xe = 5, Ae(function() {
303
359
  return { current: e };
304
360
  }, []);
305
361
  }
306
- function we(e, t) {
307
- var n = Se(de++, 7);
308
- return Ae(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
362
+ function Ae(e, t) {
363
+ var n = Oe(ve++, 7);
364
+ return Ie(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
309
365
  }
310
- function B(e, t) {
311
- return me = 8, we(function() {
366
+ function V(e, t) {
367
+ return xe = 8, Ae(function() {
312
368
  return e;
313
369
  }, t);
314
370
  }
315
- function Te() {
316
- for (var e; e = he.shift();) {
371
+ function je() {
372
+ for (var e; e = Se.shift();) {
317
373
  var t = e.__H;
318
374
  if (e.__P && t) try {
319
- t.__h.some(Oe), t.__h.some(ke), t.__h = [];
375
+ t.__h.some(Pe), t.__h.some(Fe), t.__h = [];
320
376
  } catch (n) {
321
377
  t.__h = [], I.__e(n, e.__v);
322
378
  }
323
379
  }
324
380
  }
325
381
  I.__b = function(e) {
326
- F = null, ge && ge(e);
382
+ F = null, L && L(e);
327
383
  }, I.__ = function(e, t) {
328
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), xe && xe(e, t);
384
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), De && De(e, t);
329
385
  }, I.__r = function(e) {
330
- _e && _e(e), de = 0;
386
+ Ce && Ce(e), ve = 0;
331
387
  var t = (F = e.__c).__H;
332
- t && (fe === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
388
+ t && (ye === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
333
389
  e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
334
- })) : (t.__h.some(Oe), t.__h.some(ke), t.__h = [], de = 0)), fe = F;
390
+ })) : (t.__h.some(Pe), t.__h.some(Fe), t.__h = [], ve = 0)), ye = F;
335
391
  }, I.diffed = function(e) {
336
- ve && ve(e);
392
+ we && we(e);
337
393
  var t = e.__c;
338
- t && t.__H && (t.__H.__h.length && (he.push(t) !== 1 && pe === I.requestAnimationFrame || ((pe = I.requestAnimationFrame) || De)(Te)), t.__H.__.some(function(e) {
394
+ t && t.__H && (t.__H.__h.length && (Se.push(t) !== 1 && be === I.requestAnimationFrame || ((be = I.requestAnimationFrame) || Ne)(je)), t.__H.__.some(function(e) {
339
395
  e.u && (e.__H = e.u), e.u = void 0;
340
- })), fe = F = null;
396
+ })), ye = F = null;
341
397
  }, I.__c = function(e, t) {
342
398
  t.some(function(e) {
343
399
  try {
344
- e.__h.some(Oe), e.__h = e.__h.filter(function(e) {
345
- return !e.__ || ke(e);
400
+ e.__h.some(Pe), e.__h = e.__h.filter(function(e) {
401
+ return !e.__ || Fe(e);
346
402
  });
347
403
  } catch (n) {
348
404
  t.some(function(e) {
349
405
  e.__h &&= [];
350
406
  }), t = [], I.__e(n, e.__v);
351
407
  }
352
- }), ye && ye(e, t);
408
+ }), Te && Te(e, t);
353
409
  }, I.unmount = function(e) {
354
- be && be(e);
410
+ Ee && Ee(e);
355
411
  var t, n = e.__c;
356
412
  n && n.__H && (n.__H.__.some(function(e) {
357
413
  try {
358
- Oe(e);
414
+ Pe(e);
359
415
  } catch (e) {
360
416
  t = e;
361
417
  }
362
418
  }), n.__H = void 0, t && I.__e(t, n.__v));
363
419
  };
364
- var Ee = typeof requestAnimationFrame == "function";
365
- function De(e) {
420
+ var Me = typeof requestAnimationFrame == "function";
421
+ function Ne(e) {
366
422
  var t, n = function() {
367
- clearTimeout(r), Ee && cancelAnimationFrame(t), setTimeout(e);
423
+ clearTimeout(r), Me && cancelAnimationFrame(t), setTimeout(e);
368
424
  }, r = setTimeout(n, 35);
369
- Ee && (t = requestAnimationFrame(n));
425
+ Me && (t = requestAnimationFrame(n));
370
426
  }
371
- function Oe(e) {
427
+ function Pe(e) {
372
428
  var t = F, n = e.__c;
373
429
  typeof n == "function" && (e.__c = void 0, n()), F = t;
374
430
  }
375
- function ke(e) {
431
+ function Fe(e) {
376
432
  var t = F;
377
433
  e.__c = e.__(), F = t;
378
434
  }
379
- function Ae(e, t) {
435
+ function Ie(e, t) {
380
436
  return !e || e.length !== t.length || t.some(function(t, n) {
381
437
  return t !== e[n];
382
438
  });
383
439
  }
384
- function je(e, t) {
440
+ function Le(e, t) {
385
441
  return typeof t == "function" ? t(e) : t;
386
442
  }
387
- for (var Me = "1.38.0", V = [], H = [], Ne = Uint8Array, Pe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Fe = 0, Ie = Pe.length; Fe < Ie; ++Fe) V[Fe] = Pe[Fe], H[Pe.charCodeAt(Fe)] = Fe;
388
- H[45] = 62, H[95] = 63;
389
- function Le(e) {
443
+ for (var Re = "1.38.0", H = [], U = [], ze = Uint8Array, Be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ve = 0, He = Be.length; Ve < He; ++Ve) H[Ve] = Be[Ve], U[Be.charCodeAt(Ve)] = Ve;
444
+ U[45] = 62, U[95] = 63;
445
+ function Ue(e) {
390
446
  var t = e.length;
391
447
  if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
392
448
  var n = e.indexOf("=");
@@ -394,33 +450,33 @@ function Le(e) {
394
450
  var r = n === t ? 0 : 4 - n % 4;
395
451
  return [n, r];
396
452
  }
397
- function Re(e, t, n) {
453
+ function We(e, t, n) {
398
454
  return (t + n) * 3 / 4 - n;
399
455
  }
400
- function ze(e) {
401
- var t, n = Le(e), r = n[0], i = n[1], a = new Ne(Re(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
402
- for (c = 0; c < s; c += 4) t = H[e.charCodeAt(c)] << 18 | H[e.charCodeAt(c + 1)] << 12 | H[e.charCodeAt(c + 2)] << 6 | H[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
403
- return i === 2 && (t = H[e.charCodeAt(c)] << 2 | H[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = H[e.charCodeAt(c)] << 10 | H[e.charCodeAt(c + 1)] << 4 | H[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
456
+ function Ge(e) {
457
+ var t, n = Ue(e), r = n[0], i = n[1], a = new ze(We(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
458
+ for (c = 0; c < s; c += 4) t = U[e.charCodeAt(c)] << 18 | U[e.charCodeAt(c + 1)] << 12 | U[e.charCodeAt(c + 2)] << 6 | U[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
459
+ return i === 2 && (t = U[e.charCodeAt(c)] << 2 | U[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = U[e.charCodeAt(c)] << 10 | U[e.charCodeAt(c + 1)] << 4 | U[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
404
460
  }
405
- function Be(e) {
406
- return V[e >> 18 & 63] + V[e >> 12 & 63] + V[e >> 6 & 63] + V[e & 63];
461
+ function Ke(e) {
462
+ return H[e >> 18 & 63] + H[e >> 12 & 63] + H[e >> 6 & 63] + H[e & 63];
407
463
  }
408
- function Ve(e, t, n) {
409
- for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(Be(r));
464
+ function qe(e, t, n) {
465
+ for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(Ke(r));
410
466
  return i.join("");
411
467
  }
412
- function He(e) {
413
- for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(Ve(e, o, o + a > s ? s : o + a));
414
- return r === 1 ? (t = e[n - 1], i.push(V[t >> 2] + V[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(V[t >> 10] + V[t >> 4 & 63] + V[t << 2 & 63] + "=")), i.join("");
468
+ function Je(e) {
469
+ for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(qe(e, o, o + a > s ? s : o + a));
470
+ return r === 1 ? (t = e[n - 1], i.push(H[t >> 2] + H[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(H[t >> 10] + H[t >> 4 & 63] + H[t << 2 & 63] + "=")), i.join("");
415
471
  }
416
472
  //#endregion
417
473
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/common/index.js
418
- function U(e) {
474
+ function W(e) {
419
475
  if (e === void 0) return {};
420
- if (!We(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
476
+ if (!Xe(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
421
477
  return e;
422
478
  }
423
- function Ue(e) {
479
+ function Ye(e) {
424
480
  if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
425
481
  if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
426
482
  if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
@@ -431,146 +487,146 @@ function Ue(e) {
431
487
  }
432
488
  if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
433
489
  }
434
- function We(e) {
490
+ function Xe(e) {
435
491
  let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
436
492
  return t && r;
437
493
  }
438
494
  //#endregion
439
495
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/value.js
440
- var Ge = !0, Ke = BigInt("-9223372036854775808"), qe = BigInt("9223372036854775807"), Je = BigInt("0"), Ye = BigInt("8"), Xe = BigInt("256");
441
- function Ze(e) {
496
+ var Ze = !0, Qe = BigInt("-9223372036854775808"), $e = BigInt("9223372036854775807"), et = BigInt("0"), tt = BigInt("8"), nt = BigInt("256");
497
+ function rt(e) {
442
498
  return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
443
499
  }
444
- function Qe(e) {
445
- e < Je && (e -= Ke + Ke);
500
+ function it(e) {
501
+ e < et && (e -= Qe + Qe);
446
502
  let t = e.toString(16);
447
503
  t.length % 2 == 1 && (t = "0" + t);
448
504
  let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
449
- for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= Ye;
450
- return He(n);
505
+ for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= tt;
506
+ return Je(n);
451
507
  }
452
- function $e(e) {
453
- let t = ze(e);
508
+ function at(e) {
509
+ let t = Ge(e);
454
510
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
455
- let n = Je, r = Je;
456
- for (let e of t) n += BigInt(e) * Xe ** r, r++;
457
- return n > qe && (n += Ke + Ke), n;
511
+ let n = et, r = et;
512
+ for (let e of t) n += BigInt(e) * nt ** r, r++;
513
+ return n > $e && (n += Qe + Qe), n;
458
514
  }
459
- function et(e) {
460
- if (e < Ke || qe < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
515
+ function ot(e) {
516
+ if (e < Qe || $e < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
461
517
  let t = /* @__PURE__ */ new ArrayBuffer(8);
462
- return new DataView(t).setBigInt64(0, e, !0), He(new Uint8Array(t));
518
+ return new DataView(t).setBigInt64(0, e, !0), Je(new Uint8Array(t));
463
519
  }
464
- function tt(e) {
465
- let t = ze(e);
520
+ function st(e) {
521
+ let t = Ge(e);
466
522
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
467
523
  return new DataView(t.buffer).getBigInt64(0, !0);
468
524
  }
469
- var nt = DataView.prototype.setBigInt64 ? et : Qe, rt = DataView.prototype.getBigInt64 ? tt : $e, it = 1024;
470
- function at(e) {
471
- if (e.length > it) throw Error(`Field name ${e} exceeds maximum field name length ${it}.`);
525
+ var ct = DataView.prototype.setBigInt64 ? ot : it, lt = DataView.prototype.getBigInt64 ? st : at, ut = 1024;
526
+ function dt(e) {
527
+ if (e.length > ut) throw Error(`Field name ${e} exceeds maximum field name length ${ut}.`);
472
528
  if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
473
529
  for (let t = 0; t < e.length; t += 1) {
474
530
  let n = e.charCodeAt(t);
475
531
  if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
476
532
  }
477
533
  }
478
- function ot(e) {
534
+ function ft(e) {
479
535
  if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
480
- if (Array.isArray(e)) return e.map((e) => ot(e));
536
+ if (Array.isArray(e)) return e.map((e) => ft(e));
481
537
  if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
482
538
  let t = Object.entries(e);
483
539
  if (t.length === 1) {
484
540
  let n = t[0][0];
485
541
  if (n === "$bytes") {
486
542
  if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
487
- return ze(e.$bytes).buffer;
543
+ return Ge(e.$bytes).buffer;
488
544
  }
489
545
  if (n === "$integer") {
490
546
  if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
491
- return rt(e.$integer);
547
+ return lt(e.$integer);
492
548
  }
493
549
  if (n === "$float") {
494
550
  if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
495
- let t = ze(e.$float);
551
+ let t = Ge(e.$float);
496
552
  if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
497
- let n = new DataView(t.buffer).getFloat64(0, Ge);
498
- if (!Ze(n)) throw Error(`Float ${n} should be encoded as a number`);
553
+ let n = new DataView(t.buffer).getFloat64(0, Ze);
554
+ if (!rt(n)) throw Error(`Float ${n} should be encoded as a number`);
499
555
  return n;
500
556
  }
501
557
  if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
502
558
  if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
503
559
  }
504
560
  let n = {};
505
- for (let [t, r] of Object.entries(e)) at(t), n[t] = ot(r);
561
+ for (let [t, r] of Object.entries(e)) dt(t), n[t] = ft(r);
506
562
  return n;
507
563
  }
508
- var st = 16384;
509
- function ct(e) {
564
+ var pt = 16384;
565
+ function mt(e) {
510
566
  let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
511
- if (t.length > st) {
512
- let e = st - 14, n = t.codePointAt(e - 1);
567
+ if (t.length > pt) {
568
+ let e = pt - 14, n = t.codePointAt(e - 1);
513
569
  return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
514
570
  }
515
571
  return t;
516
572
  }
517
- function lt(e, t, n, r) {
573
+ function ht(e, t, n, r) {
518
574
  if (e === void 0) {
519
- let e = n && ` (present at path ${n} in original object ${ct(t)})`;
575
+ let e = n && ` (present at path ${n} in original object ${mt(t)})`;
520
576
  throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
521
577
  }
522
578
  if (e === null) return e;
523
579
  if (typeof e == "bigint") {
524
- if (e < Ke || qe < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
525
- return { $integer: nt(e) };
580
+ if (e < Qe || $e < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
581
+ return { $integer: ct(e) };
526
582
  }
527
- if (typeof e == "number") if (Ze(e)) {
583
+ if (typeof e == "number") if (rt(e)) {
528
584
  let t = /* @__PURE__ */ new ArrayBuffer(8);
529
- return new DataView(t).setFloat64(0, e, Ge), { $float: He(new Uint8Array(t)) };
585
+ return new DataView(t).setFloat64(0, e, Ze), { $float: Je(new Uint8Array(t)) };
530
586
  } else return e;
531
587
  if (typeof e == "boolean" || typeof e == "string") return e;
532
- if (e instanceof ArrayBuffer) return { $bytes: He(new Uint8Array(e)) };
533
- if (Array.isArray(e)) return e.map((e, r) => lt(e, t, n + `[${r}]`, !1));
534
- if (e instanceof Set) throw Error(ut(n, "Set", [...e], t));
535
- if (e instanceof Map) throw Error(ut(n, "Map", [...e], t));
536
- if (!We(e)) {
588
+ if (e instanceof ArrayBuffer) return { $bytes: Je(new Uint8Array(e)) };
589
+ if (Array.isArray(e)) return e.map((e, r) => ht(e, t, n + `[${r}]`, !1));
590
+ if (e instanceof Set) throw Error(gt(n, "Set", [...e], t));
591
+ if (e instanceof Map) throw Error(gt(n, "Map", [...e], t));
592
+ if (!Xe(e)) {
537
593
  let r = e?.constructor?.name, i = r ? `${r} ` : "";
538
- throw Error(ut(n, i, e, t));
594
+ throw Error(gt(n, i, e, t));
539
595
  }
540
596
  let i = {}, a = Object.entries(e);
541
597
  a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
542
- for (let [e, o] of a) o === void 0 ? r && (at(e), i[e] = dt(o, t, n + `.${e}`)) : (at(e), i[e] = lt(o, t, n + `.${e}`, !1));
598
+ for (let [e, o] of a) o === void 0 ? r && (dt(e), i[e] = _t(o, t, n + `.${e}`)) : (dt(e), i[e] = ht(o, t, n + `.${e}`, !1));
543
599
  return i;
544
600
  }
545
- function ut(e, t, n, r) {
546
- return e ? `${t}${ct(n)} is not a supported Convex type (present at path ${e} in original object ${ct(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${ct(n)} is not a supported Convex type.`;
601
+ function gt(e, t, n, r) {
602
+ return e ? `${t}${mt(n)} is not a supported Convex type (present at path ${e} in original object ${mt(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${mt(n)} is not a supported Convex type.`;
547
603
  }
548
- function dt(e, t, n) {
604
+ function _t(e, t, n) {
549
605
  if (e === void 0) return { $undefined: null };
550
- if (t === void 0) throw Error(`Programming error. Current value is ${ct(e)} but original value is undefined`);
551
- return lt(e, t, n, !1);
606
+ if (t === void 0) throw Error(`Programming error. Current value is ${mt(e)} but original value is undefined`);
607
+ return ht(e, t, n, !1);
552
608
  }
553
- function ft(e) {
554
- return lt(e, e, "", !1);
609
+ function vt(e) {
610
+ return ht(e, e, "", !1);
555
611
  }
556
612
  //#endregion
557
613
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/values/errors.js
558
- var pt = Object.defineProperty, mt = (e, t, n) => t in e ? pt(e, t, {
614
+ var yt = Object.defineProperty, bt = (e, t, n) => t in e ? yt(e, t, {
559
615
  enumerable: !0,
560
616
  configurable: !0,
561
617
  writable: !0,
562
618
  value: n
563
- }) : e[t] = n, ht = (e, t, n) => mt(e, typeof t == "symbol" ? t : t + "", n), gt, _t, vt = Symbol.for("ConvexError"), yt = class extends (_t = Error, gt = vt, _t) {
619
+ }) : e[t] = n, xt = (e, t, n) => bt(e, typeof t == "symbol" ? t : t + "", n), St, Ct, wt = Symbol.for("ConvexError"), Tt = class extends (Ct = Error, St = wt, Ct) {
564
620
  constructor(e) {
565
- super(typeof e == "string" ? e : ct(e)), ht(this, "name", "ConvexError"), ht(this, "data"), ht(this, gt, !0), this.data = e;
621
+ super(typeof e == "string" ? e : mt(e)), xt(this, "name", "ConvexError"), xt(this, "data"), xt(this, St, !0), this.data = e;
566
622
  }
567
- }, bt = Object.defineProperty, xt = (e, t, n) => t in e ? bt(e, t, {
623
+ }, Et = Object.defineProperty, Dt = (e, t, n) => t in e ? Et(e, t, {
568
624
  enumerable: !0,
569
625
  configurable: !0,
570
626
  writable: !0,
571
627
  value: n
572
- }) : e[t] = n, St = (e, t, n) => xt(e, typeof t == "symbol" ? t : t + "", n), Ct = "color:rgb(0, 145, 255)";
573
- function wt(e) {
628
+ }) : e[t] = n, Ot = (e, t, n) => Dt(e, typeof t == "symbol" ? t : t + "", n), kt = "color:rgb(0, 145, 255)";
629
+ function At(e) {
574
630
  switch (e) {
575
631
  case "query": return "Q";
576
632
  case "mutation": return "M";
@@ -578,9 +634,9 @@ function wt(e) {
578
634
  case "any": return "?";
579
635
  }
580
636
  }
581
- var Tt = class {
637
+ var jt = class {
582
638
  constructor(e) {
583
- St(this, "_onLogLineFuncs"), St(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
639
+ Ot(this, "_onLogLineFuncs"), Ot(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
584
640
  }
585
641
  addLogLineListener(e) {
586
642
  let t = Math.random().toString(36).substring(2, 15);
@@ -602,8 +658,8 @@ var Tt = class {
602
658
  for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
603
659
  }
604
660
  };
605
- function Et(e) {
606
- let t = new Tt(e);
661
+ function Mt(e) {
662
+ let t = new jt(e);
607
663
  return t.addLogLineListener((e, ...t) => {
608
664
  switch (e) {
609
665
  case "debug":
@@ -622,11 +678,11 @@ function Et(e) {
622
678
  }
623
679
  }), t;
624
680
  }
625
- function Dt(e) {
626
- return new Tt(e);
681
+ function Nt(e) {
682
+ return new jt(e);
627
683
  }
628
- function Ot(e, t, n, r, i) {
629
- let a = wt(n);
684
+ function Pt(e, t, n, r, i) {
685
+ let a = At(n);
630
686
  if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
631
687
  let t = i.match(/^\[.*?\] /);
632
688
  if (t === null) {
@@ -634,57 +690,57 @@ function Ot(e, t, n, r, i) {
634
690
  return;
635
691
  }
636
692
  let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
637
- e.log(`%c[CONVEX ${a}(${r})] [${n}]`, Ct, o);
693
+ e.log(`%c[CONVEX ${a}(${r})] [${n}]`, kt, o);
638
694
  } else e.error(`[CONVEX ${a}(${r})] ${i}`);
639
695
  }
640
- function kt(e, t) {
696
+ function Ft(e, t) {
641
697
  let n = `[CONVEX FATAL ERROR] ${t}`;
642
698
  return e.error(n), Error(n);
643
699
  }
644
- function At(e, t, n) {
645
- return `[CONVEX ${wt(e)}(${t})] ${n.errorMessage}
700
+ function It(e, t, n) {
701
+ return `[CONVEX ${At(e)}(${t})] ${n.errorMessage}
646
702
  Called by client`;
647
703
  }
648
- function jt(e, t) {
704
+ function Lt(e, t) {
649
705
  return t.data = e.errorData, t;
650
706
  }
651
707
  //#endregion
652
708
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
653
- function Mt(e) {
709
+ function Rt(e) {
654
710
  let t = e.split(":"), n, r;
655
711
  return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
656
712
  }
657
- function Nt(e, t) {
713
+ function zt(e, t) {
658
714
  return JSON.stringify({
659
- udfPath: Mt(e),
660
- args: ft(t)
715
+ udfPath: Rt(e),
716
+ args: vt(t)
661
717
  });
662
718
  }
663
- function Pt(e, t, n) {
719
+ function Bt(e, t, n) {
664
720
  let { initialNumItems: r, id: i } = n;
665
721
  return JSON.stringify({
666
722
  type: "paginated",
667
- udfPath: Mt(e),
668
- args: ft(t),
669
- options: ft({
723
+ udfPath: Rt(e),
724
+ args: vt(t),
725
+ options: vt({
670
726
  initialNumItems: r,
671
727
  id: i
672
728
  })
673
729
  });
674
730
  }
675
- function Ft(e) {
731
+ function Vt(e) {
676
732
  return JSON.parse(e).type === "paginated";
677
733
  }
678
734
  //#endregion
679
735
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/local_state.js
680
- var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
736
+ var Ht = Object.defineProperty, Ut = (e, t, n) => t in e ? Ht(e, t, {
681
737
  enumerable: !0,
682
738
  configurable: !0,
683
739
  writable: !0,
684
740
  value: n
685
- }) : e[t] = n, W = (e, t, n) => Lt(e, typeof t == "symbol" ? t : t + "", n), Rt = class {
741
+ }) : e[t] = n, G = (e, t, n) => Ut(e, typeof t == "symbol" ? t : t + "", n), Wt = class {
686
742
  constructor() {
687
- W(this, "nextQueryId"), W(this, "querySetVersion"), W(this, "querySet"), W(this, "queryIdToToken"), W(this, "identityVersion"), W(this, "auth"), W(this, "outstandingQueriesOlderThanRestart"), W(this, "outstandingAuthOlderThanRestart"), W(this, "paused"), W(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
743
+ G(this, "nextQueryId"), G(this, "querySetVersion"), G(this, "querySet"), G(this, "queryIdToToken"), G(this, "identityVersion"), G(this, "auth"), G(this, "outstandingQueriesOlderThanRestart"), G(this, "outstandingAuthOlderThanRestart"), G(this, "paused"), G(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
688
744
  }
689
745
  hasSyncedPastLastReconnect() {
690
746
  return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
@@ -693,7 +749,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
693
749
  this.outstandingAuthOlderThanRestart = !1;
694
750
  }
695
751
  subscribe(e, t, n, r) {
696
- let i = Mt(e), a = Nt(i, t), o = this.querySet.get(a);
752
+ let i = Rt(e), a = zt(i, t), o = this.querySet.get(a);
697
753
  if (o !== void 0) return o.numSubscribers += 1, {
698
754
  queryToken: a,
699
755
  modification: null,
@@ -713,7 +769,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
713
769
  type: "Add",
714
770
  queryId: e,
715
771
  udfPath: i,
716
- args: [ft(t)],
772
+ args: [vt(t)],
717
773
  journal: n,
718
774
  componentPath: r
719
775
  };
@@ -748,7 +804,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
748
804
  }
749
805
  }
750
806
  queryId(e, t) {
751
- let n = Nt(Mt(e), t), r = this.querySet.get(n);
807
+ let n = zt(Rt(e), t), r = this.querySet.get(n);
752
808
  return r === void 0 ? null : r.id;
753
809
  }
754
810
  isCurrentOrNewerAuthVersion(e) {
@@ -820,7 +876,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
820
876
  type: "Add",
821
877
  queryId: t.id,
822
878
  udfPath: t.canonicalizedUdfPath,
823
- args: [ft(t.args)],
879
+ args: [vt(t.args)],
824
880
  journal: t.journal,
825
881
  componentPath: t.componentPath
826
882
  };
@@ -878,14 +934,14 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
878
934
  };
879
935
  }
880
936
  }
881
- }, zt = Object.defineProperty, Bt = (e, t, n) => t in e ? zt(e, t, {
937
+ }, Gt = Object.defineProperty, Kt = (e, t, n) => t in e ? Gt(e, t, {
882
938
  enumerable: !0,
883
939
  configurable: !0,
884
940
  writable: !0,
885
941
  value: n
886
- }) : e[t] = n, Vt = (e, t, n) => Bt(e, typeof t == "symbol" ? t : t + "", n), Ht = class {
942
+ }) : e[t] = n, qt = (e, t, n) => Kt(e, typeof t == "symbol" ? t : t + "", n), Jt = class {
887
943
  constructor(e, t) {
888
- this.logger = e, this.markConnectionStateDirty = t, Vt(this, "inflightRequests"), Vt(this, "requestsOlderThanRestart"), Vt(this, "inflightMutationsCount", 0), Vt(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
944
+ this.logger = e, this.markConnectionStateDirty = t, qt(this, "inflightRequests"), qt(this, "requestsOlderThanRestart"), qt(this, "inflightMutationsCount", 0), qt(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
889
945
  }
890
946
  request(e, t) {
891
947
  let n = new Promise((n) => {
@@ -905,19 +961,19 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
905
961
  let t = this.inflightRequests.get(e.requestId);
906
962
  if (t === void 0 || t.status.status === "Completed") return null;
907
963
  let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
908
- for (let t of e.logLines) Ot(this.logger, "info", n, r, t);
964
+ for (let t of e.logLines) Pt(this.logger, "info", n, r, t);
909
965
  let i = t.status, a, o;
910
966
  if (e.success) a = {
911
967
  success: !0,
912
968
  logLines: e.logLines,
913
- value: ot(e.result)
969
+ value: ft(e.result)
914
970
  }, o = () => i.onResult(a);
915
971
  else {
916
972
  let t = e.result, { errorData: s } = e;
917
- Ot(this.logger, "error", n, r, t), a = {
973
+ Pt(this.logger, "error", n, r, t), a = {
918
974
  success: !1,
919
975
  errorMessage: t,
920
- errorData: s === void 0 ? void 0 : ot(s),
976
+ errorData: s === void 0 ? void 0 : ft(s),
921
977
  logLines: e.logLines
922
978
  }, o = () => i.onResult(a);
923
979
  }
@@ -989,19 +1045,19 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
989
1045
  inflightActions() {
990
1046
  return this.inflightActionsCount;
991
1047
  }
992
- }, Ut = Symbol.for("functionName"), Wt = Symbol.for("toReferencePath");
993
- function Gt(e) {
994
- return e[Wt] ?? null;
1048
+ }, Yt = Symbol.for("functionName"), Xt = Symbol.for("toReferencePath");
1049
+ function Zt(e) {
1050
+ return e[Xt] ?? null;
995
1051
  }
996
- function Kt(e) {
1052
+ function Qt(e) {
997
1053
  return e.startsWith("function://");
998
1054
  }
999
- function qt(e) {
1055
+ function $t(e) {
1000
1056
  let t;
1001
- if (typeof e == "string") t = Kt(e) ? { functionHandle: e } : { name: e };
1002
- else if (e[Ut]) t = { name: e[Ut] };
1057
+ if (typeof e == "string") t = Qt(e) ? { functionHandle: e } : { name: e };
1058
+ else if (e[Yt]) t = { name: e[Yt] };
1003
1059
  else {
1004
- let n = Gt(e);
1060
+ let n = Zt(e);
1005
1061
  if (!n) throw Error(`${e} is not a functionReference`);
1006
1062
  t = { reference: n };
1007
1063
  }
@@ -1009,21 +1065,21 @@ function qt(e) {
1009
1065
  }
1010
1066
  //#endregion
1011
1067
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/server/api.js
1012
- function G(e) {
1013
- let t = qt(e);
1068
+ function K(e) {
1069
+ let t = $t(e);
1014
1070
  if (t.name === void 0) throw t.functionHandle === void 0 ? t.reference === void 0 ? Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`) : Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`) : Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);
1015
1071
  if (typeof e == "string") return e;
1016
- let n = e[Ut];
1072
+ let n = e[Yt];
1017
1073
  if (!n) throw Error(`${e} is not a functionReference`);
1018
1074
  return n;
1019
1075
  }
1020
- function Jt(e) {
1021
- return { [Ut]: e };
1076
+ function en(e) {
1077
+ return { [Yt]: e };
1022
1078
  }
1023
- function Yt(e = []) {
1079
+ function tn(e = []) {
1024
1080
  return new Proxy({}, { get(t, n) {
1025
- if (typeof n == "string") return Yt([...e, n]);
1026
- if (n === Ut) {
1081
+ if (typeof n == "string") return tn([...e, n]);
1082
+ if (n === Yt) {
1027
1083
  if (e.length < 2) {
1028
1084
  let t = ["api", ...e].join(".");
1029
1085
  throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``);
@@ -1034,32 +1090,32 @@ function Yt(e = []) {
1034
1090
  else return;
1035
1091
  } });
1036
1092
  }
1037
- Yt();
1093
+ tn();
1038
1094
  //#endregion
1039
1095
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/optimistic_updates_impl.js
1040
- var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1096
+ var nn = Object.defineProperty, rn = (e, t, n) => t in e ? nn(e, t, {
1041
1097
  enumerable: !0,
1042
1098
  configurable: !0,
1043
1099
  writable: !0,
1044
1100
  value: n
1045
- }) : e[t] = n, Qt = (e, t, n) => Zt(e, typeof t == "symbol" ? t : t + "", n), $t = class e {
1101
+ }) : e[t] = n, an = (e, t, n) => rn(e, typeof t == "symbol" ? t : t + "", n), on = class e {
1046
1102
  constructor(e) {
1047
- Qt(this, "queryResults"), Qt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1103
+ an(this, "queryResults"), an(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1048
1104
  }
1049
1105
  getQuery(t, ...n) {
1050
- let r = U(n[0]), i = G(t), a = this.queryResults.get(Nt(i, r));
1106
+ let r = W(n[0]), i = K(t), a = this.queryResults.get(zt(i, r));
1051
1107
  if (a !== void 0) return e.queryValue(a.result);
1052
1108
  }
1053
1109
  getAllQueries(t) {
1054
- let n = [], r = G(t);
1055
- for (let t of this.queryResults.values()) t.udfPath === Mt(r) && n.push({
1110
+ let n = [], r = K(t);
1111
+ for (let t of this.queryResults.values()) t.udfPath === Rt(r) && n.push({
1056
1112
  args: t.args,
1057
1113
  value: e.queryValue(t.result)
1058
1114
  });
1059
1115
  return n;
1060
1116
  }
1061
1117
  setQuery(e, t, n) {
1062
- let r = U(t), i = G(e), a = Nt(i, r), o;
1118
+ let r = W(t), i = K(e), a = zt(i, r), o;
1063
1119
  o = n === void 0 ? void 0 : {
1064
1120
  success: !0,
1065
1121
  value: n,
@@ -1075,15 +1131,15 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1075
1131
  static queryValue(e) {
1076
1132
  if (e !== void 0 && e.success) return e.value;
1077
1133
  }
1078
- }, en = class {
1134
+ }, sn = class {
1079
1135
  constructor() {
1080
- Qt(this, "queryResults"), Qt(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
1136
+ an(this, "queryResults"), an(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
1081
1137
  }
1082
1138
  ingestQueryResultsFromServer(e, t) {
1083
1139
  this.optimisticUpdates = this.optimisticUpdates.filter((e) => !t.has(e.mutationId));
1084
1140
  let n = this.queryResults;
1085
1141
  this.queryResults = new Map(e);
1086
- let r = new $t(this.queryResults);
1142
+ let r = new on(this.queryResults);
1087
1143
  for (let e of this.optimisticUpdates) e.update(r);
1088
1144
  let i = [];
1089
1145
  for (let [e, t] of this.queryResults) {
@@ -1097,7 +1153,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1097
1153
  update: e,
1098
1154
  mutationId: t
1099
1155
  });
1100
- let n = new $t(this.queryResults);
1156
+ let n = new on(this.queryResults);
1101
1157
  return e(n), n.modifiedQueries;
1102
1158
  }
1103
1159
  rawQueryResult(e) {
@@ -1110,7 +1166,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1110
1166
  let n = t.result;
1111
1167
  if (n !== void 0) {
1112
1168
  if (n.success) return n.value;
1113
- throw n.errorData === void 0 ? Error(At("query", t.udfPath, n)) : jt(n, new yt(At("query", t.udfPath, n)));
1169
+ throw n.errorData === void 0 ? Error(It("query", t.udfPath, n)) : Lt(n, new Tt(It("query", t.udfPath, n)));
1114
1170
  }
1115
1171
  }
1116
1172
  hasQueryResult(e) {
@@ -1119,14 +1175,14 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1119
1175
  queryLogs(e) {
1120
1176
  return this.queryResults.get(e)?.result?.logLines;
1121
1177
  }
1122
- }, tn = Object.defineProperty, nn = (e, t, n) => t in e ? tn(e, t, {
1178
+ }, cn = Object.defineProperty, ln = (e, t, n) => t in e ? cn(e, t, {
1123
1179
  enumerable: !0,
1124
1180
  configurable: !0,
1125
1181
  writable: !0,
1126
1182
  value: n
1127
- }) : e[t] = n, rn = (e, t, n) => nn(e, typeof t == "symbol" ? t : t + "", n), an = class e {
1183
+ }) : e[t] = n, un = (e, t, n) => ln(e, typeof t == "symbol" ? t : t + "", n), dn = class e {
1128
1184
  constructor(e, t) {
1129
- rn(this, "low"), rn(this, "high"), rn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
1185
+ un(this, "low"), un(this, "high"), un(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
1130
1186
  }
1131
1187
  static isLong(e) {
1132
1188
  return (e && e.__isUnsignedLong__) === !0;
@@ -1148,10 +1204,10 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1148
1204
  ];
1149
1205
  }
1150
1206
  static fromNumber(t) {
1151
- return isNaN(t) || t < 0 ? on : t >= ln ? un : new e(t % cn | 0, t / cn | 0);
1207
+ return isNaN(t) || t < 0 ? fn : t >= hn ? gn : new e(t % mn | 0, t / mn | 0);
1152
1208
  }
1153
1209
  toString() {
1154
- return (BigInt(this.high) * BigInt(cn) + BigInt(this.low)).toString();
1210
+ return (BigInt(this.high) * BigInt(mn) + BigInt(this.low)).toString();
1155
1211
  }
1156
1212
  equals(t) {
1157
1213
  return e.isLong(t) || (t = e.fromValue(t)), this.high >>> 31 == 1 && t.high >>> 31 == 1 ? !1 : this.high === t.high && this.low === t.low;
@@ -1168,16 +1224,16 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1168
1224
  static fromValue(t) {
1169
1225
  return typeof t == "number" ? e.fromNumber(t) : new e(t.low, t.high);
1170
1226
  }
1171
- }, on = new an(0, 0), sn = 65536, cn = sn * sn, ln = cn * cn, un = new an(-1, -1), dn = Object.defineProperty, fn = (e, t, n) => t in e ? dn(e, t, {
1227
+ }, fn = new dn(0, 0), pn = 65536, mn = pn * pn, hn = mn * mn, gn = new dn(-1, -1), _n = Object.defineProperty, vn = (e, t, n) => t in e ? _n(e, t, {
1172
1228
  enumerable: !0,
1173
1229
  configurable: !0,
1174
1230
  writable: !0,
1175
1231
  value: n
1176
- }) : e[t] = n, pn = (e, t, n) => fn(e, typeof t == "symbol" ? t : t + "", n), mn = class {
1232
+ }) : e[t] = n, yn = (e, t, n) => vn(e, typeof t == "symbol" ? t : t + "", n), bn = class {
1177
1233
  constructor(e, t) {
1178
- pn(this, "version"), pn(this, "remoteQuerySet"), pn(this, "queryPath"), pn(this, "logger"), this.version = {
1234
+ yn(this, "version"), yn(this, "remoteQuerySet"), yn(this, "queryPath"), yn(this, "logger"), this.version = {
1179
1235
  querySet: 0,
1180
- ts: an.fromNumber(0),
1236
+ ts: dn.fromNumber(0),
1181
1237
  identity: 0
1182
1238
  }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = t;
1183
1239
  }
@@ -1187,8 +1243,8 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1187
1243
  for (let t of e.modifications) switch (t.type) {
1188
1244
  case "QueryUpdated": {
1189
1245
  let e = this.queryPath(t.queryId);
1190
- if (e) for (let n of t.logLines) Ot(this.logger, "info", "query", e, n);
1191
- let n = ot(t.value ?? null);
1246
+ if (e) for (let n of t.logLines) Pt(this.logger, "info", "query", e, n);
1247
+ let n = ft(t.value ?? null);
1192
1248
  this.remoteQuerySet.set(t.queryId, {
1193
1249
  success: !0,
1194
1250
  value: n,
@@ -1198,12 +1254,12 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1198
1254
  }
1199
1255
  case "QueryFailed": {
1200
1256
  let e = this.queryPath(t.queryId);
1201
- if (e) for (let n of t.logLines) Ot(this.logger, "info", "query", e, n);
1257
+ if (e) for (let n of t.logLines) Pt(this.logger, "info", "query", e, n);
1202
1258
  let { errorData: n } = t;
1203
1259
  this.remoteQuerySet.set(t.queryId, {
1204
1260
  success: !1,
1205
1261
  errorMessage: t.errorMessage,
1206
- errorData: n === void 0 ? void 0 : ot(n),
1262
+ errorData: n === void 0 ? void 0 : ft(n),
1207
1263
  logLines: t.logLines
1208
1264
  });
1209
1265
  break;
@@ -1224,14 +1280,14 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
1224
1280
  };
1225
1281
  //#endregion
1226
1282
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/protocol.js
1227
- function hn(e) {
1228
- let t = ze(e);
1229
- return an.fromBytesLE(Array.from(t));
1283
+ function xn(e) {
1284
+ let t = Ge(e);
1285
+ return dn.fromBytesLE(Array.from(t));
1230
1286
  }
1231
- function gn(e) {
1232
- return He(new Uint8Array(e.toBytesLE()));
1287
+ function Sn(e) {
1288
+ return Je(new Uint8Array(e.toBytesLE()));
1233
1289
  }
1234
- function _n(e) {
1290
+ function Cn(e) {
1235
1291
  switch (e.type) {
1236
1292
  case "FatalError":
1237
1293
  case "AuthError":
@@ -1240,23 +1296,23 @@ function _n(e) {
1240
1296
  case "Ping": return { ...e };
1241
1297
  case "MutationResponse": return e.success ? {
1242
1298
  ...e,
1243
- ts: hn(e.ts)
1299
+ ts: xn(e.ts)
1244
1300
  } : { ...e };
1245
1301
  case "Transition": return {
1246
1302
  ...e,
1247
1303
  startVersion: {
1248
1304
  ...e.startVersion,
1249
- ts: hn(e.startVersion.ts)
1305
+ ts: xn(e.startVersion.ts)
1250
1306
  },
1251
1307
  endVersion: {
1252
1308
  ...e.endVersion,
1253
- ts: hn(e.endVersion.ts)
1309
+ ts: xn(e.endVersion.ts)
1254
1310
  }
1255
1311
  };
1256
1312
  default:
1257
1313
  }
1258
1314
  }
1259
- function vn(e) {
1315
+ function wn(e) {
1260
1316
  switch (e.type) {
1261
1317
  case "Authenticate":
1262
1318
  case "ModifyQuerySet":
@@ -1268,26 +1324,26 @@ function vn(e) {
1268
1324
  maxObservedTimestamp: void 0
1269
1325
  } : {
1270
1326
  ...e,
1271
- maxObservedTimestamp: gn(e.maxObservedTimestamp)
1327
+ maxObservedTimestamp: Sn(e.maxObservedTimestamp)
1272
1328
  };
1273
1329
  default:
1274
1330
  }
1275
1331
  }
1276
1332
  //#endregion
1277
1333
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/web_socket_manager.js
1278
- var yn = Object.defineProperty, bn = (e, t, n) => t in e ? yn(e, t, {
1334
+ var Tn = Object.defineProperty, En = (e, t, n) => t in e ? Tn(e, t, {
1279
1335
  enumerable: !0,
1280
1336
  configurable: !0,
1281
1337
  writable: !0,
1282
1338
  value: n
1283
- }) : e[t] = n, K = (e, t, n) => bn(e, typeof t == "symbol" ? t : t + "", n), xn = 1e3, Sn = 1001, Cn = 1005, wn = 4040, Tn;
1284
- function En() {
1285
- return Tn === void 0 && (Tn = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(Tn + performance.now());
1339
+ }) : e[t] = n, q = (e, t, n) => En(e, typeof t == "symbol" ? t : t + "", n), Dn = 1e3, On = 1001, kn = 1005, An = 4040, jn;
1340
+ function Mn() {
1341
+ return jn === void 0 && (jn = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(jn + performance.now());
1286
1342
  }
1287
- function Dn() {
1288
- return `t=${Math.round((En() - Tn) / 100) / 10}s`;
1343
+ function Nn() {
1344
+ return `t=${Math.round((Mn() - jn) / 100) / 10}s`;
1289
1345
  }
1290
- var On = {
1346
+ var Pn = {
1291
1347
  InternalServerError: { timeout: 1e3 },
1292
1348
  SubscriptionsWorkerFullError: { timeout: 3e3 },
1293
1349
  TooManyConcurrentRequests: { timeout: 3e3 },
@@ -1303,14 +1359,14 @@ var On = {
1303
1359
  SearchIndexTooLarge: { timeout: 3e3 },
1304
1360
  TooManyWritesInTimePeriod: { timeout: 3e3 }
1305
1361
  };
1306
- function kn(e) {
1362
+ function Fn(e) {
1307
1363
  if (e === void 0) return "Unknown";
1308
- for (let t of Object.keys(On)) if (e.startsWith(t)) return t;
1364
+ for (let t of Object.keys(Pn)) if (e.startsWith(t)) return t;
1309
1365
  return "Unknown";
1310
1366
  }
1311
- var An = class {
1367
+ var In = class {
1312
1368
  constructor(e, t, n, r, i, a) {
1313
- this.markConnectionStateDirty = i, this.debug = a, K(this, "socket"), K(this, "connectionCount"), K(this, "_hasEverConnected", !1), K(this, "lastCloseReason"), K(this, "transitionChunkBuffer", null), K(this, "defaultInitialBackoff"), K(this, "maxBackoff"), K(this, "retries"), K(this, "serverInactivityThreshold"), K(this, "reconnectDueToServerInactivityTimeout"), K(this, "scheduledReconnect", null), K(this, "networkOnlineHandler", null), K(this, "pendingNetworkRecoveryInfo", null), K(this, "uri"), K(this, "onOpen"), K(this, "onResume"), K(this, "onMessage"), K(this, "webSocketConstructor"), K(this, "logger"), K(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
1369
+ this.markConnectionStateDirty = i, this.debug = a, q(this, "socket"), q(this, "connectionCount"), q(this, "_hasEverConnected", !1), q(this, "lastCloseReason"), q(this, "transitionChunkBuffer", null), q(this, "defaultInitialBackoff"), q(this, "maxBackoff"), q(this, "retries"), q(this, "serverInactivityThreshold"), q(this, "reconnectDueToServerInactivityTimeout"), q(this, "scheduledReconnect", null), q(this, "networkOnlineHandler", null), q(this, "pendingNetworkRecoveryInfo", null), q(this, "uri"), q(this, "onOpen"), q(this, "onResume"), q(this, "onMessage"), q(this, "webSocketConstructor"), q(this, "logger"), q(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
1314
1370
  }
1315
1371
  setSocketState(e) {
1316
1372
  this.socket = e, this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused" in this.socket ? this.socket.paused : void 0}`), this.markConnectionStateDirty();
@@ -1336,7 +1392,7 @@ var An = class {
1336
1392
  if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
1337
1393
  let e = this.transitionChunkBuffer.chunks.join("");
1338
1394
  this.transitionChunkBuffer = null;
1339
- let t = _n(JSON.parse(e));
1395
+ let t = Cn(JSON.parse(e));
1340
1396
  if (t.type !== "Transition") throw Error(`Expected Transition, got ${t.type} after assembling chunks`);
1341
1397
  return t;
1342
1398
  }
@@ -1359,8 +1415,8 @@ var An = class {
1359
1415
  }), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
1360
1416
  connectionCount: this.connectionCount,
1361
1417
  lastCloseReason: this.lastCloseReason,
1362
- clientTs: En()
1363
- })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", Dn(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", Dn())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1418
+ clientTs: Mn()
1419
+ })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", Nn(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", Nn())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1364
1420
  let { timeSavedMs: e } = this.pendingNetworkRecoveryInfo;
1365
1421
  this.pendingNetworkRecoveryInfo = null, this.sendMessage({
1366
1422
  type: "Event",
@@ -1374,7 +1430,7 @@ var An = class {
1374
1430
  t && this.logger.log(`WebSocket error message: ${t}`);
1375
1431
  }, e.onmessage = (e) => {
1376
1432
  this.resetServerInactivityTimeout();
1377
- let t = e.data.length, n = _n(JSON.parse(e.data));
1433
+ let t = e.data.length, n = Cn(JSON.parse(e.data));
1378
1434
  if (this._logVerbose(`received ws message with type ${n.type}`), n.type !== "Ping") {
1379
1435
  if (n.type === "TransitionChunk") {
1380
1436
  let e = this.assembleTransition(n);
@@ -1387,11 +1443,11 @@ var An = class {
1387
1443
  }), this.onMessage(n).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
1388
1444
  }
1389
1445
  }, e.onclose = (e) => {
1390
- if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== xn && e.code !== Sn && e.code !== Cn && e.code !== wn) {
1446
+ if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== Dn && e.code !== On && e.code !== kn && e.code !== An) {
1391
1447
  let t = `WebSocket closed with code ${e.code}`;
1392
1448
  e.reason && (t += `: ${e.reason}`), this.logger.log(t), this.onServerDisconnectError && e.reason && this.onServerDisconnectError(t);
1393
1449
  }
1394
- let t = kn(e.reason);
1450
+ let t = Fn(e.reason);
1395
1451
  this.scheduleReconnect(t);
1396
1452
  };
1397
1453
  }
@@ -1404,7 +1460,7 @@ var An = class {
1404
1460
  ...e.type === "Authenticate" && e.tokenType === "User" ? { value: `...${e.value.slice(-7)}` } : {}
1405
1461
  };
1406
1462
  if (this.socket.state === "ready" && this.socket.paused === "no") {
1407
- let n = vn(e), r = JSON.stringify(n), i = !1;
1463
+ let n = wn(e), r = JSON.stringify(n), i = !1;
1408
1464
  try {
1409
1465
  this.socket.ws.send(r), i = !0;
1410
1466
  } catch (e) {
@@ -1423,7 +1479,7 @@ var An = class {
1423
1479
  this.scheduledReconnect &&= (clearTimeout(this.scheduledReconnect.timeout), null), this.socket = { state: "disconnected" };
1424
1480
  let t = this.nextBackoff(e);
1425
1481
  this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);
1426
- let n = En(), r = setTimeout(() => {
1482
+ let n = Mn(), r = setTimeout(() => {
1427
1483
  this.scheduledReconnect?.timeout === r && (this.scheduledReconnect = null, this.connect());
1428
1484
  }, t);
1429
1485
  this.scheduledReconnect = {
@@ -1541,7 +1597,7 @@ var An = class {
1541
1597
  }
1542
1598
  let e = null;
1543
1599
  if (this.scheduledReconnect) {
1544
- let t = En() - this.scheduledReconnect.scheduledAt;
1600
+ let t = Mn() - this.scheduledReconnect.scheduledAt;
1545
1601
  e = Math.max(0, this.scheduledReconnect.backoffMs - t), this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
1546
1602
  }
1547
1603
  this.logger.log("Network recovery detected, reconnecting immediately"), this.pendingNetworkRecoveryInfo = e === null ? null : { timeSavedMs: e }, this.connect();
@@ -1561,7 +1617,7 @@ var An = class {
1561
1617
  }, this._hasEverConnected = !0, this.onOpen({
1562
1618
  connectionCount: this.connectionCount,
1563
1619
  lastCloseReason: this.lastCloseReason,
1564
- clientTs: En()
1620
+ clientTs: Mn()
1565
1621
  })) : this.socket.paused === "yes" && (this.socket = {
1566
1622
  ...this.socket,
1567
1623
  paused: "no"
@@ -1586,14 +1642,14 @@ var An = class {
1586
1642
  this.logger.logVerbose(e);
1587
1643
  }
1588
1644
  nextBackoff(e) {
1589
- let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : On[e].timeout) * 2 ** this.retries;
1645
+ let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : Pn[e].timeout) * 2 ** this.retries;
1590
1646
  this.retries += 1;
1591
1647
  let n = Math.min(t, this.maxBackoff);
1592
1648
  return n + n * (Math.random() - .5);
1593
1649
  }
1594
1650
  reportLargeTransition({ transition: e, messageLength: t }) {
1595
1651
  if (e.clientClockSkew === void 0 || e.serverTs === void 0) return;
1596
- let n = En() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
1652
+ let n = Mn() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
1597
1653
  this._logVerbose(`received ${i} transition in ${r} at ${o}`), t > 2e7 ? this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`) : n > 2e4 && this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`), this.debug && this.sendMessage({
1598
1654
  type: "Event",
1599
1655
  eventType: "ClientReceivedTransition",
@@ -1606,10 +1662,10 @@ var An = class {
1606
1662
  };
1607
1663
  //#endregion
1608
1664
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/session.js
1609
- function jn() {
1610
- return Mn();
1665
+ function Ln() {
1666
+ return Rn();
1611
1667
  }
1612
- function Mn() {
1668
+ function Rn() {
1613
1669
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
1614
1670
  let t = Math.random() * 16 | 0;
1615
1671
  return (e === "x" ? t : t & 3 | 8).toString(16);
@@ -1617,15 +1673,15 @@ function Mn() {
1617
1673
  }
1618
1674
  //#endregion
1619
1675
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/vendor/jwt-decode/index.js
1620
- var Nn = class extends Error {};
1621
- Nn.prototype.name = "InvalidTokenError";
1622
- function Pn(e) {
1676
+ var zn = class extends Error {};
1677
+ zn.prototype.name = "InvalidTokenError";
1678
+ function Bn(e) {
1623
1679
  return decodeURIComponent(atob(e).replace(/(.)/g, (e, t) => {
1624
1680
  let n = t.charCodeAt(0).toString(16).toUpperCase();
1625
1681
  return n.length < 2 && (n = "0" + n), "%" + n;
1626
1682
  }));
1627
1683
  }
1628
- function Fn(e) {
1684
+ function Vn(e) {
1629
1685
  let t = e.replace(/-/g, "+").replace(/_/g, "/");
1630
1686
  switch (t.length % 4) {
1631
1687
  case 0: break;
@@ -1638,38 +1694,38 @@ function Fn(e) {
1638
1694
  default: throw Error("base64 string is not of the correct length");
1639
1695
  }
1640
1696
  try {
1641
- return Pn(t);
1697
+ return Bn(t);
1642
1698
  } catch {
1643
1699
  return atob(t);
1644
1700
  }
1645
1701
  }
1646
- function In(e, t) {
1647
- if (typeof e != "string") throw new Nn("Invalid token specified: must be a string");
1702
+ function Hn(e, t) {
1703
+ if (typeof e != "string") throw new zn("Invalid token specified: must be a string");
1648
1704
  t ||= {};
1649
1705
  let n = t.header === !0 ? 0 : 1, r = e.split(".")[n];
1650
- if (typeof r != "string") throw new Nn(`Invalid token specified: missing part #${n + 1}`);
1706
+ if (typeof r != "string") throw new zn(`Invalid token specified: missing part #${n + 1}`);
1651
1707
  let i;
1652
1708
  try {
1653
- i = Fn(r);
1709
+ i = Vn(r);
1654
1710
  } catch (e) {
1655
- throw new Nn(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
1711
+ throw new zn(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
1656
1712
  }
1657
1713
  try {
1658
1714
  return JSON.parse(i);
1659
1715
  } catch (e) {
1660
- throw new Nn(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
1716
+ throw new zn(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
1661
1717
  }
1662
1718
  }
1663
1719
  //#endregion
1664
1720
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/authentication_manager.js
1665
- var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
1721
+ var Un = Object.defineProperty, Wn = (e, t, n) => t in e ? Un(e, t, {
1666
1722
  enumerable: !0,
1667
1723
  configurable: !0,
1668
1724
  writable: !0,
1669
1725
  value: n
1670
- }) : e[t] = n, q = (e, t, n) => Rn(e, typeof t == "symbol" ? t : t + "", n), zn = 480 * 60 * 60 * 1e3, Bn = 2, Vn = class {
1726
+ }) : e[t] = n, J = (e, t, n) => Wn(e, typeof t == "symbol" ? t : t + "", n), Gn = 480 * 60 * 60 * 1e3, Kn = 2, qn = class {
1671
1727
  constructor(e, t, n) {
1672
- q(this, "authState", { state: "noAuth" }), q(this, "configVersion", 0), q(this, "syncState"), q(this, "authenticate"), q(this, "stopSocket"), q(this, "tryRestartSocket"), q(this, "pauseSocket"), q(this, "resumeSocket"), q(this, "clearAuth"), q(this, "logger"), q(this, "refreshTokenLeewaySeconds"), q(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
1728
+ J(this, "authState", { state: "noAuth" }), J(this, "configVersion", 0), J(this, "syncState"), J(this, "authenticate"), J(this, "stopSocket"), J(this, "tryRestartSocket"), J(this, "pauseSocket"), J(this, "resumeSocket"), J(this, "clearAuth"), J(this, "logger"), J(this, "refreshTokenLeewaySeconds"), J(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
1673
1729
  }
1674
1730
  async setConfig(e, t) {
1675
1731
  this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
@@ -1711,11 +1767,11 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
1711
1767
  this.tryToReauthenticate(e);
1712
1768
  }
1713
1769
  async tryToReauthenticate(e) {
1714
- if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= Bn) {
1770
+ if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= Kn) {
1715
1771
  this.logger.error(`Failed to authenticate: "${e.error}", check your server auth config`), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
1716
1772
  return;
1717
1773
  }
1718
- this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${Bn - this.tokenConfirmationAttempts} attempts remaining`)), await this.stopSocket();
1774
+ this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${Kn - this.tokenConfirmationAttempts} attempts remaining`)), await this.stopSocket();
1719
1775
  let t = await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken, { forceRefreshToken: !0 });
1720
1776
  t.isFromOutdatedConfig || (t.value && this.syncState.isNewAuth(t.value) ? (this.authenticate(t.value), this.setAuthState({
1721
1777
  state: "waitingForServerConfirmationOfFreshToken",
@@ -1755,7 +1811,7 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
1755
1811
  this.logger.error("Auth token does not live long enough, cannot refetch the token");
1756
1812
  return;
1757
1813
  }
1758
- let a = Math.min(zn, (i - this.refreshTokenLeewaySeconds) * 1e3);
1814
+ let a = Math.min(Gn, (i - this.refreshTokenLeewaySeconds) * 1e3);
1759
1815
  a <= 0 && (this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${i}s`), a = 0);
1760
1816
  let o = setTimeout(() => {
1761
1817
  this._logVerbose("running scheduled token refetch"), this.refetchToken();
@@ -1805,7 +1861,7 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
1805
1861
  }
1806
1862
  decodeToken(e) {
1807
1863
  try {
1808
- return In(e);
1864
+ return Hn(e);
1809
1865
  } catch (e) {
1810
1866
  return this._logVerbose(`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`), null;
1811
1867
  }
@@ -1813,41 +1869,41 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
1813
1869
  _logVerbose(e) {
1814
1870
  this.logger.logVerbose(`${e} [v${this.configVersion}]`);
1815
1871
  }
1816
- }, Hn = [
1872
+ }, Jn = [
1817
1873
  "convexClientConstructed",
1818
1874
  "convexWebSocketOpen",
1819
1875
  "convexFirstMessageReceived"
1820
1876
  ];
1821
- function Un(e, t) {
1877
+ function Yn(e, t) {
1822
1878
  let n = { sessionId: t };
1823
1879
  typeof performance > "u" || !performance.mark || performance.mark(e, { detail: n });
1824
1880
  }
1825
- function Wn(e) {
1881
+ function Xn(e) {
1826
1882
  let t = e.name.slice(6);
1827
1883
  return t = t.charAt(0).toLowerCase() + t.slice(1), {
1828
1884
  name: t,
1829
1885
  startTime: e.startTime
1830
1886
  };
1831
1887
  }
1832
- function Gn(e) {
1888
+ function Zn(e) {
1833
1889
  if (typeof performance > "u" || !performance.getEntriesByName) return [];
1834
1890
  let t = [];
1835
- for (let n of Hn) {
1891
+ for (let n of Jn) {
1836
1892
  let r = performance.getEntriesByName(n).filter((e) => e.entryType === "mark").filter((t) => t.detail.sessionId === e);
1837
1893
  t.push(...r);
1838
1894
  }
1839
- return t.map(Wn);
1895
+ return t.map(Xn);
1840
1896
  }
1841
1897
  //#endregion
1842
1898
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/client.js
1843
- var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1899
+ var Qn = Object.defineProperty, $n = (e, t, n) => t in e ? Qn(e, t, {
1844
1900
  enumerable: !0,
1845
1901
  configurable: !0,
1846
1902
  writable: !0,
1847
1903
  value: n
1848
- }) : e[t] = n, J = (e, t, n) => qn(e, typeof t == "symbol" ? t : t + "", n), Jn = class {
1904
+ }) : e[t] = n, Y = (e, t, n) => $n(e, typeof t == "symbol" ? t : t + "", n), er = class {
1849
1905
  constructor(e, t, n) {
1850
- if (J(this, "address"), J(this, "state"), J(this, "requestManager"), J(this, "webSocketManager"), J(this, "authenticationManager"), J(this, "remoteQuerySet"), J(this, "optimisticQueryResults"), J(this, "_transitionHandlerCounter", 0), J(this, "_nextRequestId"), J(this, "_onTransitionFns", /* @__PURE__ */ new Map()), J(this, "_sessionId"), J(this, "firstMessageReceived", !1), J(this, "debug"), J(this, "logger"), J(this, "maxObservedTimestamp"), J(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), J(this, "nextConnectionStateSubscriberId", 0), J(this, "_lastPublishedConnectionState"), J(this, "markConnectionStateDirty", () => {
1906
+ if (Y(this, "address"), Y(this, "state"), Y(this, "requestManager"), Y(this, "webSocketManager"), Y(this, "authenticationManager"), Y(this, "remoteQuerySet"), Y(this, "optimisticQueryResults"), Y(this, "_transitionHandlerCounter", 0), Y(this, "_nextRequestId"), Y(this, "_onTransitionFns", /* @__PURE__ */ new Map()), Y(this, "_sessionId"), Y(this, "firstMessageReceived", !1), Y(this, "debug"), Y(this, "logger"), Y(this, "maxObservedTimestamp"), Y(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), Y(this, "nextConnectionStateSubscriberId", 0), Y(this, "_lastPublishedConnectionState"), Y(this, "markConnectionStateDirty", () => {
1851
1907
  Promise.resolve().then(() => {
1852
1908
  let e = this.connectionState();
1853
1909
  if (JSON.stringify(e) !== JSON.stringify(this._lastPublishedConnectionState)) {
@@ -1855,25 +1911,25 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1855
1911
  for (let t of this.connectionStateSubscribers.values()) t(e);
1856
1912
  }
1857
1913
  });
1858
- }), J(this, "mark", (e) => {
1859
- this.debug && Un(e, this.sessionId);
1914
+ }), Y(this, "mark", (e) => {
1915
+ this.debug && Yn(e, this.sessionId);
1860
1916
  }), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
1861
- n?.skipConvexDeploymentUrlCheck !== !0 && Ue(e), n = { ...n };
1917
+ n?.skipConvexDeploymentUrlCheck !== !0 && Ye(e), n = { ...n };
1862
1918
  let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
1863
1919
  if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
1864
- i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? Dt({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : Et({ verbose: n.verbose ?? !1 });
1920
+ i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? Nt({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : Mt({ verbose: n.verbose ?? !1 });
1865
1921
  let a = e.search("://");
1866
1922
  if (a === -1) throw Error("Provided address was not an absolute URL.");
1867
1923
  let o = e.substring(a + 3), s = e.substring(0, a), c;
1868
1924
  if (s === "http") c = "ws";
1869
1925
  else if (s === "https") c = "wss";
1870
1926
  else throw Error(`Unknown parent protocol ${s}`);
1871
- let l = `${c}://${o}/api/${Me}/sync`;
1872
- this.state = new Rt(), this.remoteQuerySet = new mn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Ht(this.logger, this.markConnectionStateDirty);
1927
+ let l = `${c}://${o}/api/${Re}/sync`;
1928
+ this.state = new Wt(), this.remoteQuerySet = new bn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Jt(this.logger, this.markConnectionStateDirty);
1873
1929
  let u = () => {
1874
1930
  this.webSocketManager.pause(), this.state.pause();
1875
1931
  };
1876
- this.authenticationManager = new Vn(this.state, {
1932
+ this.authenticationManager = new qn(this.state, {
1877
1933
  authenticate: (e) => {
1878
1934
  let t = this.state.setAuth(e);
1879
1935
  return this.webSocketManager.sendMessage(t), t.baseVersion;
@@ -1888,9 +1944,9 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1888
1944
  }, {
1889
1945
  logger: this.logger,
1890
1946
  refreshTokenLeewaySeconds: r
1891
- }), this.optimisticQueryResults = new en(), this.addOnTransitionHandler((e) => {
1947
+ }), this.optimisticQueryResults = new sn(), this.addOnTransitionHandler((e) => {
1892
1948
  t(e.queries.map((e) => e.token));
1893
- }), this._nextRequestId = 0, this._sessionId = jn();
1949
+ }), this._nextRequestId = 0, this._sessionId = Ln();
1894
1950
  let { unsavedChangesWarning: d } = n;
1895
1951
  if (typeof window > "u" || window.addEventListener === void 0) {
1896
1952
  if (d === !0) throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.");
@@ -1901,14 +1957,14 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1901
1957
  return (e || window.event).returnValue = t, t;
1902
1958
  }
1903
1959
  });
1904
- this.webSocketManager = new An(l, {
1960
+ this.webSocketManager = new In(l, {
1905
1961
  onOpen: (e) => {
1906
1962
  this.mark("convexWebSocketOpen"), this.webSocketManager.sendMessage({
1907
1963
  ...e,
1908
1964
  type: "Connect",
1909
1965
  sessionId: this._sessionId,
1910
1966
  maxObservedTimestamp: this.maxObservedTimestamp
1911
- }), this.remoteQuerySet = new mn((e) => this.state.queryPath(e), this.logger);
1967
+ }), this.remoteQuerySet = new bn((e) => this.state.queryPath(e), this.logger);
1912
1968
  let [t, n] = this.state.restart();
1913
1969
  n && this.webSocketManager.sendMessage(n), this.webSocketManager.sendMessage(t);
1914
1970
  for (let e of this.requestManager.restart()) this.webSocketManager.sendMessage(e);
@@ -1939,7 +1995,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1939
1995
  this.authenticationManager.onAuthError(e);
1940
1996
  break;
1941
1997
  case "FatalError": {
1942
- let t = kt(this.logger, e.error);
1998
+ let t = Ft(this.logger, e.error);
1943
1999
  throw this.webSocketManager.terminate(), t;
1944
2000
  }
1945
2001
  default:
@@ -1997,7 +2053,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
1997
2053
  getCurrentAuthClaims() {
1998
2054
  let e = this.state.getAuth(), t = {};
1999
2055
  if (e && e.tokenType === "User") try {
2000
- t = e ? In(e.value) : {};
2056
+ t = e ? Hn(e.value) : {};
2001
2057
  } catch {
2002
2058
  t = {};
2003
2059
  }
@@ -2022,7 +2078,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2022
2078
  this.webSocketManager.sendMessage(e);
2023
2079
  }
2024
2080
  subscribe(e, t, n) {
2025
- let r = U(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
2081
+ let r = W(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
2026
2082
  return i !== null && this.webSocketManager.sendMessage(i), {
2027
2083
  queryToken: a,
2028
2084
  unsubscribe: () => {
@@ -2032,7 +2088,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2032
2088
  };
2033
2089
  }
2034
2090
  localQueryResult(e, t) {
2035
- let n = Nt(e, U(t));
2091
+ let n = zt(e, W(t));
2036
2092
  return this.optimisticQueryResults.queryResult(n);
2037
2093
  }
2038
2094
  localQueryResultByToken(e) {
@@ -2042,11 +2098,11 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2042
2098
  return this.optimisticQueryResults.hasQueryResult(e);
2043
2099
  }
2044
2100
  localQueryLogs(e, t) {
2045
- let n = Nt(e, U(t));
2101
+ let n = zt(e, W(t));
2046
2102
  return this.optimisticQueryResults.queryLogs(n);
2047
2103
  }
2048
2104
  queryJournal(e, t) {
2049
- let n = Nt(e, U(t));
2105
+ let n = zt(e, W(t));
2050
2106
  return this.state.queryJournal(n);
2051
2107
  }
2052
2108
  connectionState() {
@@ -2070,7 +2126,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2070
2126
  }
2071
2127
  async mutation(e, t, n) {
2072
2128
  let r = await this.mutationInternal(e, t, n);
2073
- if (!r.success) throw r.errorData === void 0 ? Error(At("mutation", e, r)) : jt(r, new yt(At("mutation", e, r)));
2129
+ if (!r.success) throw r.errorData === void 0 ? Error(It("mutation", e, r)) : Lt(r, new Tt(It("mutation", e, r)));
2074
2130
  return r.value;
2075
2131
  }
2076
2132
  async mutationInternal(e, t, n, r) {
@@ -2078,7 +2134,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2078
2134
  return i;
2079
2135
  }
2080
2136
  enqueueMutation(e, t, n, r) {
2081
- let i = U(t);
2137
+ let i = W(t);
2082
2138
  this.tryReportLongDisconnect();
2083
2139
  let a = this.nextRequestId;
2084
2140
  if (this._nextRequestId++, n !== void 0) {
@@ -2112,7 +2168,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2112
2168
  requestId: a,
2113
2169
  udfPath: e,
2114
2170
  componentPath: r,
2115
- args: [ft(i)]
2171
+ args: [vt(i)]
2116
2172
  }, s = this.webSocketManager.sendMessage(o);
2117
2173
  return {
2118
2174
  requestId: a,
@@ -2121,18 +2177,18 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2121
2177
  }
2122
2178
  async action(e, t) {
2123
2179
  let n = await this.actionInternal(e, t);
2124
- if (!n.success) throw n.errorData === void 0 ? Error(At("action", e, n)) : jt(n, new yt(At("action", e, n)));
2180
+ if (!n.success) throw n.errorData === void 0 ? Error(It("action", e, n)) : Lt(n, new Tt(It("action", e, n)));
2125
2181
  return n.value;
2126
2182
  }
2127
2183
  async actionInternal(e, t, n) {
2128
- let r = U(t), i = this.nextRequestId;
2184
+ let r = W(t), i = this.nextRequestId;
2129
2185
  this._nextRequestId++, this.tryReportLongDisconnect();
2130
2186
  let a = {
2131
2187
  type: "Action",
2132
2188
  requestId: i,
2133
2189
  udfPath: e,
2134
2190
  componentPath: n,
2135
- args: [ft(r)]
2191
+ args: [vt(r)]
2136
2192
  }, o = this.webSocketManager.sendMessage(a);
2137
2193
  return this.requestManager.request(a, o);
2138
2194
  }
@@ -2150,7 +2206,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2150
2206
  }
2151
2207
  reportMarks() {
2152
2208
  if (this.debug) {
2153
- let e = Gn(this.sessionId);
2209
+ let e = Zn(this.sessionId);
2154
2210
  this.webSocketManager.sendMessage({
2155
2211
  type: "Event",
2156
2212
  eventType: "ClientConnect",
@@ -2167,7 +2223,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2167
2223
  method: "POST",
2168
2224
  headers: {
2169
2225
  "Content-Type": "application/json",
2170
- "Convex-Client": `npm-${Me}`
2226
+ "Convex-Client": `npm-${Re}`
2171
2227
  },
2172
2228
  body: JSON.stringify({ event: "LongWebsocketDisconnect" })
2173
2229
  }).then((e) => {
@@ -2179,23 +2235,23 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
2179
2235
  };
2180
2236
  //#endregion
2181
2237
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/pagination.js
2182
- function Yn(e) {
2238
+ function tr(e) {
2183
2239
  if (typeof e != "object" || !e || !Array.isArray(e.page) || typeof e.isDone != "boolean" || typeof e.continueCursor != "string") throw Error(`Not a valid paginated query result: ${e?.toString()}`);
2184
2240
  return e;
2185
2241
  }
2186
2242
  //#endregion
2187
2243
  //#region ../../node_modules/.pnpm/convex@1.38.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/paginated_query_client.js
2188
- var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2244
+ var nr = Object.defineProperty, rr = (e, t, n) => t in e ? nr(e, t, {
2189
2245
  enumerable: !0,
2190
2246
  configurable: !0,
2191
2247
  writable: !0,
2192
2248
  value: n
2193
- }) : e[t] = n, Qn = (e, t, n) => Zn(e, typeof t == "symbol" ? t : t + "", n), $n = class {
2249
+ }) : e[t] = n, ir = (e, t, n) => rr(e, typeof t == "symbol" ? t : t + "", n), ar = class {
2194
2250
  constructor(e, t) {
2195
- this.client = e, this.onTransition = t, Qn(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Qn(this, "lastTransitionTs"), this.lastTransitionTs = an.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
2251
+ this.client = e, this.onTransition = t, ir(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), ir(this, "lastTransitionTs"), this.lastTransitionTs = dn.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
2196
2252
  }
2197
2253
  subscribe(e, t, n) {
2198
- let r = Mt(e), i = Pt(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
2254
+ let r = Rt(e), i = Bt(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
2199
2255
  return o ? (o.numSubscribers += 1, {
2200
2256
  paginatedQueryToken: i,
2201
2257
  unsubscribe: a
@@ -2217,7 +2273,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2217
2273
  });
2218
2274
  }
2219
2275
  localQueryResult(e, t, n) {
2220
- let r = Pt(Mt(e), t, n);
2276
+ let r = Bt(Rt(e), t, n);
2221
2277
  return this.localQueryResultByToken(r);
2222
2278
  }
2223
2279
  localQueryResultByToken(e) {
@@ -2236,7 +2292,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2236
2292
  i = !0, a = !1;
2237
2293
  continue;
2238
2294
  }
2239
- let n = Yn(t);
2295
+ let n = tr(t);
2240
2296
  r = r.concat(n.page), a = !!n.isDone;
2241
2297
  }
2242
2298
  let o;
@@ -2265,7 +2321,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2265
2321
  this.mustGetPaginatedQuery(e);
2266
2322
  let n = this.queryTokenForLastPageOfPaginatedQuery(e), r = this.client.localQueryResultByToken(n);
2267
2323
  if (!r) return !1;
2268
- let i = Yn(r);
2324
+ let i = tr(r);
2269
2325
  if (i.isDone) return !1;
2270
2326
  this.addPageToPaginatedQuery(e, i.continueCursor, t);
2271
2327
  let a = {
@@ -2299,7 +2355,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2299
2355
  if (r.has(n)) continue;
2300
2356
  let a = i.get(n).queryToken, o = t(a);
2301
2357
  if (!o) continue;
2302
- let s = Yn(o);
2358
+ let s = tr(o);
2303
2359
  s.splitCursor && (s.pageStatus === "SplitRecommended" || s.pageStatus === "SplitRequired" || s.page.length > e.options.initialNumItems * 2) && this.splitPaginatedQueryPage(e, n, s.splitCursor, s.continueCursor);
2304
2360
  }
2305
2361
  }
@@ -2368,16 +2424,16 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2368
2424
  if (!t) throw Error("paginated query no longer exists for token " + e);
2369
2425
  return t;
2370
2426
  }
2371
- }, er = Object.defineProperty, tr = (e, t, n) => t in e ? er(e, t, {
2427
+ }, or = Object.defineProperty, sr = (e, t, n) => t in e ? or(e, t, {
2372
2428
  enumerable: !0,
2373
2429
  configurable: !0,
2374
2430
  writable: !0,
2375
2431
  value: n
2376
- }) : e[t] = n, nr = (e, t, n) => tr(e, typeof t == "symbol" ? t : t + "", n), rr, ir = class {
2432
+ }) : e[t] = n, cr = (e, t, n) => sr(e, typeof t == "symbol" ? t : t + "", n), lr, ur = class {
2377
2433
  constructor(e, t = {}) {
2378
- nr(this, "listeners"), nr(this, "_client"), nr(this, "_paginatedClient"), nr(this, "callNewListenersWithCurrentValuesTimer"), nr(this, "_closed"), nr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && Ue(e);
2434
+ cr(this, "listeners"), cr(this, "_client"), cr(this, "_paginatedClient"), cr(this, "callNewListenersWithCurrentValuesTimer"), cr(this, "_closed"), cr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && Ye(e);
2379
2435
  let { disabled: n, ...r } = t;
2380
- this._closed = !1, this._disabled = !!n, rr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = rr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new Jn(e, () => {}, r), this._paginatedClient = new $n(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
2436
+ this._closed = !1, this._disabled = !!n, lr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = lr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new er(e, () => {}, r), this._paginatedClient = new ar(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
2381
2437
  }
2382
2438
  get closed() {
2383
2439
  return this._closed;
@@ -2395,7 +2451,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2395
2451
  }
2396
2452
  onUpdate(e, t, n, r) {
2397
2453
  if (this.disabled) return this.createDisabledUnsubscribe();
2398
- let { queryToken: i, unsubscribe: a } = this.client.subscribe(G(e), t), o = {
2454
+ let { queryToken: i, unsubscribe: a } = this.client.subscribe(K(e), t), o = {
2399
2455
  queryToken: i,
2400
2456
  callback: n,
2401
2457
  onError: r,
@@ -2420,7 +2476,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2420
2476
  let a = {
2421
2477
  initialNumItems: n.initialNumItems,
2422
2478
  id: -1
2423
- }, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(G(e), t, a), c = {
2479
+ }, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(K(e), t, a), c = {
2424
2480
  queryToken: o,
2425
2481
  callback: r,
2426
2482
  onError: i,
@@ -2435,7 +2491,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2435
2491
  unsubscribe: () => {
2436
2492
  this.closed || (this.listeners.delete(c), s());
2437
2493
  },
2438
- getCurrentValue: () => this.paginatedClient.localQueryResult(G(e), t, a),
2494
+ getCurrentValue: () => this.paginatedClient.localQueryResult(K(e), t, a),
2439
2495
  getQueryLogs: () => []
2440
2496
  }, u = l.unsubscribe;
2441
2497
  return Object.assign(u, l), u;
@@ -2473,7 +2529,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2473
2529
  _transition({ queries: e, paginatedQueries: t }, n = !1) {
2474
2530
  let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
2475
2531
  for (let e of this.listeners) {
2476
- let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = Ft(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
2532
+ let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = Vt(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
2477
2533
  if (r.includes(i) || n && !o && c) {
2478
2534
  e.hasEverRun = !0;
2479
2535
  let n;
@@ -2490,15 +2546,15 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2490
2546
  }
2491
2547
  async mutation(e, t, n) {
2492
2548
  if (this.disabled) throw Error("ConvexClient is disabled");
2493
- return await this.client.mutation(G(e), t, n);
2549
+ return await this.client.mutation(K(e), t, n);
2494
2550
  }
2495
2551
  async action(e, t) {
2496
2552
  if (this.disabled) throw Error("ConvexClient is disabled");
2497
- return await this.client.action(G(e), t);
2553
+ return await this.client.action(K(e), t);
2498
2554
  }
2499
2555
  async query(e, t) {
2500
2556
  if (this.disabled) throw Error("ConvexClient is disabled");
2501
- let n = this.client.localQueryResult(G(e), t);
2557
+ let n = this.client.localQueryResult(K(e), t);
2502
2558
  return n === void 0 ? new Promise((n, r) => {
2503
2559
  let { unsubscribe: i } = this.onUpdate(e, t, (e) => {
2504
2560
  i(), n(e);
@@ -2517,14 +2573,14 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
2517
2573
  };
2518
2574
  //#endregion
2519
2575
  //#region src/lib/machine.ts
2520
- function ar(e) {
2576
+ function dr(e) {
2521
2577
  return e;
2522
2578
  }
2523
- function or(e, t) {
2524
- let n = z(e);
2579
+ function fr(e, t) {
2580
+ let n = B(e);
2525
2581
  n.current = e;
2526
- let [r, i] = L(() => typeof t == "function" ? t() : t);
2527
- return [r, B((e) => {
2582
+ let [r, i] = R(() => typeof t == "function" ? t() : t);
2583
+ return [r, V((e) => {
2528
2584
  i((t) => {
2529
2585
  let r = n.current[t.kind]?.[e.type];
2530
2586
  return r ? r(t, e) : t;
@@ -2533,7 +2589,7 @@ function or(e, t) {
2533
2589
  }
2534
2590
  //#endregion
2535
2591
  //#region src/lib/use-async-action.ts
2536
- var sr = ar({
2592
+ var pr = dr({
2537
2593
  idle: { start: () => ({ kind: "pending" }) },
2538
2594
  pending: {
2539
2595
  success: (e, t) => ({
@@ -2554,10 +2610,10 @@ var sr = ar({
2554
2610
  reset: () => ({ kind: "idle" })
2555
2611
  }
2556
2612
  });
2557
- function cr() {
2558
- let [e, t] = or(sr, { kind: "idle" }), n = e, r = z(n);
2613
+ function mr() {
2614
+ let [e, t] = fr(pr, { kind: "idle" }), n = e, r = B(n);
2559
2615
  r.current = n;
2560
- let i = B(async (e, n) => {
2616
+ let i = V(async (e, n) => {
2561
2617
  if (r.current.kind !== "pending") {
2562
2618
  t({ type: "start" });
2563
2619
  try {
@@ -2575,7 +2631,7 @@ function cr() {
2575
2631
  return;
2576
2632
  }
2577
2633
  }
2578
- }, [t]), a = B(() => t({ type: "reset" }), [t]);
2634
+ }, [t]), a = V(() => t({ type: "reset" }), [t]);
2579
2635
  return {
2580
2636
  state: n,
2581
2637
  isIdle: n.kind === "idle",
@@ -2590,37 +2646,37 @@ function cr() {
2590
2646
  }
2591
2647
  //#endregion
2592
2648
  //#region ../../node_modules/.pnpm/@medv+finder@4.0.2/node_modules/@medv/finder/finder.js
2593
- var lr = new Set([
2649
+ var hr = new Set([
2594
2650
  "role",
2595
2651
  "name",
2596
2652
  "aria-label",
2597
2653
  "rel",
2598
2654
  "href"
2599
2655
  ]);
2600
- function ur(e, t) {
2601
- let n = lr.has(e);
2602
- n ||= e.startsWith("data-") && gr(e);
2603
- let r = gr(t) && t.length < 100;
2604
- return r ||= t.startsWith("#") && gr(t.slice(1)), n && r;
2656
+ function gr(e, t) {
2657
+ let n = hr.has(e);
2658
+ n ||= e.startsWith("data-") && Sr(e);
2659
+ let r = Sr(t) && t.length < 100;
2660
+ return r ||= t.startsWith("#") && Sr(t.slice(1)), n && r;
2605
2661
  }
2606
- function dr(e) {
2607
- return gr(e);
2662
+ function _r(e) {
2663
+ return Sr(e);
2608
2664
  }
2609
- function fr(e) {
2610
- return gr(e);
2665
+ function vr(e) {
2666
+ return Sr(e);
2611
2667
  }
2612
- function pr(e) {
2668
+ function yr(e) {
2613
2669
  return !0;
2614
2670
  }
2615
- function mr(e, t) {
2671
+ function br(e, t) {
2616
2672
  if (e.nodeType !== Node.ELEMENT_NODE) throw Error("Can't generate CSS selector for non-element node type.");
2617
2673
  if (e.tagName.toLowerCase() === "html") return "html";
2618
2674
  let n = {
2619
2675
  root: document.body,
2620
- idName: dr,
2621
- className: fr,
2622
- tagName: pr,
2623
- attr: ur,
2676
+ idName: _r,
2677
+ className: vr,
2678
+ tagName: yr,
2679
+ attr: gr,
2624
2680
  timeoutMs: 1e3,
2625
2681
  seedMinLength: 3,
2626
2682
  optimizedMinLength: 2,
@@ -2628,37 +2684,37 @@ function mr(e, t) {
2628
2684
  }, r = /* @__PURE__ */ new Date(), i = {
2629
2685
  ...n,
2630
2686
  ...t
2631
- }, a = Er(i.root, n), o, s = 0;
2632
- for (let t of hr(e, i, a)) {
2687
+ }, a = Mr(i.root, n), o, s = 0;
2688
+ for (let t of xr(e, i, a)) {
2633
2689
  if ((/* @__PURE__ */ new Date()).getTime() - r.getTime() > i.timeoutMs || s >= i.maxNumberOfPathChecks) {
2634
- let t = Sr(e, a);
2690
+ let t = Or(e, a);
2635
2691
  if (!t) throw Error(`Timeout: Can't find a unique selector after ${i.timeoutMs}ms`);
2636
- return vr(t);
2692
+ return wr(t);
2637
2693
  }
2638
- if (s++, Dr(t, a)) {
2694
+ if (s++, Nr(t, a)) {
2639
2695
  o = t;
2640
2696
  break;
2641
2697
  }
2642
2698
  }
2643
2699
  if (!o) throw Error("Selector was not found.");
2644
- let c = [...Or(o, e, i, a, r)];
2645
- return c.sort(br), c.length > 0 ? vr(c[0]) : vr(o);
2700
+ let c = [...Pr(o, e, i, a, r)];
2701
+ return c.sort(Er), c.length > 0 ? wr(c[0]) : wr(o);
2646
2702
  }
2647
- function* hr(e, t, n) {
2703
+ function* xr(e, t, n) {
2648
2704
  let r = [], i = [], a = e, o = 0;
2649
2705
  for (; a && a !== n;) {
2650
- let e = _r(a, t);
2706
+ let e = Cr(a, t);
2651
2707
  for (let t of e) t.level = o;
2652
- if (r.push(e), a = a.parentElement, o++, i.push(...Tr(r)), o >= t.seedMinLength) {
2653
- i.sort(br);
2708
+ if (r.push(e), a = a.parentElement, o++, i.push(...jr(r)), o >= t.seedMinLength) {
2709
+ i.sort(Er);
2654
2710
  for (let e of i) yield e;
2655
2711
  i = [];
2656
2712
  }
2657
2713
  }
2658
- i.sort(br);
2714
+ i.sort(Er);
2659
2715
  for (let e of i) yield e;
2660
2716
  }
2661
- function gr(e) {
2717
+ function Sr(e) {
2662
2718
  if (/^[a-z\-]{3,}$/i.test(e)) {
2663
2719
  let t = e.split(/-|[A-Z]/);
2664
2720
  for (let e of t) if (e.length <= 2 || /[^aeiou]{4,}/i.test(e)) return !1;
@@ -2666,7 +2722,7 @@ function gr(e) {
2666
2722
  }
2667
2723
  return !1;
2668
2724
  }
2669
- function _r(e, t) {
2725
+ function Cr(e, t) {
2670
2726
  let n = [], r = e.getAttribute("id");
2671
2727
  r && t.idName(r) && n.push({
2672
2728
  name: "#" + CSS.escape(r),
@@ -2692,19 +2748,19 @@ function _r(e, t) {
2692
2748
  name: i,
2693
2749
  penalty: 5
2694
2750
  });
2695
- let t = xr(e, i);
2751
+ let t = Dr(e, i);
2696
2752
  t !== void 0 && n.push({
2697
- name: wr(i, t),
2753
+ name: Ar(i, t),
2698
2754
  penalty: 10
2699
2755
  });
2700
2756
  }
2701
- let a = xr(e);
2757
+ let a = Dr(e);
2702
2758
  return a !== void 0 && n.push({
2703
- name: Cr(i, a),
2759
+ name: kr(i, a),
2704
2760
  penalty: 50
2705
2761
  }), n;
2706
2762
  }
2707
- function vr(e) {
2763
+ function wr(e) {
2708
2764
  let t = e[0], n = t.name;
2709
2765
  for (let r = 1; r < e.length; r++) {
2710
2766
  let i = e[r].level || 0;
@@ -2712,13 +2768,13 @@ function vr(e) {
2712
2768
  }
2713
2769
  return n;
2714
2770
  }
2715
- function yr(e) {
2771
+ function Tr(e) {
2716
2772
  return e.map((e) => e.penalty).reduce((e, t) => e + t, 0);
2717
2773
  }
2718
- function br(e, t) {
2719
- return yr(e) - yr(t);
2774
+ function Er(e, t) {
2775
+ return Tr(e) - Tr(t);
2720
2776
  }
2721
- function xr(e, t) {
2777
+ function Dr(e, t) {
2722
2778
  let n = e.parentNode;
2723
2779
  if (!n) return;
2724
2780
  let r = n.firstChild;
@@ -2727,51 +2783,51 @@ function xr(e, t) {
2727
2783
  for (; r && (r.nodeType === Node.ELEMENT_NODE && (t === void 0 || r.tagName.toLowerCase() === t) && i++, r !== e);) r = r.nextSibling;
2728
2784
  return i;
2729
2785
  }
2730
- function Sr(e, t) {
2786
+ function Or(e, t) {
2731
2787
  let n = 0, r = e, i = [];
2732
2788
  for (; r && r !== t;) {
2733
- let e = r.tagName.toLowerCase(), t = xr(r, e);
2789
+ let e = r.tagName.toLowerCase(), t = Dr(r, e);
2734
2790
  if (t === void 0) return;
2735
2791
  i.push({
2736
- name: wr(e, t),
2792
+ name: Ar(e, t),
2737
2793
  penalty: NaN,
2738
2794
  level: n
2739
2795
  }), r = r.parentElement, n++;
2740
2796
  }
2741
- if (Dr(i, t)) return i;
2797
+ if (Nr(i, t)) return i;
2742
2798
  }
2743
- function Cr(e, t) {
2799
+ function kr(e, t) {
2744
2800
  return e === "html" ? "html" : `${e}:nth-child(${t})`;
2745
2801
  }
2746
- function wr(e, t) {
2802
+ function Ar(e, t) {
2747
2803
  return e === "html" ? "html" : `${e}:nth-of-type(${t})`;
2748
2804
  }
2749
- function* Tr(e, t = []) {
2750
- if (e.length > 0) for (let n of e[0]) yield* Tr(e.slice(1, e.length), t.concat(n));
2805
+ function* jr(e, t = []) {
2806
+ if (e.length > 0) for (let n of e[0]) yield* jr(e.slice(1, e.length), t.concat(n));
2751
2807
  else yield t;
2752
2808
  }
2753
- function Er(e, t) {
2809
+ function Mr(e, t) {
2754
2810
  return e.nodeType === Node.DOCUMENT_NODE ? e : e === t.root ? e.ownerDocument : e;
2755
2811
  }
2756
- function Dr(e, t) {
2757
- let n = vr(e);
2812
+ function Nr(e, t) {
2813
+ let n = wr(e);
2758
2814
  switch (t.querySelectorAll(n).length) {
2759
2815
  case 0: throw Error(`Can't select any node with this selector: ${n}`);
2760
2816
  case 1: return !0;
2761
2817
  default: return !1;
2762
2818
  }
2763
2819
  }
2764
- function* Or(e, t, n, r, i) {
2820
+ function* Pr(e, t, n, r, i) {
2765
2821
  if (e.length > 2 && e.length > n.optimizedMinLength) for (let a = 1; a < e.length - 1; a++) {
2766
2822
  if ((/* @__PURE__ */ new Date()).getTime() - i.getTime() > n.timeoutMs) return;
2767
2823
  let o = [...e];
2768
- o.splice(a, 1), Dr(o, r) && r.querySelector(vr(o)) === t && (yield o, yield* Or(o, t, n, r, i));
2824
+ o.splice(a, 1), Nr(o, r) && r.querySelector(wr(o)) === t && (yield o, yield* Pr(o, t, n, r, i));
2769
2825
  }
2770
2826
  }
2771
2827
  //#endregion
2772
2828
  //#region src/runtime/anchor.ts
2773
- function kr(e, t) {
2774
- let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? jr(s) : void 0, l, u;
2829
+ function Fr(e, t) {
2830
+ let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? Lr(s) : void 0, l, u;
2775
2831
  if (s) {
2776
2832
  let t = s.getBoundingClientRect();
2777
2833
  t.width > 0 && t.height > 0 && (l = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), u = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)));
@@ -2786,7 +2842,7 @@ function kr(e, t) {
2786
2842
  anchorOffsetY: u
2787
2843
  };
2788
2844
  }
2789
- function Ar(e) {
2845
+ function Ir(e) {
2790
2846
  if (e.anchorSelector) try {
2791
2847
  let t = document.querySelector(e.anchorSelector);
2792
2848
  if (t) {
@@ -2805,22 +2861,22 @@ function Ar(e) {
2805
2861
  resolved: !1
2806
2862
  };
2807
2863
  }
2808
- function jr(e) {
2864
+ function Lr(e) {
2809
2865
  try {
2810
- return mr(e, { timeoutMs: 1e3 });
2866
+ return br(e, { timeoutMs: 1e3 });
2811
2867
  } catch {
2812
2868
  return;
2813
2869
  }
2814
2870
  }
2815
2871
  //#endregion
2816
2872
  //#region src/runtime/api.ts
2817
- var Mr = class extends Error {
2873
+ var Rr = class extends Error {
2818
2874
  status;
2819
2875
  constructor(e, t) {
2820
2876
  super(e), this.name = "WidgetApiError", this.status = t;
2821
2877
  }
2822
2878
  };
2823
- function Nr(e) {
2879
+ function zr(e) {
2824
2880
  let t = e.apiUrl.replace(/\/+$/, "");
2825
2881
  async function n(n, r = {}) {
2826
2882
  let i = {
@@ -2836,8 +2892,8 @@ function Nr(e) {
2836
2892
  headers: i
2837
2893
  };
2838
2894
  c && (l.credentials = "include");
2839
- let u = await fetch(`${t}${n}`, l), d = await u.text(), f = d ? Pr(d) : null;
2840
- if (!u.ok) throw u.status === 401 && (o || c) && e.onUnauthorized?.(), new Mr((f && typeof f == "object" && "error" in f && typeof f.error == "string" ? f.error : null) ?? `Request failed with ${u.status}`, u.status);
2895
+ let u = await fetch(`${t}${n}`, l), d = await u.text(), f = d ? Br(d) : null;
2896
+ if (!u.ok) throw u.status === 401 && (o || c) && e.onUnauthorized?.(), new Rr((f && typeof f == "object" && "error" in f && typeof f.error == "string" ? f.error : null) ?? `Request failed with ${u.status}`, u.status);
2841
2897
  return f;
2842
2898
  }
2843
2899
  return {
@@ -2891,7 +2947,7 @@ function Nr(e) {
2891
2947
  }
2892
2948
  };
2893
2949
  }
2894
- function Pr(e) {
2950
+ function Br(e) {
2895
2951
  try {
2896
2952
  return JSON.parse(e);
2897
2953
  } catch {
@@ -2900,10 +2956,10 @@ function Pr(e) {
2900
2956
  }
2901
2957
  //#endregion
2902
2958
  //#region src/runtime/cookie-probe.ts
2903
- var Fr = "markup.cookieProbe";
2904
- async function Ir(e, t) {
2959
+ var Vr = "markup.cookieProbe";
2960
+ async function Hr(e, t) {
2905
2961
  try {
2906
- let e = sessionStorage.getItem(Fr);
2962
+ let e = sessionStorage.getItem(Vr);
2907
2963
  if (e === "supported") return !0;
2908
2964
  if (e === "unsupported") return !1;
2909
2965
  } catch {}
@@ -2922,7 +2978,7 @@ async function Ir(e, t) {
2922
2978
  if (!e.ok) return !1;
2923
2979
  let { supported: t } = await e.json(), i = t === !0;
2924
2980
  try {
2925
- sessionStorage.setItem(Fr, i ? "supported" : "unsupported");
2981
+ sessionStorage.setItem(Vr, i ? "supported" : "unsupported");
2926
2982
  } catch {}
2927
2983
  return i;
2928
2984
  } catch {
@@ -2931,48 +2987,48 @@ async function Ir(e, t) {
2931
2987
  }
2932
2988
  //#endregion
2933
2989
  //#region src/runtime/history-observer.ts
2934
- var Lr = "__markup_history_observer__", Rr = "__markup_history_listeners__";
2935
- function zr(e) {
2990
+ var Ur = "__markup_history_observer__", Wr = "__markup_history_listeners__";
2991
+ function Gr(e) {
2936
2992
  e.forEach((e) => e());
2937
2993
  }
2938
- function Br() {
2994
+ function Kr() {
2939
2995
  let e = history.pushState;
2940
- if (e[Lr]) return e[Rr];
2996
+ if (e[Ur]) return e[Wr];
2941
2997
  let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
2942
2998
  function i(...e) {
2943
- n.apply(this, e), zr(t);
2999
+ n.apply(this, e), Gr(t);
2944
3000
  }
2945
3001
  function a(...e) {
2946
- r.apply(this, e), zr(t);
3002
+ r.apply(this, e), Gr(t);
2947
3003
  }
2948
- return Object.defineProperty(i, Lr, { value: 1 }), Object.defineProperty(i, Rr, { value: t }), Object.defineProperty(a, Lr, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", () => zr(t)), t;
3004
+ return Object.defineProperty(i, Ur, { value: 1 }), Object.defineProperty(i, Wr, { value: t }), Object.defineProperty(a, Ur, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", () => Gr(t)), t;
2949
3005
  }
2950
- var Vr = null;
2951
- function Hr(e) {
2952
- return Vr ||= Br(), Vr.add(e), () => Vr.delete(e);
3006
+ var qr = null;
3007
+ function Jr(e) {
3008
+ return qr ||= Kr(), qr.add(e), () => qr.delete(e);
2953
3009
  }
2954
3010
  //#endregion
2955
3011
  //#region src/runtime/identity-store.ts
2956
- var Ur = "markup.identity";
2957
- function Wr() {
3012
+ var Yr = "markup.identity";
3013
+ function Xr() {
2958
3014
  try {
2959
- let e = localStorage.getItem(Ur);
3015
+ let e = localStorage.getItem(Yr);
2960
3016
  return e ? JSON.parse(e) : null;
2961
3017
  } catch {
2962
3018
  return null;
2963
3019
  }
2964
3020
  }
2965
- function Gr(e) {
3021
+ function Zr(e) {
2966
3022
  try {
2967
3023
  if (e == null) {
2968
- localStorage.removeItem(Ur);
3024
+ localStorage.removeItem(Yr);
2969
3025
  return;
2970
3026
  }
2971
- localStorage.setItem(Ur, JSON.stringify(e));
3027
+ localStorage.setItem(Yr, JSON.stringify(e));
2972
3028
  } catch {}
2973
3029
  }
2974
- function Kr() {
2975
- let e = Wr(), t = {
3030
+ function Qr() {
3031
+ let e = Xr(), t = {
2976
3032
  name: e?.name,
2977
3033
  email: e?.email
2978
3034
  };
@@ -3032,10 +3088,10 @@ function Kr() {
3032
3088
  preserved: t
3033
3089
  };
3034
3090
  }
3035
- function qr(e) {
3091
+ function $r(e) {
3036
3092
  switch (e.kind) {
3037
3093
  case "verified":
3038
- Gr({
3094
+ Zr({
3039
3095
  clientId: e.identity.clientId,
3040
3096
  storage: e.identity.storage,
3041
3097
  token: e.identity.storage === "cookies" ? void 0 : e.identity.token,
@@ -3048,7 +3104,7 @@ function qr(e) {
3048
3104
  });
3049
3105
  return;
3050
3106
  case "anon":
3051
- Gr({
3107
+ Zr({
3052
3108
  clientId: e.identity.clientId,
3053
3109
  anonToken: e.identity.anonToken,
3054
3110
  name: e.identity.name,
@@ -3056,23 +3112,23 @@ function qr(e) {
3056
3112
  });
3057
3113
  return;
3058
3114
  case "recovering":
3059
- Gr({
3115
+ Zr({
3060
3116
  name: e.preserved.name,
3061
3117
  email: e.preserved.email
3062
3118
  });
3063
3119
  return;
3064
3120
  case "unresolved":
3065
- Gr(null);
3121
+ Zr(null);
3066
3122
  return;
3067
3123
  }
3068
3124
  }
3069
- function Jr(e) {
3125
+ function ei(e) {
3070
3126
  if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
3071
3127
  }
3072
- function Yr(e) {
3128
+ function ti(e) {
3073
3129
  return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
3074
3130
  }
3075
- function Xr(e) {
3131
+ function ni(e) {
3076
3132
  if (e.kind === "anon") {
3077
3133
  let t = e.identity.name;
3078
3134
  return t ? {
@@ -3087,7 +3143,7 @@ function Xr(e) {
3087
3143
  }
3088
3144
  //#endregion
3089
3145
  //#region src/runtime/popup-auth.ts
3090
- async function Zr(e) {
3146
+ async function ri(e) {
3091
3147
  let { apiUrl: t, apiKey: n, useCookies: r } = e, i = new URL(t).origin, a;
3092
3148
  try {
3093
3149
  let e = await fetch(`${t.replace(/\/+$/, "")}/widget/popup-exchange`, {
@@ -3155,45 +3211,45 @@ async function Zr(e) {
3155
3211
  }
3156
3212
  //#endregion
3157
3213
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
3158
- function Qr(e, t) {
3214
+ function ii(e, t) {
3159
3215
  if (e.match(/^[a-z]+:\/\//i)) return e;
3160
3216
  if (e.match(/^\/\//)) return window.location.protocol + e;
3161
3217
  if (e.match(/^[a-z]+:/i)) return e;
3162
3218
  let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
3163
3219
  return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
3164
3220
  }
3165
- var $r = (() => {
3221
+ var ai = (() => {
3166
3222
  let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
3167
3223
  return () => (e += 1, `u${t()}${e}`);
3168
3224
  })();
3169
- function Y(e) {
3225
+ function oi(e) {
3170
3226
  let t = [];
3171
3227
  for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
3172
3228
  return t;
3173
3229
  }
3174
- var ei = null;
3175
- function ti(e = {}) {
3176
- return ei || (e.includeStyleProperties ? (ei = e.includeStyleProperties, ei) : (ei = Y(window.getComputedStyle(document.documentElement)), ei));
3230
+ var si = null;
3231
+ function ci(e = {}) {
3232
+ return si || (e.includeStyleProperties ? (si = e.includeStyleProperties, si) : (si = oi(window.getComputedStyle(document.documentElement)), si));
3177
3233
  }
3178
- function ni(e, t) {
3234
+ function li(e, t) {
3179
3235
  let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
3180
3236
  return n ? parseFloat(n.replace("px", "")) : 0;
3181
3237
  }
3182
- function ri(e) {
3183
- let t = ni(e, "border-left-width"), n = ni(e, "border-right-width");
3238
+ function ui(e) {
3239
+ let t = li(e, "border-left-width"), n = li(e, "border-right-width");
3184
3240
  return e.clientWidth + t + n;
3185
3241
  }
3186
- function ii(e) {
3187
- let t = ni(e, "border-top-width"), n = ni(e, "border-bottom-width");
3242
+ function di(e) {
3243
+ let t = li(e, "border-top-width"), n = li(e, "border-bottom-width");
3188
3244
  return e.clientHeight + t + n;
3189
3245
  }
3190
- function ai(e, t = {}) {
3246
+ function fi(e, t = {}) {
3191
3247
  return {
3192
- width: t.width || ri(e),
3193
- height: t.height || ii(e)
3248
+ width: t.width || ui(e),
3249
+ height: t.height || di(e)
3194
3250
  };
3195
3251
  }
3196
- function oi() {
3252
+ function pi() {
3197
3253
  let e, t;
3198
3254
  try {
3199
3255
  t = process;
@@ -3202,10 +3258,10 @@ function oi() {
3202
3258
  return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
3203
3259
  }
3204
3260
  var X = 16384;
3205
- function si(e) {
3261
+ function mi(e) {
3206
3262
  (e.width > X || e.height > X) && (e.width > X && e.height > X ? e.width > e.height ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X) : e.width > X ? (e.height *= X / e.width, e.width = X) : (e.width *= X / e.height, e.height = X));
3207
3263
  }
3208
- function ci(e) {
3264
+ function hi(e) {
3209
3265
  return new Promise((t, n) => {
3210
3266
  let r = new Image();
3211
3267
  r.onload = () => {
@@ -3215,12 +3271,12 @@ function ci(e) {
3215
3271
  }, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
3216
3272
  });
3217
3273
  }
3218
- async function li(e) {
3274
+ async function gi(e) {
3219
3275
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
3220
3276
  }
3221
- async function ui(e, t, n) {
3277
+ async function _i(e, t, n) {
3222
3278
  let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
3223
- return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), li(i);
3279
+ return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), gi(i);
3224
3280
  }
3225
3281
  var Z = (e, t) => {
3226
3282
  if (e instanceof t) return !0;
@@ -3229,66 +3285,66 @@ var Z = (e, t) => {
3229
3285
  };
3230
3286
  //#endregion
3231
3287
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
3232
- function di(e) {
3288
+ function vi(e) {
3233
3289
  let t = e.getPropertyValue("content");
3234
3290
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
3235
3291
  }
3236
- function fi(e, t) {
3237
- return ti(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3292
+ function yi(e, t) {
3293
+ return ci(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
3238
3294
  }
3239
- function pi(e, t, n, r) {
3240
- let i = `.${e}:${t}`, a = n.cssText ? di(n) : fi(n, r);
3295
+ function bi(e, t, n, r) {
3296
+ let i = `.${e}:${t}`, a = n.cssText ? vi(n) : yi(n, r);
3241
3297
  return document.createTextNode(`${i}{${a}}`);
3242
3298
  }
3243
- function mi(e, t, n, r) {
3299
+ function xi(e, t, n, r) {
3244
3300
  let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
3245
3301
  if (a === "" || a === "none") return;
3246
- let o = $r();
3302
+ let o = ai();
3247
3303
  try {
3248
3304
  t.className = `${t.className} ${o}`;
3249
3305
  } catch {
3250
3306
  return;
3251
3307
  }
3252
3308
  let s = document.createElement("style");
3253
- s.appendChild(pi(o, n, i, r)), t.appendChild(s);
3309
+ s.appendChild(bi(o, n, i, r)), t.appendChild(s);
3254
3310
  }
3255
- function hi(e, t, n) {
3256
- mi(e, t, ":before", n), mi(e, t, ":after", n);
3311
+ function Si(e, t, n) {
3312
+ xi(e, t, ":before", n), xi(e, t, ":after", n);
3257
3313
  }
3258
3314
  //#endregion
3259
3315
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
3260
- var gi = "application/font-woff", _i = "image/jpeg", vi = {
3261
- woff: gi,
3262
- woff2: gi,
3316
+ var Ci = "application/font-woff", wi = "image/jpeg", Ti = {
3317
+ woff: Ci,
3318
+ woff2: Ci,
3263
3319
  ttf: "application/font-truetype",
3264
3320
  eot: "application/vnd.ms-fontobject",
3265
3321
  png: "image/png",
3266
- jpg: _i,
3267
- jpeg: _i,
3322
+ jpg: wi,
3323
+ jpeg: wi,
3268
3324
  gif: "image/gif",
3269
3325
  tiff: "image/tiff",
3270
3326
  svg: "image/svg+xml",
3271
3327
  webp: "image/webp"
3272
3328
  };
3273
- function yi(e) {
3329
+ function Ei(e) {
3274
3330
  let t = /\.([^./]*?)$/g.exec(e);
3275
3331
  return t ? t[1] : "";
3276
3332
  }
3277
- function bi(e) {
3278
- return vi[yi(e).toLowerCase()] || "";
3333
+ function Di(e) {
3334
+ return Ti[Ei(e).toLowerCase()] || "";
3279
3335
  }
3280
3336
  //#endregion
3281
3337
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
3282
- function xi(e) {
3338
+ function Oi(e) {
3283
3339
  return e.split(/,/)[1];
3284
3340
  }
3285
- function Si(e) {
3341
+ function ki(e) {
3286
3342
  return e.search(/^(data:)/) !== -1;
3287
3343
  }
3288
- function Ci(e, t) {
3344
+ function Ai(e, t) {
3289
3345
  return `data:${t};base64,${e}`;
3290
3346
  }
3291
- async function wi(e, t, n) {
3347
+ async function ji(e, t, n) {
3292
3348
  let r = await fetch(e, t);
3293
3349
  if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
3294
3350
  let i = await r.blob();
@@ -3306,78 +3362,78 @@ async function wi(e, t, n) {
3306
3362
  }, a.readAsDataURL(i);
3307
3363
  });
3308
3364
  }
3309
- var Ti = {};
3310
- function Ei(e, t, n) {
3365
+ var Mi = {};
3366
+ function Ni(e, t, n) {
3311
3367
  let r = e.replace(/\?.*/, "");
3312
3368
  return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
3313
3369
  }
3314
- async function Di(e, t, n) {
3315
- let r = Ei(e, t, n.includeQueryParams);
3316
- if (Ti[r] != null) return Ti[r];
3370
+ async function Pi(e, t, n) {
3371
+ let r = Ni(e, t, n.includeQueryParams);
3372
+ if (Mi[r] != null) return Mi[r];
3317
3373
  n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
3318
3374
  let i;
3319
3375
  try {
3320
- i = Ci(await wi(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", xi(n))), t);
3376
+ i = Ai(await ji(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", Oi(n))), t);
3321
3377
  } catch (t) {
3322
3378
  i = n.imagePlaceholder || "";
3323
3379
  let r = `Failed to fetch resource: ${e}`;
3324
3380
  t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
3325
3381
  }
3326
- return Ti[r] = i, i;
3382
+ return Mi[r] = i, i;
3327
3383
  }
3328
3384
  //#endregion
3329
3385
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
3330
- async function Oi(e) {
3386
+ async function Fi(e) {
3331
3387
  let t = e.toDataURL();
3332
- return t === "data:," ? e.cloneNode(!1) : ci(t);
3388
+ return t === "data:," ? e.cloneNode(!1) : hi(t);
3333
3389
  }
3334
- async function ki(e, t) {
3390
+ async function Ii(e, t) {
3335
3391
  if (e.currentSrc) {
3336
3392
  let t = document.createElement("canvas"), n = t.getContext("2d");
3337
- return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), ci(t.toDataURL());
3393
+ return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), hi(t.toDataURL());
3338
3394
  }
3339
3395
  let n = e.poster;
3340
- return ci(await Di(n, bi(n), t));
3396
+ return hi(await Pi(n, Di(n), t));
3341
3397
  }
3342
- async function Ai(e, t) {
3398
+ async function Li(e, t) {
3343
3399
  try {
3344
- if (e?.contentDocument?.body) return await Bi(e.contentDocument.body, t, !0);
3400
+ if (e?.contentDocument?.body) return await qi(e.contentDocument.body, t, !0);
3345
3401
  } catch {}
3346
3402
  return e.cloneNode(!1);
3347
3403
  }
3348
- async function ji(e, t) {
3349
- return Z(e, HTMLCanvasElement) ? Oi(e) : Z(e, HTMLVideoElement) ? ki(e, t) : Z(e, HTMLIFrameElement) ? Ai(e, t) : e.cloneNode(Ni(e));
3404
+ async function Ri(e, t) {
3405
+ return Z(e, HTMLCanvasElement) ? Fi(e) : Z(e, HTMLVideoElement) ? Ii(e, t) : Z(e, HTMLIFrameElement) ? Li(e, t) : e.cloneNode(Bi(e));
3350
3406
  }
3351
- var Mi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Ni = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
3352
- async function Pi(e, t, n) {
3353
- if (Ni(t)) return t;
3407
+ var zi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Bi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
3408
+ async function Vi(e, t, n) {
3409
+ if (Bi(t)) return t;
3354
3410
  let r = [];
3355
- return r = Mi(e) && e.assignedNodes ? Y(e.assignedNodes()) : Z(e, HTMLIFrameElement) && e.contentDocument?.body ? Y(e.contentDocument.body.childNodes) : Y((e.shadowRoot ?? e).childNodes), r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Bi(r, n)).then((e) => {
3411
+ return r = zi(e) && e.assignedNodes ? oi(e.assignedNodes()) : Z(e, HTMLIFrameElement) && e.contentDocument?.body ? oi(e.contentDocument.body.childNodes) : oi((e.shadowRoot ?? e).childNodes), r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => qi(r, n)).then((e) => {
3356
3412
  e && t.appendChild(e);
3357
3413
  }), Promise.resolve()), t;
3358
3414
  }
3359
- function Fi(e, t, n) {
3415
+ function Hi(e, t, n) {
3360
3416
  let r = t.style;
3361
3417
  if (!r) return;
3362
3418
  let i = window.getComputedStyle(e);
3363
- i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : ti(n).forEach((n) => {
3419
+ i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : ci(n).forEach((n) => {
3364
3420
  let a = i.getPropertyValue(n);
3365
3421
  n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), Z(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
3366
3422
  });
3367
3423
  }
3368
- function Ii(e, t) {
3424
+ function Ui(e, t) {
3369
3425
  Z(e, HTMLTextAreaElement) && (t.innerHTML = e.value), Z(e, HTMLInputElement) && t.setAttribute("value", e.value);
3370
3426
  }
3371
- function Li(e, t) {
3427
+ function Wi(e, t) {
3372
3428
  if (Z(e, HTMLSelectElement)) {
3373
3429
  let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
3374
3430
  r && r.setAttribute("selected", "");
3375
3431
  }
3376
3432
  }
3377
- function Ri(e, t, n) {
3378
- return Z(t, Element) && (Fi(e, t, n), hi(e, t, n), Ii(e, t), Li(e, t)), t;
3433
+ function Gi(e, t, n) {
3434
+ return Z(t, Element) && (Hi(e, t, n), Si(e, t, n), Ui(e, t), Wi(e, t)), t;
3379
3435
  }
3380
- async function zi(e, t) {
3436
+ async function Ki(e, t) {
3381
3437
  let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
3382
3438
  if (n.length === 0) return e;
3383
3439
  let r = {};
@@ -3385,7 +3441,7 @@ async function zi(e, t) {
3385
3441
  let a = n[i].getAttribute("xlink:href");
3386
3442
  if (a) {
3387
3443
  let n = e.querySelector(a), i = document.querySelector(a);
3388
- !n && i && !r[a] && (r[a] = await Bi(i, t, !0));
3444
+ !n && i && !r[a] && (r[a] = await qi(i, t, !0));
3389
3445
  }
3390
3446
  }
3391
3447
  let i = Object.values(r);
@@ -3399,61 +3455,61 @@ async function zi(e, t) {
3399
3455
  }
3400
3456
  return e;
3401
3457
  }
3402
- async function Bi(e, t, n) {
3403
- return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => ji(e, t)).then((n) => Pi(e, n, t)).then((n) => Ri(e, n, t)).then((e) => zi(e, t));
3458
+ async function qi(e, t, n) {
3459
+ return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Ri(e, t)).then((n) => Vi(e, n, t)).then((n) => Gi(e, n, t)).then((e) => Ki(e, t));
3404
3460
  }
3405
3461
  //#endregion
3406
3462
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
3407
- var Vi = /url\((['"]?)([^'"]+?)\1\)/g, Hi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Ui = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3408
- function Wi(e) {
3463
+ var Ji = /url\((['"]?)([^'"]+?)\1\)/g, Yi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Xi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3464
+ function Zi(e) {
3409
3465
  let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
3410
3466
  return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
3411
3467
  }
3412
- function Gi(e) {
3468
+ function Qi(e) {
3413
3469
  let t = [];
3414
- return e.replace(Vi, (e, n, r) => (t.push(r), e)), t.filter((e) => !Si(e));
3470
+ return e.replace(Ji, (e, n, r) => (t.push(r), e)), t.filter((e) => !ki(e));
3415
3471
  }
3416
- async function Ki(e, t, n, r, i) {
3472
+ async function $i(e, t, n, r, i) {
3417
3473
  try {
3418
- let a = n ? Qr(t, n) : t, o = bi(t), s;
3419
- return s = i ? Ci(await i(a), o) : await Di(a, o, r), e.replace(Wi(t), `$1${s}$3`);
3474
+ let a = n ? ii(t, n) : t, o = Di(t), s;
3475
+ return s = i ? Ai(await i(a), o) : await Pi(a, o, r), e.replace(Zi(t), `$1${s}$3`);
3420
3476
  } catch {}
3421
3477
  return e;
3422
3478
  }
3423
- function qi(e, { preferredFontFormat: t }) {
3424
- return t ? e.replace(Ui, (e) => {
3479
+ function ea(e, { preferredFontFormat: t }) {
3480
+ return t ? e.replace(Xi, (e) => {
3425
3481
  for (;;) {
3426
- let [n, , r] = Hi.exec(e) || [];
3482
+ let [n, , r] = Yi.exec(e) || [];
3427
3483
  if (!r) return "";
3428
3484
  if (r === t) return `src: ${n};`;
3429
3485
  }
3430
3486
  }) : e;
3431
3487
  }
3432
- function Ji(e) {
3433
- return e.search(Vi) !== -1;
3488
+ function ta(e) {
3489
+ return e.search(Ji) !== -1;
3434
3490
  }
3435
- async function Yi(e, t, n) {
3436
- if (!Ji(e)) return e;
3437
- let r = qi(e, n);
3438
- return Gi(r).reduce((e, r) => e.then((e) => Ki(e, r, t, n)), Promise.resolve(r));
3491
+ async function na(e, t, n) {
3492
+ if (!ta(e)) return e;
3493
+ let r = ea(e, n);
3494
+ return Qi(r).reduce((e, r) => e.then((e) => $i(e, r, t, n)), Promise.resolve(r));
3439
3495
  }
3440
3496
  //#endregion
3441
3497
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
3442
- async function Xi(e, t, n) {
3498
+ async function ra(e, t, n) {
3443
3499
  let r = t.style?.getPropertyValue(e);
3444
3500
  if (r) {
3445
- let i = await Yi(r, null, n);
3501
+ let i = await na(r, null, n);
3446
3502
  return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
3447
3503
  }
3448
3504
  return !1;
3449
3505
  }
3450
- async function Zi(e, t) {
3451
- await Xi("background", e, t) || await Xi("background-image", e, t), await Xi("mask", e, t) || await Xi("-webkit-mask", e, t) || await Xi("mask-image", e, t) || await Xi("-webkit-mask-image", e, t);
3506
+ async function ia(e, t) {
3507
+ await ra("background", e, t) || await ra("background-image", e, t), await ra("mask", e, t) || await ra("-webkit-mask", e, t) || await ra("mask-image", e, t) || await ra("-webkit-mask-image", e, t);
3452
3508
  }
3453
- async function Qi(e, t) {
3509
+ async function aa(e, t) {
3454
3510
  let n = Z(e, HTMLImageElement);
3455
- if (!(n && !Si(e.src)) && !(Z(e, SVGImageElement) && !Si(e.href.baseVal))) return;
3456
- let r = n ? e.src : e.href.baseVal, i = await Di(r, bi(r), t);
3511
+ if (!(n && !ki(e.src)) && !(Z(e, SVGImageElement) && !ki(e.href.baseVal))) return;
3512
+ let r = n ? e.src : e.href.baseVal, i = await Pi(r, Di(r), t);
3457
3513
  await new Promise((r, a) => {
3458
3514
  e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
3459
3515
  try {
@@ -3466,16 +3522,16 @@ async function Qi(e, t) {
3466
3522
  o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
3467
3523
  });
3468
3524
  }
3469
- async function $i(e, t) {
3470
- let n = Y(e.childNodes).map((e) => ea(e, t));
3525
+ async function oa(e, t) {
3526
+ let n = oi(e.childNodes).map((e) => sa(e, t));
3471
3527
  await Promise.all(n).then(() => e);
3472
3528
  }
3473
- async function ea(e, t) {
3474
- Z(e, Element) && (await Zi(e, t), await Qi(e, t), await $i(e, t));
3529
+ async function sa(e, t) {
3530
+ Z(e, Element) && (await ia(e, t), await aa(e, t), await oa(e, t));
3475
3531
  }
3476
3532
  //#endregion
3477
3533
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
3478
- function ta(e, t) {
3534
+ function ca(e, t) {
3479
3535
  let { style: n } = e;
3480
3536
  t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
3481
3537
  let r = t.style;
@@ -3485,22 +3541,22 @@ function ta(e, t) {
3485
3541
  }
3486
3542
  //#endregion
3487
3543
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
3488
- var na = {};
3489
- async function ra(e) {
3490
- let t = na[e];
3544
+ var la = {};
3545
+ async function ua(e) {
3546
+ let t = la[e];
3491
3547
  return t ?? (t = {
3492
3548
  url: e,
3493
3549
  cssText: await (await fetch(e)).text()
3494
- }, na[e] = t, t);
3550
+ }, la[e] = t, t);
3495
3551
  }
3496
- async function ia(e, t) {
3552
+ async function da(e, t) {
3497
3553
  let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
3498
3554
  let a = i.replace(r, "$1");
3499
- return a.startsWith("https://") || (a = new URL(a, e.url).href), wi(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3555
+ return a.startsWith("https://") || (a = new URL(a, e.url).href), ji(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3500
3556
  });
3501
3557
  return Promise.all(i).then(() => n);
3502
3558
  }
3503
- function aa(e) {
3559
+ function fa(e) {
3504
3560
  if (e == null) return [];
3505
3561
  let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
3506
3562
  for (;;) {
@@ -3520,13 +3576,13 @@ function aa(e) {
3520
3576
  }
3521
3577
  return t;
3522
3578
  }
3523
- async function oa(e, t) {
3579
+ async function pa(e, t) {
3524
3580
  let n = [], r = [];
3525
3581
  return e.forEach((n) => {
3526
3582
  if ("cssRules" in n) try {
3527
- Y(n.cssRules || []).forEach((e, i) => {
3583
+ oi(n.cssRules || []).forEach((e, i) => {
3528
3584
  if (e.type === CSSRule.IMPORT_RULE) {
3529
- let a = i + 1, o = e.href, s = ra(o).then((e) => ia(e, t)).then((e) => aa(e).forEach((e) => {
3585
+ let a = i + 1, o = e.href, s = ua(o).then((e) => da(e, t)).then((e) => fa(e).forEach((e) => {
3530
3586
  try {
3531
3587
  n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
3532
3588
  } catch (t) {
@@ -3543,7 +3599,7 @@ async function oa(e, t) {
3543
3599
  });
3544
3600
  } catch (i) {
3545
3601
  let a = e.find((e) => e.href == null) || document.styleSheets[0];
3546
- n.href != null && r.push(ra(n.href).then((e) => ia(e, t)).then((e) => aa(e).forEach((e) => {
3602
+ n.href != null && r.push(ua(n.href).then((e) => da(e, t)).then((e) => fa(e).forEach((e) => {
3547
3603
  a.insertRule(e, a.cssRules.length);
3548
3604
  })).catch((e) => {
3549
3605
  console.error("Error loading remote stylesheet", e);
@@ -3551,7 +3607,7 @@ async function oa(e, t) {
3551
3607
  }
3552
3608
  }), Promise.all(r).then(() => (e.forEach((e) => {
3553
3609
  if ("cssRules" in e) try {
3554
- Y(e.cssRules || []).forEach((e) => {
3610
+ oi(e.cssRules || []).forEach((e) => {
3555
3611
  n.push(e);
3556
3612
  });
3557
3613
  } catch (t) {
@@ -3559,36 +3615,36 @@ async function oa(e, t) {
3559
3615
  }
3560
3616
  }), n));
3561
3617
  }
3562
- function sa(e) {
3563
- return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Ji(e.style.getPropertyValue("src")));
3618
+ function ma(e) {
3619
+ return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => ta(e.style.getPropertyValue("src")));
3564
3620
  }
3565
- async function ca(e, t) {
3621
+ async function ha(e, t) {
3566
3622
  if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
3567
- return sa(await oa(Y(e.ownerDocument.styleSheets), t));
3623
+ return ma(await pa(oi(e.ownerDocument.styleSheets), t));
3568
3624
  }
3569
- function la(e) {
3625
+ function ga(e) {
3570
3626
  return e.trim().replace(/["']/g, "");
3571
3627
  }
3572
- function ua(e) {
3628
+ function _a(e) {
3573
3629
  let t = /* @__PURE__ */ new Set();
3574
3630
  function n(e) {
3575
3631
  (e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
3576
- t.add(la(e));
3632
+ t.add(ga(e));
3577
3633
  }), Array.from(e.children).forEach((e) => {
3578
3634
  e instanceof HTMLElement && n(e);
3579
3635
  });
3580
3636
  }
3581
3637
  return n(e), t;
3582
3638
  }
3583
- async function da(e, t) {
3584
- let n = await ca(e, t), r = ua(e);
3585
- return (await Promise.all(n.filter((e) => r.has(la(e.style.fontFamily))).map((e) => {
3639
+ async function va(e, t) {
3640
+ let n = await ha(e, t), r = _a(e);
3641
+ return (await Promise.all(n.filter((e) => r.has(ga(e.style.fontFamily))).map((e) => {
3586
3642
  let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
3587
- return Yi(e.cssText, n, t);
3643
+ return na(e.cssText, n, t);
3588
3644
  }))).join("\n");
3589
3645
  }
3590
- async function fa(e, t) {
3591
- let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await da(e, t) : t.fontEmbedCSS;
3646
+ async function ya(e, t) {
3647
+ let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await va(e, t) : t.fontEmbedCSS;
3592
3648
  if (n) {
3593
3649
  let t = document.createElement("style"), r = document.createTextNode(n);
3594
3650
  t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
@@ -3596,18 +3652,18 @@ async function fa(e, t) {
3596
3652
  }
3597
3653
  //#endregion
3598
3654
  //#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
3599
- async function pa(e, t = {}) {
3600
- let { width: n, height: r } = ai(e, t), i = await Bi(e, t, !0);
3601
- return await fa(i, t), await ea(i, t), ta(i, t), await ui(i, n, r);
3655
+ async function ba(e, t = {}) {
3656
+ let { width: n, height: r } = fi(e, t), i = await qi(e, t, !0);
3657
+ return await ya(i, t), await sa(i, t), ca(i, t), await _i(i, n, r);
3602
3658
  }
3603
- async function ma(e, t = {}) {
3604
- let { width: n, height: r } = ai(e, t), i = await ci(await pa(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || oi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3605
- return a.width = c * s, a.height = l * s, t.skipAutoScale || si(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
3659
+ async function xa(e, t = {}) {
3660
+ let { width: n, height: r } = fi(e, t), i = await hi(await ba(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || pi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3661
+ return a.width = c * s, a.height = l * s, t.skipAutoScale || mi(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
3606
3662
  }
3607
3663
  //#endregion
3608
3664
  //#region src/runtime/screenshot.ts
3609
- var ha = 2 * 1024 * 1024, ga = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", _a = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
3610
- function va(e) {
3665
+ var Sa = 2 * 1024 * 1024, Ca = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", wa = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
3666
+ function Ta(e) {
3611
3667
  let t = e.parentElement;
3612
3668
  for (; t;) {
3613
3669
  if (t.hasAttribute("data-markup-safe")) return !0;
@@ -3615,35 +3671,35 @@ function va(e) {
3615
3671
  }
3616
3672
  return !1;
3617
3673
  }
3618
- function ya(e) {
3674
+ function Ea(e) {
3619
3675
  let t = /* @__PURE__ */ new Set(), n = [];
3620
3676
  function r(e) {
3621
3677
  t.has(e) || (t.add(e), n.push(e));
3622
3678
  }
3623
3679
  for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
3624
- for (let e of document.querySelectorAll(_a)) va(e) || r(e);
3680
+ for (let e of document.querySelectorAll(wa)) Ta(e) || r(e);
3625
3681
  if (e.redactSelector) try {
3626
- for (let t of document.querySelectorAll(e.redactSelector)) va(t) || r(t);
3682
+ for (let t of document.querySelectorAll(e.redactSelector)) Ta(t) || r(t);
3627
3683
  } catch {}
3628
- if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) va(e) || r(e);
3684
+ if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) Ta(e) || r(e);
3629
3685
  return n;
3630
3686
  }
3631
- function ba(e) {
3687
+ function Da(e) {
3632
3688
  let t = e.getAttribute("style");
3633
- return e.setAttribute("style", t ? `${t};${ga}` : ga), () => {
3689
+ return e.setAttribute("style", t ? `${t};${Ca}` : Ca), () => {
3634
3690
  t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
3635
3691
  };
3636
3692
  }
3637
- function xa(e) {
3693
+ function Oa(e) {
3638
3694
  if (e.id) return `#${CSS.escape(e.id)}`;
3639
3695
  let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
3640
3696
  return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
3641
3697
  }
3642
- async function Sa(e, t, n) {
3698
+ async function ka(e, t, n) {
3643
3699
  try {
3644
- let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? ya(n) : [], s = o.map(xa), c = o.map(ba), l;
3700
+ let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? Ea(n) : [], s = o.map(Oa), c = o.map(Da), l;
3645
3701
  try {
3646
- l = await ma(document.documentElement, {
3702
+ l = await xa(document.documentElement, {
3647
3703
  width: r,
3648
3704
  height: i,
3649
3705
  cacheBust: !0,
@@ -3662,17 +3718,17 @@ async function Sa(e, t, n) {
3662
3718
  }
3663
3719
  if (t) {
3664
3720
  let e = l.getContext("2d");
3665
- e && wa(e, t.x, t.y, a);
3721
+ e && ja(e, t.x, t.y, a);
3666
3722
  }
3667
- let u = await Ca(l, .85);
3723
+ let u = await Aa(l, .85);
3668
3724
  if (!u) return null;
3669
- if (u.size <= ha) return {
3725
+ if (u.size <= Sa) return {
3670
3726
  blob: u,
3671
3727
  redactedCount: s.length,
3672
3728
  redactedSelectors: s
3673
3729
  };
3674
- let d = await Ca(l, .5);
3675
- return !d || d.size > ha ? null : {
3730
+ let d = await Aa(l, .5);
3731
+ return !d || d.size > Sa ? null : {
3676
3732
  blob: d,
3677
3733
  redactedCount: s.length,
3678
3734
  redactedSelectors: s
@@ -3681,10 +3737,10 @@ async function Sa(e, t, n) {
3681
3737
  return null;
3682
3738
  }
3683
3739
  }
3684
- function Ca(e, t) {
3740
+ function Aa(e, t) {
3685
3741
  return new Promise((n) => e.toBlob(n, "image/jpeg", t));
3686
3742
  }
3687
- function wa(e, t, n, r) {
3743
+ function ja(e, t, n, r) {
3688
3744
  let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
3689
3745
  e.save();
3690
3746
  let l = 2 * i;
@@ -3702,7 +3758,7 @@ function wa(e, t, n, r) {
3702
3758
  }
3703
3759
  //#endregion
3704
3760
  //#region src/runtime/use-subscription-token.ts
3705
- var Ta = ar({
3761
+ var Ma = dr({
3706
3762
  idle: { issued: (e, t) => ({
3707
3763
  kind: "active",
3708
3764
  token: t.token,
@@ -3713,10 +3769,10 @@ var Ta = ar({
3713
3769
  token: t.token,
3714
3770
  expiresAt: t.expiresAt
3715
3771
  }) }
3716
- }), Ea = 30 * 6e4, Da = 6e4, Oa = 6e4;
3717
- function ka(e) {
3718
- let [t, n] = or(Ta, { kind: "idle" });
3719
- return R(() => {
3772
+ }), Na = 30 * 6e4, Pa = 6e4, Fa = 6e4;
3773
+ function Ia(e) {
3774
+ let [t, n] = fr(Ma, { kind: "idle" });
3775
+ return z(() => {
3720
3776
  let t = !1, r = null;
3721
3777
  async function i() {
3722
3778
  try {
@@ -3727,11 +3783,11 @@ function ka(e) {
3727
3783
  token: a.token,
3728
3784
  expiresAt: a.expiresAt
3729
3785
  });
3730
- let o = Math.max(Da, a.expiresAt - Date.now() - Ea);
3786
+ let o = Math.max(Pa, a.expiresAt - Date.now() - Na);
3731
3787
  r = setTimeout(i, o);
3732
3788
  } catch {
3733
3789
  if (t) return;
3734
- r = setTimeout(i, Oa);
3790
+ r = setTimeout(i, Fa);
3735
3791
  }
3736
3792
  }
3737
3793
  return i(), () => {
@@ -3741,7 +3797,7 @@ function ka(e) {
3741
3797
  }
3742
3798
  //#endregion
3743
3799
  //#region src/runtime/refresh-token.ts
3744
- async function Aa(e) {
3800
+ async function La(e) {
3745
3801
  try {
3746
3802
  let t = {
3747
3803
  method: "POST",
@@ -3776,18 +3832,18 @@ async function Aa(e) {
3776
3832
  }
3777
3833
  //#endregion
3778
3834
  //#region src/runtime/use-token-refresh.ts
3779
- var ja = 6e4, Ma = 500;
3780
- function Na(e, t, n, r, i) {
3835
+ var Ra = 6e4, za = 500;
3836
+ function Ba(e, t, n, r, i) {
3781
3837
  let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
3782
- R(() => {
3838
+ z(() => {
3783
3839
  if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
3784
3840
  let u = Date.now();
3785
3841
  if (c <= u) {
3786
3842
  i();
3787
3843
  return;
3788
3844
  }
3789
- let d = Math.max(Ma, l - ja - u), f = new AbortController(), p = window.setTimeout(async () => {
3790
- let a = await Aa({
3845
+ let d = Math.max(za, l - Ra - u), f = new AbortController(), p = window.setTimeout(async () => {
3846
+ let a = await La({
3791
3847
  apiUrl: t,
3792
3848
  apiKey: n,
3793
3849
  mode: o,
@@ -3832,12 +3888,12 @@ function Q(...e) {
3832
3888
  }
3833
3889
  //#endregion
3834
3890
  //#region src/runtime/use-drag.ts
3835
- function Pa(e) {
3836
- let t = z(e);
3891
+ function Va(e) {
3892
+ let t = B(e);
3837
3893
  t.current = e;
3838
- let [n, r] = L(!1), i = z(!1);
3894
+ let [n, r] = R(!1), i = B(!1);
3839
3895
  return {
3840
- onPointerDown: B((e) => {
3896
+ onPointerDown: V((e) => {
3841
3897
  let n = t.current;
3842
3898
  if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
3843
3899
  let a = e.currentTarget;
@@ -3861,8 +3917,8 @@ function Pa(e) {
3861
3917
  g = !0, i.current = !0, r(!0), t.current.onStart?.();
3862
3918
  }
3863
3919
  let o = Math.max(m, window.innerWidth - d - m), v = Math.max(m, window.innerHeight - f - m), y = {
3864
- left: Fa(l + n, m, o),
3865
- top: Fa(u + a, m, v)
3920
+ left: Ha(l + n, m, o),
3921
+ top: Ha(u + a, m, v)
3866
3922
  };
3867
3923
  _ = y, t.current.onMove(y);
3868
3924
  }
@@ -3875,15 +3931,15 @@ function Pa(e) {
3875
3931
  a.addEventListener("pointermove", y), a.addEventListener("pointerup", b), a.addEventListener("pointercancel", x);
3876
3932
  }, []),
3877
3933
  isDragging: n,
3878
- consumeClickIfDragged: B(() => i.current ? (i.current = !1, !0) : !1, [])
3934
+ consumeClickIfDragged: V(() => i.current ? (i.current = !1, !0) : !1, [])
3879
3935
  };
3880
3936
  }
3881
- function Fa(e, t, n) {
3937
+ function Ha(e, t, n) {
3882
3938
  return Math.max(t, Math.min(n, e));
3883
3939
  }
3884
3940
  //#endregion
3885
3941
  //#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
3886
- var Ia = 0;
3942
+ var Ua = 0;
3887
3943
  Array.isArray;
3888
3944
  function $(e, n, r, i, a, o) {
3889
3945
  n ||= {};
@@ -3900,7 +3956,7 @@ function $(e, n, r, i, a, o) {
3900
3956
  __e: null,
3901
3957
  __c: null,
3902
3958
  constructor: void 0,
3903
- __v: --Ia,
3959
+ __v: --Ua,
3904
3960
  __i: -1,
3905
3961
  __u: 0,
3906
3962
  __source: a,
@@ -3911,7 +3967,7 @@ function $(e, n, r, i, a, o) {
3911
3967
  }
3912
3968
  //#endregion
3913
3969
  //#region src/runtime/ui/icons.tsx
3914
- function La({ size: e = 16 }) {
3970
+ function Wa({ size: e = 16 }) {
3915
3971
  return /* @__PURE__ */ $("svg", {
3916
3972
  width: e,
3917
3973
  height: e,
@@ -3921,7 +3977,7 @@ function La({ size: e = 16 }) {
3921
3977
  children: /* @__PURE__ */ $("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
3922
3978
  });
3923
3979
  }
3924
- function Ra({ size: e = 16 }) {
3980
+ function Ga({ size: e = 16 }) {
3925
3981
  return /* @__PURE__ */ $("svg", {
3926
3982
  width: e,
3927
3983
  height: e,
@@ -3930,7 +3986,7 @@ function Ra({ size: e = 16 }) {
3930
3986
  children: /* @__PURE__ */ $("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
3931
3987
  });
3932
3988
  }
3933
- function za({ size: e = 16 }) {
3989
+ function Ka({ size: e = 16 }) {
3934
3990
  return /* @__PURE__ */ $("svg", {
3935
3991
  width: e,
3936
3992
  height: e,
@@ -3939,7 +3995,7 @@ function za({ size: e = 16 }) {
3939
3995
  children: /* @__PURE__ */ $("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
3940
3996
  });
3941
3997
  }
3942
- function Ba({ size: e = 16 }) {
3998
+ function qa({ size: e = 16 }) {
3943
3999
  return /* @__PURE__ */ $("svg", {
3944
4000
  width: e,
3945
4001
  height: e,
@@ -3952,7 +4008,7 @@ function Ba({ size: e = 16 }) {
3952
4008
  })
3953
4009
  });
3954
4010
  }
3955
- function Va({ size: e = 16 }) {
4011
+ function Ja({ size: e = 16 }) {
3956
4012
  return /* @__PURE__ */ $("svg", {
3957
4013
  width: e,
3958
4014
  height: e,
@@ -3966,7 +4022,7 @@ function Va({ size: e = 16 }) {
3966
4022
  })
3967
4023
  });
3968
4024
  }
3969
- function Ha({ size: e = 16 }) {
4025
+ function Ya({ size: e = 16 }) {
3970
4026
  return /* @__PURE__ */ $("svg", {
3971
4027
  width: e,
3972
4028
  height: e,
@@ -3975,7 +4031,7 @@ function Ha({ size: e = 16 }) {
3975
4031
  children: /* @__PURE__ */ $("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
3976
4032
  });
3977
4033
  }
3978
- function Ua({ size: e = 16 }) {
4034
+ function Xa({ size: e = 16 }) {
3979
4035
  return /* @__PURE__ */ $("svg", {
3980
4036
  width: e,
3981
4037
  height: e,
@@ -3987,8 +4043,8 @@ function Ua({ size: e = 16 }) {
3987
4043
  }
3988
4044
  //#endregion
3989
4045
  //#region src/runtime/ui/fab.tsx
3990
- function Wa({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i, variant: a = "default" }) {
3991
- let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : r === "bottom-center" ? "markup-fab-center" : "markup-fab-right", [c, l] = L(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } = Pa({
4046
+ function Za({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i, variant: a = "default" }) {
4047
+ let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : r === "bottom-center" ? "markup-fab-center" : "markup-fab-right", [c, l] = R(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } = Va({
3992
4048
  preventDefault: !0,
3993
4049
  stopPropagation: !0,
3994
4050
  onMove: l,
@@ -4020,7 +4076,7 @@ function Wa({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
4020
4076
  "aria-pressed": e,
4021
4077
  children: [/* @__PURE__ */ $("span", {
4022
4078
  class: "markup-fab-icon",
4023
- children: $(e ? Ra : La, { size: 16 })
4079
+ children: $(e ? Ga : Wa, { size: 16 })
4024
4080
  }), o ? null : /* @__PURE__ */ $("span", {
4025
4081
  class: "markup-fab-label",
4026
4082
  children: e ? "Cancel" : "Markup"
@@ -4029,7 +4085,7 @@ function Wa({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
4029
4085
  }
4030
4086
  //#endregion
4031
4087
  //#region src/runtime/use-focus-trap.ts
4032
- var Ga = [
4088
+ var Qa = [
4033
4089
  "a[href]",
4034
4090
  "button:not([disabled])",
4035
4091
  "input:not([disabled])",
@@ -4037,14 +4093,14 @@ var Ga = [
4037
4093
  "textarea:not([disabled])",
4038
4094
  "[tabindex]:not([tabindex=\"-1\"])"
4039
4095
  ].join(",");
4040
- function Ka(e, t) {
4041
- R(() => {
4096
+ function $a(e, t) {
4097
+ z(() => {
4042
4098
  if (!t) return;
4043
4099
  let n = e.current;
4044
4100
  if (!n) return;
4045
4101
  function r(e) {
4046
4102
  if (e.key !== "Tab") return;
4047
- let t = Array.from(n.querySelectorAll(Ga)), r = t[0], i = t[t.length - 1];
4103
+ let t = Array.from(n.querySelectorAll(Qa)), r = t[0], i = t[t.length - 1];
4048
4104
  if (!r || !i) return;
4049
4105
  let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
4050
4106
  (e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
@@ -4054,9 +4110,9 @@ function Ka(e, t) {
4054
4110
  }
4055
4111
  //#endregion
4056
4112
  //#region src/runtime/use-object-url.ts
4057
- function qa(e) {
4058
- let [t, n] = L(null);
4059
- return R(() => {
4113
+ function eo(e) {
4114
+ let [t, n] = R(null);
4115
+ return z(() => {
4060
4116
  if (!e) {
4061
4117
  n(null);
4062
4118
  return;
@@ -4067,9 +4123,9 @@ function qa(e) {
4067
4123
  }
4068
4124
  //#endregion
4069
4125
  //#region src/runtime/ui/author-prompt.tsx
4070
- function Ja({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4071
- let [o, s] = L(""), [c, l] = L(""), u = z(null);
4072
- R(() => {
4126
+ function to({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
4127
+ let [o, s] = R(""), [c, l] = R(""), u = B(null);
4128
+ z(() => {
4073
4129
  u.current?.focus();
4074
4130
  }, []);
4075
4131
  function d(n) {
@@ -4146,18 +4202,18 @@ function Ja({ isPending: e, isConnecting: t = !1, isSigningIn: n = !1, onSubmit:
4146
4202
  }
4147
4203
  //#endregion
4148
4204
  //#region src/runtime/ui/composer.tsx
4149
- var Ya = 4e3;
4150
- function Xa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o }) {
4151
- let [s, c] = L(""), l = z(null), u = z(!1);
4152
- R(() => {
4205
+ var no = 4e3;
4206
+ function ro({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o }) {
4207
+ let [s, c] = R(""), l = B(null), u = B(!1);
4208
+ z(() => {
4153
4209
  r && l.current?.focus();
4154
- }, [r]), R(() => {
4210
+ }, [r]), z(() => {
4155
4211
  let e = l.current;
4156
4212
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
4157
- }, [s]), R(() => {
4213
+ }, [s]), z(() => {
4158
4214
  u.current && !i && !a && (c(""), l.current?.focus()), u.current = i;
4159
4215
  }, [i, a]);
4160
- let d = Ya - s.length, f = d < 0;
4216
+ let d = no - s.length, f = d < 0;
4161
4217
  function p(e) {
4162
4218
  e?.preventDefault();
4163
4219
  let t = s.trim();
@@ -4175,7 +4231,7 @@ function Xa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
4175
4231
  "aria-label": i ? "Sending…" : n,
4176
4232
  title: i ? "Sending…" : n,
4177
4233
  tabIndex: e,
4178
- children: /* @__PURE__ */ $(Ha, { size: 14 })
4234
+ children: /* @__PURE__ */ $(Ya, { size: 14 })
4179
4235
  });
4180
4236
  }
4181
4237
  return /* @__PURE__ */ $("form", {
@@ -4188,7 +4244,7 @@ function Xa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
4188
4244
  class: "markup-composer-input",
4189
4245
  placeholder: t,
4190
4246
  rows: h ? 2 : 1,
4191
- maxLength: Ya + 100,
4247
+ maxLength: no + 100,
4192
4248
  value: s,
4193
4249
  onInput: (e) => c(e.currentTarget.value),
4194
4250
  onKeyDown: m,
@@ -4224,15 +4280,15 @@ function Xa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
4224
4280
  }
4225
4281
  //#endregion
4226
4282
  //#region src/runtime/ui/new-thread-popover.tsx
4227
- function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotRedactedCount: u, screenshotRedactedSelectors: d, onAuthor: f, onSignIn: p, onSubmit: m, onClose: h }) {
4228
- let g = z(null);
4229
- Ka(g, !0);
4230
- let [_, v] = L(!1), [y, b] = L(!1), x = qa(c), [C, w] = L(null), { onPointerDown: T, isDragging: E } = Pa({
4283
+ function io({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, isPending: o, error: s, screenshot: c, isScreenshotCapturing: l, screenshotRedactedCount: u, screenshotRedactedSelectors: d, onAuthor: f, onSignIn: p, onSubmit: m, onClose: h }) {
4284
+ let g = B(null);
4285
+ $a(g, !0);
4286
+ let [_, v] = R(!1), [y, b] = R(!1), x = eo(c), [C, w] = R(null), { onPointerDown: T, isDragging: E } = Va({
4231
4287
  targetRef: g,
4232
4288
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
4233
4289
  onMove: w
4234
4290
  });
4235
- R(() => {
4291
+ z(() => {
4236
4292
  let e = g.current;
4237
4293
  if (!e) return;
4238
4294
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
@@ -4243,7 +4299,7 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4243
4299
  }
4244
4300
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
4245
4301
  }, [h]);
4246
- let D = Qa(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), O = Qa(t - window.scrollY - 16, 12, window.innerHeight - 220), k = c != null, A = l || k;
4302
+ let D = ao(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), O = ao(t - window.scrollY - 16, 12, window.innerHeight - 220), k = c != null, A = l || k;
4247
4303
  return /* @__PURE__ */ $("div", {
4248
4304
  ref: g,
4249
4305
  class: Q("markup-popover", C && "is-floating", E && "is-dragging"),
@@ -4265,9 +4321,9 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4265
4321
  class: "markup-icon-btn",
4266
4322
  "aria-label": "Discard pin",
4267
4323
  onClick: h,
4268
- children: /* @__PURE__ */ $(Ra, { size: 16 })
4324
+ children: /* @__PURE__ */ $(Ga, { size: 16 })
4269
4325
  })]
4270
- }), n == null ? /* @__PURE__ */ $(Ja, {
4326
+ }), n == null ? /* @__PURE__ */ $(to, {
4271
4327
  isPending: o,
4272
4328
  isConnecting: i,
4273
4329
  isSigningIn: a,
@@ -4291,7 +4347,7 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4291
4347
  }) : null
4292
4348
  ]
4293
4349
  }),
4294
- /* @__PURE__ */ $(Xa, {
4350
+ /* @__PURE__ */ $(ro, {
4295
4351
  label: "Feedback",
4296
4352
  placeholder: "What's wrong, missing, or worth noting?",
4297
4353
  submitLabel: "Post markup",
@@ -4309,7 +4365,7 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4309
4365
  class: "markup-screenshot-checkbox",
4310
4366
  disabled: !0
4311
4367
  }),
4312
- /* @__PURE__ */ $(Va, { size: 12 }),
4368
+ /* @__PURE__ */ $(Ja, { size: 12 }),
4313
4369
  /* @__PURE__ */ $("span", { children: "Capturing…" })
4314
4370
  ]
4315
4371
  }) : /* @__PURE__ */ $("label", {
@@ -4321,7 +4377,7 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4321
4377
  checked: _,
4322
4378
  onChange: (e) => v(e.currentTarget.checked)
4323
4379
  }),
4324
- /* @__PURE__ */ $(Va, { size: 12 }),
4380
+ /* @__PURE__ */ $(Ja, { size: 12 }),
4325
4381
  /* @__PURE__ */ $("span", { children: "Attach screenshot" }),
4326
4382
  x && _ ? /* @__PURE__ */ $("img", {
4327
4383
  class: "markup-screenshot-thumb",
@@ -4369,12 +4425,12 @@ function Za({ pageX: e, pageY: t, authorName: n, isVerified: r, isIdentityResolv
4369
4425
  })]
4370
4426
  });
4371
4427
  }
4372
- function Qa(e, t, n) {
4428
+ function ao(e, t, n) {
4373
4429
  return Math.max(t, Math.min(n, e));
4374
4430
  }
4375
4431
  //#endregion
4376
4432
  //#region src/runtime/ui/pin.tsx
4377
- function $a({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
4433
+ function oo({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClick: a }) {
4378
4434
  let o = t - window.scrollY, s = e - window.scrollX;
4379
4435
  return /* @__PURE__ */ $("button", {
4380
4436
  type: "button",
@@ -4397,7 +4453,7 @@ function $a({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, onClic
4397
4453
  }) : null]
4398
4454
  });
4399
4455
  }
4400
- function eo({ pageX: e, pageY: t }) {
4456
+ function so({ pageX: e, pageY: t }) {
4401
4457
  let n = t - window.scrollY, r = e - window.scrollX;
4402
4458
  return /* @__PURE__ */ $("div", {
4403
4459
  class: "markup-pin markup-pin-ghost is-anchor",
@@ -4413,15 +4469,15 @@ function eo({ pageX: e, pageY: t }) {
4413
4469
  }
4414
4470
  //#endregion
4415
4471
  //#region src/runtime/ui/placement-overlay.tsx
4416
- function to({ onPlace: e, onCancel: t }) {
4417
- R(() => {
4472
+ function co({ onPlace: e, onCancel: t }) {
4473
+ z(() => {
4418
4474
  function e(e) {
4419
4475
  e.key === "Escape" && t();
4420
4476
  }
4421
4477
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
4422
4478
  }, [t]);
4423
4479
  function n(t) {
4424
- t.stopPropagation(), t.preventDefault(), e(kr(t, document.elementsFromPoint(t.clientX, t.clientY).find((e) => !e.shadowRoot) ?? null), t.clientX, t.clientY);
4480
+ t.stopPropagation(), t.preventDefault(), e(Fr(t, document.elementsFromPoint(t.clientX, t.clientY).find((e) => !e.shadowRoot) ?? null), t.clientX, t.clientY);
4425
4481
  }
4426
4482
  function r(e) {
4427
4483
  e.preventDefault(), e.stopPropagation();
@@ -4439,14 +4495,14 @@ function to({ onPlace: e, onCancel: t }) {
4439
4495
  }
4440
4496
  //#endregion
4441
4497
  //#region src/runtime/ui/thread-popover.tsx
4442
- var no = [
4498
+ var lo = [
4443
4499
  "👍",
4444
4500
  "❤️",
4445
4501
  "🎉",
4446
4502
  "😮",
4447
4503
  "😄",
4448
4504
  "❓"
4449
- ], ro = ar({
4505
+ ], uo = dr({
4450
4506
  none: {
4451
4507
  "toggle-thread-menu": () => ({
4452
4508
  kind: "thread-menu",
@@ -4502,22 +4558,22 @@ var no = [
4502
4558
  dismiss: () => ({ kind: "none" })
4503
4559
  }
4504
4560
  });
4505
- function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, onAuthor: u, onSignIn: d, onClose: f, onReply: p, onEditComment: m, onDeleteComment: h, onToggleReaction: g, onResolve: _, onDelete: v }) {
4506
- let y = z(null), b = z(null), x = z(null), S = z(null), [C, w] = or(ro, { kind: "none" }), [T, E] = L(null), { onPointerDown: D, isDragging: O } = Pa({
4561
+ function fo({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIdentityResolving: i, isSigningIn: a, canDelete: o, isPending: s, error: c, isHidden: l = !1, onAuthor: u, onSignIn: d, onClose: f, onReply: p, onEditComment: m, onDeleteComment: h, onToggleReaction: g, onResolve: _, onDelete: v }) {
4562
+ let y = B(null), b = B(null), x = B(null), S = B(null), [C, w] = fr(uo, { kind: "none" }), [T, E] = R(null), { onPointerDown: D, isDragging: O } = Va({
4507
4563
  targetRef: y,
4508
4564
  shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
4509
4565
  onMove: E
4510
4566
  });
4511
- Ka(y, !0);
4512
- let k = e.resolvedAt != null, A = we(() => e.comments.filter((e) => !e.deleted), [e.comments]);
4513
- R(() => {
4567
+ $a(y, !0);
4568
+ let k = e.resolvedAt != null, A = Ae(() => e.comments.filter((e) => !e.deleted), [e.comments]);
4569
+ z(() => {
4514
4570
  if (C.kind === "none" || C.kind === "editing") return;
4515
4571
  function e(e) {
4516
4572
  let t = S.current;
4517
4573
  t && !e.composedPath().includes(t) && w({ type: "dismiss" });
4518
4574
  }
4519
4575
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
4520
- }, [C.kind, w]), R(() => {
4576
+ }, [C.kind, w]), z(() => {
4521
4577
  if (C.kind !== "editing") return;
4522
4578
  let t = e.comments.find((e) => e._id === C.commentId);
4523
4579
  (!t || t.deleted) && w({ type: "dismiss" });
@@ -4526,8 +4582,8 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4526
4582
  C,
4527
4583
  w
4528
4584
  ]);
4529
- let j = z(!0);
4530
- R(() => {
4585
+ let j = B(!0);
4586
+ z(() => {
4531
4587
  let e = b.current;
4532
4588
  if (e) {
4533
4589
  if (j.current) {
@@ -4536,7 +4592,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4536
4592
  }
4537
4593
  e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
4538
4594
  }
4539
- }, [A.length]), R(() => {
4595
+ }, [A.length]), z(() => {
4540
4596
  let e = y.current;
4541
4597
  if (!e) return;
4542
4598
  if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
@@ -4547,15 +4603,15 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4547
4603
  }
4548
4604
  return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
4549
4605
  }, [f]);
4550
- let M = we(() => {
4551
- let t = Ar({
4606
+ let M = Ae(() => {
4607
+ let t = Ir({
4552
4608
  anchorX: e.anchorX,
4553
4609
  anchorY: e.anchorY,
4554
4610
  anchorSelector: e.anchorSelector
4555
4611
  });
4556
4612
  return {
4557
- left: co(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
4558
- top: co(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
4613
+ left: go(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
4614
+ top: go(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
4559
4615
  };
4560
4616
  }, [
4561
4617
  e.anchorX,
@@ -4599,7 +4655,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4599
4655
  class: Q("markup-icon-btn", C.kind === "thread-menu" && "is-open"),
4600
4656
  title: "More options",
4601
4657
  onClick: () => w({ type: "toggle-thread-menu" }),
4602
- children: /* @__PURE__ */ $(za, { size: 16 })
4658
+ children: /* @__PURE__ */ $(Ka, { size: 16 })
4603
4659
  }), C.kind === "thread-menu" ? /* @__PURE__ */ $("div", {
4604
4660
  class: "markup-thread-menu-list",
4605
4661
  children: [/* @__PURE__ */ $("button", {
@@ -4627,14 +4683,14 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4627
4683
  title: "Mark as resolved",
4628
4684
  disabled: s,
4629
4685
  onClick: _,
4630
- children: /* @__PURE__ */ $(Ba, { size: 16 })
4686
+ children: /* @__PURE__ */ $(qa, { size: 16 })
4631
4687
  }) : null,
4632
4688
  /* @__PURE__ */ $("button", {
4633
4689
  type: "button",
4634
4690
  class: "markup-icon-btn",
4635
4691
  title: "Close thread",
4636
4692
  onClick: f,
4637
- children: /* @__PURE__ */ $(Ra, { size: 16 })
4693
+ children: /* @__PURE__ */ $(Ga, { size: 16 })
4638
4694
  })
4639
4695
  ]
4640
4696
  })]
@@ -4661,12 +4717,12 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4661
4717
  /* @__PURE__ */ $("time", {
4662
4718
  class: "markup-comment-time",
4663
4719
  datetime: new Date(t.createdAt).toISOString(),
4664
- title: uo(t.createdAt),
4665
- children: lo(t.createdAt)
4720
+ title: vo(t.createdAt),
4721
+ children: _o(t.createdAt)
4666
4722
  }),
4667
4723
  /* @__PURE__ */ $("div", {
4668
4724
  class: "markup-thread-actions",
4669
- children: [!k && !l ? /* @__PURE__ */ $(ao, {
4725
+ children: [!k && !l ? /* @__PURE__ */ $(po, {
4670
4726
  comment: t,
4671
4727
  pickerOpen: p,
4672
4728
  pickerDirection: _,
@@ -4734,7 +4790,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4734
4790
  direction: a < i ? "up" : "down"
4735
4791
  });
4736
4792
  },
4737
- children: /* @__PURE__ */ $(za, { size: 16 })
4793
+ children: /* @__PURE__ */ $(Ka, { size: 16 })
4738
4794
  }), d ? /* @__PURE__ */ $("div", {
4739
4795
  class: "markup-thread-menu-list",
4740
4796
  children: [o ? /* @__PURE__ */ $("button", {
@@ -4806,7 +4862,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4806
4862
  children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ $("time", {
4807
4863
  class: "markup-comment-edited",
4808
4864
  datetime: new Date(t.editedAt).toISOString(),
4809
- title: uo(t.editedAt),
4865
+ title: vo(t.editedAt),
4810
4866
  children: [" ", "(edited)"]
4811
4867
  })]
4812
4868
  }),
@@ -4819,7 +4875,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4819
4875
  alt: "Screenshot"
4820
4876
  })
4821
4877
  }) : null,
4822
- !l && t.reactions.length > 0 ? /* @__PURE__ */ $(oo, {
4878
+ !l && t.reactions.length > 0 ? /* @__PURE__ */ $(mo, {
4823
4879
  comment: t,
4824
4880
  isResolved: k,
4825
4881
  onToggle: (e) => g(t._id, e)
@@ -4839,7 +4895,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4839
4895
  onClick: (e) => {
4840
4896
  e.stopPropagation(), x.current?.close();
4841
4897
  },
4842
- children: /* @__PURE__ */ $(Ra, { size: 16 })
4898
+ children: /* @__PURE__ */ $(Ga, { size: 16 })
4843
4899
  }), /* @__PURE__ */ $("img", {
4844
4900
  class: "markup-lightbox-img",
4845
4901
  src: e.screenshotUrl,
@@ -4847,7 +4903,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4847
4903
  onClick: (e) => e.stopPropagation()
4848
4904
  })]
4849
4905
  }) : null,
4850
- t == null ? /* @__PURE__ */ $(Ja, {
4906
+ t == null ? /* @__PURE__ */ $(to, {
4851
4907
  isPending: s,
4852
4908
  isConnecting: i,
4853
4909
  isSigningIn: a,
@@ -4869,7 +4925,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4869
4925
  children: "team"
4870
4926
  }) : null
4871
4927
  ]
4872
- }), /* @__PURE__ */ $(Xa, {
4928
+ }), /* @__PURE__ */ $(ro, {
4873
4929
  label: "Reply",
4874
4930
  placeholder: "Write a reply…",
4875
4931
  submitLabel: "Reply",
@@ -4882,7 +4938,7 @@ function io({ thread: e, authorName: t, currentClientId: n, isVerified: r, isIde
4882
4938
  ]
4883
4939
  });
4884
4940
  }
4885
- function ao({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
4941
+ function po({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
4886
4942
  return /* @__PURE__ */ $("div", {
4887
4943
  class: Q("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
4888
4944
  ref: i,
@@ -4892,11 +4948,11 @@ function ao({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
4892
4948
  title: "Add reaction",
4893
4949
  "aria-label": "Add reaction",
4894
4950
  onClick: a,
4895
- children: /* @__PURE__ */ $(Ua, { size: 16 })
4951
+ children: /* @__PURE__ */ $(Xa, { size: 16 })
4896
4952
  }), t ? /* @__PURE__ */ $("div", {
4897
4953
  class: "markup-reaction-picker",
4898
4954
  role: "menu",
4899
- children: no.map((t) => /* @__PURE__ */ $("button", {
4955
+ children: lo.map((t) => /* @__PURE__ */ $("button", {
4900
4956
  type: "button",
4901
4957
  role: "menuitem",
4902
4958
  class: Q("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
@@ -4906,11 +4962,11 @@ function ao({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
4906
4962
  }) : null]
4907
4963
  });
4908
4964
  }
4909
- function oo({ comment: e, isResolved: t, onToggle: n }) {
4965
+ function mo({ comment: e, isResolved: t, onToggle: n }) {
4910
4966
  return /* @__PURE__ */ $("div", {
4911
4967
  class: "markup-reactions",
4912
4968
  children: e.reactions.map((e) => {
4913
- let r = so(e.reactors, e.mine, e.count, e.emoji);
4969
+ let r = ho(e.reactors, e.mine, e.count, e.emoji);
4914
4970
  return /* @__PURE__ */ $("button", {
4915
4971
  type: "button",
4916
4972
  class: Q("markup-reaction-chip", e.mine && "is-mine"),
@@ -4931,14 +4987,14 @@ function oo({ comment: e, isResolved: t, onToggle: n }) {
4931
4987
  })
4932
4988
  });
4933
4989
  }
4934
- function so(e, t, n, r) {
4990
+ function ho(e, t, n, r) {
4935
4991
  let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
4936
4992
  return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
4937
4993
  }
4938
- function co(e, t, n) {
4994
+ function go(e, t, n) {
4939
4995
  return Math.max(t, Math.min(n, e));
4940
4996
  }
4941
- function lo(e) {
4997
+ function _o(e) {
4942
4998
  let t = Date.now() - e, n = Math.floor(t / 1e3);
4943
4999
  if (n < 60) return "just now";
4944
5000
  let r = Math.floor(n / 60);
@@ -4955,7 +5011,7 @@ function lo(e) {
4955
5011
  year: "numeric"
4956
5012
  });
4957
5013
  }
4958
- function uo(e) {
5014
+ function vo(e) {
4959
5015
  return new Date(e).toLocaleDateString([], {
4960
5016
  month: "long",
4961
5017
  day: "numeric",
@@ -4966,7 +5022,7 @@ function uo(e) {
4966
5022
  }
4967
5023
  //#endregion
4968
5024
  //#region src/runtime/ui/app.tsx
4969
- function fo(e) {
5025
+ function yo(e) {
4970
5026
  let t = {
4971
5027
  clientId: `markup_user_${e.identity.id}`,
4972
5028
  name: e.identity.name,
@@ -4991,10 +5047,10 @@ function fo(e) {
4991
5047
  } : {}
4992
5048
  };
4993
5049
  }
4994
- function po() {
5050
+ function bo() {
4995
5051
  return window.location.host + window.location.pathname;
4996
5052
  }
4997
- var mo = ar({
5053
+ var xo = dr({
4998
5054
  visible: {
4999
5055
  "hide-with-toast": () => ({ kind: "hidden-with-toast" }),
5000
5056
  toggle: () => ({ kind: "hidden" })
@@ -5005,26 +5061,26 @@ var mo = ar({
5005
5061
  },
5006
5062
  hidden: { toggle: () => ({ kind: "visible" }) }
5007
5063
  });
5008
- function ho(e) {
5009
- return qr(e), e;
5064
+ function So(e) {
5065
+ return $r(e), e;
5010
5066
  }
5011
- var go = ar({
5067
+ var Co = dr({
5012
5068
  unresolved: {
5013
- "mint-success": (e, t) => ho({
5069
+ "mint-success": (e, t) => So({
5014
5070
  kind: "anon",
5015
5071
  identity: t.identity
5016
5072
  }),
5017
- "signed-in": (e, t) => ho({
5073
+ "signed-in": (e, t) => So({
5018
5074
  kind: "verified",
5019
5075
  identity: t.identity
5020
5076
  })
5021
5077
  },
5022
5078
  anon: {
5023
- "signed-in": (e, t) => ho({
5079
+ "signed-in": (e, t) => So({
5024
5080
  kind: "verified",
5025
5081
  identity: t.identity
5026
5082
  }),
5027
- "author-set": (e, t) => ho({
5083
+ "author-set": (e, t) => So({
5028
5084
  kind: "anon",
5029
5085
  identity: {
5030
5086
  ...e.identity,
@@ -5034,11 +5090,11 @@ var go = ar({
5034
5090
  })
5035
5091
  },
5036
5092
  verified: {
5037
- "signed-in": (e, t) => ho({
5093
+ "signed-in": (e, t) => So({
5038
5094
  kind: "verified",
5039
5095
  identity: t.identity
5040
5096
  }),
5041
- unauthorized: (e) => ho({
5097
+ unauthorized: (e) => So({
5042
5098
  kind: "recovering",
5043
5099
  preserved: {
5044
5100
  name: e.identity.name,
@@ -5047,32 +5103,32 @@ var go = ar({
5047
5103
  })
5048
5104
  },
5049
5105
  recovering: {
5050
- "mint-success": (e, t) => ho({
5106
+ "mint-success": (e, t) => So({
5051
5107
  kind: "anon",
5052
5108
  identity: t.identity
5053
5109
  }),
5054
- "signed-in": (e, t) => ho({
5110
+ "signed-in": (e, t) => So({
5055
5111
  kind: "verified",
5056
5112
  identity: t.identity
5057
5113
  })
5058
5114
  }
5059
5115
  });
5060
- function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "default", screenshots: i }) {
5061
- let [a, o] = L(po), [s, c] = L([]), [l, u] = L(!1), d = we(() => Kr(), []), [f, p] = or(go, d.state), [m, h] = L(null);
5062
- R(() => {
5116
+ function wo({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "default", screenshots: i }) {
5117
+ let [a, o] = R(bo), [s, c] = R([]), [l, u] = R(!1), d = Ae(() => Qr(), []), [f, p] = fr(Co, d.state), [m, h] = R(null);
5118
+ z(() => {
5063
5119
  let n = !1;
5064
- return Ir(e, t).then((e) => {
5120
+ return Hr(e, t).then((e) => {
5065
5121
  n || h(e);
5066
5122
  }), () => {
5067
5123
  n = !0;
5068
5124
  };
5069
5125
  }, [e, t]);
5070
- let [g, _] = L(n), v = z(f);
5071
- v.current = f, Na(f, e, t, (e) => p({
5126
+ let [g, _] = R(n), v = B(f);
5127
+ v.current = f, Ba(f, e, t, (e) => p({
5072
5128
  type: "signed-in",
5073
5129
  identity: e
5074
5130
  }), () => p({ type: "unauthorized" }));
5075
- let y = we(() => Nr({
5131
+ let y = Ae(() => zr({
5076
5132
  apiUrl: e,
5077
5133
  apiKey: t,
5078
5134
  getToken: () => {
@@ -5097,8 +5153,8 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5097
5153
  e,
5098
5154
  t,
5099
5155
  p
5100
- ]), [b, x] = L({ kind: "idle" }), S = cr(), C = cr(), w = cr(), { run: T, reset: E } = S, { run: D } = C, { run: O, reset: k } = w, A = S.isPending, j = S.error ?? C.error ?? w.error, [M, N] = or(mo, { kind: "visible" }), ee = M.kind !== "visible", [te, ne] = L(0), re = z(null), ie = Yr(f), ae = f.kind === "verified", oe = f.kind === "unresolved" || f.kind === "recovering", P = Jr(f);
5101
- R(() => {
5156
+ ]), [b, x] = R({ kind: "idle" }), S = mr(), C = mr(), w = mr(), { run: T, reset: E } = S, { run: D } = C, { run: O, reset: k } = w, A = S.isPending, j = S.error ?? C.error ?? w.error, [M, N] = fr(xo, { kind: "visible" }), ee = M.kind !== "visible", [te, ne] = R(0), re = B(null), ie = ti(f), ae = f.kind === "verified", oe = f.kind === "unresolved" || f.kind === "recovering", P = ei(f);
5157
+ z(() => {
5102
5158
  if (f.kind !== "unresolved" && f.kind !== "recovering") return;
5103
5159
  let e = f.kind === "recovering" ? f.preserved : d.preserved, t = !1, n = null, r = 1e3;
5104
5160
  function i() {
@@ -5125,16 +5181,16 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5125
5181
  p,
5126
5182
  d
5127
5183
  ]);
5128
- let se = ka(y), [ce, le] = L(null);
5129
- R(() => {
5130
- let t = new ir(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
5184
+ let se = Ia(y), [ce, le] = R(null);
5185
+ z(() => {
5186
+ let t = new ur(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
5131
5187
  return le(t), () => {
5132
5188
  t.close(), le((e) => e === t ? null : e);
5133
5189
  };
5134
5190
  }, [e]);
5135
- let ue = z(!1);
5136
- R(() => {
5137
- if (!(!ce || !se)) return E(), k(), ce.onUpdate(Jt("widget/queries:subscribeThreadsForRoute"), {
5191
+ let ue = B(!1);
5192
+ z(() => {
5193
+ if (!(!ce || !se)) return E(), k(), ce.onUpdate(en("widget/queries:subscribeThreadsForRoute"), {
5138
5194
  subscriptionToken: se,
5139
5195
  route: a,
5140
5196
  viewerClientId: P
@@ -5148,7 +5204,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5148
5204
  P,
5149
5205
  E,
5150
5206
  k
5151
- ]), R(() => {
5207
+ ]), z(() => {
5152
5208
  if (ue.current || !l) return;
5153
5209
  let e = window.location.hash.match(/^#markup-thread=(.+)$/);
5154
5210
  if (e) {
@@ -5159,16 +5215,16 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5159
5215
  }), history.replaceState(null, "", window.location.pathname + window.location.search);
5160
5216
  }
5161
5217
  ue.current = !0;
5162
- }, [s, l]), R(() => Hr(() => o(po())), []), R(() => {
5218
+ }, [s, l]), z(() => Jr(() => o(bo())), []), z(() => {
5163
5219
  function e(e) {
5164
5220
  e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), N({ type: "toggle" })));
5165
5221
  }
5166
5222
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
5167
- }, [N]), R(() => {
5223
+ }, [N]), z(() => {
5168
5224
  if (M.kind !== "hidden-with-toast") return;
5169
5225
  let e = window.setTimeout(() => N({ type: "dismiss-toast" }), 5e3);
5170
5226
  return () => window.clearTimeout(e);
5171
- }, [M.kind, N]), R(() => {
5227
+ }, [M.kind, N]), z(() => {
5172
5228
  let e = null;
5173
5229
  function t() {
5174
5230
  e ??= requestAnimationFrame(() => {
@@ -5181,12 +5237,12 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5181
5237
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
5182
5238
  };
5183
5239
  }, []);
5184
- let de = B(() => {
5240
+ let de = V(() => {
5185
5241
  E(), k(), x({ kind: "placing" });
5186
- }, [E, k]), F = B(() => {
5242
+ }, [E, k]), fe = V(() => {
5187
5243
  x({ kind: "idle" }), E(), k();
5188
- }, [E, k]), fe = z(0), pe = B((e, t, n) => {
5189
- let r = t + window.scrollX, a = n + window.scrollY, o = ++fe.current;
5244
+ }, [E, k]), pe = B(0), me = V((e, t, n) => {
5245
+ let r = t + window.scrollX, a = n + window.scrollY, o = ++pe.current;
5190
5246
  if (i?.enabled === !1) {
5191
5247
  x({
5192
5248
  kind: "composing-new",
@@ -5216,7 +5272,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5216
5272
  strictScrub: i?.strictScrub,
5217
5273
  redactSelector: i?.redactSelector
5218
5274
  };
5219
- Sa(s, {
5275
+ ka(s, {
5220
5276
  x: t,
5221
5277
  y: n
5222
5278
  }, c).then((e) => {
@@ -5228,15 +5284,15 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5228
5284
  screenshotRedactedSelectors: e?.redactedSelectors ?? []
5229
5285
  });
5230
5286
  });
5231
- }, [i]), me = B((e, t) => {
5287
+ }, [i]), he = V((e, t) => {
5232
5288
  p({
5233
5289
  type: "author-set",
5234
5290
  name: e,
5235
5291
  email: t
5236
5292
  });
5237
- }, [p]), he = C.isPending, I = B(async () => {
5293
+ }, [p]), ge = C.isPending, _e = V(async () => {
5238
5294
  await D(async () => {
5239
- let n = fo(await Zr({
5295
+ let n = yo(await ri({
5240
5296
  apiUrl: e,
5241
5297
  apiKey: t,
5242
5298
  useCookies: m === !0
@@ -5253,9 +5309,9 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5253
5309
  m,
5254
5310
  D,
5255
5311
  p
5256
- ]), ge = B(async (e, t) => {
5312
+ ]), ve = V(async (e, t) => {
5257
5313
  if (b.kind !== "composing-new") return;
5258
- let n = Xr(f);
5314
+ let n = ni(f);
5259
5315
  n && await T(async () => {
5260
5316
  let r;
5261
5317
  if (t && b.screenshot) {
@@ -5295,7 +5351,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5295
5351
  b,
5296
5352
  a,
5297
5353
  T
5298
- ]), _e = B(async () => {
5354
+ ]), F = V(async () => {
5299
5355
  if (b.kind !== "thread") return;
5300
5356
  let e = b.threadId;
5301
5357
  await T(async () => {
@@ -5305,7 +5361,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5305
5361
  y,
5306
5362
  b,
5307
5363
  T
5308
- ]), ve = B(async () => {
5364
+ ]), ye = V(async () => {
5309
5365
  if (b.kind !== "thread") return;
5310
5366
  let e = b.threadId;
5311
5367
  await T(async () => {
@@ -5316,9 +5372,9 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5316
5372
  b,
5317
5373
  P,
5318
5374
  T
5319
- ]), ye = B(async (e) => {
5375
+ ]), be = V(async (e) => {
5320
5376
  if (b.kind !== "thread") return;
5321
- let t = Xr(f);
5377
+ let t = ni(f);
5322
5378
  if (!t) return;
5323
5379
  let n = b.threadId;
5324
5380
  await T(async () => {
@@ -5334,7 +5390,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5334
5390
  f,
5335
5391
  b,
5336
5392
  T
5337
- ]), be = B(async (e, t) => {
5393
+ ]), xe = V(async (e, t) => {
5338
5394
  if (b.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
5339
5395
  let n = b.threadId;
5340
5396
  await T(async () => {
@@ -5346,7 +5402,7 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5346
5402
  f,
5347
5403
  b,
5348
5404
  T
5349
- ]), xe = B(async (e) => {
5405
+ ]), Se = V(async (e) => {
5350
5406
  if (b.kind !== "thread" || f.kind !== "anon" && f.kind !== "verified") return;
5351
5407
  let t = b.threadId;
5352
5408
  await T(async () => {
@@ -5358,9 +5414,9 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5358
5414
  f,
5359
5415
  b,
5360
5416
  T
5361
- ]), Se = B(async (e, t) => {
5417
+ ]), I = V(async (e, t) => {
5362
5418
  if (b.kind !== "thread") return;
5363
- let n = Xr(f);
5419
+ let n = ni(f);
5364
5420
  if (!n) return;
5365
5421
  let r = b.threadId;
5366
5422
  await O(async () => {
@@ -5375,18 +5431,18 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5375
5431
  f,
5376
5432
  b,
5377
5433
  O
5378
- ]), Ce = b.kind === "thread" ? s.find((e) => e._id === b.threadId) ?? null : null, Te = ae || P != null && P === Ce?.authorClientId, Ee = we(() => s.map((e) => ({
5434
+ ]), L = b.kind === "thread" ? s.find((e) => e._id === b.threadId) ?? null : null, Ce = ae || P != null && P === L?.authorClientId, we = Ae(() => s.map((e) => ({
5379
5435
  thread: e,
5380
- point: Ar({
5436
+ point: Ir({
5381
5437
  anchorX: e.anchorX,
5382
5438
  anchorY: e.anchorY,
5383
5439
  anchorSelector: e.anchorSelector,
5384
5440
  anchorOffsetX: e.anchorOffsetX,
5385
5441
  anchorOffsetY: e.anchorOffsetY
5386
5442
  })
5387
- })), [s, te]), De = Ee.some((e) => !e.point.resolved);
5388
- return R(() => {
5389
- if (!De) return;
5443
+ })), [s, te]), Te = we.some((e) => !e.point.resolved);
5444
+ return z(() => {
5445
+ if (!Te) return;
5390
5446
  let e = null;
5391
5447
  function t() {
5392
5448
  e ??= requestAnimationFrame(() => {
@@ -5400,21 +5456,21 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5400
5456
  }), () => {
5401
5457
  n.disconnect(), e != null && cancelAnimationFrame(e);
5402
5458
  };
5403
- }, [De]), R(() => {
5404
- b.kind === "thread" && Ce == null && F();
5459
+ }, [Te]), z(() => {
5460
+ b.kind === "thread" && L == null && fe();
5405
5461
  }, [
5406
5462
  b,
5407
- Ce,
5408
- F
5463
+ L,
5464
+ fe
5409
5465
  ]), /* @__PURE__ */ $("div", {
5410
5466
  class: "markup-root",
5411
5467
  ref: re,
5412
5468
  children: [
5413
5469
  b.kind === "placing" ? null : /* @__PURE__ */ $("div", {
5414
5470
  class: "markup-pins-layer",
5415
- children: [ee ? null : Ee.map(({ thread: e, point: t }) => {
5471
+ children: [ee ? null : we.map(({ thread: e, point: t }) => {
5416
5472
  let n = b.kind === "thread" && b.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
5417
- return /* @__PURE__ */ $($a, {
5473
+ return /* @__PURE__ */ $(oo, {
5418
5474
  pageX: t.pageX,
5419
5475
  pageY: t.pageY,
5420
5476
  count: r,
@@ -5425,67 +5481,67 @@ function _o({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
5425
5481
  threadId: e._id
5426
5482
  })
5427
5483
  }, e._id);
5428
- }), b.kind === "composing-new" ? /* @__PURE__ */ $(eo, {
5484
+ }), b.kind === "composing-new" ? /* @__PURE__ */ $(so, {
5429
5485
  pageX: b.pageX,
5430
5486
  pageY: b.pageY
5431
5487
  }) : null]
5432
5488
  }),
5433
- b.kind === "placing" ? /* @__PURE__ */ $(to, {
5434
- onPlace: pe,
5435
- onCancel: F
5489
+ b.kind === "placing" ? /* @__PURE__ */ $(co, {
5490
+ onPlace: me,
5491
+ onCancel: fe
5436
5492
  }) : null,
5437
- b.kind === "thread" && Ce ? /* @__PURE__ */ $(io, {
5438
- thread: Ce,
5493
+ b.kind === "thread" && L ? /* @__PURE__ */ $(fo, {
5494
+ thread: L,
5439
5495
  authorName: ie,
5440
5496
  currentClientId: P ?? null,
5441
5497
  isVerified: ae,
5442
5498
  isIdentityResolving: oe,
5443
- isSigningIn: he,
5444
- canDelete: Te,
5499
+ isSigningIn: ge,
5500
+ canDelete: Ce,
5445
5501
  isPending: A,
5446
5502
  error: j,
5447
5503
  isHidden: ee,
5448
- onAuthor: me,
5449
- onSignIn: I,
5450
- onClose: F,
5451
- onReply: ye,
5452
- onEditComment: be,
5453
- onDeleteComment: xe,
5454
- onToggleReaction: Se,
5455
- onDelete: _e,
5456
- onResolve: ve
5457
- }, Ce._id) : null,
5458
- b.kind === "composing-new" ? /* @__PURE__ */ $(Za, {
5504
+ onAuthor: he,
5505
+ onSignIn: _e,
5506
+ onClose: fe,
5507
+ onReply: be,
5508
+ onEditComment: xe,
5509
+ onDeleteComment: Se,
5510
+ onToggleReaction: I,
5511
+ onDelete: F,
5512
+ onResolve: ye
5513
+ }, L._id) : null,
5514
+ b.kind === "composing-new" ? /* @__PURE__ */ $(io, {
5459
5515
  pageX: b.pageX,
5460
5516
  pageY: b.pageY,
5461
5517
  authorName: ie,
5462
5518
  isVerified: ae,
5463
5519
  isIdentityResolving: oe,
5464
- isSigningIn: he,
5520
+ isSigningIn: ge,
5465
5521
  isPending: A,
5466
5522
  error: j,
5467
5523
  screenshot: b.screenshot,
5468
5524
  isScreenshotCapturing: b.isScreenshotCapturing,
5469
5525
  screenshotRedactedCount: b.screenshotRedactedCount,
5470
5526
  screenshotRedactedSelectors: b.screenshotRedactedSelectors,
5471
- onAuthor: me,
5472
- onSignIn: I,
5473
- onSubmit: ge,
5474
- onClose: F
5527
+ onAuthor: he,
5528
+ onSignIn: _e,
5529
+ onSubmit: ve,
5530
+ onClose: fe
5475
5531
  }) : null,
5476
- !ee || b.kind === "placing" || b.kind === "composing-new" ? /* @__PURE__ */ $(Wa, {
5532
+ !ee || b.kind === "placing" || b.kind === "composing-new" ? /* @__PURE__ */ $(Za, {
5477
5533
  isActive: b.kind === "placing",
5478
- onToggle: () => b.kind === "placing" ? F() : de(),
5534
+ onToggle: () => b.kind === "placing" ? fe() : de(),
5479
5535
  onHide: () => N({ type: "hide-with-toast" }),
5480
5536
  position: g,
5481
5537
  onPositionChange: _,
5482
5538
  variant: r
5483
5539
  }) : null,
5484
- M.kind === "hidden-with-toast" ? /* @__PURE__ */ $(vo, { position: g }) : null
5540
+ M.kind === "hidden-with-toast" ? /* @__PURE__ */ $(To, { position: g }) : null
5485
5541
  ]
5486
5542
  });
5487
5543
  }
5488
- function vo({ position: e }) {
5544
+ function To({ position: e }) {
5489
5545
  let t = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘" : "Ctrl";
5490
5546
  return /* @__PURE__ */ $("div", {
5491
5547
  class: Q("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
@@ -5507,7 +5563,7 @@ function vo({ position: e }) {
5507
5563
  }
5508
5564
  //#endregion
5509
5565
  //#region src/runtime/mount.tsx
5510
- function yo(e, t) {
5566
+ function Eo(e, t) {
5511
5567
  e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
5512
5568
  let n = t.theme ?? "auto";
5513
5569
  n !== "auto" && (e.dataset.theme = n);
@@ -5515,33 +5571,39 @@ function yo(e, t) {
5515
5571
  i.textContent = ue, r.appendChild(i);
5516
5572
  let a = document.createElement("div");
5517
5573
  a.className = "markup-shadow-root", r.appendChild(a);
5518
- let { theme: o, ...s } = t;
5519
- return le(/* @__PURE__ */ $(_o, { ...s }), a), () => le(null, a);
5574
+ let o = {
5575
+ apiUrl: t.apiUrl,
5576
+ apiKey: t.apiKey
5577
+ }, { theme: s, ...c } = t;
5578
+ return le(/* @__PURE__ */ $(de, {
5579
+ onError: (e) => _e(o, e, { context: "render" }),
5580
+ children: /* @__PURE__ */ $(wo, { ...c })
5581
+ }), a), () => le(null, a);
5520
5582
  }
5521
5583
  //#endregion
5522
5584
  //#region src/widget.ts
5523
- var bo = null, xo = null, So = null;
5524
- function Co(e) {
5585
+ var Do = null, Oo = null, ko = null;
5586
+ function Ao(e) {
5525
5587
  if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
5526
- wo();
5588
+ jo();
5527
5589
  let t = () => {
5528
- if (So = null, !document.body) return;
5590
+ if (ko = null, !document.body) return;
5529
5591
  let t = document.createElement("div");
5530
- t.id = "markup-widget", document.body.appendChild(t), xo = t, bo = yo(t, e);
5592
+ t.id = "markup-widget", document.body.appendChild(t), Oo = t, Do = Eo(t, e);
5531
5593
  };
5532
5594
  if (document.readyState === "loading" || !document.body) {
5533
5595
  let e = () => t();
5534
- So = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
5596
+ ko = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
5535
5597
  } else t();
5536
- return wo;
5598
+ return jo;
5537
5599
  }
5538
- function wo() {
5539
- So &&= (So(), null), bo &&= (bo(), null), xo?.parentNode && xo.parentNode.removeChild(xo), xo = null;
5600
+ function jo() {
5601
+ ko &&= (ko(), null), Do &&= (Do(), null), Oo?.parentNode && Oo.parentNode.removeChild(Oo), Oo = null;
5540
5602
  }
5541
5603
  if (typeof document < "u") {
5542
5604
  let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
5543
5605
  if (t && n) {
5544
- let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => Co({
5606
+ let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => Ao({
5545
5607
  apiUrl: t,
5546
5608
  apiKey: n,
5547
5609
  position: r,
@@ -5552,6 +5614,6 @@ if (typeof document < "u") {
5552
5614
  }
5553
5615
  }
5554
5616
  //#endregion
5555
- export { wo as destroy, Co as init };
5617
+ export { jo as destroy, Ao as init };
5556
5618
 
5557
5619
  //# sourceMappingURL=widget.js.map