@covalent/components 8.15.0-beta.14 → 8.15.0-beta.16
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/app-shell/app-shell.d.ts +4 -0
- package/app-shell/app-shell.d.ts.map +1 -1
- package/app-shell.js +8 -8
- package/app-shell.mjs +30 -27
- package/card/card-base.d.ts.map +1 -1
- package/card.js +6 -4
- package/card.mjs +6 -4
- package/check-list-item.js +1 -1
- package/check-list-item.mjs +1 -1
- package/index.js +1 -1
- package/index.mjs +2 -2
- package/{list-item-e628f363.mjs → list-item-24236190.mjs} +1 -1
- package/{list-item-e336fb0e.js → list-item-d72b2fff.js} +1 -1
- package/list-item.js +1 -1
- package/list-item.mjs +1 -1
- package/nav-list-item.js +1 -1
- package/nav-list-item.mjs +17 -17
- package/notebook/notebook.d.ts.map +1 -1
- package/notebook.js +9 -9
- package/notebook.mjs +59 -51
- package/package.json +1 -1
- package/radio-list-item.js +1 -1
- package/radio-list-item.mjs +1 -1
- package/textarea.js +1 -1
- package/textarea.mjs +1 -1
- package/{textfield-0645375b.js → textfield-48207bf2.js} +4 -4
- package/{textfield-93cfcf3c.mjs → textfield-a994ca16.mjs} +5 -5
- package/textfield.js +1 -1
- package/textfield.mjs +1 -1
package/list-item.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("./mwc-list-item-base-06d93e6e.js"),t=require("./query-assigned-elements-f623705d.js"),o=require("./list-item-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("./mwc-list-item-base-06d93e6e.js"),t=require("./query-assigned-elements-f623705d.js"),o=require("./list-item-d72b2fff.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./property-57f6f6fe.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./class-map-0a4c6ca9.js");require("./directive-1186bc23.js");require("./style-map-a135c6ab.js");require("./observer-a096ab43.js");var a=Object.defineProperty,q=Object.getOwnPropertyDescriptor,m=(i,r,l,s)=>{for(var e=s>1?void 0:s?q(r,l):r,u=i.length-1,n;u>=0;u--)(n=i[u])&&(e=(s?n(r,l,e):n(e))||e);return s&&e&&a(r,l,e),e};exports.CovalentListItem=class extends v.ListItemBase{};exports.CovalentListItem.styles=[t.i`
|
2
2
|
${t.r(o.styles)}
|
3
3
|
`,t.i`
|
4
4
|
${t.r(o.styles$1)}
|
package/list-item.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { L as v } from "./mwc-list-item-base-3c6a3bfb.mjs";
|
2
2
|
import { i as p, r as l, e as f } from "./query-assigned-elements-4a39219d.mjs";
|
3
|
-
import { s as c, a as n, c as _ } from "./list-item-
|
3
|
+
import { s as c, a as n, c as _ } from "./list-item-24236190.mjs";
|
4
4
|
import "./tslib.es6-c4b0f3b1.mjs";
|
5
5
|
import "./ripple-handlers-8883e893.mjs";
|
6
6
|
import "./base-element-acf30176.mjs";
|
package/nav-list-item.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./query-assigned-elements-f623705d.js"),c=require("./property-57f6f6fe.js"),h=require("./list-item.js"),l=require("./list-item-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./query-assigned-elements-f623705d.js"),c=require("./property-57f6f6fe.js"),h=require("./list-item.js"),l=require("./list-item-d72b2fff.js");require("./mwc-list-item-base-06d93e6e.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./class-map-0a4c6ca9.js");require("./directive-1186bc23.js");require("./style-map-a135c6ab.js");require("./observer-a096ab43.js");const p=`:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(*){--cv-list-padding-right: 0;--cv-list-padding-left: 0;--cv-list-item-text-padding: 48px}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([selected]:not([activated])) .expansion-header{transition:background-color .25s ease-in,color .25s ease-in;background-color:var(--cv-list-item-selected-background-color);color:var(--cv-list-item-selected-color)}:host([selected]:not([activated])) .expansion-header .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-list-item-selected-color)}:host([subnav]){height:32px;font-weight:var(--mdc-typography-body2-font-weight);border-radius:var(--cv-list-item-border-radius, 100px);padding:0;padding-right:var(--cv-list-padding-right, 12px);padding-left:var(--cv-list-padding-left, 12px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-theme-on-surface);margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px;background-color:transparent}:host([graphic=avatar]){padding:0;background-color:transparent}:host([graphic=avatar]:not([twoline])){height:48px}:host([selected]) .mdc-deprecated-list-item__graphic.material-icons,:host([activated]) .mdc-deprecated-list-item__graphic.material-icons{font-variation-settings:"FILL" 1}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;border-radius:var(--cv-list-item-border-radius, 100px);overflow:hidden;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius, 100px);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
|
2
2
|
`;var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,s=(n,e,t,i)=>{for(var r=i>1?void 0:i?g(e,t):e,o=n.length-1,d;o>=0;o--)(d=n[o])&&(r=(i?d(e,t,r):d(r))||r);return i&&r&&m(e,t,r),r};exports.CovalentNavRailListItem=class extends h.CovalentListItem{constructor(){super(...arguments),this.open=!1,this.hasChildren=!1,this.activated=!1,this.lastKeySelected=0}_toggleOpen(){this.open=!this.open}_handleKeydown(e){const t=this.expansionPanelElements[0],i=t?t==null?void 0:t.getFocusedItemIndex():0,r=(t==null?void 0:t.items.length)??0;if(this.hasChildren){if(e.code==="Enter"){e.preventDefault(),e.stopImmediatePropagation(),e.target.hasChildren?this._toggleOpen():this._deselectHeader(e);return}if(this.open){if(e.code==="ArrowUp"&&i===0&&this.lastKeySelected===0&&!e.target.hasChildren){e.preventDefault(),e.stopImmediatePropagation(),t.items[0].blur(),this.focus();return}e.code==="ArrowDown"&&i===-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(0),this.lastKeySelected=0),e.code==="ArrowUp"&&i!==-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(i),this.lastKeySelected=i),(e.code==="ArrowDown"||e.code==="ArrowUp")&&i!==-1&&this.lastKeySelected<r-1&&(e.preventDefault(),e.stopImmediatePropagation(),t.focusItemAtIndex(i),this.lastKeySelected=i)}}}_handleRequestSelected(e){const t=e;this.hasChildren&&t.detail.selected===!1&&t.detail.source==="property"&&this._deselectChildren()}_deselectChildren(){this.expansionPanelElements.forEach(e=>{e.items.forEach(t=>t.selected=!1)})}_deselectHeader(e){e.preventDefault(),e.stopImmediatePropagation(),this.fireRequestSelected(!1,"interaction"),this.activated=!1}renderExpansionItem(){const e=this.renderText(),t=this.graphic?this.renderGraphic():a.A,i=this.renderMeta();return a.x`
|
3
3
|
<div
|
4
4
|
@mousedown=${this._toggleOpen}
|
package/nav-list-item.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { i as
|
1
|
+
import { i as s, r as n, l as m, A as g, x as p, e as v } from "./query-assigned-elements-4a39219d.mjs";
|
2
2
|
import { n as h } from "./property-9b6ea53b.mjs";
|
3
3
|
import { CovalentListItem as f } from "./list-item.mjs";
|
4
|
-
import { s as u, a as x, c as y } from "./list-item-
|
4
|
+
import { s as u, a as x, c as y } from "./list-item-24236190.mjs";
|
5
5
|
import "./mwc-list-item-base-3c6a3bfb.mjs";
|
6
6
|
import "./tslib.es6-c4b0f3b1.mjs";
|
7
7
|
import "./ripple-handlers-8883e893.mjs";
|
@@ -13,12 +13,12 @@ import "./class-map-6e504a9a.mjs";
|
|
13
13
|
import "./directive-daf4e9b6.mjs";
|
14
14
|
import "./style-map-e7ec6d41.mjs";
|
15
15
|
import "./observer-be7b92e2.mjs";
|
16
|
-
const
|
16
|
+
const b = `:host{font-family:var(--mdc-typography-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:600;line-height:var(--mdc-typography-body2-line-height);text-align:left;border-radius:var(--cv-list-item-border-radius, 100px);transition:border-radius .1s ease-out;width:var(--cv-list-item-width, 100%);--mdc-list-item-graphic-margin: 4px}::slotted(*){--cv-list-padding-right: 0;--cv-list-padding-left: 0;--cv-list-item-text-padding: 48px}:host([activated]) ::slotted(cv-icon[slot=graphic]){color:var(--mdc-theme-primary)}:host([selected]:not([activated])) .expansion-header{transition:background-color .25s ease-in,color .25s ease-in;background-color:var(--cv-list-item-selected-background-color);color:var(--cv-list-item-selected-color)}:host([selected]:not([activated])) .expansion-header .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-list-item-selected-color)}:host([subnav]){height:32px;font-weight:var(--mdc-typography-body2-font-weight);border-radius:var(--cv-list-item-border-radius, 100px);padding:0;padding-right:var(--cv-list-padding-right, 12px);padding-left:var(--cv-list-padding-left, 12px)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic{--mdc-theme-text-icon-on-background: var(--cv-theme-on-surface);margin-left:var(--cv-list-item-graphic-margin-left, 12px);padding-left:4px;background-color:transparent}:host([graphic=avatar]){padding:0;background-color:transparent}:host([graphic=avatar]:not([twoline])){height:48px}:host([selected]) .mdc-deprecated-list-item__graphic.material-icons,:host([activated]) .mdc-deprecated-list-item__graphic.material-icons{font-variation-settings:"FILL" 1}:host(.beta-list-item){--mdc-theme-primary: var(--mdc-theme-surface-caution);--mdc-list-item-meta-size: 20px;--mdc-list-item-graphic-size: 40px;--mdc-list-item-graphic-margin: 0;--mdc-typography-subtitle1-font-size: var( --mdc-typography-subtitle2-font-size );--mdc-typography-body2-font-size: var(--mdc-typography-caption-font-size);margin-bottom:8px;margin-right:0;border-radius:0;height:48px;font-size:0;padding:0 0 0 15px}:host([hasChildren]){flex-direction:column;overflow:visible;height:inherit!important;background:none;padding:0;--mdc-list-side-padding: 0;--cv-list-item-graphic-margin-left: 0}:host([hasChildren][open]:hover:not([activated])) .expansion-header{--mdc-ripple-color: transparent}:host([hasChildren][open]:hover:not([activated])) .expansion-header:hover{--mdc-ripple-color: var(--mdc-theme-primary)}.expansion-header{position:relative;height:48px;width:100%;border-radius:var(--cv-list-item-border-radius, 100px);overflow:hidden;display:flex;flex-shrink:0;align-items:center}.expansion-header mwc-ripple{border-radius:var(--cv-list-item-border-radius, 100px);overflow:hidden}.expansion-header-inner{padding:0 16px}.expansion-icon{margin-right:var(--cv-list-item-expansion-icon-margin, 0);font-size:var(--cv-list-item-expansion-icon-size, --mdc-icon-size);color:var(--cv-list-item-text-icon-on-background, var(--mdc-theme-text-icon-on-background))}.expansion-panel{display:block;width:100%;height:var(--cv-list-menu-height, 0);--mdc-list-side-padding: 72px;transition:transform .15s ease-out;overflow:hidden}:host([open][hasChildren]:not([twoline])){height:inherit;display:flex;flex-direction:column;border-radius:0}:host([open][hasChildren]:not([twoline])) .expansion-panel{transition:min-height .25s ease-in;height:var(--cv-list-menu-height, inherit)}
|
17
17
|
`;
|
18
|
-
var
|
19
|
-
for (var a =
|
20
|
-
(
|
21
|
-
return
|
18
|
+
var w = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, d = (e, t, i, o) => {
|
19
|
+
for (var a = o > 1 ? void 0 : o ? _(t, i) : t, l = e.length - 1, c; l >= 0; l--)
|
20
|
+
(c = e[l]) && (a = (o ? c(t, i, a) : c(a)) || a);
|
21
|
+
return o && a && w(t, i, a), a;
|
22
22
|
};
|
23
23
|
let r = class extends f {
|
24
24
|
constructor() {
|
@@ -28,7 +28,7 @@ let r = class extends f {
|
|
28
28
|
this.open = !this.open;
|
29
29
|
}
|
30
30
|
_handleKeydown(e) {
|
31
|
-
const t = this.expansionPanelElements[0], i = t ? t == null ? void 0 : t.getFocusedItemIndex() : 0,
|
31
|
+
const t = this.expansionPanelElements[0], i = t ? t == null ? void 0 : t.getFocusedItemIndex() : 0, o = (t == null ? void 0 : t.items.length) ?? 0;
|
32
32
|
if (this.hasChildren) {
|
33
33
|
if (e.code === "Enter") {
|
34
34
|
e.preventDefault(), e.stopImmediatePropagation(), e.target.hasChildren ? this._toggleOpen() : this._deselectHeader(e);
|
@@ -39,7 +39,7 @@ let r = class extends f {
|
|
39
39
|
e.preventDefault(), e.stopImmediatePropagation(), t.items[0].blur(), this.focus();
|
40
40
|
return;
|
41
41
|
}
|
42
|
-
e.code === "ArrowDown" && i === -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(0), this.lastKeySelected = 0), e.code === "ArrowUp" && i !== -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i), (e.code === "ArrowDown" || e.code === "ArrowUp") && i !== -1 && this.lastKeySelected <
|
42
|
+
e.code === "ArrowDown" && i === -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(0), this.lastKeySelected = 0), e.code === "ArrowUp" && i !== -1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i), (e.code === "ArrowDown" || e.code === "ArrowUp") && i !== -1 && this.lastKeySelected < o - 1 && (e.preventDefault(), e.stopImmediatePropagation(), t.focusItemAtIndex(i), this.lastKeySelected = i);
|
43
43
|
}
|
44
44
|
}
|
45
45
|
}
|
@@ -57,7 +57,7 @@ let r = class extends f {
|
|
57
57
|
}
|
58
58
|
renderExpansionItem() {
|
59
59
|
const e = this.renderText(), t = this.graphic ? this.renderGraphic() : g, i = this.renderMeta();
|
60
|
-
return
|
60
|
+
return p`
|
61
61
|
<div
|
62
62
|
@mousedown=${this._toggleOpen}
|
63
63
|
@touchstart="${this._toggleOpen}"
|
@@ -78,8 +78,8 @@ let r = class extends f {
|
|
78
78
|
super.disconnectedCallback(), this.removeEventListener("keydown", this._handleKeydown), this.addEventListener("request-selected", this._handleRequestSelected);
|
79
79
|
}
|
80
80
|
renderMeta() {
|
81
|
-
const e = this.open ? "arrow_drop_up" : "arrow_drop_down", t = this.hasChildren ?
|
82
|
-
return
|
81
|
+
const e = this.open ? "arrow_drop_up" : "arrow_drop_down", t = this.hasChildren ? p`<cv-icon class="expansion-icon">${e}</cv-icon>` : "";
|
82
|
+
return p`<span class="mdc-deprecated-list-item__meta material-icons">
|
83
83
|
${t}
|
84
84
|
<slot name="meta"></slot>
|
85
85
|
</span>`;
|
@@ -89,17 +89,17 @@ let r = class extends f {
|
|
89
89
|
}
|
90
90
|
};
|
91
91
|
r.styles = [
|
92
|
-
|
92
|
+
s`
|
93
93
|
${n(u)}
|
94
94
|
`,
|
95
|
-
|
95
|
+
s`
|
96
96
|
${n(x)}
|
97
97
|
`,
|
98
|
-
|
98
|
+
s`
|
99
99
|
${n(y)}
|
100
100
|
`,
|
101
|
-
|
102
|
-
${n(
|
101
|
+
s`
|
102
|
+
${n(b)}
|
103
103
|
`
|
104
104
|
];
|
105
105
|
d([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/notebook/notebook.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,cAAc,EAEd,cAAc,EAEf,MAAM,KAAK,CAAC;AAKb,OAAO,gBAAgB,CAAC;AACxB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AACtC,OAAO,cAAc,CAAC;AACtB,OAAO,4BAA4B,CAAC;AACpC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,gBAAgB,CAAC;KACjC;CACF;AAED,UAAU,QAAQ;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,EAAE;YACJ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;QACF,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qBACa,gBAAiB,SAAQ,UAAU;IAC9C;;OAEG;IAEH,KAAK,EAAE,QAAQ,EAAE,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,QAAQ,EAAE,CAAM;IAE3B;;OAEG;IAEH,QAAQ,EAAG,MAAM,CAAC;IAElB;;OAEG;IAEH,eAAe,EAAG,MAAM,CAAC;IAEzB,OAAO,CAAC,cAAc,CAAyB;IAE/C,OAAO,CAAC,iBAAiB,CAAuB;IAEhD,OAAO,CAAC,kBAAkB,CAAuB;IAEjD,OAAgB,MAAM,4BAIpB;;IAQF,OAAO,CAAC,QAAQ,EAAE,MAAM;IAOxB,iBAAiB,IAAI,IAAI;IAMzB,QAAQ;
|
1
|
+
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/notebook/notebook.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,cAAc,EAEd,cAAc,EAEf,MAAM,KAAK,CAAC;AAKb,OAAO,gBAAgB,CAAC;AACxB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,gCAAgC,CAAC;AACxC,OAAO,8BAA8B,CAAC;AACtC,OAAO,cAAc,CAAC;AACtB,OAAO,4BAA4B,CAAC;AACpC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAE1B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,gBAAgB,CAAC;KACjC;CACF;AAED,UAAU,QAAQ;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,OAAO,CAAC,EAAE;QACR,IAAI,EAAE;YACJ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;QACF,QAAQ,CAAC,EAAE;YACT,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;QACF,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,qBACa,gBAAiB,SAAQ,UAAU;IAC9C;;OAEG;IAEH,KAAK,EAAE,QAAQ,EAAE,CAAM;IAEvB;;OAEG;IAEH,SAAS,EAAE,QAAQ,EAAE,CAAM;IAE3B;;OAEG;IAEH,QAAQ,EAAG,MAAM,CAAC;IAElB;;OAEG;IAEH,eAAe,EAAG,MAAM,CAAC;IAEzB,OAAO,CAAC,cAAc,CAAyB;IAE/C,OAAO,CAAC,iBAAiB,CAAuB;IAEhD,OAAO,CAAC,kBAAkB,CAAuB;IAEjD,OAAgB,MAAM,4BAIpB;;IAQF,OAAO,CAAC,QAAQ,EAAE,MAAM;IAOxB,iBAAiB,IAAI,IAAI;IAMzB,QAAQ;IAOR,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ;IAkBzC,OAAO;IAQP,UAAU;IAgBV,gBAAgB;IAIhB,oBAAoB,IAAI,IAAI;IAO5B,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ;IAerD,oBAAoB,IAAI,IAAI;IAU5B,SAAS,CAAC,YAAY,IAAI,IAAI;IAU9B,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW;IAsB5C,oBAAoB,CAAC,iBAAiB,EAAE,MAAM;IAkC9C,oBAAoB,CAAC,CAAC,EAAE,WAAW;IAcnC,gBAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM;IAM9C,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;IAwB3C,cAAc,CAAC,CAAC,EAAE,SAAS;IAS3B,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM;IAyBtC,eAAe,CAAC,CAAC,EAAE,SAAS;IAM5B,aAAa;IAOb,kBAAkB,CAAC,KAAK,EAAE,aAAa;IAkBvC,OAAO,CAAC,cAAc;IAkCtB,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAU/B,SAAS;IAcT,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC;IAsCnD,SAAS,CAAC,MAAM;IA2HhB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,GAAG,UAAU,GAAG,IAAI;IAKxE,OAAO;IAaP,UAAU,CAAC,KAAK,EAAE,MAAM;IAYxB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;IAO3C,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;CAW5D;AAED,eAAe,gBAAgB,CAAC"}
|
package/notebook.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./query-assigned-elements-f623705d.js"),Cu=require("./directive-1186bc23.js"),au=require("./property-57f6f6fe.js");require("./alert.js");require("./button.js");require("./notebook-cell.js");require("./code-snippet.js");require("./icon.js");require("./icon-button.js");require("./list-item.js");require("./select.js");require("./utils-a8190a39.js");require("./observer-a096ab43.js");require("./foundation-e980aa3d.js");require("./tslib.es6-98719205.js");require("./foundation-e830bd94.js");require("./class-map-0a4c6ca9.js");require("./query-680f1868.js");require("./mwc-icon-f87639bc.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./state-0974a8e5.js");require("./style-map-a135c6ab.js");require("./aria-property-849c8816.js");require("./event-options-3f5eb195.js");require("./if-defined-f1c45245.js");require("./code-editor-857a4673.js");require("./async-directive-4a34f75e.js");require("./directive-helpers-0ce1f995.js");require("./typography.js");require("./query-assigned-nodes-99eae71d.js");require("./_commonjsHelpers-2367a3a2.js");require("./mwc-list-item-base-06d93e6e.js");require("./list-item-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./query-assigned-elements-f623705d.js"),Cu=require("./directive-1186bc23.js"),au=require("./property-57f6f6fe.js");require("./alert.js");require("./button.js");require("./notebook-cell.js");require("./code-snippet.js");require("./icon.js");require("./icon-button.js");require("./list-item.js");require("./select.js");require("./utils-a8190a39.js");require("./observer-a096ab43.js");require("./foundation-e980aa3d.js");require("./tslib.es6-98719205.js");require("./foundation-e830bd94.js");require("./class-map-0a4c6ca9.js");require("./query-680f1868.js");require("./mwc-icon-f87639bc.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./state-0974a8e5.js");require("./style-map-a135c6ab.js");require("./aria-property-849c8816.js");require("./event-options-3f5eb195.js");require("./if-defined-f1c45245.js");require("./code-editor-857a4673.js");require("./async-directive-4a34f75e.js");require("./directive-helpers-0ce1f995.js");require("./typography.js");require("./query-assigned-nodes-99eae71d.js");require("./_commonjsHelpers-2367a3a2.js");require("./mwc-list-item-base-06d93e6e.js");require("./list-item-d72b2fff.js");require("./mwc-line-ripple-directive-40145003.js");require("./mwc-menu-base-08f54c38.js");require("./mwc-list-base-22616d0a.js");require("./form-element-c553d6f5.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2017 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
@@ -18,7 +18,7 @@
|
|
18
18
|
`;break}return r};G.prototype.render=function(u,e,t){let r="";const n=this.rules;for(let c=0,i=u.length;c<i;c++){const o=u[c].type;o==="inline"?r+=this.renderInline(u[c].children,e,t):typeof n[o]<"u"?r+=n[o](u,c,e,t,this):r+=this.renderToken(u,c,e,t)}return r};function w(){this.__rules__=[],this.__cache__=null}w.prototype.__find__=function(u){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===u)return e;return-1};w.prototype.__compile__=function(){const u=this,e=[""];u.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),u.__cache__={},e.forEach(function(t){u.__cache__[t]=[],u.__rules__.forEach(function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||u.__cache__[t].push(r.fn))})})};w.prototype.at=function(u,e,t){const r=this.__find__(u),n=t||{};if(r===-1)throw new Error("Parser rule not found: "+u);this.__rules__[r].fn=e,this.__rules__[r].alt=n.alt||[],this.__cache__=null};w.prototype.before=function(u,e,t,r){const n=this.__find__(u),c=r||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(n,0,{name:e,enabled:!0,fn:t,alt:c.alt||[]}),this.__cache__=null};w.prototype.after=function(u,e,t,r){const n=this.__find__(u),c=r||{};if(n===-1)throw new Error("Parser rule not found: "+u);this.__rules__.splice(n+1,0,{name:e,enabled:!0,fn:t,alt:c.alt||[]}),this.__cache__=null};w.prototype.push=function(u,e,t){const r=t||{};this.__rules__.push({name:u,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};w.prototype.enable=function(u,e){Array.isArray(u)||(u=[u]);const t=[];return u.forEach(function(r){const n=this.__find__(r);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!0,t.push(r)},this),this.__cache__=null,t};w.prototype.enableOnly=function(u,e){Array.isArray(u)||(u=[u]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(u,e)};w.prototype.disable=function(u,e){Array.isArray(u)||(u=[u]);const t=[];return u.forEach(function(r){const n=this.__find__(r);if(n<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[n].enabled=!1,t.push(r)},this),this.__cache__=null,t};w.prototype.getRules=function(u){return this.__cache__===null&&this.__compile__(),this.__cache__[u]||[]};function q(u,e,t){this.type=u,this.tag=e,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}q.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let r=0,n=t.length;r<n;r++)if(t[r][0]===e)return r;return-1};q.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};q.prototype.attrSet=function(e,t){const r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n};q.prototype.attrGet=function(e){const t=this.attrIndex(e);let r=null;return t>=0&&(r=this.attrs[t][1]),r};q.prototype.attrJoin=function(e,t){const r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t};function ae(u,e,t){this.src=u,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}ae.prototype.Token=q;const g0=/\r\n?|\n/g,k0=/\0/g;function C0(u){let e;e=u.src.replace(g0,`
|
19
19
|
`),e=e.replace(k0,"�"),u.src=e}function D0(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function E0(u){const e=u.tokens;for(let t=0,r=e.length;t<r;t++){const n=e[t];n.type==="inline"&&u.md.inline.parse(n.content,u.md,u.env,n.children)}}function y0(u){return/^<a[>\s]/i.test(u)}function A0(u){return/^<\/a\s*>/i.test(u)}function F0(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,r=e.length;t<r;t++){if(e[t].type!=="inline"||!u.md.linkify.pretest(e[t].content))continue;let n=e[t].children,c=0;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type==="link_close"){for(i--;n[i].level!==o.level&&n[i].type!=="link_open";)i--;continue}if(o.type==="html_inline"&&(y0(o.content)&&c>0&&c--,A0(o.content)&&c++),!(c>0)&&o.type==="text"&&u.md.linkify.test(o.content)){const a=o.content;let s=u.md.linkify.match(a);const l=[];let d=o.level,b=0;s.length>0&&s[0].index===0&&i>0&&n[i-1].type==="text_special"&&(s=s.slice(1));for(let h=0;h<s.length;h++){const f=s[h].url,g=u.md.normalizeLink(f);if(!u.md.validateLink(g))continue;let k=s[h].text;s[h].schema?s[h].schema==="mailto:"&&!/^mailto:/i.test(k)?k=u.md.normalizeLinkText("mailto:"+k).replace(/^mailto:/,""):k=u.md.normalizeLinkText(k):k=u.md.normalizeLinkText("http://"+k).replace(/^http:\/\//,"");const D=s[h].index;if(D>b){const m=new u.Token("text","",0);m.content=a.slice(b,D),m.level=d,l.push(m)}const p=new u.Token("link_open","a",1);p.attrs=[["href",g]],p.level=d++,p.markup="linkify",p.info="auto",l.push(p);const _=new u.Token("text","",0);_.content=k,_.level=d,l.push(_);const x=new u.Token("link_close","a",-1);x.level=--d,x.markup="linkify",x.info="auto",l.push(x),b=s[h].lastIndex}if(b<a.length){const h=new u.Token("text","",0);h.content=a.slice(b),h.level=d,l.push(h)}e[t].children=n=ie(n,i,l)}}}}const se=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,v0=/\((c|tm|r)\)/i,w0=/\((c|tm|r)\)/ig,S0={c:"©",r:"®",tm:"™"};function T0(u,e){return S0[e.toLowerCase()]}function I0(u){let e=0;for(let t=u.length-1;t>=0;t--){const r=u[t];r.type==="text"&&!e&&(r.content=r.content.replace(w0,T0)),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function q0(u){let e=0;for(let t=u.length-1;t>=0;t--){const r=u[t];r.type==="text"&&!e&&se.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function B0(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(v0.test(u.tokens[e].content)&&I0(u.tokens[e].children),se.test(u.tokens[e].content)&&q0(u.tokens[e].children))}const z0=/['"]/,Uu=/['"]/g,Hu="’";function ru(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function M0(u,e){let t;const r=[];for(let n=0;n<u.length;n++){const c=u[n],i=u[n].level;for(t=r.length-1;t>=0&&!(r[t].level<=i);t--);if(r.length=t+1,c.type!=="text")continue;let o=c.content,a=0,s=o.length;u:for(;a<s;){Uu.lastIndex=a;const l=Uu.exec(o);if(!l)break;let d=!0,b=!0;a=l.index+1;const h=l[0]==="'";let f=32;if(l.index-1>=0)f=o.charCodeAt(l.index-1);else for(t=n-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){f=u[t].content.charCodeAt(u[t].content.length-1);break}let g=32;if(a<s)g=o.charCodeAt(a);else for(t=n+1;t<u.length&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t++)if(u[t].content){g=u[t].content.charCodeAt(0);break}const k=K(f)||Q(String.fromCharCode(f)),D=K(g)||Q(String.fromCharCode(g)),p=J(f),_=J(g);if(_?d=!1:D&&(p||k||(d=!1)),p?b=!1:k&&(_||D||(b=!1)),g===34&&l[0]==='"'&&f>=48&&f<=57&&(b=d=!1),d&&b&&(d=k,b=D),!d&&!b){h&&(c.content=ru(c.content,l.index,Hu));continue}if(b)for(t=r.length-1;t>=0;t--){let x=r[t];if(r[t].level<i)break;if(x.single===h&&r[t].level===i){x=r[t];let m,C;h?(m=e.md.options.quotes[2],C=e.md.options.quotes[3]):(m=e.md.options.quotes[0],C=e.md.options.quotes[1]),c.content=ru(c.content,l.index,C),u[x.token].content=ru(u[x.token].content,x.pos,m),a+=C.length-1,x.token===n&&(a+=m.length-1),o=c.content,s=o.length,r.length=t;continue u}}d?r.push({token:n,pos:l.index,single:h,level:i}):b&&h&&(c.content=ru(c.content,l.index,Hu))}}}function R0(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!z0.test(u.tokens[e].content)||M0(u.tokens[e].children,u)}function L0(u){let e,t;const r=u.tokens,n=r.length;for(let c=0;c<n;c++){if(r[c].type!=="inline")continue;const i=r[c].children,o=i.length;for(e=0;e<o;e++)i[e].type==="text_special"&&(i[e].type="text");for(e=t=0;e<o;e++)i[e].type==="text"&&e+1<o&&i[e+1].type==="text"?i[e+1].content=i[e].content+i[e+1].content:(e!==t&&(i[t]=i[e]),t++);e!==t&&(i.length=t)}}const pu=[["normalize",C0],["block",D0],["inline",E0],["linkify",F0],["replacements",B0],["smartquotes",R0],["text_join",L0]];function Iu(){this.ruler=new w;for(let u=0;u<pu.length;u++)this.ruler.push(pu[u][0],pu[u][1])}Iu.prototype.process=function(u){const e=this.ruler.getRules("");for(let t=0,r=e.length;t<r;t++)e[t](u)};Iu.prototype.State=ae;function R(u,e,t,r){this.src=u,this.md=e,this.env=t,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const n=this.src;for(let c=0,i=0,o=0,a=0,s=n.length,l=!1;i<s;i++){const d=n.charCodeAt(i);if(!l)if(E(d)){o++,d===9?a+=4-a%4:a++;continue}else l=!0;(d===10||i===s-1)&&(d!==10&&i++,this.bMarks.push(c),this.eMarks.push(i),this.tShift.push(o),this.sCount.push(a),this.bsCount.push(0),l=!1,o=0,a=0,c=i+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}R.prototype.push=function(u,e,t){const r=new q(u,e,t);return r.block=!0,t<0&&this.level--,r.level=this.level,t>0&&this.level++,this.tokens.push(r),r};R.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};R.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};R.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const r=this.src.charCodeAt(e);if(!E(r))break}return e};R.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!E(this.src.charCodeAt(--e)))return e+1;return e};R.prototype.skipChars=function(e,t){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e};R.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e};R.prototype.getLines=function(e,t,r,n){if(e>=t)return"";const c=new Array(t-e);for(let i=0,o=e;o<t;o++,i++){let a=0;const s=this.bMarks[o];let l=s,d;for(o+1<t||n?d=this.eMarks[o]+1:d=this.eMarks[o];l<d&&a<r;){const b=this.src.charCodeAt(l);if(E(b))b===9?a+=4-(a+this.bsCount[o])%4:a++;else if(l-s<this.tShift[o])a++;else break;l++}a>r?c[i]=new Array(a-r+1).join(" ")+this.src.slice(l,d):c[i]=this.src.slice(l,d)}return c.join("")};R.prototype.Token=q;const P0=65536;function xu(u,e){const t=u.bMarks[e]+u.tShift[e],r=u.eMarks[e];return u.src.slice(t,r)}function Zu(u){const e=[],t=u.length;let r=0,n=u.charCodeAt(r),c=!1,i=0,o="";for(;r<t;)n===124&&(c?(o+=u.substring(i,r-1),i=r):(e.push(o+u.substring(i,r)),o="",i=r+1)),c=n===92,r++,n=u.charCodeAt(r);return e.push(o+u.substring(i)),e}function $0(u,e,t,r){if(e+2>t)return!1;let n=e+1;if(u.sCount[n]<u.blkIndent||u.sCount[n]-u.blkIndent>=4)return!1;let c=u.bMarks[n]+u.tShift[n];if(c>=u.eMarks[n])return!1;const i=u.src.charCodeAt(c++);if(i!==124&&i!==45&&i!==58||c>=u.eMarks[n])return!1;const o=u.src.charCodeAt(c++);if(o!==124&&o!==45&&o!==58&&!E(o)||i===45&&E(o))return!1;for(;c<u.eMarks[n];){const x=u.src.charCodeAt(c);if(x!==124&&x!==45&&x!==58&&!E(x))return!1;c++}let a=xu(u,e+1),s=a.split("|");const l=[];for(let x=0;x<s.length;x++){const m=s[x].trim();if(!m){if(x===0||x===s.length-1)continue;return!1}if(!/^:?-+:?$/.test(m))return!1;m.charCodeAt(m.length-1)===58?l.push(m.charCodeAt(0)===58?"center":"right"):m.charCodeAt(0)===58?l.push("left"):l.push("")}if(a=xu(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;s=Zu(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop();const d=s.length;if(d===0||d!==l.length)return!1;if(r)return!0;const b=u.parentType;u.parentType="table";const h=u.md.block.ruler.getRules("blockquote"),f=u.push("table_open","table",1),g=[e,0];f.map=g;const k=u.push("thead_open","thead",1);k.map=[e,e+1];const D=u.push("tr_open","tr",1);D.map=[e,e+1];for(let x=0;x<s.length;x++){const m=u.push("th_open","th",1);l[x]&&(m.attrs=[["style","text-align:"+l[x]]]);const C=u.push("inline","",0);C.content=s[x].trim(),C.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let p,_=0;for(n=e+2;n<t&&!(u.sCount[n]<u.blkIndent);n++){let x=!1;for(let C=0,v=h.length;C<v;C++)if(h[C](u,n,t,!0)){x=!0;break}if(x||(a=xu(u,n).trim(),!a)||u.sCount[n]-u.blkIndent>=4||(s=Zu(a),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop(),_+=d-s.length,_>P0))break;if(n===e+2){const C=u.push("tbody_open","tbody",1);C.map=p=[e+2,0]}const m=u.push("tr_open","tr",1);m.map=[n,n+1];for(let C=0;C<d;C++){const v=u.push("td_open","td",1);l[C]&&(v.attrs=[["style","text-align:"+l[C]]]);const I=u.push("inline","",0);I.content=s[C]?s[C].trim():"",I.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return p&&(u.push("tbody_close","tbody",-1),p[1]=n),u.push("table_close","table",-1),g[1]=n,u.parentType=b,u.line=n,!0}function O0(u,e,t){if(u.sCount[e]-u.blkIndent<4)return!1;let r=e+1,n=r;for(;r<t;){if(u.isEmpty(r)){r++;continue}if(u.sCount[r]-u.blkIndent>=4){r++,n=r;continue}break}u.line=n;const c=u.push("code_block","code",0);return c.content=u.getLines(e,n,4+u.blkIndent,!1)+`
|
20
20
|
`,c.map=[e,u.line],!0}function N0(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||n+3>c)return!1;const i=u.src.charCodeAt(n);if(i!==126&&i!==96)return!1;let o=n;n=u.skipChars(n,i);let a=n-o;if(a<3)return!1;const s=u.src.slice(o,n),l=u.src.slice(n,c);if(i===96&&l.indexOf(String.fromCharCode(i))>=0)return!1;if(r)return!0;let d=e,b=!1;for(;d++,!(d>=t||(n=o=u.bMarks[d]+u.tShift[d],c=u.eMarks[d],n<c&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(n)===i&&!(u.sCount[d]-u.blkIndent>=4)&&(n=u.skipChars(n,i),!(n-o<a)&&(n=u.skipSpaces(n),!(n<c)))){b=!0;break}a=u.sCount[e],u.line=d+(b?1:0);const h=u.push("fence","code",0);return h.info=l,h.content=u.getLines(e+1,d,a,!0),h.markup=s,h.map=[e,u.line],!0}function j0(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];const i=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(n)!==62)return!1;if(r)return!0;const o=[],a=[],s=[],l=[],d=u.md.block.ruler.getRules("blockquote"),b=u.parentType;u.parentType="blockquote";let h=!1,f;for(f=e;f<t;f++){const _=u.sCount[f]<u.blkIndent;if(n=u.bMarks[f]+u.tShift[f],c=u.eMarks[f],n>=c)break;if(u.src.charCodeAt(n++)===62&&!_){let m=u.sCount[f]+1,C,v;u.src.charCodeAt(n)===32?(n++,m++,v=!1,C=!0):u.src.charCodeAt(n)===9?(C=!0,(u.bsCount[f]+m)%4===3?(n++,m++,v=!1):v=!0):C=!1;let I=m;for(o.push(u.bMarks[f]),u.bMarks[f]=n;n<c;){const L=u.src.charCodeAt(n);if(E(L))L===9?I+=4-(I+u.bsCount[f]+(v?1:0))%4:I++;else break;n++}h=n>=c,a.push(u.bsCount[f]),u.bsCount[f]=u.sCount[f]+1+(C?1:0),s.push(u.sCount[f]),u.sCount[f]=I-m,l.push(u.tShift[f]),u.tShift[f]=n-u.bMarks[f];continue}if(h)break;let x=!1;for(let m=0,C=d.length;m<C;m++)if(d[m](u,f,t,!0)){x=!0;break}if(x){u.lineMax=f,u.blkIndent!==0&&(o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]-=u.blkIndent);break}o.push(u.bMarks[f]),a.push(u.bsCount[f]),l.push(u.tShift[f]),s.push(u.sCount[f]),u.sCount[f]=-1}const g=u.blkIndent;u.blkIndent=0;const k=u.push("blockquote_open","blockquote",1);k.markup=">";const D=[e,0];k.map=D,u.md.block.tokenize(u,e,f);const p=u.push("blockquote_close","blockquote",-1);p.markup=">",u.lineMax=i,u.parentType=b,D[1]=u.line;for(let _=0;_<l.length;_++)u.bMarks[_+e]=o[_],u.tShift[_+e]=l[_],u.sCount[_+e]=s[_],u.bsCount[_+e]=a[_];return u.blkIndent=g,!0}function U0(u,e,t,r){const n=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.bMarks[e]+u.tShift[e];const i=u.src.charCodeAt(c++);if(i!==42&&i!==45&&i!==95)return!1;let o=1;for(;c<n;){const s=u.src.charCodeAt(c++);if(s!==i&&!E(s))return!1;s===i&&o++}if(o<3)return!1;if(r)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(o+1).join(String.fromCharCode(i)),!0}function Vu(u,e){const t=u.eMarks[e];let r=u.bMarks[e]+u.tShift[e];const n=u.src.charCodeAt(r++);if(n!==42&&n!==45&&n!==43)return-1;if(r<t){const c=u.src.charCodeAt(r);if(!E(c))return-1}return r}function Gu(u,e){const t=u.bMarks[e]+u.tShift[e],r=u.eMarks[e];let n=t;if(n+1>=r)return-1;let c=u.src.charCodeAt(n++);if(c<48||c>57)return-1;for(;;){if(n>=r)return-1;if(c=u.src.charCodeAt(n++),c>=48&&c<=57){if(n-t>=10)return-1;continue}if(c===41||c===46)break;return-1}return n<r&&(c=u.src.charCodeAt(n),!E(c))?-1:n}function H0(u,e){const t=u.level+2;for(let r=e+2,n=u.tokens.length-2;r<n;r++)u.tokens[r].level===t&&u.tokens[r].type==="paragraph_open"&&(u.tokens[r+2].hidden=!0,u.tokens[r].hidden=!0,r+=2)}function Z0(u,e,t,r){let n,c,i,o,a=e,s=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let l=!1;r&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(l=!0);let d,b,h;if((h=Gu(u,a))>=0){if(d=!0,i=u.bMarks[a]+u.tShift[a],b=Number(u.src.slice(i,h-1)),l&&b!==1)return!1}else if((h=Vu(u,a))>=0)d=!1;else return!1;if(l&&u.skipSpaces(h)>=u.eMarks[a])return!1;if(r)return!0;const f=u.src.charCodeAt(h-1),g=u.tokens.length;d?(o=u.push("ordered_list_open","ol",1),b!==1&&(o.attrs=[["start",b]])):o=u.push("bullet_list_open","ul",1);const k=[a,0];o.map=k,o.markup=String.fromCharCode(f);let D=!1;const p=u.md.block.ruler.getRules("list"),_=u.parentType;for(u.parentType="list";a<t;){c=h,n=u.eMarks[a];const x=u.sCount[a]+h-(u.bMarks[a]+u.tShift[a]);let m=x;for(;c<n;){const j=u.src.charCodeAt(c);if(j===9)m+=4-(m+u.bsCount[a])%4;else if(j===32)m++;else break;c++}const C=c;let v;C>=n?v=1:v=m-x,v>4&&(v=1);const I=x+v;o=u.push("list_item_open","li",1),o.markup=String.fromCharCode(f);const L=[a,0];o.map=L,d&&(o.info=u.src.slice(i,h-1));const W=u.tight,hu=u.tShift[a],Ae=u.sCount[a],Fe=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=I,u.tight=!0,u.tShift[a]=C-u.bMarks[a],u.sCount[a]=m,C>=n&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||D)&&(s=!1),D=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=Fe,u.tShift[a]=hu,u.sCount[a]=Ae,u.tight=W,o=u.push("list_item_close","li",-1),o.markup=String.fromCharCode(f),a=u.line,L[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let zu=!1;for(let j=0,ve=p.length;j<ve;j++)if(p[j](u,a,t,!0)){zu=!0;break}if(zu)break;if(d){if(h=Gu(u,a),h<0)break;i=u.bMarks[a]+u.tShift[a]}else if(h=Vu(u,a),h<0)break;if(f!==u.src.charCodeAt(h-1))break}return d?o=u.push("ordered_list_close","ol",-1):o=u.push("bullet_list_close","ul",-1),o.markup=String.fromCharCode(f),k[1]=a,u.line=a,u.parentType=_,s&&H0(u,g),!0}function V0(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e],i=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(n)!==91)return!1;function o(p){const _=u.lineMax;if(p>=_||u.isEmpty(p))return null;let x=!1;if(u.sCount[p]-u.blkIndent>3&&(x=!0),u.sCount[p]<0&&(x=!0),!x){const v=u.md.block.ruler.getRules("reference"),I=u.parentType;u.parentType="reference";let L=!1;for(let W=0,hu=v.length;W<hu;W++)if(v[W](u,p,_,!0)){L=!0;break}if(u.parentType=I,L)return null}const m=u.bMarks[p]+u.tShift[p],C=u.eMarks[p];return u.src.slice(m,C+1)}let a=u.src.slice(n,c+1);c=a.length;let s=-1;for(n=1;n<c;n++){const p=a.charCodeAt(n);if(p===91)return!1;if(p===93){s=n;break}else if(p===10){const _=o(i);_!==null&&(a+=_,c=a.length,i++)}else if(p===92&&(n++,n<c&&a.charCodeAt(n)===10)){const _=o(i);_!==null&&(a+=_,c=a.length,i++)}}if(s<0||a.charCodeAt(s+1)!==58)return!1;for(n=s+2;n<c;n++){const p=a.charCodeAt(n);if(p===10){const _=o(i);_!==null&&(a+=_,c=a.length,i++)}else if(!E(p))break}const l=u.md.helpers.parseLinkDestination(a,n,c);if(!l.ok)return!1;const d=u.md.normalizeLink(l.str);if(!u.md.validateLink(d))return!1;n=l.pos;const b=n,h=i,f=n;for(;n<c;n++){const p=a.charCodeAt(n);if(p===10){const _=o(i);_!==null&&(a+=_,c=a.length,i++)}else if(!E(p))break}let g=u.md.helpers.parseLinkTitle(a,n,c);for(;g.can_continue;){const p=o(i);if(p===null)break;a+=p,n=c,c=a.length,i++,g=u.md.helpers.parseLinkTitle(a,n,c,g)}let k;for(n<c&&f!==n&&g.ok?(k=g.str,n=g.pos):(k="",n=b,i=h);n<c;){const p=a.charCodeAt(n);if(!E(p))break;n++}if(n<c&&a.charCodeAt(n)!==10&&k)for(k="",n=b,i=h;n<c;){const p=a.charCodeAt(n);if(!E(p))break;n++}if(n<c&&a.charCodeAt(n)!==10)return!1;const D=lu(a.slice(1,s));return D?(r||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[D]>"u"&&(u.env.references[D]={title:k,href:d}),u.line=i),!0):!1}const G0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],W0="[a-zA-Z_:][a-zA-Z0-9:._-]*",J0="[^\"'=<>`\\x00-\\x20]+",Q0="'[^']*'",K0='"[^"]*"',X0="(?:"+J0+"|"+Q0+"|"+K0+")",Y0="(?:\\s+"+W0+"(?:\\s*=\\s*"+X0+")?)",le="<[A-Za-z][A-Za-z0-9\\-]*"+Y0+"*\\s*\\/?>",fe="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ut="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",et="<[?][\\s\\S]*?[?]>",tt="<![A-Za-z][^>]*>",rt="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",nt=new RegExp("^(?:"+le+"|"+fe+"|"+ut+"|"+et+"|"+tt+"|"+rt+")"),ct=new RegExp("^(?:"+le+"|"+fe+")"),U=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+G0.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ct.source+"\\s*$"),/^$/,!1]];function it(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(n)!==60)return!1;let i=u.src.slice(n,c),o=0;for(;o<U.length&&!U[o][0].test(i);o++);if(o===U.length)return!1;if(r)return U[o][2];let a=e+1;if(!U[o][1].test(i)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(n=u.bMarks[a]+u.tShift[a],c=u.eMarks[a],i=u.src.slice(n,c),U[o][1].test(i)){i.length!==0&&a++;break}}u.line=a;const s=u.push("html_block","",0);return s.map=[e,a],s.content=u.getLines(e,a,u.blkIndent,!0),!0}function ot(u,e,t,r){let n=u.bMarks[e]+u.tShift[e],c=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let i=u.src.charCodeAt(n);if(i!==35||n>=c)return!1;let o=1;for(i=u.src.charCodeAt(++n);i===35&&n<c&&o<=6;)o++,i=u.src.charCodeAt(++n);if(o>6||n<c&&!E(i))return!1;if(r)return!0;c=u.skipSpacesBack(c,n);const a=u.skipCharsBack(c,35,n);a>n&&E(u.src.charCodeAt(a-1))&&(c=a),u.line=e+1;const s=u.push("heading_open","h"+String(o),1);s.markup="########".slice(0,o),s.map=[e,u.line];const l=u.push("inline","",0);l.content=u.src.slice(n,c).trim(),l.map=[e,u.line],l.children=[];const d=u.push("heading_close","h"+String(o),-1);return d.markup="########".slice(0,o),!0}function at(u,e,t){const r=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const n=u.parentType;u.parentType="paragraph";let c=0,i,o=e+1;for(;o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3)continue;if(u.sCount[o]>=u.blkIndent){let h=u.bMarks[o]+u.tShift[o];const f=u.eMarks[o];if(h<f&&(i=u.src.charCodeAt(h),(i===45||i===61)&&(h=u.skipChars(h,i),h=u.skipSpaces(h),h>=f))){c=i===61?1:2;break}}if(u.sCount[o]<0)continue;let b=!1;for(let h=0,f=r.length;h<f;h++)if(r[h](u,o,t,!0)){b=!0;break}if(b)break}if(!c)return!1;const a=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o+1;const s=u.push("heading_open","h"+String(c),1);s.markup=String.fromCharCode(i),s.map=[e,u.line];const l=u.push("inline","",0);l.content=a,l.map=[e,u.line-1],l.children=[];const d=u.push("heading_close","h"+String(c),-1);return d.markup=String.fromCharCode(i),u.parentType=n,!0}function st(u,e,t){const r=u.md.block.ruler.getRules("paragraph"),n=u.parentType;let c=e+1;for(u.parentType="paragraph";c<t&&!u.isEmpty(c);c++){if(u.sCount[c]-u.blkIndent>3||u.sCount[c]<0)continue;let s=!1;for(let l=0,d=r.length;l<d;l++)if(r[l](u,c,t,!0)){s=!0;break}if(s)break}const i=u.getLines(e,c,u.blkIndent,!1).trim();u.line=c;const o=u.push("paragraph_open","p",1);o.map=[e,u.line];const a=u.push("inline","",0);return a.content=i,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=n,!0}const nu=[["table",$0,["paragraph","reference"]],["code",O0],["fence",N0,["paragraph","reference","blockquote","list"]],["blockquote",j0,["paragraph","reference","blockquote","list"]],["hr",U0,["paragraph","reference","blockquote","list"]],["list",Z0,["paragraph","reference","blockquote"]],["reference",V0],["html_block",it,["paragraph","reference","blockquote"]],["heading",ot,["paragraph","reference","blockquote"]],["lheading",at],["paragraph",st]];function fu(){this.ruler=new w;for(let u=0;u<nu.length;u++)this.ruler.push(nu[u][0],nu[u][1],{alt:(nu[u][2]||[]).slice()})}fu.prototype.tokenize=function(u,e,t){const r=this.ruler.getRules(""),n=r.length,c=u.md.options.maxNesting;let i=e,o=!1;for(;i<t&&(u.line=i=u.skipEmptyLines(i),!(i>=t||u.sCount[i]<u.blkIndent));){if(u.level>=c){u.line=t;break}const a=u.line;let s=!1;for(let l=0;l<n;l++)if(s=r[l](u,i,t,!1),s){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");u.tight=!o,u.isEmpty(u.line-1)&&(o=!0),i=u.line,i<t&&u.isEmpty(i)&&(o=!0,i++,u.line=i)}};fu.prototype.parse=function(u,e,t,r){if(!u)return;const n=new this.State(u,e,t,r);this.tokenize(n,n.line,n.lineMax)};fu.prototype.State=R;function uu(u,e,t,r){this.src=u,this.env=t,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}uu.prototype.pushPending=function(){const u=new q("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u};uu.prototype.push=function(u,e,t){this.pending&&this.pushPending();const r=new q(u,e,t);let n=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],n={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(n),r};uu.prototype.scanDelims=function(u,e){const t=this.posMax,r=this.src.charCodeAt(u),n=u>0?this.src.charCodeAt(u-1):32;let c=u;for(;c<t&&this.src.charCodeAt(c)===r;)c++;const i=c-u,o=c<t?this.src.charCodeAt(c):32,a=K(n)||Q(String.fromCharCode(n)),s=K(o)||Q(String.fromCharCode(o)),l=J(n),d=J(o),b=!d&&(!s||l||a),h=!l&&(!a||d||s);return{can_open:b&&(e||!h||a),can_close:h&&(e||!b||s),length:i}};uu.prototype.Token=q;function lt(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function ft(u,e){let t=u.pos;for(;t<u.posMax&&!lt(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const dt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function ht(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,r=u.posMax;if(t+3>r||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const n=u.pending.match(dt);if(!n)return!1;const c=n[1],i=u.md.linkify.matchAtStart(u.src.slice(t-c.length));if(!i)return!1;let o=i.url;if(o.length<=c.length)return!1;o=o.replace(/\*+$/,"");const a=u.md.normalizeLink(o);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-c.length);const s=u.push("link_open","a",1);s.attrs=[["href",a]],s.markup="linkify",s.info="auto";const l=u.push("text","",0);l.content=u.md.normalizeLinkText(o);const d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=o.length-c.length,!0}function bt(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const r=u.pending.length-1,n=u.posMax;if(!e)if(r>=0&&u.pending.charCodeAt(r)===32)if(r>=1&&u.pending.charCodeAt(r-1)===32){let c=r-1;for(;c>=1&&u.pending.charCodeAt(c-1)===32;)c--;u.pending=u.pending.slice(0,c),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<n&&E(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const qu=[];for(let u=0;u<256;u++)qu.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){qu[u.charCodeAt(0)]=1});function pt(u,e){let t=u.pos;const r=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=r))return!1;let n=u.src.charCodeAt(t);if(n===10){for(e||u.push("hardbreak","br",0),t++;t<r&&(n=u.src.charCodeAt(t),!!E(n));)t++;return u.pos=t,!0}let c=u.src[t];if(n>=55296&&n<=56319&&t+1<r){const o=u.src.charCodeAt(t+1);o>=56320&&o<=57343&&(c+=u.src[t+1],t++)}const i="\\"+c;if(!e){const o=u.push("text_special","",0);n<256&&qu[n]!==0?o.content=c:o.content=i,o.markup=i,o.info="escape"}return u.pos=t+1,!0}function xt(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const n=t;t++;const c=u.posMax;for(;t<c&&u.src.charCodeAt(t)===96;)t++;const i=u.src.slice(n,t),o=i.length;if(u.backticksScanned&&(u.backticks[o]||0)<=n)return e||(u.pending+=i),u.pos+=o,!0;let a=t,s;for(;(s=u.src.indexOf("`",a))!==-1;){for(a=s+1;a<c&&u.src.charCodeAt(a)===96;)a++;const l=a-s;if(l===o){if(!e){const d=u.push("code_inline","code",0);d.markup=i,d.content=u.src.slice(t,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[l]=s}return u.backticksScanned=!0,e||(u.pending+=i),u.pos+=o,!0}function _t(u,e){const t=u.pos,r=u.src.charCodeAt(t);if(e||r!==126)return!1;const n=u.scanDelims(u.pos,!0);let c=n.length;const i=String.fromCharCode(r);if(c<2)return!1;let o;c%2&&(o=u.push("text","",0),o.content=i,c--);for(let a=0;a<c;a+=2)o=u.push("text","",0),o.content=i+i,u.delimiters.push({marker:r,length:0,token:u.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return u.pos+=n.length,!0}function Wu(u,e){let t;const r=[],n=e.length;for(let c=0;c<n;c++){const i=e[c];if(i.marker!==126||i.end===-1)continue;const o=e[i.end];t=u.tokens[i.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[o.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[o.token-1].type==="text"&&u.tokens[o.token-1].content==="~"&&r.push(o.token-1)}for(;r.length;){const c=r.pop();let i=c+1;for(;i<u.tokens.length&&u.tokens[i].type==="s_close";)i++;i--,c!==i&&(t=u.tokens[i],u.tokens[i]=u.tokens[c],u.tokens[c]=t)}}function mt(u){const e=u.tokens_meta,t=u.tokens_meta.length;Wu(u,u.delimiters);for(let r=0;r<t;r++)e[r]&&e[r].delimiters&&Wu(u,e[r].delimiters)}const de={tokenize:_t,postProcess:mt};function gt(u,e){const t=u.pos,r=u.src.charCodeAt(t);if(e||r!==95&&r!==42)return!1;const n=u.scanDelims(u.pos,r===42);for(let c=0;c<n.length;c++){const i=u.push("text","",0);i.content=String.fromCharCode(r),u.delimiters.push({marker:r,length:n.length,token:u.tokens.length-1,end:-1,open:n.can_open,close:n.can_close})}return u.pos+=n.length,!0}function Ju(u,e){const t=e.length;for(let r=t-1;r>=0;r--){const n=e[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;const c=e[n.end],i=r>0&&e[r-1].end===n.end+1&&e[r-1].marker===n.marker&&e[r-1].token===n.token-1&&e[n.end+1].token===c.token+1,o=String.fromCharCode(n.marker),a=u.tokens[n.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?o+o:o,a.content="";const s=u.tokens[c.token];s.type=i?"strong_close":"em_close",s.tag=i?"strong":"em",s.nesting=-1,s.markup=i?o+o:o,s.content="",i&&(u.tokens[e[r-1].token].content="",u.tokens[e[n.end+1].token].content="",r--)}}function kt(u){const e=u.tokens_meta,t=u.tokens_meta.length;Ju(u,u.delimiters);for(let r=0;r<t;r++)e[r]&&e[r].delimiters&&Ju(u,e[r].delimiters)}const he={tokenize:gt,postProcess:kt};function Ct(u,e){let t,r,n,c,i="",o="",a=u.pos,s=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const l=u.pos,d=u.posMax,b=u.pos+1,h=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(h<0)return!1;let f=h+1;if(f<d&&u.src.charCodeAt(f)===40){for(s=!1,f++;f<d&&(t=u.src.charCodeAt(f),!(!E(t)&&t!==10));f++);if(f>=d)return!1;if(a=f,n=u.md.helpers.parseLinkDestination(u.src,f,u.posMax),n.ok){for(i=u.md.normalizeLink(n.str),u.md.validateLink(i)?f=n.pos:i="",a=f;f<d&&(t=u.src.charCodeAt(f),!(!E(t)&&t!==10));f++);if(n=u.md.helpers.parseLinkTitle(u.src,f,u.posMax),f<d&&a!==f&&n.ok)for(o=n.str,f=n.pos;f<d&&(t=u.src.charCodeAt(f),!(!E(t)&&t!==10));f++);}(f>=d||u.src.charCodeAt(f)!==41)&&(s=!0),f++}if(s){if(typeof u.env.references>"u")return!1;if(f<d&&u.src.charCodeAt(f)===91?(a=f+1,f=u.md.helpers.parseLinkLabel(u,f),f>=0?r=u.src.slice(a,f++):f=h+1):f=h+1,r||(r=u.src.slice(b,h)),c=u.env.references[lu(r)],!c)return u.pos=l,!1;i=c.href,o=c.title}if(!e){u.pos=b,u.posMax=h;const g=u.push("link_open","a",1),k=[["href",i]];g.attrs=k,o&&k.push(["title",o]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=f,u.posMax=d,!0}function Dt(u,e){let t,r,n,c,i,o,a,s,l="";const d=u.pos,b=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const h=u.pos+2,f=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(f<0)return!1;if(c=f+1,c<b&&u.src.charCodeAt(c)===40){for(c++;c<b&&(t=u.src.charCodeAt(c),!(!E(t)&&t!==10));c++);if(c>=b)return!1;for(s=c,o=u.md.helpers.parseLinkDestination(u.src,c,u.posMax),o.ok&&(l=u.md.normalizeLink(o.str),u.md.validateLink(l)?c=o.pos:l=""),s=c;c<b&&(t=u.src.charCodeAt(c),!(!E(t)&&t!==10));c++);if(o=u.md.helpers.parseLinkTitle(u.src,c,u.posMax),c<b&&s!==c&&o.ok)for(a=o.str,c=o.pos;c<b&&(t=u.src.charCodeAt(c),!(!E(t)&&t!==10));c++);else a="";if(c>=b||u.src.charCodeAt(c)!==41)return u.pos=d,!1;c++}else{if(typeof u.env.references>"u")return!1;if(c<b&&u.src.charCodeAt(c)===91?(s=c+1,c=u.md.helpers.parseLinkLabel(u,c),c>=0?n=u.src.slice(s,c++):c=f+1):c=f+1,n||(n=u.src.slice(h,f)),i=u.env.references[lu(n)],!i)return u.pos=d,!1;l=i.href,a=i.title}if(!e){r=u.src.slice(h,f);const g=[];u.md.inline.parse(r,u.md,u.env,g);const k=u.push("image","img",0),D=[["src",l],["alt",""]];k.attrs=D,k.children=g,k.content=r,a&&D.push(["title",a])}return u.pos=c,u.posMax=b,!0}const Et=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,yt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function At(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const r=u.pos,n=u.posMax;for(;;){if(++t>=n)return!1;const i=u.src.charCodeAt(t);if(i===60)return!1;if(i===62)break}const c=u.src.slice(r+1,t);if(yt.test(c)){const i=u.md.normalizeLink(c);if(!u.md.validateLink(i))return!1;if(!e){const o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);const s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}if(Et.test(c)){const i=u.md.normalizeLink("mailto:"+c);if(!u.md.validateLink(i))return!1;if(!e){const o=u.push("link_open","a",1);o.attrs=[["href",i]],o.markup="autolink",o.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(c);const s=u.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return u.pos+=c.length+2,!0}return!1}function Ft(u){return/^<a[>\s]/i.test(u)}function vt(u){return/^<\/a\s*>/i.test(u)}function wt(u){const e=u|32;return e>=97&&e<=122}function St(u,e){if(!u.md.options.html)return!1;const t=u.posMax,r=u.pos;if(u.src.charCodeAt(r)!==60||r+2>=t)return!1;const n=u.src.charCodeAt(r+1);if(n!==33&&n!==63&&n!==47&&!wt(n))return!1;const c=u.src.slice(r).match(nt);if(!c)return!1;if(!e){const i=u.push("html_inline","",0);i.content=c[0],Ft(i.content)&&u.linkLevel++,vt(i.content)&&u.linkLevel--}return u.pos+=c[0].length,!0}const Tt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,It=/^&([a-z][a-z0-9]{1,31});/i;function qt(u,e){const t=u.pos,r=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=r)return!1;if(u.src.charCodeAt(t+1)===35){const c=u.src.slice(t).match(Tt);if(c){if(!e){const i=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),o=u.push("text_special","",0);o.content=Tu(i)?iu(i):iu(65533),o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}else{const c=u.src.slice(t).match(It);if(c){const i=ce(c[0]);if(i!==c[0]){if(!e){const o=u.push("text_special","",0);o.content=i,o.markup=c[0],o.info="entity"}return u.pos+=c[0].length,!0}}}return!1}function Qu(u){const e={},t=u.length;if(!t)return;let r=0,n=-2;const c=[];for(let i=0;i<t;i++){const o=u[i];if(c.push(0),(u[r].marker!==o.marker||n!==o.token-1)&&(r=i),n=o.token,o.length=o.length||0,!o.close)continue;e.hasOwnProperty(o.marker)||(e[o.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[o.marker][(o.open?3:0)+o.length%3];let s=r-c[r]-1,l=s;for(;s>a;s-=c[s]+1){const d=u[s];if(d.marker===o.marker&&d.open&&d.end<0){let b=!1;if((d.close||o.open)&&(d.length+o.length)%3===0&&(d.length%3!==0||o.length%3!==0)&&(b=!0),!b){const h=s>0&&!u[s-1].open?c[s-1]+1:0;c[i]=i-s+h,c[s]=h,o.open=!1,d.end=i,d.close=!1,l=-1,n=-2;break}}}l!==-1&&(e[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}function Bt(u){const e=u.tokens_meta,t=u.tokens_meta.length;Qu(u.delimiters);for(let r=0;r<t;r++)e[r]&&e[r].delimiters&&Qu(e[r].delimiters)}function zt(u){let e,t,r=0;const n=u.tokens,c=u.tokens.length;for(e=t=0;e<c;e++)n[e].nesting<0&&r--,n[e].level=r,n[e].nesting>0&&r++,n[e].type==="text"&&e+1<c&&n[e+1].type==="text"?n[e+1].content=n[e].content+n[e+1].content:(e!==t&&(n[t]=n[e]),t++);e!==t&&(n.length=t)}const _u=[["text",ft],["linkify",ht],["newline",bt],["escape",pt],["backticks",xt],["strikethrough",de.tokenize],["emphasis",he.tokenize],["link",Ct],["image",Dt],["autolink",At],["html_inline",St],["entity",qt]],mu=[["balance_pairs",Bt],["strikethrough",de.postProcess],["emphasis",he.postProcess],["fragments_join",zt]];function eu(){this.ruler=new w;for(let u=0;u<_u.length;u++)this.ruler.push(_u[u][0],_u[u][1]);this.ruler2=new w;for(let u=0;u<mu.length;u++)this.ruler2.push(mu[u][0],mu[u][1])}eu.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),r=t.length,n=u.md.options.maxNesting,c=u.cache;if(typeof c[e]<"u"){u.pos=c[e];return}let i=!1;if(u.level<n){for(let o=0;o<r;o++)if(u.level++,i=t[o](u,!0),u.level--,i){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;i||u.pos++,c[e]=u.pos};eu.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,r=u.posMax,n=u.md.options.maxNesting;for(;u.pos<r;){const c=u.pos;let i=!1;if(u.level<n){for(let o=0;o<t;o++)if(i=e[o](u,!1),i){if(c>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(i){if(u.pos>=r)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()};eu.prototype.parse=function(u,e,t,r){const n=new this.State(u,e,t,r);this.tokenize(n);const c=this.ruler2.getRules(""),i=c.length;for(let o=0;o<i;o++)c[o](n)};eu.prototype.State=uu;function Mt(u){const e={};u=u||{},e.src_Any=ue.source,e.src_Cc=ee.source,e.src_Z=re.source,e.src_P=wu.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function yu(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(r){u[r]=t[r]})}),u}function du(u){return Object.prototype.toString.call(u)}function Rt(u){return du(u)==="[object String]"}function Lt(u){return du(u)==="[object Object]"}function Pt(u){return du(u)==="[object RegExp]"}function Ku(u){return du(u)==="[object Function]"}function $t(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const be={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Ot(u){return Object.keys(u||{}).reduce(function(e,t){return e||be.hasOwnProperty(t)},!1)}const Nt={"http:":{validate:function(u,e,t){const r=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(r)?r.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const r=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(r)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:r.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const r=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(r)?r.match(t.re.mailto)[0].length:0}}},jt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Ut="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Ht(u){u.__index__=-1,u.__text_cache__=""}function Zt(u){return function(e,t){const r=e.slice(t);return u.test(r)?r.match(u)[0].length:0}}function Xu(){return function(u,e){e.normalize(u)}}function ou(u){const e=u.re=Mt(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(jt),t.push(e.src_xn),e.src_tlds=t.join("|");function r(o){return o.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const n=[];u.__compiled__={};function c(o,a){throw new Error('(LinkifyIt) Invalid schema "'+o+'": '+a)}Object.keys(u.__schemas__).forEach(function(o){const a=u.__schemas__[o];if(a===null)return;const s={validate:null,link:null};if(u.__compiled__[o]=s,Lt(a)){Pt(a.validate)?s.validate=Zt(a.validate):Ku(a.validate)?s.validate=a.validate:c(o,a),Ku(a.normalize)?s.normalize=a.normalize:a.normalize?c(o,a):s.normalize=Xu();return}if(Rt(a)){n.push(o);return}c(o,a)}),n.forEach(function(o){u.__compiled__[u.__schemas__[o]]&&(u.__compiled__[o].validate=u.__compiled__[u.__schemas__[o]].validate,u.__compiled__[o].normalize=u.__compiled__[u.__schemas__[o]].normalize)}),u.__compiled__[""]={validate:null,normalize:Xu()};const i=Object.keys(u.__compiled__).filter(function(o){return o.length>0&&u.__compiled__[o]}).map($t).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+i+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+i+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),Ht(u)}function Vt(u,e){const t=u.__index__,r=u.__last_index__,n=u.__text_cache__.slice(t,r);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=r+e,this.raw=n,this.text=n,this.url=n}function Au(u,e){const t=new Vt(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function S(u,e){if(!(this instanceof S))return new S(u,e);e||Ot(u)&&(e=u,u={}),this.__opts__=yu({},be,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=yu({},Nt,u),this.__compiled__={},this.__tlds__=Ut,this.__tlds_replaced__=!1,this.re={},ou(this)}S.prototype.add=function(e,t){return this.__schemas__[e]=t,ou(this),this};S.prototype.set=function(e){return this.__opts__=yu(this.__opts__,e),this};S.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,r,n,c,i,o,a,s,l;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(c=this.testSchemaAt(e,t[2],a.lastIndex),c){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=e.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=r.index+r[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(l=e.indexOf("@"),l>=0&&(n=e.match(this.re.email_fuzzy))!==null&&(i=n.index+n[1].length,o=n.index+n[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=o))),this.__index__>=0};S.prototype.pretest=function(e){return this.re.pretest.test(e)};S.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0};S.prototype.match=function(e){const t=[];let r=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(Au(this,r)),r=this.__last_index__);let n=r?e.slice(r):e;for(;this.test(n);)t.push(Au(this,r)),n=n.slice(this.__last_index__),r+=this.__last_index__;return t.length?t:null};S.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const r=this.testSchemaAt(e,t[2],t[0].length);return r?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r,Au(this,0)):null};S.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,n,c){return r!==c[n-1]}).reverse(),ou(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,ou(this),this)};S.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};S.prototype.onCompile=function(){};const H=2147483647,B=36,Bu=1,X=26,Gt=38,Wt=700,pe=72,xe=128,_e="-",Jt=/^xn--/,Qt=/[^\0-\x7F]/,Kt=/[\x2E\u3002\uFF0E\uFF61]/g,Xt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},gu=B-Bu,z=Math.floor,ku=String.fromCharCode;function P(u){throw new RangeError(Xt[u])}function Yt(u,e){const t=[];let r=u.length;for(;r--;)t[r]=e(u[r]);return t}function me(u,e){const t=u.split("@");let r="";t.length>1&&(r=t[0]+"@",u=t[1]),u=u.replace(Kt,".");const n=u.split("."),c=Yt(n,e).join(".");return r+c}function ge(u){const e=[];let t=0;const r=u.length;for(;t<r;){const n=u.charCodeAt(t++);if(n>=55296&&n<=56319&&t<r){const c=u.charCodeAt(t++);(c&64512)==56320?e.push(((n&1023)<<10)+(c&1023)+65536):(e.push(n),t--)}else e.push(n)}return e}const ur=u=>String.fromCodePoint(...u),er=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:B},Yu=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},ke=function(u,e,t){let r=0;for(u=t?z(u/Wt):u>>1,u+=z(u/e);u>gu*X>>1;r+=B)u=z(u/gu);return z(r+(gu+1)*u/(u+Gt))},Ce=function(u){const e=[],t=u.length;let r=0,n=xe,c=pe,i=u.lastIndexOf(_e);i<0&&(i=0);for(let o=0;o<i;++o)u.charCodeAt(o)>=128&&P("not-basic"),e.push(u.charCodeAt(o));for(let o=i>0?i+1:0;o<t;){const a=r;for(let l=1,d=B;;d+=B){o>=t&&P("invalid-input");const b=er(u.charCodeAt(o++));b>=B&&P("invalid-input"),b>z((H-r)/l)&&P("overflow"),r+=b*l;const h=d<=c?Bu:d>=c+X?X:d-c;if(b<h)break;const f=B-h;l>z(H/f)&&P("overflow"),l*=f}const s=e.length+1;c=ke(r-a,s,a==0),z(r/s)>H-n&&P("overflow"),n+=z(r/s),r%=s,e.splice(r++,0,n)}return String.fromCodePoint(...e)},De=function(u){const e=[];u=ge(u);const t=u.length;let r=xe,n=0,c=pe;for(const a of u)a<128&&e.push(ku(a));const i=e.length;let o=i;for(i&&e.push(_e);o<t;){let a=H;for(const l of u)l>=r&&l<a&&(a=l);const s=o+1;a-r>z((H-n)/s)&&P("overflow"),n+=(a-r)*s,r=a;for(const l of u)if(l<r&&++n>H&&P("overflow"),l===r){let d=n;for(let b=B;;b+=B){const h=b<=c?Bu:b>=c+X?X:b-c;if(d<h)break;const f=d-h,g=B-h;e.push(ku(Yu(h+f%g,0))),d=z(f/g)}e.push(ku(Yu(d,0))),c=ke(n,s,o===i),n=0,++o}++n,++r}return e.join("")},tr=function(u){return me(u,function(e){return Jt.test(e)?Ce(e.slice(4).toLowerCase()):e})},rr=function(u){return me(u,function(e){return Qt.test(e)?"xn--"+De(e):e})},Ee={version:"2.3.1",ucs2:{decode:ge,encode:ur},decode:Ce,encode:De,toASCII:rr,toUnicode:tr},nr={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},cr={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},ir={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},or={default:nr,zero:cr,commonmark:ir},ar=/^(vbscript|javascript|file|data):/,sr=/^data:image\/(gif|png|jpeg|webp);/;function lr(u){const e=u.trim().toLowerCase();return ar.test(e)?sr.test(e):!0}const ye=["http:","https:","mailto:"];function fr(u){const e=vu(u,!0);if(e.hostname&&(!e.protocol||ye.indexOf(e.protocol)>=0))try{e.hostname=Ee.toASCII(e.hostname)}catch{}return Y(Fu(e))}function dr(u){const e=vu(u,!0);if(e.hostname&&(!e.protocol||ye.indexOf(e.protocol)>=0))try{e.hostname=Ee.toUnicode(e.hostname)}catch{}return Z(Fu(e),Z.defaultChars+"%")}function T(u,e){if(!(this instanceof T))return new T(u,e);e||Su(u)||(e=u||{},u="default"),this.inline=new eu,this.block=new fu,this.core=new Iu,this.renderer=new G,this.linkify=new S,this.validateLink=lr,this.normalizeLink=fr,this.normalizeLinkText=dr,this.utils=b0,this.helpers=su({},m0),this.options={},this.configure(u),e&&this.set(e)}T.prototype.set=function(u){return su(this.options,u),this};T.prototype.configure=function(u){const e=this;if(Su(u)){const t=u;if(u=or[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this};T.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(n){t=t.concat(this[n].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const r=u.filter(function(n){return t.indexOf(n)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};T.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(n){t=t.concat(this[n].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const r=u.filter(function(n){return t.indexOf(n)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};T.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this};T.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens};T.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)};T.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};T.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};const hr=`:host{--cv-notebook-height: 100%;--cv-notebook-width: 100%}:host cv-notebook-cell.dragged{transform:translateZ(0)}:host cv-icon-button button{font-variation-settings:"FILL" 1}.error{margin:.75rem 1px;padding:0 .25rem}.notebook{background-color:var(--cv-theme-surface-container-lowest);box-sizing:border-box;display:flex;flex-direction:column;height:100%}.notebookCells{box-sizing:border-box;display:flex;flex-direction:column;gap:.5rem;height:calc(100% - 106px);overflow-y:auto;overflow-x:hidden;padding:1rem;width:100%}.notebookActions{display:flex;gap:1rem;justify-content:center;padding-top:1rem}:host .notebookHeaderActions{--cv-select-height: 2.25rem;--cv-select-label-top-position: -25.25px;--mdc-icon-button-size: 40px;--mdc-icon-size: 22px;align-items:center;border:1px solid var(--cv-theme-outline-variant);box-shadow:0 0 2px 0 var(--cv-theme-on-positive-container-16);box-sizing:border-box;display:flex;gap:.15rem;padding:7px .25rem}:host .notebookHeaderActions cv-select{margin-left:.5rem}.drag-over{border-bottom:1.5px solid var(--cv-theme-primary)}.input-container{display:flex;align-items:center;gap:.5rem}.output-container{max-width:100%;overflow:auto}.output-container .output-image{max-width:100%}
|
21
|
-
`;var br=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,tu=(u,e,t,r)=>{for(var n=r>1?void 0:r?pr(e,t):e,c=u.length-1,i;c>=0;c--)(i=u[c])&&(n=(r?i(e,t,n):i(n))||n);return r&&n&&br(e,t,n),n};exports.CovalentNotebook=class extends y.s{constructor(){super(),this.cells=[],this.cellTypes=[],this._clipboardCell=null,this._draggedCellIndex=null,this._selectedCellIndex=null,this._handleKeydown=this._handleKeydown.bind(this)}addCell(e){const t=this.createNewCell(e);this._clipboardCell={...t},this.pasteCell(),this._clipboardCell=null}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._handleKeydown)}copyCell(){this._selectedCellIndex!==null&&(this._clipboardCell={...this.cells[this._selectedCellIndex]})}createNewCell(e){const t=e==="markdown"?e:this.defaultLanguage||"python";return{cell_type:e,code:"",execution_count:null,language:t,metadata:{tags:[],trusted:!1},outputs:[],source:""}}cutCell(){this._selectedCellIndex!==null&&(this._clipboardCell=this.cells[this._selectedCellIndex],this.deleteCell())}deleteCell(){if(this._selectedCellIndex!==null){this.cells.
|
21
|
+
`;var br=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,tu=(u,e,t,r)=>{for(var n=r>1?void 0:r?pr(e,t):e,c=u.length-1,i;c>=0;c--)(i=u[c])&&(n=(r?i(e,t,n):i(n))||n);return r&&n&&br(e,t,n),n};exports.CovalentNotebook=class extends y.s{constructor(){super(),this.cells=[],this.cellTypes=[],this._clipboardCell=null,this._draggedCellIndex=null,this._selectedCellIndex=null,this._handleKeydown=this._handleKeydown.bind(this)}addCell(e){const t=this.createNewCell(e);this._clipboardCell={...t},this.pasteCell(),this._clipboardCell=null}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this._handleKeydown)}copyCell(){this._selectedCellIndex!==null&&(this._clipboardCell={...this.cells[this._selectedCellIndex]})}createNewCell(e){const t=e==="markdown"?e:this.defaultLanguage||"python";return{cell_type:e,code:"",execution_count:null,language:t,metadata:{tags:[],trusted:!1},outputs:[],source:""}}cutCell(){this._selectedCellIndex!==null&&(this._clipboardCell=this.cells[this._selectedCellIndex],this.deleteCell())}deleteCell(){if(this._selectedCellIndex!==null){this.cells=this.cells.filter((t,r)=>r!==this._selectedCellIndex);const e=Math.min(this._selectedCellIndex+1,this.cells.length-1);this.scrollToSelectedCell(e),this.dispatchUpdatedCells()}}deselectAllCells(){this.cells.forEach(e=>e.selected=!1)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._handleKeydown)}dispatchCustomCellEvent(e,t){!t&&this._selectedCellIndex&&(t=this.cells[this._selectedCellIndex]),t&&this.dispatchEvent(new CustomEvent("cell-action",{bubbles:!0,cancelable:!0,detail:{cell:t,index:this._selectedCellIndex,action:e}}))}dispatchUpdatedCells(){this.dispatchEvent(new CustomEvent("cells-updated",{bubbles:!0,cancelable:!0,detail:{cells:this.cells}}))}firstUpdated(){this.cells.length&&(this.cells.forEach(e=>{e.showEditor=this.shouldRenderEditor(e)}),this.selectCell(0),this.requestUpdate())}getDragImage(e){const t=this.cells[e],r=y.x`
|
22
22
|
<div class="dragImage" style="width: 80%;">
|
23
23
|
<cv-notebook-cell
|
24
24
|
.code="${t.code}"
|
@@ -29,15 +29,15 @@
|
|
29
29
|
.showEditor="false"
|
30
30
|
></cv-notebook-cell>
|
31
31
|
</div>
|
32
|
-
`,n=document.createElement("div");return y.D(r,n),n}scrollToSelectedCell(e){var n,c;this.selectCell(e);const t=(n=this.shadowRoot)==null?void 0:n.querySelector(`#cell-${this._selectedCellIndex}`),r=(c=this.shadowRoot)==null?void 0:c.querySelector("#notebook-cells");if(t&&r){const i=r.getBoundingClientRect(),o=t.getBoundingClientRect(),a=o.top<i.top,s=o.bottom>i.bottom;a?r.scrollTop=t.offsetTop-r.offsetTop:s&&(r.scrollTop=t.offsetTop-r.offsetTop-r.clientHeight+t.clientHeight)}}handleCellTypeChange(e){const t=this.cellTypes[e.detail.index];this._selectedCellIndex
|
32
|
+
`,n=document.createElement("div");return y.D(r,n),n}scrollToSelectedCell(e){var n,c;this.selectCell(e);const t=(n=this.shadowRoot)==null?void 0:n.querySelector(`#cell-${this._selectedCellIndex}`),r=(c=this.shadowRoot)==null?void 0:c.querySelector("#notebook-cells");if(t&&r){const i=r.getBoundingClientRect(),o=t.getBoundingClientRect(),a=o.top<i.top,s=o.bottom>i.bottom;a?r.scrollTop=t.offsetTop-r.offsetTop:s&&(r.scrollTop=t.offsetTop-r.offsetTop-r.clientHeight+t.clientHeight)}}handleCellTypeChange(e){const t=this.cellTypes[e.detail.index];this._selectedCellIndex!==null&&this.dispatchEvent(new CustomEvent("cell-type-changed",{bubbles:!0,cancelable:!0,detail:{index:this._selectedCellIndex,cellType:t}}))}handleCodeChange(e,t){const r=this.cells[t];r.code=e.detail.code,this.dispatchCustomCellEvent("edit-cell",r)}handleDragStart(e,t){if(this._draggedCellIndex=t,this.deselectAllCells(),e.dataTransfer){e.currentTarget.classList.add("dragged"),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString());const c=this.getDragImage(t).firstElementChild;c.style.position="absolute",c.style.top="-1000px",document.body.appendChild(c),e.dataTransfer.setDragImage(c,0,0),setTimeout(()=>{document.body.removeChild(c)},0)}}handleDragOver(e){e.preventDefault(),e.currentTarget.classList.add("drag-over"),e.dataTransfer&&(e.dataTransfer.dropEffect="move")}handleDrop(e,t){if(e.preventDefault(),this.handleDragLeave(e),this._draggedCellIndex!==null){const r=this.cells[this._draggedCellIndex];r.selected=!0,this.cells=[...this.cells.slice(0,this._draggedCellIndex),...this.cells.slice(this._draggedCellIndex+1)],this.cells=[...this.cells.slice(0,t),r,...this.cells.slice(t)],this.cells=this.cells.map((n,c)=>({...n,index:c})),this._draggedCellIndex=null,this.dispatchUpdatedCells()}}handleDragLeave(e){const t=e.currentTarget;t.classList.remove("drag-over"),t.classList.remove("dragged")}handleDragEnd(){this._draggedCellIndex=null,this.removeCSS("drag-over",this.shadowRoot),this.removeCSS("dragged",document)}handleInputKeydown(e){var r;e.stopImmediatePropagation();const t=(r=this.shadowRoot)==null?void 0:r.querySelector("#cell-input");e.key==="Enter"&&t&&(this.dispatchEvent(new CustomEvent("input-entered",{bubbles:!0,cancelable:!0,detail:{value:t.value}})),t.blur())}_handleKeydown(e){var r,n,c,i;let t=(r=this.cells)==null?void 0:r.findIndex(o=>o.selected);switch(e.key){case"ArrowUp":t=Math.max(t-1,0),this.scrollToSelectedCell(t);break;case"ArrowDown":t=Math.min(t+1,this.cells.length-1),this.scrollToSelectedCell(t);break;case"Enter":if(e.shiftKey)this.runCell();else{const o=(n=this.shadowRoot)==null?void 0:n.querySelector(`#cell-${t}`),a=(c=o==null?void 0:o.shadowRoot)==null?void 0:c.querySelector("cv-code-editor");(i=a==null?void 0:a.editor)==null||i.focus()}break}}handleOutputCLick(e){const t=this.cells[e];t.language==="markdown"&&(t.showEditor=!0,this.cells=this.cells.map(r=>r),this.dispatchUpdatedCells())}pasteCell(){if(this._clipboardCell!==null){const e=this._selectedCellIndex!==null?this._selectedCellIndex+1:this.cells.length;this._clipboardCell.selected=!0,this.cells.splice(e,0,{...this._clipboardCell}),this.cells=this.cells.map((t,r)=>({...t,index:r})),this.selectCell(e),this.dispatchUpdatedCells()}}renderCellOutput(e){var t;return(t=e.outputs)!=null&&t.length?y.x`${e.outputs.map(r=>y.x`${r.data&&Object.keys(r.data).map(n=>{const c=T({html:!0});switch(n){case"text/markdown":return y.x`<div class="output-container">
|
33
33
|
${Mu(c.render(r.data[n]))}
|
34
34
|
</div>`;case"text/html":return y.x`<div class="output-container">
|
35
35
|
${Mu(r.data[n])}
|
36
|
-
</div>`;case"image/png":return y.x`<div class="output-container">
|
36
|
+
</div>`;case"image/png":case"image/jpg":return y.x`<div class="output-container">
|
37
37
|
<img
|
38
38
|
class="output-image"
|
39
39
|
draggable="false"
|
40
|
-
src=${`data:image
|
40
|
+
src=${`data:image/${n.includes("jpg")?"jpg":"png"};base64, ${r.data[n]}`}
|
41
41
|
/>
|
42
42
|
</div>`;default:return y.x``}})}`)}`:y.x``}render(){var e;return y.x`<div class="notebook">
|
43
43
|
<section class="notebookHeaderActions">
|
@@ -63,15 +63,15 @@
|
|
63
63
|
></cv-icon-button>
|
64
64
|
<cv-icon-button
|
65
65
|
icon="stop"
|
66
|
-
@click="${()=>this.dispatchCustomCellEvent("interrupt-
|
66
|
+
@click="${()=>this.dispatchCustomCellEvent("interrupt-kernel")}"
|
67
67
|
></cv-icon-button>
|
68
68
|
<cv-icon-button
|
69
69
|
icon="refresh"
|
70
|
-
@click="${()=>this.dispatchCustomCellEvent("refresh
|
70
|
+
@click="${()=>this.dispatchCustomCellEvent("refresh")}"
|
71
71
|
></cv-icon-button>
|
72
72
|
<cv-icon-button
|
73
73
|
icon="fast_forward"
|
74
|
-
@click="${()=>this.dispatchCustomCellEvent("refresh-run-all
|
74
|
+
@click="${()=>this.dispatchCustomCellEvent("refresh-run-all")}"
|
75
75
|
></cv-icon-button>
|
76
76
|
<cv-select
|
77
77
|
label="Cell type"
|
@@ -142,6 +142,6 @@
|
|
142
142
|
<cv-icon style="font-size: 20px;">add</cv-icon>Markdown
|
143
143
|
</cv-button>
|
144
144
|
</section>
|
145
|
-
</div>`}removeCSS(e,t){const r=t==null?void 0:t.querySelectorAll(e);r==null||r.forEach(n=>n.classList.remove(e))}runCell(){if(this._selectedCellIndex!==null){const e=this.cells[this._selectedCellIndex];this.dispatchCustomCellEvent("run-cell",e),this._selectedCellIndex+1<this.cells.length&&this.scrollToSelectedCell(this._selectedCellIndex+1)}this.requestUpdate()}selectCell(e){if(e!==this._selectedCellIndex){this.deselectAllCells(),this._selectedCellIndex=e;const t=this.cells[e];t.selected=!0,this.cellType=t.language==="markdown"?"markdown":"code",this.requestUpdate()}}shouldRenderEditor(e){var t;return e.language!=="markdown"||e.language==="markdown"&&!((t=e.outputs)!=null&&t.length)}updated(e){e.has("cells")&&this.cells.forEach((t,r)=>{var n;
|
145
|
+
</div>`}removeCSS(e,t){const r=t==null?void 0:t.querySelectorAll(e);r==null||r.forEach(n=>n.classList.remove(e))}runCell(){if(this._selectedCellIndex!==null){const e=this.cells[this._selectedCellIndex];this.dispatchCustomCellEvent("run-cell",e),this._selectedCellIndex+1<this.cells.length&&this.scrollToSelectedCell(this._selectedCellIndex+1)}this.requestUpdate()}selectCell(e){if(e!==this._selectedCellIndex){this.deselectAllCells(),this._selectedCellIndex=e;const t=this.cells[e];t.selected=!0,this.cellType=t.language==="markdown"?"markdown":"code",this.requestUpdate()}}shouldRenderEditor(e){var t;return e.language!=="markdown"||e.language==="markdown"&&!((t=e.outputs)!=null&&t.length)}updated(e){e.has("cells")&&this.cells.forEach((t,r)=>{var n;(n=t.inputs)!=null&&n.length&&this.scrollToSelectedCell(r)}),super.updated(e)}};exports.CovalentNotebook.styles=[y.i`
|
146
146
|
${y.r(hr)}
|
147
147
|
`];tu([au.n({type:Array})],exports.CovalentNotebook.prototype,"cells",2);tu([au.n({type:Array})],exports.CovalentNotebook.prototype,"cellTypes",2);tu([au.n({type:String})],exports.CovalentNotebook.prototype,"cellType",2);tu([au.n({type:String})],exports.CovalentNotebook.prototype,"defaultLanguage",2);exports.CovalentNotebook=tu([y.e("cv-notebook")],exports.CovalentNotebook);const xr=exports.CovalentNotebook;exports.default=xr;
|