@claudebernard/prescription-alerts-element
Version:
An element providing some custom stuff.
5,179 lines • 310 kB
JavaScript
var _a;
import "@claudebernard/design-system";
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t$2 = globalThis, e$5 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$3 = Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
let n$3 = class n {
constructor(t2, e2, o2) {
if (this._$cssResult$ = true, o2 !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t2, this.t = e2;
}
get styleSheet() {
let t2 = this.o;
const s2 = this.t;
if (e$5 && void 0 === t2) {
const e2 = void 0 !== s2 && 1 === s2.length;
e2 && (t2 = o$4.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$4.set(s2, t2));
}
return t2;
}
toString() {
return this.cssText;
}
};
const r$5 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$3), i$5 = (t2, ...e2) => {
const o2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, o3) => e3 + ((t3) => {
if (true === t3._$cssResult$) return t3.cssText;
if ("number" == typeof t3) return t3;
throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
})(s2) + t2[o3 + 1], t2[0]);
return new n$3(o2, t2, s$3);
}, S$1 = (s2, o2) => {
if (e$5) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
else for (const e2 of o2) {
const o3 = document.createElement("style"), n3 = t$2.litNonce;
void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
}
}, c$2 = e$5 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
let e2 = "";
for (const s2 of t3.cssRules) e2 += s2.cssText;
return r$5(e2);
})(t2) : t2;
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const { is: i$4, defineProperty: e$4, getOwnPropertyDescriptor: h$2, getOwnPropertyNames: r$4, getOwnPropertySymbols: o$3, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
switch (s2) {
case Boolean:
t2 = t2 ? l$1 : null;
break;
case Object:
case Array:
t2 = null == t2 ? t2 : JSON.stringify(t2);
}
return t2;
}, fromAttribute(t2, s2) {
let i3 = t2;
switch (s2) {
case Boolean:
i3 = null !== t2;
break;
case Number:
i3 = null === t2 ? null : Number(t2);
break;
case Object:
case Array:
try {
i3 = JSON.parse(t2);
} catch (t3) {
i3 = null;
}
}
return i3;
} }, f$1 = (t2, s2) => !i$4(t2, s2), b$1 = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a$1.litPropertyMetadata ?? (a$1.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
let y$1 = class y extends HTMLElement {
static addInitializer(t2) {
this._$Ei(), (this.l ?? (this.l = [])).push(t2);
}
static get observedAttributes() {
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
}
static createProperty(t2, s2 = b$1) {
if (s2.state && (s2.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t2) && ((s2 = Object.create(s2)).wrapped = true), this.elementProperties.set(t2, s2), !s2.noAccessor) {
const i3 = Symbol(), h2 = this.getPropertyDescriptor(t2, i3, s2);
void 0 !== h2 && e$4(this.prototype, t2, h2);
}
}
static getPropertyDescriptor(t2, s2, i3) {
const { get: e2, set: r2 } = h$2(this.prototype, t2) ?? { get() {
return this[s2];
}, set(t3) {
this[s2] = t3;
} };
return { get: e2, set(s3) {
const h2 = e2 == null ? void 0 : e2.call(this);
r2 == null ? void 0 : r2.call(this, s3), this.requestUpdate(t2, h2, i3);
}, configurable: true, enumerable: true };
}
static getPropertyOptions(t2) {
return this.elementProperties.get(t2) ?? b$1;
}
static _$Ei() {
if (this.hasOwnProperty(d$1("elementProperties"))) return;
const t2 = n$2(this);
t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(d$1("finalized"))) return;
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
const t3 = this.properties, s2 = [...r$4(t3), ...o$3(t3)];
for (const i3 of s2) this.createProperty(i3, t3[i3]);
}
const t2 = this[Symbol.metadata];
if (null !== t2) {
const s2 = litPropertyMetadata.get(t2);
if (void 0 !== s2) for (const [t3, i3] of s2) this.elementProperties.set(t3, i3);
}
this._$Eh = /* @__PURE__ */ new Map();
for (const [t3, s2] of this.elementProperties) {
const i3 = this._$Eu(t3, s2);
void 0 !== i3 && this._$Eh.set(i3, t3);
}
this.elementStyles = this.finalizeStyles(this.styles);
}
static finalizeStyles(s2) {
const i3 = [];
if (Array.isArray(s2)) {
const e2 = new Set(s2.flat(1 / 0).reverse());
for (const s3 of e2) i3.unshift(c$2(s3));
} else void 0 !== s2 && i3.push(c$2(s2));
return i3;
}
static _$Eu(t2, s2) {
const i3 = s2.attribute;
return false === i3 ? void 0 : "string" == typeof i3 ? i3 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
}
constructor() {
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
}
_$Ev() {
var _a2;
this._$ES = new Promise((t2) => this.enableUpdating = t2), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (_a2 = this.constructor.l) == null ? void 0 : _a2.forEach((t2) => t2(this));
}
addController(t2) {
var _a2;
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t2), void 0 !== this.renderRoot && this.isConnected && ((_a2 = t2.hostConnected) == null ? void 0 : _a2.call(t2));
}
removeController(t2) {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.delete(t2);
}
_$E_() {
const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
for (const i3 of s2.keys()) this.hasOwnProperty(i3) && (t2.set(i3, this[i3]), delete this[i3]);
t2.size > 0 && (this._$Ep = t2);
}
createRenderRoot() {
const t2 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return S$1(t2, this.constructor.elementStyles), t2;
}
connectedCallback() {
var _a2;
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (_a2 = this._$EO) == null ? void 0 : _a2.forEach((t2) => {
var _a3;
return (_a3 = t2.hostConnected) == null ? void 0 : _a3.call(t2);
});
}
enableUpdating(t2) {
}
disconnectedCallback() {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.forEach((t2) => {
var _a3;
return (_a3 = t2.hostDisconnected) == null ? void 0 : _a3.call(t2);
});
}
attributeChangedCallback(t2, s2, i3) {
this._$AK(t2, i3);
}
_$ET(t2, s2) {
var _a2;
const i3 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i3);
if (void 0 !== e2 && true === i3.reflect) {
const h2 = (void 0 !== ((_a2 = i3.converter) == null ? void 0 : _a2.toAttribute) ? i3.converter : u$1).toAttribute(s2, i3.type);
this._$Em = t2, null == h2 ? this.removeAttribute(e2) : this.setAttribute(e2, h2), this._$Em = null;
}
}
_$AK(t2, s2) {
var _a2, _b;
const i3 = this.constructor, e2 = i3._$Eh.get(t2);
if (void 0 !== e2 && this._$Em !== e2) {
const t3 = i3.getPropertyOptions(e2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== ((_a2 = t3.converter) == null ? void 0 : _a2.fromAttribute) ? t3.converter : u$1;
this._$Em = e2;
const r2 = h2.fromAttribute(s2, t3.type);
this[e2] = r2 ?? ((_b = this._$Ej) == null ? void 0 : _b.get(e2)) ?? r2, this._$Em = null;
}
}
requestUpdate(t2, s2, i3, e2 = false, h2) {
var _a2;
if (void 0 !== t2) {
const r2 = this.constructor;
if (false === e2 && (h2 = this[t2]), i3 ?? (i3 = r2.getPropertyOptions(t2)), !((i3.hasChanged ?? f$1)(h2, s2) || i3.useDefault && i3.reflect && h2 === ((_a2 = this._$Ej) == null ? void 0 : _a2.get(t2)) && !this.hasAttribute(r2._$Eu(t2, i3)))) return;
this.C(t2, s2, i3);
}
false === this.isUpdatePending && (this._$ES = this._$EP());
}
C(t2, s2, { useDefault: i3, reflect: e2, wrapped: h2 }, r2) {
i3 && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t2) && (this._$Ej.set(t2, r2 ?? s2 ?? this[t2]), true !== h2 || void 0 !== r2) || (this._$AL.has(t2) || (this.hasUpdated || i3 || (s2 = void 0), this._$AL.set(t2, s2)), true === e2 && this._$Em !== t2 && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t2));
}
async _$EP() {
this.isUpdatePending = true;
try {
await this._$ES;
} catch (t3) {
Promise.reject(t3);
}
const t2 = this.scheduleUpdate();
return null != t2 && await t2, !this.isUpdatePending;
}
scheduleUpdate() {
return this.performUpdate();
}
performUpdate() {
var _a2;
if (!this.isUpdatePending) return;
if (!this.hasUpdated) {
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
for (const [t4, s3] of this._$Ep) this[t4] = s3;
this._$Ep = void 0;
}
const t3 = this.constructor.elementProperties;
if (t3.size > 0) for (const [s3, i3] of t3) {
const { wrapped: t4 } = i3, e2 = this[s3];
true !== t4 || this._$AL.has(s3) || void 0 === e2 || this.C(s3, void 0, i3, e2);
}
}
let t2 = false;
const s2 = this._$AL;
try {
t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), (_a2 = this._$EO) == null ? void 0 : _a2.forEach((t3) => {
var _a3;
return (_a3 = t3.hostUpdate) == null ? void 0 : _a3.call(t3);
}), this.update(s2)) : this._$EM();
} catch (s3) {
throw t2 = false, this._$EM(), s3;
}
t2 && this._$AE(s2);
}
willUpdate(t2) {
}
_$AE(t2) {
var _a2;
(_a2 = this._$EO) == null ? void 0 : _a2.forEach((t3) => {
var _a3;
return (_a3 = t3.hostUpdated) == null ? void 0 : _a3.call(t3);
}), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
}
_$EM() {
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
}
get updateComplete() {
return this.getUpdateComplete();
}
getUpdateComplete() {
return this._$ES;
}
shouldUpdate(t2) {
return true;
}
update(t2) {
this._$Eq && (this._$Eq = this._$Eq.forEach((t3) => this._$ET(t3, this[t3]))), this._$EM();
}
updated(t2) {
}
firstUpdated(t2) {
}
};
y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ?? (a$1.reactiveElementVersions = [])).push("2.1.2");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t$1 = globalThis, i$3 = (t2) => t2, s$2 = t$1.trustedTypes, e$3 = s$2 ? s$2.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h$1 = "$lit$", o$2 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$1 = "?" + o$2, r$3 = `<${n$1}>`, l = document, c = () => l.createComment(""), a = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u = Array.isArray, d = (t2) => u(t2) || "function" == typeof (t2 == null ? void 0 : t2[Symbol.iterator]), f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y2 = /^(?:script|style|textarea|title)$/i, x = (t2) => (i3, ...s2) => ({ _$litType$: t2, strings: i3, values: s2 }), b = x(1), E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
function V(t2, i3) {
if (!u(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
return void 0 !== e$3 ? e$3.createHTML(i3) : i3;
}
const N = (t2, i3) => {
const s2 = t2.length - 1, e2 = [];
let n3, l2 = 2 === i3 ? "<svg>" : 3 === i3 ? "<math>" : "", c2 = v;
for (let i4 = 0; i4 < s2; i4++) {
const s3 = t2[i4];
let a2, u2, d2 = -1, f2 = 0;
for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m : void 0 !== u2[2] ? (y2.test(u2[2]) && (n3 = RegExp("</" + u2[2], "g")), c2 = p) : void 0 !== u2[3] && (c2 = p) : c2 === p ? ">" === u2[0] ? (c2 = n3 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p : c2 === _ || c2 === m ? c2 = v : (c2 = p, n3 = void 0);
const x2 = c2 === p && t2[i4 + 1].startsWith("/>") ? " " : "";
l2 += c2 === v ? s3 + r$3 : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h$1 + s3.slice(d2) + o$2 + x2) : s3 + o$2 + (-2 === d2 ? i4 : x2);
}
return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i3 ? "</svg>" : 3 === i3 ? "</math>" : "")), e2];
};
class S {
constructor({ strings: t2, _$litType$: i3 }, e2) {
let r2;
this.parts = [];
let l2 = 0, a2 = 0;
const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i3);
if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i3 || 3 === i3) {
const t3 = this.el.content.firstChild;
t3.replaceWith(...t3.childNodes);
}
for (; null !== (r2 = P.nextNode()) && d2.length < u2; ) {
if (1 === r2.nodeType) {
if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(h$1)) {
const i4 = v2[a2++], s2 = r2.getAttribute(t3).split(o$2), e3 = /([.?@])?(.*)/.exec(i4);
d2.push({ type: 1, index: l2, name: e3[2], strings: s2, ctor: "." === e3[1] ? I : "?" === e3[1] ? L : "@" === e3[1] ? z : H }), r2.removeAttribute(t3);
} else t3.startsWith(o$2) && (d2.push({ type: 6, index: l2 }), r2.removeAttribute(t3));
if (y2.test(r2.tagName)) {
const t3 = r2.textContent.split(o$2), i4 = t3.length - 1;
if (i4 > 0) {
r2.textContent = s$2 ? s$2.emptyScript : "";
for (let s2 = 0; s2 < i4; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
r2.append(t3[i4], c());
}
}
} else if (8 === r2.nodeType) if (r2.data === n$1) d2.push({ type: 2, index: l2 });
else {
let t3 = -1;
for (; -1 !== (t3 = r2.data.indexOf(o$2, t3 + 1)); ) d2.push({ type: 7, index: l2 }), t3 += o$2.length - 1;
}
l2++;
}
}
static createElement(t2, i3) {
const s2 = l.createElement("template");
return s2.innerHTML = t2, s2;
}
}
function M(t2, i3, s2 = t2, e2) {
var _a2, _b;
if (i3 === E) return i3;
let h2 = void 0 !== e2 ? (_a2 = s2._$Co) == null ? void 0 : _a2[e2] : s2._$Cl;
const o2 = a(i3) ? void 0 : i3._$litDirective$;
return (h2 == null ? void 0 : h2.constructor) !== o2 && ((_b = h2 == null ? void 0 : h2._$AO) == null ? void 0 : _b.call(h2, false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ?? (s2._$Co = []))[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i3 = M(t2, h2._$AS(t2, i3.values), h2, e2)), i3;
}
class R {
constructor(t2, i3) {
this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i3;
}
get parentNode() {
return this._$AM.parentNode;
}
get _$AU() {
return this._$AM._$AU;
}
u(t2) {
const { el: { content: i3 }, parts: s2 } = this._$AD, e2 = ((t2 == null ? void 0 : t2.creationScope) ?? l).importNode(i3, true);
P.currentNode = e2;
let h2 = P.nextNode(), o2 = 0, n3 = 0, r2 = s2[0];
for (; void 0 !== r2; ) {
if (o2 === r2.index) {
let i4;
2 === r2.type ? i4 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i4 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i4 = new Z(h2, this, t2)), this._$AV.push(i4), r2 = s2[++n3];
}
o2 !== (r2 == null ? void 0 : r2.index) && (h2 = P.nextNode(), o2++);
}
return P.currentNode = l, e2;
}
p(t2) {
let i3 = 0;
for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i3), i3 += s2.strings.length - 2) : s2._$AI(t2[i3])), i3++;
}
}
class k {
get _$AU() {
var _a2;
return ((_a2 = this._$AM) == null ? void 0 : _a2._$AU) ?? this._$Cv;
}
constructor(t2, i3, s2, e2) {
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i3, this._$AM = s2, this.options = e2, this._$Cv = (e2 == null ? void 0 : e2.isConnected) ?? true;
}
get parentNode() {
let t2 = this._$AA.parentNode;
const i3 = this._$AM;
return void 0 !== i3 && 11 === (t2 == null ? void 0 : t2.nodeType) && (t2 = i3.parentNode), t2;
}
get startNode() {
return this._$AA;
}
get endNode() {
return this._$AB;
}
_$AI(t2, i3 = this) {
t2 = M(this, t2, i3), a(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
}
O(t2) {
return this._$AA.parentNode.insertBefore(t2, this._$AB);
}
T(t2) {
this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
}
_(t2) {
this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(l.createTextNode(t2)), this._$AH = t2;
}
$(t2) {
var _a2;
const { values: i3, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
if (((_a2 = this._$AH) == null ? void 0 : _a2._$AD) === e2) this._$AH.p(i3);
else {
const t3 = new R(e2, this), s3 = t3.u(this.options);
t3.p(i3), this.T(s3), this._$AH = t3;
}
}
_$AC(t2) {
let i3 = C.get(t2.strings);
return void 0 === i3 && C.set(t2.strings, i3 = new S(t2)), i3;
}
k(t2) {
u(this._$AH) || (this._$AH = [], this._$AR());
const i3 = this._$AH;
let s2, e2 = 0;
for (const h2 of t2) e2 === i3.length ? i3.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i3[e2], s2._$AI(h2), e2++;
e2 < i3.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i3.length = e2);
}
_$AR(t2 = this._$AA.nextSibling, s2) {
var _a2;
for ((_a2 = this._$AP) == null ? void 0 : _a2.call(this, false, true, s2); t2 !== this._$AB; ) {
const s3 = i$3(t2).nextSibling;
i$3(t2).remove(), t2 = s3;
}
}
setConnected(t2) {
var _a2;
void 0 === this._$AM && (this._$Cv = t2, (_a2 = this._$AP) == null ? void 0 : _a2.call(this, t2));
}
}
class H {
get tagName() {
return this.element.tagName;
}
get _$AU() {
return this._$AM._$AU;
}
constructor(t2, i3, s2, e2, h2) {
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i3, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
}
_$AI(t2, i3 = this, s2, e2) {
const h2 = this.strings;
let o2 = false;
if (void 0 === h2) t2 = M(this, t2, i3, 0), o2 = !a(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
else {
const e3 = t2;
let n3, r2;
for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = M(this, e3[s2 + n3], i3, n3), r2 === E && (r2 = this._$AH[n3]), o2 || (o2 = !a(r2) || r2 !== this._$AH[n3]), r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
}
o2 && !e2 && this.j(t2);
}
j(t2) {
t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
}
}
class I extends H {
constructor() {
super(...arguments), this.type = 3;
}
j(t2) {
this.element[this.name] = t2 === A ? void 0 : t2;
}
}
class L extends H {
constructor() {
super(...arguments), this.type = 4;
}
j(t2) {
this.element.toggleAttribute(this.name, !!t2 && t2 !== A);
}
}
class z extends H {
constructor(t2, i3, s2, e2, h2) {
super(t2, i3, s2, e2, h2), this.type = 5;
}
_$AI(t2, i3 = this) {
if ((t2 = M(this, t2, i3, 0) ?? A) === E) return;
const s2 = this._$AH, e2 = t2 === A && s2 !== A || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== A && (s2 === A || e2);
e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
}
handleEvent(t2) {
var _a2;
"function" == typeof this._$AH ? this._$AH.call(((_a2 = this.options) == null ? void 0 : _a2.host) ?? this.element, t2) : this._$AH.handleEvent(t2);
}
}
class Z {
constructor(t2, i3, s2) {
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i3, this.options = s2;
}
get _$AU() {
return this._$AM._$AU;
}
_$AI(t2) {
M(this, t2);
}
}
const B = t$1.litHtmlPolyfillSupport;
B == null ? void 0 : B(S, k), (t$1.litHtmlVersions ?? (t$1.litHtmlVersions = [])).push("3.3.3");
const D = (t2, i3, s2) => {
const e2 = (s2 == null ? void 0 : s2.renderBefore) ?? i3;
let h2 = e2._$litPart$;
if (void 0 === h2) {
const t3 = (s2 == null ? void 0 : s2.renderBefore) ?? null;
e2._$litPart$ = h2 = new k(i3.insertBefore(c(), t3), t3, void 0, s2 ?? {});
}
return h2._$AI(t2), h2;
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const s$1 = globalThis;
let i$2 = class i extends y$1 {
constructor() {
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
}
createRenderRoot() {
var _a2;
const t2 = super.createRenderRoot();
return (_a2 = this.renderOptions).renderBefore ?? (_a2.renderBefore = t2.firstChild), t2;
}
update(t2) {
const r2 = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = D(r2, this.renderRoot, this.renderOptions);
}
connectedCallback() {
var _a2;
super.connectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(true);
}
disconnectedCallback() {
var _a2;
super.disconnectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(false);
}
render() {
return E;
}
};
i$2._$litElement$ = true, i$2["finalized"] = true, (_a = s$1.litElementHydrateSupport) == null ? void 0 : _a.call(s$1, { LitElement: i$2 });
const o$1 = s$1.litElementPolyfillSupport;
o$1 == null ? void 0 : o$1({ LitElement: i$2 });
(s$1.litElementVersions ?? (s$1.litElementVersions = [])).push("4.2.2");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const t = (t2) => (e2, o2) => {
void 0 !== o2 ? o2.addInitializer(() => {
customElements.define(t2, e2);
}) : customElements.define(t2, e2);
};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const o = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$2 = (t2 = o, e2, r2) => {
const { kind: n3, metadata: i3 } = r2;
let s2 = globalThis.litPropertyMetadata.get(i3);
if (void 0 === s2 && globalThis.litPropertyMetadata.set(i3, s2 = /* @__PURE__ */ new Map()), "setter" === n3 && ((t2 = Object.create(t2)).wrapped = true), s2.set(r2.name, t2), "accessor" === n3) {
const { name: o2 } = r2;
return { set(r3) {
const n4 = e2.get.call(this);
e2.set.call(this, r3), this.requestUpdate(o2, n4, t2, true, r3);
}, init(e3) {
return void 0 !== e3 && this.C(o2, void 0, t2, e3), e3;
} };
}
if ("setter" === n3) {
const { name: o2 } = r2;
return function(r3) {
const n4 = this[o2];
e2.call(this, r3), this.requestUpdate(o2, n4, t2, true, r3);
};
}
throw Error("Unsupported decorator location: " + n3);
};
function n2(t2) {
return (e2, o2) => "object" == typeof o2 ? r$2(t2, e2, o2) : ((t3, e3, o3) => {
const r2 = e3.hasOwnProperty(o3);
return e3.constructor.createProperty(o3, t3), r2 ? Object.getOwnPropertyDescriptor(e3, o3) : void 0;
})(t2, e2, o2);
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function r$1(r2) {
return n2({ ...r2, state: true, attribute: false });
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const e$2 = (e2, t2, c2) => (c2.configurable = true, c2.enumerable = true, Reflect.decorate && "object" != typeof t2 && Object.defineProperty(e2, t2, c2), c2);
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function e$1(e2, r2) {
return (n3, s2, i3) => {
const o2 = (t2) => {
var _a2;
return ((_a2 = t2.renderRoot) == null ? void 0 : _a2.querySelector(e2)) ?? null;
};
return e$2(n3, s2, { get() {
return o2(this);
} });
};
}
const style$3 = 'bcbd-modal#modal-stopp .bcb-stopp-detail:not(:first-child) {\n border-top: 1px solid var(--bcbd-gray-300-color);\n}\nbcbd-modal#modal-stopp .bcb-stopp-detail:first-child .bcb-modal-subtitle {\n margin-top: 0px;\n}\n\n::ng-deep .fiche-modal {\n display: flex !important;\n justify-content: center;\n align-items: center;\n}\n\n::ng-deep .modal-alert {\n overflow-y: auto;\n max-height: 400px;\n}\n\n.icon-container span {\n padding-left: 4px;\n}\n\n.alerts-modal {\n position: fixed;\n z-index: 9999;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n overflow: auto;\n background-color: var(--bcbd-black-color, #000000);\n background-color: color-mix(in srgb, var(--bcbd-black-color, #000000) 40%, transparent);\n}\n\n.modal-content {\n background-color: var(--bcbd-white-color, #FFFFFF);\n margin: 15% auto;\n border: 1px solid var(--bcbd-light-gray-color, #AFAFAF);\n width: 40%;\n border-radius: 8px;\n max-height: 400px;\n}\n\n.close {\n color: var(--bcbd-white-color, #FFFFFF);\n float: right;\n font-size: 28px;\n font-weight: bold;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.close:hover,\n.close:focus {\n color: var(--bcbd-light-gray-color, #AFAFAF);\n text-decoration: none;\n cursor: pointer;\n}\n\n.modal-body {\n padding: 20px;\n}\n\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: linear-gradient(45deg, var(--bcbd-secondary-color, #4A0C8A) 0%, var(--bcbd-primary-color, #0C75AD) 100%);\n padding: 10px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n}\n\n.modal-title {\n -webkit-text-fill-color: var(--bcbd-white-color, #FFFFFF);\n}\n\n.modal-body-content {\n max-height: 200px;\n overflow-y: auto;\n}\n\n.card-body {\n border: none;\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n}\n.card-body ul {\n padding-left: 4px;\n margin: 0;\n list-style: none;\n vertical-align: middle;\n}\n.card-body ul li {\n font-size: 12px;\n border: none;\n background: none;\n white-space: inherit;\n text-decoration: none;\n text-align: left;\n}\n.card-body ul li:hover, .card-body ul li:focus {\n cursor: pointer;\n}\n\n.bcb-alert-title {\n font-weight: 700;\n text-transform: uppercase;\n margin-left: 4px;\n vertical-align: middle;\n}\n\n.bcb-alert-content {\n vertical-align: middle;\n}\n.bcb-alert-content.first-alert {\n margin-left: 0.5rem !important;\n}\n\n.bcb-ci-ellipsis-color {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n\n.bcb-pe-ellipsis-color {\n background-color: var(--bcbd-info-color, #35B9C5);\n}\n\n.bcb-allergy-ellipsis-color {\n background-color: var(--bcbd-warning-color, #ffb400);\n}\n\n.bcb-stopp-ellipsis-color {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n\n.bcb-posology-ellipsis-color {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n\nbcbd-icon {\n vertical-align: middle;\n margin-left: 4px;\n}\n\n.btn-help {\n height: 16px;\n width: 16px;\n border-radius: 8px;\n text-align: center;\n font-size: 10px;\n background-color: var(--bcbd-black-color, #000000);\n display: inline-block;\n font-weight: 700;\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n line-height: 16px;\n}\n\n.bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n margin-right: 4px;\n display: inline-block;\n vertical-align: middle;\n}\n\n.bcb-ellipsis.danger {\n background-color: var(--bcbd-danger-color, #cf406e) !important;\n}\n\n.bcb-ellipsis.warning {\n background-color: var(--bcbd-warning-color, #f59f00) !important;\n}\n\n.bcb-ellipsis.orange {\n background-color: var(--bcbd-orange-color, #f76707) !important;\n}';
const globalStyle = '* {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n}\n\n.bcb-ml-2 {\n margin-left: 0.5rem;\n}';
var __defProp$c = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var __accessCheck = (obj, member, msg) => {
if (!member.has(obj))
throw TypeError("Cannot " + msg);
};
var __privateIn = (member, obj) => {
if (Object(obj) !== obj)
throw TypeError('Cannot use the "in" operator on this value');
return member.has(obj);
};
var __privateAdd = (obj, member, value) => {
if (member.has(obj))
throw TypeError("Cannot add the same private member more than once");
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
};
var __privateMethod = (obj, member, method) => {
__accessCheck(obj, member, "access private method");
return method;
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function defaultEquals(a2, b2) {
return Object.is(a2, b2);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
let activeConsumer = null;
let inNotificationPhase = false;
let epoch = 1;
const SIGNAL = /* @__PURE__ */ Symbol("SIGNAL");
function setActiveConsumer(consumer) {
const prev = activeConsumer;
activeConsumer = consumer;
return prev;
}
function getActiveConsumer() {
return activeConsumer;
}
function isInNotificationPhase() {
return inNotificationPhase;
}
const REACTIVE_NODE = {
version: 0,
lastCleanEpoch: 0,
dirty: false,
producerNode: void 0,
producerLastReadVersion: void 0,
producerIndexOfThis: void 0,
nextProducerIndex: 0,
liveConsumerNode: void 0,
liveConsumerIndexOfThis: void 0,
consumerAllowSignalWrites: false,
consumerIsAlwaysLive: false,
producerMustRecompute: () => false,
producerRecomputeValue: () => {
},
consumerMarkedDirty: () => {
},
consumerOnSignalRead: () => {
}
};
function producerAccessed(node) {
if (inNotificationPhase) {
throw new Error(
typeof ngDevMode !== "undefined" && ngDevMode ? `Assertion error: signal read during notification phase` : ""
);
}
if (activeConsumer === null) {
return;
}
activeConsumer.consumerOnSignalRead(node);
const idx = activeConsumer.nextProducerIndex++;
assertConsumerNode(activeConsumer);
if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {
if (consumerIsLive(activeConsumer)) {
const staleProducer = activeConsumer.producerNode[idx];
producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);
}
}
if (activeConsumer.producerNode[idx] !== node) {
activeConsumer.producerNode[idx] = node;
activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0;
}
activeConsumer.producerLastReadVersion[idx] = node.version;
}
function producerIncrementEpoch() {
epoch++;
}
function producerUpdateValueVersion(node) {
if (!node.dirty && node.lastCleanEpoch === epoch) {
return;
}
if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {
node.dirty = false;
node.lastCleanEpoch = epoch;
return;
}
node.producerRecomputeValue(node);
node.dirty = false;
node.lastCleanEpoch = epoch;
}
function producerNotifyConsumers(node) {
if (node.liveConsumerNode === void 0) {
return;
}
const prev = inNotificationPhase;
inNotificationPhase = true;
try {
for (const consumer of node.liveConsumerNode) {
if (!consumer.dirty) {
consumerMarkDirty(consumer);
}
}
} finally {
inNotificationPhase = prev;
}
}
function producerUpdatesAllowed() {
return (activeConsumer == null ? void 0 : activeConsumer.consumerAllowSignalWrites) !== false;
}
function consumerMarkDirty(node) {
var _a2;
node.dirty = true;
producerNotifyConsumers(node);
(_a2 = node.consumerMarkedDirty) == null ? void 0 : _a2.call(node.wrapper ?? node);
}
function consumerBeforeComputation(node) {
node && (node.nextProducerIndex = 0);
return setActiveConsumer(node);
}
function consumerAfterComputation(node, prevConsumer) {
setActiveConsumer(prevConsumer);
if (!node || node.producerNode === void 0 || node.producerIndexOfThis === void 0 || node.producerLastReadVersion === void 0) {
return;
}
if (consumerIsLive(node)) {
for (let i3 = node.nextProducerIndex; i3 < node.producerNode.length; i3++) {
producerRemoveLiveConsumerAtIndex(node.producerNode[i3], node.producerIndexOfThis[i3]);
}
}
while (node.producerNode.length > node.nextProducerIndex) {
node.producerNode.pop();
node.producerLastReadVersion.pop();
node.producerIndexOfThis.pop();
}
}
function consumerPollProducersForChange(node) {
assertConsumerNode(node);
for (let i3 = 0; i3 < node.producerNode.length; i3++) {
const producer = node.producerNode[i3];
const seenVersion = node.producerLastReadVersion[i3];
if (seenVersion !== producer.version) {
return true;
}
producerUpdateValueVersion(producer);
if (seenVersion !== producer.version) {
return true;
}
}
return false;
}
function producerAddLiveConsumer(node, consumer, indexOfThis) {
var _a2;
assertProducerNode(node);
assertConsumerNode(node);
if (node.liveConsumerNode.length === 0) {
(_a2 = node.watched) == null ? void 0 : _a2.call(node.wrapper);
for (let i3 = 0; i3 < node.producerNode.length; i3++) {
node.producerIndexOfThis[i3] = producerAddLiveConsumer(node.producerNode[i3], node, i3);
}
}
node.liveConsumerIndexOfThis.push(indexOfThis);
return node.liveConsumerNode.push(consumer) - 1;
}
function producerRemoveLiveConsumerAtIndex(node, idx) {
var _a2;
assertProducerNode(node);
assertConsumerNode(node);
if (typeof ngDevMode !== "undefined" && ngDevMode && idx >= node.liveConsumerNode.length) {
throw new Error(
`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`
);
}
if (node.liveConsumerNode.length === 1) {
(_a2 = node.unwatched) == null ? void 0 : _a2.call(node.wrapper);
for (let i3 = 0; i3 < node.producerNode.length; i3++) {
producerRemoveLiveConsumerAtIndex(node.producerNode[i3], node.producerIndexOfThis[i3]);
}
}
const lastIdx = node.liveConsumerNode.length - 1;
node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];
node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];
node.liveConsumerNode.length--;
node.liveConsumerIndexOfThis.length--;
if (idx < node.liveConsumerNode.length) {
const idxProducer = node.liveConsumerIndexOfThis[idx];
const consumer = node.liveConsumerNode[idx];
assertConsumerNode(consumer);
consumer.producerIndexOfThis[idxProducer] = idx;
}
}
function consumerIsLive(node) {
var _a2;
return node.consumerIsAlwaysLive || (((_a2 = node == null ? void 0 : node.liveConsumerNode) == null ? void 0 : _a2.length) ?? 0) > 0;
}
function assertConsumerNode(node) {
node.producerNode ?? (node.producerNode = []);
node.producerIndexOfThis ?? (node.producerIndexOfThis = []);
node.producerLastReadVersion ?? (node.producerLastReadVersion = []);
}
function assertProducerNode(node) {
node.liveConsumerNode ?? (node.liveConsumerNode = []);
node.liveConsumerIndexOfThis ?? (node.liveConsumerIndexOfThis = []);
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function computedGet(node) {
producerUpdateValueVersion(node);
producerAccessed(node);
if (node.value === ERRORED) {
throw node.error;
}
return node.value;
}
function createComputed(computation) {
const node = Object.create(COMPUTED_NODE);
node.computation = computation;
const computed = () => computedGet(node);
computed[SIGNAL] = node;
return computed;
}
const UNSET = /* @__PURE__ */ Symbol("UNSET");
const COMPUTING = /* @__PURE__ */ Symbol("COMPUTING");
const ERRORED = /* @__PURE__ */ Symbol("ERRORED");
const COMPUTED_NODE = /* @__PURE__ */ (() => {
return {
...REACTIVE_NODE,
value: UNSET,
dirty: true,
error: null,
equal: defaultEquals,
producerMustRecompute(node) {
return node.value === UNSET || node.value === COMPUTING;
},
producerRecomputeValue(node) {
if (node.value === COMPUTING) {
throw new Error("Detected cycle in computations.");
}
const oldValue = node.value;
node.value = COMPUTING;
const prevConsumer = consumerBeforeComputation(node);
let newValue;
let wasEqual = false;
try {
newValue = node.computation.call(node.wrapper);
const oldOk = oldValue !== UNSET && oldValue !== ERRORED;
wasEqual = oldOk && node.equal.call(node.wrapper, oldValue, newValue);
} catch (err) {
newValue = ERRORED;
node.error = err;
} finally {
consumerAfterComputation(node, prevConsumer);
}
if (wasEqual) {
node.value = oldValue;
return;
}
node.value = newValue;
node.version++;
}
};
})();
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function defaultThrowError() {
throw new Error();
}
let throwInvalidWriteToSignalErrorFn = defaultThrowError;
function throwInvalidWriteToSignalError() {
throwInvalidWriteToSignalErrorFn();
}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function createSignal(initialValue) {
const node = Object.create(SIGNAL_NODE);
node.value = initialValue;
const getter = () => {
producerAccessed(node);
return node.value;
};
getter[SIGNAL] = node;
return getter;
}
function signalGetFn() {
producerAccessed(this);
return this.value;
}
function signalSetFn(node, newValue) {
if (!producerUpdatesAllowed()) {
throwInvalidWriteToSignalError();
}
if (!node.equal.call(node.wrapper, node.value, newValue)) {
node.value = newValue;
signalValueChanged(node);
}
}
const SIGNAL_NODE = /* @__PURE__ */ (() => {
return {
...REACTIVE_NODE,
equal: defaultEquals,
value: void 0
};
})();
function signalValueChanged(node) {
node.version++;
producerIncrementEpoch();
producerNotifyConsumers(node);
}
/**
* @license
* Copyright 2024 Bloomberg Finance L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const NODE = Symbol("node");
var Signal;
((Signal2) => {
var _a2, _brand, _b, _brand2;
class State {
constructor(initialValue, options = {}) {
__privateAdd(this, _brand);
__publicField(this, _a2);
const ref = createSignal(initialValue);
const node = ref[SIGNAL];
this[NODE] = node;
node.wrapper = this;
if (options) {
const equals = options.equals;
if (equals) {
node.equal = equals;
}
node.watched = options[Signal2.subtle.watched];
node.unwatched = options[Signal2.subtle.unwatched];
}
}
get() {
if (!(0, Signal2.isState)(this))
throw new TypeError("Wrong receiver type for Signal.State.prototype.get");
return signalGetFn.call(this[NODE]);
}
set(newValue) {
if (!(0, Signal2.isState)(this))
throw new TypeError("Wrong receiver type for Signal.State.prototype.set");
if (isInNotificationPhase()) {
throw new Error("Writes to signals not permitted during Watcher callback");
}
const ref = this[NODE];
signalSetFn(ref, newValue);
}
}
_a2 = NODE;
_brand = /* @__PURE__ */ new WeakSet();
Signal2.isState = (s2) => typeof s2 === "object" && __privateIn(_brand, s2);
Signal2.State = State;
class Computed {
// Create a Signal which evaluates to the value returned by the callback.
// Callback is called with this signal as the parameter.
constructor(computation, options) {
__privateAdd(this, _brand2);
__publicField(this, _b);
const ref = createComputed(computation);
const node = ref[SIGNAL];
node.consumerAllowSignalWrites = true;
this[NODE] = node;
node.wrapper = this;
if (options) {
const equals = options.equals;
if (equals) {
node.equal = equals;
}
node.watched = options[Signal2.subtle.watched];
node.unwatched = options[Signal2.subtle.unwatched];
}
}
get() {
if (!(0, Signal2.isComputed)(this))
throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");
return computedGet(this[NODE]);
}
}
_b = NODE;
_brand2 = /* @__PURE__ */ new WeakSet();
Signal2.isComputed = (c2) => typeof c2 === "object" && __privateIn(_brand2, c2);
Signal2.Computed = Computed;
((subtle2) => {
var _a22, _brand3, _assertSignals, assertSignals_fn;
function untrack(cb) {
let output;
let prevActiveConsumer = null;
try {
prevActiveConsumer = setActiveConsumer(null);
output = cb();
} finally {
setActiveConsumer(prevActiveConsumer);
}
return output;
}
subtle2.untrack = untrack;
function introspectSources(sink) {
var _a3;
if (!(0, Signal2.isComputed)(sink) && !(0, Signal2.isWatcher)(sink)) {
throw new TypeError("Called introspectSources without a Computed or Watcher argument");
}
return ((_a3 = sink[NODE].producerNode) == null ? void 0 : _a3.map((n3) => n3.wrapper)) ?? [];
}
subtle2.introspectSources = introspectSources;
function introspectSinks(signal) {
var _a3;
if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) {
throw new TypeError("Called introspectSinks without a Signal argument");
}
return ((_a3 = signal[NODE].liveConsumerNode) == null ? void 0 : _a3.map((n3) => n3.wrapper)) ?? [];
}
subtle2.introspectSinks = introspectSinks;
function hasSinks(signal) {
if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) {
throw new TypeError("Called hasSinks without a Signal argument");
}
const liveConsumerNode = signal[NODE].liveConsumerNode;
if (!liveConsumerNode)
return false;
return liveConsumerNode.length > 0;
}
subtle2.hasSinks = hasSinks;
function hasSources(signal) {
if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isWatcher)(signal)) {
throw new TypeError("Called hasSources without a Computed or Watcher argument");
}
const producerNode = signal[NODE].producerNode;
if (!producerNode)
return false;
return producerNode.length > 0;
}
subtle2.hasSources = hasSources;
class Watcher {
// When a (recursive) source of Watcher is written to, call this callback,
// if it hasn't already been called since the last `watch` call.
// No signals may be read or written during the notify.
constructor(notify) {
__privateAdd(this, _brand3);
__privateAdd(this, _assertSignals);
__publicField(this, _a22);
let node = Object.create(REACTIVE_NODE);
node.wrapper = this;
node.consumerMarkedDirty = notify;
node.consumerIsAlwaysLive = true;
node.consumerAllowSignalWrites = false;
node.producerNode = [];
this[NODE] = node;
}
// Add these signals to the Watcher's set, and set the watcher to run its
// notify callback next time any signal in the set (or one of its dependencies) changes.
// Can be called with no arguments just to reset the "notified" state, so that
// the notify callback will be invoked again.
watch(...signals) {
if (!(0, Signal2.isWatcher)(this)) {
throw new TypeError("Called unwatch without Watcher receiver");
}
__privateMethod(this, _assertSignals, assertSignals_fn).call(this, signals);
const node = this[NODE];
node.dirty = false;
const prev = setActiveConsumer(node);
for (const signal of signals) {
producerAccessed(signal[NODE]);
}
setActiveConsumer(prev);
}
// Remove these signals from the watched set (e.g., for an effect which is disposed)
unwatch(...signals) {
if (!(0, Signal2.isWatcher)(this)) {
throw new TypeError("Called unwatch without Watcher receiver");
}
__privateMethod(this, _assertSignals, assertSignals_fn).call(this, signals);
const node = this[NODE];
assertConsumerNode(node);
for (let i3 = node.producerNode.length - 1; i3 >= 0; i3--) {
if (signals.includes(node.producerNode[i3].wrapper)) {
producerRemoveLiveConsumerAtIndex(node.producerNode[i3], node.producerIndexOfThis[i3]);
const lastIdx = node.producerNode.length - 1;
node.producerNode[i3] = node.producerNode[lastIdx];
node.producerIndexOfThis[i3] = node.producerIndexOfThis[lastIdx];
node.producerNode.length--;
node.producerIndexOfThis.length--;
node.nextProducerIndex--;
if (i3 < node.producerNode.length) {
const idxConsumer = node.producerIndexOfThis[i3];
const producer = node.producerNode[i3];
assertProducerNode(producer);
producer.liveConsumerIndexOfThis[idxConsumer] = i3;
}
}
}
}
// Returns the set of computeds in the Watcher's set which are still yet
// to be re-evaluated
getPending() {
if (!(0, Signal2.isWatcher)(this)) {
throw new TypeError("Called getPending without Watcher receiver");
}
const node = this[NODE];
return node.producerNode.filter((n3) => n3.dirty).map((n3) => n3.wrapper);
}
}
_a22 = NODE;
_brand3 = /* @__PURE__ */ new WeakSet();
_assertSignals = /* @__PURE__ */ new WeakSet();
assertSignals_fn = function(signals) {
for (const signal of signals) {
if (!(0, Signal2.isComputed)(signal) && !(0, Signal2.isState)(signal)) {
throw new TypeError("Called watch/unwatch without a Computed or State argument");
}
}
};
Signal2.isWatcher = (w) => __privateIn(_brand3, w);
subtle2.Watcher = Watcher;
function currentComputed() {
var _a3;
return (_a3 = getActiveConsumer()) == null ? void 0 : _a3.wrapper;
}
subtle2.currentComputed = currentComputed;
subtle2.watched = Symbol("watched");
subtle2.unwatched = Symbol("unwatched");
})(Signal2.subtle || (Signal2.subtle = {}));
})(Signal || (Signal = {}));
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const i$1 = Symbol("SignalWatcherBrand"), s = new FinalizationRegistry(({ watcher: t2, signal: i3 }) => {
t2.unwatch(i3);
}), h = /* @__PURE__ */ new WeakMap();
function e(e2) {
return true === e2[i$1] ? (console.warn("SignalWatcher should not be applied to the same class more than once."), e2) : class extends e2 {
constructor() {
super(...arguments), this._$St = new Signal.State(0), this._$Si = false, this._$So = true, this._$Sh = /* @__PURE__ */ new Set();
}
_$Sl() {
if (void 0 !== this._$Su) return;
this._$Sv = new Signal.Computed(() => {
this._$St.get(), super.performUpdate();
});
const i3 = this._$Su = new Signal.subtle.Watcher(function() {
const t2 = h.get(this);
void 0 !== t2 && (false === t2._$Si && t2.requestUpdate(), this.watch());
});
h.set(i3, this), s.register(this, { watcher: i3, signal: this._$Sv }), i3.watch(this._$Sv);
}
_$Sp() {
void 0 !== this._$Su && (this._$Su.unwatch(this._$Sv), this._$Sv = void 0, this._$Su = void 0);
}
performUpdate() {
this.isUpdatePending && (this._$Sl(), this._$Si = true, this._$St.set(this._$St.get() + 1), this._$Si = false, this._$Sv.get());
}
update(t2) {
try {
this._$So ? (this._$So = false, super.update(t2)) : this._$Sh.forEach((t3) => t3.commit());
} finally {
this.isUpdatePending = false, this._$Sh.clear();
}
}
requestUpdate(t2, i3, s2) {
this._$So = true, super.requestUpdate(t2, i3, s2);
}
connectedCallback() {
super.connectedCallback(), this.requestUpdate();
}
disconnectedCallback() {
super.disconnectedCallback(), queueMicrotask(() => {
false === this.isConnected && this._$Sp();
});
}
_(t2) {
this._$Sh.add(t2);
const i3 = this._$So;
this.requestUpdate(), this._$So = i3;
}
m(t2) {
this._$Sh.delete(t2);
}
};
}
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
Signal.State;
Signal.Computed;
const r = (l2, o2) => new Signal.State(l2, o2), i2 = (l2, o2) => new Signal.Computed(l2, o2);
var EAlertLevel = /* @__PURE__ */ ((EAlertLevel2) => {
EAlertLevel2["INFO"] = "info";
EAlertLevel2["WARNING"] = "warning";
EAlertLevel2["ORANGE"] = "orange";
EAlertLevel2["DANGER"] = "danger";
return EAlertLevel2;
})(EAlertLevel || {});
const allAlerts = r({});
function setAllAlerts(alerts) {
allAlerts.set(alerts);
}
const hasAlerts = i2(() => {
const alerts = allAlerts.get();
return Object.keys(alerts).length > 0;
});
const getAllProductIds = i2(() => {
const alerts = allAlerts.get();
return Object.keys(alerts).map((id) => parseInt(id, 10));
});
const getMaxLevelAlertsByProduct = (productId) => {
return i2(() => {
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
const alerts = allAlerts.get();
const alertsByProduct = alerts[productId.toString()];
if (!alertsByProduct) {
return "";
}
if (((_a2 = alertsByProduct.alerts1c) == null ? void 0 : _a2.length) || ((_b = alertsByProduct.stoppAlerts) == null ? void 0 : _b.length)) {
return EAlertLevel.DANGER;
}
const hasInteractionLvl4 = (_c = alertsByProduct.alerts0) == null ? void 0 : _c.some((alert) => alert.level === 4);
if (hasInteractionLvl4) {
return EAlertLevel.DANGER;
}
const posoLevel = ((_d = alertsByProduct.posoAlerts) == null ? void 0 : _d.length) ? getPosoAlertLevel(alertsByProduct) : "";
if (posoLevel === EAlertLevel.DANGER || ((_e = alertsByProduct.alerts1d) == null ? void 0 : _e.length)) {
return EAlertLevel.DANGER;
}
const hasInteractionLvl3 = (_f = alertsByProduct.alerts0) == null ? void 0 : _f.some((alert) => alert.level === 3);
if (hasInteractionLvl3 || posoLevel === EAlertLevel.ORANGE) {
return EAlertLevel.ORANGE;
}
if (((_g = alertsByProduct.alerts6) == null ? void 0 : _g.length) || ((_h = alertsByProduct.alerts5) == null ? void 0 : _h.length) || ((_i = alertsByProduct.alerts0) == null ? void 0 : _i.some((alert) => alert.level === 2)) || ((_j = alertsByProduct.alerts4) == null ? void 0 : _j.length) || posoLevel === EAlertLevel.WARNING) {
return EAlertLevel.WARNING;
}
if (((_k = alertsByProduct.alerts2) == null ? void 0 : _k.length) || ((_l = alertsByProduct.samAlerts) == null ? void 0 : _l.length) || ((_m = alertsByProduct.anticholinergicAlerts) == null ? void 0 : _m.length) || ((_n = alertsByProduct.alerts0) == null ? void 0 : _n.some((alert) => alert.level === 1))) {
return EAlertLevel.INFO;
}
return "";
});
};
const getAlertsByProduct = (productId) => {
return i2(() => {
if (!productId && productId !== 0) return null;
const alerts = allAlerts.get();
return alerts[productId.toString()] || null;
});
};
function getPosoAlertLevel(product) {
var _a2, _b, _c, _d, _e, _f;
if (!(product == null ? void 0 : product.posoAlerts) || product.posoAlerts.length === 0) {
return "";
}
if (((_a2 = product.posoAlerts[0]) == null ? void 0 : _a2.quantityAlert) === 2 || ((_b = product.posoAlerts[0]) == null ? void 0 : _b.durationAlert) === 16 || ((_c = product.posoAlerts[0]) == null ? void 0 : _c.maxPerDoseMessage) !== "" || ((_d = product.posoAlerts[0]) == null ? void 0 : _d.intervalMessage) !== "") {
return EAlertLevel.DANGER;
} else if (((_e = product.posoAlerts[0]) == null ? void 0 : _e.durationAlert) === 32 || ((_f = product.posoAlerts[0]) == null ? void 0 : _f.durationAlert) === 64) {
return EAlertLevel.ORANGE;
} else {
return EAlertLevel.WARNING;
}
}
const getAlertsCountByProduct = (productId) => {
return i2(() => {
var _a2, _b, _c, _d, _e, _f;
if (!productId && productId !== 0) return 0;
const alerts = allAlerts.get();
const alertsByProduct = alerts[productId.toString()];
if (!alertsByProduct) {
return 0;
}
return Number((((_a2 = alertsByProduct.alerts1c) == null ? void 0 : _a2.length) || 0) > 0) + // CI contre-indiquée
Number((((_b = alertsByProduct.alerts1d) == null ? void 0 : _b.length) || 0) > 0) + // CI déconseillée
Number((((_c = alertsByProduct.alerts2) == null ? void 0 : _c.length) || 0) > 0) + // Précautions d'emploi
Number((((_d = alertsByProduct.alerts6) == null ? void 0 : _d.length) || 0) > 0) + // Allergies
Number((((_e = alertsByProduct.posoAlerts) == null ? void 0 : _e.length) || 0) > 0) + // Posologie
Number((((_f = alertsByProduct.stoppAlerts) == null ? void 0 : _f.length) || 0) > 0);
});
};
const ALERT_LEVELS = {
NOT_RECOMMENDED: "déconseillé",
CONTRAINDICATED: "contre-indiqué",
PRECAUTION_FOR_USE: "précaution",
ALLERGY: "Allergie"
};
const ALERT_CHAPTER = {
CI_CHAPTER: "2",
PFU_CHAPTER: "3",
ALLERGY_CHAPTER: "22,23"
};
const ALERT_TYPES$1 = {
CONTRAINDICATION: 1,
PRECAUTION_FOR_USE: 2,
ALLERGY: 6,
STOPP: 7,
REDUNDANCY: 4,
IPC: 5,
INTERACTION: 0,
POSOLOGY: 8,
SAM: 9,
ANTICHOLINERGIC: 10
};
const responses = {};
const promises = {};
async function hashData(apiUrl, patient, products, endpoint) {
const string = apiUrl + JSON.stringify(patient) + JSON.stringify(products) + (endpoint || "");
const utf8 = new TextEncoder().encode(string);
return crypto.subtle.digest("SHA-256", utf8).then((hashBuffer) => {
const hashArray = Array.from(new Uint8Array(hashBuffer));
return hashArray.map((bytes) => bytes.toString(16).padStart(2, "0")).join("");
});
}
async function getCachedResponse(hash, fetchFn) {
if (responses[hash]) {
return responses[hash];
}
if (promises[hash]) {
return promises[hash];
}
promises[hash] = fetchFn();
promises[hash].then((data) => {
delete promises[hash];
responses[hash] = data;
});
return promises[hash];
}
async function getAlerts(apiUrl, patient, products) {
const hash = await hashData(apiUrl, patient, products, "prescription");
const response = await getCachedResponse(hash, () => fetchAlerts(apiUrl, patient, products));
const productPrescriptionIds = findProductIds(response.prescriptionAlerts ?? []);
const productSTOPPIds = findSTOPPProductIds(response.stoppAlerts ?? []);
const productsSAMIds = findSAMProductIds(response.samAlerts ?? []);
const anticholinergicProductIds = findProductIds(response.anticholinergicAlerts ?? []);
const productsIds = [...productPrescriptionIds, ...productsSAMIds, ...productSTOPPIds, ...anticholinergicProductIds];
const current = allAlerts.get();
const cleaned = {};
Object.keys(current).forEach((key) => {
const productId = Number(key);
if (productsIds.includes(productId)) {
cleaned[productId] = {
...current[productId],
// Réinitialiser toutes les alertes de prescription
alerts0: [],
alerts1c: [],
alerts1d: [],
alerts2: [],
alerts4: [],
alerts5: [],
alerts6: [],
samAlerts: [],
anticholinergicAlerts: [],
stoppAlerts: []
};
}
});
setAllAlerts(cleaned);
_groupPrescriptionAlertsByProductId(
[...response.prescriptionAlerts ?? [], ...response.samAlerts ?? [], ...response.stoppAlerts ?? [], ...response.anticholinergicAlerts ?? []],
productsIds,
patient
);
_groupStoppAlertsByProductId(response.stoppAlerts ?? [], productSTOPPIds);
}
async function getPosoAlerts(apiUrl, patient, products) {
var _a2;
const hash = await hashData(apiUrl, patient, products, "posology");
const response = await getCachedResponse(hash, () => fetchPosoAlerts(apiUrl, patient, products));
const productIds = ((_a2 = response == null ? void 0 : response.posoAlerts) == null ? void 0 : _a2.map((product) => product.productId)) ?? [];
return _groupPosoAlertsByProductId(response.posoAlerts, productIds);
}
async function fetchPosoAlerts(apiUrl, patient, products) {
const fhirPrescription = {
prescriptions: products,
patient
};
try {
const response = await fetch(apiUrl + "/prescription/posologies/fhir/check", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(fhirPrescription)
});
if (!response.ok) {
throw new Error("Échec de la requête.");
}
const jsonData = await response.json();
return {
posoAlerts: jsonData.posologiesAlerts
};
} catch (error) {
console.error("Erreur lors de la récupération des données de l'API : ", error);
return Promise.reject(new Error(error));
}
}
async function fetchAlerts(apiUrl, patient, products) {
const fhirPrescription = {
prescriptions: products,
patient,
filters: {
withInteractions: true,
withRedundants: true,
withCI: true,
withPE: true,
withOverdose: true,
withAllergies: true,
withIpc: true,
withStopp: true,
withSAM: true,
withAnticholinergicBurden: true
}
};
try {
const response = await fetch(apiUrl + "/prescription/prescription/fhir/check", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(fhirPrescription)
});
if (!response.ok) {
throw new Error("Échec de la requête.");
}
const jsonData = await response.json();
return {
prescriptionAlerts: jsonData.prescriptionAlerts,
stoppAlerts: jsonData.stoppAlerts,
samAlerts: jsonData.samAlerts,
anticholinergicAlerts: jsonData.antiCholinergicBurdenAlerts
};
} catch (error) {
console.error("Erreur lors de la récupération des données de l'API : ", error);
return Promise.reject(new Error(error));
}
}
function findSTOPPProductIds(alerts) {
if (!(alerts == null ? void 0 : alerts.length)) return [];
return Array.from(new Set(
alerts.filter((alert) => alert.stoppId).map((alert) => alert.productId)
));
}
function findProductIds(alerts) {
if (!(alerts == null ? void 0 : alerts.length)) return [];
return Array.from(new Set(
alerts.flatMap((alert) => alert.products).map((product) => product.productId)
));
}
function findSAMProductIds(alerts) {
if (!(alerts == null ? void 0 : alerts.length)) return [];
return Array.from(new Set(
alerts.filter((alert) => alert.hasSam).map((alert) => alert.productId)
));
}
function _isProductIdPresentPrescription(alert, productIds) {
var _a2;
return (_a2 = alert.products) == null ? void 0 : _a2.some((product) => productIds.includes(product.productId));
}
function _isProductIdPresentOther(alert, productIds) {
return productIds.includes(alert.productId);
}
function _getAlertProductByIdPrescription(alert, productId) {
return alert.products.some((product) => product.productId === productId);
}
function _getAlertProductByIdOther(alert, productId) {
return alert.productId === productId;
}
function _createEmptyProductAlert() {
return {
alerts0: [],
alerts1d: [],
alerts1c: [],
alerts2: [],
alerts4: [],
alerts5: [],
alerts6: [],
samAlerts: [],
anticholinergicAlerts: [],
stoppAlerts: [],
posoAlerts: []
};
}
function _groupPrescriptionAlertsByProductId(alerts, productIds, patient) {
const alerts0 = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.INTERACTION);
const alerts1d = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.CONTRAINDICATION && alert.level === 3);
const alerts1c = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.CONTRAINDICATION && alert.level === 4);
const alerts2 = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.PRECAUTION_FOR_USE);
const alerts4 = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.REDUNDANCY);
const alerts5 = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.IPC);
const alerts6 = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.type === ALERT_TYPES$1.ALLERGY);
const samAlerts = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentOther(alert, productIds) && alert.hasSam);
const anticholinergicAlerts = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentPrescription(alert, productIds) && alert.totalScore !== void 0);
const current = allAlerts.get();
const result = {};
productIds.forEach((productId) => {
const existingProduct = current[productId];
result[productId] = {
alerts0: alerts0 == null ? void 0 : alerts0.filter((alert) => _getAlertProductByIdPrescription(alert, productId)),
alerts1d: patient ? alerts1d == null ? void 0 : alerts1d.filter((alert) => _getAlertProductByIdPrescription(alert, productId)) : [],
alerts1c: patient ? alerts1c == null ? void 0 : alerts1c.filter((alert) => _getAlertProductByIdPrescription(alert, productId)) : [],
alerts2: patient ? alerts2 == null ? void 0 : alerts2.filter((alert) => _getAlertProductByIdPrescription(alert, productId)) : [],
alerts4: alerts4 == null ? void 0 : alerts4.filter((alert) => _getAlertProductByIdPrescription(alert, productId)),
alerts5: alerts5 == null ? void 0 : alerts5.filter((alert) => _getAlertProductByIdPrescription(alert, productId)),
alerts6: patient ? alerts6 == null ? void 0 : alerts6.filter((alert) => _getAlertProductByIdPrescription(alert, productId)) : [],
samAlerts: samAlerts == null ? void 0 : samAlerts.filter((alert) => _getAlertProductByIdOther(alert, productId)),
anticholinergicAlerts: anticholinergicAlerts == null ? void 0 : anticholinergicAlerts.filter((alert) => _getAlertProductByIdPrescription(alert, productId)),
stoppAlerts: (existingProduct == null ? void 0 : existingProduct.stoppAlerts) || [],
posoAlerts: (existingProduct == null ? void 0 : existingProduct.posoAlerts) || []
};
});
const currentState = allAlerts.get();
const merged = { ...currentState, ...result };
setAllAlerts(merged);
return merged;
}
function _groupStoppAlertsByProductId(alerts, productIds) {
const stoppAlerts = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentOther(alert, productIds) && alert.stoppId);
const current = allAlerts.get();
const updated = {};
productIds.forEach((productId) => {
const existingProduct = current[productId];
updated[productId] = existingProduct ? { ...existingProduct, stoppAlerts: stoppAlerts == null ? void 0 : stoppAlerts.filter((alert) => _getAlertProductByIdOther(alert, productId)) } : { ..._createEmptyProductAlert(), stoppAlerts: stoppAlerts == null ? void 0 : stoppAlerts.filter((alert) => _getAlertProductByIdOther(alert, productId)) };
});
const currentState2 = allAlerts.get();
const merged2 = { ...currentState2, ...updated };
setAllAlerts(merged2);
return merged2;
}
function _groupPosoAlertsByProductId(alerts, productIds) {
const posoAlerts = alerts == null ? void 0 : alerts.filter((alert) => _isProductIdPresentOther(alert, productIds) && (alert.htmlMessage || alert.quantityMessage));
const current = allAlerts.get();
const updated = {};
productIds.forEach((productId) => {
const existingProduct = current[productId];
updated[productId] = existingProduct ? { ...existingProduct, posoAlerts: posoAlerts == null ? void 0 : posoAlerts.filter((alert) => _getAlertProductByIdOther(alert, productId)) } : { ..._createEmptyProductAlert(), posoAlerts: posoAlerts == null ? void 0 : posoAlerts.filter((alert) => _getAlertProductByIdOther(alert, productId)) };
});
const currentState3 = allAlerts.get();
const merged3 = { ...currentState3, ...updated };
setAllAlerts(merged3);
return merged3;
}
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
const v2 = glob[path];
if (v2) {
return typeof v2 === "function" ? v2() : Promise.resolve(v2);
}
return new Promise((_2, reject) => {
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
reject.bind(
null,
new Error(
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
)
)
);
});
};
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const LOCALE_STATUS_EVENT = "lit-localize-status";
let installed = false;
function _installMsgImplementation(impl) {
if (installed) {
throw new Error("lit-localize can only be configured once");
}
installed = true;
}
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class Deferred {
constructor() {
this.settled = false;
this.promise = new Promise((resolve, reject) => {
this._resolve = resolve;
this._reject = reject;
});
}
resolve(value) {
this.settled = true;
this._resolve(value);
}
reject(error) {
this.settled = true;
this._reject(error);
}
}
/**
* @license
* Copyright 2014 Travis Webb
* SPDX-License-Identifier: MIT
*/
for (let i3 = 0; i3 < 256; i3++) {
(i3 >> 4 & 15).toString(16) + (i3 & 15).toString(16);
}
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function dispatchStatusEvent(detail) {
window.dispatchEvent(new CustomEvent(LOCALE_STATUS_EVENT, { detail }));
}
let activeLocale = "";
let loadingLocale;
let sourceLocale$1;
let validLocales;
let loadLocale;
let loading = new Deferred();
loading.resolve();
let requestId = 0;
const configureLocalization = (config) => {
_installMsgImplementation();
activeLocale = sourceLocale$1 = config.sourceLocale;
validLocales = new Set(config.targetLocales);
validLocales.add(config.sourceLocale);
loadLocale = config.loadLocale;
return { getLocale, setLocale: setLocale$1 };
};
const getLocale = () => {
return activeLocale;
};
const setLocale$1 = (newLocale) => {
if (newLocale === (loadingLocale ?? activeLocale)) {
return loading.promise;
}
if (!validLocales || !loadLocale) {
throw new Error("Internal error");
}
if (!validLocales.has(newLocale)) {
throw new Error("Invalid locale code");
}
requestId++;
const thisRequestId = requestId;
loadingLocale = newLocale;
if (loading.settled) {
loading = new Deferred();
}
dispatchStatusEvent({ status: "loading", loadingLocale: newLocale });
const localePromise = newLocale === sourceLocale$1 ? (
// We could switch to the source locale synchronously, but we prefer to
// queue it on a microtask so that switching locales is consistently
// asynchronous.
Promise.resolve({ templates: void 0 })
) : loadLocale(newLocale);
localePromise.then((mod) => {
if (requestId === thisRequestId) {
activeLocale = newLocale;
loadingLocale = void 0;
mod.templates;
dispatchStatusEvent({ status: "ready", readyLocale: newLocale });
loading.resolve();
}
}, (err) => {
if (requestId === thisRequestId) {
dispatchStatusEvent({
status: "error",
errorLocale: newLocale,
errorMessage: err.toString()
});
loading.reject(err);
}
});
return loading.promise;
};
const sourceLocale = `en`;
const targetLocales = [
`fr-FR`
];
const { setLocale } = configureLocalization({
sourceLocale,
targetLocales,
loadLocale: (locale) => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../i18n/locales/fr-FR.ts": () => import("./fr-FR-C9-5SvOU.js") }), `../i18n/locales/${locale}.ts`, 4)
});
let alertChapter = [];
function _isPregnantOrNursing(productAlert) {
return productAlert.some((alert) => alert.shortText == "Grossesse" || alert.shortText == "Allaitement");
}
function _getProductAlertByLevel(level, product) {
switch (level) {
case ALERT_LEVELS.CONTRAINDICATED:
return product.alerts1c;
case ALERT_LEVELS.NOT_RECOMMENDED:
return product.alerts1d;
case ALERT_LEVELS.PRECAUTION_FOR_USE:
return product.alerts2;
default:
return [];
}
}
async function getAlertChapter(chapter, level, product, productId, apiUrl) {
const productAlert = _getProductAlertByLevel(level, product);
if ((level == ALERT_LEVELS.CONTRAINDICATED || level == ALERT_LEVELS.NOT_RECOMMENDED || level == ALERT_LEVELS.PRECAUTION_FOR_USE) && _isPregnantOrNursing(productAlert)) {
chapter += ",7";
}
alertChapter = [];
try {
const response = await fetch(apiUrl + "/infos/products/" + productId + "/chapters/" + chapter, {
method: "GET",
headers: {
"Content-Type": "application/json"
}
});
if (!response.ok) {
throw new Error("Échec de la requête.");
}
const jsonData = await response.json();
jsonData.forEach((data) => {
data.extendedProperties.chapters.forEach((chapter2) => {
alertChapter.push(chapter2);
});
});
} catch (error) {
console.error("Erreur lors de la récupération des données de l'API : ", error);
throw error;
}
return alertChapter;
}
function getPosoMessage(product) {
const posoMessage = {
htmlMessage: product.posoAlerts[0].htmlMessage,
quantityMessage: product.posoAlerts[0].quantityMessage
};
return posoMessage;
}
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var he = { exports: {} };
/*! https://mths.be/he v1.2.0 by @mathias | MIT license */
he.exports;
(function(module, exports) {
(function(root) {
var freeExports = exports;
var freeModule = module && module.exports == freeExports && module;
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal;
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
root = freeGlobal;
}
var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var regexAsciiWhitelist = /[\x01-\x7F]/g;
var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g;
var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g;
var encodeMap = { "": "shy", "": "zwnj", "": "zwj", "": "lrm", "": "ic", "": "it", "": "af", "": "rlm", "": "ZeroWidthSpace", "": "NoBreak", "̑": "DownBreve", "⃛": "tdot", "⃜": "DotDot", " ": "Tab", "\n": "NewLine", " ": "puncsp", " ": "MediumSpace", " ": "thinsp", " ": "hairsp", " ": "emsp13", " ": "ensp", " ": "emsp14", " ": "emsp", " ": "numsp", " ": "nbsp", " ": "ThickSpace", "‾": "oline", "_": "lowbar", "‐": "dash", "–": "ndash", "—": "mdash", "―": "horbar", ",": "comma", ";": "semi", "⁏": "bsemi", ":": "colon", "⩴": "Colone", "!": "excl", "¡": "iexcl", "?": "quest", "¿": "iquest", ".": "period", "‥": "nldr", "…": "mldr", "·": "middot", "'": "apos", "‘": "lsquo", "’": "rsquo", "‚": "sbquo", "‹": "lsaquo", "›": "rsaquo", '"': "quot", "“": "ldquo", "”": "rdquo", "„": "bdquo", "«": "laquo", "»": "raquo", "(": "lpar", ")": "rpar", "[": "lsqb", "]": "rsqb", "{": "lcub", "}": "rcub", "⌈": "lceil", "⌉": "rceil", "⌊": "lfloor", "⌋": "rfloor", "⦅": "lopar", "⦆": "ropar", "⦋": "lbrke", "⦌": "rbrke", "⦍": "lbrkslu", "⦎": "rbrksld", "⦏": "lbrksld", "⦐": "rbrkslu", "⦑": "langd", "⦒": "rangd", "⦓": "lparlt", "⦔": "rpargt", "⦕": "gtlPar", "⦖": "ltrPar", "⟦": "lobrk", "⟧": "robrk", "⟨": "lang", "⟩": "rang", "⟪": "Lang", "⟫": "Rang", "⟬": "loang", "⟭": "roang", "❲": "lbbrk", "❳": "rbbrk", "‖": "Vert", "§": "sect", "¶": "para", "@": "commat", "*": "ast", "/": "sol", "undefined": null, "&": "amp", "#": "num", "%": "percnt", "‰": "permil", "‱": "pertenk", "†": "dagger", "‡": "Dagger", "•": "bull", "⁃": "hybull", "′": "prime", "″": "Prime", "‴": "tprime", "⁗": "qprime", "‵": "bprime", "⁁": "caret", "`": "grave", "´": "acute", "˜": "tilde", "^": "Hat", "¯": "macr", "˘": "breve", "˙": "dot", "¨": "die", "˚": "ring", "˝": "dblac", "¸": "cedil", "˛": "ogon", "ˆ": "circ", "ˇ": "caron", "°": "deg", "©": "copy", "®": "reg", "℗": "copysr", "℘": "wp", "℞": "rx", "℧": "mho", "℩": "iiota", "←": "larr", "↚": "nlarr", "→": "rarr", "↛": "nrarr", "↑": "uarr", "↓": "darr", "↔": "harr", "↮": "nharr", "↕": "varr", "↖": "nwarr", "↗": "nearr", "↘": "searr", "↙": "swarr", "↝": "rarrw", "↝̸": "nrarrw", "↞": "Larr", "↟": "Uarr", "↠": "Rarr", "↡": "Darr", "↢": "larrtl", "↣": "rarrtl", "↤": "mapstoleft", "↥": "mapstoup", "↦": "map", "↧": "mapstodown", "↩": "larrhk", "↪": "rarrhk", "↫": "larrlp", "↬": "rarrlp", "↭": "harrw", "↰": "lsh", "↱": "rsh", "↲": "ldsh", "↳": "rdsh", "↵": "crarr", "↶": "cularr", "↷": "curarr", "↺": "olarr", "↻": "orarr", "↼": "lharu", "↽": "lhard", "↾": "uharr", "↿": "uharl", "⇀": "rharu", "⇁": "rhard", "⇂": "dharr", "⇃": "dharl", "⇄": "rlarr", "⇅": "udarr", "⇆": "lrarr", "⇇": "llarr", "⇈": "uuarr", "⇉": "rrarr", "⇊": "ddarr", "⇋": "lrhar", "⇌": "rlhar", "⇐": "lArr", "⇍": "nlArr", "⇑": "uArr", "⇒": "rArr", "⇏": "nrArr", "⇓": "dArr", "⇔": "iff", "⇎": "nhArr", "⇕": "vArr", "⇖": "nwArr", "⇗": "neArr", "⇘": "seArr", "⇙": "swArr", "⇚": "lAarr", "⇛": "rAarr", "⇝": "zigrarr", "⇤": "larrb", "⇥": "rarrb", "⇵": "duarr", "⇽": "loarr", "⇾": "roarr", "⇿": "hoarr", "∀": "forall", "∁": "comp", "∂": "part", "∂̸": "npart", "∃": "exist", "∄": "nexist", "∅": "empty", "∇": "Del", "∈": "in", "∉": "notin", "∋": "ni", "∌": "notni", "϶": "bepsi", "∏": "prod", "∐": "coprod", "∑": "sum", "+": "plus", "±": "pm", "÷": "div", "×": "times", "<": "lt", "≮": "nlt", "<⃒": "nvlt", "=": "equals", "≠": "ne", "=⃥": "bne", "⩵": "Equal", ">": "gt", "≯": "ngt", ">⃒": "nvgt", "¬": "not", "|": "vert", "¦": "brvbar", "−": "minus", "∓": "mp", "∔": "plusdo", "⁄": "frasl", "∖": "setmn", "∗": "lowast", "∘": "compfn", "√": "Sqrt", "∝": "prop", "∞": "infin", "∟": "angrt", "∠": "ang", "∠⃒": "nang", "∡": "angmsd", "∢": "angsph", "∣": "mid", "∤": "nmid", "∥": "par", "∦": "npar", "∧": "and", "∨": "or", "∩": "cap", "∩︀": "caps", "∪": "cup", "∪︀": "cups", "∫": "int", "∬": "Int", "∭": "tint", "⨌": "qint", "∮": "oint", "∯": "Conint", "∰": "Cconint", "∱": "cwint", "∲": "cwconint", "∳": "awconint", "∴": "there4", "∵": "becaus", "∶": "ratio", "∷": "Colon", "∸": "minusd", "∺": "mDDot", "∻": "homtht", "∼": "sim", "≁": "nsim", "∼⃒": "nvsim", "∽": "bsim", "∽̱": "race", "∾": "ac", "∾̳": "acE", "∿": "acd", "≀": "wr", "≂": "esim", "≂̸": "nesim", "≃": "sime", "≄": "nsime", "≅": "cong", "≇": "ncong", "≆": "simne", "≈": "ap", "≉": "nap", "≊": "ape", "≋": "apid", "≋̸": "napid", "≌": "bcong", "≍": "CupCap", "≭": "NotCupCap", "≍⃒": "nvap", "≎": "bump", "≎̸": "nbump", "≏": "bumpe", "≏̸": "nbumpe", "≐": "doteq", "≐̸": "nedot", "≑": "eDot", "≒": "efDot", "≓": "erDot", "≔": "colone", "≕": "ecolon", "≖": "ecir", "≗": "cire", "≙": "wedgeq", "≚": "veeeq", "≜": "trie", "≟": "equest", "≡": "equiv", "≢": "nequiv", "≡⃥": "bnequiv", "≤": "le", "≰": "nle", "≤⃒": "nvle", "≥": "ge", "≱": "nge", "≥⃒": "nvge", "≦": "lE", "≦̸": "nlE", "≧": "gE", "≧̸": "ngE", "≨︀": "lvnE", "≨": "lnE", "≩": "gnE", "≩︀": "gvnE", "≪": "ll", "≪̸": "nLtv", "≪⃒": "nLt", "≫": "gg", "≫̸": "nGtv", "≫⃒": "nGt", "≬": "twixt", "≲": "lsim", "≴": "nlsim", "≳": "gsim", "≵": "ngsim", "≶": "lg", "≸": "ntlg", "≷": "gl", "≹": "ntgl", "≺": "pr", "⊀": "npr", "≻": "sc", "⊁": "nsc", "≼": "prcue", "⋠": "nprcue", "≽": "sccue", "⋡": "nsccue", "≾": "prsim", "≿": "scsim", "≿̸": "NotSucceedsTilde", "⊂": "sub", "⊄": "nsub", "⊂⃒": "vnsub", "⊃": "sup", "⊅": "nsup", "⊃⃒": "vnsup", "⊆": "sube", "⊈": "nsube", "⊇": "supe", "⊉": "nsupe", "⊊︀": "vsubne", "⊊": "subne", "⊋︀": "vsupne", "⊋": "supne", "⊍": "cupdot", "⊎": "uplus", "⊏": "sqsub", "⊏̸": "NotSquareSubset", "⊐": "sqsup", "⊐̸": "NotSquareSuperset", "⊑": "sqsube", "⋢": "nsqsube", "⊒": "sqsupe", "⋣": "nsqsupe", "⊓": "sqcap", "⊓︀": "sqcaps", "⊔": "sqcup", "⊔︀": "sqcups", "⊕": "oplus", "⊖": "ominus", "⊗": "otimes", "⊘": "osol", "⊙": "odot", "⊚": "ocir", "⊛": "oast", "⊝": "odash", "⊞": "plusb", "⊟": "minusb", "⊠": "timesb", "⊡": "sdotb", "⊢": "vdash", "⊬": "nvdash", "⊣": "dashv", "⊤": "top", "⊥": "bot", "⊧": "models", "⊨": "vDash", "⊭": "nvDash", "⊩": "Vdash", "⊮": "nVdash", "⊪": "Vvdash", "⊫": "VDash", "⊯": "nVDash", "⊰": "prurel", "⊲": "vltri", "⋪": "nltri", "⊳": "vrtri", "⋫": "nrtri", "⊴": "ltrie", "⋬": "nltrie", "⊴⃒": "nvltrie", "⊵": "rtrie", "⋭": "nrtrie", "⊵⃒": "nvrtrie", "⊶": "origof", "⊷": "imof", "⊸": "mumap", "⊹": "hercon", "⊺": "intcal", "⊻": "veebar", "⊽": "barvee", "⊾": "angrtvb", "⊿": "lrtri", "⋀": "Wedge", "⋁": "Vee", "⋂": "xcap", "⋃": "xcup", "⋄": "diam", "⋅": "sdot", "⋆": "Star", "⋇": "divonx", "⋈": "bowtie", "⋉": "ltimes", "⋊": "rtimes", "⋋": "lthree", "⋌": "rthree", "⋍": "bsime", "⋎": "cuvee", "⋏": "cuwed", "⋐": "Sub", "⋑": "Sup", "⋒": "Cap", "⋓": "Cup", "⋔": "fork", "⋕": "epar", "⋖": "ltdot", "⋗": "gtdot", "⋘": "Ll", "⋘̸": "nLl", "⋙": "Gg", "⋙̸": "nGg", "⋚︀": "lesg", "⋚": "leg", "⋛": "gel", "⋛︀": "gesl", "⋞": "cuepr", "⋟": "cuesc", "⋦": "lnsim", "⋧": "gnsim", "⋨": "prnsim", "⋩": "scnsim", "⋮": "vellip", "⋯": "ctdot", "⋰": "utdot", "⋱": "dtdot", "⋲": "disin", "⋳": "isinsv", "⋴": "isins", "⋵": "isindot", "⋵̸": "notindot", "⋶": "notinvc", "⋷": "notinvb", "⋹": "isinE", "⋹̸": "notinE", "⋺": "nisd", "⋻": "xnis", "⋼": "nis", "⋽": "notnivc", "⋾": "notnivb", "⌅": "barwed", "⌆": "Barwed", "⌌": "drcrop", "⌍": "dlcrop", "⌎": "urcrop", "⌏": "ulcrop", "⌐": "bnot", "⌒": "profline", "⌓": "profsurf", "⌕": "telrec", "⌖": "target", "⌜": "ulcorn", "⌝": "urcorn", "⌞": "dlcorn", "⌟": "drcorn", "⌢": "frown", "⌣": "smile", "⌭": "cylcty", "⌮": "profalar", "⌶": "topbot", "⌽": "ovbar", "⌿": "solbar", "⍼": "angzarr", "⎰": "lmoust", "⎱": "rmoust", "⎴": "tbrk", "⎵": "bbrk", "⎶": "bbrktbrk", "⏜": "OverParenthesis", "⏝": "UnderParenthesis", "⏞": "OverBrace", "⏟": "UnderBrace", "⏢": "trpezium", "⏧": "elinters", "␣": "blank", "─": "boxh", "│": "boxv", "┌": "boxdr", "┐": "boxdl", "└": "boxur", "┘": "boxul", "├": "boxvr", "┤": "boxvl", "┬": "boxhd", "┴": "boxhu", "┼": "boxvh", "═": "boxH", "║": "boxV", "╒": "boxdR", "╓": "boxDr", "╔": "boxDR", "╕": "boxdL", "╖": "boxDl", "╗": "boxDL", "╘": "boxuR", "╙": "boxUr", "╚": "boxUR", "╛": "boxuL", "╜": "boxUl", "╝": "boxUL", "╞": "boxvR", "╟": "boxVr", "╠": "boxVR", "╡": "boxvL", "╢": "boxVl", "╣": "boxVL", "╤": "boxHd", "╥": "boxhD", "╦": "boxHD", "╧": "boxHu", "╨": "boxhU", "╩": "boxHU", "╪": "boxvH", "╫": "boxVh", "╬": "boxVH", "▀": "uhblk", "▄": "lhblk", "█": "block", "░": "blk14", "▒": "blk12", "▓": "blk34", "□": "squ", "▪": "squf", "▫": "EmptyVerySmallSquare", "▭": "rect", "▮": "marker", "▱": "fltns", "△": "xutri", "▴": "utrif", "▵": "utri", "▸": "rtrif", "▹": "rtri", "▽": "xdtri", "▾": "dtrif", "▿": "dtri", "◂": "ltrif", "◃": "ltri", "◊": "loz", "○": "cir", "◬": "tridot", "◯": "xcirc", "◸": "ultri", "◹": "urtri", "◺": "lltri", "◻": "EmptySmallSquare", "◼": "FilledSmallSquare", "★": "starf", "☆": "star", "☎": "phone", "♀": "female", "♂": "male", "♠": "spades", "♣": "clubs", "♥": "hearts", "♦": "diams", "♪": "sung", "✓": "check", "✗": "cross", "✠": "malt", "✶": "sext", "❘": "VerticalSeparator", "⟈": "bsolhsub", "⟉": "suphsol", "⟵": "xlarr", "⟶": "xrarr", "⟷": "xharr", "⟸": "xlArr", "⟹": "xrArr", "⟺": "xhArr", "⟼": "xmap", "⟿": "dzigrarr", "⤂": "nvlArr", "⤃": "nvrArr", "⤄": "nvHarr", "⤅": "Map", "⤌": "lbarr", "⤍": "rbarr", "⤎": "lBarr", "⤏": "rBarr", "⤐": "RBarr", "⤑": "DDotrahd", "⤒": "UpArrowBar", "⤓": "DownArrowBar", "⤖": "Rarrtl", "⤙": "latail", "⤚": "ratail", "⤛": "lAtail", "⤜": "rAtail", "⤝": "larrfs", "⤞": "rarrfs", "⤟": "larrbfs", "⤠": "rarrbfs", "⤣": "nwarhk", "⤤": "nearhk", "⤥": "searhk", "⤦": "swarhk", "⤧": "nwnear", "⤨": "toea", "⤩": "tosa", "⤪": "swnwar", "⤳": "rarrc", "⤳̸": "nrarrc", "⤵": "cudarrr", "⤶": "ldca", "⤷": "rdca", "⤸": "cudarrl", "⤹": "larrpl", "⤼": "curarrm", "⤽": "cularrp", "⥅": "rarrpl", "⥈": "harrcir", "⥉": "Uarrocir", "⥊": "lurdshar", "⥋": "ldrushar", "⥎": "LeftRightVector", "⥏": "RightUpDownVector", "⥐": "DownLeftRightVector", "⥑": "LeftUpDownVector", "⥒": "LeftVectorBar", "⥓": "RightVectorBar", "⥔": "RightUpVectorBar", "⥕": "RightDownVectorBar", "⥖": "DownLeftVectorBar", "⥗": "DownRightVectorBar", "⥘": "LeftUpVectorBar", "⥙": "LeftDownVectorBar", "⥚": "LeftTeeVector", "⥛": "RightTeeVector", "⥜": "RightUpTeeVector", "⥝": "RightDownTeeVector", "⥞": "DownLeftTeeVector", "⥟": "DownRightTeeVector", "⥠": "LeftUpTeeVector", "⥡": "LeftDownTeeVector", "⥢": "lHar", "⥣": "uHar", "⥤": "rHar", "⥥": "dHar", "⥦": "luruhar", "⥧": "ldrdhar", "⥨": "ruluhar", "⥩": "rdldhar", "⥪": "lharul", "⥫": "llhard", "⥬": "rharul", "⥭": "lrhard", "⥮": "udhar", "⥯": "duhar", "⥰": "RoundImplies", "⥱": "erarr", "⥲": "simrarr", "⥳": "larrsim", "⥴": "rarrsim", "⥵": "rarrap", "⥶": "ltlarr", "⥸": "gtrarr", "⥹": "subrarr", "⥻": "suplarr", "⥼": "lfisht", "⥽": "rfisht", "⥾": "ufisht", "⥿": "dfisht", "⦚": "vzigzag", "⦜": "vangrt", "⦝": "angrtvbd", "⦤": "ange", "⦥": "range", "⦦": "dwangle", "⦧": "uwangle", "⦨": "angmsdaa", "⦩": "angmsdab", "⦪": "angmsdac", "⦫": "angmsdad", "⦬": "angmsdae", "⦭": "angmsdaf", "⦮": "angmsdag", "⦯": "angmsdah", "⦰": "bemptyv", "⦱": "demptyv", "⦲": "cemptyv", "⦳": "raemptyv", "⦴": "laemptyv", "⦵": "ohbar", "⦶": "omid", "⦷": "opar", "⦹": "operp", "⦻": "olcross", "⦼": "odsold", "⦾": "olcir", "⦿": "ofcir", "⧀": "olt", "⧁": "ogt", "⧂": "cirscir", "⧃": "cirE", "⧄": "solb", "⧅": "bsolb", "⧉": "boxbox", "⧍": "trisb", "⧎": "rtriltri", "⧏": "LeftTriangleBar", "⧏̸": "NotLeftTriangleBar", "⧐": "RightTriangleBar", "⧐̸": "NotRightTriangleBar", "⧜": "iinfin", "⧝": "infintie", "⧞": "nvinfin", "⧣": "eparsl", "⧤": "smeparsl", "⧥": "eqvparsl", "⧫": "lozf", "⧴": "RuleDelayed", "⧶": "dsol", "⨀": "xodot", "⨁": "xoplus", "⨂": "xotime", "⨄": "xuplus", "⨆": "xsqcup", "⨍": "fpartint", "⨐": "cirfnint", "⨑": "awint", "⨒": "rppolint", "⨓": "scpolint", "⨔": "npolint", "⨕": "pointint", "⨖": "quatint", "⨗": "intlarhk", "⨢": "pluscir", "⨣": "plusacir", "⨤": "simplus", "⨥": "plusdu", "⨦": "plussim", "⨧": "plustwo", "⨩": "mcomma", "⨪": "minusdu", "⨭": "loplus", "⨮": "roplus", "⨯": "Cross", "⨰": "timesd", "⨱": "timesbar", "⨳": "smashp", "⨴": "lotimes", "⨵": "rotimes", "⨶": "otimesas", "⨷": "Otimes", "⨸": "odiv", "⨹": "triplus", "⨺": "triminus", "⨻": "tritime", "⨼": "iprod", "⨿": "amalg", "⩀": "capdot", "⩂": "ncup", "⩃": "ncap", "⩄": "capand", "⩅": "cupor", "⩆": "cupcap", "⩇": "capcup", "⩈": "cupbrcap", "⩉": "capbrcup", "⩊": "cupcup", "⩋": "capcap", "⩌": "ccups", "⩍": "ccaps", "⩐": "ccupssm", "⩓": "And", "⩔": "Or", "⩕": "andand", "⩖": "oror", "⩗": "orslope", "⩘": "andslope", "⩚": "andv", "⩛": "orv", "⩜": "andd", "⩝": "ord", "⩟": "wedbar", "⩦": "sdote", "⩪": "simdot", "⩭": "congdot", "⩭̸": "ncongdot", "⩮": "easter", "⩯": "apacir", "⩰": "apE", "⩰̸": "napE", "⩱": "eplus", "⩲": "pluse", "⩳": "Esim", "⩷": "eDDot", "⩸": "equivDD", "⩹": "ltcir", "⩺": "gtcir", "⩻": "ltquest", "⩼": "gtquest", "⩽": "les", "⩽̸": "nles", "⩾": "ges", "⩾̸": "nges", "⩿": "lesdot", "⪀": "gesdot", "⪁": "lesdoto", "⪂": "gesdoto", "⪃": "lesdotor", "⪄": "gesdotol", "⪅": "lap", "⪆": "gap", "⪇": "lne", "⪈": "gne", "⪉": "lnap", "⪊": "gnap", "⪋": "lEg", "⪌": "gEl", "⪍": "lsime", "⪎": "gsime", "⪏": "lsimg", "⪐": "gsiml", "⪑": "lgE", "⪒": "glE", "⪓": "lesges", "⪔": "gesles", "⪕": "els", "⪖": "egs", "⪗": "elsdot", "⪘": "egsdot", "⪙": "el", "⪚": "eg", "⪝": "siml", "⪞": "simg", "⪟": "simlE", "⪠": "simgE", "⪡": "LessLess", "⪡̸": "NotNestedLessLess", "⪢": "GreaterGreater", "⪢̸": "NotNestedGreaterGreater", "⪤": "glj", "⪥": "gla", "⪦": "ltcc", "⪧": "gtcc", "⪨": "lescc", "⪩": "gescc", "⪪": "smt", "⪫": "lat", "⪬": "smte", "⪬︀": "smtes", "⪭": "late", "⪭︀": "lates", "⪮": "bumpE", "⪯": "pre", "⪯̸": "npre", "⪰": "sce", "⪰̸": "nsce", "⪳": "prE", "⪴": "scE", "⪵": "prnE", "⪶": "scnE", "⪷": "prap", "⪸": "scap", "⪹": "prnap", "⪺": "scnap", "⪻": "Pr", "⪼": "Sc", "⪽": "subdot", "⪾": "supdot", "⪿": "subplus", "⫀": "supplus", "⫁": "submult", "⫂": "supmult", "⫃": "subedot", "⫄": "supedot", "⫅": "subE", "⫅̸": "nsubE", "⫆": "supE", "⫆̸": "nsupE", "⫇": "subsim", "⫈": "supsim", "⫋︀": "vsubnE", "⫋": "subnE", "⫌︀": "vsupnE", "⫌": "supnE", "⫏": "csub", "⫐": "csup", "⫑": "csube", "⫒": "csupe", "⫓": "subsup", "⫔": "supsub", "⫕": "subsub", "⫖": "supsup", "⫗": "suphsub", "⫘": "supdsub", "⫙": "forkv", "⫚": "topfork", "⫛": "mlcp", "⫤": "Dashv", "⫦": "Vdashl", "⫧": "Barv", "⫨": "vBar", "⫩": "vBarv", "⫫": "Vbar", "⫬": "Not", "⫭": "bNot", "⫮": "rnmid", "⫯": "cirmid", "⫰": "midcir", "⫱": "topcir", "⫲": "nhpar", "⫳": "parsim", "⫽": "parsl", "⫽⃥": "nparsl", "♭": "flat", "♮": "natur", "♯": "sharp", "¤": "curren", "¢": "cent", "$": "dollar", "£": "pound", "¥": "yen", "€": "euro", "¹": "sup1", "½": "half", "⅓": "frac13", "¼": "frac14", "⅕": "frac15", "⅙": "frac16", "⅛": "frac18", "²": "sup2", "⅔": "frac23", "⅖": "frac25", "³": "sup3", "¾": "frac34", "⅗": "frac35", "⅜": "frac38", "⅘": "frac45", "⅚": "frac56", "⅝": "frac58", "⅞": "frac78", "𝒶": "ascr", "𝕒": "aopf", "𝔞": "afr", "𝔸": "Aopf", "𝔄": "Afr", "𝒜": "Ascr", "ª": "ordf", "á": "aacute", "Á": "Aacute", "à": "agrave", "À": "Agrave", "ă": "abreve", "Ă": "Abreve", "â": "acirc", "Â": "Acirc", "å": "aring", "Å": "angst", "ä": "auml", "Ä": "Auml", "ã": "atilde", "Ã": "Atilde", "ą": "aogon", "Ą": "Aogon", "ā": "amacr", "Ā": "Amacr", "æ": "aelig", "Æ": "AElig", "𝒷": "bscr", "𝕓": "bopf", "𝔟": "bfr", "𝔹": "Bopf", "ℬ": "Bscr", "𝔅": "Bfr", "𝔠": "cfr", "𝒸": "cscr", "𝕔": "copf", "ℭ": "Cfr", "𝒞": "Cscr", "ℂ": "Copf", "ć": "cacute", "Ć": "Cacute", "ĉ": "ccirc", "Ĉ": "Ccirc", "č": "ccaron", "Č": "Ccaron", "ċ": "cdot", "Ċ": "Cdot", "ç": "ccedil", "Ç": "Ccedil", "℅": "incare", "𝔡": "dfr", "ⅆ": "dd", "𝕕": "dopf", "𝒹": "dscr", "𝒟": "Dscr", "𝔇": "Dfr", "ⅅ": "DD", "𝔻": "Dopf", "ď": "dcaron", "Ď": "Dcaron", "đ": "dstrok", "Đ": "Dstrok", "ð": "eth", "Ð": "ETH", "ⅇ": "ee", "ℯ": "escr", "𝔢": "efr", "𝕖": "eopf", "ℰ": "Escr", "𝔈": "Efr", "𝔼": "Eopf", "é": "eacute", "É": "Eacute", "è": "egrave", "È": "Egrave", "ê": "ecirc", "Ê": "Ecirc", "ě": "ecaron", "Ě": "Ecaron", "ë": "euml", "Ë": "Euml", "ė": "edot", "Ė": "Edot", "ę": "eogon", "Ę": "Eogon", "ē": "emacr", "Ē": "Emacr", "𝔣": "ffr", "𝕗": "fopf", "𝒻": "fscr", "𝔉": "Ffr", "𝔽": "Fopf", "ℱ": "Fscr", "ff": "fflig", "ffi": "ffilig", "ffl": "ffllig", "fi": "filig", "fj": "fjlig", "fl": "fllig", "ƒ": "fnof", "ℊ": "gscr", "𝕘": "gopf", "𝔤": "gfr", "𝒢": "Gscr", "𝔾": "Gopf", "𝔊": "Gfr", "ǵ": "gacute", "ğ": "gbreve", "Ğ": "Gbreve", "ĝ": "gcirc", "Ĝ": "Gcirc", "ġ": "gdot", "Ġ": "Gdot", "Ģ": "Gcedil", "𝔥": "hfr", "ℎ": "planckh", "𝒽": "hscr", "𝕙": "hopf", "ℋ": "Hscr", "ℌ": "Hfr", "ℍ": "Hopf", "ĥ": "hcirc", "Ĥ": "Hcirc", "ℏ": "hbar", "ħ": "hstrok", "Ħ": "Hstrok", "𝕚": "iopf", "𝔦": "ifr", "𝒾": "iscr", "ⅈ": "ii", "𝕀": "Iopf", "ℐ": "Iscr", "ℑ": "Im", "í": "iacute", "Í": "Iacute", "ì": "igrave", "Ì": "Igrave", "î": "icirc", "Î": "Icirc", "ï": "iuml", "Ï": "Iuml", "ĩ": "itilde", "Ĩ": "Itilde", "İ": "Idot", "į": "iogon", "Į": "Iogon", "ī": "imacr", "Ī": "Imacr", "ij": "ijlig", "IJ": "IJlig", "ı": "imath", "𝒿": "jscr", "𝕛": "jopf", "𝔧": "jfr", "𝒥": "Jscr", "𝔍": "Jfr", "𝕁": "Jopf", "ĵ": "jcirc", "Ĵ": "Jcirc", "ȷ": "jmath", "𝕜": "kopf", "𝓀": "kscr", "𝔨": "kfr", "𝒦": "Kscr", "𝕂": "Kopf", "𝔎": "Kfr", "ķ": "kcedil", "Ķ": "Kcedil", "𝔩": "lfr", "𝓁": "lscr", "ℓ": "ell", "𝕝": "lopf", "ℒ": "Lscr", "𝔏": "Lfr", "𝕃": "Lopf", "ĺ": "lacute", "Ĺ": "Lacute", "ľ": "lcaron", "Ľ": "Lcaron", "ļ": "lcedil", "Ļ": "Lcedil", "ł": "lstrok", "Ł": "Lstrok", "ŀ": "lmidot", "Ŀ": "Lmidot", "𝔪": "mfr", "𝕞": "mopf", "𝓂": "mscr", "𝔐": "Mfr", "𝕄": "Mopf", "ℳ": "Mscr", "𝔫": "nfr", "𝕟": "nopf", "𝓃": "nscr", "ℕ": "Nopf", "𝒩": "Nscr", "𝔑": "Nfr", "ń": "nacute", "Ń": "Nacute", "ň": "ncaron", "Ň": "Ncaron", "ñ": "ntilde", "Ñ": "Ntilde", "ņ": "ncedil", "Ņ": "Ncedil", "№": "numero", "ŋ": "eng", "Ŋ": "ENG", "𝕠": "oopf", "𝔬": "ofr", "ℴ": "oscr", "𝒪": "Oscr", "𝔒": "Ofr", "𝕆": "Oopf", "º": "ordm", "ó": "oacute", "Ó": "Oacute", "ò": "ograve", "Ò": "Ograve", "ô": "ocirc", "Ô": "Ocirc", "ö": "ouml", "Ö": "Ouml", "ő": "odblac", "Ő": "Odblac", "õ": "otilde", "Õ": "Otilde", "ø": "oslash", "Ø": "Oslash", "ō": "omacr", "Ō": "Omacr", "œ": "oelig", "Œ": "OElig", "𝔭": "pfr", "𝓅": "pscr", "𝕡": "popf", "ℙ": "Popf", "𝔓": "Pfr", "𝒫": "Pscr", "𝕢": "qopf", "𝔮": "qfr", "𝓆": "qscr", "𝒬": "Qscr", "𝔔": "Qfr", "ℚ": "Qopf", "ĸ": "kgreen", "𝔯": "rfr", "𝕣": "ropf", "𝓇": "rscr", "ℛ": "Rscr", "ℜ": "Re", "ℝ": "Ropf", "ŕ": "racute", "Ŕ": "Racute", "ř": "rcaron", "Ř": "Rcaron", "ŗ": "rcedil", "Ŗ": "Rcedil", "𝕤": "sopf", "𝓈": "sscr", "𝔰": "sfr", "𝕊": "Sopf", "𝔖": "Sfr", "𝒮": "Sscr", "Ⓢ": "oS", "ś": "sacute", "Ś": "Sacute", "ŝ": "scirc", "Ŝ": "Scirc", "š": "scaron", "Š": "Scaron", "ş": "scedil", "Ş": "Scedil", "ß": "szlig", "𝔱": "tfr", "𝓉": "tscr", "𝕥": "topf", "𝒯": "Tscr", "𝔗": "Tfr", "𝕋": "Topf", "ť": "tcaron", "Ť": "Tcaron", "ţ": "tcedil", "Ţ": "Tcedil", "™": "trade", "ŧ": "tstrok", "Ŧ": "Tstrok", "𝓊": "uscr", "𝕦": "uopf", "𝔲": "ufr", "𝕌": "Uopf", "𝔘": "Ufr", "𝒰": "Uscr", "ú": "uacute", "Ú": "Uacute", "ù": "ugrave", "Ù": "Ugrave", "ŭ": "ubreve", "Ŭ": "Ubreve", "û": "ucirc", "Û": "Ucirc", "ů": "uring", "Ů": "Uring", "ü": "uuml", "Ü": "Uuml", "ű": "udblac", "Ű": "Udblac", "ũ": "utilde", "Ũ": "Utilde", "ų": "uogon", "Ų": "Uogon", "ū": "umacr", "Ū": "Umacr", "𝔳": "vfr", "𝕧": "vopf", "𝓋": "vscr", "𝔙": "Vfr", "𝕍": "Vopf", "𝒱": "Vscr", "𝕨": "wopf", "𝓌": "wscr", "𝔴": "wfr", "𝒲": "Wscr", "𝕎": "Wopf", "𝔚": "Wfr", "ŵ": "wcirc", "Ŵ": "Wcirc", "𝔵": "xfr", "𝓍": "xscr", "𝕩": "xopf", "𝕏": "Xopf", "𝔛": "Xfr", "𝒳": "Xscr", "𝔶": "yfr", "𝓎": "yscr", "𝕪": "yopf", "𝒴": "Yscr", "𝔜": "Yfr", "𝕐": "Yopf", "ý": "yacute", "Ý": "Yacute", "ŷ": "ycirc", "Ŷ": "Ycirc", "ÿ": "yuml", "Ÿ": "Yuml", "𝓏": "zscr", "𝔷": "zfr", "𝕫": "zopf", "ℨ": "Zfr", "ℤ": "Zopf", "𝒵": "Zscr", "ź": "zacute", "Ź": "Zacute", "ž": "zcaron", "Ž": "Zcaron", "ż": "zdot", "Ż": "Zdot", "Ƶ": "imped", "þ": "thorn", "Þ": "THORN", "ʼn": "napos", "α": "alpha", "Α": "Alpha", "β": "beta", "Β": "Beta", "γ": "gamma", "Γ": "Gamma", "δ": "delta", "Δ": "Delta", "ε": "epsi", "ϵ": "epsiv", "Ε": "Epsilon", "ϝ": "gammad", "Ϝ": "Gammad", "ζ": "zeta", "Ζ": "Zeta", "η": "eta", "Η": "Eta", "θ": "theta", "ϑ": "thetav", "Θ": "Theta", "ι": "iota", "Ι": "Iota", "κ": "kappa", "ϰ": "kappav", "Κ": "Kappa", "λ": "lambda", "Λ": "Lambda", "μ": "mu", "µ": "micro", "Μ": "Mu", "ν": "nu", "Ν": "Nu", "ξ": "xi", "Ξ": "Xi", "ο": "omicron", "Ο": "Omicron", "π": "pi", "ϖ": "piv", "Π": "Pi", "ρ": "rho", "ϱ": "rhov", "Ρ": "Rho", "σ": "sigma", "Σ": "Sigma", "ς": "sigmaf", "τ": "tau", "Τ": "Tau", "υ": "upsi", "Υ": "Upsilon", "ϒ": "Upsi", "φ": "phi", "ϕ": "phiv", "Φ": "Phi", "χ": "chi", "Χ": "Chi", "ψ": "psi", "Ψ": "Psi", "ω": "omega", "Ω": "ohm", "а": "acy", "А": "Acy", "б": "bcy", "Б": "Bcy", "в": "vcy", "В": "Vcy", "г": "gcy", "Г": "Gcy", "ѓ": "gjcy", "Ѓ": "GJcy", "д": "dcy", "Д": "Dcy", "ђ": "djcy", "Ђ": "DJcy", "е": "iecy", "Е": "IEcy", "ё": "iocy", "Ё": "IOcy", "є": "jukcy", "Є": "Jukcy", "ж": "zhcy", "Ж": "ZHcy", "з": "zcy", "З": "Zcy", "ѕ": "dscy", "Ѕ": "DScy", "и": "icy", "И": "Icy", "і": "iukcy", "І": "Iukcy", "ї": "yicy", "Ї": "YIcy", "й": "jcy", "Й": "Jcy", "ј": "jsercy", "Ј": "Jsercy", "к": "kcy", "К": "Kcy", "ќ": "kjcy", "Ќ": "KJcy", "л": "lcy", "Л": "Lcy", "љ": "ljcy", "Љ": "LJcy", "м": "mcy", "М": "Mcy", "н": "ncy", "Н": "Ncy", "њ": "njcy", "Њ": "NJcy", "о": "ocy", "О": "Ocy", "п": "pcy", "П": "Pcy", "р": "rcy", "Р": "Rcy", "с": "scy", "С": "Scy", "т": "tcy", "Т": "Tcy", "ћ": "tshcy", "Ћ": "TSHcy", "у": "ucy", "У": "Ucy", "ў": "ubrcy", "Ў": "Ubrcy", "ф": "fcy", "Ф": "Fcy", "х": "khcy", "Х": "KHcy", "ц": "tscy", "Ц": "TScy", "ч": "chcy", "Ч": "CHcy", "џ": "dzcy", "Џ": "DZcy", "ш": "shcy", "Ш": "SHcy", "щ": "shchcy", "Щ": "SHCHcy", "ъ": "hardcy", "Ъ": "HARDcy", "ы": "ycy", "Ы": "Ycy", "ь": "softcy", "Ь": "SOFTcy", "э": "ecy", "Э": "Ecy", "ю": "yucy", "Ю": "YUcy", "я": "yacy", "Я": "YAcy", "ℵ": "aleph", "ℶ": "beth", "ℷ": "gimel", "ℸ": "daleth" };
var regexEscape = /["&'<>`]/g;
var escapeMap = {
'"': """,
"&": "&",
"'": "'",
"<": "<",
// See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the
// following is not strictly necessary unless it’s part of a tag or an
// unquoted attribute value. We’re only escaping it to support those
// situations, and for XML support.
">": ">",
// In Internet Explorer ≤ 8, the backtick character can be used
// to break out of (un)quoted attribute values or HTML comments.
// See http://html5sec.org/#102, http://html5sec.org/#108, and
// http://html5sec.org/#133.
"`": "`"
};
var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;
var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;
var decodeMap = { "aacute": "á", "Aacute": "Á", "abreve": "ă", "Abreve": "Ă", "ac": "∾", "acd": "∿", "acE": "∾̳", "acirc": "â", "Acirc": "Â", "acute": "´", "acy": "а", "Acy": "А", "aelig": "æ", "AElig": "Æ", "af": "", "afr": "𝔞", "Afr": "𝔄", "agrave": "à", "Agrave": "À", "alefsym": "ℵ", "aleph": "ℵ", "alpha": "α", "Alpha": "Α", "amacr": "ā", "Amacr": "Ā", "amalg": "⨿", "amp": "&", "AMP": "&", "and": "∧", "And": "⩓", "andand": "⩕", "andd": "⩜", "andslope": "⩘", "andv": "⩚", "ang": "∠", "ange": "⦤", "angle": "∠", "angmsd": "∡", "angmsdaa": "⦨", "angmsdab": "⦩", "angmsdac": "⦪", "angmsdad": "⦫", "angmsdae": "⦬", "angmsdaf": "⦭", "angmsdag": "⦮", "angmsdah": "⦯", "angrt": "∟", "angrtvb": "⊾", "angrtvbd": "⦝", "angsph": "∢", "angst": "Å", "angzarr": "⍼", "aogon": "ą", "Aogon": "Ą", "aopf": "𝕒", "Aopf": "𝔸", "ap": "≈", "apacir": "⩯", "ape": "≊", "apE": "⩰", "apid": "≋", "apos": "'", "ApplyFunction": "", "approx": "≈", "approxeq": "≊", "aring": "å", "Aring": "Å", "ascr": "𝒶", "Ascr": "𝒜", "Assign": "≔", "ast": "*", "asymp": "≈", "asympeq": "≍", "atilde": "ã", "Atilde": "Ã", "auml": "ä", "Auml": "Ä", "awconint": "∳", "awint": "⨑", "backcong": "≌", "backepsilon": "϶", "backprime": "‵", "backsim": "∽", "backsimeq": "⋍", "Backslash": "∖", "Barv": "⫧", "barvee": "⊽", "barwed": "⌅", "Barwed": "⌆", "barwedge": "⌅", "bbrk": "⎵", "bbrktbrk": "⎶", "bcong": "≌", "bcy": "б", "Bcy": "Б", "bdquo": "„", "becaus": "∵", "because": "∵", "Because": "∵", "bemptyv": "⦰", "bepsi": "϶", "bernou": "ℬ", "Bernoullis": "ℬ", "beta": "β", "Beta": "Β", "beth": "ℶ", "between": "≬", "bfr": "𝔟", "Bfr": "𝔅", "bigcap": "⋂", "bigcirc": "◯", "bigcup": "⋃", "bigodot": "⨀", "bigoplus": "⨁", "bigotimes": "⨂", "bigsqcup": "⨆", "bigstar": "★", "bigtriangledown": "▽", "bigtriangleup": "△", "biguplus": "⨄", "bigvee": "⋁", "bigwedge": "⋀", "bkarow": "⤍", "blacklozenge": "⧫", "blacksquare": "▪", "blacktriangle": "▴", "blacktriangledown": "▾", "blacktriangleleft": "◂", "blacktriangleright": "▸", "blank": "␣", "blk12": "▒", "blk14": "░", "blk34": "▓", "block": "█", "bne": "=⃥", "bnequiv": "≡⃥", "bnot": "⌐", "bNot": "⫭", "bopf": "𝕓", "Bopf": "𝔹", "bot": "⊥", "bottom": "⊥", "bowtie": "⋈", "boxbox": "⧉", "boxdl": "┐", "boxdL": "╕", "boxDl": "╖", "boxDL": "╗", "boxdr": "┌", "boxdR": "╒", "boxDr": "╓", "boxDR": "╔", "boxh": "─", "boxH": "═", "boxhd": "┬", "boxhD": "╥", "boxHd": "╤", "boxHD": "╦", "boxhu": "┴", "boxhU": "╨", "boxHu": "╧", "boxHU": "╩", "boxminus": "⊟", "boxplus": "⊞", "boxtimes": "⊠", "boxul": "┘", "boxuL": "╛", "boxUl": "╜", "boxUL": "╝", "boxur": "└", "boxuR": "╘", "boxUr": "╙", "boxUR": "╚", "boxv": "│", "boxV": "║", "boxvh": "┼", "boxvH": "╪", "boxVh": "╫", "boxVH": "╬", "boxvl": "┤", "boxvL": "╡", "boxVl": "╢", "boxVL": "╣", "boxvr": "├", "boxvR": "╞", "boxVr": "╟", "boxVR": "╠", "bprime": "‵", "breve": "˘", "Breve": "˘", "brvbar": "¦", "bscr": "𝒷", "Bscr": "ℬ", "bsemi": "⁏", "bsim": "∽", "bsime": "⋍", "bsol": "\\", "bsolb": "⧅", "bsolhsub": "⟈", "bull": "•", "bullet": "•", "bump": "≎", "bumpe": "≏", "bumpE": "⪮", "bumpeq": "≏", "Bumpeq": "≎", "cacute": "ć", "Cacute": "Ć", "cap": "∩", "Cap": "⋒", "capand": "⩄", "capbrcup": "⩉", "capcap": "⩋", "capcup": "⩇", "capdot": "⩀", "CapitalDifferentialD": "ⅅ", "caps": "∩︀", "caret": "⁁", "caron": "ˇ", "Cayleys": "ℭ", "ccaps": "⩍", "ccaron": "č", "Ccaron": "Č", "ccedil": "ç", "Ccedil": "Ç", "ccirc": "ĉ", "Ccirc": "Ĉ", "Cconint": "∰", "ccups": "⩌", "ccupssm": "⩐", "cdot": "ċ", "Cdot": "Ċ", "cedil": "¸", "Cedilla": "¸", "cemptyv": "⦲", "cent": "¢", "centerdot": "·", "CenterDot": "·", "cfr": "𝔠", "Cfr": "ℭ", "chcy": "ч", "CHcy": "Ч", "check": "✓", "checkmark": "✓", "chi": "χ", "Chi": "Χ", "cir": "○", "circ": "ˆ", "circeq": "≗", "circlearrowleft": "↺", "circlearrowright": "↻", "circledast": "⊛", "circledcirc": "⊚", "circleddash": "⊝", "CircleDot": "⊙", "circledR": "®", "circledS": "Ⓢ", "CircleMinus": "⊖", "CirclePlus": "⊕", "CircleTimes": "⊗", "cire": "≗", "cirE": "⧃", "cirfnint": "⨐", "cirmid": "⫯", "cirscir": "⧂", "ClockwiseContourIntegral": "∲", "CloseCurlyDoubleQuote": "”", "CloseCurlyQuote": "’", "clubs": "♣", "clubsuit": "♣", "colon": ":", "Colon": "∷", "colone": "≔", "Colone": "⩴", "coloneq": "≔", "comma": ",", "commat": "@", "comp": "∁", "compfn": "∘", "complement": "∁", "complexes": "ℂ", "cong": "≅", "congdot": "⩭", "Congruent": "≡", "conint": "∮", "Conint": "∯", "ContourIntegral": "∮", "copf": "𝕔", "Copf": "ℂ", "coprod": "∐", "Coproduct": "∐", "copy": "©", "COPY": "©", "copysr": "℗", "CounterClockwiseContourIntegral": "∳", "crarr": "↵", "cross": "✗", "Cross": "⨯", "cscr": "𝒸", "Cscr": "𝒞", "csub": "⫏", "csube": "⫑", "csup": "⫐", "csupe": "⫒", "ctdot": "⋯", "cudarrl": "⤸", "cudarrr": "⤵", "cuepr": "⋞", "cuesc": "⋟", "cularr": "↶", "cularrp": "⤽", "cup": "∪", "Cup": "⋓", "cupbrcap": "⩈", "cupcap": "⩆", "CupCap": "≍", "cupcup": "⩊", "cupdot": "⊍", "cupor": "⩅", "cups": "∪︀", "curarr": "↷", "curarrm": "⤼", "curlyeqprec": "⋞", "curlyeqsucc": "⋟", "curlyvee": "⋎", "curlywedge": "⋏", "curren": "¤", "curvearrowleft": "↶", "curvearrowright": "↷", "cuvee": "⋎", "cuwed": "⋏", "cwconint": "∲", "cwint": "∱", "cylcty": "⌭", "dagger": "†", "Dagger": "‡", "daleth": "ℸ", "darr": "↓", "dArr": "⇓", "Darr": "↡", "dash": "‐", "dashv": "⊣", "Dashv": "⫤", "dbkarow": "⤏", "dblac": "˝", "dcaron": "ď", "Dcaron": "Ď", "dcy": "д", "Dcy": "Д", "dd": "ⅆ", "DD": "ⅅ", "ddagger": "‡", "ddarr": "⇊", "DDotrahd": "⤑", "ddotseq": "⩷", "deg": "°", "Del": "∇", "delta": "δ", "Delta": "Δ", "demptyv": "⦱", "dfisht": "⥿", "dfr": "𝔡", "Dfr": "𝔇", "dHar": "⥥", "dharl": "⇃", "dharr": "⇂", "DiacriticalAcute": "´", "DiacriticalDot": "˙", "DiacriticalDoubleAcute": "˝", "DiacriticalGrave": "`", "DiacriticalTilde": "˜", "diam": "⋄", "diamond": "⋄", "Diamond": "⋄", "diamondsuit": "♦", "diams": "♦", "die": "¨", "DifferentialD": "ⅆ", "digamma": "ϝ", "disin": "⋲", "div": "÷", "divide": "÷", "divideontimes": "⋇", "divonx": "⋇", "djcy": "ђ", "DJcy": "Ђ", "dlcorn": "⌞", "dlcrop": "⌍", "dollar": "$", "dopf": "𝕕", "Dopf": "𝔻", "dot": "˙", "Dot": "¨", "DotDot": "⃜", "doteq": "≐", "doteqdot": "≑", "DotEqual": "≐", "dotminus": "∸", "dotplus": "∔", "dotsquare": "⊡", "doublebarwedge": "⌆", "DoubleContourIntegral": "∯", "DoubleDot": "¨", "DoubleDownArrow": "⇓", "DoubleLeftArrow": "⇐", "DoubleLeftRightArrow": "⇔", "DoubleLeftTee": "⫤", "DoubleLongLeftArrow": "⟸", "DoubleLongLeftRightArrow": "⟺", "DoubleLongRightArrow": "⟹", "DoubleRightArrow": "⇒", "DoubleRightTee": "⊨", "DoubleUpArrow": "⇑", "DoubleUpDownArrow": "⇕", "DoubleVerticalBar": "∥", "downarrow": "↓", "Downarrow": "⇓", "DownArrow": "↓", "DownArrowBar": "⤓", "DownArrowUpArrow": "⇵", "DownBreve": "̑", "downdownarrows": "⇊", "downharpoonleft": "⇃", "downharpoonright": "⇂", "DownLeftRightVector": "⥐", "DownLeftTeeVector": "⥞", "DownLeftVector": "↽", "DownLeftVectorBar": "⥖", "DownRightTeeVector": "⥟", "DownRightVector": "⇁", "DownRightVectorBar": "⥗", "DownTee": "⊤", "DownTeeArrow": "↧", "drbkarow": "⤐", "drcorn": "⌟", "drcrop": "⌌", "dscr": "𝒹", "Dscr": "𝒟", "dscy": "ѕ", "DScy": "Ѕ", "dsol": "⧶", "dstrok": "đ", "Dstrok": "Đ", "dtdot": "⋱", "dtri": "▿", "dtrif": "▾", "duarr": "⇵", "duhar": "⥯", "dwangle": "⦦", "dzcy": "џ", "DZcy": "Џ", "dzigrarr": "⟿", "eacute": "é", "Eacute": "É", "easter": "⩮", "ecaron": "ě", "Ecaron": "Ě", "ecir": "≖", "ecirc": "ê", "Ecirc": "Ê", "ecolon": "≕", "ecy": "э", "Ecy": "Э", "eDDot": "⩷", "edot": "ė", "eDot": "≑", "Edot": "Ė", "ee": "ⅇ", "efDot": "≒", "efr": "𝔢", "Efr": "𝔈", "eg": "⪚", "egrave": "è", "Egrave": "È", "egs": "⪖", "egsdot": "⪘", "el": "⪙", "Element": "∈", "elinters": "⏧", "ell": "ℓ", "els": "⪕", "elsdot": "⪗", "emacr": "ē", "Emacr": "Ē", "empty": "∅", "emptyset": "∅", "EmptySmallSquare": "◻", "emptyv": "∅", "EmptyVerySmallSquare": "▫", "emsp": " ", "emsp13": " ", "emsp14": " ", "eng": "ŋ", "ENG": "Ŋ", "ensp": " ", "eogon": "ę", "Eogon": "Ę", "eopf": "𝕖", "Eopf": "𝔼", "epar": "⋕", "eparsl": "⧣", "eplus": "⩱", "epsi": "ε", "epsilon": "ε", "Epsilon": "Ε", "epsiv": "ϵ", "eqcirc": "≖", "eqcolon": "≕", "eqsim": "≂", "eqslantgtr": "⪖", "eqslantless": "⪕", "Equal": "⩵", "equals": "=", "EqualTilde": "≂", "equest": "≟", "Equilibrium": "⇌", "equiv": "≡", "equivDD": "⩸", "eqvparsl": "⧥", "erarr": "⥱", "erDot": "≓", "escr": "ℯ", "Escr": "ℰ", "esdot": "≐", "esim": "≂", "Esim": "⩳", "eta": "η", "Eta": "Η", "eth": "ð", "ETH": "Ð", "euml": "ë", "Euml": "Ë", "euro": "€", "excl": "!", "exist": "∃", "Exists": "∃", "expectation": "ℰ", "exponentiale": "ⅇ", "ExponentialE": "ⅇ", "fallingdotseq": "≒", "fcy": "ф", "Fcy": "Ф", "female": "♀", "ffilig": "ffi", "fflig": "ff", "ffllig": "ffl", "ffr": "𝔣", "Ffr": "𝔉", "filig": "fi", "FilledSmallSquare": "◼", "FilledVerySmallSquare": "▪", "fjlig": "fj", "flat": "♭", "fllig": "fl", "fltns": "▱", "fnof": "ƒ", "fopf": "𝕗", "Fopf": "𝔽", "forall": "∀", "ForAll": "∀", "fork": "⋔", "forkv": "⫙", "Fouriertrf": "ℱ", "fpartint": "⨍", "frac12": "½", "frac13": "⅓", "frac14": "¼", "frac15": "⅕", "frac16": "⅙", "frac18": "⅛", "frac23": "⅔", "frac25": "⅖", "frac34": "¾", "frac35": "⅗", "frac38": "⅜", "frac45": "⅘", "frac56": "⅚", "frac58": "⅝", "frac78": "⅞", "frasl": "⁄", "frown": "⌢", "fscr": "𝒻", "Fscr": "ℱ", "gacute": "ǵ", "gamma": "γ", "Gamma": "Γ", "gammad": "ϝ", "Gammad": "Ϝ", "gap": "⪆", "gbreve": "ğ", "Gbreve": "Ğ", "Gcedil": "Ģ", "gcirc": "ĝ", "Gcirc": "Ĝ", "gcy": "г", "Gcy": "Г", "gdot": "ġ", "Gdot": "Ġ", "ge": "≥", "gE": "≧", "gel": "⋛", "gEl": "⪌", "geq": "≥", "geqq": "≧", "geqslant": "⩾", "ges": "⩾", "gescc": "⪩", "gesdot": "⪀", "gesdoto": "⪂", "gesdotol": "⪄", "gesl": "⋛︀", "gesles": "⪔", "gfr": "𝔤", "Gfr": "𝔊", "gg": "≫", "Gg": "⋙", "ggg": "⋙", "gimel": "ℷ", "gjcy": "ѓ", "GJcy": "Ѓ", "gl": "≷", "gla": "⪥", "glE": "⪒", "glj": "⪤", "gnap": "⪊", "gnapprox": "⪊", "gne": "⪈", "gnE": "≩", "gneq": "⪈", "gneqq": "≩", "gnsim": "⋧", "gopf": "𝕘", "Gopf": "𝔾", "grave": "`", "GreaterEqual": "≥", "GreaterEqualLess": "⋛", "GreaterFullEqual": "≧", "GreaterGreater": "⪢", "GreaterLess": "≷", "GreaterSlantEqual": "⩾", "GreaterTilde": "≳", "gscr": "ℊ", "Gscr": "𝒢", "gsim": "≳", "gsime": "⪎", "gsiml": "⪐", "gt": ">", "Gt": "≫", "GT": ">", "gtcc": "⪧", "gtcir": "⩺", "gtdot": "⋗", "gtlPar": "⦕", "gtquest": "⩼", "gtrapprox": "⪆", "gtrarr": "⥸", "gtrdot": "⋗", "gtreqless": "⋛", "gtreqqless": "⪌", "gtrless": "≷", "gtrsim": "≳", "gvertneqq": "≩︀", "gvnE": "≩︀", "Hacek": "ˇ", "hairsp": " ", "half": "½", "hamilt": "ℋ", "hardcy": "ъ", "HARDcy": "Ъ", "harr": "↔", "hArr": "⇔", "harrcir": "⥈", "harrw": "↭", "Hat": "^", "hbar": "ℏ", "hcirc": "ĥ", "Hcirc": "Ĥ", "hearts": "♥", "heartsuit": "♥", "hellip": "…", "hercon": "⊹", "hfr": "𝔥", "Hfr": "ℌ", "HilbertSpace": "ℋ", "hksearow": "⤥", "hkswarow": "⤦", "hoarr": "⇿", "homtht": "∻", "hookleftarrow": "↩", "hookrightarrow": "↪", "hopf": "𝕙", "Hopf": "ℍ", "horbar": "―", "HorizontalLine": "─", "hscr": "𝒽", "Hscr": "ℋ", "hslash": "ℏ", "hstrok": "ħ", "Hstrok": "Ħ", "HumpDownHump": "≎", "HumpEqual": "≏", "hybull": "⁃", "hyphen": "‐", "iacute": "í", "Iacute": "Í", "ic": "", "icirc": "î", "Icirc": "Î", "icy": "и", "Icy": "И", "Idot": "İ", "iecy": "е", "IEcy": "Е", "iexcl": "¡", "iff": "⇔", "ifr": "𝔦", "Ifr": "ℑ", "igrave": "ì", "Igrave": "Ì", "ii": "ⅈ", "iiiint": "⨌", "iiint": "∭", "iinfin": "⧜", "iiota": "℩", "ijlig": "ij", "IJlig": "IJ", "Im": "ℑ", "imacr": "ī", "Imacr": "Ī", "image": "ℑ", "ImaginaryI": "ⅈ", "imagline": "ℐ", "imagpart": "ℑ", "imath": "ı", "imof": "⊷", "imped": "Ƶ", "Implies": "⇒", "in": "∈", "incare": "℅", "infin": "∞", "infintie": "⧝", "inodot": "ı", "int": "∫", "Int": "∬", "intcal": "⊺", "integers": "ℤ", "Integral": "∫", "intercal": "⊺", "Intersection": "⋂", "intlarhk": "⨗", "intprod": "⨼", "InvisibleComma": "", "InvisibleTimes": "", "iocy": "ё", "IOcy": "Ё", "iogon": "į", "Iogon": "Į", "iopf": "𝕚", "Iopf": "𝕀", "iota": "ι", "Iota": "Ι", "iprod": "⨼", "iquest": "¿", "iscr": "𝒾", "Iscr": "ℐ", "isin": "∈", "isindot": "⋵", "isinE": "⋹", "isins": "⋴", "isinsv": "⋳", "isinv": "∈", "it": "", "itilde": "ĩ", "Itilde": "Ĩ", "iukcy": "і", "Iukcy": "І", "iuml": "ï", "Iuml": "Ï", "jcirc": "ĵ", "Jcirc": "Ĵ", "jcy": "й", "Jcy": "Й", "jfr": "𝔧", "Jfr": "𝔍", "jmath": "ȷ", "jopf": "𝕛", "Jopf": "𝕁", "jscr": "𝒿", "Jscr": "𝒥", "jsercy": "ј", "Jsercy": "Ј", "jukcy": "є", "Jukcy": "Є", "kappa": "κ", "Kappa": "Κ", "kappav": "ϰ", "kcedil": "ķ", "Kcedil": "Ķ", "kcy": "к", "Kcy": "К", "kfr": "𝔨", "Kfr": "𝔎", "kgreen": "ĸ", "khcy": "х", "KHcy": "Х", "kjcy": "ќ", "KJcy": "Ќ", "kopf": "𝕜", "Kopf": "𝕂", "kscr": "𝓀", "Kscr": "𝒦", "lAarr": "⇚", "lacute": "ĺ", "Lacute": "Ĺ", "laemptyv": "⦴", "lagran": "ℒ", "lambda": "λ", "Lambda": "Λ", "lang": "⟨", "Lang": "⟪", "langd": "⦑", "langle": "⟨", "lap": "⪅", "Laplacetrf": "ℒ", "laquo": "«", "larr": "←", "lArr": "⇐", "Larr": "↞", "larrb": "⇤", "larrbfs": "⤟", "larrfs": "⤝", "larrhk": "↩", "larrlp": "↫", "larrpl": "⤹", "larrsim": "⥳", "larrtl": "↢", "lat": "⪫", "latail": "⤙", "lAtail": "⤛", "late": "⪭", "lates": "⪭︀", "lbarr": "⤌", "lBarr": "⤎", "lbbrk": "❲", "lbrace": "{", "lbrack": "[", "lbrke": "⦋", "lbrksld": "⦏", "lbrkslu": "⦍", "lcaron": "ľ", "Lcaron": "Ľ", "lcedil": "ļ", "Lcedil": "Ļ", "lceil": "⌈", "lcub": "{", "lcy": "л", "Lcy": "Л", "ldca": "⤶", "ldquo": "“", "ldquor": "„", "ldrdhar": "⥧", "ldrushar": "⥋", "ldsh": "↲", "le": "≤", "lE": "≦", "LeftAngleBracket": "⟨", "leftarrow": "←", "Leftarrow": "⇐", "LeftArrow": "←", "LeftArrowBar": "⇤", "LeftArrowRightArrow": "⇆", "leftarrowtail": "↢", "LeftCeiling": "⌈", "LeftDoubleBracket": "⟦", "LeftDownTeeVector": "⥡", "LeftDownVector": "⇃", "LeftDownVectorBar": "⥙", "LeftFloor": "⌊", "leftharpoondown": "↽", "leftharpoonup": "↼", "leftleftarrows": "⇇", "leftrightarrow": "↔", "Leftrightarrow": "⇔", "LeftRightArrow": "↔", "leftrightarrows": "⇆", "leftrightharpoons": "⇋", "leftrightsquigarrow": "↭", "LeftRightVector": "⥎", "LeftTee": "⊣", "LeftTeeArrow": "↤", "LeftTeeVector": "⥚", "leftthreetimes": "⋋", "LeftTriangle": "⊲", "LeftTriangleBar": "⧏", "LeftTriangleEqual": "⊴", "LeftUpDownVector": "⥑", "LeftUpTeeVector": "⥠", "LeftUpVector": "↿", "LeftUpVectorBar": "⥘", "LeftVector": "↼", "LeftVectorBar": "⥒", "leg": "⋚", "lEg": "⪋", "leq": "≤", "leqq": "≦", "leqslant": "⩽", "les": "⩽", "lescc": "⪨", "lesdot": "⩿", "lesdoto": "⪁", "lesdotor": "⪃", "lesg": "⋚︀", "lesges": "⪓", "lessapprox": "⪅", "lessdot": "⋖", "lesseqgtr": "⋚", "lesseqqgtr": "⪋", "LessEqualGreater": "⋚", "LessFullEqual": "≦", "LessGreater": "≶", "lessgtr": "≶", "LessLess": "⪡", "lesssim": "≲", "LessSlantEqual": "⩽", "LessTilde": "≲", "lfisht": "⥼", "lfloor": "⌊", "lfr": "𝔩", "Lfr": "𝔏", "lg": "≶", "lgE": "⪑", "lHar": "⥢", "lhard": "↽", "lharu": "↼", "lharul": "⥪", "lhblk": "▄", "ljcy": "љ", "LJcy": "Љ", "ll": "≪", "Ll": "⋘", "llarr": "⇇", "llcorner": "⌞", "Lleftarrow": "⇚", "llhard": "⥫", "lltri": "◺", "lmidot": "ŀ", "Lmidot": "Ŀ", "lmoust": "⎰", "lmoustache": "⎰", "lnap": "⪉", "lnapprox": "⪉", "lne": "⪇", "lnE": "≨", "lneq": "⪇", "lneqq": "≨", "lnsim": "⋦", "loang": "⟬", "loarr": "⇽", "lobrk": "⟦", "longleftarrow": "⟵", "Longleftarrow": "⟸", "LongLeftArrow": "⟵", "longleftrightarrow": "⟷", "Longleftrightarrow": "⟺", "LongLeftRightArrow": "⟷", "longmapsto": "⟼", "longrightarrow": "⟶", "Longrightarrow": "⟹", "LongRightArrow": "⟶", "looparrowleft": "↫", "looparrowright": "↬", "lopar": "⦅", "lopf": "𝕝", "Lopf": "𝕃", "loplus": "⨭", "lotimes": "⨴", "lowast": "∗", "lowbar": "_", "LowerLeftArrow": "↙", "LowerRightArrow": "↘", "loz": "◊", "lozenge": "◊", "lozf": "⧫", "lpar": "(", "lparlt": "⦓", "lrarr": "⇆", "lrcorner": "⌟", "lrhar": "⇋", "lrhard": "⥭", "lrm": "", "lrtri": "⊿", "lsaquo": "‹", "lscr": "𝓁", "Lscr": "ℒ", "lsh": "↰", "Lsh": "↰", "lsim": "≲", "lsime": "⪍", "lsimg": "⪏", "lsqb": "[", "lsquo": "‘", "lsquor": "‚", "lstrok": "ł", "Lstrok": "Ł", "lt": "<", "Lt": "≪", "LT": "<", "ltcc": "⪦", "ltcir": "⩹", "ltdot": "⋖", "lthree": "⋋", "ltimes": "⋉", "ltlarr": "⥶", "ltquest": "⩻", "ltri": "◃", "ltrie": "⊴", "ltrif": "◂", "ltrPar": "⦖", "lurdshar": "⥊", "luruhar": "⥦", "lvertneqq": "≨︀", "lvnE": "≨︀", "macr": "¯", "male": "♂", "malt": "✠", "maltese": "✠", "map": "↦", "Map": "⤅", "mapsto": "↦", "mapstodown": "↧", "mapstoleft": "↤", "mapstoup": "↥", "marker": "▮", "mcomma": "⨩", "mcy": "м", "Mcy": "М", "mdash": "—", "mDDot": "∺", "measuredangle": "∡", "MediumSpace": " ", "Mellintrf": "ℳ", "mfr": "𝔪", "Mfr": "𝔐", "mho": "℧", "micro": "µ", "mid": "∣", "midast": "*", "midcir": "⫰", "middot": "·", "minus": "−", "minusb": "⊟", "minusd": "∸", "minusdu": "⨪", "MinusPlus": "∓", "mlcp": "⫛", "mldr": "…", "mnplus": "∓", "models": "⊧", "mopf": "𝕞", "Mopf": "𝕄", "mp": "∓", "mscr": "𝓂", "Mscr": "ℳ", "mstpos": "∾", "mu": "μ", "Mu": "Μ", "multimap": "⊸", "mumap": "⊸", "nabla": "∇", "nacute": "ń", "Nacute": "Ń", "nang": "∠⃒", "nap": "≉", "napE": "⩰̸", "napid": "≋̸", "napos": "ʼn", "napprox": "≉", "natur": "♮", "natural": "♮", "naturals": "ℕ", "nbsp": " ", "nbump": "≎̸", "nbumpe": "≏̸", "ncap": "⩃", "ncaron": "ň", "Ncaron": "Ň", "ncedil": "ņ", "Ncedil": "Ņ", "ncong": "≇", "ncongdot": "⩭̸", "ncup": "⩂", "ncy": "н", "Ncy": "Н", "ndash": "–", "ne": "≠", "nearhk": "⤤", "nearr": "↗", "neArr": "⇗", "nearrow": "↗", "nedot": "≐̸", "NegativeMediumSpace": "", "NegativeThickSpace": "", "NegativeThinSpace": "", "NegativeVeryThinSpace": "", "nequiv": "≢", "nesear": "⤨", "nesim": "≂̸", "NestedGreaterGreater": "≫", "NestedLessLess": "≪", "NewLine": "\n", "nexist": "∄", "nexists": "∄", "nfr": "𝔫", "Nfr": "𝔑", "nge": "≱", "ngE": "≧̸", "ngeq": "≱", "ngeqq": "≧̸", "ngeqslant": "⩾̸", "nges": "⩾̸", "nGg": "⋙̸", "ngsim": "≵", "ngt": "≯", "nGt": "≫⃒", "ngtr": "≯", "nGtv": "≫̸", "nharr": "↮", "nhArr": "⇎", "nhpar": "⫲", "ni": "∋", "nis": "⋼", "nisd": "⋺", "niv": "∋", "njcy": "њ", "NJcy": "Њ", "nlarr": "↚", "nlArr": "⇍", "nldr": "‥", "nle": "≰", "nlE": "≦̸", "nleftarrow": "↚", "nLeftarrow": "⇍", "nleftrightarrow": "↮", "nLeftrightarrow": "⇎", "nleq": "≰", "nleqq": "≦̸", "nleqslant": "⩽̸", "nles": "⩽̸", "nless": "≮", "nLl": "⋘̸", "nlsim": "≴", "nlt": "≮", "nLt": "≪⃒", "nltri": "⋪", "nltrie": "⋬", "nLtv": "≪̸", "nmid": "∤", "NoBreak": "", "NonBreakingSpace": " ", "nopf": "𝕟", "Nopf": "ℕ", "not": "¬", "Not": "⫬", "NotCongruent": "≢", "NotCupCap": "≭", "NotDoubleVerticalBar": "∦", "NotElement": "∉", "NotEqual": "≠", "NotEqualTilde": "≂̸", "NotExists": "∄", "NotGreater": "≯", "NotGreaterEqual": "≱", "NotGreaterFullEqual": "≧̸", "NotGreaterGreater": "≫̸", "NotGreaterLess": "≹", "NotGreaterSlantEqual": "⩾̸", "NotGreaterTilde": "≵", "NotHumpDownHump": "≎̸", "NotHumpEqual": "≏̸", "notin": "∉", "notindot": "⋵̸", "notinE": "⋹̸", "notinva": "∉", "notinvb": "⋷", "notinvc": "⋶", "NotLeftTriangle": "⋪", "NotLeftTriangleBar": "⧏̸", "NotLeftTriangleEqual": "⋬", "NotLess": "≮", "NotLessEqual": "≰", "NotLessGreater": "≸", "NotLessLess": "≪̸", "NotLessSlantEqual": "⩽̸", "NotLessTilde": "≴", "NotNestedGreaterGreater": "⪢̸", "NotNestedLessLess": "⪡̸", "notni": "∌", "notniva": "∌", "notnivb": "⋾", "notnivc": "⋽", "NotPrecedes": "⊀", "NotPrecedesEqual": "⪯̸", "NotPrecedesSlantEqual": "⋠", "NotReverseElement": "∌", "NotRightTriangle": "⋫", "NotRightTriangleBar": "⧐̸", "NotRightTriangleEqual": "⋭", "NotSquareSubset": "⊏̸", "NotSquareSubsetEqual": "⋢", "NotSquareSuperset": "⊐̸", "NotSquareSupersetEqual": "⋣", "NotSubset": "⊂⃒", "NotSubsetEqual": "⊈", "NotSucceeds": "⊁", "NotSucceedsEqual": "⪰̸", "NotSucceedsSlantEqual": "⋡", "NotSucceedsTilde": "≿̸", "NotSuperset": "⊃⃒", "NotSupersetEqual": "⊉", "NotTilde": "≁", "NotTildeEqual": "≄", "NotTildeFullEqual": "≇", "NotTildeTilde": "≉", "NotVerticalBar": "∤", "npar": "∦", "nparallel": "∦", "nparsl": "⫽⃥", "npart": "∂̸", "npolint": "⨔", "npr": "⊀", "nprcue": "⋠", "npre": "⪯̸", "nprec": "⊀", "npreceq": "⪯̸", "nrarr": "↛", "nrArr": "⇏", "nrarrc": "⤳̸", "nrarrw": "↝̸", "nrightarrow": "↛", "nRightarrow": "⇏", "nrtri": "⋫", "nrtrie": "⋭", "nsc": "⊁", "nsccue": "⋡", "nsce": "⪰̸", "nscr": "𝓃", "Nscr": "𝒩", "nshortmid": "∤", "nshortparallel": "∦", "nsim": "≁", "nsime": "≄", "nsimeq": "≄", "nsmid": "∤", "nspar": "∦", "nsqsube": "⋢", "nsqsupe": "⋣", "nsub": "⊄", "nsube": "⊈", "nsubE": "⫅̸", "nsubset": "⊂⃒", "nsubseteq": "⊈", "nsubseteqq": "⫅̸", "nsucc": "⊁", "nsucceq": "⪰̸", "nsup": "⊅", "nsupe": "⊉", "nsupE": "⫆̸", "nsupset": "⊃⃒", "nsupseteq": "⊉", "nsupseteqq": "⫆̸", "ntgl": "≹", "ntilde": "ñ", "Ntilde": "Ñ", "ntlg": "≸", "ntriangleleft": "⋪", "ntrianglelefteq": "⋬", "ntriangleright": "⋫", "ntrianglerighteq": "⋭", "nu": "ν", "Nu": "Ν", "num": "#", "numero": "№", "numsp": " ", "nvap": "≍⃒", "nvdash": "⊬", "nvDash": "⊭", "nVdash": "⊮", "nVDash": "⊯", "nvge": "≥⃒", "nvgt": ">⃒", "nvHarr": "⤄", "nvinfin": "⧞", "nvlArr": "⤂", "nvle": "≤⃒", "nvlt": "<⃒", "nvltrie": "⊴⃒", "nvrArr": "⤃", "nvrtrie": "⊵⃒", "nvsim": "∼⃒", "nwarhk": "⤣", "nwarr": "↖", "nwArr": "⇖", "nwarrow": "↖", "nwnear": "⤧", "oacute": "ó", "Oacute": "Ó", "oast": "⊛", "ocir": "⊚", "ocirc": "ô", "Ocirc": "Ô", "ocy": "о", "Ocy": "О", "odash": "⊝", "odblac": "ő", "Odblac": "Ő", "odiv": "⨸", "odot": "⊙", "odsold": "⦼", "oelig": "œ", "OElig": "Œ", "ofcir": "⦿", "ofr": "𝔬", "Ofr": "𝔒", "ogon": "˛", "ograve": "ò", "Ograve": "Ò", "ogt": "⧁", "ohbar": "⦵", "ohm": "Ω", "oint": "∮", "olarr": "↺", "olcir": "⦾", "olcross": "⦻", "oline": "‾", "olt": "⧀", "omacr": "ō", "Omacr": "Ō", "omega": "ω", "Omega": "Ω", "omicron": "ο", "Omicron": "Ο", "omid": "⦶", "ominus": "⊖", "oopf": "𝕠", "Oopf": "𝕆", "opar": "⦷", "OpenCurlyDoubleQuote": "“", "OpenCurlyQuote": "‘", "operp": "⦹", "oplus": "⊕", "or": "∨", "Or": "⩔", "orarr": "↻", "ord": "⩝", "order": "ℴ", "orderof": "ℴ", "ordf": "ª", "ordm": "º", "origof": "⊶", "oror": "⩖", "orslope": "⩗", "orv": "⩛", "oS": "Ⓢ", "oscr": "ℴ", "Oscr": "𝒪", "oslash": "ø", "Oslash": "Ø", "osol": "⊘", "otilde": "õ", "Otilde": "Õ", "otimes": "⊗", "Otimes": "⨷", "otimesas": "⨶", "ouml": "ö", "Ouml": "Ö", "ovbar": "⌽", "OverBar": "‾", "OverBrace": "⏞", "OverBracket": "⎴", "OverParenthesis": "⏜", "par": "∥", "para": "¶", "parallel": "∥", "parsim": "⫳", "parsl": "⫽", "part": "∂", "PartialD": "∂", "pcy": "п", "Pcy": "П", "percnt": "%", "period": ".", "permil": "‰", "perp": "⊥", "pertenk": "‱", "pfr": "𝔭", "Pfr": "𝔓", "phi": "φ", "Phi": "Φ", "phiv": "ϕ", "phmmat": "ℳ", "phone": "☎", "pi": "π", "Pi": "Π", "pitchfork": "⋔", "piv": "ϖ", "planck": "ℏ", "planckh": "ℎ", "plankv": "ℏ", "plus": "+", "plusacir": "⨣", "plusb": "⊞", "pluscir": "⨢", "plusdo": "∔", "plusdu": "⨥", "pluse": "⩲", "PlusMinus": "±", "plusmn": "±", "plussim": "⨦", "plustwo": "⨧", "pm": "±", "Poincareplane": "ℌ", "pointint": "⨕", "popf": "𝕡", "Popf": "ℙ", "pound": "£", "pr": "≺", "Pr": "⪻", "prap": "⪷", "prcue": "≼", "pre": "⪯", "prE": "⪳", "prec": "≺", "precapprox": "⪷", "preccurlyeq": "≼", "Precedes": "≺", "PrecedesEqual": "⪯", "PrecedesSlantEqual": "≼", "PrecedesTilde": "≾", "preceq": "⪯", "precnapprox": "⪹", "precneqq": "⪵", "precnsim": "⋨", "precsim": "≾", "prime": "′", "Prime": "″", "primes": "ℙ", "prnap": "⪹", "prnE": "⪵", "prnsim": "⋨", "prod": "∏", "Product": "∏", "profalar": "⌮", "profline": "⌒", "profsurf": "⌓", "prop": "∝", "Proportion": "∷", "Proportional": "∝", "propto": "∝", "prsim": "≾", "prurel": "⊰", "pscr": "𝓅", "Pscr": "𝒫", "psi": "ψ", "Psi": "Ψ", "puncsp": " ", "qfr": "𝔮", "Qfr": "𝔔", "qint": "⨌", "qopf": "𝕢", "Qopf": "ℚ", "qprime": "⁗", "qscr": "𝓆", "Qscr": "𝒬", "quaternions": "ℍ", "quatint": "⨖", "quest": "?", "questeq": "≟", "quot": '"', "QUOT": '"', "rAarr": "⇛", "race": "∽̱", "racute": "ŕ", "Racute": "Ŕ", "radic": "√", "raemptyv": "⦳", "rang": "⟩", "Rang": "⟫", "rangd": "⦒", "range": "⦥", "rangle": "⟩", "raquo": "»", "rarr": "→", "rArr": "⇒", "Rarr": "↠", "rarrap": "⥵", "rarrb": "⇥", "rarrbfs": "⤠", "rarrc": "⤳", "rarrfs": "⤞", "rarrhk": "↪", "rarrlp": "↬", "rarrpl": "⥅", "rarrsim": "⥴", "rarrtl": "↣", "Rarrtl": "⤖", "rarrw": "↝", "ratail": "⤚", "rAtail": "⤜", "ratio": "∶", "rationals": "ℚ", "rbarr": "⤍", "rBarr": "⤏", "RBarr": "⤐", "rbbrk": "❳", "rbrace": "}", "rbrack": "]", "rbrke": "⦌", "rbrksld": "⦎", "rbrkslu": "⦐", "rcaron": "ř", "Rcaron": "Ř", "rcedil": "ŗ", "Rcedil": "Ŗ", "rceil": "⌉", "rcub": "}", "rcy": "р", "Rcy": "Р", "rdca": "⤷", "rdldhar": "⥩", "rdquo": "”", "rdquor": "”", "rdsh": "↳", "Re": "ℜ", "real": "ℜ", "realine": "ℛ", "realpart": "ℜ", "reals": "ℝ", "rect": "▭", "reg": "®", "REG": "®", "ReverseElement": "∋", "ReverseEquilibrium": "⇋", "ReverseUpEquilibrium": "⥯", "rfisht": "⥽", "rfloor": "⌋", "rfr": "𝔯", "Rfr": "ℜ", "rHar": "⥤", "rhard": "⇁", "rharu": "⇀", "rharul": "⥬", "rho": "ρ", "Rho": "Ρ", "rhov": "ϱ", "RightAngleBracket": "⟩", "rightarrow": "→", "Rightarrow": "⇒", "RightArrow": "→", "RightArrowBar": "⇥", "RightArrowLeftArrow": "⇄", "rightarrowtail": "↣", "RightCeiling": "⌉", "RightDoubleBracket": "⟧", "RightDownTeeVector": "⥝", "RightDownVector": "⇂", "RightDownVectorBar": "⥕", "RightFloor": "⌋", "rightharpoondown": "⇁", "rightharpoonup": "⇀", "rightleftarrows": "⇄", "rightleftharpoons": "⇌", "rightrightarrows": "⇉", "rightsquigarrow": "↝", "RightTee": "⊢", "RightTeeArrow": "↦", "RightTeeVector": "⥛", "rightthreetimes": "⋌", "RightTriangle": "⊳", "RightTriangleBar": "⧐", "RightTriangleEqual": "⊵", "RightUpDownVector": "⥏", "RightUpTeeVector": "⥜", "RightUpVector": "↾", "RightUpVectorBar": "⥔", "RightVector": "⇀", "RightVectorBar": "⥓", "ring": "˚", "risingdotseq": "≓", "rlarr": "⇄", "rlhar": "⇌", "rlm": "", "rmoust": "⎱", "rmoustache": "⎱", "rnmid": "⫮", "roang": "⟭", "roarr": "⇾", "robrk": "⟧", "ropar": "⦆", "ropf": "𝕣", "Ropf": "ℝ", "roplus": "⨮", "rotimes": "⨵", "RoundImplies": "⥰", "rpar": ")", "rpargt": "⦔", "rppolint": "⨒", "rrarr": "⇉", "Rrightarrow": "⇛", "rsaquo": "›", "rscr": "𝓇", "Rscr": "ℛ", "rsh": "↱", "Rsh": "↱", "rsqb": "]", "rsquo": "’", "rsquor": "’", "rthree": "⋌", "rtimes": "⋊", "rtri": "▹", "rtrie": "⊵", "rtrif": "▸", "rtriltri": "⧎", "RuleDelayed": "⧴", "ruluhar": "⥨", "rx": "℞", "sacute": "ś", "Sacute": "Ś", "sbquo": "‚", "sc": "≻", "Sc": "⪼", "scap": "⪸", "scaron": "š", "Scaron": "Š", "sccue": "≽", "sce": "⪰", "scE": "⪴", "scedil": "ş", "Scedil": "Ş", "scirc": "ŝ", "Scirc": "Ŝ", "scnap": "⪺", "scnE": "⪶", "scnsim": "⋩", "scpolint": "⨓", "scsim": "≿", "scy": "с", "Scy": "С", "sdot": "⋅", "sdotb": "⊡", "sdote": "⩦", "searhk": "⤥", "searr": "↘", "seArr": "⇘", "searrow": "↘", "sect": "§", "semi": ";", "seswar": "⤩", "setminus": "∖", "setmn": "∖", "sext": "✶", "sfr": "𝔰", "Sfr": "𝔖", "sfrown": "⌢", "sharp": "♯", "shchcy": "щ", "SHCHcy": "Щ", "shcy": "ш", "SHcy": "Ш", "ShortDownArrow": "↓", "ShortLeftArrow": "←", "shortmid": "∣", "shortparallel": "∥", "ShortRightArrow": "→", "ShortUpArrow": "↑", "shy": "", "sigma": "σ", "Sigma": "Σ", "sigmaf": "ς", "sigmav": "ς", "sim": "∼", "simdot": "⩪", "sime": "≃", "simeq": "≃", "simg": "⪞", "simgE": "⪠", "siml": "⪝", "simlE": "⪟", "simne": "≆", "simplus": "⨤", "simrarr": "⥲", "slarr": "←", "SmallCircle": "∘", "smallsetminus": "∖", "smashp": "⨳", "smeparsl": "⧤", "smid": "∣", "smile": "⌣", "smt": "⪪", "smte": "⪬", "smtes": "⪬︀", "softcy": "ь", "SOFTcy": "Ь", "sol": "/", "solb": "⧄", "solbar": "⌿", "sopf": "𝕤", "Sopf": "𝕊", "spades": "♠", "spadesuit": "♠", "spar": "∥", "sqcap": "⊓", "sqcaps": "⊓︀", "sqcup": "⊔", "sqcups": "⊔︀", "Sqrt": "√", "sqsub": "⊏", "sqsube": "⊑", "sqsubset": "⊏", "sqsubseteq": "⊑", "sqsup": "⊐", "sqsupe": "⊒", "sqsupset": "⊐", "sqsupseteq": "⊒", "squ": "□", "square": "□", "Square": "□", "SquareIntersection": "⊓", "SquareSubset": "⊏", "SquareSubsetEqual": "⊑", "SquareSuperset": "⊐", "SquareSupersetEqual": "⊒", "SquareUnion": "⊔", "squarf": "▪", "squf": "▪", "srarr": "→", "sscr": "𝓈", "Sscr": "𝒮", "ssetmn": "∖", "ssmile": "⌣", "sstarf": "⋆", "star": "☆", "Star": "⋆", "starf": "★", "straightepsilon": "ϵ", "straightphi": "ϕ", "strns": "¯", "sub": "⊂", "Sub": "⋐", "subdot": "⪽", "sube": "⊆", "subE": "⫅", "subedot": "⫃", "submult": "⫁", "subne": "⊊", "subnE": "⫋", "subplus": "⪿", "subrarr": "⥹", "subset": "⊂", "Subset": "⋐", "subseteq": "⊆", "subseteqq": "⫅", "SubsetEqual": "⊆", "subsetneq": "⊊", "subsetneqq": "⫋", "subsim": "⫇", "subsub": "⫕", "subsup": "⫓", "succ": "≻", "succapprox": "⪸", "succcurlyeq": "≽", "Succeeds": "≻", "SucceedsEqual": "⪰", "SucceedsSlantEqual": "≽", "SucceedsTilde": "≿", "succeq": "⪰", "succnapprox": "⪺", "succneqq": "⪶", "succnsim": "⋩", "succsim": "≿", "SuchThat": "∋", "sum": "∑", "Sum": "∑", "sung": "♪", "sup": "⊃", "Sup": "⋑", "sup1": "¹", "sup2": "²", "sup3": "³", "supdot": "⪾", "supdsub": "⫘", "supe": "⊇", "supE": "⫆", "supedot": "⫄", "Superset": "⊃", "SupersetEqual": "⊇", "suphsol": "⟉", "suphsub": "⫗", "suplarr": "⥻", "supmult": "⫂", "supne": "⊋", "supnE": "⫌", "supplus": "⫀", "supset": "⊃", "Supset": "⋑", "supseteq": "⊇", "supseteqq": "⫆", "supsetneq": "⊋", "supsetneqq": "⫌", "supsim": "⫈", "supsub": "⫔", "supsup": "⫖", "swarhk": "⤦", "swarr": "↙", "swArr": "⇙", "swarrow": "↙", "swnwar": "⤪", "szlig": "ß", "Tab": " ", "target": "⌖", "tau": "τ", "Tau": "Τ", "tbrk": "⎴", "tcaron": "ť", "Tcaron": "Ť", "tcedil": "ţ", "Tcedil": "Ţ", "tcy": "т", "Tcy": "Т", "tdot": "⃛", "telrec": "⌕", "tfr": "𝔱", "Tfr": "𝔗", "there4": "∴", "therefore": "∴", "Therefore": "∴", "theta": "θ", "Theta": "Θ", "thetasym": "ϑ", "thetav": "ϑ", "thickapprox": "≈", "thicksim": "∼", "ThickSpace": " ", "thinsp": " ", "ThinSpace": " ", "thkap": "≈", "thksim": "∼", "thorn": "þ", "THORN": "Þ", "tilde": "˜", "Tilde": "∼", "TildeEqual": "≃", "TildeFullEqual": "≅", "TildeTilde": "≈", "times": "×", "timesb": "⊠", "timesbar": "⨱", "timesd": "⨰", "tint": "∭", "toea": "⤨", "top": "⊤", "topbot": "⌶", "topcir": "⫱", "topf": "𝕥", "Topf": "𝕋", "topfork": "⫚", "tosa": "⤩", "tprime": "‴", "trade": "™", "TRADE": "™", "triangle": "▵", "triangledown": "▿", "triangleleft": "◃", "trianglelefteq": "⊴", "triangleq": "≜", "triangleright": "▹", "trianglerighteq": "⊵", "tridot": "◬", "trie": "≜", "triminus": "⨺", "TripleDot": "⃛", "triplus": "⨹", "trisb": "⧍", "tritime": "⨻", "trpezium": "⏢", "tscr": "𝓉", "Tscr": "𝒯", "tscy": "ц", "TScy": "Ц", "tshcy": "ћ", "TSHcy": "Ћ", "tstrok": "ŧ", "Tstrok": "Ŧ", "twixt": "≬", "twoheadleftarrow": "↞", "twoheadrightarrow": "↠", "uacute": "ú", "Uacute": "Ú", "uarr": "↑", "uArr": "⇑", "Uarr": "↟", "Uarrocir": "⥉", "ubrcy": "ў", "Ubrcy": "Ў", "ubreve": "ŭ", "Ubreve": "Ŭ", "ucirc": "û", "Ucirc": "Û", "ucy": "у", "Ucy": "У", "udarr": "⇅", "udblac": "ű", "Udblac": "Ű", "udhar": "⥮", "ufisht": "⥾", "ufr": "𝔲", "Ufr": "𝔘", "ugrave": "ù", "Ugrave": "Ù", "uHar": "⥣", "uharl": "↿", "uharr": "↾", "uhblk": "▀", "ulcorn": "⌜", "ulcorner": "⌜", "ulcrop": "⌏", "ultri": "◸", "umacr": "ū", "Umacr": "Ū", "uml": "¨", "UnderBar": "_", "UnderBrace": "⏟", "UnderBracket": "⎵", "UnderParenthesis": "⏝", "Union": "⋃", "UnionPlus": "⊎", "uogon": "ų", "Uogon": "Ų", "uopf": "𝕦", "Uopf": "𝕌", "uparrow": "↑", "Uparrow": "⇑", "UpArrow": "↑", "UpArrowBar": "⤒", "UpArrowDownArrow": "⇅", "updownarrow": "↕", "Updownarrow": "⇕", "UpDownArrow": "↕", "UpEquilibrium": "⥮", "upharpoonleft": "↿", "upharpoonright": "↾", "uplus": "⊎", "UpperLeftArrow": "↖", "UpperRightArrow": "↗", "upsi": "υ", "Upsi": "ϒ", "upsih": "ϒ", "upsilon": "υ", "Upsilon": "Υ", "UpTee": "⊥", "UpTeeArrow": "↥", "upuparrows": "⇈", "urcorn": "⌝", "urcorner": "⌝", "urcrop": "⌎", "uring": "ů", "Uring": "Ů", "urtri": "◹", "uscr": "𝓊", "Uscr": "𝒰", "utdot": "⋰", "utilde": "ũ", "Utilde": "Ũ", "utri": "▵", "utrif": "▴", "uuarr": "⇈", "uuml": "ü", "Uuml": "Ü", "uwangle": "⦧", "vangrt": "⦜", "varepsilon": "ϵ", "varkappa": "ϰ", "varnothing": "∅", "varphi": "ϕ", "varpi": "ϖ", "varpropto": "∝", "varr": "↕", "vArr": "⇕", "varrho": "ϱ", "varsigma": "ς", "varsubsetneq": "⊊︀", "varsubsetneqq": "⫋︀", "varsupsetneq": "⊋︀", "varsupsetneqq": "⫌︀", "vartheta": "ϑ", "vartriangleleft": "⊲", "vartriangleright": "⊳", "vBar": "⫨", "Vbar": "⫫", "vBarv": "⫩", "vcy": "в", "Vcy": "В", "vdash": "⊢", "vDash": "⊨", "Vdash": "⊩", "VDash": "⊫", "Vdashl": "⫦", "vee": "∨", "Vee": "⋁", "veebar": "⊻", "veeeq": "≚", "vellip": "⋮", "verbar": "|", "Verbar": "‖", "vert": "|", "Vert": "‖", "VerticalBar": "∣", "VerticalLine": "|", "VerticalSeparator": "❘", "VerticalTilde": "≀", "VeryThinSpace": " ", "vfr": "𝔳", "Vfr": "𝔙", "vltri": "⊲", "vnsub": "⊂⃒", "vnsup": "⊃⃒", "vopf": "𝕧", "Vopf": "𝕍", "vprop": "∝", "vrtri": "⊳", "vscr": "𝓋", "Vscr": "𝒱", "vsubne": "⊊︀", "vsubnE": "⫋︀", "vsupne": "⊋︀", "vsupnE": "⫌︀", "Vvdash": "⊪", "vzigzag": "⦚", "wcirc": "ŵ", "Wcirc": "Ŵ", "wedbar": "⩟", "wedge": "∧", "Wedge": "⋀", "wedgeq": "≙", "weierp": "℘", "wfr": "𝔴", "Wfr": "𝔚", "wopf": "𝕨", "Wopf": "𝕎", "wp": "℘", "wr": "≀", "wreath": "≀", "wscr": "𝓌", "Wscr": "𝒲", "xcap": "⋂", "xcirc": "◯", "xcup": "⋃", "xdtri": "▽", "xfr": "𝔵", "Xfr": "𝔛", "xharr": "⟷", "xhArr": "⟺", "xi": "ξ", "Xi": "Ξ", "xlarr": "⟵", "xlArr": "⟸", "xmap": "⟼", "xnis": "⋻", "xodot": "⨀", "xopf": "𝕩", "Xopf": "𝕏", "xoplus": "⨁", "xotime": "⨂", "xrarr": "⟶", "xrArr": "⟹", "xscr": "𝓍", "Xscr": "𝒳", "xsqcup": "⨆", "xuplus": "⨄", "xutri": "△", "xvee": "⋁", "xwedge": "⋀", "yacute": "ý", "Yacute": "Ý", "yacy": "я", "YAcy": "Я", "ycirc": "ŷ", "Ycirc": "Ŷ", "ycy": "ы", "Ycy": "Ы", "yen": "¥", "yfr": "𝔶", "Yfr": "𝔜", "yicy": "ї", "YIcy": "Ї", "yopf": "𝕪", "Yopf": "𝕐", "yscr": "𝓎", "Yscr": "𝒴", "yucy": "ю", "YUcy": "Ю", "yuml": "ÿ", "Yuml": "Ÿ", "zacute": "ź", "Zacute": "Ź", "zcaron": "ž", "Zcaron": "Ž", "zcy": "з", "Zcy": "З", "zdot": "ż", "Zdot": "Ż", "zeetrf": "ℨ", "ZeroWidthSpace": "", "zeta": "ζ", "Zeta": "Ζ", "zfr": "𝔷", "Zfr": "ℨ", "zhcy": "ж", "ZHcy": "Ж", "zigrarr": "⇝", "zopf": "𝕫", "Zopf": "ℤ", "zscr": "𝓏", "Zscr": "𝒵", "zwj": "", "zwnj": "" };
var decodeMapLegacy = { "aacute": "á", "Aacute": "Á", "acirc": "â", "Acirc": "Â", "acute": "´", "aelig": "æ", "AElig": "Æ", "agrave": "à", "Agrave": "À", "amp": "&", "AMP": "&", "aring": "å", "Aring": "Å", "atilde": "ã", "Atilde": "Ã", "auml": "ä", "Auml": "Ä", "brvbar": "¦", "ccedil": "ç", "Ccedil": "Ç", "cedil": "¸", "cent": "¢", "copy": "©", "COPY": "©", "curren": "¤", "deg": "°", "divide": "÷", "eacute": "é", "Eacute": "É", "ecirc": "ê", "Ecirc": "Ê", "egrave": "è", "Egrave": "È", "eth": "ð", "ETH": "Ð", "euml": "ë", "Euml": "Ë", "frac12": "½", "frac14": "¼", "frac34": "¾", "gt": ">", "GT": ">", "iacute": "í", "Iacute": "Í", "icirc": "î", "Icirc": "Î", "iexcl": "¡", "igrave": "ì", "Igrave": "Ì", "iquest": "¿", "iuml": "ï", "Iuml": "Ï", "laquo": "«", "lt": "<", "LT": "<", "macr": "¯", "micro": "µ", "middot": "·", "nbsp": " ", "not": "¬", "ntilde": "ñ", "Ntilde": "Ñ", "oacute": "ó", "Oacute": "Ó", "ocirc": "ô", "Ocirc": "Ô", "ograve": "ò", "Ograve": "Ò", "ordf": "ª", "ordm": "º", "oslash": "ø", "Oslash": "Ø", "otilde": "õ", "Otilde": "Õ", "ouml": "ö", "Ouml": "Ö", "para": "¶", "plusmn": "±", "pound": "£", "quot": '"', "QUOT": '"', "raquo": "»", "reg": "®", "REG": "®", "sect": "§", "shy": "", "sup1": "¹", "sup2": "²", "sup3": "³", "szlig": "ß", "thorn": "þ", "THORN": "Þ", "times": "×", "uacute": "ú", "Uacute": "Ú", "ucirc": "û", "Ucirc": "Û", "ugrave": "ù", "Ugrave": "Ù", "uml": "¨", "uuml": "ü", "Uuml": "Ü", "yacute": "ý", "Yacute": "Ý", "yen": "¥", "yuml": "ÿ" };
var decodeMapNumeric = { "0": "�", "128": "€", "130": "‚", "131": "ƒ", "132": "„", "133": "…", "134": "†", "135": "‡", "136": "ˆ", "137": "‰", "138": "Š", "139": "‹", "140": "Œ", "142": "Ž", "145": "‘", "146": "’", "147": "“", "148": "”", "149": "•", "150": "–", "151": "—", "152": "˜", "153": "™", "154": "š", "155": "›", "156": "œ", "158": "ž", "159": "Ÿ" };
var invalidReferenceCodePoints = [1, 2, 3, 4, 5, 6, 7, 8, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 64976, 64977, 64978, 64979, 64980, 64981, 64982, 64983, 64984, 64985, 64986, 64987, 64988, 64989, 64990, 64991, 64992, 64993, 64994, 64995, 64996, 64997, 64998, 64999, 65e3, 65001, 65002, 65003, 65004, 65005, 65006, 65007, 65534, 65535, 131070, 131071, 196606, 196607, 262142, 262143, 327678, 327679, 393214, 393215, 458750, 458751, 524286, 524287, 589822, 589823, 655358, 655359, 720894, 720895, 786430, 786431, 851966, 851967, 917502, 917503, 983038, 983039, 1048574, 1048575, 1114110, 1114111];
var stringFromCharCode = String.fromCharCode;
var object = {};
var hasOwnProperty = object.hasOwnProperty;
var has = function(object2, propertyName) {
return hasOwnProperty.call(object2, propertyName);
};
var contains = function(array, value) {
var index = -1;
var length = array.length;
while (++index < length) {
if (array[index] == value) {
return true;
}
}
return false;
};
var merge = function(options, defaults) {
if (!options) {
return defaults;
}
var result = {};
var key2;
for (key2 in defaults) {
result[key2] = has(options, key2) ? options[key2] : defaults[key2];
}
return result;
};
var codePointToSymbol = function(codePoint, strict) {
var output = "";
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
if (strict) {
parseError("character reference outside the permissible Unicode range");
}
return "�";
}
if (has(decodeMapNumeric, codePoint)) {
if (strict) {
parseError("disallowed character reference");
}
return decodeMapNumeric[codePoint];
}
if (strict && contains(invalidReferenceCodePoints, codePoint)) {
parseError("disallowed character reference");
}
if (codePoint > 65535) {
codePoint -= 65536;
output += stringFromCharCode(codePoint >>> 10 & 1023 | 55296);
codePoint = 56320 | codePoint & 1023;
}
output += stringFromCharCode(codePoint);
return output;
};
var hexEscape = function(codePoint) {
return "&#x" + codePoint.toString(16).toUpperCase() + ";";
};
var decEscape = function(codePoint) {
return "&#" + codePoint + ";";
};
var parseError = function(message) {
throw Error("Parse error: " + message);
};
var encode = function(string, options) {
options = merge(options, encode.options);
var strict = options.strict;
if (strict && regexInvalidRawCodePoint.test(string)) {
parseError("forbidden code point");
}
var encodeEverything = options.encodeEverything;
var useNamedReferences = options.useNamedReferences;
var allowUnsafeSymbols = options.allowUnsafeSymbols;
var escapeCodePoint = options.decimal ? decEscape : hexEscape;
var escapeBmpSymbol = function(symbol) {
return escapeCodePoint(symbol.charCodeAt(0));
};
if (encodeEverything) {
string = string.replace(regexAsciiWhitelist, function(symbol) {
if (useNamedReferences && has(encodeMap, symbol)) {
return "&" + encodeMap[symbol] + ";";
}
return escapeBmpSymbol(symbol);
});
if (useNamedReferences) {
string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒").replace(/fj/g, "fj");
}
if (useNamedReferences) {
string = string.replace(regexEncodeNonAscii, function(string2) {
return "&" + encodeMap[string2] + ";";
});
}
} else if (useNamedReferences) {
if (!allowUnsafeSymbols) {
string = string.replace(regexEscape, function(string2) {
return "&" + encodeMap[string2] + ";";
});
}
string = string.replace(/>\u20D2/g, ">⃒").replace(/<\u20D2/g, "<⃒");
string = string.replace(regexEncodeNonAscii, function(string2) {
return "&" + encodeMap[string2] + ";";
});
} else if (!allowUnsafeSymbols) {
string = string.replace(regexEscape, escapeBmpSymbol);
}
return string.replace(regexAstralSymbols, function($0) {
var high = $0.charCodeAt(0);
var low = $0.charCodeAt(1);
var codePoint = (high - 55296) * 1024 + low - 56320 + 65536;
return escapeCodePoint(codePoint);
}).replace(regexBmpWhitelist, escapeBmpSymbol);
};
encode.options = {
"allowUnsafeSymbols": false,
"encodeEverything": false,
"strict": false,
"useNamedReferences": false,
"decimal": false
};
var decode = function(html, options) {
options = merge(options, decode.options);
var strict = options.strict;
if (strict && regexInvalidEntity.test(html)) {
parseError("malformed character reference");
}
return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {
var codePoint;
var semicolon;
var decDigits;
var hexDigits;
var reference;
var next;
if ($1) {
reference = $1;
return decodeMap[reference];
}
if ($2) {
reference = $2;
next = $3;
if (next && options.isAttributeValue) {
if (strict && next == "=") {
parseError("`&` did not start a character reference");
}
return $0;
} else {
if (strict) {
parseError(
"named character reference was not terminated by a semicolon"
);
}
return decodeMapLegacy[reference] + (next || "");
}
}
if ($4) {
decDigits = $4;
semicolon = $5;
if (strict && !semicolon) {
parseError("character reference was not terminated by a semicolon");
}
codePoint = parseInt(decDigits, 10);
return codePointToSymbol(codePoint, strict);
}
if ($6) {
hexDigits = $6;
semicolon = $7;
if (strict && !semicolon) {
parseError("character reference was not terminated by a semicolon");
}
codePoint = parseInt(hexDigits, 16);
return codePointToSymbol(codePoint, strict);
}
if (strict) {
parseError(
"named character reference was not terminated by a semicolon"
);
}
return $0;
});
};
decode.options = {
"isAttributeValue": false,
"strict": false
};
var escape = function(string) {
return string.replace(regexEscape, function($0) {
return escapeMap[$0];
});
};
var he2 = {
"version": "1.2.0",
"encode": encode,
"decode": decode,
"escape": escape,
"unescape": decode
};
if (freeExports && !freeExports.nodeType) {
if (freeModule) {
freeModule.exports = he2;
} else {
for (var key in he2) {
has(he2, key) && (freeExports[key] = he2[key]);
}
}
} else {
root.he = he2;
}
})(commonjsGlobal);
})(he, he.exports);
var heExports = he.exports;
function decodeHtmlEntities(label) {
if (label !== null) {
return heExports.decode(label);
} else {
return "";
}
}
const productVisibilitySignal = r(/* @__PURE__ */ new Map());
function getProductVisibility(productId) {
const visibilityMap = productVisibilitySignal.get();
return visibilityMap.has(productId) ? visibilityMap.get(productId) : true;
}
function setProductVisibility(productId, isVisible) {
const visibilityMap = new Map(productVisibilitySignal.get());
visibilityMap.set(productId, isVisible);
productVisibilitySignal.set(visibilityMap);
}
const _RequestStatus = class _RequestStatus {
constructor(status) {
this.id = "";
this.error = null;
this.status = status ?? _RequestStatus.STATUS.NONE;
}
};
_RequestStatus.STATUS = {
NONE: 0,
LAUNCHED: 1,
IN_PROGRESS: 2,
FINISHED_ERROR: 3,
FINISHED_SUCCESS: 4
};
let RequestStatus = _RequestStatus;
const prescriptionAlertRequestStatusByAlertType = r(/* @__PURE__ */ new Map());
const posologyAlertRequestStatus = r(new RequestStatus());
const stoppAlertRequestStatus = r(new RequestStatus());
const setPrescriptionAlertRequestStatusByAlertType = (status, alertType) => {
const currentMap = new Map(prescriptionAlertRequestStatusByAlertType.get());
currentMap.set(alertType, new RequestStatus(status));
prescriptionAlertRequestStatusByAlertType.set(currentMap);
};
const getPrescriptionAlertRequestStatusByAlertType = (alertType) => {
return i2(() => {
return prescriptionAlertRequestStatusByAlertType.get().get(alertType) || new RequestStatus();
});
};
const isPrescriptionAlertRequestStatusFinished = i2(() => {
for (const requestStatus of prescriptionAlertRequestStatusByAlertType.get().values()) {
if (requestStatus.status < 3) {
return false;
}
}
return true;
});
const setPosologyAlertRequestStatus = (status) => {
posologyAlertRequestStatus.set(new RequestStatus(status));
};
const setStoppAlertRequestStatus = (status) => {
stoppAlertRequestStatus.set(new RequestStatus(status));
};
const hiddenAlertsSignal = r(/* @__PURE__ */ new Map());
const hiddenAlertsDetailsSignal = r(/* @__PURE__ */ new Map());
function addHiddenAlert(productId, testId, label) {
const hiddenMap = hiddenAlertsSignal.get();
const detailsMap = hiddenAlertsDetailsSignal.get();
const existingAlert = detailsMap.get(testId);
if (existingAlert && existingAlert.productId === productId && existingAlert.label === label) {
return;
}
const newHiddenMap = new Map(hiddenMap);
if (!newHiddenMap.has(productId)) {
newHiddenMap.set(productId, /* @__PURE__ */ new Set());
}
const productSet = new Set(newHiddenMap.get(productId));
const hadAlert = productSet.has(testId);
productSet.add(testId);
newHiddenMap.set(productId, productSet);
const newDetailsMap = new Map(detailsMap);
newDetailsMap.set(testId, { label, testId, productId });
if (!hadAlert || !existingAlert) {
hiddenAlertsSignal.set(newHiddenMap);
hiddenAlertsDetailsSignal.set(newDetailsMap);
}
}
function removeHiddenAlert(productId, testId) {
const hiddenMap = hiddenAlertsSignal.get();
const detailsMap = hiddenAlertsDetailsSignal.get();
if (!detailsMap.has(testId)) {
return;
}
let needsUpdate = false;
const newHiddenMap = new Map(hiddenMap);
if (newHiddenMap.has(productId)) {
const productSet = new Set(newHiddenMap.get(productId));
if (productSet.has(testId)) {
productSet.delete(testId);
needsUpdate = true;
if (productSet.size === 0) {
newHiddenMap.delete(productId);
} else {
newHiddenMap.set(productId, productSet);
}
}
}
const newDetailsMap = new Map(detailsMap);
newDetailsMap.delete(testId);
if (needsUpdate) {
hiddenAlertsSignal.set(newHiddenMap);
hiddenAlertsDetailsSignal.set(newDetailsMap);
}
}
function getHiddenAlertsForProduct(productId) {
const hiddenMap = hiddenAlertsSignal.get();
const detailsMap = hiddenAlertsDetailsSignal.get();
if (!hiddenMap.has(productId)) {
return [];
}
const testIds = Array.from(hiddenMap.get(productId) || []);
return testIds.map((testId) => detailsMap.get(testId)).filter((alert) => alert !== void 0);
}
function getAllHiddenAlerts() {
const detailsMap = hiddenAlertsDetailsSignal.get();
return Array.from(detailsMap.values());
}
var __defProp$b = Object.defineProperty;
var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
var __decorateClass$c = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$b(target, key, result);
return result;
};
let BcbPrescriptionAlertsCI = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.patient = {};
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
connectedCallback() {
super.connectedCallback();
}
async fetchData() {
try {
if (this.patient && this.products) {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.CONTRAINDICATION);
this.dispatchRequestStatus();
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.CONTRAINDICATION);
this.dispatchRequestStatus();
this.countAlerts();
this.checkHiddenAlerts();
}
} catch {
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.CONTRAINDICATION);
}
}
dispatchRequestStatus() {
const customEvent = new CustomEvent("requestStatus", {
detail: {
status: getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.CONTRAINDICATION).get().status,
bubbles: true,
composed: true
}
});
this.dispatchEvent(customEvent);
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl") || changedProperties.has("alertVisibility")) {
this.fetchData().then();
}
if (this.alertVisibility && (changedProperties.has("alertVisibility") || changedProperties.has("productId"))) {
this.checkHiddenAlerts();
}
}
checkHiddenAlerts() {
var _a2, _b;
const product = getAlertsByProduct(this.productId).get();
const hasAlerts2 = (((_a2 = product == null ? void 0 : product.alerts1c) == null ? void 0 : _a2.length) || 0) + (((_b = product == null ? void 0 : product.alerts1d) == null ? void 0 : _b.length) || 0) > 0;
if (!this.alertVisibility.contre_indicationsLv3 && !this.alertVisibility.contre_indicationsLv4 && hasAlerts2) {
addHiddenAlert(this.productId, "ci-hidden-tag", "contre-indications");
} else {
removeHiddenAlert(this.productId, "ci-hidden-tag");
}
}
countAlerts() {
var _a2, _b, _c, _d, _e, _f, _g, _h;
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId: this.productId,
alertCount: Number((((_b = (_a2 = getAlertsByProduct(this.productId).get()) == null ? void 0 : _a2.alerts1c) == null ? void 0 : _b.length) || 0) + (((_d = (_c = getAlertsByProduct(this.productId).get()) == null ? void 0 : _c.alerts1d) == null ? void 0 : _d.length) || 0) > 0),
alertType: ALERT_TYPES$1.CONTRAINDICATION,
alertsByLvl: {
contraindicationLvl3: ((_f = (_e = getAlertsByProduct(this.productId).get()) == null ? void 0 : _e.alerts1c) == null ? void 0 : _f.length) || 0,
contraindicationLvl4: ((_h = (_g = getAlertsByProduct(this.productId).get()) == null ? void 0 : _g.alerts1d) == null ? void 0 : _h.length) || 0
}
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
async handleClick(chapter, level, product) {
const alertChapter2 = await getAlertChapter(
chapter,
level,
product,
this.productId,
this.apiUrl
);
if (this.modalCI) {
this.modalCI.open();
}
this.currentAlert = alertChapter2;
this.requestUpdate();
}
renderAlerts() {
var _a2, _b, _c, _d, _e, _f, _g, _h;
if (!this.alertVisibility.contre_indicationsLv3 && !this.alertVisibility.contre_indicationsLv4) {
return b``;
}
const product = getAlertsByProduct(this.productId).get();
if (product && this.isPatientActive && getProductVisibility(this.productId) === true) {
if ((((_a2 = product == null ? void 0 : product.alerts1d) == null ? void 0 : _a2.length) ?? 0) + (((_b = product == null ? void 0 : product.alerts1c) == null ? void 0 : _b.length) ?? 0) > 0) {
return b`
<div class="card-body">
<ul>
${(product == null ? void 0 : product.alerts1d) && (((_c = product.alerts1d) == null ? void 0 : _c.length) ?? 0) > 0 && this.alertVisibility.contre_indicationsLv4 ? b` <li class="bcb-alert-item" data-test-id="ci-nr-btn"
@click=${() => this.handleClick(
ALERT_CHAPTER.CI_CHAPTER,
ALERT_LEVELS.NOT_RECOMMENDED,
product
)}>
<div class="bcb-ellipsis bcb-ci-ellipsis-color"></div>
<span
class="bcb-alert-title"
>
${((_d = product.alerts1d) == null ? void 0 : _d.length) === 1 ? "Contre-indication" : "Contre-indications"}
</span>
<span class="bcb-alert-title">
(déconseillé) :</span
>
${(_e = product.alerts1d) == null ? void 0 : _e.map(
(detail, i3) => {
var _a3;
return b` <span class="bcb-alert-content ${i3 === 0 ? "first-alert" : ""}"
.innerHTML=${i3 === (((_a3 = product.alerts1d) == null ? void 0 : _a3.length) ?? 0) - 1 ? detail.shortText : detail.shortText + ", "}
></span>`;
}
)}
<bcbd-icon icon="circle-question" color="black" size="small"></bcbd-icon>
</li>` : ""}
${(product == null ? void 0 : product.alerts1c) && (((_f = product.alerts1c) == null ? void 0 : _f.length) ?? 0) > 0 && this.alertVisibility.contre_indicationsLv3 ? b` <li class="bcb-alert-item" data-test-id="ci-ci-btn"
@click=${() => this.handleClick(
ALERT_CHAPTER.CI_CHAPTER,
ALERT_LEVELS.CONTRAINDICATED,
product
)}>
<div class="bcb-ellipsis bcb-ci-ellipsis-color"></div>
<span
class="bcb-alert-title"
>
${((_g = product.alerts1c) == null ? void 0 : _g.length) === 1 ? "Contre-indication" : "Contre-indications"}
</span>
<span class="bcb-alert-title">
(contre-indiqué) :</span
>
${(_h = product.alerts1c) == null ? void 0 : _h.map(
(detail, i3) => {
var _a3;
return b` <span class="bcb-alert-content ${i3 === 0 ? "first-alert" : ""}"
.innerHTML=${i3 === (((_a3 = product.alerts1c) == null ? void 0 : _a3.length) ?? 0) - 1 ? detail.shortText : detail.shortText + ", "}
></span>`;
}
)}
<bcbd-icon icon="circle-question" color="black" size="small"></bcbd-icon>
</li>` : ""}
</ul>
${this.renderModal(this.currentAlert)}
</div>
`;
} else {
return b``;
}
}
return b`
`;
}
renderModal(alertDetails) {
return b`
<bcbd-modal id="modal-ci" .title=${alertDetails ? decodeHtmlEntities(alertDetails == null ? void 0 : alertDetails[0].label) : ""}>
${alertDetails == null ? void 0 : alertDetails.map((chapter) => b`<p .innerHTML=${decodeHtmlEntities(chapter.text)}></p>`)}
</p>
</bcbd-modal>
`;
}
render() {
setLocale(this.lang);
return b` ${this.renderAlerts()} `;
}
};
BcbPrescriptionAlertsCI.styles = r$5([style$3, globalStyle]);
__decorateClass$c([
n2({ type: String })
], BcbPrescriptionAlertsCI.prototype, "apiUrl", 2);
__decorateClass$c([
n2({ type: String })
], BcbPrescriptionAlertsCI.prototype, "apiKey", 2);
__decorateClass$c([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsCI.prototype, "products", 2);
__decorateClass$c([
n2({ type: Object })
], BcbPrescriptionAlertsCI.prototype, "patient", 2);
__decorateClass$c([
n2({ type: Number })
], BcbPrescriptionAlertsCI.prototype, "productId", 2);
__decorateClass$c([
n2()
], BcbPrescriptionAlertsCI.prototype, "lang", 2);
__decorateClass$c([
n2({ type: Boolean })
], BcbPrescriptionAlertsCI.prototype, "isPatientActive", 2);
__decorateClass$c([
n2({ type: Object })
], BcbPrescriptionAlertsCI.prototype, "alertVisibility", 1);
__decorateClass$c([
e$1("#modal-ci")
], BcbPrescriptionAlertsCI.prototype, "modalCI", 2);
BcbPrescriptionAlertsCI = __decorateClass$c([
t("bcb-prescription-alerts-ci")
], BcbPrescriptionAlertsCI);
var __defProp$a = Object.defineProperty;
var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
var __decorateClass$b = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$a(target, key, result);
return result;
};
let BcbPrescriptionAlertsPE = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
if (this.patient && this.products) {
try {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.PRECAUTION_FOR_USE);
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.PRECAUTION_FOR_USE);
this.countAlerts();
this.checkHiddenAlerts();
} catch {
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.PRECAUTION_FOR_USE);
}
}
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
if (this.alertVisibility && (changedProperties.has("alertVisibility") || changedProperties.has("productId"))) {
this.checkHiddenAlerts();
}
}
checkHiddenAlerts() {
var _a2;
const product = getAlertsByProduct(this.productId).get();
if (!this.alertVisibility.precautions_emploi && ((_a2 = product == null ? void 0 : product.alerts2) == null ? void 0 : _a2.length) > 0) {
addHiddenAlert(this.productId, "pe-hidden-tag", "précautions d'emploi");
} else {
removeHiddenAlert(this.productId, "pe-hidden-tag");
}
}
countAlerts() {
var _a2, _b;
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId: this.productId,
alertCount: Number((((_b = (_a2 = getAlertsByProduct(this.productId).get()) == null ? void 0 : _a2.alerts2) == null ? void 0 : _b.length) || 0) > 0),
alertType: ALERT_TYPES$1.PRECAUTION_FOR_USE
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
async handleClick(chapter, level, product) {
const alertChapter2 = await getAlertChapter(
chapter,
level,
product,
this.productId,
this.apiUrl
);
if (this.modalPE) {
this.modalPE.open();
}
this.currentAlert = alertChapter2;
this.requestUpdate();
}
renderAlerts() {
if (!this.alertVisibility.precautions_emploi) {
return b``;
}
const product = getAlertsByProduct(this.productId).get();
if (product && this.isPatientActive && getProductVisibility(this.productId) === true) {
if ((product == null ? void 0 : product.alerts2.length) > 0) {
return b`
<div class="card-body bcb-prescription-card-alert">
<ul>
<li class="bcb-alert-item" data-test-id="pe-btn" @click="${() => this.handleClick(ALERT_CHAPTER.PFU_CHAPTER, ALERT_LEVELS.PRECAUTION_FOR_USE, product)}">
<div class="bcb-ellipsis bcb-allergy-ellipsis-color"></div>
${product.alerts2.length === 1 ? b`<span class="bcb-alert-title"> Précaution d'emploi :</span>` : b`<span class="bcb-alert-title"> Précautions d'emploi :</span>`}
${product.alerts2.map((detail, i3) => b`<span class="bcb-alert-content ${i3 === 0 ? "first-alert" : ""}"
.innerHTML=${i3 === product.alerts2.length - 1 ? detail.shortText + "" : detail.shortText + ", "}>
</span>
`)}
<bcbd-icon icon="circle-question" color="black" size="small"></bcbd-icon>
</li>
</ul>
${this.renderModal(this.currentAlert)}
</div>`;
} else {
return b``;
}
}
return b``;
}
renderModal(alertDetails) {
var _a2;
return b`
<bcbd-modal title="${alertDetails ? decodeHtmlEntities((_a2 = alertDetails == null ? void 0 : alertDetails[0]) == null ? void 0 : _a2.label) : ""}" id="modal-pe">
${alertDetails == null ? void 0 : alertDetails.map((chapter) => b`<p .innerHTML=${decodeHtmlEntities(chapter.text)}></p>`)}
</p>
</bcbd-modal>
`;
}
render() {
setLocale(this.lang).then();
if (getAlertsByProduct(this.productId).get()) {
return this.renderAlerts();
}
return b``;
}
};
BcbPrescriptionAlertsPE.styles = r$5([style$3, globalStyle]);
__decorateClass$b([
n2({ type: String })
], BcbPrescriptionAlertsPE.prototype, "apiUrl", 2);
__decorateClass$b([
n2({ type: String })
], BcbPrescriptionAlertsPE.prototype, "apiKey", 2);
__decorateClass$b([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsPE.prototype, "products", 2);
__decorateClass$b([
n2({ type: Object })
], BcbPrescriptionAlertsPE.prototype, "patient", 2);
__decorateClass$b([
n2({ type: Number })
], BcbPrescriptionAlertsPE.prototype, "productId", 2);
__decorateClass$b([
n2()
], BcbPrescriptionAlertsPE.prototype, "lang", 2);
__decorateClass$b([
n2({ type: Boolean })
], BcbPrescriptionAlertsPE.prototype, "isPatientActive", 2);
__decorateClass$b([
n2({ type: Object })
], BcbPrescriptionAlertsPE.prototype, "alertVisibility", 1);
__decorateClass$b([
e$1("#modal-pe")
], BcbPrescriptionAlertsPE.prototype, "modalPE", 2);
BcbPrescriptionAlertsPE = __decorateClass$b([
t("bcb-prescription-alerts-pe")
], BcbPrescriptionAlertsPE);
var __defProp$9 = Object.defineProperty;
var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
var __decorateClass$a = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$9(target, key, result);
return result;
};
let BcbPrescriptionAlertsAllergy = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = {};
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
connectedCallback() {
super.connectedCallback();
}
async fetchData() {
if (this.patient && this.products) {
try {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.ALLERGY);
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.ALLERGY);
this.countAlerts();
this.checkHiddenAlerts();
} catch {
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.ALLERGY);
}
}
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
if (this.alertVisibility && changedProperties.has("alertVisibility")) {
this.checkHiddenAlerts();
}
}
checkHiddenAlerts() {
var _a2;
const product = getAlertsByProduct(this.productId).get();
if (!this.alertVisibility.allergies && ((_a2 = product == null ? void 0 : product.alerts6) == null ? void 0 : _a2.length) > 0) {
addHiddenAlert(this.productId, "allergy-hidden-tag", "allergies");
} else {
removeHiddenAlert(this.productId, "allergy-hidden-tag");
}
}
countAlerts() {
var _a2, _b;
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId: this.productId,
alertCount: Number((((_b = (_a2 = getAlertsByProduct(this.productId).get()) == null ? void 0 : _a2.alerts6) == null ? void 0 : _b.length) || 0) > 0),
alertType: ALERT_TYPES$1.ALLERGY
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
async handleClick(chapter, level, product) {
const alertChapter2 = await getAlertChapter(
chapter,
level,
product,
this.productId,
this.apiUrl
);
if (this.modalAllergy) {
this.modalAllergy.open();
}
this.currentAlert = alertChapter2;
this.requestUpdate();
}
renderAlerts() {
if (!this.alertVisibility.allergies) {
return b``;
}
const product = getAlertsByProduct(this.productId).get();
if (product && this.isPatientActive && getProductVisibility(this.productId) === true) {
if ((product == null ? void 0 : product.alerts6.length) > 0) {
return b`
<div class="card-body bcb-prescription-card-alert">
<ul>
<li class="bcb-alert-item" data-test-id="allergy-btn" @click="${() => this.handleClick(ALERT_CHAPTER.ALLERGY_CHAPTER, ALERT_LEVELS.ALLERGY, product)}">
<div class="bcb-ellipsis bcb-allergy-ellipsis-color"></div>
${product.alerts6.length === 1 ? b`<span class="bcb-alert-title"> Allergie :</span>` : b`<span class="bcb-alert-title"> Allergies :</span>`}
${product.alerts6.map((detail, i3) => b`<span class="bcb-alert-content ${i3 === 0 ? "first-alert" : ""}"
.innerHTML=${i3 === product.alerts6.length - 1 ? detail.shortText + "" : detail.shortText + ", "}>
</span>`)}
<bcbd-icon icon="circle-question" color="black" size="small"></bcbd-icon>
</li>
</ul>
${this.renderModal(this.currentAlert)}
</div>`;
} else {
return b``;
}
}
return b``;
}
renderModal(alertDetails) {
return b`
<bcbd-modal id="modal-allergy" .title=${alertDetails ? decodeHtmlEntities(alertDetails == null ? void 0 : alertDetails[0].label) : ""}>
${alertDetails == null ? void 0 : alertDetails.map((chapter) => b`<p .innerHTML=${decodeHtmlEntities(chapter.text)}></p>`)}
</bcbd-modal>
`;
}
render() {
setLocale(this.lang);
return b`
${this.renderAlerts()}
`;
}
};
BcbPrescriptionAlertsAllergy.styles = r$5([style$3, globalStyle]);
__decorateClass$a([
n2({ type: String })
], BcbPrescriptionAlertsAllergy.prototype, "apiUrl", 2);
__decorateClass$a([
n2({ type: String })
], BcbPrescriptionAlertsAllergy.prototype, "apiKey", 2);
__decorateClass$a([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsAllergy.prototype, "products", 2);
__decorateClass$a([
n2({ type: Object })
], BcbPrescriptionAlertsAllergy.prototype, "patient", 2);
__decorateClass$a([
n2({ type: Number })
], BcbPrescriptionAlertsAllergy.prototype, "productId", 2);
__decorateClass$a([
n2()
], BcbPrescriptionAlertsAllergy.prototype, "lang", 2);
__decorateClass$a([
n2({ type: Boolean })
], BcbPrescriptionAlertsAllergy.prototype, "isPatientActive", 2);
__decorateClass$a([
n2({ type: Object })
], BcbPrescriptionAlertsAllergy.prototype, "alertVisibility", 1);
__decorateClass$a([
e$1("#modal-allergy")
], BcbPrescriptionAlertsAllergy.prototype, "modalAllergy", 2);
BcbPrescriptionAlertsAllergy = __decorateClass$a([
t("bcb-prescription-alerts-allergy")
], BcbPrescriptionAlertsAllergy);
var __defProp$8 = Object.defineProperty;
var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
var __decorateClass$9 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$8(target, key, result);
return result;
};
let BcbPrescriptionAlertsStopp = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = {};
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
connectedCallback() {
super.connectedCallback();
}
async fetchData() {
if (this.patient && this.products) {
try {
setStoppAlertRequestStatus(1);
await getAlerts(this.apiUrl, this.patient, this.products);
setStoppAlertRequestStatus(4);
this.countAlerts();
this.checkHiddenAlerts();
} catch {
setStoppAlertRequestStatus(3);
}
}
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl") || changedProperties.has("alertVisibility")) {
this.fetchData().then();
}
if (this.alertVisibility && (changedProperties.has("alertVisibility") || changedProperties.has("productId"))) {
this.checkHiddenAlerts();
}
}
checkHiddenAlerts() {
var _a2;
const product = getAlertsByProduct(this.productId).get();
if (!this.alertVisibility.stopp && ((_a2 = product == null ? void 0 : product.stoppAlerts) == null ? void 0 : _a2.length) > 0) {
addHiddenAlert(this.productId, "stopp-hidden-tag", "critères stopp");
} else {
removeHiddenAlert(this.productId, "stopp-hidden-tag");
}
}
countAlerts() {
var _a2, _b;
if (!allAlerts.get()) return;
const customEvent = new CustomEvent("getAlertsCount", {
detail: { productId: this.productId, alertCount: Number((((_b = (_a2 = getAlertsByProduct(this.productId).get()) == null ? void 0 : _a2.stoppAlerts) == null ? void 0 : _b.length) || 0) > 0), alertType: ALERT_TYPES$1.STOPP },
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
async handleClick(product) {
if (this.modalStopp) {
this.modalStopp.open();
}
this.currentAlert = product;
this.requestUpdate();
}
renderAlerts() {
if (!this.alertVisibility.stopp) {
return b``;
}
if (hasAlerts.get() && this.isPatientActive && getProductVisibility(this.productId) === true) {
const product = getAlertsByProduct(this.productId).get();
if ((product == null ? void 0 : product.stoppAlerts.length) > 0) {
return b`
<div class="card-body bcb-prescription-card-alert">
<ul>
<li class="bcb-alert-item" data-test-id="stopp-btn" @click="${() => this.handleClick(product)}">
<div class="bcb-ellipsis bcb-stopp-ellipsis-color"></div>
<span class="bcb-alert-title"> Critères stopp :</span>
<span class="bcb-ml-2" .innerHTML="${"Sujet âgé"}"></span>
<bcbd-icon icon="circle-question" size="small"></bcbd-icon>
</button>
</li>
</ul>
${this.renderModal(this.currentAlert)}
</div>`;
} else {
return b``;
}
}
return b``;
}
renderModal(alertDetails) {
return b`
<bcbd-modal id="modal-stopp" title="Critères STOPP">
${alertDetails == null ? void 0 : alertDetails.stoppAlerts.map((detail) => b`
<div class="bcb-mb-4 bcb-stopp-detail">
<h4 class="bcb-modal-subtitle">${detail.stoppDescription}</h4>
<p class="bcb-modal-text" .innerHTML="${detail.stoppMessage}"></p>
</div>
`)}
</bcbd-modal>
`;
}
render() {
setLocale(this.lang);
return b`
${this.renderAlerts()}
`;
}
};
BcbPrescriptionAlertsStopp.styles = r$5([style$3, globalStyle]);
__decorateClass$9([
n2({ type: String })
], BcbPrescriptionAlertsStopp.prototype, "apiUrl", 2);
__decorateClass$9([
n2({ type: String })
], BcbPrescriptionAlertsStopp.prototype, "apiKey", 2);
__decorateClass$9([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsStopp.prototype, "products", 2);
__decorateClass$9([
n2({ type: Object })
], BcbPrescriptionAlertsStopp.prototype, "patient", 2);
__decorateClass$9([
n2({ type: Number })
], BcbPrescriptionAlertsStopp.prototype, "productId", 2);
__decorateClass$9([
n2()
], BcbPrescriptionAlertsStopp.prototype, "lang", 2);
__decorateClass$9([
n2({ type: Boolean })
], BcbPrescriptionAlertsStopp.prototype, "isPatientActive", 2);
__decorateClass$9([
n2({ type: Object })
], BcbPrescriptionAlertsStopp.prototype, "alertVisibility", 1);
__decorateClass$9([
e$1("#modal-stopp")
], BcbPrescriptionAlertsStopp.prototype, "modalStopp", 2);
BcbPrescriptionAlertsStopp = __decorateClass$9([
t("bcb-prescription-alerts-stopp")
], BcbPrescriptionAlertsStopp);
const style$2 = '@charset "UTF-8";\n.card-overdose,\n.card-redundancy {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n border-radius: 8px;\n margin-bottom: 1.5rem;\n background-color: var(--bcbd-white-color, #FFFFFF);\n box-shadow: 0 1px 2px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294)), 0 6px 18px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294));\n}\n\n.card-redundancy .card-header {\n border-radius: 8px;\n color: var(--bcbd-gray-700-color, #374151);\n background: var(--bcbd-light-warning-color, #fdeccc);\n padding: 10px 14px;\n}\n.card-redundancy .card-header:hover {\n cursor: pointer;\n}\n.card-redundancy ul {\n list-style: none;\n padding: 0px;\n margin: 0px;\n display: none;\n}\n.card-redundancy.bcb-redundancy-active .card-header {\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.card-redundancy.bcb-redundancy-active ul {\n display: block;\n}\n.card-redundancy.bcb-redundancy-active .list-group-item {\n color: var(--bcbd-gray-700-color, #374151);\n font-weight: lighter;\n border-bottom: 1px solid var(--bcbd-gray-200-color, #E2E8F0);\n padding: 15px;\n}\n.card-redundancy.bcb-redundancy-active .list-group-item:last-child {\n border-bottom-left-radius: 17px;\n border-bottom-right-radius: 17px;\n border: none;\n}\n\n.bcb-skeleton, .card-redundancy.skeleton .card-header,\n.card-redundancy.skeleton .list-group-item {\n background: linear-gradient(90deg, var(--bcbd-gray-100-color, #f1f5f9) 25%, var(--bcbd-gray-200-color, #e2e8f0) 37%, var(--bcbd-gray-100-color, #f1f5f9) 63%);\n background-size: 400% 100%;\n animation: bcb-shimmer 1.5s ease infinite;\n border-radius: 4px;\n color: transparent !important;\n}\n\n@keyframes bcb-shimmer {\n 0% {\n background-position: -400px 0;\n }\n 100% {\n background-position: 400px 0;\n }\n}\n/* Skeleton spécifique redundancy */\n.card-redundancy.skeleton {\n border: 1px solid var(--bcbd-gray-200-color, #e2e8f0);\n border-radius: 8px;\n overflow: hidden;\n}\n\n.card-redundancy.skeleton .card-header {\n height: 20px;\n border-radius: 8px;\n margin: 10px 14px;\n border-bottom: none;\n}\n\n.card-redundancy.skeleton ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n.card-redundancy.skeleton .list-group-item {\n height: 14px;\n margin: 12px 15px;\n border-radius: 6px;\n border-bottom: none;\n}\n\n/* Application du shimmer */';
var __defProp$7 = Object.defineProperty;
var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
var __decorateClass$8 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$7(target, key, result);
return result;
};
let BcbPrescriptionAlertsRedundancy = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.productId = 0;
this.lang = "fr-FR";
this.isPatientActive = true;
this.redundancyCollapsed = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
this.isRedundancyToggledMap = {};
this.sortProducts = (products) => {
return products.sort((a2, b2) => a2.productId > b2.productId ? 1 : -1);
};
this.removeDuplicateProducts = (alerts) => {
Object.keys(alerts).forEach((productId) => {
var _a2;
const tempRedundancies = [];
(_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts4.forEach((alert) => {
alert.products.forEach((product) => {
const isProductInList = tempRedundancies.some(
(p2) => p2.productId === product.productId
);
product.molecule = alert.shortText;
const filteredByMolecule = tempRedundancies.some(
(p2) => p2.molecule === product.molecule
);
if (tempRedundancies.length === 0 || !isProductInList && filteredByMolecule) {
tempRedundancies.push(product);
}
alerts[Number(productId)].alerts4[0].products = tempRedundancies;
});
});
});
};
this.filterAlertsByUniqueShortText = (alerts) => {
Object.keys(alerts).forEach((productId) => {
var _a2;
if ((_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts4) {
const seenShortTexts = /* @__PURE__ */ new Set();
alerts[Number(productId)].alerts4 = alerts[Number(productId)].alerts4.filter((alert) => {
if (seenShortTexts.has(alert.shortText)) {
return false;
} else {
seenShortTexts.add(alert.shortText);
return true;
}
});
}
});
};
this.removeDuplicateAlerts = (alerts) => {
Object.keys(alerts).forEach((productId) => {
var _a2, _b;
const seenProducts = [];
if ((_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts4) {
alerts[Number(productId)].alerts4 = (_b = alerts[Number(productId)]) == null ? void 0 : _b.alerts4.filter((alert) => {
const sortedProducts = this.sortProducts(alert.products);
const productsString = JSON.stringify(sortedProducts);
const isDuplicate = seenProducts.some(
(seenProduct) => seenProduct === productsString
);
if (isDuplicate) {
return false;
} else {
seenProducts.push(productsString);
return true;
}
});
}
});
};
this.removeIdenticalAlerts = (alerts) => {
Object.keys(alerts).forEach((productId) => {
var _a2, _b;
const products1 = (_b = (_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts4[0]) == null ? void 0 : _b.products;
if (!products1) return;
const sortedProducts1 = this.sortProducts(products1);
Object.keys(alerts).forEach((otherProductId) => {
var _a3, _b2;
if (productId !== otherProductId) {
const products2 = (_b2 = (_a3 = alerts[Number(otherProductId)]) == null ? void 0 : _a3.alerts4[0]) == null ? void 0 : _b2.products;
if (products2) {
const sortedProducts2 = this.sortProducts(products2);
if (JSON.stringify(sortedProducts1) === JSON.stringify(sortedProducts2)) {
alerts[Number(otherProductId)].alerts4 = [];
}
}
}
});
});
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
try {
if (this.products) {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.REDUNDANCY);
this.dispatchRequestStatus();
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.REDUNDANCY);
this.dispatchRequestStatus();
this.countAlerts();
}
} catch (error) {
console.error("Erreur dans fetchData (redundancy):", error);
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.REDUNDANCY);
}
}
updated(changedProperties) {
if (this.apiUrl && changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
}
dispatchRequestStatus() {
const customEvent = new CustomEvent("requestStatus", {
detail: {
status: getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.REDUNDANCY).get().status,
bubbles: true,
composed: true
}
});
this.dispatchEvent(customEvent);
}
countAlerts() {
if (!hasAlerts.get()) return;
const dispatchAlertCountEvent = (productId, alertsCount2, linkedIds) => {
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId,
alertCount: alertsCount2,
alertType: ALERT_TYPES$1.REDUNDANCY,
linkedIds
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
};
const tempAlerts = [];
let alertsCount = 0;
const product = getAlertsByProduct(this.productId).get();
if (this.productId) {
alertsCount = 1;
const linkedIds = [];
product == null ? void 0 : product.alerts4.forEach((alert) => {
alert.products.forEach((product2) => {
if (!linkedIds.includes(product2.productId)) {
linkedIds.push(product2.productId);
}
});
});
dispatchAlertCountEvent(this.productId.toString(), alertsCount, linkedIds);
} else {
Object.keys(allAlerts.get()).forEach((productId) => {
var _a2;
(_a2 = getAlertsByProduct(Number(productId)).get()) == null ? void 0 : _a2.alerts4.forEach((alert) => {
var _a3;
if (alert && !tempAlerts.includes(alert.products)) {
tempAlerts.push(alert.products);
alertsCount = 1;
const linkedIds = [];
(_a3 = getAlertsByProduct(Number(productId)).get()) == null ? void 0 : _a3.alerts4.forEach((alert2) => {
alert2.products.forEach((product2) => {
if (!linkedIds.includes(product2.productId)) {
linkedIds.push(product2.productId);
}
});
});
dispatchAlertCountEvent(productId, alertsCount, linkedIds);
}
});
});
}
}
renderAlerts() {
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.REDUNDANCY).get().status === 1) {
return this.generateSkeleton();
}
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.REDUNDANCY).get().status === 3) {
return b`
<bcbd-alert
description-message="Une erreur est survenue lors de la récupération des redondances thérapeutiques." type="error"
></bcbd-alert>
`;
}
if (allAlerts.get()) {
if (this.productId) {
const product = getAlertsByProduct(this.productId).get();
if (!(product == null ? void 0 : product.alerts4) || product.alerts4.length === 0) {
return b`
<bcbd-alert
description-message="Aucune redondance thérapeutique à signaler." type="info"
></bcbd-alert>
`;
}
if (!this.alertVisibility.redondances_composant) {
return b`
<bcbd-alert description-message="Redondances thérapeutiques masquées" type="warning"></bcbd-alert>
`;
}
return this.generateCards(product, this.productId);
} else {
const sortedProductsAlerts = this.buildRedundancies(allAlerts.get());
const productIdsWithAlerts = Object.keys(sortedProductsAlerts).filter(
(pid) => {
var _a2, _b;
return ((_a2 = sortedProductsAlerts[Number(pid)]) == null ? void 0 : _a2.alerts4) && ((_b = sortedProductsAlerts[Number(pid)]) == null ? void 0 : _b.alerts4.length) > 0;
}
);
if (productIdsWithAlerts.length === 0) {
return b`
<bcbd-alert
description-message="Aucune redondance thérapeutique à signaler." type="info"
></bcbd-alert>
`;
}
if (!this.alertVisibility.redondances_composant) {
return b`
<bcbd-alert description-message="Redondances thérapeutiques masquées" type="warning"></bcbd-alert>
`;
}
return b`
${productIdsWithAlerts.map(
(pid) => this.generateCards(sortedProductsAlerts[Number(pid)], pid)
)}
`;
}
}
return b``;
}
generateSkeleton() {
return b`
<div class="card-redundancy skeleton">
<div class="card-header"></div>
<ul>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
<li class="list-group-item"></li>
</ul>
</div>
`;
}
generateCards(product, productId) {
if (this.isRedundancyToggledMap[productId] === void 0) {
this.isRedundancyToggledMap[productId] = !(this.redundancyCollapsed ?? true);
}
if (!product.alerts4 || product.alerts4.length === 0 || !this.alertVisibility.redondances_composant) {
return b`
<bcbd-alert
description-message="Aucune redondance thérapeutique à signaler." type="info"
></bcbd-alert>
`;
} else {
return b`
${product.alerts4.map(
(alert, alertIndex) => {
if (alert.shortText !== "Correspondant à :") {
const productIds = alert.products.map((p2) => p2.productId).join("-");
const toggleKey = `${productId}-${alertIndex}`;
if (this.isRedundancyToggledMap[toggleKey] === void 0) {
this.isRedundancyToggledMap[toggleKey] = !(this.redundancyCollapsed ?? true);
}
return b`
<div class="card card-redundancy ${this.isRedundancyToggledMap[toggleKey] ? "bcb-redundancy-active" : ""}">
<div class="card-header" @click="${() => this.toggleRedundancy(productId, alertIndex)}">
<div
class="dgc-alert-bcb-content-more"
data-test-id="redundancy-header-${productIds}"
>
<label class="text-start">
<strong
.innerHTML=${this.getRedundancyTitle(alert)}
></strong>
</label>
</div>
</div>
<ul>
${this.getRedundantProducts([alert]).map(
(redundantProduct, index) => b`
<li
class="list-group-item d-flex justify-content-between align-items-center"
data-test-id="redundancy-details-${redundantProduct.productId}-${index}"
>
<b .innerHTML=${redundantProduct.labelHtml}></b>
</li>
`
)}
</ul>
</div>
`;
}
return b``;
}
)}
`;
}
}
toggleRedundancy(productId, index) {
const key = index !== void 0 ? `${productId}-${index}` : productId.toString();
this.isRedundancyToggledMap[key] = !this.isRedundancyToggledMap[key];
this.requestUpdate();
}
buildRedundancies(alerts) {
this.removeDuplicateProducts(alerts);
this.removeDuplicateAlerts(alerts);
this.removeIdenticalAlerts(alerts);
this.filterAlertsByUniqueShortText(alerts);
return alerts;
}
getRedundancyTitle(alert) {
return alert == null ? void 0 : alert.details;
}
getRedundantProducts(alerts) {
const products = [];
alerts.forEach((alert) => {
alert.products.forEach((product) => {
if (!products.some((p2) => p2.productId === product.productId)) {
products.push({
...product,
linkedIds: alerts.map((a2) => a2.products.map((p2) => p2.productId)).flat()
});
}
});
});
return products;
}
render() {
setLocale(this.lang).then();
if (allAlerts.get()) {
return this.renderAlerts();
}
return b``;
}
};
BcbPrescriptionAlertsRedundancy.styles = r$5(style$2);
__decorateClass$8([
n2({ type: String })
], BcbPrescriptionAlertsRedundancy.prototype, "apiUrl", 2);
__decorateClass$8([
n2({ type: String })
], BcbPrescriptionAlertsRedundancy.prototype, "apiKey", 2);
__decorateClass$8([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsRedundancy.prototype, "products", 2);
__decorateClass$8([
n2({ type: Object })
], BcbPrescriptionAlertsRedundancy.prototype, "patient", 2);
__decorateClass$8([
n2({ type: Number })
], BcbPrescriptionAlertsRedundancy.prototype, "productId", 2);
__decorateClass$8([
n2()
], BcbPrescriptionAlertsRedundancy.prototype, "lang", 2);
__decorateClass$8([
n2({ type: Boolean })
], BcbPrescriptionAlertsRedundancy.prototype, "isPatientActive", 2);
__decorateClass$8([
n2({ type: Boolean })
], BcbPrescriptionAlertsRedundancy.prototype, "redundancyCollapsed", 2);
__decorateClass$8([
n2({ type: Object })
], BcbPrescriptionAlertsRedundancy.prototype, "alertVisibility", 1);
BcbPrescriptionAlertsRedundancy = __decorateClass$8([
t("bcb-prescription-alerts-redundancy")
], BcbPrescriptionAlertsRedundancy);
var __defProp$6 = Object.defineProperty;
var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
var __decorateClass$7 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$6(target, key, result);
return result;
};
let BcbPrescriptionAlertsPoso = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = {};
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
this.posoAlerts = [];
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
if (this.patient && this.products) {
try {
setPosologyAlertRequestStatus(1);
await getPosoAlerts(this.apiUrl, this.patient, this.products);
setPosologyAlertRequestStatus(4);
this.countAlerts();
this.checkHiddenAlerts();
} catch {
setPosologyAlertRequestStatus(3);
}
}
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
if (this.alertVisibility && (changedProperties.has("alertVisibility") || changedProperties.has("productId"))) {
this.checkHiddenAlerts();
}
}
checkHiddenAlerts() {
var _a2;
const product = getAlertsByProduct(this.productId).get();
if (!this.alertVisibility.posologies && ((_a2 = product == null ? void 0 : product.posoAlerts) == null ? void 0 : _a2.length) > 0) {
addHiddenAlert(this.productId, "posology-hidden-tag", "alertes posologies");
} else {
removeHiddenAlert(this.productId, "posology-hidden-tag");
}
}
countAlerts() {
var _a2, _b;
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId: this.productId,
alertCount: Number((((_b = (_a2 = getAlertsByProduct(this.productId).get()) == null ? void 0 : _a2.posoAlerts) == null ? void 0 : _b.length) || 0) > 0),
alertType: ALERT_TYPES$1.POSOLOGY,
posologyLevel: getPosoAlertLevel(getAlertsByProduct(this.productId).get())
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
async handleClick(product) {
const posoMessage = await getPosoMessage(product);
if (this.modalPoso) {
this.modalPoso.open();
}
this.currentAlert = posoMessage;
this.requestUpdate();
}
sortPosoMessages(alerts) {
this.posoAlerts = [];
alerts.forEach((alert) => {
if (alert.errorLabel !== "" && !this.posoAlerts.includes(alert.durationMessage)) {
this.posoAlerts.push(alert.errorLabel);
}
if (alert.durationMessage !== "" && !this.posoAlerts.includes(alert.durationMessage)) {
this.posoAlerts.push(alert.durationMessage);
}
if (alert.quantityMessage !== "" && !this.posoAlerts.includes(alert.quantityMessage)) {
this.posoAlerts.push(alert.quantityMessage);
}
if (alert.maxPerDoseMessage !== "" && !this.posoAlerts.includes(alert.maxPerDoseMessage)) {
this.posoAlerts.push(alert.maxPerDoseMessage);
}
if (alert.intervalMessage !== "" && !this.posoAlerts.includes(alert.intervalMessage)) {
this.posoAlerts.push(alert.intervalMessage);
}
});
}
renderAlerts() {
if (!this.alertVisibility.posologies) {
return b``;
}
const product = getAlertsByProduct(this.productId).get();
const posoAlertLevel = getPosoAlertLevel(product);
if (product && this.isPatientActive && getProductVisibility(this.productId) === true) {
if ((product == null ? void 0 : product.posoAlerts.length) > 0) {
this.sortPosoMessages(product == null ? void 0 : product.posoAlerts);
return b`
<div class="card-body bcb-prescription-card-alert">
<ul>
<li class="bcb-alert-item" data-test-id="posology-btn" @click="${() => this.handleClick(product)}">
<div class="bcb-ellipsis ${posoAlertLevel}"></div>
${product.posoAlerts.length === 1 ? b`<span class="bcb-alert-title"> Alerte posologie :</span>` : b`<span class="bcb-alert-title"> Alertes posologie :</span>`}
${this.posoAlerts.map((detail, i3) => {
var _a2;
return b`<span class="bcb-alert-content ${i3 === 0 ? "first-alert" : ""}"
.innerHTML=${i3 === ((_a2 = this.posoAlerts) == null ? void 0 : _a2.length) - 1 ? detail + "" : detail + ", "}>
</span>`;
})}
<bcbd-icon icon="circle-question" color="black" size="small"></bcbd-icon>
</li>
</ul>
</div>
${this.renderModal(this.currentAlert)}`;
} else {
return b``;
}
}
return b``;
}
renderModal(alertDetails) {
return b`
<bcbd-modal id="modal-poso" title="Alerte posologie">
<p .innerHTML=${alertDetails == null ? void 0 : alertDetails.htmlMessage}></p>
<p .innerHTML=${alertDetails == null ? void 0 : alertDetails.quantityMessage}></p>
</bcbd-modal>
`;
}
render() {
setLocale(this.lang);
return b`
${this.renderAlerts()}
`;
}
};
BcbPrescriptionAlertsPoso.styles = r$5([style$3, globalStyle]);
__decorateClass$7([
n2({ type: String })
], BcbPrescriptionAlertsPoso.prototype, "apiUrl", 2);
__decorateClass$7([
n2({ type: String })
], BcbPrescriptionAlertsPoso.prototype, "apiKey", 2);
__decorateClass$7([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsPoso.prototype, "products", 2);
__decorateClass$7([
n2({ type: Object })
], BcbPrescriptionAlertsPoso.prototype, "patient", 2);
__decorateClass$7([
n2({ type: Number })
], BcbPrescriptionAlertsPoso.prototype, "productId", 2);
__decorateClass$7([
n2()
], BcbPrescriptionAlertsPoso.prototype, "lang", 2);
__decorateClass$7([
n2({ type: Boolean })
], BcbPrescriptionAlertsPoso.prototype, "isPatientActive", 2);
__decorateClass$7([
n2({ type: Object })
], BcbPrescriptionAlertsPoso.prototype, "alertVisibility", 1);
__decorateClass$7([
e$1("#modal-poso")
], BcbPrescriptionAlertsPoso.prototype, "modalPoso", 2);
BcbPrescriptionAlertsPoso = __decorateClass$7([
t("bcb-prescription-alerts-poso")
], BcbPrescriptionAlertsPoso);
const style$1 = '@charset "UTF-8";\n* {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n}\n\n.warning-alert {\n margin-bottom: 1.5rem;\n}\n\n.bcb-score-separator {\n margin: 0 4px;\n}\n\n.bcb-interactions {\n border-radius: 8px;\n margin-bottom: 1.5rem;\n background-color: var(--bcbd-white-color, #FFFFFF);\n box-shadow: 0 1px 2px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294)), 0 6px 18px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294));\n}\n.bcb-interactions .bcb-interactions-head {\n height: 32px;\n border-radius: 8px;\n padding: 0 12px 0 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: -1px;\n cursor: pointer;\n}\n.bcb-interactions .bcb-interactions-head .head_title {\n font-weight: bold;\n flex: 1;\n text-transform: uppercase;\n}\n.bcb-interactions .bcb-interactions-head .head_level {\n margin-left: auto;\n border-radius: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--bcbd-white-color, #FFFFFF);\n font-weight: 700;\n font-size: 14px;\n padding: 0 8px;\n height: 25px;\n}\n.bcb-interactions .bcb-interactions-body {\n overflow: hidden;\n display: none;\n}\n.bcb-interactions .bcb-interactions-body .item {\n display: flex;\n padding: 10px;\n align-items: center;\n}\n.bcb-interactions .bcb-interactions-body .item .level {\n width: 16px;\n height: 16px;\n border-radius: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: bold;\n font-size: 12px;\n position: relative;\n margin-right: 10px;\n}\n.bcb-interactions .bcb-interactions-body .item .level .level_number {\n color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-body .item .level .level_arrow {\n position: absolute;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n}\n.bcb-interactions .bcb-interactions-body .item .content {\n flex: 1;\n overflow: hidden;\n}\n.bcb-interactions .bcb-interactions-body .item .content .content_title {\n display: block;\n font-size: 14px;\n}\n.bcb-interactions .bcb-interactions-body .item .content .content_text {\n display: block;\n font-size: 12px;\n font-style: italic;\n}\n.bcb-interactions .bcb-interactions-body .item:not(:last-child) {\n border-bottom: 1px solid var(--bcbd-gray-200-color, #E2E8F0);\n}\n.bcb-interactions .bcb-interactions-body .item.item-up .level {\n margin-top: 13px;\n}\n.bcb-interactions .bcb-interactions-body .item.item-up .level .level_arrow {\n top: -16px;\n transform: rotate(180deg);\n}\n.bcb-interactions .bcb-interactions-body .item.item-down .level {\n margin-bottom: 13px;\n}\n.bcb-interactions .bcb-interactions-body .item.item-down .level .level_arrow {\n bottom: -14px;\n}\n.bcb-interactions.bcb-interactions-active .bcb-interactions-head {\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.bcb-interactions.bcb-interactions-active .bcb-interactions-body,\n.bcb-interactions.bcb-interactions-active .bcb-ipc-body {\n display: block;\n}\n.bcb-interactions .ellipsis {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.bcb-interactions .btn-help {\n height: 16px;\n width: 16px;\n border-radius: 8px;\n text-align: center;\n color: var(--bcbd-white-color, #FFFFFF);\n font-size: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.bcb-interactions .btn-help:hover {\n cursor: pointer;\n}\n.bcb-interactions bcbd-icon:hover {\n cursor: pointer;\n}\n.bcb-interactions {\n /* Gestion des color */\n}\n.bcb-interactions .bcb-interactions-head-info {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .bcb-interactions-head-info .head_level {\n color: var(--bcbd-gray-700-color, #374151);\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-head-info .head_level .bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-warning-color, #f59f00);\n margin-right: 8px;\n}\n.bcb-interactions .text-interactions-info {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .level-interactions-info {\n border: 2px solid var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .level-interactions-info .level_arrow {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .level-interactions-info .level_number {\n color: var(--bcbd-gray-700-color, #374151) !important;\n}\n.bcb-interactions .btn-help-interactions-info {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-info {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-info .bcb-interactions-body .level {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-info .bcb-interactions-body .level .level_arrow {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-info .bcb-interactions-body .btn-help {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-ellipsis-anticholinergic-info {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-warning-color, #f59f00);\n margin-right: 8px;\n}\n.bcb-interactions .bcb-interactions-head-danger {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .bcb-interactions-head-danger .head_level {\n color: var(--bcbd-gray-700-color, #374151);\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-head-danger .head_level .bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-danger-color, #cf406e);\n margin-right: 8px;\n}\n.bcb-interactions .text-interactions-danger {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .level-interactions-danger {\n border: 2px solid var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .level-interactions-danger .level_arrow {\n color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .level-interactions-danger .level_number {\n color: var(--bcbd-gray-700-color, #374151) !important;\n}\n.bcb-interactions .btn-help-interactions-danger {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .bcb-interactions-danger {\n color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .bcb-interactions-danger .bcb-interactions-body .level {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .bcb-interactions-danger .bcb-interactions-body .level .level_arrow {\n color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .bcb-interactions-danger .bcb-interactions-body .btn-help {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n.bcb-interactions .bcb-ellipsis-anticholinergic-danger {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-danger-color, #cf406e);\n margin-right: 8px;\n}\n.bcb-interactions .bcb-interactions-head-warning {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .bcb-interactions-head-warning .head_level {\n color: var(--bcbd-gray-700-color, #374151);\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-head-warning .head_level .bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-warning-color, #f59f00);\n margin-right: 8px;\n}\n.bcb-interactions .text-interactions-warning {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .level-interactions-warning {\n border: 2px solid var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .level-interactions-warning .level_arrow {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .level-interactions-warning .level_number {\n color: var(--bcbd-gray-700-color, #374151) !important;\n}\n.bcb-interactions .btn-help-interactions-warning {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-warning {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-warning .bcb-interactions-body .level {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-warning .bcb-interactions-body .level .level_arrow {\n color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-interactions-warning .bcb-interactions-body .btn-help {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n.bcb-interactions .bcb-ellipsis-anticholinergic-warning {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-warning-color, #f59f00);\n margin-right: 8px;\n}\n.bcb-interactions .bcb-interactions-head-orange {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .bcb-interactions-head-orange .head_level {\n color: var(--bcbd-gray-700-color, #374151);\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-head-orange .head_level .bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-orange-color, #f76707);\n margin-right: 8px;\n}\n.bcb-interactions .text-interactions-orange {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .level-interactions-orange {\n border: 2px solid var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .level-interactions-orange .level_arrow {\n color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .level-interactions-orange .level_number {\n color: var(--bcbd-gray-700-color, #374151) !important;\n}\n.bcb-interactions .btn-help-interactions-orange {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .bcb-interactions-orange {\n color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .bcb-interactions-orange .bcb-interactions-body .level {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .bcb-interactions-orange .bcb-interactions-body .level .level_arrow {\n color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .bcb-interactions-orange .bcb-interactions-body .btn-help {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n.bcb-interactions .bcb-ellipsis-anticholinergic-orange {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-orange-color, #f76707);\n margin-right: 8px;\n}\n.bcb-interactions .bcb-interactions-head-gray {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .bcb-interactions-head-gray .head_level {\n color: var(--bcbd-gray-700-color, #374151);\n background-color: var(--bcbd-white-color, #FFFFFF);\n}\n.bcb-interactions .bcb-interactions-head-gray .head_level .bcb-ellipsis {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-gray-600-color, #475569);\n margin-right: 8px;\n}\n.bcb-interactions .text-interactions-gray {\n color: var(--bcbd-gray-700-color, #374151);\n}\n.bcb-interactions .level-interactions-gray {\n border: 2px solid var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .level-interactions-gray .level_arrow {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .level-interactions-gray .level_number {\n color: var(--bcbd-gray-700-color, #374151) !important;\n}\n.bcb-interactions .btn-help-interactions-gray {\n background-color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .bcb-interactions-gray {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .bcb-interactions-gray .bcb-interactions-body .level {\n background-color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .bcb-interactions-gray .bcb-interactions-body .level .level_arrow {\n color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .bcb-interactions-gray .bcb-interactions-body .btn-help {\n background-color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-interactions .bcb-ellipsis-anticholinergic-gray {\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: var(--bcbd-gray-600-color, #475569);\n margin-right: 8px;\n}\n\n.bcb-interactions-head-info {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n.bcb-interactions-head-info .head_number {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n\n.content_score-info {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n\n.bcb-interactions-head-danger {\n background-color: var(--bcbd-light-danger-color, #f5d9e2);\n}\n.bcb-interactions-head-danger .head_number {\n background-color: var(--bcbd-light-danger-color, #f5d9e2);\n}\n\n.content_score-danger {\n background-color: var(--bcbd-light-danger-color, #f5d9e2);\n}\n\n.bcb-interactions-head-warning {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n.bcb-interactions-head-warning .head_number {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n\n.content_score-warning {\n background-color: var(--bcbd-light-warning-color, #fdeccc);\n}\n\n.bcb-interactions-head-orange {\n background-color: var(--bcbd-light-orange-color, #fde1cd);\n}\n.bcb-interactions-head-orange .head_number {\n background-color: var(--bcbd-light-orange-color, #fde1cd);\n}\n\n.content_score-orange {\n background-color: var(--bcbd-light-orange-color, #fde1cd);\n}\n\n.bcb-interactions-head-info .head_number {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n\n.content_score-info {\n padding: 4px;\n border: 1px solid var(--bcbd-warning-color, #f59f00);\n border-radius: 8px;\n}\n\n.bcb-interactions-head-danger .head_number {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n\n.content_score-danger {\n padding: 4px;\n border: 1px solid var(--bcbd-danger-color, #cf406e);\n border-radius: 8px;\n}\n\n.bcb-interactions-head-warning .head_number {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n\n.content_score-warning {\n padding: 4px;\n border: 1px solid var(--bcbd-warning-color, #f59f00);\n border-radius: 8px;\n}\n\n.bcb-interactions-head-orange .head_number {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n\n.content_score-orange {\n padding: 4px;\n border: 1px solid var(--bcbd-orange-color, #f76707);\n border-radius: 8px;\n}\n\n.bcb-interactions-head-gray .head_number {\n background-color: var(--bcbd-gray-600-color, #475569);\n}\n\n.content_score-gray {\n padding: 4px;\n border: 1px solid var(--bcbd-gray-600-color, #475569);\n border-radius: 8px;\n}\n\n.interaction-modal {\n --bcbd-modal-max-width: 900px;\n}\n\n.modal-content {\n background-color: var(--bcbd-white-color, #FFFFFF);\n margin: 15% auto;\n border: 1px solid var(--bcbd-light-gray-color, #AFAFAF);\n width: 40%;\n border-radius: 8px;\n max-height: 400px;\n}\n\n.close {\n color: var(--bcbd-white-color, #FFFFFF);\n float: right;\n font-size: 28px;\n font-weight: bold;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.close:hover,\n.close:focus {\n color: var(--bcbd-light-gray-color, #AFAFAF);\n text-decoration: none;\n cursor: pointer;\n}\n\n.modal-body {\n padding: 20px;\n}\n\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: linear-gradient(45deg, var(--bcbd-secondary-color, #4A0C8A) 0%, var(--bcbd-primary-color, #0C75AD) 100%);\n padding: 10px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n}\n\n.modal-title {\n -webkit-text-fill-color: var(--bcbd-white-color, #FFFFFF);\n}\n\n.modal-body-content {\n max-height: 200px;\n overflow-y: auto;\n}\n\n.bcb-ipc-body {\n overflow: hidden;\n display: none;\n}\n.bcb-ipc-body .bcb-ipc-container {\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.bcb-ipc-body .bcb-ipc-container .bcb-ipc-content {\n flex: 1;\n overflow: hidden;\n}\n.bcb-ipc-body .bcb-ipc-container:not(:last-child) {\n border-bottom: 1px solid var(--bcbd-gray-200-color, #E2E8F0);\n}\n.bcb-ipc-body .bcb-ipc-container .bcb-ipc-details p {\n margin-top: 8px;\n font-style: italic;\n margin-bottom: 0px;\n font-size: 12px;\n margin-top: 0px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.bcb-skeleton {\n background: linear-gradient(90deg, var(--bcbd-gray-100-color, #f1f5f9) 25%, var(--bcbd-gray-200-color, #e2e8f0) 37%, var(--bcbd-gray-100-color, #f1f5f9) 63%);\n background-size: 400% 100%;\n animation: bcb-shimmer 1.4s ease infinite;\n border-radius: 4px;\n color: transparent !important;\n}\n\n@keyframes bcb-shimmer {\n 0% {\n background-position: -400px 0;\n }\n 100% {\n background-position: 400px 0;\n }\n}\n/* Skeleton spécifique interactions */\n.bcb-interactions.skeleton {\n border-color: var(--bcbd-gray-200-color, #e2e8f0);\n}\n\n.bcb-interactions.skeleton .bcb-interactions-head {\n border-color: var(--bcbd-gray-200-color, #e2e8f0);\n}\n\n.bcb-interactions.skeleton .bcb-interactions-head .head_title {\n height: 16px;\n width: 60%;\n border-radius: 8px;\n margin: 0;\n}\n\n.bcb-interactions.skeleton .bcb-interactions-head .head_number {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n}\n\n/* Skeleton des items */\n.bcb-interactions.skeleton .bcb-interactions-body {\n display: block;\n /* on force l’affichage en mode skeleton */\n}\n\n.bcb-interactions.skeleton .bcb-interactions-body .item {\n padding: 10px;\n}\n\n.bcb-interactions.skeleton .bcb-interactions-body .item .level {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n}\n\n.bcb-interactions.skeleton .bcb-interactions-body .item .content_title {\n height: 12px;\n width: 80%;\n margin-bottom: 6px;\n border-radius: 6px;\n}\n\n.bcb-interactions.skeleton .bcb-interactions-body .item .content_text {\n height: 10px;\n width: 60%;\n border-radius: 6px;\n}\n\n/*ANTICHOLINERGIC */\n.content_score_container {\n padding: 8px 0;\n font-size: 12px;\n margin-top: 0.5rem;\n}\n\n.bcb-modal-container {\n display: flex;\n}\n.bcb-modal-container h3 {\n color: var(--bcbd-primary-color, #0C75AD);\n}\n.bcb-modal-container .bcb-modal-source {\n margin-top: 0.5rem;\n font-style: italic;\n color: var(--bcbd-gray-600-color, #475569);\n}\n.bcb-modal-container .bcb-modal-threshold {\n font-weight: bold;\n margin-top: 0.5rem;\n}\n\n.bcb-modal-footer {\n margin-top: 1.5rem;\n font-style: italic;\n color: var(--bcbd-gray-600-color, #475569);\n}\n\n.bcb-modal-content-CIA {\n padding-right: 0.5rem;\n}\n\n.bcb-mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.bcb-mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.bcb-mt-5 {\n margin-top: 2rem !important;\n}';
var __defProp$5 = Object.defineProperty;
var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
var __decorateClass$6 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$5(target, key, result);
return result;
};
let BcbPrescriptionAlertsInteractions = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = null;
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this.interactionLvl1Collapsed = true;
this.interactionLvl2Collapsed = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
this.isInteractionToggledMap = {};
this.interactionColorMap = {
1: "info",
2: "warning",
3: "orange",
4: "danger"
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
try {
if (this.products) {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.INTERACTION);
this.dispatchRequestStatus();
await getAlerts(this.apiUrl, this.patient, this.products);
this.countAlerts();
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.INTERACTION);
}
} catch (error) {
console.error("Erreur dans fetchData (interactions):", error);
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.INTERACTION);
} finally {
this.dispatchRequestStatus();
}
}
updated(changedProperties) {
if (this.apiUrl && changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
}
dispatchRequestStatus() {
const customEvent = new CustomEvent("requestStatus", {
detail: {
status: getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.INTERACTION).get().status,
bubbles: true,
composed: true
}
});
this.dispatchEvent(customEvent);
}
dispatchAlertCountEvent(productId, alertsCount, linkedIds, interactionLv) {
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId,
alertCount: alertsCount,
alertType: ALERT_TYPES$1.INTERACTION,
linkedIds,
alertsByLvl: {
interactionsLv1: interactionLv === 1 ? 1 : 0,
interactionsLv2: interactionLv === 2 ? 1 : 0,
interactionsLv3: interactionLv === 3 ? 1 : 0,
interactionsLv4: interactionLv === 4 ? 1 : 0
}
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
countAlerts() {
if (!hasAlerts.get()) return;
if (this.productId) {
const product = getAlertsByProduct(this.productId).get();
const linkedIds = [];
product == null ? void 0 : product.alerts0.forEach((alert) => {
alert.products.forEach((product2) => {
if (!linkedIds.includes(product2.productId)) {
linkedIds.push(product2.productId);
}
});
});
this.dispatchAlertCountEvent(this.productId.toString(), 1, linkedIds);
} else {
const processedProductIds = /* @__PURE__ */ new Set();
Object.keys(allAlerts.get()).forEach((productId) => {
var _a2;
const alerts = (_a2 = getAlertsByProduct(Number(productId)).get()) == null ? void 0 : _a2.alerts0;
if (alerts && alerts.length > 0 && !processedProductIds.has(productId)) {
processedProductIds.add(productId);
const level = this.getGlobalInteractionLevel(alerts);
const linkedIds = [];
alerts.forEach((alert) => {
alert.products.forEach((product) => {
if (!linkedIds.includes(product.productId)) {
linkedIds.push(product.productId);
}
});
});
this.dispatchAlertCountEvent(productId, 1, linkedIds, level);
}
});
}
}
async handleClick(alertDetails) {
if (this.modalInteraction) {
this.modalInteraction.open();
}
this.currentAlert = alertDetails;
this.requestUpdate();
}
createWarningAlert(_level, label) {
return b`
<div class="warning-alert">
<bcbd-alert description-message="${label}" type="warning"></bcbd-alert>
</div>
`;
}
getGlobalInteractionLevel(alerts) {
if (!alerts || alerts.length === 0) return 0;
return alerts.reduce((maxLevel, alert) => {
const level = typeof (alert == null ? void 0 : alert.level) === "number" ? alert.level : 0;
return Math.max(maxLevel, level);
}, 0);
}
shouldShowWarningForLevel(level, isGlobalLevelPresent) {
const visibilityMap = {
1: this.alertVisibility.interactionsLv1,
2: this.alertVisibility.interactionsLv2,
3: this.alertVisibility.interactionsLv3,
4: this.alertVisibility.interactionsLv4
};
const isVisible = visibilityMap[level];
return !isVisible && isGlobalLevelPresent;
}
addWarningAlertsForLevels(warningAlerts, product) {
const globalLevel = this.getGlobalInteractionLevel(product == null ? void 0 : product.alerts0);
[4, 3, 2, 1].forEach((level) => {
const isGlobalLevelPresent = globalLevel === level;
if (this.shouldShowWarningForLevel(level, isGlobalLevelPresent)) {
warningAlerts.push(this.createWarningAlert(level, `Interactions de niveau ${level} masquées`));
}
});
}
renderAlerts() {
var _a2;
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.INTERACTION).get().status === 1) {
return this.generateSkeleton();
}
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.INTERACTION).get().status === 3) {
return b`
<bcbd-alert
description-message="Une erreur est survenue lors de la récupération des interactions." type="error"
></bcbd-alert>
`;
}
const warningAlerts = [];
if (allAlerts.get()) {
const tempProducts = [];
if (this.productId) {
const product = getAlertsByProduct(this.productId).get();
const filteredProduct = {
...product,
alerts0: ((_a2 = product == null ? void 0 : product.alerts0) == null ? void 0 : _a2.filter(
(alert) => {
var _a3;
return alert.products && ((_a3 = alert.products[0]) == null ? void 0 : _a3.productId) === Number(this.productId);
}
)) || []
};
this.addWarningAlertsForLevels(warningAlerts, filteredProduct);
if (!(filteredProduct == null ? void 0 : filteredProduct.alerts0) || filteredProduct.alerts0.length === 0) {
if (warningAlerts.length > 0) {
return b`${warningAlerts}`;
}
return b`
<bcbd-alert
description-message="Aucune interaction à signaler." type="info"
></bcbd-alert>
`;
}
const cards = this.generateCards(filteredProduct, this.productId);
if (warningAlerts.length > 0) {
return b`${warningAlerts}${cards}`;
}
return cards;
} else {
const sortedProductsAlerts = this.buildInteractions(allAlerts.get());
const sortedProductIds = Object.keys(sortedProductsAlerts).sort((a2, b2) => {
var _a3, _b;
const levelA = this.getGlobalInteractionLevel((_a3 = sortedProductsAlerts[Number(a2)]) == null ? void 0 : _a3.alerts0);
const levelB = this.getGlobalInteractionLevel((_b = sortedProductsAlerts[Number(b2)]) == null ? void 0 : _b.alerts0);
return levelB - levelA;
});
const allItems = [];
[4, 3, 2, 1].forEach((level) => {
const hasAnyGlobalLevelForLevel = sortedProductIds.some((productId) => {
const product = sortedProductsAlerts[Number(productId)];
const globalLevel = this.getGlobalInteractionLevel(product == null ? void 0 : product.alerts0);
return globalLevel === level;
});
if (this.shouldShowWarningForLevel(level, hasAnyGlobalLevelForLevel)) {
allItems.push(this.createWarningAlert(level, `Interactions de niveau ${level} masquées`));
}
sortedProductIds.forEach((productId) => {
const product = sortedProductsAlerts[Number(productId)];
const globalLevel = this.getGlobalInteractionLevel(product == null ? void 0 : product.alerts0);
if ((product == null ? void 0 : product.alerts0) && product.alerts0.length > 0 && globalLevel === level && !tempProducts.includes(productId)) {
tempProducts.push(productId);
allItems.push(this.generateCards(product, productId));
}
});
});
if (allItems.length === 0) {
return b`
<bcbd-alert
description-message="Aucune interaction à signaler." type="info"
></bcbd-alert>
`;
}
return b`${allItems}`;
}
}
if (warningAlerts.length > 0) {
return b`${warningAlerts}`;
}
return b``;
}
generateSkeleton() {
return b`
<div class="bcb-interactions skeleton">
<div class="bcb-interactions-head">
<div class="head_title bcb-skeleton"></div>
<div class="head_number bcb-skeleton"></div>
</div>
<div class="bcb-interactions-body">
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
</div>
</div>
`;
}
generateCards(product, productId) {
if (this.isInteractionToggledMap[productId] === void 0) {
const globalLevel2 = this.getGlobalInteractionLevel(product.alerts0);
if (globalLevel2 === 1) {
this.isInteractionToggledMap[productId] = !(this.interactionLvl1Collapsed ?? true);
} else if (globalLevel2 === 2) {
this.isInteractionToggledMap[productId] = !(this.interactionLvl2Collapsed ?? true);
} else {
this.isInteractionToggledMap[productId] = true;
}
}
const globalLevel = this.getGlobalInteractionLevel(product.alerts0);
if (globalLevel > 0) {
const isLevelVisible = globalLevel === 1 && this.alertVisibility.interactionsLv1 || globalLevel === 2 && this.alertVisibility.interactionsLv2 || globalLevel === 3 && this.alertVisibility.interactionsLv3 || globalLevel === 4 && this.alertVisibility.interactionsLv4;
if (!isLevelVisible) {
return b``;
} else {
const colorKey = this.interactionColorMap[globalLevel] ?? "info";
return b`
<div
class="bcb-interactions ${this.isInteractionToggledMap[productId] ? "bcb-interactions-active" : ""}"
>
<div
class="bcb-interactions-head bcb-interactions-head-${colorKey}"
data-test-id="interaction-head"
@click="${() => this.toggleInteraction(productId)}"
>
<div
class="head_title ellipsis"
.innerHTML="${this.getInteractionTitle(productId, product.alerts0)}"
></div>
<div class="head_level">
<div class="bcb-ellipsis"></div>
niveau ${globalLevel}
</div>
</div>
<div class="bcb-interactions-body" data-test-id="interaction-body">
${this.getInteractionProducts(product.alerts0, productId).map((alert, i3) => {
var _a2;
const alertInfo = product.alerts0[i3];
const type = ((_a2 = alertInfo == null ? void 0 : alertInfo.interactionsInformations) == null ? void 0 : _a2.type) === 0 ? "down" : "up";
const level = alertInfo == null ? void 0 : alertInfo.level;
const colorKey2 = this.interactionColorMap[level] ?? "info";
return b`
<div class="item item-${type}">
<div class="level bcb-interactions-niveau-${level} level-interactions-${colorKey2}">
<span class="level_number">${level}</span>
<span class="level_arrow">
<svg
xmlns="http://www.w3.org/2000/svg"
width="13.643"
height="14.001"
viewBox="0 0 13.643 14.001"
>
<path
id="solid_arrow-${type}"
data-name="solid arrow-${type}"
d="M6.564,40,5.87,39.3a.747.747,0,0,1,0-1.059l6.072-6.075a.747.747,0,0,1,1.059,0l6.072,6.072a.747.747,0,0,1,0,1.059L18.379,40a.751.751,0,0,1-1.072-.013L13.723,36.22V45.2a.748.748,0,0,1-.75.75h-1a.748.748,0,0,1-.75-.75V36.22L7.636,39.986A.745.745,0,0,1,6.564,40Z"
transform="translate(19.293 45.951) rotate(180)"
fill="currentColor"
/>
</svg>
</span>
</div>
<div class="content text-interactions-${colorKey2}">
<div class="content_title ellipsis">${alert.labelHtml}</div>
<div class="content_text ellipsis"
.innerHTML="${alertInfo == null ? void 0 : alertInfo.interactionsInformations.mechanism}">
</div>
</div>
<bcbd-icon @click="${() => this.handleClick(alertInfo)}" icon="circle-question" size="small"></bcbd-icon>
</div>
`;
})}
</div>
</div>
${this.renderModal(this.currentAlert)}
`;
}
}
return b``;
}
renderModal(alertDetails) {
var _a2, _b;
return b`
<bcbd-modal title="Interaction" id="modal-interaction">
<h3 .innerHTML="${alertDetails == null ? void 0 : alertDetails.levelLabel}"></h3>
<p
.innerHTML="Entre ${(_a2 = alertDetails == null ? void 0 : alertDetails.products[0]) == null ? void 0 : _a2.labelHtml} et ${(_b = alertDetails == null ? void 0 : alertDetails.products[1]) == null ? void 0 : _b.labelHtml}"
></p>
<p .innerHTML="${alertDetails == null ? void 0 : alertDetails.shortText}"></p>
</bcbd-modal>
`;
}
toggleInteraction(productId) {
this.isInteractionToggledMap[productId] = !this.isInteractionToggledMap[productId];
this.requestUpdate();
}
getInteractionTitle(productId, alerts) {
var _a2;
const productIdNumber = Number(productId);
const productTitle = (_a2 = alerts == null ? void 0 : alerts.flatMap((alert) => alert.products).find((product) => product.productId === productIdNumber)) == null ? void 0 : _a2.labelHtml;
return productTitle ?? "";
}
getInteractionProducts(alerts, productId) {
const products = [];
alerts.forEach((alert) => {
alert.products.forEach((product) => {
if (product.productId !== Number(productId) && !products.some(
(p2) => p2.productId === product.productId && p2.level === alert.level
)) {
products.push({
...product,
linkedIds: alerts.map((a2) => a2.products.map((p2) => p2.productId)).flat()
});
}
});
});
return products;
}
buildInteractions(alerts) {
Object.keys(alerts).forEach((productId) => {
var _a2;
const currentAlerts = (_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts0;
if (currentAlerts !== void 0) {
alerts[Number(productId)].alerts0 = currentAlerts.filter(
(alert) => {
return alert.products[0].productId === Number(productId);
}
);
}
});
return alerts;
}
render() {
setLocale(this.lang).then();
return this.renderAlerts();
}
};
BcbPrescriptionAlertsInteractions.styles = r$5(style$1);
__decorateClass$6([
n2({ type: String })
], BcbPrescriptionAlertsInteractions.prototype, "apiUrl", 2);
__decorateClass$6([
n2({ type: String })
], BcbPrescriptionAlertsInteractions.prototype, "apiKey", 2);
__decorateClass$6([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsInteractions.prototype, "products", 2);
__decorateClass$6([
n2({ type: Object })
], BcbPrescriptionAlertsInteractions.prototype, "patient", 2);
__decorateClass$6([
n2({ type: Number })
], BcbPrescriptionAlertsInteractions.prototype, "productId", 2);
__decorateClass$6([
n2()
], BcbPrescriptionAlertsInteractions.prototype, "lang", 2);
__decorateClass$6([
n2({ type: Boolean })
], BcbPrescriptionAlertsInteractions.prototype, "isPatientActive", 2);
__decorateClass$6([
n2({ type: Boolean })
], BcbPrescriptionAlertsInteractions.prototype, "interactionLvl1Collapsed", 2);
__decorateClass$6([
n2({ type: Boolean })
], BcbPrescriptionAlertsInteractions.prototype, "interactionLvl2Collapsed", 2);
__decorateClass$6([
n2({ type: Object })
], BcbPrescriptionAlertsInteractions.prototype, "alertVisibility", 1);
__decorateClass$6([
e$1("#modal-interaction")
], BcbPrescriptionAlertsInteractions.prototype, "modalInteraction", 2);
BcbPrescriptionAlertsInteractions = __decorateClass$6([
t("bcb-prescription-alerts-interaction")
], BcbPrescriptionAlertsInteractions);
var __defProp$4 = Object.defineProperty;
var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
var __decorateClass$5 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$4(target, key, result);
return result;
};
let BcbPrescriptionAlertsAnticholinergic = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = null;
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
this.isAntiCholinergicToggledMap = {};
this.antiCholinergicColorMap = {
1: "info",
2: "warning",
3: "orange",
4: "danger"
};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
try {
if (this.products) {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.ANTICHOLINERGIC);
this.dispatchRequestStatus();
await getAlerts(this.apiUrl, this.patient, this.products);
this.countAlerts();
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.ANTICHOLINERGIC);
}
} catch (error) {
console.error("Erreur dans fetchData (anticholinergic):", error);
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.ANTICHOLINERGIC);
} finally {
this.dispatchRequestStatus();
}
}
updated(changedProperties) {
if (this.apiUrl && changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
}
dispatchRequestStatus() {
const customEvent = new CustomEvent("requestStatus", {
detail: {
status: getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.ANTICHOLINERGIC).get().status,
bubbles: true,
composed: true
}
});
this.dispatchEvent(customEvent);
}
dispatchAlertCountEvent(productId, alertsCount, linkedIds) {
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId,
alertCount: alertsCount,
alertType: ALERT_TYPES$1.ANTICHOLINERGIC,
linkedIds
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
countAlerts() {
var _a2;
if (!hasAlerts.get()) return;
const product = getAlertsByProduct(this.productId).get();
const tempAlerts = [];
let alertsCount = 0;
if (this.productId) {
const linkedIds = [];
const validAlerts = (_a2 = product == null ? void 0 : product.anticholinergicAlerts) == null ? void 0 : _a2.filter(
(alert) => alert.ciaTotalScore !== 0 || alert.acbTotalScore !== 0
);
if (validAlerts && validAlerts.length > 0) {
alertsCount = 1;
validAlerts.forEach((alert) => {
alert.products.forEach((p2) => {
if (!linkedIds.includes(p2.productId)) {
linkedIds.push(p2.productId);
}
});
});
this.dispatchAlertCountEvent(this.productId.toString(), alertsCount, linkedIds);
}
} else {
Object.keys(allAlerts.get()).forEach((pid) => {
var _a3, _b;
const validAlerts = (_b = (_a3 = getAlertsByProduct(Number(pid)).get()) == null ? void 0 : _a3.anticholinergicAlerts) == null ? void 0 : _b.filter(
(alert) => alert.ciaTotalScore !== 0 || alert.acbTotalScore !== 0
);
validAlerts == null ? void 0 : validAlerts.forEach((alert) => {
if (alert && !tempAlerts.includes(alert.products)) {
tempAlerts.push(alert.products);
alertsCount = 1;
const linkedIds = [];
validAlerts.forEach((a2) => {
a2.products.forEach((p2) => {
if (!linkedIds.includes(p2.productId)) {
linkedIds.push(p2.productId);
}
});
});
this.dispatchAlertCountEvent(pid, alertsCount, linkedIds);
}
});
});
}
}
async handleClick(alertDetails) {
if (this.modalAnticholinergic) {
this.modalAnticholinergic.open();
}
this.currentAlert = alertDetails;
this.requestUpdate();
}
shouldShowWarning(product) {
return !this.alertVisibility.anticholinergic && (product == null ? void 0 : product.anticholinergicAlerts) && product.anticholinergicAlerts.length > 0;
}
renderAlerts() {
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.ANTICHOLINERGIC).get().status === 1) {
return this.generateSkeleton();
}
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.ANTICHOLINERGIC).get().status === 3) {
return b`
<bcbd-alert
description-message="Une erreur est survenue lors de la récupération des alertes anticholinergiques."
type="error"
></bcbd-alert>
`;
}
if (allAlerts.get()) {
const tempProducts = [];
if (this.productId) {
const product = getAlertsByProduct(this.productId).get();
const hasNoAlerts = !(product == null ? void 0 : product.anticholinergicAlerts) || product.anticholinergicAlerts.length === 0 || product.anticholinergicAlerts.every((alert) => alert.ciaTotalScore === 0 && alert.acbTotalScore === 0);
if (hasNoAlerts) {
return b`
<bcbd-alert
description-message="Aucune alerte anticholinergique à signaler."
type="info"
></bcbd-alert>
`;
}
if (this.shouldShowWarning(product)) {
return b`
<div class="warning-alert">
<bcbd-alert description-message="Alertes anticholinergiques masquées" type="warning"></bcbd-alert>
</div>
`;
}
if (!this.alertVisibility.anticholinergic) {
return b``;
}
return this.generateCards(product, this.productId);
}
const sortedProductsAlerts = this.buildAlerts(allAlerts.get());
const sortedProductIds = Object.keys(sortedProductsAlerts);
const allItems = [];
let hasAnyAlerts = false;
sortedProductIds.forEach((pid) => {
var _a2;
const product = sortedProductsAlerts[Number(pid)];
const validAlerts = (_a2 = product == null ? void 0 : product.anticholinergicAlerts) == null ? void 0 : _a2.filter(
(alert) => alert.ciaTotalScore !== 0 || alert.acbTotalScore !== 0
);
if (validAlerts && validAlerts.length > 0 && !tempProducts.includes(pid)) {
hasAnyAlerts = true;
tempProducts.push(pid);
if (this.alertVisibility.anticholinergic) {
const filteredProduct = { ...product, anticholinergicAlerts: validAlerts };
allItems.push(this.generateCards(filteredProduct, pid));
}
}
});
if (hasAnyAlerts && !this.alertVisibility.anticholinergic) {
return b`
<div class="warning-alert">
<bcbd-alert description-message="Alertes anticholinergiques masquées" type="warning"></bcbd-alert>
</div>
`;
}
if (allItems.length === 0) {
return b`
<bcbd-alert
description-message="Aucune alerte anticholinergique à signaler."
type="info"
></bcbd-alert>
`;
}
return b`${allItems}`;
}
return b``;
}
generateSkeleton() {
return b`
<div class="bcb-interactions skeleton">
<div class="bcb-interactions-head">
<div class="head_title bcb-skeleton"></div>
<div class="head_number bcb-skeleton"></div>
</div>
<div class="bcb-interactions-body">
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
</div>
</div>
`;
}
setHeaderColor(anticholinergicData) {
if (anticholinergicData[0].acbTotalScore >= 4 || anticholinergicData[0].ciaTotalScore > 5) {
return "danger";
}
if (anticholinergicData[0].acbTotalScore <= 5 || anticholinergicData[0].ciaTotalScore <= 3) {
return "orange";
}
return "gray";
}
setScoreColor(anticholinergicScore) {
if (anticholinergicScore === 0) {
return "gray";
}
if (anticholinergicScore === 1) {
return "warning";
}
if (anticholinergicScore === 2) {
return "orange";
} else {
return "danger";
}
}
setGlobalCiaSCoreColor(globalScore) {
if (globalScore > 0 && globalScore <= 5) {
return "orange";
} else if (globalScore > 5) {
return "danger";
} else {
return "gray";
}
}
setGlobalAcbSCoreColor(globalScore) {
if (globalScore > 0 && globalScore <= 3) {
return "orange";
} else if (globalScore >= 4) {
return "danger";
} else {
return "gray";
}
}
generateCards(product, productId) {
if (this.isAntiCholinergicToggledMap[productId] === void 0) {
this.isAntiCholinergicToggledMap[productId] = true;
}
return b`
<div class="bcb-interactions ${this.isAntiCholinergicToggledMap[productId] ? "bcb-interactions-active" : ""}">
<div
class="bcb-interactions-head bcb-interactions-head-${this.setHeaderColor(product.anticholinergicAlerts)}"
data-test-id="anticholinergic-head"
@click="${() => this.toggleAlerts(productId)}"
>
<div class="head_title ellipsis">CHARGE ANTICHOLINERGIQUE ${this.setHeaderColor(product.anticholinergicAlerts) === "danger" ? "élevée" : this.setHeaderColor(product.anticholinergicAlerts) === "orange" ? "modérée" : "faible"}</div>
<div class="head_level">
<span class="bcb-ellipsis-anticholinergic-${this.setGlobalCiaSCoreColor(product.anticholinergicAlerts[0].ciaTotalScore)}"></span>
${"CIA " + product.anticholinergicAlerts[0].ciaTotalScore}
<span class="bcb-score-separator">|</span>
<span class="bcb-ellipsis-anticholinergic-${this.setGlobalAcbSCoreColor(product.anticholinergicAlerts[0].acbTotalScore)}"></span>
${"ACB " + product.anticholinergicAlerts[0].acbTotalScore}
</div>
</div>
<div class="bcb-interactions-body" data-test-id="anticholinergic-body">
${(product.anticholinergicAlerts ?? []).flatMap((alertInfo) => {
return ((alertInfo == null ? void 0 : alertInfo.products) ?? []).filter((produit) => (produit == null ? void 0 : produit.ciaScore) !== 0 || (produit == null ? void 0 : produit.acbScore) !== 0).map((produit) => b`
<div class="item">
<div class="content">
<div class="content_title ellipsis">${(produit == null ? void 0 : produit.labelHtml) ?? ""}</div>
<div class="content_score_container">
Effets périphériques <span class="content_score-${this.setScoreColor(produit == null ? void 0 : produit.ciaScore)}">CIA: ${produit == null ? void 0 : produit.ciaScore}</span>
Effets cognitifs <span class="content_score-${this.setScoreColor(produit == null ? void 0 : produit.acbScore)}">ACB: ${produit == null ? void 0 : produit.acbScore}</span>
</div>
</div>
<bcbd-icon
@click="${() => this.handleClick(alertInfo)}"
icon="circle-question"
size="small"
></bcbd-icon>
</div>
`);
})}
</div>
</div>
${this.renderModal()}
`;
}
renderModal() {
return b`
<bcbd-modal title="A propos des échelles d'évaluation CIA et ACB" id="modal-anticholinergic" data-test-id="anticholinergic-modal">
<div class="bcb-modal-container">
<div class="bcb-modal-content-CIA">
<h3>CIA (Coefficient d'Imprégnation Anticholinergique)</h3>
<p>Évalue les effets indésirables périphériques : constipation, sécheresse buccale, rétention urinaire, troubles visuels.</p>
<p class="bcb-modal-threshold">Seuil critique : > 5</p>
<p class="bcb-modal-source">Source : Javelot, H. 2022 « Mise à jour de l'échelle d'évaluation des effets anticholinergiques AIS d'après Briet et al. avec mention des puissances anticholinergiques et précision sur leurs aptitudes à traverser la barrière hématoencéphalique» revue de la littérature</p>
<p class="bcb-modal-source">* Collège national de Pharmacologie médicale. Pharmacomédicale.org [En ligne]. France (FR) ; [modifié le 11/05/2023 ; cité le 09/02/2026]. Disponible : https://urls.fr/yGuhk0</p>
<p class="bcb-mt-5">Echelle adaptée au marché <strong>français</strong></p>
<div class="bcb-mt-4">
<p>Signification du score</p>
<p><strong>Score = 1</strong> --> potentiel anticholinergique faible</p>
<p><strong>Score = 2</strong> --> potentiel anticholinergique modéré</p>
<p><strong>Score = 3</strong> --> potentiel anticholinergique fort</p>
</div>
</div>
<div class="bcb-modal-content-ACB">
<h3>ACB (Anticholinergic Cognitive Burden)</h3>
<p>Évalue les effets centraux cognitifs : confusion, troubles de mémoire, déclin cognitif, somnolence.</p>
<p class="bcb-modal-threshold">Seuil critique : ≥ 4</p>
<p class="bcb-modal-source">Sources : Boustani, M. 2008 « Impact of anticholinergics on the aging brain: a review and practical application ». Aging Health 4 (3): 311‑20 </p>
<p class="bcb-modal-source">Aging Brain Program of the Indiana University Center for Aging Research. (2012). Anticholinergic Cognitive Burden Scale: Aging Brain Care 2012 Update. Indiana University Center for Aging Research.</p>
<p class="bcb-mt-5">Echelle adaptée au marché <strong>américain</strong></p>
<div class="bcb-mt-4">
<p>Signification du score</p>
<p><strong>Score = 1</strong> --> possible effet anticholinergique cognitif (preuve in vitro sans preuve clinique)</p>
<p><strong>Score = 2</strong> --> effet anticholinergique cognitif modéré cliniquement significatif</p>
<p><strong>Score = 3</strong> --> effet anticholinergique cognitif sévère cliniquement significatif</p>
</div>
</div>
</div>
<p class="bcb-modal-footer">Omedit Pays de la Loire</p>
</bcbd-modal>
`;
}
toggleAlerts(productId) {
this.isAntiCholinergicToggledMap[productId] = !this.isAntiCholinergicToggledMap[productId];
this.requestUpdate();
}
getHeadTitle(productId, alerts) {
var _a2;
const productIdNumber = Number(productId);
const productTitle = (_a2 = alerts == null ? void 0 : alerts.flatMap((alert) => alert.products).find((product) => product.productId === productIdNumber)) == null ? void 0 : _a2.labelHtml;
return productTitle ?? "";
}
getLinkedProducts(alerts, productId) {
const products = [];
alerts.forEach((alert) => {
alert.products.forEach((product) => {
if (product.productId !== Number(productId) && !products.some((p2) => p2.productId === product.productId && p2.level === alert.level)) {
products.push({
...product,
linkedIds: alerts.map((a2) => a2.products.map((p2) => p2.productId)).flat()
});
}
});
});
return products;
}
buildAlerts(alerts) {
Object.keys(alerts).forEach((productId) => {
var _a2;
const currentAlerts = (_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.anticholinergicAlerts;
if (currentAlerts !== void 0) {
currentAlerts.forEach(() => {
alerts[Number(productId)].anticholinergicAlerts = currentAlerts.filter((alert) => {
return alert.products[0].productId === Number(productId);
});
});
}
});
return alerts;
}
render() {
setLocale(this.lang).then();
return this.renderAlerts();
}
};
BcbPrescriptionAlertsAnticholinergic.styles = r$5(style$1);
__decorateClass$5([
n2({ type: String })
], BcbPrescriptionAlertsAnticholinergic.prototype, "apiUrl", 2);
__decorateClass$5([
n2({ type: String })
], BcbPrescriptionAlertsAnticholinergic.prototype, "apiKey", 2);
__decorateClass$5([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsAnticholinergic.prototype, "products", 2);
__decorateClass$5([
n2({ type: Object })
], BcbPrescriptionAlertsAnticholinergic.prototype, "patient", 2);
__decorateClass$5([
n2({ type: Number })
], BcbPrescriptionAlertsAnticholinergic.prototype, "productId", 2);
__decorateClass$5([
n2()
], BcbPrescriptionAlertsAnticholinergic.prototype, "lang", 2);
__decorateClass$5([
n2({ type: Boolean })
], BcbPrescriptionAlertsAnticholinergic.prototype, "isPatientActive", 2);
__decorateClass$5([
n2({ type: Object })
], BcbPrescriptionAlertsAnticholinergic.prototype, "alertVisibility", 1);
__decorateClass$5([
e$1("#modal-anticholinergic")
], BcbPrescriptionAlertsAnticholinergic.prototype, "modalAnticholinergic", 2);
BcbPrescriptionAlertsAnticholinergic = __decorateClass$5([
t("bcb-prescription-alerts-anticholinergic")
], BcbPrescriptionAlertsAnticholinergic);
var __defProp$3 = Object.defineProperty;
var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
var __decorateClass$4 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$3(target, key, result);
return result;
};
let BcbPrescriptionAlertsSam = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = {};
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this.isAlertsVisible = true;
}
connectedCallback() {
super.connectedCallback();
}
async fetchData() {
if (this.patient && this.products) {
try {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.SAM);
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.SAM);
this.getSamAlerts();
} catch {
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.SAM);
}
}
}
updated(changedProperties) {
if (changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
}
getSamAlerts() {
var _a2, _b;
if (!hasAlerts.get()) return;
const product = getAlertsByProduct(this.productId).get();
const samAlerts = product == null ? void 0 : product.samAlerts;
if (samAlerts !== void 0) {
const customEvent = new CustomEvent("samAlert", {
detail: {
productId: this.productId,
hasSam: (_a2 = samAlerts[0]) == null ? void 0 : _a2.hasSam,
patientEligibility: (_b = samAlerts[0]) == null ? void 0 : _b.patientEligibility,
alertType: ALERT_TYPES$1.SAM
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
}
}
};
__decorateClass$4([
n2({ type: String })
], BcbPrescriptionAlertsSam.prototype, "apiUrl", 2);
__decorateClass$4([
n2({ type: String })
], BcbPrescriptionAlertsSam.prototype, "apiKey", 2);
__decorateClass$4([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsSam.prototype, "products", 2);
__decorateClass$4([
n2({ type: Object })
], BcbPrescriptionAlertsSam.prototype, "patient", 2);
__decorateClass$4([
n2({ type: Number })
], BcbPrescriptionAlertsSam.prototype, "productId", 2);
__decorateClass$4([
n2()
], BcbPrescriptionAlertsSam.prototype, "lang", 2);
__decorateClass$4([
n2({ type: Boolean })
], BcbPrescriptionAlertsSam.prototype, "isPatientActive", 2);
__decorateClass$4([
n2({ type: Boolean })
], BcbPrescriptionAlertsSam.prototype, "isAlertsVisible", 2);
BcbPrescriptionAlertsSam = __decorateClass$4([
t("bcb-prescription-alerts-sam")
], BcbPrescriptionAlertsSam);
var __defProp$2 = Object.defineProperty;
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
var __decorateClass$3 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$2(target, key, result);
return result;
};
let BcbPrescriptionAlertsIpc = class extends e(i$2) {
constructor() {
super(...arguments);
this.apiUrl = "";
this.apiKey = "";
this.products = [];
this.patient = null;
this.productId = null;
this.lang = "fr-FR";
this.isPatientActive = true;
this._alertVisibility = {
interactionsLv1: true,
interactionsLv2: true,
interactionsLv3: true,
interactionsLv4: true,
anticholinergic: true,
surdosages: true,
redondances_composant: true,
redondances_classe: true,
precautions_emploi: true,
contre_indicationsLv3: true,
contre_indicationsLv4: true,
allergies: true,
stopp: true,
posologies: true,
ipc: true
};
this.isInteractionToggledMap = {};
}
set alertVisibility(value) {
this._alertVisibility = { ...this._alertVisibility, ...value };
this.requestUpdate();
}
get alertVisibility() {
return this._alertVisibility;
}
async fetchData() {
try {
if (this.products) {
setPrescriptionAlertRequestStatusByAlertType(1, ALERT_TYPES$1.IPC);
this.dispatchRequestStatus();
await getAlerts(this.apiUrl, this.patient, this.products);
setPrescriptionAlertRequestStatusByAlertType(4, ALERT_TYPES$1.IPC);
this.dispatchRequestStatus();
this.countAlerts();
}
} catch (error) {
console.error("Erreur dans fetchData (IPC):", error);
setPrescriptionAlertRequestStatusByAlertType(3, ALERT_TYPES$1.IPC);
}
}
updated(changedProperties) {
if (this.apiUrl && changedProperties.has("patient") || changedProperties.has("products") || changedProperties.has("apiUrl")) {
this.fetchData().then();
}
}
dispatchRequestStatus() {
const customEvent = new CustomEvent("requestStatus", {
detail: {
status: getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.IPC).get().status,
bubbles: true,
composed: true
}
});
this.dispatchEvent(customEvent);
}
countAlerts() {
if (!hasAlerts) return;
const dispatchAlertCountEvent = (productId, alertsCount2, linkedIds) => {
const customEvent = new CustomEvent("getAlertsCount", {
detail: {
productId,
alertCount: alertsCount2,
alertType: ALERT_TYPES$1.IPC,
linkedIds
},
bubbles: true,
composed: true
});
this.dispatchEvent(customEvent);
};
const product = getAlertsByProduct(this.productId).get();
const tempAlerts = [];
let alertsCount = 0;
if (this.productId) {
alertsCount = 1;
const linkedIds = product == null ? void 0 : product.alerts5.map((alert) => alert.products.map((p2) => p2.productId)).flat();
dispatchAlertCountEvent(this.productId.toString(), alertsCount, linkedIds);
} else {
Object.keys(allAlerts.get()).forEach((productId) => {
var _a2, _b;
(_b = (_a2 = getAlertsByProduct(Number(productId)).get()) == null ? void 0 : _a2.alerts5) == null ? void 0 : _b.forEach((alert) => {
var _a3, _b2;
if (alert && Number(productId) !== 0 && !tempAlerts.includes(alert.products)) {
tempAlerts.push(alert.products);
alertsCount = 1;
const linkedIds = (_b2 = (_a3 = getAlertsByProduct(Number(productId)).get()) == null ? void 0 : _a3.alerts5) == null ? void 0 : _b2.map((alert2) => alert2.products.map((p2) => p2.productId)).flat();
dispatchAlertCountEvent(productId, alertsCount, linkedIds);
}
});
});
}
}
async handleClick(alertDetails, productId) {
if (this.modalIPC) {
this.modalIPC.open();
}
this.currentAlert = alertDetails;
this.currentAlert.headProductId = productId;
this.requestUpdate();
}
renderAlerts() {
if (!this.alertVisibility.ipc) {
return b`
<bcbd-alert description-message="Incompatibilités physico-chimiques masquées" type="warning"></bcbd-alert>
`;
}
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.IPC).get().status === 1) {
return this.generateSkeleton();
}
if (getPrescriptionAlertRequestStatusByAlertType(ALERT_TYPES$1.IPC).get().status === 3) {
return b`
<bcbd-alert
description-message="Une erreur est survenue lors de la récupération des IPC." type="error"
></bcbd-alert>
`;
}
if (allAlerts.get()) {
if (this.productId) {
const product = getAlertsByProduct(this.productId).get();
if (!(product == null ? void 0 : product.alerts5) || product.alerts5.length === 0) {
return b`
<bcbd-alert
description-message="Aucune IPC à signaler." type="info"
></bcbd-alert>
`;
}
const filteredProduct = {
...product,
alerts5: product.alerts5.filter(
(alert) => {
var _a2;
return alert.products && ((_a2 = alert.products[0]) == null ? void 0 : _a2.productId) === Number(this.productId);
}
)
};
if (filteredProduct.alerts5.length === 0) {
return b`
<bcbd-alert
description-message="Aucune IPC à signaler." type="info"
></bcbd-alert>
`;
}
return this.generateCards(filteredProduct, this.productId);
} else {
const sortedProductsAlerts = this.buildInteractions(allAlerts.get());
const productIdsWithAlerts = Object.keys(sortedProductsAlerts).filter(
(pid) => {
var _a2, _b;
return ((_a2 = sortedProductsAlerts[Number(pid)]) == null ? void 0 : _a2.alerts5) && ((_b = sortedProductsAlerts[Number(pid)]) == null ? void 0 : _b.alerts5.length) > 0;
}
);
if (productIdsWithAlerts.length === 0) {
return b`
<bcbd-alert
description-message="Aucune IPC à signaler." type="info"
></bcbd-alert>
`;
}
return b`
${productIdsWithAlerts.map(
(pid) => this.generateCards(sortedProductsAlerts[Number(pid)], pid)
)}
`;
}
}
return b``;
}
generateSkeleton() {
return b`
<div class="bcb-interactions skeleton">
<div class="bcb-interactions-head">
<div class="head_title bcb-skeleton"></div>
<div class="head_number bcb-skeleton"></div>
</div>
<div class="bcb-interactions-body">
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
<div class="item">
<div class="level bcb-skeleton"></div>
<div class="content">
<span class="content_title bcb-skeleton"></span>
<span class="content_text bcb-skeleton"></span>
</div>
</div>
</div>
</div>
`;
}
generateCards(product, productId) {
if (this.isInteractionToggledMap[productId] === void 0) {
this.isInteractionToggledMap[productId] = true;
}
if (this.getInteractionProducts(product.alerts5, productId).length !== 0 && this.alertVisibility.ipc) {
return b`
<div
class="bcb-interactions ${this.isInteractionToggledMap[productId] ? "bcb-interactions-active" : ""}"
>
<div
class="bcb-interactions-head bcb-interactions-head-danger" data-test-id="ipc-title-${productId}"
@click="${() => this.toggleInteraction(productId)}"
>
<div class="head_title ellipsis" .innerHTML="${this.getInteractionTitle(productId, product == null ? void 0 : product.alerts5)}"></div>
</div>
<div class="bcb-ipc-body" data-test-id="ipc-body-${productId}">
${this.getInteractionProducts(product.alerts5, productId).map(
(alert) => {
var _a2, _b, _c;
return b`
<div data-test-id="ipc-details-${productId}" class="text-interactions-danger bcb-ipc-container">
<div class="bcb-ipc-content">
<div class="content_title ellipsis">${alert.labelHtml}</div>
<div
class="bcb-ipc-details"
>
<p .innerHTML="Voie d'administration : ${(_a2 = alert.ipcInformations) == null ? void 0 : _a2.routeLabel}"></p>
<p .innerHTML="Principes actifs : ${(_b = alert.ipcInformations) == null ? void 0 : _b.activeSubstanceLabel1} et ${(_c = alert.ipcInformations) == null ? void 0 : _c.activeSubstanceLabel2}"></p>
</div>
</div>
<bcbd-icon @click="${() => this.handleClick(alert, Number(productId))}" icon="circle-question" size="small"></bcbd-icon>
</div>
`;
}
)}
</div>
</div>
${this.renderModal(this.currentAlert)}
`;
} else {
return b``;
}
}
renderModal(alertDetails) {
return b`
<bcbd-modal title="IPC" size="medium" id="modal-ipc">
<h3>Incompatibilité Physico-Chimique</h3>
<p .innerHTML="${alertDetails == null ? void 0 : alertDetails.shortText}"></p>
</bcbd-modal>
`;
}
decodeHtml(html2) {
const txt = document.createElement("textarea");
txt.innerHTML = html2;
return txt.value;
}
toggleInteraction(productId) {
this.isInteractionToggledMap[productId] = !this.isInteractionToggledMap[productId];
this.requestUpdate();
}
getInteractionTitle(productId, alerts) {
var _a2;
const productIdNumber = Number(productId);
const productTitle = (_a2 = alerts == null ? void 0 : alerts.flatMap((alert) => alert.products).find((product) => product.productId === productIdNumber)) == null ? void 0 : _a2.labelHtml;
return productTitle ?? "";
}
getInteractionProducts(alerts, productId) {
const products = [];
alerts.forEach((alert) => {
const ipcInformations = alert.ipcInformations;
const shortText = alert.shortText;
alert.products.forEach((product) => {
if (product.productId !== Number(productId) && !products.some((p2) => p2.productId === product.productId)) {
products.push({
...product,
ipcInformations,
shortText,
linkedIds: alerts.map((a2) => a2.products.map((p2) => p2.productId)).flat()
});
}
});
});
return products;
}
buildInteractions(alerts) {
Object.keys(alerts).forEach((productId) => {
var _a2;
const currentAlerts = (_a2 = alerts[Number(productId)]) == null ? void 0 : _a2.alerts5;
if (currentAlerts !== void 0) {
currentAlerts.forEach(() => {
alerts[Number(productId)].alerts5 = currentAlerts.filter((alert) => {
return alert.products[0].productId === Number(productId);
});
});
}
});
return alerts;
}
render() {
setLocale(this.lang).then();
if (allAlerts.get()) {
return this.renderAlerts();
}
return b``;
}
};
BcbPrescriptionAlertsIpc.styles = r$5(style$1);
__decorateClass$3([
n2({ type: String })
], BcbPrescriptionAlertsIpc.prototype, "apiUrl", 2);
__decorateClass$3([
n2({ type: String })
], BcbPrescriptionAlertsIpc.prototype, "apiKey", 2);
__decorateClass$3([
n2({ type: Array, attribute: false, reflect: false })
], BcbPrescriptionAlertsIpc.prototype, "products", 2);
__decorateClass$3([
n2({ type: Object })
], BcbPrescriptionAlertsIpc.prototype, "patient", 2);
__decorateClass$3([
n2({ type: Number })
], BcbPrescriptionAlertsIpc.prototype, "productId", 2);
__decorateClass$3([
n2()
], BcbPrescriptionAlertsIpc.prototype, "lang", 2);
__decorateClass$3([
n2({ type: Boolean })
], BcbPrescriptionAlertsIpc.prototype, "isPatientActive", 2);
__decorateClass$3([
n2({ type: Object })
], BcbPrescriptionAlertsIpc.prototype, "alertVisibility", 1);
__decorateClass$3([
e$1("#modal-ipc")
], BcbPrescriptionAlertsIpc.prototype, "modalIPC", 2);
BcbPrescriptionAlertsIpc = __decorateClass$3([
t("bcb-prescription-alerts-ipc")
], BcbPrescriptionAlertsIpc);
const alertsCounterCSS = ".claudebernard-alerts-counter {\n display: flex;\n flex-direction: column;\n}\n\n.claudebernard-alerts-counter__container {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: 0.5rem;\n}\n\n.claudebernard-alerts-counter__item {\n background-color: var(--bcbd-white-color, #ffffff);\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n align-items: center;\n min-width: 60px;\n padding: 0 0.25rem;\n box-shadow: 0 1px 2px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294)), 0 6px 18px var(--bcbd-shadow-default-color, rgba(27, 42, 50, 0.0588235294));\n}\n\n.claudebernard-alerts-counter__count {\n padding: 0;\n font-size: 1.5rem;\n font-weight: 500;\n color: var(--bcbd-gray-900-color, #040F29);\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.claudebernard-alerts-counter__label {\n font-size: 0.875rem;\n text-align: center;\n color: var(--bcbd-gray-700-color, #293652);\n letter-spacing: 0.5px;\n word-break: break-word;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.claudebernard-alerts-counter__bar {\n width: 75%;\n height: 5px;\n border-radius: 4px;\n transition: height 0.2s ease-out;\n margin: 0.5rem 0;\n}\n.claudebernard-alerts-counter__bar--danger {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n.claudebernard-alerts-counter__bar--orange {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n.claudebernard-alerts-counter__bar--warning {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n\n.claudebernard-alerts-counter__loading,\n.claudebernard-alerts-counter__error,\n.claudebernard-alerts-counter__empty {\n padding: 1rem;\n text-align: center;\n font-size: 0.875rem;\n color: #666;\n}\n\n@media (max-width: 768px) {\n .claudebernard-alerts-counter__container {\n gap: 0.5rem;\n padding: 0.75rem;\n }\n .claudebernard-alerts-counter__item {\n flex: 0 0 70px;\n min-width: 70px;\n }\n .claudebernard-alerts-counter__count {\n font-size: 1.25rem;\n }\n .claudebernard-alerts-counter__label {\n font-size: 0.6rem;\n }\n}\n@media (max-width: 480px) {\n .claudebernard-alerts-counter__container {\n gap: 0.5rem;\n padding: 0.5rem;\n }\n .claudebernard-alerts-counter__item {\n min-width: 60px;\n }\n .claudebernard-alerts-counter__count {\n font-size: 1rem;\n }\n .claudebernard-alerts-counter__label {\n font-size: 0.55rem;\n }\n}";
var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
var __decorateClass$2 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = decorator(result) || result;
return result;
};
const PREFIX = "claudebernard";
const ALERT_TYPES = [
{ key: "ci", abbreviation: "C-I", description: "Contre-Indications", color: EAlertLevel.DANGER },
{ key: "allergy", abbreviation: "Allergie", description: "Allergies", color: EAlertLevel.WARNING },
{ key: "interaction", abbreviation: "IAM", description: "Interactions", color: EAlertLevel.DANGER },
{ key: "poso", abbreviation: "POSO", description: "Posologies", color: EAlertLevel.ORANGE },
{ key: "redundancy", abbreviation: "Redondance", description: "Redondances", color: EAlertLevel.ORANGE },
{ key: "stopp", abbreviation: "STOPP", description: "STOPP", color: EAlertLevel.DANGER },
{ key: "pe", abbreviation: "PE", description: "Précautions d'emploi", color: EAlertLevel.WARNING },
{ key: "ipc", abbreviation: "IPC", description: "Incompatibilités Physico-Chimiques", color: EAlertLevel.DANGER }
];
let BcbPrescriptionAlertsHeadbandCounter = class extends e(i$2) {
render() {
const alerts = allAlerts.get();
const productIds = getAllProductIds.get().filter((id) => id > 0);
const counters = {
ci: 0,
allergy: 0,
interaction: 0,
poso: 0,
redundancy: 0,
stopp: 0,
pe: 0,
ipc: 0
};
const uniqueRedundancyGroups = /* @__PURE__ */ new Set();
let maxInteractionLevel = 0;
productIds.forEach((productId) => {
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
const productAlerts = alerts[productId.toString()];
if (!productAlerts) return;
if (((_a2 = productAlerts.alerts1c) == null ? void 0 : _a2.length) > 0) {
counters.ci += 1;
}
if (((_b = productAlerts.alerts1d) == null ? void 0 : _b.length) > 0) {
counters.ci += 1;
}
if (((_c = productAlerts.alerts6) == null ? void 0 : _c.length) > 0) {
counters.allergy += 1;
}
const filteredInteractions = (_d = productAlerts.alerts0) == null ? void 0 : _d.filter(
(alert) => {
var _a3;
return alert.products && ((_a3 = alert.products[0]) == null ? void 0 : _a3.productId) === Number(productId);
}
);
if (filteredInteractions && filteredInteractions.length > 0) {
counters.interaction += 1;
}
(_e = productAlerts.alerts0) == null ? void 0 : _e.forEach((interaction) => {
if (interaction.level && interaction.level > maxInteractionLevel) {
maxInteractionLevel = interaction.level;
}
});
if (((_f = productAlerts.posoAlerts) == null ? void 0 : _f.length) > 0) {
counters.poso += 1;
}
if (((_g = productAlerts.alerts4) == null ? void 0 : _g.length) > 0) {
productAlerts.alerts4.forEach((alert) => {
if (alert.products) {
const sortedProductIds = alert.products.map((p2) => p2.productId).sort((a2, b2) => a2 - b2).join("-");
uniqueRedundancyGroups.add(sortedProductIds);
}
});
}
if (((_h = productAlerts.stoppAlerts) == null ? void 0 : _h.length) > 0) {
counters.stopp += 1;
}
if (((_i = productAlerts.alerts2) == null ? void 0 : _i.length) > 0) {
counters.pe += 1;
}
const filteredIPC = (_j = productAlerts.alerts5) == null ? void 0 : _j.filter(
(alert) => {
var _a3;
return alert.products && ((_a3 = alert.products[0]) == null ? void 0 : _a3.productId) === Number(productId);
}
);
if (filteredIPC && filteredIPC.length > 0) {
counters.ipc += 1;
}
});
counters.redundancy = uniqueRedundancyGroups.size;
const totalAlerts = ALERT_TYPES.reduce((sum, alertType) => {
const count = counters[alertType.key] || 0;
return sum + count;
}, 0);
if (totalAlerts === 0) {
return b``;
}
const alertItems = ALERT_TYPES.map((alertType) => {
const count = counters[alertType.key] || 0;
if (count === 0) {
return null;
}
const getColor = () => {
if (alertType.key === "interaction") {
switch (maxInteractionLevel) {
case 4:
return EAlertLevel.DANGER;
case 3:
return EAlertLevel.ORANGE;
case 2:
return EAlertLevel.WARNING;
case 1:
return EAlertLevel.WARNING;
default:
return EAlertLevel.DANGER;
}
}
return alertType.color;
};
return b`
<bcbd-tooltip content=${alertType.description} placement="top" data-test-id="alert-tooltip-${alertType.key}">
<div class="${PREFIX}-alerts-counter__item">
<div class="${PREFIX}-alerts-counter__count">${count}</div>
<div class="${PREFIX}-alerts-counter__label">${count > 1 && alertType.key === "redundancy" ? "Redondances" : count > 1 && alertType.key === "allergy" ? "Allergies" : alertType.abbreviation}</div>
<div
class="${PREFIX}-alerts-counter__bar ${PREFIX}-alerts-counter__bar--${getColor()}"
data-test-id="alert-bar-${alertType.key}"
></div>
</div>
</bcbd-tooltip>
`;
}).filter(Boolean);
return b`
<div class="${PREFIX}-alerts-counter" data-test-id="alerts-counter">
<div class="${PREFIX}-alerts-counter__container">
${alertItems}
</div>
</div>
`;
}
};
BcbPrescriptionAlertsHeadbandCounter.styles = i$5`
${r$5(alertsCounterCSS)}
`;
BcbPrescriptionAlertsHeadbandCounter = __decorateClass$2([
t(`bcb-prescription-alerts-headband-counter`)
], BcbPrescriptionAlertsHeadbandCounter);
const style = '* {\n font-family: var(--custom-font-family, "Ubuntu"), sans-serif;\n}\n\n.bcb-counter-container {\n display: flex;\n justify-content: center;\n width: 25px;\n padding: 4px 12px 6px 12px;\n border-radius: 32px;\n height: 100%;\n box-sizing: border-box;\n}\n.bcb-counter-container:hover {\n cursor: pointer;\n}\n\n.bcb-counter-value {\n width: 19px;\n height: 19px;\n background-color: var(--bcbd-white-color, #ffffff);\n border-radius: 50%;\n text-align: center;\n font-size: 12px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.bcb-counter-content {\n padding-bottom: 2px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n}\n\nbcbd-icon {\n margin: 0 auto;\n}\n\n.bcb-info-counter {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n\n.bcb-danger-counter {\n background-color: var(--bcbd-danger-color, #cf406e);\n}\n\n.bcb-warning-counter {\n background-color: var(--bcbd-warning-color, #f59f00);\n}\n\n.bcb-orange-counter {\n background-color: var(--bcbd-orange-color, #f76707);\n}\n\n.bcb-skeleton {\n background: linear-gradient(90deg, var(--bcbd-gray-100-color, #f1f5f9) 25%, var(--bcbd-gray-200-color, #e2e8f0) 37%, var(--bcbd-gray-100-color, #f1f5f9) 63%);\n background-size: 400% 100%;\n animation: bcb-shimmer 1.4s ease infinite;\n border-radius: 32px;\n color: transparent !important;\n}\n\n@keyframes bcb-shimmer {\n 0% {\n background-position: -100px 0;\n }\n 100% {\n background-position: 100px 0;\n }\n}';
var __defProp$1 = Object.defineProperty;
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
var __decorateClass$1 = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp$1(target, key, result);
return result;
};
let BcbPrescriptionAlertsCounter = class extends e(i$2) {
constructor() {
super(...arguments);
this.lang = "fr-FR";
this.productId = 0;
this.isAlertsVisible = true;
}
updated(changedProperties) {
if (changedProperties.has("lang")) {
setLocale(this.lang);
}
}
toggleAlertsVisibility() {
this.isAlertsVisible = !this.isAlertsVisible;
this.dispatchEvent(new CustomEvent("toggle-alerts-visibility", {
detail: { isVisible: this.isAlertsVisible },
bubbles: true,
composed: true
}));
setProductVisibility(this.productId, this.isAlertsVisible);
const currentMap = new Map(productVisibilitySignal.get());
currentMap.set(this.productId, this.isAlertsVisible);
productVisibilitySignal.set(currentMap);
}
generateSkeleton() {
return b`
<div class="bcb-counter-container bcb-skeleton">
<div class="bcb-counter-content">
<div class="bcb-counter-value"></div>
<div></div>
</div>
</div>
`;
}
render() {
if (!isPrescriptionAlertRequestStatusFinished.get()) {
return this.generateSkeleton();
}
const alertsCount = getAlertsCountByProduct(this.productId).get();
if (alertsCount === 0) {
return b``;
}
return b`
<div class="bcb-counter-container bcb-${getMaxLevelAlertsByProduct(this.productId).get()}-counter" @click="${() => this.toggleAlertsVisibility()}">
<div class="bcb-counter-content">
<div class="bcb-counter-value">${alertsCount}</div>
<bcbd-icon icon="${this.isAlertsVisible ? "chevron-up" : "chevron-down"}" color="white" size="small"></bcbd-icon>
</div>
</div>
`;
}
};
BcbPrescriptionAlertsCounter.styles = r$5(style);
__decorateClass$1([
n2()
], BcbPrescriptionAlertsCounter.prototype, "lang", 2);
__decorateClass$1([
n2({ type: Number })
], BcbPrescriptionAlertsCounter.prototype, "productId", 2);
__decorateClass$1([
r$1()
], BcbPrescriptionAlertsCounter.prototype, "isAlertsVisible", 2);
BcbPrescriptionAlertsCounter = __decorateClass$1([
t("bcb-prescription-alerts-counter")
], BcbPrescriptionAlertsCounter);
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
if (decorator = decorators[i3])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp(target, key, result);
return result;
};
let BcbPrescriptionAlertsHiddenTags = class extends e(i$2) {
constructor() {
super(...arguments);
this.productId = null;
}
render() {
hiddenAlertsSignal.get();
const hiddenAlerts = this.productId ? getHiddenAlertsForProduct(this.productId) : getAllHiddenAlerts();
if (hiddenAlerts.length === 0) {
return b``;
}
return b`
<div class="bcb-hidden-alerts-container" style="display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;">
${hiddenAlerts.map((alert) => b`
<bcbd-tag
data-test-id="${alert.testId}"
icon="eye-slash"
tooltip=""
background-color="gray"
outlined="">
${alert.label}
</bcbd-tag>
`)}
</div>
`;
}
};
BcbPrescriptionAlertsHiddenTags.styles = r$5([style$3, globalStyle]);
__decorateClass([
n2({ type: Number })
], BcbPrescriptionAlertsHiddenTags.prototype, "productId", 2);
BcbPrescriptionAlertsHiddenTags = __decorateClass([
t("bcb-prescription-alerts-hidden-tags")
], BcbPrescriptionAlertsHiddenTags);
export {
BcbPrescriptionAlertsAllergy,
BcbPrescriptionAlertsAnticholinergic,
BcbPrescriptionAlertsCI,
BcbPrescriptionAlertsCounter,
BcbPrescriptionAlertsHeadbandCounter,
BcbPrescriptionAlertsHiddenTags,
BcbPrescriptionAlertsInteractions,
BcbPrescriptionAlertsIpc,
BcbPrescriptionAlertsPE,
BcbPrescriptionAlertsPoso,
BcbPrescriptionAlertsRedundancy,
BcbPrescriptionAlertsSam,
BcbPrescriptionAlertsStopp,
EAlertLevel
};