zt-react-milkdown 0.1.21 → 0.1.22

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/index.mjs CHANGED
@@ -48764,7 +48764,39 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48764
48764
  }, SW = (e) => {
48765
48765
  let t = e.trim().toLowerCase();
48766
48766
  return t ? t.startsWith("canvas-") ? Object.entries(bW).find(([e]) => t.includes(e))?.[1] ?? t : t : yW;
48767
- }, CW = (e) => xW[SW(e)] === !0, wW = "code_block", TW = 1200, EW = "html", DW = "ZT_MD_CODE_BLOCK_PREVIEW_LAYOUT", OW = [
48767
+ }, CW = (e) => (t) => {
48768
+ let n = e(t);
48769
+ return {
48770
+ ...n,
48771
+ attrs: {
48772
+ ...n.attrs,
48773
+ language: {
48774
+ default: yW,
48775
+ validate: "string"
48776
+ }
48777
+ },
48778
+ parseMarkdown: {
48779
+ ...n.parseMarkdown,
48780
+ runner: (e, t, r) => {
48781
+ let i = {
48782
+ ...t,
48783
+ lang: SW(String(t.lang ?? ""))
48784
+ };
48785
+ n.parseMarkdown.runner(e, i, r);
48786
+ }
48787
+ },
48788
+ toMarkdown: {
48789
+ ...n.toMarkdown,
48790
+ runner: (e, t) => {
48791
+ let n = SW(String(t.attrs.language ?? ""));
48792
+ e.addNode("code", void 0, t.content.firstChild?.text || "", { lang: n });
48793
+ }
48794
+ }
48795
+ };
48796
+ }, wW = (e) => {
48797
+ let t = e.get(Ly.key);
48798
+ e.set(Ly.key, CW(t));
48799
+ }, TW = (e) => xW[SW(e)] === !0, EW = "code_block", DW = 1200, OW = "html", kW = "ZT_MD_CODE_BLOCK_PREVIEW_LAYOUT", AW = [
48768
48800
  "default-src 'none'",
48769
48801
  "style-src 'unsafe-inline'",
48770
48802
  "img-src data: blob:",
@@ -48775,16 +48807,16 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48775
48807
  "object-src 'none'",
48776
48808
  "form-action 'none'",
48777
48809
  "base-uri 'none'"
48778
- ], kW = (e) => p(i(e, {
48810
+ ], jW = (e) => p(i(e, {
48779
48811
  size: 14,
48780
48812
  strokeWidth: 2,
48781
48813
  "aria-hidden": "true"
48782
- })), AW = kW(tD), jW = kW(YE), MW = kW(AD), NW = kW(rD), PW = kW($E), FW = (e, t) => `<!doctype html>
48814
+ })), MW = jW(tD), NW = jW(YE), PW = jW(AD), FW = jW(rD), IW = jW($E), LW = (e, t) => `<!doctype html>
48783
48815
  <html>
48784
48816
  <head>
48785
48817
  <meta charset="UTF-8" />
48786
48818
  <meta name="viewport" content="width=device-width, initial-scale=1" />
48787
- <meta http-equiv="Content-Security-Policy" content="${[...OW, ...t ? ["script-src 'unsafe-inline'"] : []].join("; ")}" />
48819
+ <meta http-equiv="Content-Security-Policy" content="${[...AW, ...t ? ["script-src 'unsafe-inline'"] : []].join("; ")}" />
48788
48820
  <style>
48789
48821
  *, *::before, *::after { box-sizing: border-box; }
48790
48822
  html, body { min-height: 100%; margin: 0; }
@@ -48793,7 +48825,7 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48793
48825
  </style>
48794
48826
  </head>
48795
48827
  <body>${e}</body>
48796
- </html>`, IW = (e) => typeof e == "function" ? e() : null, LW = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, RW = class {
48828
+ </html>`, RW = (e) => typeof e == "function" ? e() : null, zW = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, BW = class {
48797
48829
  syncLanguageAttribute(e) {
48798
48830
  let t = typeof e.attrs.language == "string" ? e.attrs.language.trim() : "";
48799
48831
  if (!t) {
@@ -48804,25 +48836,25 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48804
48836
  }
48805
48837
  constructor(e, t, n, r) {
48806
48838
  this.previewFrame = null, this.isPreviewAvailable = !1, this.isPreviewMode = !1, this.renderedPreviewKey = null, this.copyFeedbackTimer = null, this.handlePreviewClick = (e) => {
48807
- e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(DW, !0)));
48839
+ e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(kW, !0)));
48808
48840
  }, this.handlePreviewKeyDown = (e) => {
48809
48841
  if (e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
48810
- let t = IW(this.getPos);
48842
+ let t = RW(this.getPos);
48811
48843
  t !== null && IE(this.view, t, this.node, e.key) && e.preventDefault();
48812
48844
  }, this.handleCopyClick = (e) => {
48813
- if (e.preventDefault(), e.stopPropagation(), !LW(this.view)) return;
48845
+ if (e.preventDefault(), e.stopPropagation(), !zW(this.view)) return;
48814
48846
  let t = this.node.textContent;
48815
48847
  (typeof navigator < "u" && navigator.clipboard?.writeText ? navigator.clipboard.writeText(t) : Promise.resolve()).then(() => {
48816
- this.copyButton.innerHTML = jW, this.copyButton.dataset.copied = "true", this.copyFeedbackTimer !== null && clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = setTimeout(() => {
48817
- this.copyButton.innerHTML = AW, delete this.copyButton.dataset.copied, this.copyFeedbackTimer = null;
48818
- }, TW);
48848
+ this.copyButton.innerHTML = NW, this.copyButton.dataset.copied = "true", this.copyFeedbackTimer !== null && clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = setTimeout(() => {
48849
+ this.copyButton.innerHTML = MW, delete this.copyButton.dataset.copied, this.copyFeedbackTimer = null;
48850
+ }, DW);
48819
48851
  }).catch(() => {});
48820
48852
  }, this.handleDeleteClick = (e) => {
48821
- e.preventDefault(), e.stopPropagation(), LW(this.view) && this.deleteCurrentCodeBlock();
48822
- }, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type = wW, this.contentDOM = document.createElement("pre"), this.previewContainer = document.createElement("div"), this.previewContainer.className = "zt-md-code-block-preview", this.previewContainer.contentEditable = "false", this.previewContainer.hidden = !0, this.previewContainer.tabIndex = -1, this.previewContainer.setAttribute("role", "region"), this.previewContainer.setAttribute("aria-label", r.codeBlockPreviewAriaLabel), this.actionsContainer = document.createElement("span"), this.actionsContainer.className = "zt-md-code-block-actions", this.actionsContainer.contentEditable = "false", this.previewButton = document.createElement("button"), this.previewButton.type = "button", this.previewButton.className = "zt-md-code-block-action-button", this.previewButton.hidden = !0, this.previewButton.innerHTML = NW, this.copyButton = document.createElement("button"), this.copyButton.type = "button", this.copyButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action", this.copyButton.setAttribute("aria-label", r.codeBlockCopyAriaLabel), this.copyButton.innerHTML = AW, this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action zt-md-code-block-action-button-danger", this.deleteButton.setAttribute("aria-label", r.codeBlockDeleteAriaLabel), this.deleteButton.innerHTML = MW, this.actionsContainer.append(this.previewButton, this.copyButton, this.deleteButton), this.dom.append(this.contentDOM, this.previewContainer, this.actionsContainer), this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), this.previewButton.addEventListener("click", this.handlePreviewClick), this.copyButton.addEventListener("click", this.handleCopyClick), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.previewContainer.addEventListener("keydown", this.handlePreviewKeyDown);
48853
+ e.preventDefault(), e.stopPropagation(), zW(this.view) && this.deleteCurrentCodeBlock();
48854
+ }, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type = EW, this.contentDOM = document.createElement("pre"), this.previewContainer = document.createElement("div"), this.previewContainer.className = "zt-md-code-block-preview", this.previewContainer.contentEditable = "false", this.previewContainer.hidden = !0, this.previewContainer.tabIndex = -1, this.previewContainer.setAttribute("role", "region"), this.previewContainer.setAttribute("aria-label", r.codeBlockPreviewAriaLabel), this.actionsContainer = document.createElement("span"), this.actionsContainer.className = "zt-md-code-block-actions", this.actionsContainer.contentEditable = "false", this.previewButton = document.createElement("button"), this.previewButton.type = "button", this.previewButton.className = "zt-md-code-block-action-button", this.previewButton.hidden = !0, this.previewButton.innerHTML = FW, this.copyButton = document.createElement("button"), this.copyButton.type = "button", this.copyButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action", this.copyButton.setAttribute("aria-label", r.codeBlockCopyAriaLabel), this.copyButton.innerHTML = MW, this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action zt-md-code-block-action-button-danger", this.deleteButton.setAttribute("aria-label", r.codeBlockDeleteAriaLabel), this.deleteButton.innerHTML = PW, this.actionsContainer.append(this.previewButton, this.copyButton, this.deleteButton), this.dom.append(this.contentDOM, this.previewContainer, this.actionsContainer), this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), this.previewButton.addEventListener("click", this.handlePreviewClick), this.copyButton.addEventListener("click", this.handleCopyClick), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.previewContainer.addEventListener("keydown", this.handlePreviewKeyDown);
48823
48855
  }
48824
48856
  deleteCurrentCodeBlock() {
48825
- let e = IW(this.getPos);
48857
+ let e = RW(this.getPos);
48826
48858
  if (e === null) return;
48827
48859
  let t = this.view.state.tr.delete(e, e + this.node.nodeSize), n = Math.min(e, t.doc.content.size);
48828
48860
  t.setSelection(A.near(t.doc.resolve(n), -1)).scrollIntoView(), this.view.dispatch(t), requestAnimationFrame(() => {
@@ -48830,36 +48862,36 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48830
48862
  });
48831
48863
  }
48832
48864
  updateEditableState() {
48833
- this.dom.dataset.editable = LW(this.view) ? "true" : "false";
48865
+ this.dom.dataset.editable = zW(this.view) ? "true" : "false";
48834
48866
  }
48835
48867
  syncPreviewAvailability(e) {
48836
48868
  let t = typeof e.attrs.language == "string" ? e.attrs.language : "";
48837
- this.isPreviewAvailable = CW(t), this.isPreviewAvailable || (this.isPreviewMode = !1), this.previewButton.hidden = !this.isPreviewAvailable, this.syncPreviewState(), this.syncActionsVisibility();
48869
+ this.isPreviewAvailable = TW(t), this.isPreviewAvailable || (this.isPreviewMode = !1), this.previewButton.hidden = !this.isPreviewAvailable, this.syncPreviewState(), this.syncActionsVisibility();
48838
48870
  }
48839
48871
  syncPreviewState() {
48840
48872
  let e = this.isPreviewAvailable && this.isPreviewMode, t = e ? this.messages.codeBlockSourceAriaLabel : this.messages.codeBlockPreviewAriaLabel;
48841
- if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ? PW : NW, e) {
48873
+ if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ? IW : FW, e) {
48842
48874
  this.contentDOM.setAttribute("aria-hidden", "true"), this.renderPreview();
48843
48875
  return;
48844
48876
  }
48845
48877
  this.contentDOM.removeAttribute("aria-hidden"), this.clearPreview();
48846
48878
  }
48847
48879
  syncActionsVisibility() {
48848
- let e = LW(this.view) || this.isPreviewAvailable;
48880
+ let e = zW(this.view) || this.isPreviewAvailable;
48849
48881
  this.actionsContainer.dataset.visible = e ? "true" : "false";
48850
48882
  }
48851
48883
  renderPreview() {
48852
- let e = this.node.textContent, t = SW(String(this.node.attrs.language ?? "")), n = t === EW, r = `${t}\u0000${e}`;
48884
+ let e = this.node.textContent, t = SW(String(this.node.attrs.language ?? "")), n = t === OW, r = `${t}\u0000${e}`;
48853
48885
  if (this.renderedPreviewKey === r) return;
48854
48886
  this.renderedPreviewKey = r;
48855
48887
  let i = document.createElement("iframe");
48856
- i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc = FW(e, n), this.previewContainer.replaceChildren(i), this.previewFrame = i;
48888
+ i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc = LW(e, n), this.previewContainer.replaceChildren(i), this.previewFrame = i;
48857
48889
  }
48858
48890
  clearPreview() {
48859
48891
  this.renderedPreviewKey = null, this.previewFrame?.remove(), this.previewFrame = null;
48860
48892
  }
48861
48893
  update(e) {
48862
- return e.type.name === wW ? (this.node = e, this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), !0) : !1;
48894
+ return e.type.name === EW ? (this.node = e, this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), !0) : !1;
48863
48895
  }
48864
48896
  stopEvent(e) {
48865
48897
  let t = e.target;
@@ -48869,14 +48901,14 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
48869
48901
  return e.type === "selection" ? !1 : e.type === "attributes" && (e.target === this.dom && e.attributeName === "data-view-mode" || e.target === this.contentDOM && e.attributeName === "aria-hidden") ? !0 : this.actionsContainer.contains(e.target) || this.previewContainer.contains(e.target);
48870
48902
  }
48871
48903
  destroy() {
48872
- this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML = AW, delete this.copyButton.dataset.copied, this.clearPreview();
48904
+ this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML = MW, delete this.copyButton.dataset.copied, this.clearPreview();
48873
48905
  }
