the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.
diff --git a/space.py b/space.py
index 2c80935c32a55cb1f3e73a4201023c247548019b..ac4eede786d250bf4d2f3a28ac89caed2b41d57e 100644
--- a/space.py
+++ b/space.py
@@ -3,7 +3,7 @@ import gradio as gr
from app import demo as app
import os
-_docs = {'DropdownPlus': {'description': 'Creates a dropdown of choices from which a single entry or multiple entries can be selected (as an input component) or displayed (as an output component).\n', 'members': {'__init__': {'choices': {'type': 'Sequence[\n str | int | float | tuple[str, str | int | float]\n ]\n | None', 'default': 'None', 'description': 'a list of string or numeric options to choose from. An option can also be a tuple of the form (name, value), where name is the displayed name of the dropdown choice and value is the value to be passed to the function, or returned by the function.'}, 'value': {'type': 'str\n | int\n | float\n | Sequence[str | int | float]\n | Callable\n | DefaultValue\n | None', 'default': 'value = ', 'description': 'the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.'}, 'type': {'type': 'Literal["value", "index"]', 'default': '"value"', 'description': 'type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.'}, 'multiselect': {'type': 'bool | None', 'default': 'None', 'description': 'if True, multiple choices can be selected.'}, 'allow_custom_value': {'type': 'bool', 'default': 'False', 'description': 'if True, allows user to enter a custom value that is not in the list of choices.'}, 'max_choices': {'type': 'int | None', 'default': 'None', 'description': 'maximum number of choices that can be selected. If None, no limit is enforced.'}, 'filterable': {'type': 'bool', 'default': 'True', 'description': 'if True, user will be able to type into the dropdown and filter the choices by typing. Can only be set to False if `allow_custom_value` is False.'}, 'label': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.'}, 'info': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'additional component description, appears below the label in smaller font. Supports markdown / HTML syntax.'}, 'help': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'A string of help text to display in a tooltip next to the label.'}, 'every': {'type': 'Timer | float | None', 'default': 'None', 'description': 'continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.'}, 'inputs': {'type': 'Component | Sequence[Component] | set[Component] | None', 'default': 'None', 'description': 'components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.'}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'if True, will place the component in a container - providing some extra padding around the border.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'if False, component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'an optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'an optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'if False, component will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}, 'key': {'type': 'int | str | tuple[int | str, ...] | None', 'default': 'None', 'description': None}, 'preserved_by_key': {'type': 'list[str] | str | None', 'default': '"value"', 'description': None}}, 'postprocess': {'value': {'type': 'str | int | float | list[str | int | float] | None', 'description': 'Expects a `str | int | float` corresponding to the value of the dropdown entry to be selected. Or, if `multiselect` is True, expects a `list` of values corresponding to the selected dropdown entries.'}}, 'preprocess': {'return': {'type': 'str\n | int\n | float\n | list[str | int | float]\n | list[int | None]\n | None', 'description': 'Passes the value of the selected dropdown choice as a `str | int | float` or its index as an `int` into the function, depending on `type`. Or, if `multiselect` is True, passes the values of the selected dropdown choices as a list of corresponding values/indices instead.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the DropdownPlus changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the DropdownPlus.'}, 'select': {'type': None, 'default': None, 'description': 'Event listener for when the user selects or deselects the DropdownPlus. Uses event data gradio.SelectData to carry `value` referring to the label of the DropdownPlus, and `selected` to refer to state of the DropdownPlus. See EventData documentation on how to use this event data'}, 'focus': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is focused.'}, 'blur': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is unfocused/blurred.'}, 'key_up': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses a key while the DropdownPlus is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'DropdownPlus': []}}}
+_docs = {'DropdownPlus': {'description': 'Creates a dropdown of choices from which a single entry or multiple entries can be selected (as an input component) or displayed (as an output component).\n', 'members': {'__init__': {'choices': {'type': 'Sequence[\n str | int | float | tuple[str, str | int | float]\n ]\n | None', 'default': 'None', 'description': 'a list of string or numeric options to choose from. An option can also be a tuple of the form (name, value), where name is the displayed name of the dropdown choice and value is the value to be passed to the function, or returned by the function.'}, 'value': {'type': 'str\n | int\n | float\n | Sequence[str | int | float]\n | Callable\n | DefaultValue\n | None', 'default': 'value = ', 'description': 'the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.'}, 'type': {'type': 'Literal["value", "index"]', 'default': '"value"', 'description': 'type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.'}, 'multiselect': {'type': 'bool | None', 'default': 'None', 'description': 'if True, multiple choices can be selected.'}, 'allow_custom_value': {'type': 'bool', 'default': 'False', 'description': 'if True, allows user to enter a custom value that is not in the list of choices.'}, 'max_choices': {'type': 'int | None', 'default': 'None', 'description': 'maximum number of choices that can be selected. If None, no limit is enforced.'}, 'filterable': {'type': 'bool', 'default': 'True', 'description': 'if True, user will be able to type into the dropdown and filter the choices by typing. Can only be set to False if `allow_custom_value` is False.'}, 'label': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'the label for this component, displayed above the component if `show_label` is `True` and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component corresponds to.'}, 'info': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'additional component description, appears below the label in smaller font. Supports markdown / HTML syntax.'}, 'help': {'type': 'str | I18nData | None', 'default': 'None', 'description': 'A string of help text to display in a tooltip next to the label.'}, 'every': {'type': 'Timer | float | None', 'default': 'None', 'description': 'continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.'}, 'inputs': {'type': 'Component | Sequence[Component] | set[Component] | None', 'default': 'None', 'description': 'components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.'}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'if True, will place the component in a container - providing some extra padding around the border.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'if False, component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'an optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'an optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'if False, component will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}, 'key': {'type': 'int | str | tuple[int | str, ...] | None', 'default': 'None', 'description': None}, 'preserved_by_key': {'type': 'list[str] | str | None', 'default': '"value"', 'description': None}}, 'postprocess': {'value': {'type': 'str | int | float | list[str | int | float] | None', 'description': 'Expects a `str | int | float` corresponding to the value of the dropdown entry to be selected. Or, if `multiselect` is True, expects a `list` of values corresponding to the selected dropdown entries.'}}, 'preprocess': {'return': {'type': 'str\n | int\n | float\n | list[str | int | float]\n | list[int | None]\n | None', 'description': 'Passes the value of the selected dropdown choice as a `str | int | float` or its index as an `int` into the function, depending on `type`. Or, if `multiselect` is True, passes the values of the selected dropdown choices as a list of corresponding values/indices instead.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the DropdownPlus changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the DropdownPlus.'}, 'select': {'type': None, 'default': None, 'description': 'Event listener for when the user selects or deselects the DropdownPlus. Uses event data gradio.SelectData to carry `value` referring to the label of the DropdownPlus, and `selected` to refer to state of the DropdownPlus. See EventData documentation on how to use this event data'}, 'focus': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is focused.'}, 'blur': {'type': None, 'default': None, 'description': 'This listener is triggered when the DropdownPlus is unfocused/blurred.'}, 'key_up': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses a key while the DropdownPlus is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'DropdownPlus': []}}}
abs_path = os.path.join(os.path.dirname(__file__), "css.css")
diff --git a/src/README.md b/src/README.md
index 050a4b1c1afe045d030b1794c174ed9945f842d6..f355583bc839675b295d604f88d0ba55c9c83c41 100644
--- a/src/README.md
+++ b/src/README.md
@@ -9,13 +9,10 @@ pinned: false
app_file: space.py
---
-
# `gradio_dropdownplus`
-
the value selected in dropdown. If `multiselect` is true, this should be list, otherwise a single string or number from among `choices`. By default, the first choice in `choices` is initally selected. If set explicitly to None, no value is initally selected. If a function is provided, the function will be called each time the app loads to set the initial value of this component.
diff --git a/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js b/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js
new file mode 100644
index 0000000000000000000000000000000000000000..005a5c42705bc4c21eb4dc88108fb5fc76a7b061
--- /dev/null
+++ b/src/backend/gradio_dropdownplus/templates/component/Index-dsULWx_B.js
@@ -0,0 +1,14408 @@
+var qo = Object.defineProperty;
+var mr = (t) => {
+ throw TypeError(t);
+};
+var zo = (t, e, n) => e in t ? qo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
+var Y = (t, e, n) => zo(t, typeof e != "symbol" ? e + "" : e, n), Uo = (t, e, n) => e.has(t) || mr("Cannot " + n);
+var pr = (t, e, n) => e.has(t) ? mr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n);
+var hn = (t, e, n) => (Uo(t, e, "access private method"), n);
+function ht() {
+}
+function Go(t) {
+ return t();
+}
+function jo(t) {
+ return typeof t == "function";
+}
+function Vo(t, ...e) {
+ if (t == null) {
+ for (const i of e) i(void 0);
+ return ht;
+ }
+ const n = t.subscribe(...e);
+ return n.unsubscribe ? () => n.unsubscribe() : n;
+}
+function gr(t) {
+ const e = typeof t == "string" && t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
+ return e ? [parseFloat(e[1]), e[2] || "px"] : [t, "px"];
+}
+const _l = typeof window < "u";
+let br = _l ? () => window.performance.now() : () => Date.now(), dl = _l ? (t) => requestAnimationFrame(t) : ht;
+const Ct = /* @__PURE__ */ new Set();
+function ml(t) {
+ Ct.forEach((e) => {
+ e.c(t) || (Ct.delete(e), e.f());
+ }), Ct.size !== 0 && dl(ml);
+}
+function Xo(t) {
+ let e;
+ return Ct.size === 0 && dl(ml), { promise: new Promise((n) => {
+ Ct.add(e = { c: t, f: n });
+ }), abort() {
+ Ct.delete(e);
+ } };
+}
+function Zo(t) {
+ const e = t - 1;
+ return e * e * e + 1;
+}
+function vr(t, { delay: e = 0, duration: n = 400, easing: i = Zo, x: r = 0, y: l = 0, opacity: a = 0 } = {}) {
+ const o = getComputedStyle(t), s = +o.opacity, u = o.transform === "none" ? "" : o.transform, c = s * (1 - a), [_, h] = gr(r), [d, D] = gr(l);
+ return { delay: e, duration: n, easing: i, css: (E, F) => `
+ transform: ${u} translate(${(1 - E) * _}${h}, ${(1 - E) * d}${D});
+ opacity: ${s - c * F}` };
+}
+const gt = [];
+function Wo(t, e) {
+ return { subscribe: tn(t, e).subscribe };
+}
+function tn(t, e = ht) {
+ let n;
+ const i = /* @__PURE__ */ new Set();
+ function r(a) {
+ if (s = a, ((o = t) != o ? s == s : o !== s || o && typeof o == "object" || typeof o == "function") && (t = a, n)) {
+ const u = !gt.length;
+ for (const c of i) c[1](), gt.push(c, t);
+ if (u) {
+ for (let c = 0; c < gt.length; c += 2) gt[c][0](gt[c + 1]);
+ gt.length = 0;
+ }
+ }
+ var o, s;
+ }
+ function l(a) {
+ r(a(t));
+ }
+ return { set: r, update: l, subscribe: function(a, o = ht) {
+ const s = [a, o];
+ return i.add(s), i.size === 1 && (n = e(r, l) || ht), a(t), () => {
+ i.delete(s), i.size === 0 && n && (n(), n = null);
+ };
+ } };
+}
+function Lt(t, e, n) {
+ const i = !Array.isArray(t), r = i ? [t] : t;
+ if (!r.every(Boolean)) throw new Error("derived() expects stores as input, got a falsy value");
+ const l = e.length < 2;
+ return Wo(n, (a, o) => {
+ let s = !1;
+ const u = [];
+ let c = 0, _ = ht;
+ const h = () => {
+ if (c) return;
+ _();
+ const D = e(i ? u[0] : u, a, o);
+ l ? a(D) : _ = jo(D) ? D : ht;
+ }, d = r.map((D, E) => Vo(D, (F) => {
+ u[E] = F, c &= ~(1 << E), s && h();
+ }, () => {
+ c |= 1 << E;
+ }));
+ return s = !0, h(), function() {
+ d.forEach(Go), _(), s = !1;
+ };
+ });
+}
+function yr(t) {
+ return Object.prototype.toString.call(t) === "[object Date]";
+}
+function Ci(t, e, n, i) {
+ if (typeof n == "number" || yr(n)) {
+ const r = i - n, l = (n - e) / (t.dt || 1 / 60), a = (l + (t.opts.stiffness * r - t.opts.damping * l) * t.inv_mass) * t.dt;
+ return Math.abs(a) < t.opts.precision && Math.abs(r) < t.opts.precision ? i : (t.settled = !1, yr(n) ? new Date(n.getTime() + a) : n + a);
+ }
+ if (Array.isArray(n)) return n.map((r, l) => Ci(t, e[l], n[l], i[l]));
+ if (typeof n == "object") {
+ const r = {};
+ for (const l in n) r[l] = Ci(t, e[l], n[l], i[l]);
+ return r;
+ }
+ throw new Error(`Cannot spring ${typeof n} values`);
+}
+function wr(t, e = {}) {
+ const n = tn(t), { stiffness: i = 0.15, damping: r = 0.8, precision: l = 0.01 } = e;
+ let a, o, s, u = t, c = t, _ = 1, h = 0, d = !1;
+ function D(F, C = {}) {
+ c = F;
+ const g = s = {};
+ return t == null || C.hard || E.stiffness >= 1 && E.damping >= 1 ? (d = !0, a = br(), u = F, n.set(t = c), Promise.resolve()) : (C.soft && (h = 1 / (60 * (C.soft === !0 ? 0.5 : +C.soft)), _ = 0), o || (a = br(), d = !1, o = Xo((f) => {
+ if (d) return d = !1, o = null, !1;
+ _ = Math.min(_ + h, 1);
+ const m = { inv_mass: _, opts: E, settled: !0, dt: 60 * (f - a) / 1e3 }, v = Ci(m, u, t, c);
+ return a = f, u = t, n.set(t = v), m.settled && (o = null), !m.settled;
+ })), new Promise((f) => {
+ o.promise.then(() => {
+ g === s && f();
+ });
+ }));
+ }
+ const E = { set: D, update: (F, C) => D(F(c, t), C), subscribe: n.subscribe, stiffness: i, damping: r, precision: l };
+ return E;
+}
+function Qo(t) {
+ return Yo(t) && !Jo(t);
+}
+function Yo(t) {
+ return !!t && typeof t == "object";
+}
+function Jo(t) {
+ var e = Object.prototype.toString.call(t);
+ return e === "[object RegExp]" || e === "[object Date]" || ts(t);
+}
+var Ko = typeof Symbol == "function" && Symbol.for, es = Ko ? Symbol.for("react.element") : 60103;
+function ts(t) {
+ return t.$$typeof === es;
+}
+var ns = Qo;
+function is(t) {
+ return Array.isArray(t) ? [] : {};
+}
+function Zt(t, e) {
+ return e.clone !== !1 && e.isMergeableObject(t) ? Bt(is(t), t, e) : t;
+}
+function rs(t, e, n) {
+ return t.concat(e).map(function(i) {
+ return Zt(i, n);
+ });
+}
+function as(t, e) {
+ if (!e.customMerge)
+ return Bt;
+ var n = e.customMerge(t);
+ return typeof n == "function" ? n : Bt;
+}
+function ls(t) {
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(t).filter(function(e) {
+ return Object.propertyIsEnumerable.call(t, e);
+ }) : [];
+}
+function Dr(t) {
+ return Object.keys(t).concat(ls(t));
+}
+function pl(t, e) {
+ try {
+ return e in t;
+ } catch {
+ return !1;
+ }
+}
+function os(t, e) {
+ return pl(t, e) && !(Object.hasOwnProperty.call(t, e) && Object.propertyIsEnumerable.call(t, e));
+}
+function ss(t, e, n) {
+ var i = {};
+ return n.isMergeableObject(t) && Dr(t).forEach(function(r) {
+ i[r] = Zt(t[r], n);
+ }), Dr(e).forEach(function(r) {
+ os(t, r) || (pl(t, r) && n.isMergeableObject(e[r]) ? i[r] = as(r, n)(t[r], e[r], n) : i[r] = Zt(e[r], n));
+ }), i;
+}
+function Bt(t, e, n) {
+ n = n || {}, n.arrayMerge = n.arrayMerge || rs, n.isMergeableObject = n.isMergeableObject || ns, n.cloneUnlessOtherwiseSpecified = Zt;
+ var i = Array.isArray(e), r = Array.isArray(t), l = i === r;
+ return l ? i ? n.arrayMerge(t, e, n) : ss(t, e, n) : Zt(e, n);
+}
+Bt.all = function(e, n) {
+ if (!Array.isArray(e))
+ throw new Error("first argument should be an array");
+ return e.reduce(function(i, r) {
+ return Bt(i, r, n);
+ }, {});
+};
+var Si = function(t, e) {
+ return Si = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
+ n.__proto__ = i;
+ } || function(n, i) {
+ for (var r in i) Object.prototype.hasOwnProperty.call(i, r) && (n[r] = i[r]);
+ }, Si(t, e);
+};
+function Vn(t, e) {
+ if (typeof e != "function" && e !== null)
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
+ Si(t, e);
+ function n() {
+ this.constructor = t;
+ }
+ t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
+}
+var G = function() {
+ return G = Object.assign || function(e) {
+ for (var n, i = 1, r = arguments.length; i < r; i++) {
+ n = arguments[i];
+ for (var l in n) Object.prototype.hasOwnProperty.call(n, l) && (e[l] = n[l]);
+ }
+ return e;
+ }, G.apply(this, arguments);
+};
+function ii(t, e, n) {
+ if (n || arguments.length === 2) for (var i = 0, r = e.length, l; i < r; i++)
+ (l || !(i in e)) && (l || (l = Array.prototype.slice.call(e, 0, i)), l[i] = e[i]);
+ return t.concat(l || Array.prototype.slice.call(e));
+}
+var q;
+(function(t) {
+ t[t.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", t[t.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", t[t.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", t[t.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", t[t.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", t[t.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", t[t.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", t[t.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", t[t.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", t[t.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", t[t.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", t[t.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", t[t.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", t[t.INVALID_TAG = 23] = "INVALID_TAG", t[t.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", t[t.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", t[t.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
+})(q || (q = {}));
+var K;
+(function(t) {
+ t[t.literal = 0] = "literal", t[t.argument = 1] = "argument", t[t.number = 2] = "number", t[t.date = 3] = "date", t[t.time = 4] = "time", t[t.select = 5] = "select", t[t.plural = 6] = "plural", t[t.pound = 7] = "pound", t[t.tag = 8] = "tag";
+})(K || (K = {}));
+var $t;
+(function(t) {
+ t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime";
+})($t || ($t = {}));
+function Er(t) {
+ return t.type === K.literal;
+}
+function us(t) {
+ return t.type === K.argument;
+}
+function gl(t) {
+ return t.type === K.number;
+}
+function bl(t) {
+ return t.type === K.date;
+}
+function vl(t) {
+ return t.type === K.time;
+}
+function yl(t) {
+ return t.type === K.select;
+}
+function wl(t) {
+ return t.type === K.plural;
+}
+function cs(t) {
+ return t.type === K.pound;
+}
+function Dl(t) {
+ return t.type === K.tag;
+}
+function El(t) {
+ return !!(t && typeof t == "object" && t.type === $t.number);
+}
+function xi(t) {
+ return !!(t && typeof t == "object" && t.type === $t.dateTime);
+}
+var Fl = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, hs = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
+function fs(t) {
+ var e = {};
+ return t.replace(hs, function(n) {
+ var i = n.length;
+ switch (n[0]) {
+ case "G":
+ e.era = i === 4 ? "long" : i === 5 ? "narrow" : "short";
+ break;
+ case "y":
+ e.year = i === 2 ? "2-digit" : "numeric";
+ break;
+ case "Y":
+ case "u":
+ case "U":
+ case "r":
+ throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
+ case "q":
+ case "Q":
+ throw new RangeError("`q/Q` (quarter) patterns are not supported");
+ case "M":
+ case "L":
+ e.month = ["numeric", "2-digit", "short", "long", "narrow"][i - 1];
+ break;
+ case "w":
+ case "W":
+ throw new RangeError("`w/W` (week) patterns are not supported");
+ case "d":
+ e.day = ["numeric", "2-digit"][i - 1];
+ break;
+ case "D":
+ case "F":
+ case "g":
+ throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
+ case "E":
+ e.weekday = i === 4 ? "short" : i === 5 ? "narrow" : "short";
+ break;
+ case "e":
+ if (i < 4)
+ throw new RangeError("`e..eee` (weekday) patterns are not supported");
+ e.weekday = ["short", "long", "narrow", "short"][i - 4];
+ break;
+ case "c":
+ if (i < 4)
+ throw new RangeError("`c..ccc` (weekday) patterns are not supported");
+ e.weekday = ["short", "long", "narrow", "short"][i - 4];
+ break;
+ case "a":
+ e.hour12 = !0;
+ break;
+ case "b":
+ case "B":
+ throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
+ case "h":
+ e.hourCycle = "h12", e.hour = ["numeric", "2-digit"][i - 1];
+ break;
+ case "H":
+ e.hourCycle = "h23", e.hour = ["numeric", "2-digit"][i - 1];
+ break;
+ case "K":
+ e.hourCycle = "h11", e.hour = ["numeric", "2-digit"][i - 1];
+ break;
+ case "k":
+ e.hourCycle = "h24", e.hour = ["numeric", "2-digit"][i - 1];
+ break;
+ case "j":
+ case "J":
+ case "C":
+ throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
+ case "m":
+ e.minute = ["numeric", "2-digit"][i - 1];
+ break;
+ case "s":
+ e.second = ["numeric", "2-digit"][i - 1];
+ break;
+ case "S":
+ case "A":
+ throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
+ case "z":
+ e.timeZoneName = i < 4 ? "short" : "long";
+ break;
+ case "Z":
+ case "O":
+ case "v":
+ case "V":
+ case "X":
+ case "x":
+ throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
+ }
+ return "";
+ }), e;
+}
+var _s = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
+function ds(t) {
+ if (t.length === 0)
+ throw new Error("Number skeleton cannot be empty");
+ for (var e = t.split(_s).filter(function(h) {
+ return h.length > 0;
+ }), n = [], i = 0, r = e; i < r.length; i++) {
+ var l = r[i], a = l.split("/");
+ if (a.length === 0)
+ throw new Error("Invalid number skeleton");
+ for (var o = a[0], s = a.slice(1), u = 0, c = s; u < c.length; u++) {
+ var _ = c[u];
+ if (_.length === 0)
+ throw new Error("Invalid number skeleton");
+ }
+ n.push({ stem: o, options: s });
+ }
+ return n;
+}
+function ms(t) {
+ return t.replace(/^(.*?)-/, "");
+}
+var Fr = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, kl = /^(@+)?(\+|#+)?[rs]?$/g, ps = /(\*)(0+)|(#+)(0+)|(0+)/g, Al = /^(0+)$/;
+function kr(t) {
+ var e = {};
+ return t[t.length - 1] === "r" ? e.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (e.roundingPriority = "lessPrecision"), t.replace(kl, function(n, i, r) {
+ return typeof r != "string" ? (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length) : r === "+" ? e.minimumSignificantDigits = i.length : i[0] === "#" ? e.maximumSignificantDigits = i.length : (e.minimumSignificantDigits = i.length, e.maximumSignificantDigits = i.length + (typeof r == "string" ? r.length : 0)), "";
+ }), e;
+}
+function Cl(t) {
+ switch (t) {
+ case "sign-auto":
+ return {
+ signDisplay: "auto"
+ };
+ case "sign-accounting":
+ case "()":
+ return {
+ currencySign: "accounting"
+ };
+ case "sign-always":
+ case "+!":
+ return {
+ signDisplay: "always"
+ };
+ case "sign-accounting-always":
+ case "()!":
+ return {
+ signDisplay: "always",
+ currencySign: "accounting"
+ };
+ case "sign-except-zero":
+ case "+?":
+ return {
+ signDisplay: "exceptZero"
+ };
+ case "sign-accounting-except-zero":
+ case "()?":
+ return {
+ signDisplay: "exceptZero",
+ currencySign: "accounting"
+ };
+ case "sign-never":
+ case "+_":
+ return {
+ signDisplay: "never"
+ };
+ }
+}
+function gs(t) {
+ var e;
+ if (t[0] === "E" && t[1] === "E" ? (e = {
+ notation: "engineering"
+ }, t = t.slice(2)) : t[0] === "E" && (e = {
+ notation: "scientific"
+ }, t = t.slice(1)), e) {
+ var n = t.slice(0, 2);
+ if (n === "+!" ? (e.signDisplay = "always", t = t.slice(2)) : n === "+?" && (e.signDisplay = "exceptZero", t = t.slice(2)), !Al.test(t))
+ throw new Error("Malformed concise eng/scientific notation");
+ e.minimumIntegerDigits = t.length;
+ }
+ return e;
+}
+function Ar(t) {
+ var e = {}, n = Cl(t);
+ return n || e;
+}
+function bs(t) {
+ for (var e = {}, n = 0, i = t; n < i.length; n++) {
+ var r = i[n];
+ switch (r.stem) {
+ case "percent":
+ case "%":
+ e.style = "percent";
+ continue;
+ case "%x100":
+ e.style = "percent", e.scale = 100;
+ continue;
+ case "currency":
+ e.style = "currency", e.currency = r.options[0];
+ continue;
+ case "group-off":
+ case ",_":
+ e.useGrouping = !1;
+ continue;
+ case "precision-integer":
+ case ".":
+ e.maximumFractionDigits = 0;
+ continue;
+ case "measure-unit":
+ case "unit":
+ e.style = "unit", e.unit = ms(r.options[0]);
+ continue;
+ case "compact-short":
+ case "K":
+ e.notation = "compact", e.compactDisplay = "short";
+ continue;
+ case "compact-long":
+ case "KK":
+ e.notation = "compact", e.compactDisplay = "long";
+ continue;
+ case "scientific":
+ e = G(G(G({}, e), { notation: "scientific" }), r.options.reduce(function(s, u) {
+ return G(G({}, s), Ar(u));
+ }, {}));
+ continue;
+ case "engineering":
+ e = G(G(G({}, e), { notation: "engineering" }), r.options.reduce(function(s, u) {
+ return G(G({}, s), Ar(u));
+ }, {}));
+ continue;
+ case "notation-simple":
+ e.notation = "standard";
+ continue;
+ case "unit-width-narrow":
+ e.currencyDisplay = "narrowSymbol", e.unitDisplay = "narrow";
+ continue;
+ case "unit-width-short":
+ e.currencyDisplay = "code", e.unitDisplay = "short";
+ continue;
+ case "unit-width-full-name":
+ e.currencyDisplay = "name", e.unitDisplay = "long";
+ continue;
+ case "unit-width-iso-code":
+ e.currencyDisplay = "symbol";
+ continue;
+ case "scale":
+ e.scale = parseFloat(r.options[0]);
+ continue;
+ case "integer-width":
+ if (r.options.length > 1)
+ throw new RangeError("integer-width stems only accept a single optional option");
+ r.options[0].replace(ps, function(s, u, c, _, h, d) {
+ if (u)
+ e.minimumIntegerDigits = c.length;
+ else {
+ if (_ && h)
+ throw new Error("We currently do not support maximum integer digits");
+ if (d)
+ throw new Error("We currently do not support exact integer digits");
+ }
+ return "";
+ });
+ continue;
+ }
+ if (Al.test(r.stem)) {
+ e.minimumIntegerDigits = r.stem.length;
+ continue;
+ }
+ if (Fr.test(r.stem)) {
+ if (r.options.length > 1)
+ throw new RangeError("Fraction-precision stems only accept a single optional option");
+ r.stem.replace(Fr, function(s, u, c, _, h, d) {
+ return c === "*" ? e.minimumFractionDigits = u.length : _ && _[0] === "#" ? e.maximumFractionDigits = _.length : h && d ? (e.minimumFractionDigits = h.length, e.maximumFractionDigits = h.length + d.length) : (e.minimumFractionDigits = u.length, e.maximumFractionDigits = u.length), "";
+ });
+ var l = r.options[0];
+ l === "w" ? e = G(G({}, e), { trailingZeroDisplay: "stripIfInteger" }) : l && (e = G(G({}, e), kr(l)));
+ continue;
+ }
+ if (kl.test(r.stem)) {
+ e = G(G({}, e), kr(r.stem));
+ continue;
+ }
+ var a = Cl(r.stem);
+ a && (e = G(G({}, e), a));
+ var o = gs(r.stem);
+ o && (e = G(G({}, e), o));
+ }
+ return e;
+}
+var fn = {
+ AX: [
+ "H"
+ ],
+ BQ: [
+ "H"
+ ],
+ CP: [
+ "H"
+ ],
+ CZ: [
+ "H"
+ ],
+ DK: [
+ "H"
+ ],
+ FI: [
+ "H"
+ ],
+ ID: [
+ "H"
+ ],
+ IS: [
+ "H"
+ ],
+ ML: [
+ "H"
+ ],
+ NE: [
+ "H"
+ ],
+ RU: [
+ "H"
+ ],
+ SE: [
+ "H"
+ ],
+ SJ: [
+ "H"
+ ],
+ SK: [
+ "H"
+ ],
+ AS: [
+ "h",
+ "H"
+ ],
+ BT: [
+ "h",
+ "H"
+ ],
+ DJ: [
+ "h",
+ "H"
+ ],
+ ER: [
+ "h",
+ "H"
+ ],
+ GH: [
+ "h",
+ "H"
+ ],
+ IN: [
+ "h",
+ "H"
+ ],
+ LS: [
+ "h",
+ "H"
+ ],
+ PG: [
+ "h",
+ "H"
+ ],
+ PW: [
+ "h",
+ "H"
+ ],
+ SO: [
+ "h",
+ "H"
+ ],
+ TO: [
+ "h",
+ "H"
+ ],
+ VU: [
+ "h",
+ "H"
+ ],
+ WS: [
+ "h",
+ "H"
+ ],
+ "001": [
+ "H",
+ "h"
+ ],
+ AL: [
+ "h",
+ "H",
+ "hB"
+ ],
+ TD: [
+ "h",
+ "H",
+ "hB"
+ ],
+ "ca-ES": [
+ "H",
+ "h",
+ "hB"
+ ],
+ CF: [
+ "H",
+ "h",
+ "hB"
+ ],
+ CM: [
+ "H",
+ "h",
+ "hB"
+ ],
+ "fr-CA": [
+ "H",
+ "h",
+ "hB"
+ ],
+ "gl-ES": [
+ "H",
+ "h",
+ "hB"
+ ],
+ "it-CH": [
+ "H",
+ "h",
+ "hB"
+ ],
+ "it-IT": [
+ "H",
+ "h",
+ "hB"
+ ],
+ LU: [
+ "H",
+ "h",
+ "hB"
+ ],
+ NP: [
+ "H",
+ "h",
+ "hB"
+ ],
+ PF: [
+ "H",
+ "h",
+ "hB"
+ ],
+ SC: [
+ "H",
+ "h",
+ "hB"
+ ],
+ SM: [
+ "H",
+ "h",
+ "hB"
+ ],
+ SN: [
+ "H",
+ "h",
+ "hB"
+ ],
+ TF: [
+ "H",
+ "h",
+ "hB"
+ ],
+ VA: [
+ "H",
+ "h",
+ "hB"
+ ],
+ CY: [
+ "h",
+ "H",
+ "hb",
+ "hB"
+ ],
+ GR: [
+ "h",
+ "H",
+ "hb",
+ "hB"
+ ],
+ CO: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ DO: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ KP: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ KR: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ NA: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ PA: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ PR: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ VE: [
+ "h",
+ "H",
+ "hB",
+ "hb"
+ ],
+ AC: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ AI: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ BW: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ BZ: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ CC: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ CK: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ CX: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ DG: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ FK: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ GB: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ GG: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ GI: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ IE: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ IM: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ IO: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ JE: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ LT: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ MK: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ MN: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ MS: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ NF: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ NG: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ NR: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ NU: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ PN: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ SH: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ SX: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ TA: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ ZA: [
+ "H",
+ "h",
+ "hb",
+ "hB"
+ ],
+ "af-ZA": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ AR: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ CL: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ CR: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ CU: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ EA: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-BO": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-BR": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-EC": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-ES": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-GQ": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ "es-PE": [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ GT: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ HN: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ IC: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ KG: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ KM: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ LK: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ MA: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ MX: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ NI: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ PY: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ SV: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ UY: [
+ "H",
+ "h",
+ "hB",
+ "hb"
+ ],
+ JP: [
+ "H",
+ "h",
+ "K"
+ ],
+ AD: [
+ "H",
+ "hB"
+ ],
+ AM: [
+ "H",
+ "hB"
+ ],
+ AO: [
+ "H",
+ "hB"
+ ],
+ AT: [
+ "H",
+ "hB"
+ ],
+ AW: [
+ "H",
+ "hB"
+ ],
+ BE: [
+ "H",
+ "hB"
+ ],
+ BF: [
+ "H",
+ "hB"
+ ],
+ BJ: [
+ "H",
+ "hB"
+ ],
+ BL: [
+ "H",
+ "hB"
+ ],
+ BR: [
+ "H",
+ "hB"
+ ],
+ CG: [
+ "H",
+ "hB"
+ ],
+ CI: [
+ "H",
+ "hB"
+ ],
+ CV: [
+ "H",
+ "hB"
+ ],
+ DE: [
+ "H",
+ "hB"
+ ],
+ EE: [
+ "H",
+ "hB"
+ ],
+ FR: [
+ "H",
+ "hB"
+ ],
+ GA: [
+ "H",
+ "hB"
+ ],
+ GF: [
+ "H",
+ "hB"
+ ],
+ GN: [
+ "H",
+ "hB"
+ ],
+ GP: [
+ "H",
+ "hB"
+ ],
+ GW: [
+ "H",
+ "hB"
+ ],
+ HR: [
+ "H",
+ "hB"
+ ],
+ IL: [
+ "H",
+ "hB"
+ ],
+ IT: [
+ "H",
+ "hB"
+ ],
+ KZ: [
+ "H",
+ "hB"
+ ],
+ MC: [
+ "H",
+ "hB"
+ ],
+ MD: [
+ "H",
+ "hB"
+ ],
+ MF: [
+ "H",
+ "hB"
+ ],
+ MQ: [
+ "H",
+ "hB"
+ ],
+ MZ: [
+ "H",
+ "hB"
+ ],
+ NC: [
+ "H",
+ "hB"
+ ],
+ NL: [
+ "H",
+ "hB"
+ ],
+ PM: [
+ "H",
+ "hB"
+ ],
+ PT: [
+ "H",
+ "hB"
+ ],
+ RE: [
+ "H",
+ "hB"
+ ],
+ RO: [
+ "H",
+ "hB"
+ ],
+ SI: [
+ "H",
+ "hB"
+ ],
+ SR: [
+ "H",
+ "hB"
+ ],
+ ST: [
+ "H",
+ "hB"
+ ],
+ TG: [
+ "H",
+ "hB"
+ ],
+ TR: [
+ "H",
+ "hB"
+ ],
+ WF: [
+ "H",
+ "hB"
+ ],
+ YT: [
+ "H",
+ "hB"
+ ],
+ BD: [
+ "h",
+ "hB",
+ "H"
+ ],
+ PK: [
+ "h",
+ "hB",
+ "H"
+ ],
+ AZ: [
+ "H",
+ "hB",
+ "h"
+ ],
+ BA: [
+ "H",
+ "hB",
+ "h"
+ ],
+ BG: [
+ "H",
+ "hB",
+ "h"
+ ],
+ CH: [
+ "H",
+ "hB",
+ "h"
+ ],
+ GE: [
+ "H",
+ "hB",
+ "h"
+ ],
+ LI: [
+ "H",
+ "hB",
+ "h"
+ ],
+ ME: [
+ "H",
+ "hB",
+ "h"
+ ],
+ RS: [
+ "H",
+ "hB",
+ "h"
+ ],
+ UA: [
+ "H",
+ "hB",
+ "h"
+ ],
+ UZ: [
+ "H",
+ "hB",
+ "h"
+ ],
+ XK: [
+ "H",
+ "hB",
+ "h"
+ ],
+ AG: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ AU: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ BB: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ BM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ BS: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ CA: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ DM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ "en-001": [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ FJ: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ FM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ GD: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ GM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ GU: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ GY: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ JM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ KI: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ KN: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ KY: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ LC: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ LR: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ MH: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ MP: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ MW: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ NZ: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ SB: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ SG: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ SL: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ SS: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ SZ: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ TC: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ TT: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ UM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ US: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ VC: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ VG: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ VI: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ ZM: [
+ "h",
+ "hb",
+ "H",
+ "hB"
+ ],
+ BO: [
+ "H",
+ "hB",
+ "h",
+ "hb"
+ ],
+ EC: [
+ "H",
+ "hB",
+ "h",
+ "hb"
+ ],
+ ES: [
+ "H",
+ "hB",
+ "h",
+ "hb"
+ ],
+ GQ: [
+ "H",
+ "hB",
+ "h",
+ "hb"
+ ],
+ PE: [
+ "H",
+ "hB",
+ "h",
+ "hb"
+ ],
+ AE: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ "ar-001": [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ BH: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ DZ: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ EG: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ EH: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ HK: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ IQ: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ JO: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ KW: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ LB: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ LY: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ MO: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ MR: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ OM: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ PH: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ PS: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ QA: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ SA: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ SD: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ SY: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ TN: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ YE: [
+ "h",
+ "hB",
+ "hb",
+ "H"
+ ],
+ AF: [
+ "H",
+ "hb",
+ "hB",
+ "h"
+ ],
+ LA: [
+ "H",
+ "hb",
+ "hB",
+ "h"
+ ],
+ CN: [
+ "H",
+ "hB",
+ "hb",
+ "h"
+ ],
+ LV: [
+ "H",
+ "hB",
+ "hb",
+ "h"
+ ],
+ TL: [
+ "H",
+ "hB",
+ "hb",
+ "h"
+ ],
+ "zu-ZA": [
+ "H",
+ "hB",
+ "hb",
+ "h"
+ ],
+ CD: [
+ "hB",
+ "H"
+ ],
+ IR: [
+ "hB",
+ "H"
+ ],
+ "hi-IN": [
+ "hB",
+ "h",
+ "H"
+ ],
+ "kn-IN": [
+ "hB",
+ "h",
+ "H"
+ ],
+ "ml-IN": [
+ "hB",
+ "h",
+ "H"
+ ],
+ "te-IN": [
+ "hB",
+ "h",
+ "H"
+ ],
+ KH: [
+ "hB",
+ "h",
+ "H",
+ "hb"
+ ],
+ "ta-IN": [
+ "hB",
+ "h",
+ "hb",
+ "H"
+ ],
+ BN: [
+ "hb",
+ "hB",
+ "h",
+ "H"
+ ],
+ MY: [
+ "hb",
+ "hB",
+ "h",
+ "H"
+ ],
+ ET: [
+ "hB",
+ "hb",
+ "h",
+ "H"
+ ],
+ "gu-IN": [
+ "hB",
+ "hb",
+ "h",
+ "H"
+ ],
+ "mr-IN": [
+ "hB",
+ "hb",
+ "h",
+ "H"
+ ],
+ "pa-IN": [
+ "hB",
+ "hb",
+ "h",
+ "H"
+ ],
+ TW: [
+ "hB",
+ "hb",
+ "h",
+ "H"
+ ],
+ KE: [
+ "hB",
+ "hb",
+ "H",
+ "h"
+ ],
+ MM: [
+ "hB",
+ "hb",
+ "H",
+ "h"
+ ],
+ TZ: [
+ "hB",
+ "hb",
+ "H",
+ "h"
+ ],
+ UG: [
+ "hB",
+ "hb",
+ "H",
+ "h"
+ ]
+};
+function vs(t, e) {
+ for (var n = "", i = 0; i < t.length; i++) {
+ var r = t.charAt(i);
+ if (r === "j") {
+ for (var l = 0; i + 1 < t.length && t.charAt(i + 1) === r; )
+ l++, i++;
+ var a = 1 + (l & 1), o = l < 2 ? 1 : 3 + (l >> 1), s = "a", u = ys(e);
+ for ((u == "H" || u == "k") && (o = 0); o-- > 0; )
+ n += s;
+ for (; a-- > 0; )
+ n = u + n;
+ } else r === "J" ? n += "H" : n += r;
+ }
+ return n;
+}
+function ys(t) {
+ var e = t.hourCycle;
+ if (e === void 0 && // @ts-ignore hourCycle(s) is not identified yet
+ t.hourCycles && // @ts-ignore
+ t.hourCycles.length && (e = t.hourCycles[0]), e)
+ switch (e) {
+ case "h24":
+ return "k";
+ case "h23":
+ return "H";
+ case "h12":
+ return "h";
+ case "h11":
+ return "K";
+ default:
+ throw new Error("Invalid hourCycle");
+ }
+ var n = t.language, i;
+ n !== "root" && (i = t.maximize().region);
+ var r = fn[i || ""] || fn[n || ""] || fn["".concat(n, "-001")] || fn["001"];
+ return r[0];
+}
+var ri, ws = new RegExp("^".concat(Fl.source, "*")), Ds = new RegExp("".concat(Fl.source, "*$"));
+function z(t, e) {
+ return { start: t, end: e };
+}
+var Es = !!String.prototype.startsWith, Fs = !!String.fromCodePoint, ks = !!Object.fromEntries, As = !!String.prototype.codePointAt, Cs = !!String.prototype.trimStart, Ss = !!String.prototype.trimEnd, xs = !!Number.isSafeInteger, Bs = xs ? Number.isSafeInteger : function(t) {
+ return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991;
+}, Bi = !0;
+try {
+ var $s = xl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
+ Bi = ((ri = $s.exec("a")) === null || ri === void 0 ? void 0 : ri[0]) === "a";
+} catch {
+ Bi = !1;
+}
+var Cr = Es ? (
+ // Native
+ function(e, n, i) {
+ return e.startsWith(n, i);
+ }
+) : (
+ // For IE11
+ function(e, n, i) {
+ return e.slice(i, i + n.length) === n;
+ }
+), $i = Fs ? String.fromCodePoint : (
+ // IE11
+ function() {
+ for (var e = [], n = 0; n < arguments.length; n++)
+ e[n] = arguments[n];
+ for (var i = "", r = e.length, l = 0, a; r > l; ) {
+ if (a = e[l++], a > 1114111)
+ throw RangeError(a + " is not a valid code point");
+ i += a < 65536 ? String.fromCharCode(a) : String.fromCharCode(((a -= 65536) >> 10) + 55296, a % 1024 + 56320);
+ }
+ return i;
+ }
+), Sr = (
+ // native
+ ks ? Object.fromEntries : (
+ // Ponyfill
+ function(e) {
+ for (var n = {}, i = 0, r = e; i < r.length; i++) {
+ var l = r[i], a = l[0], o = l[1];
+ n[a] = o;
+ }
+ return n;
+ }
+ )
+), Sl = As ? (
+ // Native
+ function(e, n) {
+ return e.codePointAt(n);
+ }
+) : (
+ // IE 11
+ function(e, n) {
+ var i = e.length;
+ if (!(n < 0 || n >= i)) {
+ var r = e.charCodeAt(n), l;
+ return r < 55296 || r > 56319 || n + 1 === i || (l = e.charCodeAt(n + 1)) < 56320 || l > 57343 ? r : (r - 55296 << 10) + (l - 56320) + 65536;
+ }
+ }
+), Ts = Cs ? (
+ // Native
+ function(e) {
+ return e.trimStart();
+ }
+) : (
+ // Ponyfill
+ function(e) {
+ return e.replace(ws, "");
+ }
+), Is = Ss ? (
+ // Native
+ function(e) {
+ return e.trimEnd();
+ }
+) : (
+ // Ponyfill
+ function(e) {
+ return e.replace(Ds, "");
+ }
+);
+function xl(t, e) {
+ return new RegExp(t, e);
+}
+var Ti;
+if (Bi) {
+ var xr = xl("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
+ Ti = function(e, n) {
+ var i;
+ xr.lastIndex = n;
+ var r = xr.exec(e);
+ return (i = r[1]) !== null && i !== void 0 ? i : "";
+ };
+} else
+ Ti = function(e, n) {
+ for (var i = []; ; ) {
+ var r = Sl(e, n);
+ if (r === void 0 || Bl(r) || Ns(r))
+ break;
+ i.push(r), n += r >= 65536 ? 2 : 1;
+ }
+ return $i.apply(void 0, i);
+ };
+var Ls = (
+ /** @class */
+ function() {
+ function t(e, n) {
+ n === void 0 && (n = {}), this.message = e, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons;
+ }
+ return t.prototype.parse = function() {
+ if (this.offset() !== 0)
+ throw Error("parser can only be used once");
+ return this.parseMessage(0, "", !1);
+ }, t.prototype.parseMessage = function(e, n, i) {
+ for (var r = []; !this.isEOF(); ) {
+ var l = this.char();
+ if (l === 123) {
+ var a = this.parseArgument(e, i);
+ if (a.err)
+ return a;
+ r.push(a.val);
+ } else {
+ if (l === 125 && e > 0)
+ break;
+ if (l === 35 && (n === "plural" || n === "selectordinal")) {
+ var o = this.clonePosition();
+ this.bump(), r.push({
+ type: K.pound,
+ location: z(o, this.clonePosition())
+ });
+ } else if (l === 60 && !this.ignoreTag && this.peek() === 47) {
+ if (i)
+ break;
+ return this.error(q.UNMATCHED_CLOSING_TAG, z(this.clonePosition(), this.clonePosition()));
+ } else if (l === 60 && !this.ignoreTag && Ii(this.peek() || 0)) {
+ var a = this.parseTag(e, n);
+ if (a.err)
+ return a;
+ r.push(a.val);
+ } else {
+ var a = this.parseLiteral(e, n);
+ if (a.err)
+ return a;
+ r.push(a.val);
+ }
+ }
+ }
+ return { val: r, err: null };
+ }, t.prototype.parseTag = function(e, n) {
+ var i = this.clonePosition();
+ this.bump();
+ var r = this.parseTagName();
+ if (this.bumpSpace(), this.bumpIf("/>"))
+ return {
+ val: {
+ type: K.literal,
+ value: "<".concat(r, "/>"),
+ location: z(i, this.clonePosition())
+ },
+ err: null
+ };
+ if (this.bumpIf(">")) {
+ var l = this.parseMessage(e + 1, n, !0);
+ if (l.err)
+ return l;
+ var a = l.val, o = this.clonePosition();
+ if (this.bumpIf("")) {
+ if (this.isEOF() || !Ii(this.char()))
+ return this.error(q.INVALID_TAG, z(o, this.clonePosition()));
+ var s = this.clonePosition(), u = this.parseTagName();
+ return r !== u ? this.error(q.UNMATCHED_CLOSING_TAG, z(s, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
+ val: {
+ type: K.tag,
+ value: r,
+ children: a,
+ location: z(i, this.clonePosition())
+ },
+ err: null
+ } : this.error(q.INVALID_TAG, z(o, this.clonePosition())));
+ } else
+ return this.error(q.UNCLOSED_TAG, z(i, this.clonePosition()));
+ } else
+ return this.error(q.INVALID_TAG, z(i, this.clonePosition()));
+ }, t.prototype.parseTagName = function() {
+ var e = this.offset();
+ for (this.bump(); !this.isEOF() && Ps(this.char()); )
+ this.bump();
+ return this.message.slice(e, this.offset());
+ }, t.prototype.parseLiteral = function(e, n) {
+ for (var i = this.clonePosition(), r = ""; ; ) {
+ var l = this.tryParseQuote(n);
+ if (l) {
+ r += l;
+ continue;
+ }
+ var a = this.tryParseUnquoted(e, n);
+ if (a) {
+ r += a;
+ continue;
+ }
+ var o = this.tryParseLeftAngleBracket();
+ if (o) {
+ r += o;
+ continue;
+ }
+ break;
+ }
+ var s = z(i, this.clonePosition());
+ return {
+ val: { type: K.literal, value: r, location: s },
+ err: null
+ };
+ }, t.prototype.tryParseLeftAngleBracket = function() {
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
+ !Hs(this.peek() || 0)) ? (this.bump(), "<") : null;
+ }, t.prototype.tryParseQuote = function(e) {
+ if (this.isEOF() || this.char() !== 39)
+ return null;
+ switch (this.peek()) {
+ case 39:
+ return this.bump(), this.bump(), "'";
+ case 123:
+ case 60:
+ case 62:
+ case 125:
+ break;
+ case 35:
+ if (e === "plural" || e === "selectordinal")
+ break;
+ return null;
+ default:
+ return null;
+ }
+ this.bump();
+ var n = [this.char()];
+ for (this.bump(); !this.isEOF(); ) {
+ var i = this.char();
+ if (i === 39)
+ if (this.peek() === 39)
+ n.push(39), this.bump();
+ else {
+ this.bump();
+ break;
+ }
+ else
+ n.push(i);
+ this.bump();
+ }
+ return $i.apply(void 0, n);
+ }, t.prototype.tryParseUnquoted = function(e, n) {
+ if (this.isEOF())
+ return null;
+ var i = this.char();
+ return i === 60 || i === 123 || i === 35 && (n === "plural" || n === "selectordinal") || i === 125 && e > 0 ? null : (this.bump(), $i(i));
+ }, t.prototype.parseArgument = function(e, n) {
+ var i = this.clonePosition();
+ if (this.bump(), this.bumpSpace(), this.isEOF())
+ return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition()));
+ if (this.char() === 125)
+ return this.bump(), this.error(q.EMPTY_ARGUMENT, z(i, this.clonePosition()));
+ var r = this.parseIdentifierIfPossible().value;
+ if (!r)
+ return this.error(q.MALFORMED_ARGUMENT, z(i, this.clonePosition()));
+ if (this.bumpSpace(), this.isEOF())
+ return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition()));
+ switch (this.char()) {
+ case 125:
+ return this.bump(), {
+ val: {
+ type: K.argument,
+ // value does not include the opening and closing braces.
+ value: r,
+ location: z(i, this.clonePosition())
+ },
+ err: null
+ };
+ case 44:
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(i, this.clonePosition())) : this.parseArgumentOptions(e, n, r, i);
+ default:
+ return this.error(q.MALFORMED_ARGUMENT, z(i, this.clonePosition()));
+ }
+ }, t.prototype.parseIdentifierIfPossible = function() {
+ var e = this.clonePosition(), n = this.offset(), i = Ti(this.message, n), r = n + i.length;
+ this.bumpTo(r);
+ var l = this.clonePosition(), a = z(e, l);
+ return { value: i, location: a };
+ }, t.prototype.parseArgumentOptions = function(e, n, i, r) {
+ var l, a = this.clonePosition(), o = this.parseIdentifierIfPossible().value, s = this.clonePosition();
+ switch (o) {
+ case "":
+ return this.error(q.EXPECT_ARGUMENT_TYPE, z(a, s));
+ case "number":
+ case "date":
+ case "time": {
+ this.bumpSpace();
+ var u = null;
+ if (this.bumpIf(",")) {
+ this.bumpSpace();
+ var c = this.clonePosition(), _ = this.parseSimpleArgStyleIfPossible();
+ if (_.err)
+ return _;
+ var h = Is(_.val);
+ if (h.length === 0)
+ return this.error(q.EXPECT_ARGUMENT_STYLE, z(this.clonePosition(), this.clonePosition()));
+ var d = z(c, this.clonePosition());
+ u = { style: h, styleLocation: d };
+ }
+ var D = this.tryParseArgumentClose(r);
+ if (D.err)
+ return D;
+ var E = z(r, this.clonePosition());
+ if (u && Cr(u == null ? void 0 : u.style, "::", 0)) {
+ var F = Ts(u.style.slice(2));
+ if (o === "number") {
+ var _ = this.parseNumberSkeletonFromString(F, u.styleLocation);
+ return _.err ? _ : {
+ val: { type: K.number, value: i, location: E, style: _.val },
+ err: null
+ };
+ } else {
+ if (F.length === 0)
+ return this.error(q.EXPECT_DATE_TIME_SKELETON, E);
+ var C = F;
+ this.locale && (C = vs(F, this.locale));
+ var h = {
+ type: $t.dateTime,
+ pattern: C,
+ location: u.styleLocation,
+ parsedOptions: this.shouldParseSkeletons ? fs(C) : {}
+ }, g = o === "date" ? K.date : K.time;
+ return {
+ val: { type: g, value: i, location: E, style: h },
+ err: null
+ };
+ }
+ }
+ return {
+ val: {
+ type: o === "number" ? K.number : o === "date" ? K.date : K.time,
+ value: i,
+ location: E,
+ style: (l = u == null ? void 0 : u.style) !== null && l !== void 0 ? l : null
+ },
+ err: null
+ };
+ }
+ case "plural":
+ case "selectordinal":
+ case "select": {
+ var f = this.clonePosition();
+ if (this.bumpSpace(), !this.bumpIf(","))
+ return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS, z(f, G({}, f)));
+ this.bumpSpace();
+ var m = this.parseIdentifierIfPossible(), v = 0;
+ if (o !== "select" && m.value === "offset") {
+ if (!this.bumpIf(":"))
+ return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, z(this.clonePosition(), this.clonePosition()));
+ this.bumpSpace();
+ var _ = this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
+ if (_.err)
+ return _;
+ this.bumpSpace(), m = this.parseIdentifierIfPossible(), v = _.val;
+ }
+ var p = this.tryParsePluralOrSelectOptions(e, o, n, m);
+ if (p.err)
+ return p;
+ var D = this.tryParseArgumentClose(r);
+ if (D.err)
+ return D;
+ var b = z(r, this.clonePosition());
+ return o === "select" ? {
+ val: {
+ type: K.select,
+ value: i,
+ options: Sr(p.val),
+ location: b
+ },
+ err: null
+ } : {
+ val: {
+ type: K.plural,
+ value: i,
+ options: Sr(p.val),
+ offset: v,
+ pluralType: o === "plural" ? "cardinal" : "ordinal",
+ location: b
+ },
+ err: null
+ };
+ }
+ default:
+ return this.error(q.INVALID_ARGUMENT_TYPE, z(a, s));
+ }
+ }, t.prototype.tryParseArgumentClose = function(e) {
+ return this.isEOF() || this.char() !== 125 ? this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE, z(e, this.clonePosition())) : (this.bump(), { val: !0, err: null });
+ }, t.prototype.parseSimpleArgStyleIfPossible = function() {
+ for (var e = 0, n = this.clonePosition(); !this.isEOF(); ) {
+ var i = this.char();
+ switch (i) {
+ case 39: {
+ this.bump();
+ var r = this.clonePosition();
+ if (!this.bumpUntil("'"))
+ return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, z(r, this.clonePosition()));
+ this.bump();
+ break;
+ }
+ case 123: {
+ e += 1, this.bump();
+ break;
+ }
+ case 125: {
+ if (e > 0)
+ e -= 1;
+ else
+ return {
+ val: this.message.slice(n.offset, this.offset()),
+ err: null
+ };
+ break;
+ }
+ default:
+ this.bump();
+ break;
+ }
+ }
+ return {
+ val: this.message.slice(n.offset, this.offset()),
+ err: null
+ };
+ }, t.prototype.parseNumberSkeletonFromString = function(e, n) {
+ var i = [];
+ try {
+ i = ds(e);
+ } catch {
+ return this.error(q.INVALID_NUMBER_SKELETON, n);
+ }
+ return {
+ val: {
+ type: $t.number,
+ tokens: i,
+ location: n,
+ parsedOptions: this.shouldParseSkeletons ? bs(i) : {}
+ },
+ err: null
+ };
+ }, t.prototype.tryParsePluralOrSelectOptions = function(e, n, i, r) {
+ for (var l, a = !1, o = [], s = /* @__PURE__ */ new Set(), u = r.value, c = r.location; ; ) {
+ if (u.length === 0) {
+ var _ = this.clonePosition();
+ if (n !== "select" && this.bumpIf("=")) {
+ var h = this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR, q.INVALID_PLURAL_ARGUMENT_SELECTOR);
+ if (h.err)
+ return h;
+ c = z(_, this.clonePosition()), u = this.message.slice(_.offset, this.offset());
+ } else
+ break;
+ }
+ if (s.has(u))
+ return this.error(n === "select" ? q.DUPLICATE_SELECT_ARGUMENT_SELECTOR : q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, c);
+ u === "other" && (a = !0), this.bumpSpace();
+ var d = this.clonePosition();
+ if (!this.bumpIf("{"))
+ return this.error(n === "select" ? q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, z(this.clonePosition(), this.clonePosition()));
+ var D = this.parseMessage(e + 1, n, i);
+ if (D.err)
+ return D;
+ var E = this.tryParseArgumentClose(d);
+ if (E.err)
+ return E;
+ o.push([
+ u,
+ {
+ value: D.val,
+ location: z(d, this.clonePosition())
+ }
+ ]), s.add(u), this.bumpSpace(), l = this.parseIdentifierIfPossible(), u = l.value, c = l.location;
+ }
+ return o.length === 0 ? this.error(n === "select" ? q.EXPECT_SELECT_ARGUMENT_SELECTOR : q.EXPECT_PLURAL_ARGUMENT_SELECTOR, z(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !a ? this.error(q.MISSING_OTHER_CLAUSE, z(this.clonePosition(), this.clonePosition())) : { val: o, err: null };
+ }, t.prototype.tryParseDecimalInteger = function(e, n) {
+ var i = 1, r = this.clonePosition();
+ this.bumpIf("+") || this.bumpIf("-") && (i = -1);
+ for (var l = !1, a = 0; !this.isEOF(); ) {
+ var o = this.char();
+ if (o >= 48 && o <= 57)
+ l = !0, a = a * 10 + (o - 48), this.bump();
+ else
+ break;
+ }
+ var s = z(r, this.clonePosition());
+ return l ? (a *= i, Bs(a) ? { val: a, err: null } : this.error(n, s)) : this.error(e, s);
+ }, t.prototype.offset = function() {
+ return this.position.offset;
+ }, t.prototype.isEOF = function() {
+ return this.offset() === this.message.length;
+ }, t.prototype.clonePosition = function() {
+ return {
+ offset: this.position.offset,
+ line: this.position.line,
+ column: this.position.column
+ };
+ }, t.prototype.char = function() {
+ var e = this.position.offset;
+ if (e >= this.message.length)
+ throw Error("out of bound");
+ var n = Sl(this.message, e);
+ if (n === void 0)
+ throw Error("Offset ".concat(e, " is at invalid UTF-16 code unit boundary"));
+ return n;
+ }, t.prototype.error = function(e, n) {
+ return {
+ val: null,
+ err: {
+ kind: e,
+ message: this.message,
+ location: n
+ }
+ };
+ }, t.prototype.bump = function() {
+ if (!this.isEOF()) {
+ var e = this.char();
+ e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
+ }
+ }, t.prototype.bumpIf = function(e) {
+ if (Cr(this.message, e, this.offset())) {
+ for (var n = 0; n < e.length; n++)
+ this.bump();
+ return !0;
+ }
+ return !1;
+ }, t.prototype.bumpUntil = function(e) {
+ var n = this.offset(), i = this.message.indexOf(e, n);
+ return i >= 0 ? (this.bumpTo(i), !0) : (this.bumpTo(this.message.length), !1);
+ }, t.prototype.bumpTo = function(e) {
+ if (this.offset() > e)
+ throw Error("targetOffset ".concat(e, " must be greater than or equal to the current offset ").concat(this.offset()));
+ for (e = Math.min(e, this.message.length); ; ) {
+ var n = this.offset();
+ if (n === e)
+ break;
+ if (n > e)
+ throw Error("targetOffset ".concat(e, " is at invalid UTF-16 code unit boundary"));
+ if (this.bump(), this.isEOF())
+ break;
+ }
+ }, t.prototype.bumpSpace = function() {
+ for (; !this.isEOF() && Bl(this.char()); )
+ this.bump();
+ }, t.prototype.peek = function() {
+ if (this.isEOF())
+ return null;
+ var e = this.char(), n = this.offset(), i = this.message.charCodeAt(n + (e >= 65536 ? 2 : 1));
+ return i ?? null;
+ }, t;
+ }()
+);
+function Ii(t) {
+ return t >= 97 && t <= 122 || t >= 65 && t <= 90;
+}
+function Hs(t) {
+ return Ii(t) || t === 47;
+}
+function Ps(t) {
+ return t === 45 || t === 46 || t >= 48 && t <= 57 || t === 95 || t >= 97 && t <= 122 || t >= 65 && t <= 90 || t == 183 || t >= 192 && t <= 214 || t >= 216 && t <= 246 || t >= 248 && t <= 893 || t >= 895 && t <= 8191 || t >= 8204 && t <= 8205 || t >= 8255 && t <= 8256 || t >= 8304 && t <= 8591 || t >= 11264 && t <= 12271 || t >= 12289 && t <= 55295 || t >= 63744 && t <= 64975 || t >= 65008 && t <= 65533 || t >= 65536 && t <= 983039;
+}
+function Bl(t) {
+ return t >= 9 && t <= 13 || t === 32 || t === 133 || t >= 8206 && t <= 8207 || t === 8232 || t === 8233;
+}
+function Ns(t) {
+ return t >= 33 && t <= 35 || t === 36 || t >= 37 && t <= 39 || t === 40 || t === 41 || t === 42 || t === 43 || t === 44 || t === 45 || t >= 46 && t <= 47 || t >= 58 && t <= 59 || t >= 60 && t <= 62 || t >= 63 && t <= 64 || t === 91 || t === 92 || t === 93 || t === 94 || t === 96 || t === 123 || t === 124 || t === 125 || t === 126 || t === 161 || t >= 162 && t <= 165 || t === 166 || t === 167 || t === 169 || t === 171 || t === 172 || t === 174 || t === 176 || t === 177 || t === 182 || t === 187 || t === 191 || t === 215 || t === 247 || t >= 8208 && t <= 8213 || t >= 8214 && t <= 8215 || t === 8216 || t === 8217 || t === 8218 || t >= 8219 && t <= 8220 || t === 8221 || t === 8222 || t === 8223 || t >= 8224 && t <= 8231 || t >= 8240 && t <= 8248 || t === 8249 || t === 8250 || t >= 8251 && t <= 8254 || t >= 8257 && t <= 8259 || t === 8260 || t === 8261 || t === 8262 || t >= 8263 && t <= 8273 || t === 8274 || t === 8275 || t >= 8277 && t <= 8286 || t >= 8592 && t <= 8596 || t >= 8597 && t <= 8601 || t >= 8602 && t <= 8603 || t >= 8604 && t <= 8607 || t === 8608 || t >= 8609 && t <= 8610 || t === 8611 || t >= 8612 && t <= 8613 || t === 8614 || t >= 8615 && t <= 8621 || t === 8622 || t >= 8623 && t <= 8653 || t >= 8654 && t <= 8655 || t >= 8656 && t <= 8657 || t === 8658 || t === 8659 || t === 8660 || t >= 8661 && t <= 8691 || t >= 8692 && t <= 8959 || t >= 8960 && t <= 8967 || t === 8968 || t === 8969 || t === 8970 || t === 8971 || t >= 8972 && t <= 8991 || t >= 8992 && t <= 8993 || t >= 8994 && t <= 9e3 || t === 9001 || t === 9002 || t >= 9003 && t <= 9083 || t === 9084 || t >= 9085 && t <= 9114 || t >= 9115 && t <= 9139 || t >= 9140 && t <= 9179 || t >= 9180 && t <= 9185 || t >= 9186 && t <= 9254 || t >= 9255 && t <= 9279 || t >= 9280 && t <= 9290 || t >= 9291 && t <= 9311 || t >= 9472 && t <= 9654 || t === 9655 || t >= 9656 && t <= 9664 || t === 9665 || t >= 9666 && t <= 9719 || t >= 9720 && t <= 9727 || t >= 9728 && t <= 9838 || t === 9839 || t >= 9840 && t <= 10087 || t === 10088 || t === 10089 || t === 10090 || t === 10091 || t === 10092 || t === 10093 || t === 10094 || t === 10095 || t === 10096 || t === 10097 || t === 10098 || t === 10099 || t === 10100 || t === 10101 || t >= 10132 && t <= 10175 || t >= 10176 && t <= 10180 || t === 10181 || t === 10182 || t >= 10183 && t <= 10213 || t === 10214 || t === 10215 || t === 10216 || t === 10217 || t === 10218 || t === 10219 || t === 10220 || t === 10221 || t === 10222 || t === 10223 || t >= 10224 && t <= 10239 || t >= 10240 && t <= 10495 || t >= 10496 && t <= 10626 || t === 10627 || t === 10628 || t === 10629 || t === 10630 || t === 10631 || t === 10632 || t === 10633 || t === 10634 || t === 10635 || t === 10636 || t === 10637 || t === 10638 || t === 10639 || t === 10640 || t === 10641 || t === 10642 || t === 10643 || t === 10644 || t === 10645 || t === 10646 || t === 10647 || t === 10648 || t >= 10649 && t <= 10711 || t === 10712 || t === 10713 || t === 10714 || t === 10715 || t >= 10716 && t <= 10747 || t === 10748 || t === 10749 || t >= 10750 && t <= 11007 || t >= 11008 && t <= 11055 || t >= 11056 && t <= 11076 || t >= 11077 && t <= 11078 || t >= 11079 && t <= 11084 || t >= 11085 && t <= 11123 || t >= 11124 && t <= 11125 || t >= 11126 && t <= 11157 || t === 11158 || t >= 11159 && t <= 11263 || t >= 11776 && t <= 11777 || t === 11778 || t === 11779 || t === 11780 || t === 11781 || t >= 11782 && t <= 11784 || t === 11785 || t === 11786 || t === 11787 || t === 11788 || t === 11789 || t >= 11790 && t <= 11798 || t === 11799 || t >= 11800 && t <= 11801 || t === 11802 || t === 11803 || t === 11804 || t === 11805 || t >= 11806 && t <= 11807 || t === 11808 || t === 11809 || t === 11810 || t === 11811 || t === 11812 || t === 11813 || t === 11814 || t === 11815 || t === 11816 || t === 11817 || t >= 11818 && t <= 11822 || t === 11823 || t >= 11824 && t <= 11833 || t >= 11834 && t <= 11835 || t >= 11836 && t <= 11839 || t === 11840 || t === 11841 || t === 11842 || t >= 11843 && t <= 11855 || t >= 11856 && t <= 11857 || t === 11858 || t >= 11859 && t <= 11903 || t >= 12289 && t <= 12291 || t === 12296 || t === 12297 || t === 12298 || t === 12299 || t === 12300 || t === 12301 || t === 12302 || t === 12303 || t === 12304 || t === 12305 || t >= 12306 && t <= 12307 || t === 12308 || t === 12309 || t === 12310 || t === 12311 || t === 12312 || t === 12313 || t === 12314 || t === 12315 || t === 12316 || t === 12317 || t >= 12318 && t <= 12319 || t === 12320 || t === 12336 || t === 64830 || t === 64831 || t >= 65093 && t <= 65094;
+}
+function Li(t) {
+ t.forEach(function(e) {
+ if (delete e.location, yl(e) || wl(e))
+ for (var n in e.options)
+ delete e.options[n].location, Li(e.options[n].value);
+ else gl(e) && El(e.style) || (bl(e) || vl(e)) && xi(e.style) ? delete e.style.location : Dl(e) && Li(e.children);
+ });
+}
+function Os(t, e) {
+ e === void 0 && (e = {}), e = G({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, e);
+ var n = new Ls(t, e).parse();
+ if (n.err) {
+ var i = SyntaxError(q[n.err.kind]);
+ throw i.location = n.err.location, i.originalMessage = n.err.message, i;
+ }
+ return e != null && e.captureLocation || Li(n.val), n.val;
+}
+function ai(t, e) {
+ var n = e && e.cache ? e.cache : Gs, i = e && e.serializer ? e.serializer : Us, r = e && e.strategy ? e.strategy : qs;
+ return r(t, {
+ cache: n,
+ serializer: i
+ });
+}
+function Rs(t) {
+ return t == null || typeof t == "number" || typeof t == "boolean";
+}
+function Ms(t, e, n, i) {
+ var r = Rs(i) ? i : n(i), l = e.get(r);
+ return typeof l > "u" && (l = t.call(this, i), e.set(r, l)), l;
+}
+function $l(t, e, n) {
+ var i = Array.prototype.slice.call(arguments, 3), r = n(i), l = e.get(r);
+ return typeof l > "u" && (l = t.apply(this, i), e.set(r, l)), l;
+}
+function Tl(t, e, n, i, r) {
+ return n.bind(e, t, i, r);
+}
+function qs(t, e) {
+ var n = t.length === 1 ? Ms : $l;
+ return Tl(t, this, n, e.cache.create(), e.serializer);
+}
+function zs(t, e) {
+ return Tl(t, this, $l, e.cache.create(), e.serializer);
+}
+var Us = function() {
+ return JSON.stringify(arguments);
+};
+function er() {
+ this.cache = /* @__PURE__ */ Object.create(null);
+}
+er.prototype.get = function(t) {
+ return this.cache[t];
+};
+er.prototype.set = function(t, e) {
+ this.cache[t] = e;
+};
+var Gs = {
+ create: function() {
+ return new er();
+ }
+}, li = {
+ variadic: zs
+}, Tt;
+(function(t) {
+ t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API";
+})(Tt || (Tt = {}));
+var Xn = (
+ /** @class */
+ function(t) {
+ Vn(e, t);
+ function e(n, i, r) {
+ var l = t.call(this, n) || this;
+ return l.code = i, l.originalMessage = r, l;
+ }
+ return e.prototype.toString = function() {
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
+ }, e;
+ }(Error)
+), Br = (
+ /** @class */
+ function(t) {
+ Vn(e, t);
+ function e(n, i, r, l) {
+ return t.call(this, 'Invalid values for "'.concat(n, '": "').concat(i, '". Options are "').concat(Object.keys(r).join('", "'), '"'), Tt.INVALID_VALUE, l) || this;
+ }
+ return e;
+ }(Xn)
+), js = (
+ /** @class */
+ function(t) {
+ Vn(e, t);
+ function e(n, i, r) {
+ return t.call(this, 'Value for "'.concat(n, '" must be of type ').concat(i), Tt.INVALID_VALUE, r) || this;
+ }
+ return e;
+ }(Xn)
+), Vs = (
+ /** @class */
+ function(t) {
+ Vn(e, t);
+ function e(n, i) {
+ return t.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(i, '"'), Tt.MISSING_VALUE, i) || this;
+ }
+ return e;
+ }(Xn)
+), de;
+(function(t) {
+ t[t.literal = 0] = "literal", t[t.object = 1] = "object";
+})(de || (de = {}));
+function Xs(t) {
+ return t.length < 2 ? t : t.reduce(function(e, n) {
+ var i = e[e.length - 1];
+ return !i || i.type !== de.literal || n.type !== de.literal ? e.push(n) : i.value += n.value, e;
+ }, []);
+}
+function Zs(t) {
+ return typeof t == "function";
+}
+function An(t, e, n, i, r, l, a) {
+ if (t.length === 1 && Er(t[0]))
+ return [
+ {
+ type: de.literal,
+ value: t[0].value
+ }
+ ];
+ for (var o = [], s = 0, u = t; s < u.length; s++) {
+ var c = u[s];
+ if (Er(c)) {
+ o.push({
+ type: de.literal,
+ value: c.value
+ });
+ continue;
+ }
+ if (cs(c)) {
+ typeof l == "number" && o.push({
+ type: de.literal,
+ value: n.getNumberFormat(e).format(l)
+ });
+ continue;
+ }
+ var _ = c.value;
+ if (!(r && _ in r))
+ throw new Vs(_, a);
+ var h = r[_];
+ if (us(c)) {
+ (!h || typeof h == "string" || typeof h == "number") && (h = typeof h == "string" || typeof h == "number" ? String(h) : ""), o.push({
+ type: typeof h == "string" ? de.literal : de.object,
+ value: h
+ });
+ continue;
+ }
+ if (bl(c)) {
+ var d = typeof c.style == "string" ? i.date[c.style] : xi(c.style) ? c.style.parsedOptions : void 0;
+ o.push({
+ type: de.literal,
+ value: n.getDateTimeFormat(e, d).format(h)
+ });
+ continue;
+ }
+ if (vl(c)) {
+ var d = typeof c.style == "string" ? i.time[c.style] : xi(c.style) ? c.style.parsedOptions : i.time.medium;
+ o.push({
+ type: de.literal,
+ value: n.getDateTimeFormat(e, d).format(h)
+ });
+ continue;
+ }
+ if (gl(c)) {
+ var d = typeof c.style == "string" ? i.number[c.style] : El(c.style) ? c.style.parsedOptions : void 0;
+ d && d.scale && (h = h * (d.scale || 1)), o.push({
+ type: de.literal,
+ value: n.getNumberFormat(e, d).format(h)
+ });
+ continue;
+ }
+ if (Dl(c)) {
+ var D = c.children, E = c.value, F = r[E];
+ if (!Zs(F))
+ throw new js(E, "function", a);
+ var C = An(D, e, n, i, r, l), g = F(C.map(function(v) {
+ return v.value;
+ }));
+ Array.isArray(g) || (g = [g]), o.push.apply(o, g.map(function(v) {
+ return {
+ type: typeof v == "string" ? de.literal : de.object,
+ value: v
+ };
+ }));
+ }
+ if (yl(c)) {
+ var f = c.options[h] || c.options.other;
+ if (!f)
+ throw new Br(c.value, h, Object.keys(c.options), a);
+ o.push.apply(o, An(f.value, e, n, i, r));
+ continue;
+ }
+ if (wl(c)) {
+ var f = c.options["=".concat(h)];
+ if (!f) {
+ if (!Intl.PluralRules)
+ throw new Xn(`Intl.PluralRules is not available in this environment.
+Try polyfilling it using "@formatjs/intl-pluralrules"
+`, Tt.MISSING_INTL_API, a);
+ var m = n.getPluralRules(e, { type: c.pluralType }).select(h - (c.offset || 0));
+ f = c.options[m] || c.options.other;
+ }
+ if (!f)
+ throw new Br(c.value, h, Object.keys(c.options), a);
+ o.push.apply(o, An(f.value, e, n, i, r, h - (c.offset || 0)));
+ continue;
+ }
+ }
+ return Xs(o);
+}
+function Ws(t, e) {
+ return e ? G(G(G({}, t || {}), e || {}), Object.keys(t).reduce(function(n, i) {
+ return n[i] = G(G({}, t[i]), e[i] || {}), n;
+ }, {})) : t;
+}
+function Qs(t, e) {
+ return e ? Object.keys(t).reduce(function(n, i) {
+ return n[i] = Ws(t[i], e[i]), n;
+ }, G({}, t)) : t;
+}
+function oi(t) {
+ return {
+ create: function() {
+ return {
+ get: function(e) {
+ return t[e];
+ },
+ set: function(e, n) {
+ t[e] = n;
+ }
+ };
+ }
+ };
+}
+function Ys(t) {
+ return t === void 0 && (t = {
+ number: {},
+ dateTime: {},
+ pluralRules: {}
+ }), {
+ getNumberFormat: ai(function() {
+ for (var e, n = [], i = 0; i < arguments.length; i++)
+ n[i] = arguments[i];
+ return new ((e = Intl.NumberFormat).bind.apply(e, ii([void 0], n, !1)))();
+ }, {
+ cache: oi(t.number),
+ strategy: li.variadic
+ }),
+ getDateTimeFormat: ai(function() {
+ for (var e, n = [], i = 0; i < arguments.length; i++)
+ n[i] = arguments[i];
+ return new ((e = Intl.DateTimeFormat).bind.apply(e, ii([void 0], n, !1)))();
+ }, {
+ cache: oi(t.dateTime),
+ strategy: li.variadic
+ }),
+ getPluralRules: ai(function() {
+ for (var e, n = [], i = 0; i < arguments.length; i++)
+ n[i] = arguments[i];
+ return new ((e = Intl.PluralRules).bind.apply(e, ii([void 0], n, !1)))();
+ }, {
+ cache: oi(t.pluralRules),
+ strategy: li.variadic
+ })
+ };
+}
+var Js = (
+ /** @class */
+ function() {
+ function t(e, n, i, r) {
+ var l = this;
+ if (n === void 0 && (n = t.defaultLocale), this.formatterCache = {
+ number: {},
+ dateTime: {},
+ pluralRules: {}
+ }, this.format = function(a) {
+ var o = l.formatToParts(a);
+ if (o.length === 1)
+ return o[0].value;
+ var s = o.reduce(function(u, c) {
+ return !u.length || c.type !== de.literal || typeof u[u.length - 1] != "string" ? u.push(c.value) : u[u.length - 1] += c.value, u;
+ }, []);
+ return s.length <= 1 ? s[0] || "" : s;
+ }, this.formatToParts = function(a) {
+ return An(l.ast, l.locales, l.formatters, l.formats, a, void 0, l.message);
+ }, this.resolvedOptions = function() {
+ return {
+ locale: l.resolvedLocale.toString()
+ };
+ }, this.getAst = function() {
+ return l.ast;
+ }, this.locales = n, this.resolvedLocale = t.resolveLocale(n), typeof e == "string") {
+ if (this.message = e, !t.__parse)
+ throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
+ this.ast = t.__parse(e, {
+ ignoreTag: r == null ? void 0 : r.ignoreTag,
+ locale: this.resolvedLocale
+ });
+ } else
+ this.ast = e;
+ if (!Array.isArray(this.ast))
+ throw new TypeError("A message must be provided as a String or AST.");
+ this.formats = Qs(t.formats, i), this.formatters = r && r.formatters || Ys(this.formatterCache);
+ }
+ return Object.defineProperty(t, "defaultLocale", {
+ get: function() {
+ return t.memoizedDefaultLocale || (t.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), t.memoizedDefaultLocale;
+ },
+ enumerable: !1,
+ configurable: !0
+ }), t.memoizedDefaultLocale = null, t.resolveLocale = function(e) {
+ var n = Intl.NumberFormat.supportedLocalesOf(e);
+ return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]);
+ }, t.__parse = Os, t.formats = {
+ number: {
+ integer: {
+ maximumFractionDigits: 0
+ },
+ currency: {
+ style: "currency"
+ },
+ percent: {
+ style: "percent"
+ }
+ },
+ date: {
+ short: {
+ month: "numeric",
+ day: "numeric",
+ year: "2-digit"
+ },
+ medium: {
+ month: "short",
+ day: "numeric",
+ year: "numeric"
+ },
+ long: {
+ month: "long",
+ day: "numeric",
+ year: "numeric"
+ },
+ full: {
+ weekday: "long",
+ month: "long",
+ day: "numeric",
+ year: "numeric"
+ }
+ },
+ time: {
+ short: {
+ hour: "numeric",
+ minute: "numeric"
+ },
+ medium: {
+ hour: "numeric",
+ minute: "numeric",
+ second: "numeric"
+ },
+ long: {
+ hour: "numeric",
+ minute: "numeric",
+ second: "numeric",
+ timeZoneName: "short"
+ },
+ full: {
+ hour: "numeric",
+ minute: "numeric",
+ second: "numeric",
+ timeZoneName: "short"
+ }
+ }
+ }, t;
+ }()
+);
+function Ks(t, e) {
+ if (e == null)
+ return;
+ if (e in t)
+ return t[e];
+ const n = e.split(".");
+ let i = t;
+ for (let r = 0; r < n.length; r++)
+ if (typeof i == "object") {
+ if (r > 0) {
+ const l = n.slice(r, n.length).join(".");
+ if (l in i) {
+ i = i[l];
+ break;
+ }
+ }
+ i = i[n[r]];
+ } else
+ i = void 0;
+ return i;
+}
+const it = {}, eu = (t, e, n) => n && (e in it || (it[e] = {}), t in it[e] || (it[e][t] = n), n), Il = (t, e) => {
+ if (e == null)
+ return;
+ if (e in it && t in it[e])
+ return it[e][t];
+ const n = Zn(e);
+ for (let i = 0; i < n.length; i++) {
+ const r = n[i], l = nu(r, t);
+ if (l)
+ return eu(t, e, l);
+ }
+};
+let tr;
+const nn = tn({});
+function tu(t) {
+ return tr[t] || null;
+}
+function Ll(t) {
+ return t in tr;
+}
+function nu(t, e) {
+ if (!Ll(t))
+ return null;
+ const n = tu(t);
+ return Ks(n, e);
+}
+function iu(t) {
+ if (t == null)
+ return;
+ const e = Zn(t);
+ for (let n = 0; n < e.length; n++) {
+ const i = e[n];
+ if (Ll(i))
+ return i;
+ }
+}
+function ru(t, ...e) {
+ delete it[t], nn.update((n) => (n[t] = Bt.all([n[t] || {}, ...e]), n));
+}
+Lt(
+ [nn],
+ ([t]) => Object.keys(t)
+);
+nn.subscribe((t) => tr = t);
+const Cn = {};
+function au(t, e) {
+ Cn[t].delete(e), Cn[t].size === 0 && delete Cn[t];
+}
+function Hl(t) {
+ return Cn[t];
+}
+function lu(t) {
+ return Zn(t).map((e) => {
+ const n = Hl(e);
+ return [e, n ? [...n] : []];
+ }).filter(([, e]) => e.length > 0);
+}
+function Hi(t) {
+ return t == null ? !1 : Zn(t).some(
+ (e) => {
+ var n;
+ return (n = Hl(e)) == null ? void 0 : n.size;
+ }
+ );
+}
+function ou(t, e) {
+ return Promise.all(
+ e.map((i) => (au(t, i), i().then((r) => r.default || r)))
+ ).then((i) => ru(t, ...i));
+}
+const Nt = {};
+function Pl(t) {
+ if (!Hi(t))
+ return t in Nt ? Nt[t] : Promise.resolve();
+ const e = lu(t);
+ return Nt[t] = Promise.all(
+ e.map(
+ ([n, i]) => ou(n, i)
+ )
+ ).then(() => {
+ if (Hi(t))
+ return Pl(t);
+ delete Nt[t];
+ }), Nt[t];
+}
+const su = {
+ number: {
+ scientific: { notation: "scientific" },
+ engineering: { notation: "engineering" },
+ compactLong: { notation: "compact", compactDisplay: "long" },
+ compactShort: { notation: "compact", compactDisplay: "short" }
+ },
+ date: {
+ short: { month: "numeric", day: "numeric", year: "2-digit" },
+ medium: { month: "short", day: "numeric", year: "numeric" },
+ long: { month: "long", day: "numeric", year: "numeric" },
+ full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
+ },
+ time: {
+ short: { hour: "numeric", minute: "numeric" },
+ medium: { hour: "numeric", minute: "numeric", second: "numeric" },
+ long: {
+ hour: "numeric",
+ minute: "numeric",
+ second: "numeric",
+ timeZoneName: "short"
+ },
+ full: {
+ hour: "numeric",
+ minute: "numeric",
+ second: "numeric",
+ timeZoneName: "short"
+ }
+ }
+}, uu = {
+ fallbackLocale: null,
+ loadingDelay: 200,
+ formats: su,
+ warnOnMissingMessages: !0,
+ handleMissingMessage: void 0,
+ ignoreTag: !0
+}, cu = uu;
+function It() {
+ return cu;
+}
+const si = tn(!1);
+var hu = Object.defineProperty, fu = Object.defineProperties, _u = Object.getOwnPropertyDescriptors, $r = Object.getOwnPropertySymbols, du = Object.prototype.hasOwnProperty, mu = Object.prototype.propertyIsEnumerable, Tr = (t, e, n) => e in t ? hu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, pu = (t, e) => {
+ for (var n in e || (e = {}))
+ du.call(e, n) && Tr(t, n, e[n]);
+ if ($r)
+ for (var n of $r(e))
+ mu.call(e, n) && Tr(t, n, e[n]);
+ return t;
+}, gu = (t, e) => fu(t, _u(e));
+let Pi;
+const Tn = tn(null);
+function Ir(t) {
+ return t.split("-").map((e, n, i) => i.slice(0, n + 1).join("-")).reverse();
+}
+function Zn(t, e = It().fallbackLocale) {
+ const n = Ir(t);
+ return e ? [.../* @__PURE__ */ new Set([...n, ...Ir(e)])] : n;
+}
+function dt() {
+ return Pi ?? void 0;
+}
+Tn.subscribe((t) => {
+ Pi = t ?? void 0, typeof window < "u" && t != null && document.documentElement.setAttribute("lang", t);
+});
+const bu = (t) => {
+ if (t && iu(t) && Hi(t)) {
+ const { loadingDelay: e } = It();
+ let n;
+ return typeof window < "u" && dt() != null && e ? n = window.setTimeout(
+ () => si.set(!0),
+ e
+ ) : si.set(!0), Pl(t).then(() => {
+ Tn.set(t);
+ }).finally(() => {
+ clearTimeout(n), si.set(!1);
+ });
+ }
+ return Tn.set(t);
+}, rn = gu(pu({}, Tn), {
+ set: bu
+}), Wn = (t) => {
+ const e = /* @__PURE__ */ Object.create(null);
+ return (i) => {
+ const r = JSON.stringify(i);
+ return r in e ? e[r] : e[r] = t(i);
+ };
+};
+var vu = Object.defineProperty, In = Object.getOwnPropertySymbols, Nl = Object.prototype.hasOwnProperty, Ol = Object.prototype.propertyIsEnumerable, Lr = (t, e, n) => e in t ? vu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, nr = (t, e) => {
+ for (var n in e || (e = {}))
+ Nl.call(e, n) && Lr(t, n, e[n]);
+ if (In)
+ for (var n of In(e))
+ Ol.call(e, n) && Lr(t, n, e[n]);
+ return t;
+}, Ht = (t, e) => {
+ var n = {};
+ for (var i in t)
+ Nl.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
+ if (t != null && In)
+ for (var i of In(t))
+ e.indexOf(i) < 0 && Ol.call(t, i) && (n[i] = t[i]);
+ return n;
+};
+const Wt = (t, e) => {
+ const { formats: n } = It();
+ if (t in n && e in n[t])
+ return n[t][e];
+ throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`);
+}, yu = Wn(
+ (t) => {
+ var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]);
+ if (n == null)
+ throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
+ return i && (r = Wt("number", i)), new Intl.NumberFormat(n, r);
+ }
+), wu = Wn(
+ (t) => {
+ var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]);
+ if (n == null)
+ throw new Error('[svelte-i18n] A "locale" must be set to format dates');
+ return i ? r = Wt("date", i) : Object.keys(r).length === 0 && (r = Wt("date", "short")), new Intl.DateTimeFormat(n, r);
+ }
+), Du = Wn(
+ (t) => {
+ var e = t, { locale: n, format: i } = e, r = Ht(e, ["locale", "format"]);
+ if (n == null)
+ throw new Error(
+ '[svelte-i18n] A "locale" must be set to format time values'
+ );
+ return i ? r = Wt("time", i) : Object.keys(r).length === 0 && (r = Wt("time", "short")), new Intl.DateTimeFormat(n, r);
+ }
+), Eu = (t = {}) => {
+ var e = t, {
+ locale: n = dt()
+ } = e, i = Ht(e, [
+ "locale"
+ ]);
+ return yu(nr({ locale: n }, i));
+}, Fu = (t = {}) => {
+ var e = t, {
+ locale: n = dt()
+ } = e, i = Ht(e, [
+ "locale"
+ ]);
+ return wu(nr({ locale: n }, i));
+}, ku = (t = {}) => {
+ var e = t, {
+ locale: n = dt()
+ } = e, i = Ht(e, [
+ "locale"
+ ]);
+ return Du(nr({ locale: n }, i));
+}, Au = Wn(
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ (t, e = dt()) => new Js(t, e, It().formats, {
+ ignoreTag: It().ignoreTag
+ })
+), Cu = (t, e = {}) => {
+ var n, i, r, l;
+ let a = e;
+ typeof t == "object" && (a = t, t = a.id);
+ const {
+ values: o,
+ locale: s = dt(),
+ default: u
+ } = a;
+ if (s == null)
+ throw new Error(
+ "[svelte-i18n] Cannot format a message without first setting the initial locale."
+ );
+ let c = Il(t, s);
+ if (!c)
+ c = (l = (r = (i = (n = It()).handleMissingMessage) == null ? void 0 : i.call(n, { locale: s, id: t, defaultValue: u })) != null ? r : u) != null ? l : t;
+ else if (typeof c != "string")
+ return console.warn(
+ `[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
+ ), c;
+ if (!o)
+ return c;
+ let _ = c;
+ try {
+ _ = Au(c, s).format(o);
+ } catch (h) {
+ h instanceof Error && console.warn(
+ `[svelte-i18n] Message "${t}" has syntax error:`,
+ h.message
+ );
+ }
+ return _;
+}, Su = (t, e) => ku(e).format(t), xu = (t, e) => Fu(e).format(t), Bu = (t, e) => Eu(e).format(t), $u = (t, e = dt()) => Il(t, e);
+Lt([rn, nn], () => Cu);
+Lt([rn], () => Su);
+Lt([rn], () => xu);
+Lt([rn], () => Bu);
+Lt([rn, nn], () => $u);
+const {
+ SvelteComponent: Tu,
+ append_hydration: Ni,
+ assign: Iu,
+ attr: ue,
+ binding_callbacks: Lu,
+ children: Ut,
+ claim_element: Rl,
+ claim_space: Ml,
+ claim_svg_element: ui,
+ create_slot: Hu,
+ detach: Ge,
+ element: ql,
+ empty: Hr,
+ get_all_dirty_from_scope: Pu,
+ get_slot_changes: Nu,
+ get_spread_update: Ou,
+ init: Ru,
+ insert_hydration: Qt,
+ listen: Mu,
+ noop: qu,
+ safe_not_equal: zu,
+ set_dynamic_element_data: Pr,
+ set_style: j,
+ space: zl,
+ svg_element: ci,
+ toggle_class: ae,
+ transition_in: Ul,
+ transition_out: Gl,
+ update_slot_base: Uu
+} = window.__gradio__svelte__internal;
+function Nr(t) {
+ let e, n, i, r, l;
+ return {
+ c() {
+ e = ci("svg"), n = ci("line"), i = ci("line"), this.h();
+ },
+ l(a) {
+ e = ui(a, "svg", { class: !0, xmlns: !0, viewBox: !0 });
+ var o = Ut(e);
+ n = ui(o, "line", {
+ x1: !0,
+ y1: !0,
+ x2: !0,
+ y2: !0,
+ stroke: !0,
+ "stroke-width": !0
+ }), Ut(n).forEach(Ge), i = ui(o, "line", {
+ x1: !0,
+ y1: !0,
+ x2: !0,
+ y2: !0,
+ stroke: !0,
+ "stroke-width": !0
+ }), Ut(i).forEach(Ge), o.forEach(Ge), this.h();
+ },
+ h() {
+ ue(n, "x1", "1"), ue(n, "y1", "9"), ue(n, "x2", "9"), ue(n, "y2", "1"), ue(n, "stroke", "gray"), ue(n, "stroke-width", "0.5"), ue(i, "x1", "5"), ue(i, "y1", "9"), ue(i, "x2", "9"), ue(i, "y2", "5"), ue(i, "stroke", "gray"), ue(i, "stroke-width", "0.5"), ue(e, "class", "resize-handle svelte-239wnu"), ue(e, "xmlns", "http://www.w3.org/2000/svg"), ue(e, "viewBox", "0 0 10 10");
+ },
+ m(a, o) {
+ Qt(a, e, o), Ni(e, n), Ni(e, i), r || (l = Mu(
+ e,
+ "mousedown",
+ /*resize*/
+ t[27]
+ ), r = !0);
+ },
+ p: qu,
+ d(a) {
+ a && Ge(e), r = !1, l();
+ }
+ };
+}
+function Gu(t) {
+ var _;
+ let e, n, i, r, l;
+ const a = (
+ /*#slots*/
+ t[31].default
+ ), o = Hu(
+ a,
+ t,
+ /*$$scope*/
+ t[30],
+ null
+ );
+ let s = (
+ /*resizable*/
+ t[19] && Nr(t)
+ ), u = [
+ { "data-testid": (
+ /*test_id*/
+ t[11]
+ ) },
+ { id: (
+ /*elem_id*/
+ t[6]
+ ) },
+ {
+ class: i = "block " + /*elem_classes*/
+ (((_ = t[7]) == null ? void 0 : _.join(" ")) || "") + " svelte-239wnu"
+ },
+ {
+ dir: r = /*rtl*/
+ t[20] ? "rtl" : "ltr"
+ }
+ ], c = {};
+ for (let h = 0; h < u.length; h += 1)
+ c = Iu(c, u[h]);
+ return {
+ c() {
+ e = ql(
+ /*tag*/
+ t[25]
+ ), o && o.c(), n = zl(), s && s.c(), this.h();
+ },
+ l(h) {
+ e = Rl(
+ h,
+ /*tag*/
+ (t[25] || "null").toUpperCase(),
+ {
+ "data-testid": !0,
+ id: !0,
+ class: !0,
+ dir: !0
+ }
+ );
+ var d = Ut(e);
+ o && o.l(d), n = Ml(d), s && s.l(d), d.forEach(Ge), this.h();
+ },
+ h() {
+ Pr(
+ /*tag*/
+ t[25]
+ )(e, c), ae(
+ e,
+ "hidden",
+ /*visible*/
+ t[14] === !1
+ ), ae(
+ e,
+ "padded",
+ /*padding*/
+ t[10]
+ ), ae(
+ e,
+ "flex",
+ /*flex*/
+ t[1]
+ ), ae(
+ e,
+ "border_focus",
+ /*border_mode*/
+ t[9] === "focus"
+ ), ae(
+ e,
+ "border_contrast",
+ /*border_mode*/
+ t[9] === "contrast"
+ ), ae(e, "hide-container", !/*explicit_call*/
+ t[12] && !/*container*/
+ t[13]), ae(
+ e,
+ "fullscreen",
+ /*fullscreen*/
+ t[0]
+ ), ae(
+ e,
+ "animating",
+ /*fullscreen*/
+ t[0] && /*preexpansionBoundingRect*/
+ t[24] !== null
+ ), ae(
+ e,
+ "auto-margin",
+ /*scale*/
+ t[17] === null
+ ), j(
+ e,
+ "height",
+ /*fullscreen*/
+ t[0] ? void 0 : (
+ /*get_dimension*/
+ t[26](
+ /*height*/
+ t[2]
+ )
+ )
+ ), j(
+ e,
+ "min-height",
+ /*fullscreen*/
+ t[0] ? void 0 : (
+ /*get_dimension*/
+ t[26](
+ /*min_height*/
+ t[3]
+ )
+ )
+ ), j(
+ e,
+ "max-height",
+ /*fullscreen*/
+ t[0] ? void 0 : (
+ /*get_dimension*/
+ t[26](
+ /*max_height*/
+ t[4]
+ )
+ )
+ ), j(
+ e,
+ "--start-top",
+ /*preexpansionBoundingRect*/
+ t[24] ? `${/*preexpansionBoundingRect*/
+ t[24].top}px` : "0px"
+ ), j(
+ e,
+ "--start-left",
+ /*preexpansionBoundingRect*/
+ t[24] ? `${/*preexpansionBoundingRect*/
+ t[24].left}px` : "0px"
+ ), j(
+ e,
+ "--start-width",
+ /*preexpansionBoundingRect*/
+ t[24] ? `${/*preexpansionBoundingRect*/
+ t[24].width}px` : "0px"
+ ), j(
+ e,
+ "--start-height",
+ /*preexpansionBoundingRect*/
+ t[24] ? `${/*preexpansionBoundingRect*/
+ t[24].height}px` : "0px"
+ ), j(
+ e,
+ "width",
+ /*fullscreen*/
+ t[0] ? void 0 : typeof /*width*/
+ t[5] == "number" ? `calc(min(${/*width*/
+ t[5]}px, 100%))` : (
+ /*get_dimension*/
+ t[26](
+ /*width*/
+ t[5]
+ )
+ )
+ ), j(
+ e,
+ "border-style",
+ /*variant*/
+ t[8]
+ ), j(
+ e,
+ "overflow",
+ /*allow_overflow*/
+ t[15] ? (
+ /*overflow_behavior*/
+ t[16]
+ ) : "hidden"
+ ), j(
+ e,
+ "flex-grow",
+ /*scale*/
+ t[17]
+ ), j(e, "min-width", `calc(min(${/*min_width*/
+ t[18]}px, 100%))`), j(e, "border-width", "var(--block-border-width)");
+ },
+ m(h, d) {
+ Qt(h, e, d), o && o.m(e, null), Ni(e, n), s && s.m(e, null), t[32](e), l = !0;
+ },
+ p(h, d) {
+ var D;
+ o && o.p && (!l || d[0] & /*$$scope*/
+ 1073741824) && Uu(
+ o,
+ a,
+ h,
+ /*$$scope*/
+ h[30],
+ l ? Nu(
+ a,
+ /*$$scope*/
+ h[30],
+ d,
+ null
+ ) : Pu(
+ /*$$scope*/
+ h[30]
+ ),
+ null
+ ), /*resizable*/
+ h[19] ? s ? s.p(h, d) : (s = Nr(h), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Pr(
+ /*tag*/
+ h[25]
+ )(e, c = Ou(u, [
+ (!l || d[0] & /*test_id*/
+ 2048) && { "data-testid": (
+ /*test_id*/
+ h[11]
+ ) },
+ (!l || d[0] & /*elem_id*/
+ 64) && { id: (
+ /*elem_id*/
+ h[6]
+ ) },
+ (!l || d[0] & /*elem_classes*/
+ 128 && i !== (i = "block " + /*elem_classes*/
+ (((D = h[7]) == null ? void 0 : D.join(" ")) || "") + " svelte-239wnu")) && { class: i },
+ (!l || d[0] & /*rtl*/
+ 1048576 && r !== (r = /*rtl*/
+ h[20] ? "rtl" : "ltr")) && { dir: r }
+ ])), ae(
+ e,
+ "hidden",
+ /*visible*/
+ h[14] === !1
+ ), ae(
+ e,
+ "padded",
+ /*padding*/
+ h[10]
+ ), ae(
+ e,
+ "flex",
+ /*flex*/
+ h[1]
+ ), ae(
+ e,
+ "border_focus",
+ /*border_mode*/
+ h[9] === "focus"
+ ), ae(
+ e,
+ "border_contrast",
+ /*border_mode*/
+ h[9] === "contrast"
+ ), ae(e, "hide-container", !/*explicit_call*/
+ h[12] && !/*container*/
+ h[13]), ae(
+ e,
+ "fullscreen",
+ /*fullscreen*/
+ h[0]
+ ), ae(
+ e,
+ "animating",
+ /*fullscreen*/
+ h[0] && /*preexpansionBoundingRect*/
+ h[24] !== null
+ ), ae(
+ e,
+ "auto-margin",
+ /*scale*/
+ h[17] === null
+ ), d[0] & /*fullscreen, height*/
+ 5 && j(
+ e,
+ "height",
+ /*fullscreen*/
+ h[0] ? void 0 : (
+ /*get_dimension*/
+ h[26](
+ /*height*/
+ h[2]
+ )
+ )
+ ), d[0] & /*fullscreen, min_height*/
+ 9 && j(
+ e,
+ "min-height",
+ /*fullscreen*/
+ h[0] ? void 0 : (
+ /*get_dimension*/
+ h[26](
+ /*min_height*/
+ h[3]
+ )
+ )
+ ), d[0] & /*fullscreen, max_height*/
+ 17 && j(
+ e,
+ "max-height",
+ /*fullscreen*/
+ h[0] ? void 0 : (
+ /*get_dimension*/
+ h[26](
+ /*max_height*/
+ h[4]
+ )
+ )
+ ), d[0] & /*preexpansionBoundingRect*/
+ 16777216 && j(
+ e,
+ "--start-top",
+ /*preexpansionBoundingRect*/
+ h[24] ? `${/*preexpansionBoundingRect*/
+ h[24].top}px` : "0px"
+ ), d[0] & /*preexpansionBoundingRect*/
+ 16777216 && j(
+ e,
+ "--start-left",
+ /*preexpansionBoundingRect*/
+ h[24] ? `${/*preexpansionBoundingRect*/
+ h[24].left}px` : "0px"
+ ), d[0] & /*preexpansionBoundingRect*/
+ 16777216 && j(
+ e,
+ "--start-width",
+ /*preexpansionBoundingRect*/
+ h[24] ? `${/*preexpansionBoundingRect*/
+ h[24].width}px` : "0px"
+ ), d[0] & /*preexpansionBoundingRect*/
+ 16777216 && j(
+ e,
+ "--start-height",
+ /*preexpansionBoundingRect*/
+ h[24] ? `${/*preexpansionBoundingRect*/
+ h[24].height}px` : "0px"
+ ), d[0] & /*fullscreen, width*/
+ 33 && j(
+ e,
+ "width",
+ /*fullscreen*/
+ h[0] ? void 0 : typeof /*width*/
+ h[5] == "number" ? `calc(min(${/*width*/
+ h[5]}px, 100%))` : (
+ /*get_dimension*/
+ h[26](
+ /*width*/
+ h[5]
+ )
+ )
+ ), d[0] & /*variant*/
+ 256 && j(
+ e,
+ "border-style",
+ /*variant*/
+ h[8]
+ ), d[0] & /*allow_overflow, overflow_behavior*/
+ 98304 && j(
+ e,
+ "overflow",
+ /*allow_overflow*/
+ h[15] ? (
+ /*overflow_behavior*/
+ h[16]
+ ) : "hidden"
+ ), d[0] & /*scale*/
+ 131072 && j(
+ e,
+ "flex-grow",
+ /*scale*/
+ h[17]
+ ), d[0] & /*min_width*/
+ 262144 && j(e, "min-width", `calc(min(${/*min_width*/
+ h[18]}px, 100%))`);
+ },
+ i(h) {
+ l || (Ul(o, h), l = !0);
+ },
+ o(h) {
+ Gl(o, h), l = !1;
+ },
+ d(h) {
+ h && Ge(e), o && o.d(h), s && s.d(), t[32](null);
+ }
+ };
+}
+function Or(t) {
+ let e;
+ return {
+ c() {
+ e = ql("div"), this.h();
+ },
+ l(n) {
+ e = Rl(n, "DIV", { class: !0 }), Ut(e).forEach(Ge), this.h();
+ },
+ h() {
+ ue(e, "class", "placeholder svelte-239wnu"), j(
+ e,
+ "height",
+ /*placeholder_height*/
+ t[22] + "px"
+ ), j(
+ e,
+ "width",
+ /*placeholder_width*/
+ t[23] + "px"
+ );
+ },
+ m(n, i) {
+ Qt(n, e, i);
+ },
+ p(n, i) {
+ i[0] & /*placeholder_height*/
+ 4194304 && j(
+ e,
+ "height",
+ /*placeholder_height*/
+ n[22] + "px"
+ ), i[0] & /*placeholder_width*/
+ 8388608 && j(
+ e,
+ "width",
+ /*placeholder_width*/
+ n[23] + "px"
+ );
+ },
+ d(n) {
+ n && Ge(e);
+ }
+ };
+}
+function ju(t) {
+ let e, n, i, r = (
+ /*tag*/
+ t[25] && Gu(t)
+ ), l = (
+ /*fullscreen*/
+ t[0] && Or(t)
+ );
+ return {
+ c() {
+ r && r.c(), e = zl(), l && l.c(), n = Hr();
+ },
+ l(a) {
+ r && r.l(a), e = Ml(a), l && l.l(a), n = Hr();
+ },
+ m(a, o) {
+ r && r.m(a, o), Qt(a, e, o), l && l.m(a, o), Qt(a, n, o), i = !0;
+ },
+ p(a, o) {
+ /*tag*/
+ a[25] && r.p(a, o), /*fullscreen*/
+ a[0] ? l ? l.p(a, o) : (l = Or(a), l.c(), l.m(n.parentNode, n)) : l && (l.d(1), l = null);
+ },
+ i(a) {
+ i || (Ul(r, a), i = !0);
+ },
+ o(a) {
+ Gl(r, a), i = !1;
+ },
+ d(a) {
+ a && (Ge(e), Ge(n)), r && r.d(a), l && l.d(a);
+ }
+ };
+}
+function Vu(t, e, n) {
+ let { $$slots: i = {}, $$scope: r } = e, { height: l = void 0 } = e, { min_height: a = void 0 } = e, { max_height: o = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: _ = "solid" } = e, { border_mode: h = "base" } = e, { padding: d = !0 } = e, { type: D = "normal" } = e, { test_id: E = void 0 } = e, { explicit_call: F = !1 } = e, { container: C = !0 } = e, { visible: g = !0 } = e, { allow_overflow: f = !0 } = e, { overflow_behavior: m = "auto" } = e, { scale: v = null } = e, { min_width: p = 0 } = e, { flex: b = !1 } = e, { resizable: k = !1 } = e, { rtl: y = !1 } = e, { fullscreen: w = !1 } = e, A = w, B, N = D === "fieldset" ? "fieldset" : "div", L = 0, R = 0, M = null;
+ function J(x) {
+ w && x.key === "Escape" && n(0, w = !1);
+ }
+ const V = (x) => {
+ if (x !== void 0) {
+ if (typeof x == "number")
+ return x + "px";
+ if (typeof x == "string")
+ return x;
+ }
+ }, T = (x) => {
+ let te = x.clientY;
+ const pe = (I) => {
+ const Re = I.clientY - te;
+ te = I.clientY, n(21, B.style.height = `${B.offsetHeight + Re}px`, B);
+ }, $ = () => {
+ window.removeEventListener("mousemove", pe), window.removeEventListener("mouseup", $);
+ };
+ window.addEventListener("mousemove", pe), window.addEventListener("mouseup", $);
+ };
+ function ee(x) {
+ Lu[x ? "unshift" : "push"](() => {
+ B = x, n(21, B);
+ });
+ }
+ return t.$$set = (x) => {
+ "height" in x && n(2, l = x.height), "min_height" in x && n(3, a = x.min_height), "max_height" in x && n(4, o = x.max_height), "width" in x && n(5, s = x.width), "elem_id" in x && n(6, u = x.elem_id), "elem_classes" in x && n(7, c = x.elem_classes), "variant" in x && n(8, _ = x.variant), "border_mode" in x && n(9, h = x.border_mode), "padding" in x && n(10, d = x.padding), "type" in x && n(28, D = x.type), "test_id" in x && n(11, E = x.test_id), "explicit_call" in x && n(12, F = x.explicit_call), "container" in x && n(13, C = x.container), "visible" in x && n(14, g = x.visible), "allow_overflow" in x && n(15, f = x.allow_overflow), "overflow_behavior" in x && n(16, m = x.overflow_behavior), "scale" in x && n(17, v = x.scale), "min_width" in x && n(18, p = x.min_width), "flex" in x && n(1, b = x.flex), "resizable" in x && n(19, k = x.resizable), "rtl" in x && n(20, y = x.rtl), "fullscreen" in x && n(0, w = x.fullscreen), "$$scope" in x && n(30, r = x.$$scope);
+ }, t.$$.update = () => {
+ t.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/
+ 538968065 && w !== A && (n(29, A = w), w ? (n(24, M = B.getBoundingClientRect()), n(22, L = B.offsetHeight), n(23, R = B.offsetWidth), window.addEventListener("keydown", J)) : (n(24, M = null), window.removeEventListener("keydown", J))), t.$$.dirty[0] & /*visible*/
+ 16384 && (g || n(1, b = !1));
+ }, [
+ w,
+ b,
+ l,
+ a,
+ o,
+ s,
+ u,
+ c,
+ _,
+ h,
+ d,
+ E,
+ F,
+ C,
+ g,
+ f,
+ m,
+ v,
+ p,
+ k,
+ y,
+ B,
+ L,
+ R,
+ M,
+ N,
+ V,
+ T,
+ D,
+ A,
+ r,
+ i,
+ ee
+ ];
+}
+class Xu extends Tu {
+ constructor(e) {
+ super(), Ru(
+ this,
+ e,
+ Vu,
+ ju,
+ zu,
+ {
+ height: 2,
+ min_height: 3,
+ max_height: 4,
+ width: 5,
+ elem_id: 6,
+ elem_classes: 7,
+ variant: 8,
+ border_mode: 9,
+ padding: 10,
+ type: 28,
+ test_id: 11,
+ explicit_call: 12,
+ container: 13,
+ visible: 14,
+ allow_overflow: 15,
+ overflow_behavior: 16,
+ scale: 17,
+ min_width: 18,
+ flex: 1,
+ resizable: 19,
+ rtl: 20,
+ fullscreen: 0
+ },
+ null,
+ [-1, -1]
+ );
+ }
+}
+function ir() {
+ return {
+ async: !1,
+ breaks: !1,
+ extensions: null,
+ gfm: !0,
+ hooks: null,
+ pedantic: !1,
+ renderer: null,
+ silent: !1,
+ tokenizer: null,
+ walkTokens: null
+ };
+}
+let mt = ir();
+function jl(t) {
+ mt = t;
+}
+const Vl = /[&<>"']/, Zu = new RegExp(Vl.source, "g"), Xl = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, Wu = new RegExp(Xl.source, "g"), Qu = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'"
+}, Rr = (t) => Qu[t];
+function ve(t, e) {
+ if (e) {
+ if (Vl.test(t))
+ return t.replace(Zu, Rr);
+ } else if (Xl.test(t))
+ return t.replace(Wu, Rr);
+ return t;
+}
+const Yu = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
+function Ju(t) {
+ return t.replace(Yu, (e, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
+}
+const Ku = /(^|[^\[])\^/g;
+function W(t, e) {
+ let n = typeof t == "string" ? t : t.source;
+ e = e || "";
+ const i = {
+ replace: (r, l) => {
+ let a = typeof l == "string" ? l : l.source;
+ return a = a.replace(Ku, "$1"), n = n.replace(r, a), i;
+ },
+ getRegex: () => new RegExp(n, e)
+ };
+ return i;
+}
+function Mr(t) {
+ try {
+ t = encodeURI(t).replace(/%25/g, "%");
+ } catch {
+ return null;
+ }
+ return t;
+}
+const Gt = { exec: () => null };
+function qr(t, e) {
+ const n = t.replace(/\|/g, (l, a, o) => {
+ let s = !1, u = a;
+ for (; --u >= 0 && o[u] === "\\"; )
+ s = !s;
+ return s ? "|" : " |";
+ }), i = n.split(/ \|/);
+ let r = 0;
+ if (i[0].trim() || i.shift(), i.length > 0 && !i[i.length - 1].trim() && i.pop(), e)
+ if (i.length > e)
+ i.splice(e);
+ else
+ for (; i.length < e; )
+ i.push("");
+ for (; r < i.length; r++)
+ i[r] = i[r].trim().replace(/\\\|/g, "|");
+ return i;
+}
+function _n(t, e, n) {
+ const i = t.length;
+ if (i === 0)
+ return "";
+ let r = 0;
+ for (; r < i && t.charAt(i - r - 1) === e; )
+ r++;
+ return t.slice(0, i - r);
+}
+function ec(t, e) {
+ if (t.indexOf(e[1]) === -1)
+ return -1;
+ let n = 0;
+ for (let i = 0; i < t.length; i++)
+ if (t[i] === "\\")
+ i++;
+ else if (t[i] === e[0])
+ n++;
+ else if (t[i] === e[1] && (n--, n < 0))
+ return i;
+ return -1;
+}
+function zr(t, e, n, i) {
+ const r = e.href, l = e.title ? ve(e.title) : null, a = t[1].replace(/\\([\[\]])/g, "$1");
+ if (t[0].charAt(0) !== "!") {
+ i.state.inLink = !0;
+ const o = {
+ type: "link",
+ raw: n,
+ href: r,
+ title: l,
+ text: a,
+ tokens: i.inlineTokens(a)
+ };
+ return i.state.inLink = !1, o;
+ }
+ return {
+ type: "image",
+ raw: n,
+ href: r,
+ title: l,
+ text: ve(a)
+ };
+}
+function tc(t, e) {
+ const n = t.match(/^(\s+)(?:```)/);
+ if (n === null)
+ return e;
+ const i = n[1];
+ return e.split(`
+`).map((r) => {
+ const l = r.match(/^\s+/);
+ if (l === null)
+ return r;
+ const [a] = l;
+ return a.length >= i.length ? r.slice(i.length) : r;
+ }).join(`
+`);
+}
+class Ln {
+ // set by the lexer
+ constructor(e) {
+ Y(this, "options");
+ Y(this, "rules");
+ // set by the lexer
+ Y(this, "lexer");
+ this.options = e || mt;
+ }
+ space(e) {
+ const n = this.rules.block.newline.exec(e);
+ if (n && n[0].length > 0)
+ return {
+ type: "space",
+ raw: n[0]
+ };
+ }
+ code(e) {
+ const n = this.rules.block.code.exec(e);
+ if (n) {
+ const i = n[0].replace(/^ {1,4}/gm, "");
+ return {
+ type: "code",
+ raw: n[0],
+ codeBlockStyle: "indented",
+ text: this.options.pedantic ? i : _n(i, `
+`)
+ };
+ }
+ }
+ fences(e) {
+ const n = this.rules.block.fences.exec(e);
+ if (n) {
+ const i = n[0], r = tc(i, n[3] || "");
+ return {
+ type: "code",
+ raw: i,
+ lang: n[2] ? n[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : n[2],
+ text: r
+ };
+ }
+ }
+ heading(e) {
+ const n = this.rules.block.heading.exec(e);
+ if (n) {
+ let i = n[2].trim();
+ if (/#$/.test(i)) {
+ const r = _n(i, "#");
+ (this.options.pedantic || !r || / $/.test(r)) && (i = r.trim());
+ }
+ return {
+ type: "heading",
+ raw: n[0],
+ depth: n[1].length,
+ text: i,
+ tokens: this.lexer.inline(i)
+ };
+ }
+ }
+ hr(e) {
+ const n = this.rules.block.hr.exec(e);
+ if (n)
+ return {
+ type: "hr",
+ raw: n[0]
+ };
+ }
+ blockquote(e) {
+ const n = this.rules.block.blockquote.exec(e);
+ if (n) {
+ let i = n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
+ $1`);
+ i = _n(i.replace(/^ *>[ \t]?/gm, ""), `
+`);
+ const r = this.lexer.state.top;
+ this.lexer.state.top = !0;
+ const l = this.lexer.blockTokens(i);
+ return this.lexer.state.top = r, {
+ type: "blockquote",
+ raw: n[0],
+ tokens: l,
+ text: i
+ };
+ }
+ }
+ list(e) {
+ let n = this.rules.block.list.exec(e);
+ if (n) {
+ let i = n[1].trim();
+ const r = i.length > 1, l = {
+ type: "list",
+ raw: "",
+ ordered: r,
+ start: r ? +i.slice(0, -1) : "",
+ loose: !1,
+ items: []
+ };
+ i = r ? `\\d{1,9}\\${i.slice(-1)}` : `\\${i}`, this.options.pedantic && (i = r ? i : "[*+-]");
+ const a = new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);
+ let o = "", s = "", u = !1;
+ for (; e; ) {
+ let c = !1;
+ if (!(n = a.exec(e)) || this.rules.block.hr.test(e))
+ break;
+ o = n[0], e = e.substring(o.length);
+ let _ = n[2].split(`
+`, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), h = e.split(`
+`, 1)[0], d = 0;
+ this.options.pedantic ? (d = 2, s = _.trimStart()) : (d = n[2].search(/[^ ]/), d = d > 4 ? 1 : d, s = _.slice(d), d += n[1].length);
+ let D = !1;
+ if (!_ && /^ *$/.test(h) && (o += h + `
+`, e = e.substring(h.length + 1), c = !0), !c) {
+ const C = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), g = new RegExp(`^ {0,${Math.min(3, d - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), f = new RegExp(`^ {0,${Math.min(3, d - 1)}}(?:\`\`\`|~~~)`), m = new RegExp(`^ {0,${Math.min(3, d - 1)}}#`);
+ for (; e; ) {
+ const v = e.split(`
+`, 1)[0];
+ if (h = v, this.options.pedantic && (h = h.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), f.test(h) || m.test(h) || C.test(h) || g.test(e))
+ break;
+ if (h.search(/[^ ]/) >= d || !h.trim())
+ s += `
+` + h.slice(d);
+ else {
+ if (D || _.search(/[^ ]/) >= 4 || f.test(_) || m.test(_) || g.test(_))
+ break;
+ s += `
+` + h;
+ }
+ !D && !h.trim() && (D = !0), o += v + `
+`, e = e.substring(v.length + 1), _ = h.slice(d);
+ }
+ }
+ l.loose || (u ? l.loose = !0 : /\n *\n *$/.test(o) && (u = !0));
+ let E = null, F;
+ this.options.gfm && (E = /^\[[ xX]\] /.exec(s), E && (F = E[0] !== "[ ] ", s = s.replace(/^\[[ xX]\] +/, ""))), l.items.push({
+ type: "list_item",
+ raw: o,
+ task: !!E,
+ checked: F,
+ loose: !1,
+ text: s,
+ tokens: []
+ }), l.raw += o;
+ }
+ l.items[l.items.length - 1].raw = o.trimEnd(), l.items[l.items.length - 1].text = s.trimEnd(), l.raw = l.raw.trimEnd();
+ for (let c = 0; c < l.items.length; c++)
+ if (this.lexer.state.top = !1, l.items[c].tokens = this.lexer.blockTokens(l.items[c].text, []), !l.loose) {
+ const _ = l.items[c].tokens.filter((d) => d.type === "space"), h = _.length > 0 && _.some((d) => /\n.*\n/.test(d.raw));
+ l.loose = h;
+ }
+ if (l.loose)
+ for (let c = 0; c < l.items.length; c++)
+ l.items[c].loose = !0;
+ return l;
+ }
+ }
+ html(e) {
+ const n = this.rules.block.html.exec(e);
+ if (n)
+ return {
+ type: "html",
+ block: !0,
+ raw: n[0],
+ pre: n[1] === "pre" || n[1] === "script" || n[1] === "style",
+ text: n[0]
+ };
+ }
+ def(e) {
+ const n = this.rules.block.def.exec(e);
+ if (n) {
+ const i = n[1].toLowerCase().replace(/\s+/g, " "), r = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", l = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : n[3];
+ return {
+ type: "def",
+ tag: i,
+ raw: n[0],
+ href: r,
+ title: l
+ };
+ }
+ }
+ table(e) {
+ const n = this.rules.block.table.exec(e);
+ if (!n || !/[:|]/.test(n[2]))
+ return;
+ const i = qr(n[1]), r = n[2].replace(/^\||\| *$/g, "").split("|"), l = n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
+`) : [], a = {
+ type: "table",
+ raw: n[0],
+ header: [],
+ align: [],
+ rows: []
+ };
+ if (i.length === r.length) {
+ for (const o of r)
+ /^ *-+: *$/.test(o) ? a.align.push("right") : /^ *:-+: *$/.test(o) ? a.align.push("center") : /^ *:-+ *$/.test(o) ? a.align.push("left") : a.align.push(null);
+ for (const o of i)
+ a.header.push({
+ text: o,
+ tokens: this.lexer.inline(o)
+ });
+ for (const o of l)
+ a.rows.push(qr(o, a.header.length).map((s) => ({
+ text: s,
+ tokens: this.lexer.inline(s)
+ })));
+ return a;
+ }
+ }
+ lheading(e) {
+ const n = this.rules.block.lheading.exec(e);
+ if (n)
+ return {
+ type: "heading",
+ raw: n[0],
+ depth: n[2].charAt(0) === "=" ? 1 : 2,
+ text: n[1],
+ tokens: this.lexer.inline(n[1])
+ };
+ }
+ paragraph(e) {
+ const n = this.rules.block.paragraph.exec(e);
+ if (n) {
+ const i = n[1].charAt(n[1].length - 1) === `
+` ? n[1].slice(0, -1) : n[1];
+ return {
+ type: "paragraph",
+ raw: n[0],
+ text: i,
+ tokens: this.lexer.inline(i)
+ };
+ }
+ }
+ text(e) {
+ const n = this.rules.block.text.exec(e);
+ if (n)
+ return {
+ type: "text",
+ raw: n[0],
+ text: n[0],
+ tokens: this.lexer.inline(n[0])
+ };
+ }
+ escape(e) {
+ const n = this.rules.inline.escape.exec(e);
+ if (n)
+ return {
+ type: "escape",
+ raw: n[0],
+ text: ve(n[1])
+ };
+ }
+ tag(e) {
+ const n = this.rules.inline.tag.exec(e);
+ if (n)
+ return !this.lexer.state.inLink && /^/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), {
+ type: "html",
+ raw: n[0],
+ inLink: this.lexer.state.inLink,
+ inRawBlock: this.lexer.state.inRawBlock,
+ block: !1,
+ text: n[0]
+ };
+ }
+ link(e) {
+ const n = this.rules.inline.link.exec(e);
+ if (n) {
+ const i = n[2].trim();
+ if (!this.options.pedantic && /^$/.test(i))
+ return;
+ const a = _n(i.slice(0, -1), "\\");
+ if ((i.length - a.length) % 2 === 0)
+ return;
+ } else {
+ const a = ec(n[2], "()");
+ if (a > -1) {
+ const s = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + a;
+ n[2] = n[2].substring(0, a), n[0] = n[0].substring(0, s).trim(), n[3] = "";
+ }
+ }
+ let r = n[2], l = "";
+ if (this.options.pedantic) {
+ const a = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);
+ a && (r = a[1], l = a[3]);
+ } else
+ l = n[3] ? n[3].slice(1, -1) : "";
+ return r = r.trim(), /^$/.test(i) ? r = r.slice(1) : r = r.slice(1, -1)), zr(n, {
+ href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
+ title: l && l.replace(this.rules.inline.anyPunctuation, "$1")
+ }, n[0], this.lexer);
+ }
+ }
+ reflink(e, n) {
+ let i;
+ if ((i = this.rules.inline.reflink.exec(e)) || (i = this.rules.inline.nolink.exec(e))) {
+ const r = (i[2] || i[1]).replace(/\s+/g, " "), l = n[r.toLowerCase()];
+ if (!l) {
+ const a = i[0].charAt(0);
+ return {
+ type: "text",
+ raw: a,
+ text: a
+ };
+ }
+ return zr(i, l, i[0], this.lexer);
+ }
+ }
+ emStrong(e, n, i = "") {
+ let r = this.rules.inline.emStrongLDelim.exec(e);
+ if (!r || r[3] && i.match(/[\p{L}\p{N}]/u))
+ return;
+ if (!(r[1] || r[2] || "") || !i || this.rules.inline.punctuation.exec(i)) {
+ const a = [...r[0]].length - 1;
+ let o, s, u = a, c = 0;
+ const _ = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
+ for (_.lastIndex = 0, n = n.slice(-1 * e.length + a); (r = _.exec(n)) != null; ) {
+ if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o)
+ continue;
+ if (s = [...o].length, r[3] || r[4]) {
+ u += s;
+ continue;
+ } else if ((r[5] || r[6]) && a % 3 && !((a + s) % 3)) {
+ c += s;
+ continue;
+ }
+ if (u -= s, u > 0)
+ continue;
+ s = Math.min(s, s + u + c);
+ const h = [...r[0]][0].length, d = e.slice(0, a + r.index + h + s);
+ if (Math.min(a, s) % 2) {
+ const E = d.slice(1, -1);
+ return {
+ type: "em",
+ raw: d,
+ text: E,
+ tokens: this.lexer.inlineTokens(E)
+ };
+ }
+ const D = d.slice(2, -2);
+ return {
+ type: "strong",
+ raw: d,
+ text: D,
+ tokens: this.lexer.inlineTokens(D)
+ };
+ }
+ }
+ }
+ codespan(e) {
+ const n = this.rules.inline.code.exec(e);
+ if (n) {
+ let i = n[2].replace(/\n/g, " ");
+ const r = /[^ ]/.test(i), l = /^ /.test(i) && / $/.test(i);
+ return r && l && (i = i.substring(1, i.length - 1)), i = ve(i, !0), {
+ type: "codespan",
+ raw: n[0],
+ text: i
+ };
+ }
+ }
+ br(e) {
+ const n = this.rules.inline.br.exec(e);
+ if (n)
+ return {
+ type: "br",
+ raw: n[0]
+ };
+ }
+ del(e) {
+ const n = this.rules.inline.del.exec(e);
+ if (n)
+ return {
+ type: "del",
+ raw: n[0],
+ text: n[2],
+ tokens: this.lexer.inlineTokens(n[2])
+ };
+ }
+ autolink(e) {
+ const n = this.rules.inline.autolink.exec(e);
+ if (n) {
+ let i, r;
+ return n[2] === "@" ? (i = ve(n[1]), r = "mailto:" + i) : (i = ve(n[1]), r = i), {
+ type: "link",
+ raw: n[0],
+ text: i,
+ href: r,
+ tokens: [
+ {
+ type: "text",
+ raw: i,
+ text: i
+ }
+ ]
+ };
+ }
+ }
+ url(e) {
+ var i;
+ let n;
+ if (n = this.rules.inline.url.exec(e)) {
+ let r, l;
+ if (n[2] === "@")
+ r = ve(n[0]), l = "mailto:" + r;
+ else {
+ let a;
+ do
+ a = n[0], n[0] = ((i = this.rules.inline._backpedal.exec(n[0])) == null ? void 0 : i[0]) ?? "";
+ while (a !== n[0]);
+ r = ve(n[0]), n[1] === "www." ? l = "http://" + n[0] : l = n[0];
+ }
+ return {
+ type: "link",
+ raw: n[0],
+ text: r,
+ href: l,
+ tokens: [
+ {
+ type: "text",
+ raw: r,
+ text: r
+ }
+ ]
+ };
+ }
+ }
+ inlineText(e) {
+ const n = this.rules.inline.text.exec(e);
+ if (n) {
+ let i;
+ return this.lexer.state.inRawBlock ? i = n[0] : i = ve(n[0]), {
+ type: "text",
+ raw: n[0],
+ text: i
+ };
+ }
+ }
+}
+const nc = /^(?: *(?:\n|$))+/, ic = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, rc = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, an = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ac = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Zl = /(?:[*+-]|\d{1,9}[.)])/, Wl = W(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Zl).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), rr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, lc = /^[^\n]+/, ar = /(?!\s*\])(?:\\.|[^\[\]\\])+/, oc = W(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ar).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), sc = W(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Zl).getRegex(), Qn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", lr = /|$))/, uc = W("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", lr).replace("tag", Qn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ql = W(rr).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), cc = W(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ql).getRegex(), or = {
+ blockquote: cc,
+ code: ic,
+ def: oc,
+ fences: rc,
+ heading: ac,
+ hr: an,
+ html: uc,
+ lheading: Wl,
+ list: sc,
+ newline: nc,
+ paragraph: Ql,
+ table: Gt,
+ text: lc
+}, Ur = W("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex(), hc = {
+ ...or,
+ table: Ur,
+ paragraph: W(rr).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ur).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qn).getRegex()
+}, fc = {
+ ...or,
+ html: W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", lr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
+ def: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
+ fences: Gt,
+ // fences not supported
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
+ paragraph: W(rr).replace("hr", an).replace("heading", ` *#{1,6} *[^
+]`).replace("lheading", Wl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
+}, Yl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, _c = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Jl = /^( {2,}|\\)\n(?!\s*$)/, dc = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, gc = W(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, ln).getRegex(), bc = W("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, ln).getRegex(), vc = W("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, ln).getRegex(), yc = W(/\\([punct])/, "gu").replace(/punct/g, ln).getRegex(), wc = W(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Dc = W(lr).replace("(?:-->|$)", "-->").getRegex(), Ec = W("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Dc).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Hn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Fc = W(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Hn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Kl = W(/^!?\[(label)\]\[(ref)\]/).replace("label", Hn).replace("ref", ar).getRegex(), eo = W(/^!?\[(ref)\](?:\[\])?/).replace("ref", ar).getRegex(), kc = W("reflink|nolink(?!\\()", "g").replace("reflink", Kl).replace("nolink", eo).getRegex(), sr = {
+ _backpedal: Gt,
+ // only used for GFM url
+ anyPunctuation: yc,
+ autolink: wc,
+ blockSkip: pc,
+ br: Jl,
+ code: _c,
+ del: Gt,
+ emStrongLDelim: gc,
+ emStrongRDelimAst: bc,
+ emStrongRDelimUnd: vc,
+ escape: Yl,
+ link: Fc,
+ nolink: eo,
+ punctuation: mc,
+ reflink: Kl,
+ reflinkSearch: kc,
+ tag: Ec,
+ text: dc,
+ url: Gt
+}, Ac = {
+ ...sr,
+ link: W(/^!?\[(label)\]\((.*?)\)/).replace("label", Hn).getRegex(),
+ reflink: W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Hn).getRegex()
+}, Oi = {
+ ...sr,
+ escape: W(Yl).replace("])", "~|])").getRegex(),
+ url: W(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
+ del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
+ text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ s + " ".repeat(u.length));
+ let i, r, l, a;
+ for (; e; )
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((o) => (i = o.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1))) {
+ if (i = this.tokenizer.space(e)) {
+ e = e.substring(i.raw.length), i.raw.length === 1 && n.length > 0 ? n[n.length - 1].raw += `
+` : n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.code(e)) {
+ e = e.substring(i.raw.length), r = n[n.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += `
+` + i.raw, r.text += `
+` + i.text, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.fences(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.heading(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.hr(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.blockquote(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.list(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.html(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.def(e)) {
+ e = e.substring(i.raw.length), r = n[n.length - 1], r && (r.type === "paragraph" || r.type === "text") ? (r.raw += `
+` + i.raw, r.text += `
+` + i.raw, this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = {
+ href: i.href,
+ title: i.title
+ });
+ continue;
+ }
+ if (i = this.tokenizer.table(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.lheading(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (l = e, this.options.extensions && this.options.extensions.startBlock) {
+ let o = 1 / 0;
+ const s = e.slice(1);
+ let u;
+ this.options.extensions.startBlock.forEach((c) => {
+ u = c.call({ lexer: this }, s), typeof u == "number" && u >= 0 && (o = Math.min(o, u));
+ }), o < 1 / 0 && o >= 0 && (l = e.substring(0, o + 1));
+ }
+ if (this.state.top && (i = this.tokenizer.paragraph(l))) {
+ r = n[n.length - 1], a && r.type === "paragraph" ? (r.raw += `
+` + i.raw, r.text += `
+` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i), a = l.length !== e.length, e = e.substring(i.raw.length);
+ continue;
+ }
+ if (i = this.tokenizer.text(e)) {
+ e = e.substring(i.raw.length), r = n[n.length - 1], r && r.type === "text" ? (r.raw += `
+` + i.raw, r.text += `
+` + i.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = r.text) : n.push(i);
+ continue;
+ }
+ if (e) {
+ const o = "Infinite loop on byte: " + e.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(o);
+ break;
+ } else
+ throw new Error(o);
+ }
+ }
+ return this.state.top = !0, n;
+ }
+ inline(e, n = []) {
+ return this.inlineQueue.push({ src: e, tokens: n }), n;
+ }
+ /**
+ * Lexing/Compiling
+ */
+ inlineTokens(e, n = []) {
+ let i, r, l, a = e, o, s, u;
+ if (this.tokens.links) {
+ const c = Object.keys(this.tokens.links);
+ if (c.length > 0)
+ for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; )
+ c.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
+ }
+ for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; )
+ a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
+ for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; )
+ a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
+ for (; e; )
+ if (s || (u = ""), s = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (i = c.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1))) {
+ if (i = this.tokenizer.escape(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.tag(e)) {
+ e = e.substring(i.raw.length), r = n[n.length - 1], r && i.type === "text" && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.link(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.reflink(e, this.tokens.links)) {
+ e = e.substring(i.raw.length), r = n[n.length - 1], r && i.type === "text" && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.emStrong(e, a, u)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.codespan(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.br(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.del(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (i = this.tokenizer.autolink(e)) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (!this.state.inLink && (i = this.tokenizer.url(e))) {
+ e = e.substring(i.raw.length), n.push(i);
+ continue;
+ }
+ if (l = e, this.options.extensions && this.options.extensions.startInline) {
+ let c = 1 / 0;
+ const _ = e.slice(1);
+ let h;
+ this.options.extensions.startInline.forEach((d) => {
+ h = d.call({ lexer: this }, _), typeof h == "number" && h >= 0 && (c = Math.min(c, h));
+ }), c < 1 / 0 && c >= 0 && (l = e.substring(0, c + 1));
+ }
+ if (i = this.tokenizer.inlineText(l)) {
+ e = e.substring(i.raw.length), i.raw.slice(-1) !== "_" && (u = i.raw.slice(-1)), s = !0, r = n[n.length - 1], r && r.type === "text" ? (r.raw += i.raw, r.text += i.text) : n.push(i);
+ continue;
+ }
+ if (e) {
+ const c = "Infinite loop on byte: " + e.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(c);
+ break;
+ } else
+ throw new Error(c);
+ }
+ }
+ return n;
+ }
+}
+class Pn {
+ constructor(e) {
+ Y(this, "options");
+ this.options = e || mt;
+ }
+ code(e, n, i) {
+ var l;
+ const r = (l = (n || "").match(/^\S*/)) == null ? void 0 : l[0];
+ return e = e.replace(/\n$/, "") + `
+`, r ? '