48874
- }, zW = (e = IO()) => (t, n, r) => new RW(t, n, typeof r == "function" ? () => {
48906
+ }, VW = (e = IO()) => (t, n, r) => new BW(t, n, typeof r == "function" ? () => {
48875
48907
  let e = r();
48876
48908
  return typeof e == "number" ? e : 0;
48877
48909
  } : !1, e);
48878
- BW.displayName = "clike", BW.aliases = [];
48879
- function BW(e) {
48910
+ HW.displayName = "clike", HW.aliases = [];
48911
+ function HW(e) {
48880
48912
  e.languages.clike = {
48881
48913
  comment: [{
48882
48914
  pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
@@ -48904,9 +48936,9 @@ function BW(e) {
48904
48936
  punctuation: /[{}[\];(),.:]/
48905
48937
  };
48906
48938
  }
48907
- VW.displayName = "c", VW.aliases = [];
48908
- function VW(e) {
48909
- e.register(BW), e.languages.c = e.languages.extend("clike", {
48939
+ UW.displayName = "c", UW.aliases = [];
48940
+ function UW(e) {
48941
+ e.register(HW), e.languages.c = e.languages.extend("clike", {
48910
48942
  comment: {
48911
48943
  pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
48912
48944
  greedy: !0
@@ -48960,9 +48992,9 @@ function VW(e) {
48960
48992
  }
48961
48993
  } }), e.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete e.languages.c.boolean;
48962
48994
  }
48963
- HW.displayName = "cpp", HW.aliases = [];
48964
- function HW(e) {
48965
- e.register(VW), (function(e) {
48995
+ WW.displayName = "cpp", WW.aliases = [];
48996
+ function WW(e) {
48997
+ e.register(UW), (function(e) {
48966
48998
  var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = "\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(/<keyword>/g, function() {
48967
48999
  return t.source;
48968
49000
  });
@@ -49024,16 +49056,16 @@ function HW(e) {
49024
49056
  } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
49025
49057
  })(e);
49026
49058
  }
49027
- UW.displayName = "arduino", UW.aliases = ["ino"];
49028
- function UW(e) {
49029
- e.register(HW), e.languages.arduino = e.languages.extend("cpp", {
49059
+ GW.displayName = "arduino", GW.aliases = ["ino"];
49060
+ function GW(e) {
49061
+ e.register(WW), e.languages.arduino = e.languages.extend("cpp", {
49030
49062
  keyword: /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,
49031
49063
  constant: /\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,
49032
49064
  builtin: /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/
49033
49065
  }), e.languages.ino = e.languages.arduino;
49034
49066
  }
49035
- WW.displayName = "bash", WW.aliases = ["sh", "shell"];
49036
- function WW(e) {
49067
+ KW.displayName = "bash", KW.aliases = ["sh", "shell"];
49068
+ function KW(e) {
49037
49069
  (function(e) {
49038
49070
  var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
49039
49071
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
@@ -49208,9 +49240,9 @@ function WW(e) {
49208
49240
  e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
49209
49241
  })(e);
49210
49242
  }
49211
- GW.displayName = "csharp", GW.aliases = ["cs", "dotnet"];
49212
- function GW(e) {
49213
- e.register(BW), (function(e) {
49243
+ qW.displayName = "csharp", qW.aliases = ["cs", "dotnet"];
49244
+ function qW(e) {
49245
+ e.register(HW), (function(e) {
49214
49246
  function t(e, t) {
49215
49247
  return e.replace(/<<(\d+)>>/g, function(e, n) {
49216
49248
  return "(?:" + t[+n] + ")";
@@ -49445,7 +49477,7 @@ function GW(e) {
49445
49477
  }), e.languages.dotnet = e.languages.cs = e.languages.csharp;
49446
49478
  })(e);
49447
49479
  }
49448
- KW.displayName = "markup", KW.aliases = [
49480
+ JW.displayName = "markup", JW.aliases = [
49449
49481
  "atom",
49450
49482
  "html",
49451
49483
  "mathml",
@@ -49454,7 +49486,7 @@ KW.displayName = "markup", KW.aliases = [
49454
49486
  "svg",
49455
49487
  "xml"
49456
49488
  ];
49457
- function KW(e) {
49489
+ function JW(e) {
49458
49490
  e.languages.markup = {
49459
49491
  comment: {
49460
49492
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
@@ -49571,8 +49603,8 @@ function KW(e) {
49571
49603
  });
49572
49604
  } }), e.languages.html = e.languages.markup, e.languages.mathml = e.languages.markup, e.languages.svg = e.languages.markup, e.languages.xml = e.languages.extend("markup", {}), e.languages.ssml = e.languages.xml, e.languages.atom = e.languages.xml, e.languages.rss = e.languages.xml;
49573
49605
  }
49574
- qW.displayName = "css", qW.aliases = [];
49575
- function qW(e) {
49606
+ YW.displayName = "css", YW.aliases = [];
49607
+ function YW(e) {
49576
49608
  (function(e) {
49577
49609
  var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
49578
49610
  e.languages.css = {
@@ -49627,8 +49659,8 @@ function qW(e) {
49627
49659
  n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
49628
49660
  })(e);
49629
49661
  }
49630
- JW.displayName = "diff", JW.aliases = [];
49631
- function JW(e) {
49662
+ XW.displayName = "diff", XW.aliases = [];
49663
+ function XW(e) {
49632
49664
  (function(e) {
49633
49665
  e.languages.diff = { coord: [
49634
49666
  /^(?:\*{3}|-{3}|\+{3}).*$/m,
@@ -49662,9 +49694,9 @@ function JW(e) {
49662
49694
  }), Object.defineProperty(e.languages.diff, "PREFIXES", { value: t });
49663
49695
  })(e);
49664
49696
  }
49665
- YW.displayName = "go", YW.aliases = [];
49666
- function YW(e) {
49667
- e.register(BW), e.languages.go = e.languages.extend("clike", {
49697
+ ZW.displayName = "go", ZW.aliases = [];
49698
+ function ZW(e) {
49699
+ e.register(HW), e.languages.go = e.languages.extend("clike", {
49668
49700
  string: {
49669
49701
  pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
49670
49702
  lookbehind: !0,
@@ -49684,8 +49716,8 @@ function YW(e) {
49684
49716
  greedy: !0
49685
49717
  } }), delete e.languages.go["class-name"];
49686
49718
  }
49687
- XW.displayName = "ini", XW.aliases = [];
49688
- function XW(e) {
49719
+ QW.displayName = "ini", QW.aliases = [];
49720
+ function QW(e) {
49689
49721
  e.languages.ini = {
49690
49722
  comment: {
49691
49723
  pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m,
@@ -49720,9 +49752,9 @@ function XW(e) {
49720
49752
  punctuation: /=/
49721
49753
  };
49722
49754
  }
49723
- ZW.displayName = "java", ZW.aliases = [];
49724
- function ZW(e) {
49725
- e.register(BW), (function(e) {
49755
+ $W.displayName = "java", $W.aliases = [];
49756
+ function $W(e) {
49757
+ e.register(HW), (function(e) {
49726
49758
  var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = "(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*", r = {
49727
49759
  pattern: RegExp("(^|[^\\w.])" + n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),
49728
49760
  lookbehind: !0,
@@ -49820,8 +49852,8 @@ function ZW(e) {
49820
49852
  });
49821
49853
  })(e);
49822
49854
  }
49823
- QW.displayName = "regex", QW.aliases = [];
49824
- function QW(e) {
49855
+ eG.displayName = "regex", eG.aliases = [];
49856
+ function eG(e) {
49825
49857
  (function(e) {
49826
49858
  var t = {
49827
49859
  pattern: /\\[\\(){}[\]^$+*?|.]/,
@@ -49900,9 +49932,9 @@ function QW(e) {
49900
49932
  };
49901
49933
  })(e);
49902
49934
  }
49903
- $W.displayName = "javascript", $W.aliases = ["js"];
49904
- function $W(e) {
49905
- e.register(BW), e.languages.javascript = e.languages.extend("clike", {
49935
+ tG.displayName = "javascript", tG.aliases = ["js"];
49936
+ function tG(e) {
49937
+ e.register(HW), e.languages.javascript = e.languages.extend("clike", {
49906
49938
  "class-name": [e.languages.clike["class-name"], {
49907
49939
  pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
49908
49940
  lookbehind: !0
@@ -50003,8 +50035,8 @@ function $W(e) {
50003
50035
  alias: "property"
50004
50036
  } }), e.languages.markup && (e.languages.markup.tag.addInlined("script", "javascript"), e.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), e.languages.js = e.languages.javascript;
50005
50037
  }
50006
- eG.displayName = "json", eG.aliases = ["webmanifest"];
50007
- function eG(e) {
50038
+ nG.displayName = "json", nG.aliases = ["webmanifest"];
50039
+ function nG(e) {
50008
50040
  e.languages.json = {
50009
50041
  property: {
50010
50042
  pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
@@ -50030,9 +50062,9 @@ function eG(e) {
50030
50062
  }
50031
50063
  }, e.languages.webmanifest = e.languages.json;
50032
50064
  }
50033
- tG.displayName = "kotlin", tG.aliases = ["kt", "kts"];
50034
- function tG(e) {
50035
- e.register(BW), (function(e) {
50065
+ rG.displayName = "kotlin", rG.aliases = ["kt", "kts"];
50066
+ function rG(e) {
50067
+ e.register(HW), (function(e) {
50036
50068
  e.languages.kotlin = e.languages.extend("clike", {
50037
50069
  keyword: {
50038
50070
  pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
@@ -50095,9 +50127,9 @@ function tG(e) {
50095
50127
  } }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
50096
50128
  })(e);
50097
50129
  }
50098
- nG.displayName = "less", nG.aliases = [];
50099
- function nG(e) {
50100
- e.register(qW), e.languages.less = e.languages.extend("css", {
50130
+ iG.displayName = "less", iG.aliases = [];
50131
+ function iG(e) {
50132
+ e.register(YW), e.languages.less = e.languages.extend("css", {
50101
50133
  comment: [/\/\*[\s\S]*?\*\//, {
50102
50134
  pattern: /(^|[^\\])\/\/.*/,
50103
50135
  lookbehind: !0
@@ -50124,8 +50156,8 @@ function nG(e) {
50124
50156
  }
50125
50157
  });
50126
50158
  }
50127
- rG.displayName = "lua", rG.aliases = [];
50128
- function rG(e) {
50159
+ aG.displayName = "lua", aG.aliases = [];
50160
+ function aG(e) {
50129
50161
  e.languages.lua = {
50130
50162
  comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
50131
50163
  string: {
@@ -50142,8 +50174,8 @@ function rG(e) {
50142
50174
  punctuation: /[\[\](){},;]|\.+|:+/
50143
50175
  };
50144
50176
  }
50145
- iG.displayName = "makefile", iG.aliases = [];
50146
- function iG(e) {
50177
+ oG.displayName = "makefile", oG.aliases = [];
50178
+ function oG(e) {
50147
50179
  e.languages.makefile = {
50148
50180
  comment: {
50149
50181
  pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
@@ -50172,8 +50204,8 @@ function iG(e) {
50172
50204
  punctuation: /[:;(){}]/
50173
50205
  };
50174
50206
  }
50175
- aG.displayName = "yaml", aG.aliases = ["yml"];
50176
- function aG(e) {
50207
+ sG.displayName = "yaml", sG.aliases = ["yml"];
50208
+ function sG(e) {
50177
50209
  (function(e) {
50178
50210
  var t = /[*&][^\s[\]{},]+/, n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + n.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + n.source + ")?)", i = "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g, function() {
50179
50211
  return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
@@ -50241,9 +50273,9 @@ function aG(e) {
50241
50273
  }, e.languages.yml = e.languages.yaml;
50242
50274
  })(e);
50243
50275
  }
50244
- oG.displayName = "markdown", oG.aliases = ["md"];
50245
- function oG(e) {
50246
- e.register(KW), (function(e) {
50276
+ cG.displayName = "markdown", cG.aliases = ["md"];
50277
+ function cG(e) {
50278
+ e.register(JW), (function(e) {
50247
50279
  var t = "(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))";
50248
50280
  function n(e) {
50249
50281
  return e = e.replace(/<inner>/g, function() {
@@ -50480,9 +50512,9 @@ function oG(e) {
50480
50512
  }), RegExp(e.languages.markup.tag.pattern.source, "gi"), String.fromCodePoint || String.fromCharCode, e.languages.md = e.languages.markdown;
50481
50513
  })(e);
50482
50514
  }
50483
- sG.displayName = "objectivec", sG.aliases = ["objc"];
50484
- function sG(e) {
50485
- e.register(VW), e.languages.objectivec = e.languages.extend("c", {
50515
+ lG.displayName = "objectivec", lG.aliases = ["objc"];
50516
+ function lG(e) {
50517
+ e.register(UW), e.languages.objectivec = e.languages.extend("c", {
50486
50518
  string: {
50487
50519
  pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
50488
50520
  greedy: !0
@@ -50491,8 +50523,8 @@ function sG(e) {
50491
50523
  operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
50492
50524
  }), delete e.languages.objectivec["class-name"], e.languages.objc = e.languages.objectivec;
50493
50525
  }
50494
- cG.displayName = "perl", cG.aliases = [];
50495
- function cG(e) {
50526
+ uG.displayName = "perl", uG.aliases = [];
50527
+ function uG(e) {
50496
50528
  (function(e) {
50497
50529
  var t = "(?:\\((?:[^()\\\\]|\\\\[\\s\\S])*\\)|\\{(?:[^{}\\\\]|\\\\[\\s\\S])*\\}|\\[(?:[^[\\]\\\\]|\\\\[\\s\\S])*\\]|<(?:[^<>\\\\]|\\\\[\\s\\S])*>)";
50498
50530
  e.languages.perl = {
@@ -50573,9 +50605,9 @@ function cG(e) {
50573
50605
  };
50574
50606
  })(e);
50575
50607
  }
50576
- lG.displayName = "markup-templating", lG.aliases = [];
50577
- function lG(e) {
50578
- e.register(KW), (function(e) {
50608
+ dG.displayName = "markup-templating", dG.aliases = [];
50609
+ function dG(e) {
50610
+ e.register(JW), (function(e) {
50579
50611
  function t(e, t) {
50580
50612
  return "___" + e.toUpperCase() + t + "___";
50581
50613
  }
@@ -50613,9 +50645,9 @@ function lG(e) {
50613
50645
  });
50614
50646
  })(e);
50615
50647
  }
50616
- uG.displayName = "php", uG.aliases = [];
50617
- function uG(e) {
50618
- e.register(lG), (function(e) {
50648
+ fG.displayName = "php", fG.aliases = [];
50649
+ function fG(e) {
50650
+ e.register(dG), (function(e) {
50619
50651
  var t = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, n = [
50620
50652
  {
50621
50653
  pattern: /\b(?:false|true)\b/i,
@@ -50891,8 +50923,8 @@ function uG(e) {
50891
50923
  });
50892
50924
  })(e);
50893
50925
  }
50894
- dG.displayName = "python", dG.aliases = ["py"];
50895
- function dG(e) {
50926
+ pG.displayName = "python", pG.aliases = ["py"];
50927
+ function pG(e) {
50896
50928
  e.languages.python = {
50897
50929
  comment: {
50898
50930
  pattern: /(^|[^\\])#.*/,
@@ -50952,8 +50984,8 @@ function dG(e) {
50952
50984
  punctuation: /[{}[\];(),.:]/
50953
50985
  }, e.languages.python["string-interpolation"].inside.interpolation.inside.rest = e.languages.python, e.languages.py = e.languages.python;
50954
50986
  }
50955
- fG.displayName = "r", fG.aliases = [];
50956
- function fG(e) {
50987
+ mG.displayName = "r", mG.aliases = [];
50988
+ function mG(e) {
50957
50989
  e.languages.r = {
50958
50990
  comment: /#.*/,
50959
50991
  string: {
@@ -50972,9 +51004,9 @@ function fG(e) {
50972
51004
  punctuation: /[(){}\[\],;]/
50973
51005
  };
50974
51006
  }
50975
- pG.displayName = "ruby", pG.aliases = ["rb"];
50976
- function pG(e) {
50977
- e.register(BW), (function(e) {
51007
+ hG.displayName = "ruby", hG.aliases = ["rb"];
51008
+ function hG(e) {
51009
+ e.register(HW), (function(e) {
50978
51010
  e.languages.ruby = e.languages.extend("clike", {
50979
51011
  comment: {
50980
51012
  pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
@@ -51129,8 +51161,8 @@ function pG(e) {
51129
51161
  }), e.languages.rb = e.languages.ruby;
51130
51162
  })(e);
51131
51163
  }
51132
- mG.displayName = "rust", mG.aliases = [];
51133
- function mG(e) {
51164
+ gG.displayName = "rust", gG.aliases = [];
51165
+ function gG(e) {
51134
51166
  (function(e) {
51135
51167
  for (var t = "\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/", n = 0; n < 2; n++) t = t.replace(/<self>/g, function() {
51136
51168
  return t;
@@ -51222,9 +51254,9 @@ function mG(e) {
51222
51254
  }, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
51223
51255
  })(e);
51224
51256
  }
51225
- hG.displayName = "sass", hG.aliases = [];
51226
- function hG(e) {
51227
- e.register(qW), (function(e) {
51257
+ _G.displayName = "sass", _G.aliases = [];
51258
+ function _G(e) {
51259
+ e.register(YW), (function(e) {
51228
51260
  e.languages.sass = e.languages.extend("css", { comment: {
51229
51261
  pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,
51230
51262
  lookbehind: !0,
@@ -51269,9 +51301,9 @@ function hG(e) {
51269
51301
  } });
51270
51302
  })(e);
51271
51303
  }
51272
- gG.displayName = "scss", gG.aliases = [];
51273
- function gG(e) {
51274
- e.register(qW), e.languages.scss = e.languages.extend("css", {
51304
+ vG.displayName = "scss", vG.aliases = [];
51305
+ function vG(e) {
51306
+ e.register(YW), e.languages.scss = e.languages.extend("css", {
51275
51307
  comment: {
51276
51308
  pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
51277
51309
  lookbehind: !0
@@ -51323,8 +51355,8 @@ function gG(e) {
51323
51355
  }
51324
51356
  }), e.languages.scss.atrule.inside.rest = e.languages.scss;
51325
51357
  }
51326
- _G.displayName = "sql", _G.aliases = [];
51327
- function _G(e) {
51358
+ yG.displayName = "sql", yG.aliases = [];
51359
+ function yG(e) {
51328
51360
  e.languages.sql = {
51329
51361
  comment: {
51330
51362
  pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
@@ -51353,8 +51385,8 @@ function _G(e) {
51353
51385
  punctuation: /[;[\]()`,.]/
51354
51386
  };
51355
51387
  }
51356
- vG.displayName = "swift", vG.aliases = [];
51357
- function vG(e) {
51388
+ bG.displayName = "swift", bG.aliases = [];
51389
+ function bG(e) {
51358
51390
  e.languages.swift = {
51359
51391
  comment: {
51360
51392
  pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
@@ -51449,9 +51481,9 @@ function vG(e) {
51449
51481
  t.inside.interpolation.inside = e.languages.swift;
51450
51482
  });
51451
51483
  }
51452
- yG.displayName = "typescript", yG.aliases = ["ts"];
51453
- function yG(e) {
51454
- e.register($W), (function(e) {
51484
+ xG.displayName = "typescript", xG.aliases = ["ts"];
51485
+ function xG(e) {
51486
+ e.register(tG), (function(e) {
51455
51487
  e.languages.typescript = e.languages.extend("javascript", {
51456
51488
  "class-name": {
51457
51489
  pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
@@ -51488,8 +51520,8 @@ function yG(e) {
51488
51520
  }), e.languages.ts = e.languages.typescript;
51489
51521
  })(e);
51490
51522
  }
51491
- bG.displayName = "basic", bG.aliases = [];
51492
- function bG(e) {
51523
+ SG.displayName = "basic", SG.aliases = [];
51524
+ function SG(e) {
51493
51525
  e.languages.basic = {
51494
51526
  comment: {
51495
51527
  pattern: /(?:!|REM\b).+/i,
@@ -51506,9 +51538,9 @@ function bG(e) {
51506
51538
  punctuation: /[,;:()]/
51507
51539
  };
51508
51540
  }
51509
- xG.displayName = "vbnet", xG.aliases = [];
51510
- function xG(e) {
51511
- e.register(bG), e.languages.vbnet = e.languages.extend("basic", {
51541
+ CG.displayName = "vbnet", CG.aliases = [];
51542
+ function CG(e) {
51543
+ e.register(SG), e.languages.vbnet = e.languages.extend("basic", {
51512
51544
  comment: [{
51513
51545
  pattern: /(?:!|REM\b).+/i,
51514
51546
  inside: { keyword: /^REM/i }
@@ -51528,117 +51560,117 @@ function xG(e) {
51528
51560
  }
51529
51561
  //#endregion
51530
51562
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js
51531
- var SG = class {
51563
+ var wG = class {
51532
51564
  constructor(e, t, n) {
51533
51565
  this.normal = t, this.property = e, n && (this.space = n);
51534
51566
  }
51535
51567
  };
51536
- SG.prototype.normal = {}, SG.prototype.property = {}, SG.prototype.space = void 0;
51568
+ wG.prototype.normal = {}, wG.prototype.property = {}, wG.prototype.space = void 0;
51537
51569
  //#endregion
51538
51570
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
51539
- function CG(e, t) {
51571
+ function TG(e, t) {
51540
51572
  let n = {}, r = {};
51541
51573
  for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
51542
- return new SG(n, r, t);
51574
+ return new wG(n, r, t);
51543
51575
  }
51544
51576
  //#endregion
51545
51577
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js
51546
- function wG(e) {
51578
+ function EG(e) {
51547
51579
  return e.toLowerCase();
51548
51580
  }
51549
51581
  //#endregion
51550
51582
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js
51551
- var TG = class {
51583
+ var DG = class {
51552
51584
  constructor(e, t) {
51553
51585
  this.attribute = t, this.property = e;
51554
51586
  }
51555
51587
  };
51556
- TG.prototype.attribute = "", TG.prototype.booleanish = !1, TG.prototype.boolean = !1, TG.prototype.commaOrSpaceSeparated = !1, TG.prototype.commaSeparated = !1, TG.prototype.defined = !1, TG.prototype.mustUseProperty = !1, TG.prototype.number = !1, TG.prototype.overloadedBoolean = !1, TG.prototype.property = "", TG.prototype.spaceSeparated = !1, TG.prototype.space = void 0;
51588
+ DG.prototype.attribute = "", DG.prototype.booleanish = !1, DG.prototype.boolean = !1, DG.prototype.commaOrSpaceSeparated = !1, DG.prototype.commaSeparated = !1, DG.prototype.defined = !1, DG.prototype.mustUseProperty = !1, DG.prototype.number = !1, DG.prototype.overloadedBoolean = !1, DG.prototype.property = "", DG.prototype.spaceSeparated = !1, DG.prototype.space = void 0;
51557
51589
  //#endregion
51558
51590
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js
51559
- var EG = /* @__PURE__ */ te({
51560
- boolean: () => OG,
51561
- booleanish: () => kG,
51562
- commaOrSpaceSeparated: () => NG,
51563
- commaSeparated: () => MG,
51591
+ var OG = /* @__PURE__ */ te({
51592
+ boolean: () => AG,
51593
+ booleanish: () => jG,
51594
+ commaOrSpaceSeparated: () => FG,
51595
+ commaSeparated: () => PG,
51564
51596
  number: () => Q,
51565
- overloadedBoolean: () => AG,
51566
- spaceSeparated: () => jG
51567
- }), DG = 0, OG = PG(), kG = PG(), AG = PG(), Q = PG(), jG = PG(), MG = PG(), NG = PG();
51568
- function PG() {
51569
- return 2 ** ++DG;
51597
+ overloadedBoolean: () => MG,
51598
+ spaceSeparated: () => NG
51599
+ }), kG = 0, AG = IG(), jG = IG(), MG = IG(), Q = IG(), NG = IG(), PG = IG(), FG = IG();
51600
+ function IG() {
51601
+ return 2 ** ++kG;
51570
51602
  }
51571
51603
  //#endregion
51572
51604
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
51573
- var FG = Object.keys(EG), IG = class extends TG {
51605
+ var LG = Object.keys(OG), RG = class extends DG {
51574
51606
  constructor(e, t, n, r) {
51575
51607
  let i = -1;
51576
- if (super(e, t), LG(this, "space", r), typeof n == "number") for (; ++i < FG.length;) {
51577
- let e = FG[i];
51578
- LG(this, FG[i], (n & EG[e]) === EG[e]);
51608
+ if (super(e, t), zG(this, "space", r), typeof n == "number") for (; ++i < LG.length;) {
51609
+ let e = LG[i];
51610
+ zG(this, LG[i], (n & OG[e]) === OG[e]);
51579
51611
  }
51580
51612
  }
51581
51613
  };
51582
- IG.prototype.defined = !0;
51583
- function LG(e, t, n) {
51614
+ RG.prototype.defined = !0;
51615
+ function zG(e, t, n) {
51584
51616
  n && (e[t] = n);
51585
51617
  }
51586
51618
  //#endregion
51587
51619
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js
51588
- function RG(e) {
51620
+ function BG(e) {
51589
51621
  let t = {}, n = {};
51590
51622
  for (let [r, i] of Object.entries(e.properties)) {
51591
- let a = new IG(r, e.transform(e.attributes || {}, r), i, e.space);
51592
- e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[wG(r)] = r, n[wG(a.attribute)] = r;
51623
+ let a = new RG(r, e.transform(e.attributes || {}, r), i, e.space);
51624
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[EG(r)] = r, n[EG(a.attribute)] = r;
51593
51625
  }
51594
- return new SG(t, n, e.space);
51626
+ return new wG(t, n, e.space);
51595
51627
  }
51596
51628
  //#endregion
51597
51629
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js
51598
- var zG = RG({
51630
+ var VG = BG({
51599
51631
  properties: {
51600
51632
  ariaActiveDescendant: null,
51601
- ariaAtomic: kG,
51633
+ ariaAtomic: jG,
51602
51634
  ariaAutoComplete: null,
51603
- ariaBusy: kG,
51604
- ariaChecked: kG,
51635
+ ariaBusy: jG,
51636
+ ariaChecked: jG,
51605
51637
  ariaColCount: Q,
51606
51638
  ariaColIndex: Q,
51607
51639
  ariaColSpan: Q,
51608
- ariaControls: jG,
51640
+ ariaControls: NG,
51609
51641
  ariaCurrent: null,
51610
- ariaDescribedBy: jG,
51642
+ ariaDescribedBy: NG,
51611
51643
  ariaDetails: null,
51612
- ariaDisabled: kG,
51613
- ariaDropEffect: jG,
51644
+ ariaDisabled: jG,
51645
+ ariaDropEffect: NG,
51614
51646
  ariaErrorMessage: null,
51615
- ariaExpanded: kG,
51616
- ariaFlowTo: jG,
51617
- ariaGrabbed: kG,
51647
+ ariaExpanded: jG,
51648
+ ariaFlowTo: NG,
51649
+ ariaGrabbed: jG,
51618
51650
  ariaHasPopup: null,
51619
- ariaHidden: kG,
51651
+ ariaHidden: jG,
51620
51652
  ariaInvalid: null,
51621
51653
  ariaKeyShortcuts: null,
51622
51654
  ariaLabel: null,
51623
- ariaLabelledBy: jG,
51655
+ ariaLabelledBy: NG,
51624
51656
  ariaLevel: Q,
51625
51657
  ariaLive: null,
51626
- ariaModal: kG,
51627
- ariaMultiLine: kG,
51628
- ariaMultiSelectable: kG,
51658
+ ariaModal: jG,
51659
+ ariaMultiLine: jG,
51660
+ ariaMultiSelectable: jG,
51629
51661
  ariaOrientation: null,
51630
- ariaOwns: jG,
51662
+ ariaOwns: NG,
51631
51663
  ariaPlaceholder: null,
51632
51664
  ariaPosInSet: Q,
51633
- ariaPressed: kG,
51634
- ariaReadOnly: kG,
51665
+ ariaPressed: jG,
51666
+ ariaReadOnly: jG,
51635
51667
  ariaRelevant: null,
51636
- ariaRequired: kG,
51637
- ariaRoleDescription: jG,
51668
+ ariaRequired: jG,
51669
+ ariaRoleDescription: NG,
51638
51670
  ariaRowCount: Q,
51639
51671
  ariaRowIndex: Q,
51640
51672
  ariaRowSpan: Q,
51641
- ariaSelected: kG,
51673
+ ariaSelected: jG,
51642
51674
  ariaSetSize: Q,
51643
51675
  ariaSort: null,
51644
51676
  ariaValueMax: Q,
@@ -51653,17 +51685,17 @@ var zG = RG({
51653
51685
  });
51654
51686
  //#endregion
51655
51687
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
51656
- function BG(e, t) {
51688
+ function HG(e, t) {
51657
51689
  return t in e ? e[t] : t;
51658
51690
  }
51659
51691
  //#endregion
51660
51692
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
51661
- function VG(e, t) {
51662
- return BG(e, t.toLowerCase());
51693
+ function UG(e, t) {
51694
+ return HG(e, t.toLowerCase());
51663
51695
  }
51664
51696
  //#endregion
51665
51697
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js
51666
- var HG = RG({
51698
+ var WG = BG({
51667
51699
  attributes: {
51668
51700
  acceptcharset: "accept-charset",
51669
51701
  classname: "class",
@@ -51678,45 +51710,45 @@ var HG = RG({
51678
51710
  ],
51679
51711
  properties: {
51680
51712
  abbr: null,
51681
- accept: MG,
51682
- acceptCharset: jG,
51683
- accessKey: jG,
51713
+ accept: PG,
51714
+ acceptCharset: NG,
51715
+ accessKey: NG,
51684
51716
  action: null,
51685
51717
  allow: null,
51686
- allowFullScreen: OG,
51687
- allowPaymentRequest: OG,
51688
- allowUserMedia: OG,
51718
+ allowFullScreen: AG,
51719
+ allowPaymentRequest: AG,
51720
+ allowUserMedia: AG,
51689
51721
  alt: null,
51690
51722
  as: null,
51691
- async: OG,
51723
+ async: AG,
51692
51724
  autoCapitalize: null,
51693
- autoComplete: jG,
51694
- autoFocus: OG,
51695
- autoPlay: OG,
51696
- blocking: jG,
51725
+ autoComplete: NG,
51726
+ autoFocus: AG,
51727
+ autoPlay: AG,
51728
+ blocking: NG,
51697
51729
  capture: null,
51698
51730
  charSet: null,
51699
- checked: OG,
51731
+ checked: AG,
51700
51732
  cite: null,
51701
- className: jG,
51733
+ className: NG,
51702
51734
  cols: Q,
51703
51735
  colSpan: null,
51704
51736
  content: null,
51705
- contentEditable: kG,
51706
- controls: OG,
51707
- controlsList: jG,
51708
- coords: Q | MG,
51737
+ contentEditable: jG,
51738
+ controls: AG,
51739
+ controlsList: NG,
51740
+ coords: Q | PG,
51709
51741
  crossOrigin: null,
51710
51742
  data: null,
51711
51743
  dateTime: null,
51712
51744
  decoding: null,
51713
- default: OG,
51714
- defer: OG,
51745
+ default: AG,
51746
+ defer: AG,
51715
51747
  dir: null,
51716
51748
  dirName: null,
51717
- disabled: OG,
51718
- download: AG,
51719
- draggable: kG,
51749
+ disabled: AG,
51750
+ download: MG,
51751
+ draggable: jG,
51720
51752
  encType: null,
51721
51753
  enterKeyHint: null,
51722
51754
  fetchPriority: null,
@@ -51724,36 +51756,36 @@ var HG = RG({
51724
51756
  formAction: null,
51725
51757
  formEncType: null,
51726
51758
  formMethod: null,
51727
- formNoValidate: OG,
51759
+ formNoValidate: AG,
51728
51760
  formTarget: null,
51729
- headers: jG,
51761
+ headers: NG,
51730
51762
  height: Q,
51731
- hidden: AG,
51763
+ hidden: MG,
51732
51764
  high: Q,
51733
51765
  href: null,
51734
51766
  hrefLang: null,
51735
- htmlFor: jG,
51736
- httpEquiv: jG,
51767
+ htmlFor: NG,
51768
+ httpEquiv: NG,
51737
51769
  id: null,
51738
51770
  imageSizes: null,
51739
51771
  imageSrcSet: null,
51740
- inert: OG,
51772
+ inert: AG,
51741
51773
  inputMode: null,
51742
51774
  integrity: null,
51743
51775
  is: null,
51744
- isMap: OG,
51776
+ isMap: AG,
51745
51777
  itemId: null,
51746
- itemProp: jG,
51747
- itemRef: jG,
51748
- itemScope: OG,
51749
- itemType: jG,
51778
+ itemProp: NG,
51779
+ itemRef: NG,
51780
+ itemScope: AG,
51781
+ itemType: NG,
51750
51782
  kind: null,
51751
51783
  label: null,
51752
51784
  lang: null,
51753
51785
  language: null,
51754
51786
  list: null,
51755
51787
  loading: null,
51756
- loop: OG,
51788
+ loop: AG,
51757
51789
  low: Q,
51758
51790
  manifest: null,
51759
51791
  max: null,
@@ -51762,12 +51794,12 @@ var HG = RG({
51762
51794
  method: null,
51763
51795
  min: null,
51764
51796
  minLength: Q,
51765
- multiple: OG,
51766
- muted: OG,
51797
+ multiple: AG,
51798
+ muted: AG,
51767
51799
  name: null,
51768
51800
  nonce: null,
51769
- noModule: OG,
51770
- noValidate: OG,
51801
+ noModule: AG,
51802
+ noValidate: AG,
51771
51803
  onAbort: null,
51772
51804
  onAfterPrint: null,
51773
51805
  onAuxClick: null,
@@ -51856,38 +51888,38 @@ var HG = RG({
51856
51888
  onVolumeChange: null,
51857
51889
  onWaiting: null,
51858
51890
  onWheel: null,
51859
- open: OG,
51891
+ open: AG,
51860
51892
  optimum: Q,
51861
51893
  pattern: null,
51862
- ping: jG,
51894
+ ping: NG,
51863
51895
  placeholder: null,
51864
- playsInline: OG,
51896
+ playsInline: AG,
51865
51897
  popover: null,
51866
51898
  popoverTarget: null,
51867
51899
  popoverTargetAction: null,
51868
51900
  poster: null,
51869
51901
  preload: null,
51870
- readOnly: OG,
51902
+ readOnly: AG,
51871
51903
  referrerPolicy: null,
51872
- rel: jG,
51873
- required: OG,
51874
- reversed: OG,
51904
+ rel: NG,
51905
+ required: AG,
51906
+ reversed: AG,
51875
51907
  rows: Q,
51876
51908
  rowSpan: Q,
51877
- sandbox: jG,
51909
+ sandbox: NG,
51878
51910
  scope: null,
51879
- scoped: OG,
51880
- seamless: OG,
51881
- selected: OG,
51882
- shadowRootClonable: OG,
51883
- shadowRootDelegatesFocus: OG,
51911
+ scoped: AG,
51912
+ seamless: AG,
51913
+ selected: AG,
51914
+ shadowRootClonable: AG,
51915
+ shadowRootDelegatesFocus: AG,
51884
51916
  shadowRootMode: null,
51885
51917
  shape: null,
51886
51918
  size: Q,
51887
51919
  sizes: null,
51888
51920
  slot: null,
51889
51921
  span: Q,
51890
- spellCheck: kG,
51922
+ spellCheck: jG,
51891
51923
  src: null,
51892
51924
  srcDoc: null,
51893
51925
  srcLang: null,
@@ -51900,15 +51932,15 @@ var HG = RG({
51900
51932
  title: null,
51901
51933
  translate: null,
51902
51934
  type: null,
51903
- typeMustMatch: OG,
51935
+ typeMustMatch: AG,
51904
51936
  useMap: null,
51905
- value: kG,
51937
+ value: jG,
51906
51938
  width: Q,
51907
51939
  wrap: null,
51908
51940
  writingSuggestions: null,
51909
51941
  align: null,
51910
51942
  aLink: null,
51911
- archive: jG,
51943
+ archive: NG,
51912
51944
  axis: null,
51913
51945
  background: null,
51914
51946
  bgColor: null,
@@ -51925,8 +51957,8 @@ var HG = RG({
51925
51957
  codeBase: null,
51926
51958
  codeType: null,
51927
51959
  color: null,
51928
- compact: OG,
51929
- declare: OG,
51960
+ compact: AG,
51961
+ declare: AG,
51930
51962
  event: null,
51931
51963
  face: null,
51932
51964
  frame: null,
@@ -51938,10 +51970,10 @@ var HG = RG({
51938
51970
  lowSrc: null,
51939
51971
  marginHeight: Q,
51940
51972
  marginWidth: Q,
51941
- noResize: OG,
51942
- noHref: OG,
51943
- noShade: OG,
51944
- noWrap: OG,
51973
+ noResize: AG,
51974
+ noHref: AG,
51975
+ noShade: AG,
51976
+ noWrap: AG,
51945
51977
  object: null,
51946
51978
  profile: null,
51947
51979
  prompt: null,
@@ -51949,7 +51981,7 @@ var HG = RG({
51949
51981
  rightMargin: Q,
51950
51982
  rules: null,
51951
51983
  scheme: null,
51952
- scrolling: kG,
51984
+ scrolling: jG,
51953
51985
  standby: null,
51954
51986
  summary: null,
51955
51987
  text: null,
@@ -51962,8 +51994,8 @@ var HG = RG({
51962
51994
  allowTransparency: null,
51963
51995
  autoCorrect: null,
51964
51996
  autoSave: null,
51965
- disablePictureInPicture: OG,
51966
- disableRemotePlayback: OG,
51997
+ disablePictureInPicture: AG,
51998
+ disableRemotePlayback: AG,
51967
51999
  prefix: null,
51968
52000
  property: null,
51969
52001
  results: Q,
@@ -51971,8 +52003,8 @@ var HG = RG({
51971
52003
  unselectable: null
51972
52004
  },
51973
52005
  space: "html",
51974
- transform: VG
51975
- }), UG = RG({
52006
+ transform: UG
52007
+ }), GG = BG({
51976
52008
  attributes: {
51977
52009
  accentHeight: "accent-height",
51978
52010
  alignmentBaseline: "alignment-baseline",
@@ -52148,7 +52180,7 @@ var HG = RG({
52148
52180
  timelineBegin: "timelinebegin"
52149
52181
  },
52150
52182
  properties: {
52151
- about: NG,
52183
+ about: FG,
52152
52184
  accentHeight: Q,
52153
52185
  accumulate: null,
52154
52186
  additive: null,
@@ -52170,7 +52202,7 @@ var HG = RG({
52170
52202
  by: null,
52171
52203
  calcMode: null,
52172
52204
  capHeight: Q,
52173
- className: jG,
52205
+ className: NG,
52174
52206
  clip: null,
52175
52207
  clipPath: null,
52176
52208
  clipPathUnits: null,
@@ -52197,7 +52229,7 @@ var HG = RG({
52197
52229
  dur: null,
52198
52230
  divisor: Q,
52199
52231
  dominantBaseline: null,
52200
- download: OG,
52232
+ download: AG,
52201
52233
  dx: null,
52202
52234
  dy: null,
52203
52235
  edgeMode: null,
@@ -52230,9 +52262,9 @@ var HG = RG({
52230
52262
  from: null,
52231
52263
  fx: null,
52232
52264
  fy: null,
52233
- g1: MG,
52234
- g2: MG,
52235
- glyphName: MG,
52265
+ g1: PG,
52266
+ g2: PG,
52267
+ glyphName: PG,
52236
52268
  glyphOrientationHorizontal: null,
52237
52269
  glyphOrientationVertical: null,
52238
52270
  glyphRef: null,
@@ -52260,7 +52292,7 @@ var HG = RG({
52260
52292
  k2: Q,
52261
52293
  k3: Q,
52262
52294
  k4: Q,
52263
- kernelMatrix: NG,
52295
+ kernelMatrix: FG,
52264
52296
  kernelUnitLength: null,
52265
52297
  keyPoints: null,
52266
52298
  keySplines: null,
@@ -52402,7 +52434,7 @@ var HG = RG({
52402
52434
  patternTransform: null,
52403
52435
  patternUnits: null,
52404
52436
  phase: null,
52405
- ping: jG,
52437
+ ping: NG,
52406
52438
  pitch: null,
52407
52439
  playbackOrder: null,
52408
52440
  pointerEvents: null,
@@ -52414,21 +52446,21 @@ var HG = RG({
52414
52446
  preserveAspectRatio: null,
52415
52447
  primitiveUnits: null,
52416
52448
  propagate: null,
52417
- property: NG,
52449
+ property: FG,
52418
52450
  r: null,
52419
52451
  radius: null,
52420
52452
  referrerPolicy: null,
52421
52453
  refX: null,
52422
52454
  refY: null,
52423
- rel: NG,
52424
- rev: NG,
52455
+ rel: FG,
52456
+ rev: FG,
52425
52457
  renderingIntent: null,
52426
52458
  repeatCount: null,
52427
52459
  repeatDur: null,
52428
- requiredExtensions: NG,
52429
- requiredFeatures: NG,
52430
- requiredFonts: NG,
52431
- requiredFormats: NG,
52460
+ requiredExtensions: FG,
52461
+ requiredFeatures: FG,
52462
+ requiredFonts: FG,
52463
+ requiredFormats: FG,
52432
52464
  resource: null,
52433
52465
  restart: null,
52434
52466
  result: null,
@@ -52456,7 +52488,7 @@ var HG = RG({
52456
52488
  strikethroughThickness: Q,
52457
52489
  string: null,
52458
52490
  stroke: null,
52459
- strokeDashArray: NG,
52491
+ strokeDashArray: FG,
52460
52492
  strokeDashOffset: null,
52461
52493
  strokeLineCap: null,
52462
52494
  strokeLineJoin: null,
@@ -52470,7 +52502,7 @@ var HG = RG({
52470
52502
  syncMaster: null,
52471
52503
  syncTolerance: null,
52472
52504
  syncToleranceDefault: null,
52473
- systemLanguage: NG,
52505
+ systemLanguage: FG,
52474
52506
  tabIndex: Q,
52475
52507
  tableValues: null,
52476
52508
  target: null,
@@ -52484,7 +52516,7 @@ var HG = RG({
52484
52516
  title: null,
52485
52517
  transformBehavior: null,
52486
52518
  type: null,
52487
- typeOf: NG,
52519
+ typeOf: FG,
52488
52520
  to: null,
52489
52521
  transform: null,
52490
52522
  transformOrigin: null,
@@ -52526,8 +52558,8 @@ var HG = RG({
52526
52558
  zoomAndPan: null
52527
52559
  },
52528
52560
  space: "svg",
52529
- transform: BG
52530
- }), WG = RG({
52561
+ transform: HG
52562
+ }), KG = BG({
52531
52563
  properties: {
52532
52564
  xLinkActuate: null,
52533
52565
  xLinkArcRole: null,
@@ -52541,15 +52573,15 @@ var HG = RG({
52541
52573
  transform(e, t) {
52542
52574
  return "xlink:" + t.slice(5).toLowerCase();
52543
52575
  }
52544
- }), GG = RG({
52576
+ }), qG = BG({
52545
52577
  attributes: { xmlnsxlink: "xmlns:xlink" },
52546
52578
  properties: {
52547
52579
  xmlnsXLink: null,
52548
52580
  xmlns: null
52549
52581
  },
52550
52582
  space: "xmlns",
52551
- transform: VG
52552
- }), KG = RG({
52583
+ transform: UG
52584
+ }), JG = BG({
52553
52585
  properties: {
52554
52586
  xmlBase: null,
52555
52587
  xmlLang: null,
@@ -52559,49 +52591,49 @@ var HG = RG({
52559
52591
  transform(e, t) {
52560
52592
  return "xml:" + t.slice(3).toLowerCase();
52561
52593
  }
52562
- }), qG = /[A-Z]/g, JG = /-[a-z]/g, YG = /^data[-\w.:]+$/i;
52563
- function XG(e, t) {
52564
- let n = wG(t), r = t, i = TG;
52594
+ }), YG = /[A-Z]/g, XG = /-[a-z]/g, ZG = /^data[-\w.:]+$/i;
52595
+ function QG(e, t) {
52596
+ let n = EG(t), r = t, i = DG;
52565
52597
  if (n in e.normal) return e.property[e.normal[n]];
52566
- if (n.length > 4 && n.slice(0, 4) === "data" && YG.test(t)) {
52598
+ if (n.length > 4 && n.slice(0, 4) === "data" && ZG.test(t)) {
52567
52599
  if (t.charAt(4) === "-") {
52568
- let e = t.slice(5).replace(JG, QG);
52600
+ let e = t.slice(5).replace(XG, eK);
52569
52601
  r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
52570
52602
  } else {
52571
52603
  let e = t.slice(4);
52572
- if (!JG.test(e)) {
52573
- let n = e.replace(qG, ZG);
52604
+ if (!XG.test(e)) {
52605
+ let n = e.replace(YG, $G);
52574
52606
  n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
52575
52607
  }
52576
52608
  }
52577
- i = IG;
52609
+ i = RG;
52578
52610
  }
52579
52611
  return new i(r, t);
52580
52612
  }
52581
- function ZG(e) {
52613
+ function $G(e) {
52582
52614
  return "-" + e.toLowerCase();
52583
52615
  }
52584
- function QG(e) {
52616
+ function eK(e) {
52585
52617
  return e.charAt(1).toUpperCase();
52586
52618
  }
52587
52619
  //#endregion
52588
52620
  //#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js
52589
- var $G = CG([
52590
- zG,
52591
- HG,
52592
- WG,
52593
- GG,
52594
- KG
52595
- ], "html"), eK = CG([
52596
- zG,
52597
- UG,
52621
+ var tK = TG([
52622
+ VG,
52598
52623
  WG,
52624
+ KG,
52625
+ qG,
52626
+ JG
52627
+ ], "html"), nK = TG([
52628
+ VG,
52599
52629
  GG,
52600
- KG
52630
+ KG,
52631
+ qG,
52632
+ JG
52601
52633
  ], "svg");
52602
52634
  //#endregion
52603
52635
  //#region node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
52604
- function tK(e) {
52636
+ function rK(e) {
52605
52637
  let t = [], n = String(e || ""), r = n.indexOf(","), i = 0, a = !1;
52606
52638
  for (; !a;) {
52607
52639
  r === -1 && (r = n.length, a = !0);
@@ -52612,12 +52644,12 @@ function tK(e) {
52612
52644
  }
52613
52645
  //#endregion
52614
52646
  //#region node_modules/.pnpm/hast-util-parse-selector@4.0.0/node_modules/hast-util-parse-selector/lib/index.js
52615
- var nK = /[#.]/g;
52616
- function rK(e, t) {
52647
+ var iK = /[#.]/g;
52648
+ function aK(e, t) {
52617
52649
  let n = e || "", r = {}, i = 0, a, o;
52618
52650
  for (; i < n.length;) {
52619
- nK.lastIndex = i;
52620
- let e = nK.exec(n), t = n.slice(i, e ? e.index : n.length);
52651
+ iK.lastIndex = i;
52652
+ let e = iK.exec(n), t = n.slice(i, e ? e.index : n.length);
52621
52653
  t && (a ? a === "#" ? r.id = t : Array.isArray(r.className) ? r.className.push(t) : r.className = [t] : o = t, i += t.length), e && (a = e[0], i++);
52622
52654
  }
52623
52655
  return {
@@ -52629,14 +52661,14 @@ function rK(e, t) {
52629
52661
  }
52630
52662
  //#endregion
52631
52663
  //#region node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
52632
- function iK(e) {
52664
+ function oK(e) {
52633
52665
  let t = String(e || "").trim();
52634
52666
  return t ? t.split(/[ \t\n\r\f]+/g) : [];
52635
52667
  }
52636
52668
  //#endregion
52637
52669
  //#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/create-h.js
52638
- function aK(e, t, n) {
52639
- let r = n ? dK(n) : void 0;
52670
+ function sK(e, t, n) {
52671
+ let r = n ? pK(n) : void 0;
52640
52672
  function i(n, i, ...a) {
52641
52673
  let o;
52642
52674
  if (n == null) {
@@ -52647,12 +52679,12 @@ function aK(e, t, n) {
52647
52679
  let e = i;
52648
52680
  a.unshift(e);
52649
52681
  } else {
52650
- o = rK(n, t);
52682
+ o = aK(n, t);
52651
52683
  let s = o.tagName.toLowerCase(), c = r ? r.get(s) : void 0;
52652
- if (o.tagName = c || s, oK(i)) a.unshift(i);
52653
- else for (let [t, n] of Object.entries(i)) sK(e, o.properties, t, n);
52684
+ if (o.tagName = c || s, cK(i)) a.unshift(i);
52685
+ else for (let [t, n] of Object.entries(i)) lK(e, o.properties, t, n);
52654
52686
  }
52655
- for (let e of a) cK(o.children, e);
52687
+ for (let e of a) uK(o.children, e);
52656
52688
  return o.type === "element" && o.tagName === "template" && (o.content = {
52657
52689
  type: "root",
52658
52690
  children: o.children
@@ -52660,7 +52692,7 @@ function aK(e, t, n) {
52660
52692
  }
52661
52693
  return i;
52662
52694
  }
52663
- function oK(e) {
52695
+ function cK(e) {
52664
52696
  if (typeof e != "object" || !e || Array.isArray(e)) return !0;
52665
52697
  if (typeof e.type != "string") return !1;
52666
52698
  let t = e, n = Object.keys(e);
@@ -52674,54 +52706,54 @@ function oK(e) {
52674
52706
  }
52675
52707
  return !!("children" in e && Array.isArray(e.children));
52676
52708
  }
52677
- function sK(e, t, n, r) {
52678
- let i = XG(e, n), a;
52709
+ function lK(e, t, n, r) {
52710
+ let i = QG(e, n), a;
52679
52711
  if (r != null) {
52680
52712
  if (typeof r == "number") {
52681
52713
  if (Number.isNaN(r)) return;
52682
52714
  a = r;
52683
- } else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? iK(r) : i.commaSeparated ? tK(r) : i.commaOrSpaceSeparated ? iK(tK(r).join(" ")) : lK(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? uK(r) : String(r);
52715
+ } else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? oK(r) : i.commaSeparated ? rK(r) : i.commaOrSpaceSeparated ? oK(rK(r).join(" ")) : dK(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? fK(r) : String(r);
52684
52716
  if (Array.isArray(a)) {
52685
52717
  let e = [];
52686
- for (let t of a) e.push(lK(i, i.property, t));
52718
+ for (let t of a) e.push(dK(i, i.property, t));
52687
52719
  a = e;
52688
52720
  }
52689
52721
  i.property === "className" && Array.isArray(t.className) && (a = t.className.concat(a)), t[i.property] = a;
52690
52722
  }
52691
52723
  }
52692
- function cK(e, t) {
52724
+ function uK(e, t) {
52693
52725
  if (t != null) if (typeof t == "number" || typeof t == "string") e.push({
52694
52726
  type: "text",
52695
52727
  value: String(t)
52696
52728
  });
52697
- else if (Array.isArray(t)) for (let n of t) cK(e, n);
52698
- else if (typeof t == "object" && "type" in t) t.type === "root" ? cK(e, t.children) : e.push(t);
52729
+ else if (Array.isArray(t)) for (let n of t) uK(e, n);
52730
+ else if (typeof t == "object" && "type" in t) t.type === "root" ? uK(e, t.children) : e.push(t);
52699
52731
  else throw Error("Expected node, nodes, or string, got `" + t + "`");
52700
52732
  }
52701
- function lK(e, t, n) {
52733
+ function dK(e, t, n) {
52702
52734
  if (typeof n == "string") {
52703
52735
  if (e.number && n && !Number.isNaN(Number(n))) return Number(n);
52704
- if ((e.boolean || e.overloadedBoolean) && (n === "" || wG(n) === wG(t))) return !0;
52736
+ if ((e.boolean || e.overloadedBoolean) && (n === "" || EG(n) === EG(t))) return !0;
52705
52737
  }
52706
52738
  return n;
52707
52739
  }
52708
- function uK(e) {
52740
+ function fK(e) {
52709
52741
  let t = [];
52710
52742
  for (let [n, r] of Object.entries(e)) t.push([n, r].join(": "));
52711
52743
  return t.join("; ");
52712
52744
  }
52713
- function dK(e) {
52745
+ function pK(e) {
52714
52746
  let t = /* @__PURE__ */ new Map();
52715
52747
  for (let n of e) t.set(n.toLowerCase(), n);
52716
52748
  return t;
52717
52749
  }
52718
52750
  //#endregion
52719
52751
  //#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js
52720
- var fK = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), pK = aK($G, "div");
52721
- aK(eK, "g", fK);
52752
+ var mK = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), hK = sK(tK, "div");
52753
+ sK(nK, "g", mK);
52722
52754
  //#endregion
52723
52755
  //#region node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
52724
- var mK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), hK = {
52756
+ var gK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), _K = {
52725
52757
  0: "�",
52726
52758
  128: "€",
52727
52759
  130: "‚",
@@ -52753,30 +52785,30 @@ var mK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.C
52753
52785
  };
52754
52786
  //#endregion
52755
52787
  //#region node_modules/.pnpm/is-decimal@2.0.1/node_modules/is-decimal/index.js
52756
- function gK(e) {
52788
+ function vK(e) {
52757
52789
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
52758
52790
  return t >= 48 && t <= 57;
52759
52791
  }
52760
52792
  //#endregion
52761
52793
  //#region node_modules/.pnpm/is-hexadecimal@2.0.1/node_modules/is-hexadecimal/index.js
52762
- function _K(e) {
52794
+ function yK(e) {
52763
52795
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
52764
52796
  return t >= 97 && t <= 102 || t >= 65 && t <= 70 || t >= 48 && t <= 57;
52765
52797
  }
52766
52798
  //#endregion
52767
52799
  //#region node_modules/.pnpm/is-alphabetical@2.0.1/node_modules/is-alphabetical/index.js
52768
- function vK(e) {
52800
+ function bK(e) {
52769
52801
  let t = typeof e == "string" ? e.charCodeAt(0) : e;
52770
52802
  return t >= 97 && t <= 122 || t >= 65 && t <= 90;
52771
52803
  }
52772
52804
  //#endregion
52773
52805
  //#region node_modules/.pnpm/is-alphanumerical@2.0.1/node_modules/is-alphanumerical/index.js
52774
- function yK(e) {
52775
- return vK(e) || gK(e);
52806
+ function xK(e) {
52807
+ return bK(e) || vK(e);
52776
52808
  }
52777
52809
  //#endregion
52778
52810
  //#region node_modules/.pnpm/parse-entities@4.0.2/node_modules/parse-entities/lib/index.js
52779
- var bK = [
52811
+ var SK = [
52780
52812
  "",
52781
52813
  "Named character references must be terminated by a semicolon",
52782
52814
  "Numeric character references must be terminated by a semicolon",
@@ -52786,7 +52818,7 @@ var bK = [
52786
52818
  "Numeric character references cannot be disallowed",
52787
52819
  "Numeric character references cannot be outside the permissible Unicode range"
52788
52820
  ];
52789
- function xK(e, t) {
52821
+ function CK(e, t) {
52790
52822
  let n = t || {}, r = typeof n.additional == "string" ? n.additional.charCodeAt(0) : n.additional, i = [], a = 0, o = -1, s = "", c, l;
52791
52823
  n.position && ("start" in n.position || "indent" in n.position ? (l = n.position.indent, c = n.position.start) : c = n.position);
52792
52824
  let u = (c ? c.line : 0) || 1, d = (c ? c.column : 0) || 1, f = m(), p;
@@ -52802,11 +52834,11 @@ function xK(e, t) {
52802
52834
  let t = e.charCodeAt(l);
52803
52835
  t === 88 || t === 120 ? (u = "hexadecimal", l = ++c) : u = "decimal";
52804
52836
  } else u = "named";
52805
- let _ = "", v = "", y = "", b = u === "named" ? yK : u === "decimal" ? gK : _K;
52837
+ let _ = "", v = "", y = "", b = u === "named" ? xK : u === "decimal" ? vK : yK;
52806
52838
  for (l--; ++l <= e.length;) {
52807
52839
  let t = e.charCodeAt(l);
52808
52840
  if (!b(t)) break;
52809
- y += String.fromCharCode(t), u === "named" && mK.includes(y) && (_ = y, v = Qr(y));
52841
+ y += String.fromCharCode(t), u === "named" && gK.includes(y) && (_ = y, v = Qr(y));
52810
52842
  }
52811
52843
  let x = e.charCodeAt(l) === 59;
52812
52844
  if (x) {
@@ -52822,18 +52854,18 @@ function xK(e, t) {
52822
52854
  let t = _ ? 1 : 3;
52823
52855
  if (n.attribute) {
52824
52856
  let n = e.charCodeAt(l);
52825
- n === 61 ? (h(t, S), v = "") : yK(n) ? v = "" : h(t, S);
52857
+ n === 61 ? (h(t, S), v = "") : xK(n) ? v = "" : h(t, S);
52826
52858
  } else h(t, S);
52827
52859
  }
52828
52860
  C = v;
52829
52861
  } else {
52830
52862
  x || h(2, S);
52831
52863
  let e = Number.parseInt(y, u === "hexadecimal" ? 16 : 10);
52832
- if (SK(e)) h(7, S), C = "�";
52833
- else if (e in hK) h(6, S), C = hK[e];
52864
+ if (wK(e)) h(7, S), C = "�";
52865
+ else if (e in _K) h(6, S), C = _K[e];
52834
52866
  else {
52835
52867
  let t = "";
52836
- CK(e) && h(6, S), e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 | 55296), e = 56320 | e & 1023), C = t + String.fromCharCode(e);
52868
+ TK(e) && h(6, S), e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 | 55296), e = 56320 | e & 1023), C = t + String.fromCharCode(e);
52837
52869
  }
52838
52870
  }
52839
52871
  if (C) {
@@ -52855,7 +52887,7 @@ function xK(e, t) {
52855
52887
  }
52856
52888
  function h(e, t) {
52857
52889
  let r;
52858
- n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0, bK[e], r, e));
52890
+ n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0, SK[e], r, e));
52859
52891
  }
52860
52892
  function g() {
52861
52893
  s &&= (i.push(s), n.text && n.text.call(n.textContext || void 0, s, {
@@ -52864,31 +52896,31 @@ function xK(e, t) {
52864
52896
  }), "");
52865
52897
  }
52866
52898
  }
52867
- function SK(e) {
52899
+ function wK(e) {
52868
52900
  return e >= 55296 && e <= 57343 || e > 1114111;
52869
52901
  }
52870
- function CK(e) {
52902
+ function TK(e) {
52871
52903
  return e >= 1 && e <= 8 || e === 11 || e >= 13 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || (e & 65535) == 65535 || (e & 65535) == 65534;
52872
52904
  }
52873
52905
  //#endregion
52874
52906
  //#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/prism-core.js
52875
- var wK = 0, TK = {}, EK = {
52907
+ var EK = 0, DK = {}, OK = {
52876
52908
  util: {
52877
52909
  type: function(e) {
52878
52910
  return Object.prototype.toString.call(e).slice(8, -1);
52879
52911
  },
52880
52912
  objId: function(e) {
52881
- return e.__id || Object.defineProperty(e, "__id", { value: ++wK }), e.__id;
52913
+ return e.__id || Object.defineProperty(e, "__id", { value: ++EK }), e.__id;
52882
52914
  },
52883
52915
  clone: function e(t, n) {
52884
52916
  n ||= {};
52885
52917
  var r, i;
52886
- switch (EK.util.type(t)) {
52918
+ switch (OK.util.type(t)) {
52887
52919
  case "Object":
52888
- if (i = EK.util.objId(t), n[i]) return n[i];
52920
+ if (i = OK.util.objId(t), n[i]) return n[i];
52889
52921
  for (var a in r = {}, n[i] = r, t) t.hasOwnProperty(a) && (r[a] = e(t[a], n));
52890
52922
  return r;
52891
- case "Array": return i = EK.util.objId(t), n[i] ? n[i] : (r = [], n[i] = r, t.forEach(function(t, i) {
52923
+ case "Array": return i = OK.util.objId(t), n[i] ? n[i] : (r = [], n[i] = r, t.forEach(function(t, i) {
52892
52924
  r[i] = e(t, n);
52893
52925
  }), r);
52894
52926
  default: return t;
@@ -52896,33 +52928,33 @@ var wK = 0, TK = {}, EK = {
52896
52928
  }
52897
52929
  },
52898
52930
  languages: {
52899
- plain: TK,
52900
- plaintext: TK,
52901
- text: TK,
52902
- txt: TK,
52931
+ plain: DK,
52932
+ plaintext: DK,
52933
+ text: DK,
52934
+ txt: DK,
52903
52935
  extend: function(e, t) {
52904
- var n = EK.util.clone(EK.languages[e]);
52936
+ var n = OK.util.clone(OK.languages[e]);
52905
52937
  for (var r in t) n[r] = t[r];
52906
52938
  return n;
52907
52939
  },
52908
52940
  insertBefore: function(e, t, n, r) {
52909
- r ||= EK.languages;
52941
+ r ||= OK.languages;
52910
52942
  var i = r[e], a = {};
52911
52943
  for (var o in i) if (i.hasOwnProperty(o)) {
52912
52944
  if (o == t) for (var s in n) n.hasOwnProperty(s) && (a[s] = n[s]);
52913
52945
  n.hasOwnProperty(o) || (a[o] = i[o]);
52914
52946
  }
52915
52947
  var c = r[e];
52916
- return r[e] = a, EK.languages.DFS(EK.languages, function(t, n) {
52948
+ return r[e] = a, OK.languages.DFS(OK.languages, function(t, n) {
52917
52949
  n === c && t != e && (this[t] = a);
52918
52950
  }), a;
52919
52951
  },
52920
52952
  DFS: function e(t, n, r, i) {
52921
52953
  i ||= {};
52922
- var a = EK.util.objId;
52954
+ var a = OK.util.objId;
52923
52955
  for (var o in t) if (t.hasOwnProperty(o)) {
52924
52956
  n.call(t, o, t[o], r || o);
52925
- var s = t[o], c = EK.util.type(s);
52957
+ var s = t[o], c = OK.util.type(s);
52926
52958
  c === "Object" && !i[a(s)] ? (i[a(s)] = !0, e(s, n, null, i)) : c === "Array" && !i[a(s)] && (i[a(s)] = !0, e(s, n, o, i));
52927
52959
  }
52928
52960
  }
@@ -52934,8 +52966,8 @@ var wK = 0, TK = {}, EK = {
52934
52966
  grammar: t,
52935
52967
  language: n
52936
52968
  };
52937
- if (EK.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
52938
- return r.tokens = EK.tokenize(r.code, r.grammar), EK.hooks.run("after-tokenize", r), DK.stringify(EK.util.encode(r.tokens), r.language);
52969
+ if (OK.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
52970
+ return r.tokens = OK.tokenize(r.code, r.grammar), OK.hooks.run("after-tokenize", r), kK.stringify(OK.util.encode(r.tokens), r.language);
52939
52971
  },
52940
52972
  tokenize: function(e, t) {
52941
52973
  var n = t.rest;
@@ -52943,26 +52975,26 @@ var wK = 0, TK = {}, EK = {
52943
52975
  for (var r in n) t[r] = n[r];
52944
52976
  delete t.rest;
52945
52977
  }
52946
- var i = new AK();
52947
- return jK(i, i.head, e), kK(e, i, t, i.head, 0), NK(i);
52978
+ var i = new MK();
52979
+ return NK(i, i.head, e), jK(e, i, t, i.head, 0), FK(i);
52948
52980
  },
52949
52981
  hooks: {
52950
52982
  all: {},
52951
52983
  add: function(e, t) {
52952
- var n = EK.hooks.all;
52984
+ var n = OK.hooks.all;
52953
52985
  n[e] = n[e] || [], n[e].push(t);
52954
52986
  },
52955
52987
  run: function(e, t) {
52956
- var n = EK.hooks.all[e];
52988
+ var n = OK.hooks.all[e];
52957
52989
  if (!(!n || !n.length)) for (var r = 0, i; i = n[r++];) i(t);
52958
52990
  }
52959
52991
  },
52960
- Token: DK
52992
+ Token: kK
52961
52993
  };
52962
- function DK(e, t, n, r) {
52994
+ function kK(e, t, n, r) {
52963
52995
  this.type = e, this.content = t, this.alias = n, this.length = (r || "").length | 0;
52964
52996
  }
52965
- function OK(e, t, n, r) {
52997
+ function AK(e, t, n, r) {
52966
52998
  e.lastIndex = t;
52967
52999
  var i = e.exec(n);
52968
53000
  if (i && r && i[1]) {
@@ -52971,7 +53003,7 @@ function OK(e, t, n, r) {
52971
53003
  }
52972
53004
  return i;
52973
53005
  }
52974
- function kK(e, t, n, r, i, a) {
53006
+ function jK(e, t, n, r, i, a) {
52975
53007
  for (var o in n) if (!(!n.hasOwnProperty(o) || !n[o])) {
52976
53008
  var s = n[o];
52977
53009
  s = Array.isArray(s) ? s : [s];
@@ -52985,34 +53017,34 @@ function kK(e, t, n, r, i, a) {
52985
53017
  for (var h = l.pattern || l, g = r.next, _ = i; g !== t.tail && !(a && _ >= a.reach); _ += g.value.length, g = g.next) {
52986
53018
  var v = g.value;
52987
53019
  if (t.length > e.length) return;
52988
- if (!(v instanceof DK)) {
53020
+ if (!(v instanceof kK)) {
52989
53021
  var y = 1, b;
52990
53022
  if (f) {
52991
- if (b = OK(h, _, e, d), !b || b.index >= e.length) break;
53023
+ if (b = AK(h, _, e, d), !b || b.index >= e.length) break;
52992
53024
  var x = b.index, S = b.index + b[0].length, C = _;
52993
53025
  for (C += g.value.length; x >= C;) g = g.next, C += g.value.length;
52994
- if (C -= g.value.length, _ = C, g.value instanceof DK) continue;
53026
+ if (C -= g.value.length, _ = C, g.value instanceof kK) continue;
52995
53027
  for (var w = g; w !== t.tail && (C < S || typeof w.value == "string"); w = w.next) y++, C += w.value.length;
52996
53028
  y--, v = e.slice(_, C), b.index -= _;
52997
- } else if (b = OK(h, 0, v, d), !b) continue;
53029
+ } else if (b = AK(h, 0, v, d), !b) continue;
52998
53030
  var x = b.index, T = b[0], E = v.slice(0, x), ee = v.slice(x + T.length), te = _ + v.length;
52999
53031
  a && te > a.reach && (a.reach = te);
53000
53032
  var ne = g.prev;
53001
- E && (ne = jK(t, ne, E), _ += E.length), MK(t, ne, y);
53002
- var re = new DK(o, u ? EK.tokenize(T, u) : T, p, T);
53003
- if (g = jK(t, ne, re), ee && jK(t, g, ee), y > 1) {
53033
+ E && (ne = NK(t, ne, E), _ += E.length), PK(t, ne, y);
53034
+ var re = new kK(o, u ? OK.tokenize(T, u) : T, p, T);
53035
+ if (g = NK(t, ne, re), ee && NK(t, g, ee), y > 1) {
53004
53036
  var ie = {
53005
53037
  cause: o + "," + c,
53006
53038
  reach: te
53007
53039
  };
53008
- kK(e, t, n, g.prev, _, ie), a && ie.reach > a.reach && (a.reach = ie.reach);
53040
+ jK(e, t, n, g.prev, _, ie), a && ie.reach > a.reach && (a.reach = ie.reach);
53009
53041
  }
53010
53042
  }
53011
53043
  }
53012
53044
  }
53013
53045
  }
53014
53046
  }
53015
- function AK() {
53047
+ function MK() {
53016
53048
  var e = {
53017
53049
  value: null,
53018
53050
  prev: null,
@@ -53024,7 +53056,7 @@ function AK() {
53024
53056
  };
53025
53057
  e.next = t, this.head = e, this.tail = t, this.length = 0;
53026
53058
  }
53027
- function jK(e, t, n) {
53059
+ function NK(e, t, n) {
53028
53060
  var r = t.next, i = {
53029
53061
  value: n,
53030
53062
  prev: t,
@@ -53032,22 +53064,22 @@ function jK(e, t, n) {
53032
53064
  };
53033
53065
  return t.next = i, r.prev = i, e.length++, i;
53034
53066
  }
53035
- function MK(e, t, n) {
53067
+ function PK(e, t, n) {
53036
53068
  for (var r = t.next, i = 0; i < n && r !== e.tail; i++) r = r.next;
53037
53069
  t.next = r, r.prev = t, e.length -= i;
53038
53070
  }
53039
- function NK(e) {
53071
+ function FK(e) {
53040
53072
  for (var t = [], n = e.head.next; n !== e.tail;) t.push(n.value), n = n.next;
53041
53073
  return t;
53042
53074
  }
53043
- var PK = EK;
53075
+ var IK = OK;
53044
53076
  //#endregion
53045
53077
  //#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/core.js
53046
- function FK() {}
53047
- FK.prototype = PK;
53048
- var $ = new FK();
53049
- $.highlight = IK, $.register = LK, $.alias = RK, $.registered = zK, $.listLanguages = BK, $.util.encode = HK, $.Token.stringify = VK;
53050
- function IK(e, t) {
53078
+ function LK() {}
53079
+ LK.prototype = IK;
53080
+ var $ = new LK();
53081
+ $.highlight = RK, $.register = zK, $.alias = BK, $.registered = VK, $.listLanguages = HK, $.util.encode = WK, $.Token.stringify = UK;
53082
+ function RK(e, t) {
53051
53083
  if (typeof e != "string") throw TypeError("Expected `string` for `value`, got `" + e + "`");
53052
53084
  let n, r;
53053
53085
  /* c8 ignore next 2 */
@@ -53059,14 +53091,14 @@ function IK(e, t) {
53059
53091
  }
53060
53092
  return {
53061
53093
  type: "root",
53062
- children: PK.highlight.call($, e, n, r)
53094
+ children: IK.highlight.call($, e, n, r)
53063
53095
  };
53064
53096
  }
53065
- function LK(e) {
53097
+ function zK(e) {
53066
53098
  if (typeof e != "function" || !e.displayName) throw Error("Expected `function` for `syntax`, got `" + e + "`");
53067
53099
  Object.hasOwn($.languages, e.displayName) || e($);
53068
53100
  }
53069
- function RK(e, t) {
53101
+ function BK(e, t) {
53070
53102
  let n = $.languages, r = {};
53071
53103
  typeof e == "string" ? t && (r[e] = t) : r = e;
53072
53104
  let i;
@@ -53075,65 +53107,65 @@ function RK(e, t) {
53075
53107
  for (; ++a < t.length;) n[t[a]] = n[i];
53076
53108
  }
53077
53109
  }
53078
- function zK(e) {
53110
+ function VK(e) {
53079
53111
  if (typeof e != "string") throw TypeError("Expected `string` for `aliasOrLanguage`, got `" + e + "`");
53080
53112
  return Object.hasOwn($.languages, e);
53081
53113
  }
53082
- function BK() {
53114
+ function HK() {
53083
53115
  let e = $.languages, t = [], n;
53084
53116
  for (n in e) Object.hasOwn(e, n) && typeof e[n] == "object" && t.push(n);
53085
53117
  return t;
53086
53118
  }
53087
- function VK(e, t) {
53119
+ function UK(e, t) {
53088
53120
  if (typeof e == "string") return {
53089
53121
  type: "text",
53090
53122
  value: e
53091
53123
  };
53092
53124
  if (Array.isArray(e)) {
53093
53125
  let n = [], r = -1;
53094
- for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(VK(e[r], t));
53126
+ for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(UK(e[r], t));
53095
53127
  return n;
53096
53128
  }
53097
53129
  let n = {
53098
53130
  attributes: {},
53099
53131
  classes: ["token", e.type],
53100
- content: VK(e.content, t),
53132
+ content: UK(e.content, t),
53101
53133
  language: t,
53102
53134
  tag: "span",
53103
53135
  type: e.type
53104
53136
  };
53105
- return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n), pK(n.tag + "." + n.classes.join("."), UK(n.attributes), n.content);
53137
+ return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n), hK(n.tag + "." + n.classes.join("."), GK(n.attributes), n.content);
53106
53138
  }
53107
- function HK(e) {
53139
+ function WK(e) {
53108
53140
  return e;
53109
53141
  }
53110
- function UK(e) {
53142
+ function GK(e) {
53111
53143
  let t;
53112
- for (t in e) Object.hasOwn(e, t) && (e[t] = xK(e[t]));
53144
+ for (t in e) Object.hasOwn(e, t) && (e[t] = CK(e[t]));
53113
53145
  return e;
53114
53146
  }
53115
- $.register(BW), $.register(VW), $.register(HW), $.register(UW), $.register(WW), $.register(GW), $.register(KW), $.register(qW), $.register(JW), $.register(YW), $.register(XW), $.register(ZW), $.register(QW), $.register($W), $.register(eG), $.register(tG), $.register(nG), $.register(rG), $.register(iG), $.register(aG), $.register(oG), $.register(sG), $.register(cG), $.register(lG), $.register(uG), $.register(dG), $.register(fG), $.register(pG), $.register(mG), $.register(hG), $.register(gG), $.register(_G), $.register(vG), $.register(yG), $.register(bG), $.register(xG);
53147
+ $.register(HW), $.register(UW), $.register(WW), $.register(GW), $.register(KW), $.register(qW), $.register(JW), $.register(YW), $.register(XW), $.register(ZW), $.register(QW), $.register($W), $.register(eG), $.register(tG), $.register(nG), $.register(rG), $.register(iG), $.register(aG), $.register(oG), $.register(sG), $.register(cG), $.register(lG), $.register(uG), $.register(dG), $.register(fG), $.register(pG), $.register(mG), $.register(hG), $.register(gG), $.register(_G), $.register(vG), $.register(yG), $.register(bG), $.register(xG), $.register(SG), $.register(CG);
53116
53148
  //#endregion
53117
53149
  //#region src/lib/global-scroll-listener.ts
53118
- var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", qK = (e) => {
53119
- Array.from(WK).forEach((t) => t(e));
53120
- }, JK = () => {
53121
- GK || !KK() || (document.addEventListener("scroll", qK, {
53150
+ var KK = /* @__PURE__ */ new Set(), qK = !1, JK = () => typeof document < "u", YK = (e) => {
53151
+ Array.from(KK).forEach((t) => t(e));
53152
+ }, XK = () => {
53153
+ qK || !JK() || (document.addEventListener("scroll", YK, {
53122
53154
  capture: !0,
53123
53155
  passive: !0
53124
- }), GK = !0);
53125
- }, YK = () => {
53126
- !GK || !KK() || (document.removeEventListener("scroll", qK, !0), GK = !1);
53127
- }, XK = (e) => {
53128
- if (!KK()) return () => void 0;
53156
+ }), qK = !0);
53157
+ }, ZK = () => {
53158
+ !qK || !JK() || (document.removeEventListener("scroll", YK, !0), qK = !1);
53159
+ }, QK = (e) => {
53160
+ if (!JK()) return () => void 0;
53129
53161
  let t = !0;
53130
- return WK.add(e), JK(), () => {
53131
- t && (t = !1, WK.delete(e), WK.size === 0 && YK());
53162
+ return KK.add(e), XK(), () => {
53163
+ t && (t = !1, KK.delete(e), KK.size === 0 && ZK());
53132
53164
  };
53133
- }, ZK = (e) => e ? e.closest(".zt-md-editor") ?? e : null, QK = (e, t, n) => {
53165
+ }, $K = (e) => e ? e.closest(".zt-md-editor") ?? e : null, eq = (e, t, n) => {
53134
53166
  let r = typeof window > "u" ? e.bottom : window.innerHeight, i = n?.top ?? 0, a = n?.bottom ?? r, o = e.top - i, s = a - e.bottom;
53135
53167
  return s < t && o > s ? "top" : "bottom";
53136
- }, $K = (e, t) => {
53168
+ }, tq = (e, t) => {
53137
53169
  let n = t.getBoundingClientRect();
53138
53170
  return {
53139
53171
  anchorTopInContent: e.top - n.top + t.scrollTop,
@@ -53141,28 +53173,28 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53141
53173
  anchorLeftInContent: e.left - n.left + t.scrollLeft,
53142
53174
  anchorRightInContent: e.right - n.left + t.scrollLeft
53143
53175
  };
53144
- }, eq = (e) => {
53176
+ }, nq = (e) => {
53145
53177
  let { anchor: t, overlaySize: n, horizontalAlign: r = "start" } = e, i = t.anchorRightInContent ?? t.anchorLeftInContent;
53146
53178
  return r === "end" ? i - n.width : r === "center" ? t.anchorLeftInContent + (i - t.anchorLeftInContent - n.width) / 2 : t.anchorLeftInContent;
53147
- }, tq = (e) => {
53148
- let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u = eq(e), d = Math.min(Math.max(u, c), Math.max(c, l)), f = i === "top" ? n.anchorTopInContent - (r.height ?? 0) - a : n.anchorBottomInContent + a;
53179
+ }, rq = (e) => {
53180
+ let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u = nq(e), d = Math.min(Math.max(u, c), Math.max(c, l)), f = i === "top" ? n.anchorTopInContent - (r.height ?? 0) - a : n.anchorBottomInContent + a;
53149
53181
  return {
53150
53182
  left: s.left + d - t.scrollLeft,
53151
53183
  top: s.top + f - t.scrollTop
53152
53184
  };
53153
- }, nq = (e, t) => {
53154
- let n = tq(e), r = t.getBoundingClientRect();
53185
+ }, iq = (e, t) => {
53186
+ let n = rq(e), r = t.getBoundingClientRect();
53155
53187
  return {
53156
53188
  left: n.left - r.left,
53157
53189
  top: n.top - r.top
53158
53190
  };
53159
- }, rq = (e) => {
53191
+ }, aq = (e) => {
53160
53192
  let t = 0, n = null, r = null, i = () => {
53161
53193
  typeof window > "u" || (t && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
53162
53194
  t = 0, e();
53163
53195
  }));
53164
53196
  }, a = () => {
53165
- window.addEventListener("resize", i), r ||= XK(i);
53197
+ window.addEventListener("resize", i), r ||= QK(i);
53166
53198
  }, o = () => {
53167
53199
  window.removeEventListener("resize", i), r?.(), r = null;
53168
53200
  }, s = (e) => {
@@ -53177,16 +53209,16 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53177
53209
  typeof window < "u" && t && (window.cancelAnimationFrame(t), t = 0), o(), s(null);
53178
53210
  }
53179
53211
  };
53180
- }, iq = (e, t, n, r) => {
53212
+ }, oq = (e, t, n, r) => {
53181
53213
  let i = t.top - r.top, a = r.bottom - t.bottom;
53182
53214
  return e === "top" ? i < n && a > i ? "bottom" : "top" : a < n && i > a ? "top" : "bottom";
53183
- }, aq = ({ open: e, portalContainer: t, editorWrapper: n, defaultPlacement: r = "bottom", horizontalAlign: i = "start", offsetY: a = 8, boundaryInset: s = 2, fallbackWidth: u, fallbackHeight: f, onOutside: p }) => {
53215
+ }, sq = ({ open: e, portalContainer: t, editorWrapper: n, defaultPlacement: r = "bottom", horizontalAlign: i = "start", offsetY: a = 8, boundaryInset: s = 2, fallbackWidth: u, fallbackHeight: f, onOutside: p }) => {
53184
53216
  let m = d(null), h = d(null), g = d(e), _ = o(() => {
53185
53217
  let e = m.current, o = h.current;
53186
53218
  if (!g.current || !e || !o || !t || !n) return;
53187
- let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ = iq(r, c, p, l), v = nq({
53219
+ let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ = oq(r, c, p, l), v = iq({
53188
53220
  wrapper: n,
53189
- anchor: $K(c, n),
53221
+ anchor: tq(c, n),
53190
53222
  overlaySize: {
53191
53223
  width: d,
53192
53224
  height: p
@@ -53217,7 +53249,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53217
53249
  _();
53218
53250
  }, [e, _]), c(() => {
53219
53251
  if (!e) return;
53220
- let t = rq(_);
53252
+ let t = aq(_);
53221
53253
  return t.bindGlobal(), t.bindWrapper(n ?? null), t.schedule(), () => {
53222
53254
  t.destroy();
53223
53255
  };
@@ -53240,7 +53272,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53240
53272
  panelRef: v,
53241
53273
  updatePosition: _
53242
53274
  };
53243
- }, oq = ({ panel: e, portalContainer: t, className: n, role: r, onMouseDown: a, children: o }) => !e.open || !t ? null : _(i("div", {
53275
+ }, cq = ({ panel: e, portalContainer: t, className: n, role: r, onMouseDown: a, children: o }) => !e.open || !t ? null : _(i("div", {
53244
53276
  ref: e.panelRef,
53245
53277
  role: r,
53246
53278
  className: n,
@@ -53249,7 +53281,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53249
53281
  visibility: "hidden"
53250
53282
  },
53251
53283
  onMouseDown: a
53252
- }, o), t), sq = "code_block", cq = "ZT_MD_CODE_BLOCK_LANGUAGE_PICKER", lq = 8, uq = 96, dq = 26, fq = 224, pq = 220, mq = {
53284
+ }, o), t), lq = "code_block", uq = "ZT_MD_CODE_BLOCK_LANGUAGE_PICKER", dq = 8, fq = 96, pq = 26, mq = 224, hq = 220, gq = {
53253
53285
  javascript: "JavaScript",
53254
53286
  typescript: "TypeScript",
53255
53287
  jsx: "JSX",
@@ -53266,46 +53298,46 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53266
53298
  yml: "YAML",
53267
53299
  sql: "SQL",
53268
53300
  xml: "XML"
53269
- }, hq = (e) => {
53301
+ }, _q = (e) => {
53270
53302
  let t = SW(e);
53271
- return mq[t] ?? t;
53272
- }, gq = (e) => {
53303
+ return gq[t] ?? t;
53304
+ }, vq = (e) => {
53273
53305
  let t = $.listLanguages(), n = [...new Set(t.map((e) => SW(e)).filter((e) => e !== yW))].sort((e, t) => e.localeCompare(t));
53274
53306
  return [{
53275
53307
  value: yW,
53276
53308
  label: e.codeBlockLanguagePlainText
53277
53309
  }, ...n.map((e) => ({
53278
53310
  value: e,
53279
- label: hq(e)
53311
+ label: _q(e)
53280
53312
  }))];
53281
- }, _q = (e) => {
53313
+ }, yq = (e) => {
53282
53314
  let t = e.state.selection.$from;
53283
53315
  for (let e = t.depth; e >= 0; --e) {
53284
53316
  let n = t.node(e);
53285
- if (n.type.name === sq) return {
53317
+ if (n.type.name === lq) return {
53286
53318
  position: e === 0 ? 0 : t.before(e),
53287
53319
  node: n
53288
53320
  };
53289
53321
  }
53290
53322
  return null;
53291
- }, vq = (e, t) => {
53323
+ }, bq = (e, t) => {
53292
53324
  let n = e.nodeDOM(t);
53293
53325
  return n instanceof HTMLPreElement ? n : n instanceof HTMLElement ? n.querySelector("pre") : null;
53294
- }, yq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, bq = (e) => {
53295
- let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g = SW(e.currentLanguage), _ = hq(g), v = u(() => gq(e.messages), [e.messages]), y = u(() => {
53326
+ }, xq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Sq = (e) => {
53327
+ let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g = SW(e.currentLanguage), _ = _q(g), v = u(() => vq(e.messages), [e.messages]), y = u(() => {
53296
53328
  let e = a.trim().toLowerCase();
53297
53329
  return e ? v.filter((t) => {
53298
53330
  let n = t.label.toLowerCase(), r = t.value.toLowerCase();
53299
53331
  return n.includes(e) || r.includes(e);
53300
53332
  }) : v;
53301
- }, [a, v]), b = aq({
53333
+ }, [a, v]), b = sq({
53302
53334
  open: t,
53303
53335
  portalContainer: e.portalContainer,
53304
53336
  editorWrapper: e.collisionBoundary,
53305
53337
  horizontalAlign: "end",
53306
53338
  offsetY: 6,
53307
- fallbackWidth: fq,
53308
- fallbackHeight: pq,
53339
+ fallbackWidth: mq,
53340
+ fallbackHeight: hq,
53309
53341
  onOutside: () => r(!1)
53310
53342
  }), x = (e) => e instanceof HTMLElement ? e.closest("input, textarea, [contenteditable]:not([contenteditable=\"false\"])") !== null : !1, S = (e) => {
53311
53343
  x(e.target) || e.preventDefault();
@@ -53354,7 +53386,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53354
53386
  size: 14,
53355
53387
  strokeWidth: 2,
53356
53388
  "aria-hidden": "true"
53357
- }))), i(oq, {
53389
+ }))), i(cq, {
53358
53390
  panel: b,
53359
53391
  portalContainer: e.portalContainer,
53360
53392
  className: "zt-md-code-language-picker-panel",
@@ -53397,28 +53429,28 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53397
53429
  strokeWidth: 2,
53398
53430
  "aria-hidden": "true"
53399
53431
  }) : null)) : i("div", { className: "zt-md-code-language-picker-empty" }, "-"))));
53400
- }, xq = class {
53432
+ }, Cq = class {
53401
53433
  constructor(e, t, n) {
53402
- this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler = rq(() => {
53434
+ this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler = aq(() => {
53403
53435
  this.hasPositionContext && this.updateOverlayPosition();
53404
53436
  }), this.handlePickerLayoutChange = () => {
53405
53437
  this.hasPositionContext && this.updateOverlayPosition();
53406
- }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = ZK(e.dom), this.host = document.createElement("span"), this.host.className = "zt-md-code-language-picker-host", this.hostRoot = m(this.host), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
53438
+ }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = $K(e.dom), this.host = document.createElement("span"), this.host.className = "zt-md-code-language-picker-host", this.hostRoot = m(this.host), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
53407
53439
  }
53408
53440
  applyLanguage(e) {
53409
53441
  if (this.currentCodeBlockPosition === null) return;
53410
53442
  let t = this.view.state.doc.nodeAt(this.currentCodeBlockPosition);
53411
- if (!t || t.type.name !== sq) return;
53443
+ if (!t || t.type.name !== lq) return;
53412
53444
  let n = SW(e), r = {
53413
53445
  ...t.attrs,
53414
53446
  language: n
53415
53447
  };
53416
- if (SW(String(t.attrs.language ?? "")) === n) return;
53448
+ if (String(t.attrs.language ?? "") === n) return;
53417
53449
  let i = this.view.state.tr.setNodeMarkup(this.currentCodeBlockPosition, t.type, r, t.marks);
53418
53450
  this.view.dispatch(i), this.view.focus();
53419
53451
  }
53420
53452
  render(e) {
53421
- this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(bq, {
53453
+ this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(Sq, {
53422
53454
  currentLanguage: e,
53423
53455
  messages: this.messages,
53424
53456
  portalContainer: this.portalContainer,
@@ -53435,14 +53467,14 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53435
53467
  }
53436
53468
  updateOverlayPosition() {
53437
53469
  if (!this.editorWrapper || !this.currentPreElement || this.host.parentElement !== this.portalContainer) return;
53438
- let e = this.currentPreElement.getBoundingClientRect(), t = $K(e, this.editorWrapper), n = t.anchorRightInContent ?? t.anchorLeftInContent + e.width, r = Math.max(0, Math.min(e.width, this.editorWrapper.clientWidth) - lq * 2);
53470
+ let e = this.currentPreElement.getBoundingClientRect(), t = tq(e, this.editorWrapper), n = t.anchorRightInContent ?? t.anchorLeftInContent + e.width, r = Math.max(0, Math.min(e.width, this.editorWrapper.clientWidth) - dq * 2);
53439
53471
  this.host.style.setProperty("--zt-md-code-language-picker-max-width", `${r}px`);
53440
- let i = this.host.offsetWidth || Math.min(uq, r), a = this.host.offsetHeight || dq, o = nq({
53472
+ let i = this.host.offsetWidth || Math.min(fq, r), a = this.host.offsetHeight || pq, o = iq({
53441
53473
  wrapper: this.editorWrapper,
53442
53474
  anchor: {
53443
- anchorLeftInContent: n - i - lq,
53444
- anchorTopInContent: t.anchorTopInContent + e.height - a - lq,
53445
- anchorBottomInContent: t.anchorTopInContent + e.height - a - lq
53475
+ anchorLeftInContent: n - i - dq,
53476
+ anchorTopInContent: t.anchorTopInContent + e.height - a - dq,
53477
+ anchorBottomInContent: t.anchorTopInContent + e.height - a - dq
53446
53478
  },
53447
53479
  overlaySize: { width: i },
53448
53480
  placement: "top",
@@ -53452,16 +53484,16 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53452
53484
  this.host.style.left = `${o.left}px`, this.host.style.top = `${o.top}px`;
53453
53485
  }
53454
53486
  update(e) {
53455
- if (this.view = e, !yq(e) || !this.editorWrapper) {
53487
+ if (this.view = e, !xq(e) || !this.editorWrapper) {
53456
53488
  this.detach();
53457
53489
  return;
53458
53490
  }
53459
- let t = _q(e);
53491
+ let t = yq(e);
53460
53492
  if (!t) {
53461
53493
  this.detach();
53462
53494
  return;
53463
53495
  }
53464
- let n = vq(e, t.position);
53496
+ let n = bq(e, t.position);
53465
53497
  if (!n) {
53466
53498
  this.detach();
53467
53499
  return;
@@ -53474,13 +53506,13 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53474
53506
  destroy() {
53475
53507
  this.detach(), this.repositionScheduler.destroy(), this.hostRoot.unmount();
53476
53508
  }
53477
- }, Sq = (e, t) => t_(() => new hr({
53478
- key: new vr(cq),
53479
- view: (n) => new xq(n, e, t)
53480
- })), Cq = "code_block", wq = "a", Tq = "zt-md-code-block-mod-a-select", Eq = (e) => e.key.toLowerCase() !== wq || e.defaultPrevented || e.altKey || e.shiftKey || !e.ctrlKey && !e.metaKey, Dq = (e) => {
53509
+ }, wq = (e, t) => t_(() => new hr({
53510
+ key: new vr(uq),
53511
+ view: (n) => new Cq(n, e, t)
53512
+ })), Tq = "code_block", Eq = "a", Dq = "zt-md-code-block-mod-a-select", Oq = (e) => e.key.toLowerCase() !== Eq || e.defaultPrevented || e.altKey || e.shiftKey || !e.ctrlKey && !e.metaKey, kq = (e) => {
53481
53513
  for (let t = e.depth; t >= 0; --t) {
53482
53514
  let n = e.node(t);
53483
- if (n.type.name !== Cq) continue;
53515
+ if (n.type.name !== Tq) continue;
53484
53516
  let r = t === 0 ? 0 : e.before(t);
53485
53517
  return {
53486
53518
  codeBlockStart: r + 1,
@@ -53488,47 +53520,47 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53488
53520
  };
53489
53521
  }
53490
53522
  return null;
53491
- }, Oq = (e, t) => {
53492
- let n = e.state.selection.$from, r = Dq(n);
53523
+ }, Aq = (e, t) => {
53524
+ let n = e.state.selection.$from, r = kq(n);
53493
53525
  if (!r) return !1;
53494
53526
  let i = e.state.tr.setSelection(A.create(e.state.doc, r.codeBlockStart, r.codeBlockEnd));
53495
53527
  return t.preventDefault(), e.dispatch(i), !0;
53496
- }, kq = t_(() => new hr({
53497
- key: new vr(Tq),
53498
- props: { handleKeyDown: (e, t) => Eq(t) ? !1 : Oq(e, t) }
53499
- })), Aq = "code_block", jq = "ZT_MD_CODE_BLOCK_PRISM", Mq = (e, t = []) => e.flatMap((e) => {
53528
+ }, jq = t_(() => new hr({
53529
+ key: new vr(Dq),
53530
+ props: { handleKeyDown: (e, t) => Oq(t) ? !1 : Aq(e, t) }
53531
+ })), Mq = "code_block", Nq = "ZT_MD_CODE_BLOCK_PRISM", Pq = (e, t = []) => e.flatMap((e) => {
53500
53532
  if (e.type === "element") {
53501
53533
  let n = [...t, ...e.properties?.className ?? []];
53502
- return Mq(e.children ?? [], n);
53534
+ return Pq(e.children ?? [], n);
53503
53535
  }
53504
53536
  return [{
53505
53537
  text: e.value ?? "",
53506
53538
  className: t
53507
53539
  }];
53508
- }), Nq = (e, t) => t.listLanguages().includes(e), Pq = (e, t) => {
53540
+ }), Fq = (e, t) => t.listLanguages().includes(e), Iq = (e, t) => {
53509
53541
  let n = [];
53510
- return Fu((e) => e.type.name === Aq)(e).forEach((e) => {
53542
+ return Fu((e) => e.type.name === Mq)(e).forEach((e) => {
53511
53543
  let r = String(e.node.attrs.language ?? "");
53512
- if (!r || !Nq(r, t)) return;
53544
+ if (!r || !Fq(r, t)) return;
53513
53545
  let i = e.pos + 1;
53514
- Mq(t.highlight(e.node.textContent, r).children).forEach((e) => {
53546
+ Pq(t.highlight(e.node.textContent, r).children).forEach((e) => {
53515
53547
  let t = i + e.text.length;
53516
53548
  e.className.length > 0 && n.push(Hm.inline(i, t, { class: e.className.join(" ") })), i = t;
53517
53549
  });
53518
53550
  }), Gm.create(e, n);
53519
- }, Fq = t_(() => {
53551
+ }, Lq = t_(() => {
53520
53552
  let e = $;
53521
53553
  return new hr({
53522
- key: new vr(jq),
53554
+ key: new vr(Nq),
53523
53555
  state: {
53524
- init: (t, n) => Pq(n.doc, e),
53525
- apply: (t, n) => t.docChanged ? Pq(t.doc, e) : n.map(t.mapping, t.doc)
53556
+ init: (t, n) => Iq(n.doc, e),
53557
+ apply: (t, n) => t.docChanged ? Iq(t.doc, e) : n.map(t.mapping, t.doc)
53526
53558
  },
53527
53559
  props: { decorations(e) {
53528
53560
  return this.getState(e);
53529
53561
  } }
53530
53562
  });
53531
- }), Iq = class {
53563
+ }), Rq = class {
53532
53564
  #e;
53533
53565
  #t;
53534
53566
  #n;
@@ -53593,7 +53625,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53593
53625
  #d;
53594
53626
  #f;
53595
53627
  #p;
53596
- }, Lq = "zt-md-selection-tooltip", Rq = (e) => [
53628
+ }, zq = "zt-md-selection-tooltip", Bq = (e) => [
53597
53629
  {
53598
53630
  command: "strong",
53599
53631
  icon: JE,
@@ -53624,7 +53656,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53624
53656
  title: e.selectionTooltipLinkTitle,
53625
53657
  markNames: ["link"]
53626
53658
  }
53627
- ], zq = {
53659
+ ], Vq = {
53628
53660
  paragraph: jD,
53629
53661
  heading1: iD,
53630
53662
  heading2: aD,
@@ -53637,68 +53669,68 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53637
53669
  taskList: hD,
53638
53670
  blockquote: kD,
53639
53671
  codeBlock: $E
53640
- }, Bq = (e) => [
53672
+ }, Hq = (e) => [
53641
53673
  {
53642
53674
  command: "paragraph",
53643
- icon: zq.paragraph,
53675
+ icon: Vq.paragraph,
53644
53676
  label: e.selectionTooltipTransformParagraphLabel
53645
53677
  },
53646
53678
  {
53647
53679
  command: "heading1",
53648
- icon: zq.heading1,
53680
+ icon: Vq.heading1,
53649
53681
  label: e.selectionTooltipTransformHeading1Label
53650
53682
  },
53651
53683
  {
53652
53684
  command: "heading2",
53653
- icon: zq.heading2,
53685
+ icon: Vq.heading2,
53654
53686
  label: e.selectionTooltipTransformHeading2Label
53655
53687
  },
53656
53688
  {
53657
53689
  command: "heading3",
53658
- icon: zq.heading3,
53690
+ icon: Vq.heading3,
53659
53691
  label: e.selectionTooltipTransformHeading3Label
53660
53692
  },
53661
53693
  {
53662
53694
  command: "heading4",
53663
- icon: zq.heading4,
53695
+ icon: Vq.heading4,
53664
53696
  label: e.selectionTooltipTransformHeading4Label
53665
53697
  },
53666
53698
  {
53667
53699
  command: "heading5",
53668
- icon: zq.heading5,
53700
+ icon: Vq.heading5,
53669
53701
  label: e.selectionTooltipTransformHeading5Label
53670
53702
  },
53671
53703
  {
53672
53704
  command: "heading6",
53673
- icon: zq.heading6,
53705
+ icon: Vq.heading6,
53674
53706
  label: e.selectionTooltipTransformHeading6Label
53675
53707
  },
53676
53708
  {
53677
53709
  command: "bulletList",
53678
- icon: zq.bulletList,
53710
+ icon: Vq.bulletList,
53679
53711
  label: e.selectionTooltipTransformBulletListLabel
53680
53712
  },
53681
53713
  {
53682
53714
  command: "orderedList",
53683
- icon: zq.orderedList,
53715
+ icon: Vq.orderedList,
53684
53716
  label: e.selectionTooltipTransformOrderedListLabel
53685
53717
  },
53686
53718
  {
53687
53719
  command: "taskList",
53688
- icon: zq.taskList,
53720
+ icon: Vq.taskList,
53689
53721
  label: e.selectionTooltipTransformTaskListLabel
53690
53722
  },
53691
53723
  {
53692
53724
  command: "blockquote",
53693
- icon: zq.blockquote,
53725
+ icon: Vq.blockquote,
53694
53726
  label: e.selectionTooltipTransformBlockquoteLabel
53695
53727
  },
53696
53728
  {
53697
53729
  command: "codeBlock",
53698
- icon: zq.codeBlock,
53730
+ icon: Vq.codeBlock,
53699
53731
  label: e.selectionTooltipTransformCodeBlockLabel
53700
53732
  }
53701
- ], Vq = (e, t) => e(t.state, t.dispatch, t), Hq = (e, t) => {
53733
+ ], Uq = (e, t) => e(t.state, t.dispatch, t), Wq = (e, t) => {
53702
53734
  let n = e?.state?.selection?.$from;
53703
53735
  if (!n || !e?.dispatch) return !1;
53704
53736
  for (let r = n.depth; r > 0; --r) {
@@ -53712,17 +53744,17 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53712
53744
  })), !0;
53713
53745
  }
53714
53746
  return !1;
53715
- }, Uq = {
53747
+ }, Gq = {
53716
53748
  heading1: 1,
53717
53749
  heading2: 2,
53718
53750
  heading3: 3,
53719
53751
  heading4: 4,
53720
53752
  heading5: 5,
53721
53753
  heading6: 6
53722
- }, Wq = {
53754
+ }, Kq = {
53723
53755
  bulletList: "bullet_list",
53724
53756
  orderedList: "ordered_list"
53725
- }, Gq = [
53757
+ }, qq = [
53726
53758
  "codeBlock",
53727
53759
  "heading1",
53728
53760
  "heading2",
@@ -53735,35 +53767,35 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53735
53767
  "bulletList",
53736
53768
  "blockquote",
53737
53769
  "paragraph"
53738
- ], Kq = async (e, t) => {
53770
+ ], Jq = async (e, t) => {
53739
53771
  if (!e?.state || !e?.dispatch) return !1;
53740
53772
  let n = e.state.schema.nodes;
53741
53773
  if (t === "paragraph") {
53742
53774
  let t = n.paragraph;
53743
- return t ? Vq(Gl(t), e) : !1;
53775
+ return t ? Uq(Gl(t), e) : !1;
53744
53776
  }
53745
- if (t in Uq) {
53746
- let r = n.heading, i = Uq[t];
53747
- return !r || typeof i != "number" ? !1 : Vq(Gl(r, { level: i }), e);
53777
+ if (t in Gq) {
53778
+ let r = n.heading, i = Gq[t];
53779
+ return !r || typeof i != "number" ? !1 : Uq(Gl(r, { level: i }), e);
53748
53780
  }
53749
53781
  if (t === "blockquote") {
53750
53782
  let t = n.blockquote;
53751
- return t ? Vq(Wl(t), e) : !1;
53783
+ return t ? Uq(Wl(t), e) : !1;
53752
53784
  }
53753
53785
  if (t === "taskList") {
53754
53786
  let t = n.bullet_list;
53755
- return !t || !Vq(Iv(t), e) ? !1 : Hq(e, !1);
53787
+ return !t || !Uq(Iv(t), e) ? !1 : Wq(e, !1);
53756
53788
  }
53757
53789
  if (t === "codeBlock") {
53758
53790
  let t = n.code_block;
53759
- return t ? Vq(Gl(t, { language: "text" }), e) : !1;
53791
+ return t ? Uq(Gl(t, { language: "text" }), e) : !1;
53760
53792
  }
53761
- if (t in Wq) {
53762
- let r = n[Wq[t]];
53763
- return r ? Vq(Iv(r), e) : !1;
53793
+ if (t in Kq) {
53794
+ let r = n[Kq[t]];
53795
+ return r ? Uq(Iv(r), e) : !1;
53764
53796
  }
53765
53797
  return !1;
53766
- }, qq = (e) => {
53798
+ }, Yq = (e) => {
53767
53799
  let t = e.state.selection.$from, n = /* @__PURE__ */ new Set();
53768
53800
  for (let e = t.depth; e > 0; --e) {
53769
53801
  let r = t.node(e), i = r.type.name;
@@ -53802,34 +53834,34 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53802
53834
  i === "paragraph" && n.add("paragraph");
53803
53835
  }
53804
53836
  return n.has("taskList") && n.delete("bulletList"), n.size === 0 && n.add("paragraph"), n;
53805
- }, Jq = (e) => {
53806
- let t = qq(e);
53807
- return Gq.find((e) => t.has(e)) || "paragraph";
53808
- }, Yq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Xq = (e, t) => {
53837
+ }, Xq = (e) => {
53838
+ let t = Yq(e);
53839
+ return qq.find((e) => t.has(e)) || "paragraph";
53840
+ }, Zq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Qq = (e, t) => {
53809
53841
  let n = e.state.schema.marks, r = t.find((e) => n[e]);
53810
53842
  return r ? n[r] ?? null : null;
53811
- }, Zq = (e, t) => {
53843
+ }, $q = (e, t) => {
53812
53844
  let { from: n, to: r } = e.selection;
53813
53845
  return e.doc.rangeHasMark(n, r, t);
53814
- }, Qq = (e, t) => {
53846
+ }, eJ = (e, t) => {
53815
53847
  let { from: n, to: r } = e.selection, i = "";
53816
53848
  return e.doc.nodesBetween(n, r, (e) => {
53817
53849
  let n = e.marks.find((e) => e.type === t);
53818
53850
  return n ? (i = typeof n.attrs.href == "string" ? n.attrs.href : "", !1) : !0;
53819
53851
  }), i;
53820
- }, $q = (e) => {
53852
+ }, tJ = (e) => {
53821
53853
  Jl(e.markType)(e.view.state, e.view.dispatch, e.view), e.view.focus();
53822
- }, eJ = (e) => {
53854
+ }, nJ = (e) => {
53823
53855
  e.toggleLinkPopover(e.view);
53824
- }, tJ = (e, t) => {
53856
+ }, rJ = (e, t) => {
53825
53857
  ({
53826
- strong: $q,
53827
- em: $q,
53828
- strike: $q,
53829
- inlineCode: $q,
53830
- link: eJ
53858
+ strong: tJ,
53859
+ em: tJ,
53860
+ strike: tJ,
53861
+ inlineCode: tJ,
53862
+ link: nJ
53831
53863
  })[e](t);
53832
- }, nJ = (e, t, n, r, a) => {
53864
+ }, iJ = (e, t, n, r, a) => {
53833
53865
  let o = document.createElement("button");
53834
53866
  o.type = "button", o.className = "zt-md-selection-tooltip-button", o.dataset.command = e.command, o.title = e.title, o.setAttribute("aria-label", e.title);
53835
53867
  let s = document.createElement("span");
@@ -53843,20 +53875,20 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53843
53875
  }), o.addEventListener("click", (i) => {
53844
53876
  i.preventDefault();
53845
53877
  let a = n();
53846
- !a || a.state.selection.empty || tJ(e.command, {
53878
+ !a || a.state.selection.empty || rJ(e.command, {
53847
53879
  view: a,
53848
53880
  markType: t,
53849
53881
  toggleLinkPopover: r
53850
53882
  });
53851
53883
  }), o;
53852
- }, rJ = (e, t, n, r, i, a) => {
53884
+ }, aJ = (e, t, n, r, i, a) => {
53853
53885
  let o = document.createElement("div");
53854
53886
  return o.className = "zt-md-selection-tooltip", o.append(i), t.forEach((t) => {
53855
- let i = Xq(e, t.markNames);
53856
- i && t.command !== "link" && o.append(nJ(t, i, n, r, a));
53887
+ let i = Qq(e, t.markNames);
53888
+ i && t.command !== "link" && o.append(iJ(t, i, n, r, a));
53857
53889
  }), o;
53858
- }, iJ = (e) => {
53859
- let t = aq({
53890
+ }, oJ = (e) => {
53891
+ let t = sq({
53860
53892
  open: e.open,
53861
53893
  portalContainer: e.portalContainer,
53862
53894
  editorWrapper: e.collisionBoundary,
@@ -53872,7 +53904,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53872
53904
  e.onOpenChange(!1);
53873
53905
  return;
53874
53906
  }
53875
- Kq(n, t).then(() => {
53907
+ Jq(n, t).then(() => {
53876
53908
  e.onOpenChange(!1), n.focus();
53877
53909
  });
53878
53910
  };
@@ -53895,7 +53927,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53895
53927
  size: e.iconSize,
53896
53928
  strokeWidth: e.iconStrokeWidth,
53897
53929
  "aria-hidden": "true"
53898
- })), i(oq, {
53930
+ })), i(cq, {
53899
53931
  panel: t,
53900
53932
  portalContainer: e.portalContainer,
53901
53933
  className: "zt-md-selection-transform-popover !w-[176px] p-1",
@@ -53916,7 +53948,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53916
53948
  "aria-hidden": "true"
53917
53949
  }), i("span", { className: "zt-md-selection-transform-item-label" }, t.label));
53918
53950
  }))));
53919
- }, aJ = (e) => {
53951
+ }, sJ = (e) => {
53920
53952
  let [t, r] = f(""), a = d(null), o = (e) => {
53921
53953
  e.preventDefault();
53922
53954
  }, s = (t) => {
@@ -53925,7 +53957,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53925
53957
  e.onOpenChange(!1);
53926
53958
  return;
53927
53959
  }
53928
- let r = Xq(n, ["link"]);
53960
+ let r = Qq(n, ["link"]);
53929
53961
  if (!r) {
53930
53962
  e.onOpenChange(!1);
53931
53963
  return;
@@ -53937,13 +53969,13 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53937
53969
  e.onOpenChange(!1);
53938
53970
  return;
53939
53971
  }
53940
- let n = e.getCurrentView(), i = n ? Xq(n, ["link"]) : null;
53972
+ let n = e.getCurrentView(), i = n ? Qq(n, ["link"]) : null;
53941
53973
  if (!n || !i || n.state.selection.empty) {
53942
53974
  e.onOpenChange(!1);
53943
53975
  return;
53944
53976
  }
53945
- r(WO(Qq(n.state, i))), e.onOpenChange(!0);
53946
- }, u = aq({
53977
+ r(WO(eJ(n.state, i))), e.onOpenChange(!0);
53978
+ }, u = sq({
53947
53979
  open: e.open,
53948
53980
  portalContainer: e.portalContainer,
53949
53981
  editorWrapper: e.collisionBoundary,
@@ -53955,7 +53987,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53955
53987
  });
53956
53988
  return c(() => {
53957
53989
  if (!e.open) return;
53958
- let t = e.getCurrentView(), n = t ? Xq(t, ["link"]) : null;
53990
+ let t = e.getCurrentView(), n = t ? Qq(t, ["link"]) : null;
53959
53991
  (!t || !n || t.state.selection.empty) && e.onOpenChange(!1);
53960
53992
  }, [
53961
53993
  e.open,
@@ -53984,7 +54016,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
53984
54016
  }, i("span", { className: "zt-md-selection-tooltip-button-icon" }, i(mD, {
53985
54017
  size: e.iconSize,
53986
54018
  strokeWidth: e.iconStrokeWidth
53987
- }))), i(oq, {
54019
+ }))), i(cq, {
53988
54020
  panel: u,
53989
54021
  portalContainer: e.portalContainer,
53990
54022
  className: "zt-md-selection-link-popover w-fit min-w-0 gap-0 p-2"
@@ -54017,29 +54049,29 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54017
54049
  size: e.iconSize,
54018
54050
  strokeWidth: e.iconStrokeWidth
54019
54051
  })))));
54020
- }, oJ = (e, t, n) => {
54052
+ }, cJ = (e, t, n) => {
54021
54053
  n.forEach((n) => {
54022
- let r = Xq(t, n.markNames);
54054
+ let r = Qq(t, n.markNames);
54023
54055
  if (!r) return;
54024
54056
  let i = e.querySelector(`[data-command="${n.command}"]`);
54025
- i instanceof HTMLButtonElement && (i.dataset.active = Zq(t.state, r) ? "true" : "false");
54057
+ i instanceof HTMLButtonElement && (i.dataset.active = $q(t.state, r) ? "true" : "false");
54026
54058
  });
54027
- }, sJ = (e) => {
54059
+ }, lJ = (e) => {
54028
54060
  let { from: t, to: n } = e.state.selection, r = !1;
54029
54061
  return e.state.doc.nodesBetween(t, n, (e) => e.type.name === "code_block" ? (r = !0, !1) : !0), r;
54030
- }, cJ = (e, t, n) => (r) => {
54062
+ }, uJ = (e, t, n) => (r) => {
54031
54063
  let { selection: i, doc: a } = r.state, o = e.contains(document.activeElement);
54032
- return !Yq(r) || i.empty || !(i instanceof A) || !r.hasFocus() && !o && !t() && !n() || sJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
54033
- }, lJ = (e, t, n) => {
54034
- let r = Rq(n), a = Bq(n), o = e, s = !1, c = !1, l = !1, u = [], d = document.createElement("span"), f = m(d), p = document.createElement("span"), h = null, g = m(p), _ = t.closest(".zt-md-editor"), v = (e) => {
54064
+ return !Zq(r) || i.empty || !(i instanceof A) || !r.hasFocus() && !o && !t() && !n() || lJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
54065
+ }, dJ = (e, t, n) => {
54066
+ let r = Bq(n), a = Hq(n), o = e, s = !1, c = !1, l = !1, u = [], d = document.createElement("span"), f = m(d), p = document.createElement("span"), h = null, g = m(p), _ = t.closest(".zt-md-editor"), v = (e) => {
54035
54067
  s !== e && (s = e, S());
54036
54068
  }, y = (e) => {
54037
54069
  c !== e && (c = e, x());
54038
54070
  }, b = (e) => {
54039
54071
  e.state.selection.empty || v(!s);
54040
54072
  }, x = () => {
54041
- let e = o ? qq(o) : new Set(["paragraph"]), r = o ? Jq(o) : "paragraph", s = a.find((e) => e.command === r) ?? a[0];
54042
- f.render(i(iJ, {
54073
+ let e = o ? Yq(o) : new Set(["paragraph"]), r = o ? Xq(o) : "paragraph", s = a.find((e) => e.command === r) ?? a[0];
54074
+ f.render(i(oJ, {
54043
54075
  getCurrentView: () => o,
54044
54076
  portalContainer: t,
54045
54077
  collisionBoundary: _,
@@ -54053,7 +54085,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54053
54085
  activeCommands: e
54054
54086
  }));
54055
54087
  }, S = () => {
54056
- g.render(i(aJ, {
54088
+ g.render(i(sJ, {
54057
54089
  getCurrentView: () => o,
54058
54090
  portalContainer: t,
54059
54091
  collisionBoundary: _,
@@ -54066,9 +54098,9 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54066
54098
  onOpenChange: v,
54067
54099
  messages: n
54068
54100
  }));
54069
- }, C = rJ(e, r, () => o, b, d, u);
54070
- x(), Xq(e, ["link"]) && (C.append(p), S());
54071
- let w = cJ(C, () => s, () => c), T = new Iq({
54101
+ }, C = aJ(e, r, () => o, b, d, u);
54102
+ x(), Qq(e, ["link"]) && (C.append(p), S());
54103
+ let w = uJ(C, () => s, () => c), T = new Rq({
54072
54104
  content: C,
54073
54105
  debounce: 80,
54074
54106
  offset: 8,
@@ -54092,9 +54124,9 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54092
54124
  };
54093
54125
  return e.dom.addEventListener("blur", re), document.addEventListener("mousedown", ie, !0), {
54094
54126
  update: (e, t) => {
54095
- if (o = e, o.state.selection.empty && (v(!1), y(!1)), oJ(C, o, r), x(), h) {
54096
- let e = Xq(o, ["link"]);
54097
- h.dataset.active = e && Zq(o.state, e) ? "true" : "false";
54127
+ if (o = e, o.state.selection.empty && (v(!1), y(!1)), cJ(C, o, r), x(), h) {
54128
+ let e = Qq(o, ["link"]);
54129
+ h.dataset.active = e && $q(o.state, e) ? "true" : "false";
54098
54130
  }
54099
54131
  if (!w(o)) {
54100
54132
  T.hide(), ee();
@@ -54108,21 +54140,21 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54108
54140
  }), T.destroy(), C.remove();
54109
54141
  }
54110
54142
  };
54111
- }, uJ = (e, t) => t_(() => new hr({
54112
- key: new vr(Lq),
54113
- view: (n) => lJ(n, e, t)
54114
- })), dJ = (e, t) => e(t.state, t.dispatch, t), fJ = (e) => {
54143
+ }, fJ = (e, t) => t_(() => new hr({
54144
+ key: new vr(zq),
54145
+ view: (n) => dJ(n, e, t)
54146
+ })), pJ = (e, t) => e(t.state, t.dispatch, t), mJ = (e) => {
54115
54147
  let t = e?.state?.selection?.$from;
54116
54148
  if (!t) return !1;
54117
54149
  for (let e = t.depth; e > 0; --e) if (t.node(e)?.type?.name === "table") return !0;
54118
54150
  return !1;
54119
- }, pJ = (e, t) => {
54151
+ }, hJ = (e, t) => {
54120
54152
  let n = e?.state?.doc;
54121
54153
  if (!n || typeof t != "number") return -1;
54122
54154
  let r = Math.min(Math.max(t, 0), n.content.size), i = n.resolve(r);
54123
54155
  for (let e = i.depth; e > 0; --e) if (i.node(e)?.type?.name === "table") return i.before(e);
54124
54156
  return -1;
54125
- }, mJ = (e, t, n, r) => {
54157
+ }, gJ = (e, t, n, r) => {
54126
54158
  let i = e?.state?.schema?.nodes;
54127
54159
  if (!i) return null;
54128
54160
  let a = i.table, o = i.table_header_row, s = i.table_row, c = i.table_header, l = i.table_cell;
@@ -54132,21 +54164,21 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54132
54164
  return i.create(null, u);
54133
54165
  });
54134
54166
  return a.create(null, f);
54135
- }, hJ = async (e) => {
54136
- if (!e?.state || !e?.dispatch || fJ(e)) return !1;
54137
- let t = e.state.selection.from, n = mJ(e, 3, 3, !0);
54167
+ }, _J = async (e) => {
54168
+ if (!e?.state || !e?.dispatch || mJ(e)) return !1;
54169
+ let t = e.state.selection.from, n = gJ(e, 3, 3, !0);
54138
54170
  if (!n) return !1;
54139
54171
  e.dispatch(e.state.tr.replaceSelectionWith(n).scrollIntoView());
54140
- let r = pJ(e, t);
54141
- if (r < 0 && t > 0 && (r = pJ(e, t - 1)), r < 0) return !0;
54172
+ let r = hJ(e, t);
54173
+ if (r < 0 && t > 0 && (r = hJ(e, t - 1)), r < 0) return !0;
54142
54174
  let i = r + 2;
54143
54175
  if (i > e.state.doc.content.size) return !0;
54144
54176
  let a = A.near(e.state.doc.resolve(i), 1);
54145
54177
  return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), e.focus(), !0;
54146
- }, gJ = (e, t) => {
54178
+ }, vJ = (e, t) => {
54147
54179
  let n = e?.state?.schema?.marks ?? {}, r = t.find((e) => n[e]);
54148
54180
  return r ? n[r] ?? null : null;
54149
- }, _J = new Set([
54181
+ }, yJ = new Set([
54150
54182
  "paragraph",
54151
54183
  "heading1",
54152
54184
  "heading2",
@@ -54159,7 +54191,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54159
54191
  "taskList",
54160
54192
  "blockquote",
54161
54193
  "codeBlock"
54162
- ]), vJ = (e) => _J.has(e), yJ = async (e) => {
54194
+ ]), bJ = (e) => yJ.has(e), xJ = async (e) => {
54163
54195
  let t = e?.state?.schema?.nodes?.math_inline;
54164
54196
  if (!t || !e?.dispatch) return !1;
54165
54197
  let n = e.state.selection.from, r = t.create({ value: "" });
@@ -54167,18 +54199,18 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54167
54199
  type: "open",
54168
54200
  position: n
54169
54201
  }).scrollIntoView()), !0;
54170
- }, bJ = async (e, t) => {
54202
+ }, SJ = async (e, t) => {
54171
54203
  if (!e?.state || !e?.dispatch) return !1;
54172
54204
  let n = e.state.schema?.nodes ?? {};
54173
- if (vJ(t)) return Kq(e, t);
54205
+ if (bJ(t)) return Jq(e, t);
54174
54206
  if (t === "inlineCode") {
54175
- let t = gJ(e, ["inlineCode", "code_inline"]);
54176
- return t ? dJ(Jl(t), e) : !1;
54207
+ let t = vJ(e, ["inlineCode", "code_inline"]);
54208
+ return t ? pJ(Jl(t), e) : !1;
54177
54209
  }
54178
- if (t === "inlineMath") return yJ(e);
54210
+ if (t === "inlineMath") return xJ(e);
54179
54211
  if (t === "mathBlock") {
54180
54212
  let t = n.math_block;
54181
- if (!t || !dJ(Gl(t), e)) return !1;
54213
+ if (!t || !pJ(Gl(t), e)) return !1;
54182
54214
  let r = e.state.selection?.$from;
54183
54215
  if (!r) return !0;
54184
54216
  let i = null;
@@ -54190,8 +54222,8 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54190
54222
  let a = j.create(e.state.doc, i);
54191
54223
  return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), !0;
54192
54224
  }
54193
- return t === "table" ? hJ(e) : !1;
54194
- }, xJ = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, SJ = [
54225
+ return t === "table" ? _J(e) : !1;
54226
+ }, CJ = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, wJ = [
54195
54227
  {
54196
54228
  id: "paragraph",
54197
54229
  label: "普通文本",
@@ -54311,7 +54343,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54311
54343
  icon: "Image",
54312
54344
  command: "image"
54313
54345
  }
54314
- ], CJ = [
54346
+ ], TJ = [
54315
54347
  {
54316
54348
  id: "paragraph",
54317
54349
  label: "Paragraph",
@@ -54431,7 +54463,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54431
54463
  icon: "Image",
54432
54464
  command: "image"
54433
54465
  }
54434
- ], wJ = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? CJ : SJ, TJ = (e) => {
54466
+ ], EJ = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? TJ : wJ, DJ = (e) => {
54435
54467
  let t = e?.state?.selection?.$from;
54436
54468
  if (!t) return !1;
54437
54469
  let n = String(t.parent?.type?.name ?? "");
@@ -54441,17 +54473,17 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54441
54473
  if (n === "table" || n === "table_cell" || n === "table_header") return !0;
54442
54474
  }
54443
54475
  return !1;
54444
- }, EJ = (e) => {
54476
+ }, OJ = (e) => {
54445
54477
  let t = e?.state, n = t?.selection?.$from;
54446
54478
  if (!t || !n) return "";
54447
54479
  let r = n.start(), i = n.pos;
54448
54480
  return t.doc.textBetween(r, i, "\n", "\n");
54449
- }, DJ = (e) => {
54450
- let t = EJ(e), n = t.lastIndexOf("/");
54481
+ }, kJ = (e) => {
54482
+ let t = OJ(e), n = t.lastIndexOf("/");
54451
54483
  if (n < 0) return null;
54452
54484
  let r = t.slice(n + 1);
54453
54485
  return /\s/.test(r) ? null : r;
54454
- }, OJ = (e, t) => {
54486
+ }, AJ = (e, t) => {
54455
54487
  if (t === null || t.length === 0) return e;
54456
54488
  let n = t.toLowerCase();
54457
54489
  return e.filter((e) => [
@@ -54460,24 +54492,24 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54460
54492
  e.command,
54461
54493
  e.id
54462
54494
  ].some((e) => String(e).toLowerCase().startsWith(n)));
54463
- }, kJ = (e, t) => {
54464
- if (!xJ(e)) return {
54495
+ }, jJ = (e, t) => {
54496
+ if (!CJ(e)) return {
54465
54497
  visibleItems: [],
54466
54498
  shouldShow: !1
54467
54499
  };
54468
- let n = DJ(e), r = OJ(t, n);
54500
+ let n = kJ(e), r = AJ(t, n);
54469
54501
  return {
54470
54502
  visibleItems: r,
54471
- shouldShow: !TJ(e) && n !== null && r.length > 0
54503
+ shouldShow: !DJ(e) && n !== null && r.length > 0
54472
54504
  };
54473
- }, AJ = (e) => {
54505
+ }, MJ = (e) => {
54474
54506
  let t = e?.state, n = t?.selection?.$from;
54475
54507
  if (!t || !n || !e?.dispatch) return !1;
54476
54508
  let r = n.start(), i = n.pos, a = t.doc.textBetween(r, i, "\n", "\n").lastIndexOf("/");
54477
54509
  if (a < 0) return !1;
54478
54510
  let o = r + a, s = t.tr.delete(o, i);
54479
54511
  return e.dispatch(s.scrollIntoView()), !0;
54480
- }, jJ = {
54512
+ }, NJ = {
54481
54513
  Type: jD,
54482
54514
  Heading1: iD,
54483
54515
  Heading2: aD,
@@ -54495,7 +54527,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54495
54527
  TextQuote: kD,
54496
54528
  Sigma: xD,
54497
54529
  Table: TD
54498
- }, MJ = QE, NJ = (e, t, n, r) => {
54530
+ }, PJ = QE, FJ = (e, t, n, r) => {
54499
54531
  r.splice(0).forEach((e) => {
54500
54532
  e.unmount();
54501
54533
  }), e.innerHTML = "";
@@ -54509,7 +54541,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54509
54541
  s.className = "slash-menu-item", s.dataset.command = t.command, s.dataset.selected = o === n ? "true" : "false";
54510
54542
  let c = document.createElement("span");
54511
54543
  c.className = "slash-menu-item-icon";
54512
- let l = t.icon ? jJ[t.icon] ?? MJ : null;
54544
+ let l = t.icon ? NJ[t.icon] ?? PJ : null;
54513
54545
  if (l) {
54514
54546
  let e = m(c);
54515
54547
  e.render(i(l, {
@@ -54520,12 +54552,12 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54520
54552
  let u = document.createElement("span");
54521
54553
  u.className = "slash-menu-item-label", u.textContent = t.label, s.appendChild(c), s.appendChild(u), e.appendChild(s);
54522
54554
  });
54523
- }, PJ = (e) => {
54555
+ }, IJ = (e) => {
54524
54556
  let t = document.createElement("div");
54525
54557
  t.className = "slash-menu", t.style.display = "none", e.appendChild(t);
54526
54558
  let n = !1, r = "", i = !1, a = null, o = [], s = () => {
54527
54559
  if (!n || !a) return;
54528
- let { editorWrapper: r, anchorTopInContent: i, anchorBottomInContent: o, anchorLeftInContent: s, placement: c, offsetY: l } = a, u = nq({
54560
+ let { editorWrapper: r, anchorTopInContent: i, anchorBottomInContent: o, anchorLeftInContent: s, placement: c, offsetY: l } = a, u = iq({
54529
54561
  wrapper: r,
54530
54562
  anchor: {
54531
54563
  anchorTopInContent: i,
@@ -54538,7 +54570,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54538
54570
  boundaryInset: 4
54539
54571
  }, e);
54540
54572
  t.style.left = `${u.left}px`, t.style.top = `${u.top}px`, t.dataset.placement = c;
54541
- }, c = rq(() => {
54573
+ }, c = aq(() => {
54542
54574
  n && s();
54543
54575
  }), l = () => {
54544
54576
  t.style.top = "", t.style.left = "", t.style.transform = "", delete t.dataset.placement;
@@ -54557,7 +54589,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54557
54589
  },
54558
54590
  renderIfNeeded: (e, n) => {
54559
54591
  let i = `${e.map((e) => e.command).join("|")}::${n}`;
54560
- r !== i && (NJ(t, e, n, o), r = i);
54592
+ r !== i && (FJ(t, e, n, o), r = i);
54561
54593
  },
54562
54594
  scrollActiveItemIntoView: (e) => {
54563
54595
  let n = t.querySelector(".slash-menu-item[data-selected=\"true\"]");
@@ -54579,7 +54611,7 @@ var WK = /* @__PURE__ */ new Set(), GK = !1, KK = () => typeof document < "u", q
54579
54611
  };
54580
54612
  //#endregion
54581
54613
  //#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
54582
- function FJ(e) {
54614
+ function LJ(e) {
54583
54615
  let t = r_({}, `${e}_SLASH_SPEC`), n = t_((n) => {
54584
54616
  let r = n.get(t.key);
54585
54617
  return new hr({
@@ -54597,29 +54629,29 @@ function FJ(e) {
54597
54629
  }
54598
54630
  //#endregion
54599
54631
  //#region src/plugins/custom/slash-menu/slash-menu.ts
54600
- var IJ = (e, t) => {
54632
+ var RJ = (e, t) => {
54601
54633
  if (!(!e || typeof e != "object")) return e[t];
54602
- }, LJ = () => {
54603
- if (typeof FJ != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
54604
- let e = FJ("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
54634
+ }, zJ = () => {
54635
+ if (typeof LJ != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
54636
+ let e = LJ("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
54605
54637
  if (!n) return null;
54606
- let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = IJ(t, "key") ?? IJ(n, "key") ?? IJ(r, "key") ?? IJ(e, "key");
54638
+ let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = RJ(t, "key") ?? RJ(n, "key") ?? RJ(r, "key") ?? RJ(e, "key");
54607
54639
  return i.length === 0 || a === void 0 ? null : {
54608
54640
  plugins: i,
54609
54641
  key: a
54610
54642
  };
54611
- }, RJ = (e, t, n, r, i = "zh-CN") => {
54643
+ }, BJ = (e, t, n, r, i = "zh-CN") => {
54612
54644
  if (t?.enabled === !1) return {
54613
54645
  plugins: [],
54614
54646
  config: null
54615
54647
  };
54616
54648
  try {
54617
- let a = LJ();
54649
+ let a = zJ();
54618
54650
  if (!a) return {
54619
54651
  plugins: [],
54620
54652
  config: null
54621
54653
  };
54622
- let o = wJ(t, i), s = PJ(e), c = 0, l = null, u = o, d = !1, f = new Set([
54654
+ let o = EJ(t, i), s = IJ(e), c = 0, l = null, u = o, d = !1, f = new Set([
54623
54655
  "ArrowDown",
54624
54656
  "ArrowUp",
54625
54657
  "Enter",
@@ -54634,18 +54666,18 @@ var IJ = (e, t) => {
54634
54666
  let n = e?.coordsAtPos?.(t);
54635
54667
  return n ? new DOMRect(n.left, n.top, Math.max(n.right - n.left, 1), n.bottom - n.top) : null;
54636
54668
  }, h = (e) => {
54637
- if (!xJ(e)) {
54669
+ if (!CJ(e)) {
54638
54670
  u = [], d = !1, s.updatePositionContext(null), s.setVisible(!1);
54639
54671
  return;
54640
54672
  }
54641
- let t = kJ(e, o);
54673
+ let t = jJ(e, o);
54642
54674
  if (u = t.visibleItems, d = t.shouldShow, t.shouldShow && c >= u.length && (c = 0), t.shouldShow && !s.isVisible() && (c = 0), !t.shouldShow) {
54643
54675
  s.updatePositionContext(null), s.setVisible(!1);
54644
54676
  return;
54645
54677
  }
54646
- let n = m(e), r = ZK(e?.dom);
54678
+ let n = m(e), r = $K(e?.dom);
54647
54679
  if (n && r) {
54648
- let e = QK(n, 320), t = $K(n, r);
54680
+ let e = eq(n, 320), t = tq(n, r);
54649
54681
  s.updatePositionContext({
54650
54682
  editorWrapper: r,
54651
54683
  anchorTopInContent: t.anchorTopInContent,
@@ -54659,13 +54691,13 @@ var IJ = (e, t) => {
54659
54691
  s.updatePosition();
54660
54692
  });
54661
54693
  }, g = async () => {
54662
- if (!xJ(l)) {
54694
+ if (!CJ(l)) {
54663
54695
  d = !1, s.updatePositionContext(null), s.setVisible(!1);
54664
54696
  return;
54665
54697
  }
54666
54698
  if (!l || c < 0 || c >= u.length) return;
54667
54699
  let t = u[c];
54668
- if (AJ(l)) {
54700
+ if (MJ(l)) {
54669
54701
  if (t.command === "image") {
54670
54702
  s.setVisible(!1), n && NI({
54671
54703
  portalContainer: e,
@@ -54675,7 +54707,7 @@ var IJ = (e, t) => {
54675
54707
  });
54676
54708
  return;
54677
54709
  }
54678
- await bJ(l, t.command) && (s.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
54710
+ await SJ(l, t.command) && (s.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
54679
54711
  let e = l?.dom?.querySelector?.(".zt-md-math-block-editing .zt-md-math-block-textarea");
54680
54712
  !e || document.activeElement === e || e.focus();
54681
54713
  }));
@@ -54709,22 +54741,22 @@ var IJ = (e, t) => {
54709
54741
  config: null
54710
54742
  };
54711
54743
  }
54712
- }, zJ = "table", BJ = "ArrowUp", VJ = (e) => e.key !== BJ || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, HJ = (e, t) => {
54744
+ }, VJ = "table", HJ = "ArrowUp", UJ = (e) => e.key !== HJ || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, WJ = (e, t) => {
54713
54745
  let n = t.nodeBefore;
54714
- return !n || n.type.name !== zJ ? null : {
54746
+ return !n || n.type.name !== VJ ? null : {
54715
54747
  tableNode: n,
54716
54748
  tableStart: e - n.nodeSize
54717
54749
  };
54718
- }, UJ = (e) => {
54750
+ }, GJ = (e) => {
54719
54751
  if (e.parent.type.name !== "paragraph" || e.parentOffset !== 0 || e.parent.childCount > 0 || e.depth < 1) return null;
54720
54752
  let t = e.index(e.depth - 1);
54721
54753
  if (t <= 0) return null;
54722
54754
  let n = e.node(e.depth - 1).child(t - 1);
54723
- return n.type.name === zJ ? {
54755
+ return n.type.name === VJ ? {
54724
54756
  tableNode: n,
54725
54757
  tableStart: e.before(e.depth) - n.nodeSize
54726
54758
  } : null;
54727
- }, WJ = (e, t) => {
54759
+ }, KJ = (e, t) => {
54728
54760
  if (e.childCount === 0) return null;
54729
54761
  let n = e.childCount - 1, r = e.child(n);
54730
54762
  if (r.childCount === 0) return null;
@@ -54733,21 +54765,21 @@ var IJ = (e, t) => {
54733
54765
  let a = r.childCount - 1, o = r.child(a), s = 0;
54734
54766
  for (let e = 0; e < a; e += 1) s += r.child(e).nodeSize;
54735
54767
  return t + 1 + i + 1 + s + o.nodeSize - 1;
54736
- }, GJ = (e) => {
54768
+ }, qJ = (e) => {
54737
54769
  let { selection: t } = e.state, n = t.$from, r = null;
54738
- if (t instanceof dE ? r = HJ(t.from, n) : t.empty && (r = UJ(n)), !r) return !1;
54739
- let i = WJ(r.tableNode, r.tableStart);
54770
+ if (t instanceof dE ? r = WJ(t.from, n) : t.empty && (r = GJ(n)), !r) return !1;
54771
+ let i = KJ(r.tableNode, r.tableStart);
54740
54772
  if (i === null) return !1;
54741
54773
  let a = e.state.tr.setSelection(A.near(e.state.doc.resolve(i), -1)).scrollIntoView();
54742
54774
  return e.dispatch(a), e.focus(), !0;
54743
- }, KJ = t_(() => new hr({
54775
+ }, JJ = t_(() => new hr({
54744
54776
  key: new vr("zt-md-table-arrow-entry"),
54745
- props: { handleKeyDown: (e, t) => VJ(t) ? !1 : GJ(e) }
54746
- })), qJ = "table", JJ = "table_header_row", YJ = "table_row", XJ = "table_header", ZJ = "table_cell", QJ = (e) => {
54777
+ props: { handleKeyDown: (e, t) => UJ(t) ? !1 : qJ(e) }
54778
+ })), YJ = "table", XJ = "table_header_row", ZJ = "table_row", QJ = "table_header", $J = "table_cell", eY = (e) => {
54747
54779
  let t = e.selection.$from, n = -1, r = -1;
54748
54780
  for (let e = t.depth; e >= 0; --e) {
54749
54781
  let i = t.node(e);
54750
- if (r < 0 && (i.type.name === ZJ || i.type.name === XJ) && (r = t.index(e - 1)), n < 0 && (i.type.name === YJ || i.type.name === JJ) && (n = t.index(e - 1)), i.type.name === qJ) return {
54782
+ if (r < 0 && (i.type.name === $J || i.type.name === QJ) && (r = t.index(e - 1)), n < 0 && (i.type.name === ZJ || i.type.name === XJ) && (n = t.index(e - 1)), i.type.name === YJ) return {
54751
54783
  tableNode: i,
54752
54784
  tableStart: e === 0 ? 0 : t.before(e),
54753
54785
  tableNodeSize: i.nodeSize,
@@ -54756,7 +54788,7 @@ var IJ = (e, t) => {
54756
54788
  };
54757
54789
  }
54758
54790
  return null;
54759
- }, $J = (e, t, n, r) => {
54791
+ }, tY = (e, t, n, r) => {
54760
54792
  if (n < 0 || n >= e.childCount) return null;
54761
54793
  let i = 0;
54762
54794
  for (let t = 0; t < n; t += 1) i += e.child(t).nodeSize;
@@ -54765,16 +54797,16 @@ var IJ = (e, t) => {
54765
54797
  let o = 0;
54766
54798
  for (let e = 0; e < r; e += 1) o += a.child(e).nodeSize;
54767
54799
  return t + 1 + i + 1 + o + 1 + 1;
54768
- }, eY = (e) => {
54800
+ }, nY = (e) => {
54769
54801
  if (e.columnIndex < 0 || e.tableNode.childCount === 0) return !1;
54770
54802
  let t = e.tableNode.child(0);
54771
54803
  return e.columnIndex < t.childCount;
54772
- }, tY = (e, t, n, r) => {
54773
- let i = $J(t.tableNode, t.tableStart, n, r);
54804
+ }, rY = (e, t, n, r) => {
54805
+ let i = tY(t.tableNode, t.tableStart, n, r);
54774
54806
  if (i === null) return !1;
54775
54807
  let a = e.state.tr.setSelection(A.near(e.state.tr.doc.resolve(i), 1));
54776
54808
  return e.dispatch(a), !0;
54777
- }, nY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, rY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !tY(e, t, t.rowIndex, t.columnIndex) ? !1 : nY(e, n === "above" ? Ux : Wx), iY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !tY(e, t, t.rowIndex, t.columnIndex) ? !1 : nY(e, Kx), aY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !tY(e, t, t.rowIndex, t.columnIndex) ? !1 : nY(e, n === "left" ? Lx : Rx), oY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !tY(e, t, t.rowIndex, t.columnIndex) ? !1 : nY(e, Bx), sY = (e, t, n) => {
54809
+ }, iY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, aY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, n === "above" ? Ux : Wx), oY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, Kx), sY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, n === "left" ? Lx : Rx), cY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, Bx), lY = (e, t, n) => {
54778
54810
  if (t.columnIndex < 0) return !1;
54779
54811
  let r = Ub.get(t.tableNode), i = t.tableStart + 1, a = t.columnIndex, o = e.state.tr;
54780
54812
  for (let e = 0; e < r.height; e += 1) {
@@ -54789,14 +54821,14 @@ var IJ = (e, t) => {
54789
54821
  o.setNodeMarkup(c, l.type, u, l.marks);
54790
54822
  }
54791
54823
  return o.docChanged ? (o.scrollIntoView(), e.dispatch(o), e.focus(), !0) : !1;
54792
- }, cY = (e) => {
54793
- let t = QJ(e.state);
54794
- !t || t.rowIndex <= 0 || iY(e, t);
54795
- }, lY = (e) => {
54796
- let t = QJ(e.state);
54797
- !t || t.rowIndex < 0 || t.columnIndex < 0 || oY(e, t);
54798
54824
  }, uY = (e) => {
54799
- let [t, r] = f(!1), a = aq({
54825
+ let t = eY(e.state);
54826
+ !t || t.rowIndex <= 0 || oY(e, t);
54827
+ }, dY = (e) => {
54828
+ let t = eY(e.state);
54829
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || cY(e, t);
54830
+ }, fY = (e) => {
54831
+ let [t, r] = f(!1), a = sq({
54800
54832
  open: t,
54801
54833
  portalContainer: e.portalContainer,
54802
54834
  editorWrapper: e.collisionBoundary,
@@ -54828,7 +54860,7 @@ var IJ = (e, t) => {
54828
54860
  size: 14,
54829
54861
  strokeWidth: 2,
54830
54862
  "aria-hidden": "true"
54831
- })), i(oq, {
54863
+ })), i(cq, {
54832
54864
  panel: a,
54833
54865
  portalContainer: e.portalContainer,
54834
54866
  className: "zt-md-table-action-popover",
@@ -54896,13 +54928,13 @@ var IJ = (e, t) => {
54896
54928
  e.onDeleteColumn(), r(!1);
54897
54929
  }
54898
54930
  }, e.messages.tableDeleteColumnLabel))));
54899
- }, dY = "zt-md-table-focus-actions", fY = 0, pY = 24, mY = 4, hY = 4, gY = "top", _Y = "left", vY = (e) => p(i(e, {
54931
+ }, pY = "zt-md-table-focus-actions", mY = 0, hY = 24, gY = 4, _Y = 4, vY = "top", yY = "left", bY = (e) => p(i(e, {
54900
54932
  size: 14,
54901
54933
  strokeWidth: 2,
54902
54934
  "aria-hidden": "true"
54903
- })), yY = vY(AD), bY = vY(OD), xY = vY(DD), SY = vY(ED), CY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, wY = class {
54935
+ })), xY = bY(AD), SY = bY(OD), CY = bY(DD), wY = bY(ED), TY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, EY = class {
54904
54936
  constructor(e, t, n) {
54905
- this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = _Y, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = rq(() => {
54937
+ this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = yY, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = aq(() => {
54906
54938
  this.hasPositionContext && this.updateOverlayPosition();
54907
54939
  }), this.handleActionsMouseDown = (e) => {
54908
54940
  e.preventDefault();
@@ -54917,41 +54949,41 @@ var IJ = (e, t) => {
54917
54949
  }, this.handleAlignRightClick = () => {
54918
54950
  this.applyColumnAlignment("right");
54919
54951
  }, this.handleInsertRowBelow = () => {
54920
- let e = QJ(this.view.state);
54921
- !e || e.rowIndex < 0 || rY(this.view, e, "below");
54952
+ let e = eY(this.view.state);
54953
+ !e || e.rowIndex < 0 || aY(this.view, e, "below");
54922
54954
  }, this.handleInsertRowAbove = () => {
54923
- let e = QJ(this.view.state);
54924
- !e || e.rowIndex <= 0 || rY(this.view, e, "above");
54955
+ let e = eY(this.view.state);
54956
+ !e || e.rowIndex <= 0 || aY(this.view, e, "above");
54925
54957
  }, this.handleInsertColumnLeft = () => {
54926
54958
  this.insertColumn("left");
54927
54959
  }, this.handleInsertColumnRight = () => {
54928
54960
  this.insertColumn("right");
54929
54961
  }, this.handleDeleteRow = () => {
54930
- cY(this.view);
54962
+ uY(this.view);
54931
54963
  }, this.handleDeleteColumn = () => {
54932
- lY(this.view);
54933
- }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = ZK(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = yY, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, bY), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, xY), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, SY), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = m(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
54964
+ dY(this.view);
54965
+ }, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = $K(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = xY, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, SY), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, CY), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, wY), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = m(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
54934
54966
  }
54935
54967
  createColumnAlignmentButton(e, t) {
54936
54968
  let n = document.createElement("button");
54937
54969
  return n.type = "button", n.className = "zt-md-table-action-button", n.style.display = "inline-flex", n.setAttribute("aria-label", e), n.innerHTML = t, n;
54938
54970
  }
54939
54971
  resolveColumnAlignment(e) {
54940
- return e === "center" || e === "right" ? e : _Y;
54972
+ return e === "center" || e === "right" ? e : yY;
54941
54973
  }
54942
54974
  updateAlignmentButtonsState(e) {
54943
54975
  this.alignLeftButton.disabled = !e, this.alignCenterButton.disabled = !e, this.alignRightButton.disabled = !e, this.alignLeftButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "left"), this.alignCenterButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "center"), this.alignRightButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "right");
54944
54976
  }
54945
54977
  applyColumnAlignment(e) {
54946
- let t = QJ(this.view.state);
54947
- !t || t.rowIndex < 0 || t.columnIndex < 0 || sY(this.view, t, e);
54978
+ let t = eY(this.view.state);
54979
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || lY(this.view, t, e);
54948
54980
  }
54949
54981
  insertColumn(e) {
54950
- let t = QJ(this.view.state);
54951
- !t || t.rowIndex < 0 || t.columnIndex < 0 || aY(this.view, t, e);
54982
+ let t = eY(this.view.state);
54983
+ !t || t.rowIndex < 0 || t.columnIndex < 0 || sY(this.view, t, e);
54952
54984
  }
54953
54985
  renderMoreActions(e, t, n, r) {
54954
- this.moreActionsRoot.render(i(uY, {
54986
+ this.moreActionsRoot.render(i(fY, {
54955
54987
  messages: this.messages,
54956
54988
  portalContainer: this.portalContainer,
54957
54989
  collisionBoundary: this.editorWrapper,
@@ -54974,7 +55006,7 @@ var IJ = (e, t) => {
54974
55006
  }
54975
55007
  resolveTableAnchor(e, t) {
54976
55008
  if (!this.editorWrapper) return null;
54977
- let n = e.getBoundingClientRect(), r = $K(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - fY, o = r.anchorTopInContent - pY + mY;
55009
+ let n = e.getBoundingClientRect(), r = tq(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - mY, o = r.anchorTopInContent - hY + gY;
54978
55010
  return {
54979
55011
  anchorLeftInContent: a,
54980
55012
  anchorTopInContent: o,
@@ -54991,22 +55023,22 @@ var IJ = (e, t) => {
54991
55023
  if (e === null) return;
54992
55024
  let t = this.resolveTableAnchor(this.currentTableElement, e);
54993
55025
  if (!t) return;
54994
- let n = nq({
55026
+ let n = iq({
54995
55027
  wrapper: this.editorWrapper,
54996
55028
  anchor: t,
54997
55029
  overlaySize: { width: e },
54998
- placement: gY,
55030
+ placement: vY,
54999
55031
  offsetY: 0,
55000
- boundaryInset: hY
55032
+ boundaryInset: _Y
55001
55033
  }, this.portalContainer);
55002
55034
  this.actionsContainer.style.left = `${n.left}px`, this.actionsContainer.style.top = `${n.top}px`;
55003
55035
  }
55004
55036
  update(e) {
55005
- if (this.view = e, !this.editorWrapper || !CY(e)) {
55037
+ if (this.view = e, !this.editorWrapper || !TY(e)) {
55006
55038
  this.detach();
55007
55039
  return;
55008
55040
  }
55009
- let t = QJ(e.state);
55041
+ let t = eY(e.state);
55010
55042
  if (!t) {
55011
55043
  this.detach();
55012
55044
  return;
@@ -55022,107 +55054,107 @@ var IJ = (e, t) => {
55022
55054
  return;
55023
55055
  }
55024
55056
  this.actionsContainer.parentElement !== this.portalContainer && this.portalContainer.append(this.actionsContainer);
55025
- let i = eY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
55057
+ let i = nY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
55026
55058
  this.currentColumnIndex = i ? t.columnIndex : null, this.currentColumnAlignment = this.resolveColumnAlignment(this.currentColumnIndex === null ? null : c?.maybeChild(this.currentColumnIndex)?.attrs?.alignment), this.updateAlignmentButtonsState(i), this.renderMoreActions(o, i, s, a), this.currentTableElement = r, this.currentTableStart = t.tableStart, this.currentTableNodeSize = t.tableNodeSize, this.hasPositionContext = !0, this.updateOverlayPosition(), this.repositionScheduler.schedule();
55027
55059
  }
55028
55060
  detach() {
55029
- this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = _Y, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
55061
+ this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = yY, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
55030
55062
  }
55031
55063
  destroy() {
55032
55064
  this.detach(), this.repositionScheduler.destroy(), this.moreActionsRoot.unmount(), this.actionsContainer.removeEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.alignLeftButton.removeEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.removeEventListener("click", this.handleAlignCenterClick), this.alignRightButton.removeEventListener("click", this.handleAlignRightClick);
55033
55065
  }
55034
- }, TY = (e, t) => {
55066
+ }, DY = (e, t) => {
55035
55067
  let n = IO(void 0, t);
55036
55068
  return t_(() => new hr({
55037
- key: new vr(dY),
55038
- view: (t) => new wY(t, n, e)
55069
+ key: new vr(pY),
55070
+ view: (t) => new EY(t, n, e)
55039
55071
  }));
55040
- }, EY = "list_item", DY = "li[data-item-type=\"task\"]", OY = 24, kY = (e, t) => {
55072
+ }, OY = "list_item", kY = "li[data-item-type=\"task\"]", AY = 24, jY = (e, t) => {
55041
55073
  let n = t.getBoundingClientRect();
55042
- return e.clientX >= n.left && e.clientX <= n.left + OY && e.clientY >= n.top && e.clientY <= n.top + OY;
55043
- }, AY = (e) => {
55074
+ return e.clientX >= n.left && e.clientX <= n.left + AY && e.clientY >= n.top && e.clientY <= n.top + AY;
55075
+ }, MY = (e) => {
55044
55076
  if (!(e instanceof Element)) return null;
55045
- let t = e.closest(DY);
55077
+ let t = e.closest(kY);
55046
55078
  return t instanceof HTMLElement ? t : null;
55047
- }, jY = (e, t) => {
55079
+ }, NY = (e, t) => {
55048
55080
  if (!e.editable) return !1;
55049
- let n = AY(t.target);
55050
- return !n || !kY(t, n) ? !1 : (t.preventDefault(), !0);
55051
- }, MY = (e, t) => {
55081
+ let n = MY(t.target);
55082
+ return !n || !jY(t, n) ? !1 : (t.preventDefault(), !0);
55083
+ }, PY = (e, t) => {
55052
55084
  let n = e.posAtDOM(t, 0) - 1, r = e.state.doc.nodeAt(n);
55053
- return !r || r.type.name !== EY || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
55085
+ return !r || r.type.name !== OY || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
55054
55086
  ...r.attrs,
55055
55087
  checked: !r.attrs.checked
55056
55088
  })), !0);
55057
- }, NY = t_(() => new hr({ props: { handleDOMEvents: {
55058
- mousedown: (e, t) => jY(e, t),
55059
- dblclick: (e, t) => jY(e, t),
55089
+ }, FY = t_(() => new hr({ props: { handleDOMEvents: {
55090
+ mousedown: (e, t) => NY(e, t),
55091
+ dblclick: (e, t) => NY(e, t),
55060
55092
  click: (e, t) => {
55061
55093
  if (!e.editable) return !1;
55062
- let n = AY(t.target);
55063
- return !n || !kY(t, n) || !MY(e, n) ? !1 : (t.preventDefault(), !0);
55094
+ let n = MY(t.target);
55095
+ return !n || !jY(t, n) || !PY(e, n) ? !1 : (t.preventDefault(), !0);
55064
55096
  }
55065
- } } })), PY = "Tab", FY = 4, IY = /^ */, LY = "list_item", RY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, zY = (e) => {
55097
+ } } })), IY = "Tab", LY = 4, RY = /^ */, zY = "list_item", BY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, VY = (e) => {
55066
55098
  let { $from: t } = e.selection;
55067
55099
  for (let e = t.depth; e >= 0; --e) {
55068
55100
  let n = t.node(e);
55069
- if (n.type.name === LY) return n.type;
55101
+ if (n.type.name === zY) return n.type;
55070
55102
  }
55071
55103
  return null;
55072
- }, BY = (e) => {
55104
+ }, HY = (e) => {
55073
55105
  let { selection: t, doc: n } = e;
55074
55106
  if (t.empty) return [t.$from.start()];
55075
55107
  let r = /* @__PURE__ */ new Set();
55076
55108
  return n.nodesBetween(t.from, t.to, (e, t) => {
55077
55109
  e.isTextblock && r.add(t + 1);
55078
55110
  }), Array.from(r);
55079
- }, VY = (e, t) => {
55080
- let { state: n } = e, r = " ".repeat(FY), i = BY(n).sort((e, t) => t - e), a = n.tr;
55111
+ }, UY = (e, t) => {
55112
+ let { state: n } = e, r = " ".repeat(LY), i = HY(n).sort((e, t) => t - e), a = n.tr;
55081
55113
  return n.selection.empty ? a.insertText(r, n.selection.to) : i.forEach((e) => {
55082
55114
  a.insertText(r, e);
55083
55115
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55084
- }, HY = (e, t) => {
55116
+ }, WY = (e, t) => {
55085
55117
  let { state: n } = e, { selection: r } = n;
55086
55118
  if (!(r instanceof A)) return !1;
55087
- let i = BY(n).sort((e, t) => t - e), a = n.tr;
55119
+ let i = HY(n).sort((e, t) => t - e), a = n.tr;
55088
55120
  return i.forEach((e) => {
55089
- let t = n.doc.resolve(e).parent.textContent.match(IY)?.[0].length ?? 0, r = Math.min(t, FY);
55121
+ let t = n.doc.resolve(e).parent.textContent.match(RY)?.[0].length ?? 0, r = Math.min(t, LY);
55090
55122
  r <= 0 || a.delete(e, e + r);
55091
55123
  }), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
55092
- }, UY = t_(() => new hr({
55124
+ }, GY = t_(() => new hr({
55093
55125
  key: new vr("zt-md-tab-space-indent"),
55094
55126
  props: { handleKeyDown: (e, t) => {
55095
55127
  let n = e;
55096
- if (!RY(n) || t.defaultPrevented || t.key !== PY || t.altKey || t.ctrlKey || t.metaKey) return !1;
55097
- let r = zY(n.state);
55128
+ if (!BY(n) || t.defaultPrevented || t.key !== IY || t.altKey || t.ctrlKey || t.metaKey) return !1;
55129
+ let r = VY(n.state);
55098
55130
  if (r) {
55099
55131
  let e = (t.shiftKey ? Bv(r) : Uv(r))(n.state, n.dispatch);
55100
55132
  return t.preventDefault(), e || !0;
55101
55133
  }
55102
- return t.shiftKey ? HY(n, t) : VY(n, t);
55134
+ return t.shiftKey ? WY(n, t) : UY(n, t);
55103
55135
  } }
55104
- })), WY = (e) => {
55136
+ })), KY = (e) => {
55105
55137
  let t = e.target;
55106
55138
  if (!(t instanceof Element)) return null;
55107
55139
  let n = t.closest("a[href]");
55108
55140
  return n instanceof HTMLAnchorElement ? n : null;
55109
- }, GY = (e) => e?.type.name === "image", KY = (e, t) => {
55110
- let n = WY(e);
55141
+ }, qY = (e) => e?.type.name === "image", JY = (e, t) => {
55142
+ let n = KY(e);
55111
55143
  if (!n) return !1;
55112
55144
  let r = WO(n.getAttribute("href"));
55113
55145
  return !r || t || !e.ctrlKey ? !1 : (e.preventDefault(), e.stopPropagation(), window.open(r, "_blank", "noopener,noreferrer"), !0);
55114
- }, qY = (e, t) => !t || !WY(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), JY = (e) => {
55115
- let t = e.messages ?? IO(), n = TY(e.contentPortalContainer, t), r = uJ(e.contentPortalContainer, t), i = Sq(t, e.contentPortalContainer), a = pU(t, e.contentPortalContainer), o = RJ(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale), s = o.plugins, c = {
55146
+ }, YY = (e, t) => !t || !KY(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), XY = (e) => {
55147
+ let t = e.messages ?? IO(), n = DY(e.contentPortalContainer, t), r = fJ(e.contentPortalContainer, t), i = wq(t, e.contentPortalContainer), a = pU(t, e.contentPortalContainer), o = BJ(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale), s = o.plugins, c = {
55116
55148
  listener: Fv,
55117
55149
  commonmark: Bb,
55118
55150
  gfm: nE,
55119
55151
  history: G_,
55120
- codeBlockPrism: Fq,
55152
+ codeBlockPrism: Lq,
55121
55153
  codeBlockLanguagePicker: i,
55122
55154
  clipboard: m_,
55123
55155
  indent: Y_,
55124
55156
  imageDeleteSelection: Tk,
55125
- tableArrowEntry: KJ,
55157
+ tableArrowEntry: JJ,
55126
55158
  blockBoundaryNavigation: LE,
55127
55159
  headingBackspaceEmptyParagraph: vW,
55128
55160
  mathBackspaceEntry: zI,
@@ -55134,20 +55166,20 @@ var IJ = (e, t) => {
55134
55166
  math: rW,
55135
55167
  mathInlineEdit: a,
55136
55168
  mathInlineArrowNavigation: FU,
55137
- taskListToggle: NY,
55138
- tabSpaceIndent: UY,
55139
- codeBlockModASelect: kq,
55169
+ taskListToggle: FY,
55170
+ tabSpaceIndent: GY,
55171
+ codeBlockModASelect: jq,
55140
55172
  slash: s.length > 0 ? s : null
55141
55173
  }, l = aE(c, { includeRuntime: !1 }), u = aE(c, { includeRuntime: !0 }).filter((e) => e.name === "clipboard" || e.name === "indent"), d = qg.make();
55142
55174
  d.config((n) => {
55143
- rk(n, e.imageUpload?.allowedProtocols), n.set(zg, e.root), n.set(Tg, e.markdown), n.set(Rg, {
55175
+ wW(n), rk(n, e.imageUpload?.allowedProtocols), n.set(zg, e.root), n.set(Tg, e.markdown), n.set(Rg, {
55144
55176
  editable: () => !e.readOnly,
55145
55177
  handleDOMEvents: {
55146
- mousedown: (t, n) => n instanceof MouseEvent ? qY(n, e.readOnly) : !1,
55147
- click: (t, n) => n instanceof MouseEvent ? qY(n, e.readOnly) : !1
55178
+ mousedown: (t, n) => n instanceof MouseEvent ? YY(n, e.readOnly) : !1,
55179
+ click: (t, n) => n instanceof MouseEvent ? YY(n, e.readOnly) : !1
55148
55180
  },
55149
- handleClick: (t, n, r) => KY(r, e.readOnly),
55150
- handleClickOn: (t, n, r, i, a, o) => KY(a, e.readOnly) ? !0 : e.readOnly && o && GY(r) ? (a.preventDefault(), !0) : !1
55181
+ handleClick: (t, n, r) => JY(r, e.readOnly),
55182
+ handleClickOn: (t, n, r, i, a, o) => JY(a, e.readOnly) ? !0 : e.readOnly && o && qY(r) ? (a.preventDefault(), !0) : !1
55151
55183
  });
55152
55184
  let r = n.get(Hh) ?? [];
55153
55185
  n.set(Hh, [
@@ -55155,7 +55187,7 @@ var IJ = (e, t) => {
55155
55187
  ["image", fk(t)],
55156
55188
  ["math_block", aU(t)],
55157
55189
  ["math_inline", yU(t)],
55158
- ["code_block", zW(t)]
55190
+ ["code_block", VW(t)]
55159
55191
  ]), n.get(Nv).markdownUpdated((t, n) => {
55160
55192
  e.onChange(n);
55161
55193
  }), o.config && o.config(n);
@@ -55189,7 +55221,7 @@ var IJ = (e, t) => {
55189
55221
  p(e);
55190
55222
  }
55191
55223
  };
55192
- }, YY = (e, t, n, r) => {
55224
+ }, ZY = (e, t, n, r) => {
55193
55225
  let i = e, a = i.create.bind(e);
55194
55226
  return i.create = async () => {
55195
55227
  try {
@@ -55199,10 +55231,10 @@ var IJ = (e, t) => {
55199
55231
  throw console.error("Milkdown init failed:", e), r(e), e;
55200
55232
  }
55201
55233
  }, i;
55202
- }, XY = (e) => {
55234
+ }, QY = (e) => {
55203
55235
  let t = d(null), n = d(e.markdown), r = d(e.onMarkdownChange), i = d(e.onInitError), a = d(e.onInitReady), o = d(null), s = ce((r) => {
55204
55236
  t.current = null, e.focusEditorRef && (e.focusEditorRef.current = null), n.current = e.markdown;
55205
- let s = JY({
55237
+ let s = XY({
55206
55238
  root: r,
55207
55239
  portalContainer: e.portalContainer,
55208
55240
  contentPortalContainer: e.contentPortalContainer,
@@ -55216,7 +55248,7 @@ var IJ = (e, t) => {
55216
55248
  n.current = e, o.current?.(e);
55217
55249
  }
55218
55250
  });
55219
- return YY(s.editor, s.installRuntimePlugins, () => {
55251
+ return ZY(s.editor, s.installRuntimePlugins, () => {
55220
55252
  t.current = s, e.focusEditorRef && (e.focusEditorRef.current = s.focusEditor), a.current?.();
55221
55253
  }, (e) => {
55222
55254
  i.current?.(e);
@@ -55250,10 +55282,10 @@ var IJ = (e, t) => {
55250
55282
  let r = t.current;
55251
55283
  !r || s.loading || e.markdown !== n.current && (n.current = e.markdown, r.setMarkdown(e.markdown));
55252
55284
  }, [s.loading, e.markdown]);
55253
- }, ZY = 160, QY = {
55285
+ }, $Y = 160, eX = {
55254
55286
  "zh-CN": "只读",
55255
55287
  "en-US": "Read only"
55256
- }, $Y = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, eX = (e) => (XY({
55288
+ }, tX = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, nX = (e) => (QY({
55257
55289
  markdown: e.markdown,
55258
55290
  portalContainer: e.portalContainer,
55259
55291
  contentPortalContainer: e.contentPortalContainer,
@@ -55267,13 +55299,13 @@ var IJ = (e, t) => {
55267
55299
  onMarkdownChange: e.onMarkdownChange,
55268
55300
  onInitReady: e.onInitReady,
55269
55301
  onInitError: e.onInitError
55270
- }), /* @__PURE__ */ y(oe, {})), tX = (e) => {
55271
- let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), c = d(null), l = e.theme ?? "light", p = e.readOnly ?? !1, m = QY[e.locale ?? "zh-CN"], h = e.debounceMs ?? ZY, { markdown: g, setMarkdown: _ } = de(e.value, e.defaultValue, e.onChange), v = u(() => IO(e.locale, e.messages, e.placeholder), [
55302
+ }), /* @__PURE__ */ y(oe, {})), rX = (e) => {
55303
+ let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), c = d(null), l = e.theme ?? "light", p = e.readOnly ?? !1, m = eX[e.locale ?? "zh-CN"], h = e.debounceMs ?? $Y, { markdown: g, setMarkdown: _ } = de(e.value, e.defaultValue, e.onChange), v = u(() => IO(e.locale, e.messages, e.placeholder), [
55272
55304
  e.locale,
55273
55305
  e.messages,
55274
55306
  e.placeholder
55275
55307
  ]), x = {
55276
- "--zt-gap-placeholder-content": $Y(v.placeholder),
55308
+ "--zt-gap-placeholder-content": tX(v.placeholder),
55277
55309
  ...e.maxHeight === void 0 ? {} : {
55278
55310
  maxHeight: e.maxHeight,
55279
55311
  overflowY: "auto"
@@ -55316,7 +55348,7 @@ var IJ = (e, t) => {
55316
55348
  "aria-readonly": p,
55317
55349
  onMouseDown: T,
55318
55350
  style: x,
55319
- children: [r && a ? /* @__PURE__ */ y(se, { children: /* @__PURE__ */ y(eX, {
55351
+ children: [r && a ? /* @__PURE__ */ y(se, { children: /* @__PURE__ */ y(nX, {
55320
55352
  markdown: g,
55321
55353
  locale: e.locale,
55322
55354
  portalContainer: r,
@@ -55344,4 +55376,4 @@ var IJ = (e, t) => {
55344
55376
  });
55345
55377
  };
55346
55378
  //#endregion
55347
- export { tX as MilkdownEditor };
55379
+ export { rX as MilkdownEditor };