@telia-ace/conversational-hub-bot-provider 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{contact-method-93e1c90e.mjs → contact-method-45c0a464.mjs} +262 -261
- package/{contact-method-8535eabe.js → contact-method-d0a154a3.js} +84 -84
- package/{index-93631b28.js → index-7da7940b.js} +99 -99
- package/{index-f697afbd.mjs → index-fb4b566f.mjs} +168 -168
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/ui/contact-method.d.ts +1 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var it = Object.defineProperty;
|
|
2
2
|
var nt = (t, e, o) => e in t ? it(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
3
|
var _ = (t, e, o) => (nt(t, typeof e != "symbol" ? e + "" : e, o), o);
|
|
4
|
-
import { jsx as u, jsxs as
|
|
5
|
-
import { C as rt, u as ve, a as Ee, b as at, c as ct, d as lt, e as dt, f as mt, g as G, F as he, W as ue, l as ft, h as ht, L as Oe, I as ne, n as
|
|
6
|
-
import { useContext as Pe, useState as D, useEffect as q, forwardRef as re, useCallback as
|
|
4
|
+
import { jsx as u, jsxs as R, Fragment as st } from "react/jsx-runtime";
|
|
5
|
+
import { C as rt, u as ve, a as Ee, b as at, c as ct, d as lt, e as dt, f as mt, g as G, F as he, W as ue, l as ft, h as ht, L as Oe, I as ne, n as y, i as $e, j as Le, k as qe, m as Z, o as J, p as X, q as x, T as je, B as we, r as ke, s as ut, S as j, t as se, v as Fe, w as ge, x as gt, y as V, z as Be, P as De, A as Ge, H as yt, D as pt, E as bt, G as Ne } from "./index-fb4b566f.mjs";
|
|
6
|
+
import { useContext as Pe, useState as D, useEffect as q, forwardRef as re, useCallback as Y, useMemo as vt, useRef as He, useImperativeHandle as $t, Suspense as wt } from "react";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
function W(t = {}) {
|
|
9
9
|
const {
|
|
@@ -19,12 +19,12 @@ function W(t = {}) {
|
|
|
19
19
|
sorting: h,
|
|
20
20
|
tag: m,
|
|
21
21
|
tagId: g,
|
|
22
|
-
tagTitle:
|
|
23
|
-
...
|
|
22
|
+
tagTitle: v,
|
|
23
|
+
...p
|
|
24
24
|
} = t, d = {};
|
|
25
|
-
return Object.keys(
|
|
25
|
+
return Object.keys(p).forEach((f) => {
|
|
26
26
|
typeof t[f] == "string" && (d[f] = t[f]);
|
|
27
|
-
}), typeof e == "string" && e.length && (d.phrase = e), e === null && (d.phrase = e), typeof n == "string" && n !== "0" && (d.guideCategory = n), typeof n == "number" && n !== 0 && (d.guideCategory = n), typeof n == "object" && n !== null && (typeof n.id == "string" && n.id !== "0" && (d.guideCategory = n.id), typeof n.id == "number" && n.id !== 0 && (d.guideCategory = n.id)), typeof i == "string" && i !== "0" && (d.contactCategory = i), typeof i == "number" && i !== 0 && (d.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (d.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (d.contactCategory = i.id)), typeof o == "string" && o !== "0" && (d.category = o), typeof o == "number" && o !== 0 && (d.category = o), typeof o == "object" && o !== null && (typeof o.id == "string" && o.id !== "0" && (d.category = o.id), typeof o.id == "number" && o.id !== 0 && (d.category = o.id)), c && (d.id = c), l && (+d.category || +d.guideCategory || +d.guide || +d.contactCategory || +d.contactMethod) && (d.uriName = l), a && (d.connectionKey = a), s && (d.take = s), h && (d.sorting = h), typeof r == "string" && r.length > 0 && (d.accordion = r), typeof m == "string" && m !== "0" && (d.tag = m), typeof m == "number" && m !== 0 && (d.tag = m), Array.isArray(m) && m.length && (d.tag = m), (typeof g == "string" || typeof g == "number") && (d.tagId = g), typeof
|
|
27
|
+
}), typeof e == "string" && e.length && (d.phrase = e), e === null && (d.phrase = e), typeof n == "string" && n !== "0" && (d.guideCategory = n), typeof n == "number" && n !== 0 && (d.guideCategory = n), typeof n == "object" && n !== null && (typeof n.id == "string" && n.id !== "0" && (d.guideCategory = n.id), typeof n.id == "number" && n.id !== 0 && (d.guideCategory = n.id)), typeof i == "string" && i !== "0" && (d.contactCategory = i), typeof i == "number" && i !== 0 && (d.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (d.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (d.contactCategory = i.id)), typeof o == "string" && o !== "0" && (d.category = o), typeof o == "number" && o !== 0 && (d.category = o), typeof o == "object" && o !== null && (typeof o.id == "string" && o.id !== "0" && (d.category = o.id), typeof o.id == "number" && o.id !== 0 && (d.category = o.id)), c && (d.id = c), l && (+d.category || +d.guideCategory || +d.guide || +d.contactCategory || +d.contactMethod) && (d.uriName = l), a && (d.connectionKey = a), s && (d.take = s), h && (d.sorting = h), typeof r == "string" && r.length > 0 && (d.accordion = r), typeof m == "string" && m !== "0" && (d.tag = m), typeof m == "number" && m !== 0 && (d.tag = m), Array.isArray(m) && m.length && (d.tag = m), (typeof g == "string" || typeof g == "number") && (d.tagId = g), typeof v == "string" && (d.tagTitle = v), typeof d.tag == "string" && (d.tag = d.tag.split(",")), d;
|
|
28
28
|
}
|
|
29
29
|
const ye = (t) => {
|
|
30
30
|
if (!t)
|
|
@@ -306,28 +306,28 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
306
306
|
Form: r,
|
|
307
307
|
Description: c
|
|
308
308
|
}, l) => {
|
|
309
|
-
const { Adapter: h } = n || { Adapter: {} }, { ClientName: m = "", Settings: g = {}, CustomClientName:
|
|
309
|
+
const { Adapter: h } = n || { Adapter: {} }, { ClientName: m = "", Settings: g = {}, CustomClientName: v = "" } = h, p = {
|
|
310
310
|
id: t.toString(),
|
|
311
311
|
title: e,
|
|
312
312
|
description: c,
|
|
313
313
|
symbol: B(o),
|
|
314
|
-
clientName: m === "custom.adapter" ?
|
|
314
|
+
clientName: m === "custom.adapter" ? v : m,
|
|
315
315
|
expanded: !0,
|
|
316
316
|
inline: !0,
|
|
317
317
|
body: {}
|
|
318
318
|
};
|
|
319
319
|
if (m.indexOf("phone") > -1 || m.indexOf("freetext") > -1) {
|
|
320
320
|
const { displayTextBeforeClick: d, textBeforeClick: f } = g;
|
|
321
|
-
d === "true" && (
|
|
321
|
+
d === "true" && (p.expanded = !1, p.title = f), m.indexOf("phone.text") > -1 ? p.body.phoneNumber = g.phoneNumber : p.body.freetext = g.freetext;
|
|
322
322
|
}
|
|
323
|
-
return (m.indexOf("chat.popup") > -1 || m.indexOf("link") > -1 || m === "custom.adapter" && i === "custom") && (
|
|
323
|
+
return (m.indexOf("chat.popup") > -1 || m.indexOf("link") > -1 || m === "custom.adapter" && i === "custom") && (p.body = g, p.body.confirmationFallback = s), m.indexOf("ace") > -1 && (p.body = g), r && r.HasValueComponents && (l ? p.body.form = he.fromLegacyForm(
|
|
324
324
|
t.toString(),
|
|
325
325
|
r,
|
|
326
326
|
l
|
|
327
|
-
).get() :
|
|
327
|
+
).get() : p.body.form = he.fromLegacyForm(
|
|
328
328
|
t.toString(),
|
|
329
329
|
r
|
|
330
|
-
).get(), a || (
|
|
330
|
+
).get(), a || (p.expanded = p.inline = !1)), p;
|
|
331
331
|
}, K = (t = []) => t.map(
|
|
332
332
|
({ Id: e, Title: o, TotalMatches: n, Symbol: i, DefaultIcon: s, ActiveIcon: a }) => ({
|
|
333
333
|
id: e.toString(),
|
|
@@ -345,8 +345,8 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
345
345
|
modified: s
|
|
346
346
|
})), Rt = (t, e) => {
|
|
347
347
|
switch (t) {
|
|
348
|
-
case
|
|
349
|
-
case
|
|
348
|
+
case E.MatchByCategory:
|
|
349
|
+
case E.Match: {
|
|
350
350
|
const o = {
|
|
351
351
|
guides: [],
|
|
352
352
|
matches: 0,
|
|
@@ -372,14 +372,14 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
372
372
|
})
|
|
373
373
|
), o.tags = K(r), o.notificationLists = le(a || []), o.topNotifications = L(s || [], "noticeRowTop"), o.middleNotifications = L(s || [], "noticeRowMiddle"), o.bottomNotifications = L(s || [], "footerNotice"), o;
|
|
374
374
|
}
|
|
375
|
-
case
|
|
375
|
+
case E.Categories: {
|
|
376
376
|
const { Children: o, GuidesCountTotal: n } = e;
|
|
377
377
|
return {
|
|
378
378
|
categories: be(o || []),
|
|
379
379
|
matches: n
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
case
|
|
382
|
+
case E.Guide: {
|
|
383
383
|
const {
|
|
384
384
|
Id: o,
|
|
385
385
|
Title: n,
|
|
@@ -392,52 +392,52 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
392
392
|
HandoverExists: h,
|
|
393
393
|
FirstPublishedDate: m,
|
|
394
394
|
Modified: g,
|
|
395
|
-
ModifiedByDisplayName:
|
|
396
|
-
FirstPublishedByDisplayName:
|
|
395
|
+
ModifiedByDisplayName: v,
|
|
396
|
+
FirstPublishedByDisplayName: p,
|
|
397
397
|
Categories: d,
|
|
398
398
|
Tags: f,
|
|
399
|
-
SeoMetaDescription:
|
|
400
|
-
SeoAllowIndex:
|
|
401
|
-
Perspectives:
|
|
402
|
-
PerspectiveKey:
|
|
403
|
-
Translations:
|
|
404
|
-
} = e,
|
|
405
|
-
(
|
|
406
|
-
) ||
|
|
399
|
+
SeoMetaDescription: $,
|
|
400
|
+
SeoAllowIndex: z,
|
|
401
|
+
Perspectives: S,
|
|
402
|
+
PerspectiveKey: C,
|
|
403
|
+
Translations: A
|
|
404
|
+
} = e, b = C || Object.values(S).find(
|
|
405
|
+
(N) => N === r
|
|
406
|
+
) || S.Default || null, T = {
|
|
407
407
|
guide: {
|
|
408
408
|
id: o.toString(),
|
|
409
409
|
title: n,
|
|
410
410
|
body: i,
|
|
411
411
|
modified: g,
|
|
412
412
|
published: m,
|
|
413
|
-
modifiedBy:
|
|
414
|
-
publishedBy:
|
|
413
|
+
modifiedBy: v,
|
|
414
|
+
publishedBy: p,
|
|
415
415
|
connection: r,
|
|
416
416
|
categories: d,
|
|
417
417
|
hasHandover: h,
|
|
418
418
|
allowFeedback: l,
|
|
419
|
-
seoMetaDescription:
|
|
420
|
-
seoAllowIndex:
|
|
421
|
-
perspectives:
|
|
422
|
-
perspective:
|
|
423
|
-
translations: Object.keys(
|
|
419
|
+
seoMetaDescription: $,
|
|
420
|
+
seoAllowIndex: z,
|
|
421
|
+
perspectives: S,
|
|
422
|
+
perspective: b,
|
|
423
|
+
translations: Object.keys(A || {}).reduce((N, F) => (N[F] = A[F].toString(), N), {})
|
|
424
424
|
},
|
|
425
425
|
related: me(s || []),
|
|
426
426
|
dialog: [],
|
|
427
427
|
contactMethods: (c || []).map(
|
|
428
|
-
(
|
|
428
|
+
(N) => de(N)
|
|
429
429
|
),
|
|
430
430
|
tags: K(f)
|
|
431
431
|
};
|
|
432
432
|
return (a || []).forEach(
|
|
433
|
-
({ CanAccess:
|
|
434
|
-
if (!
|
|
433
|
+
({ CanAccess: N, Description: F, ConnectionId: P, Properties: w }) => {
|
|
434
|
+
if (!N)
|
|
435
435
|
return;
|
|
436
|
-
const
|
|
436
|
+
const M = {
|
|
437
437
|
id: o.toString(),
|
|
438
|
-
title:
|
|
439
|
-
connection:
|
|
440
|
-
connectionKey:
|
|
438
|
+
title: F,
|
|
439
|
+
connection: P,
|
|
440
|
+
connectionKey: w.ConnectionKey,
|
|
441
441
|
type: ie.default,
|
|
442
442
|
parent: {
|
|
443
443
|
id: o.toString(),
|
|
@@ -445,20 +445,20 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
445
445
|
tags: K(f)
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
|
-
if (
|
|
449
|
-
switch (
|
|
448
|
+
if (w.Type === "Guide" || w.Type === "Link")
|
|
449
|
+
switch (w.Id && (M.id = w.Id.toString()), w.Uri && (M.href = w.Uri), w.Target && (M.target = w.Target), w.Type) {
|
|
450
450
|
case "Guide":
|
|
451
|
-
|
|
451
|
+
M.type = ie.guide;
|
|
452
452
|
break;
|
|
453
453
|
case "Link":
|
|
454
|
-
|
|
454
|
+
M.type = ie.link;
|
|
455
455
|
break;
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
T.dialog.push(M);
|
|
458
458
|
}
|
|
459
|
-
),
|
|
459
|
+
), T;
|
|
460
460
|
}
|
|
461
|
-
case
|
|
461
|
+
case E.Contacts: {
|
|
462
462
|
const {
|
|
463
463
|
Children: o,
|
|
464
464
|
Matches: n,
|
|
@@ -476,14 +476,14 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
476
476
|
notificationLists: le(s || [])
|
|
477
477
|
};
|
|
478
478
|
}
|
|
479
|
-
case
|
|
479
|
+
case E.ContactMethod: {
|
|
480
480
|
const { ContactMethod: o } = e;
|
|
481
481
|
return de(o || {});
|
|
482
482
|
}
|
|
483
|
-
case
|
|
484
|
-
case
|
|
483
|
+
case E.Tags:
|
|
484
|
+
case E.TagsOnGuides:
|
|
485
485
|
return K(e || []);
|
|
486
|
-
case
|
|
486
|
+
case E.Notifications: {
|
|
487
487
|
const { Notices: o, NoticeLists: n } = e;
|
|
488
488
|
return {
|
|
489
489
|
topNotifications: L(o || [], "noticeRowTop"),
|
|
@@ -496,7 +496,7 @@ const ze = (t) => import("./index-5c9c2abf.mjs").then(
|
|
|
496
496
|
return {};
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
|
-
var Ke = /* @__PURE__ */ ((t) => (t.Guide = "guide", t.Guides = "guides", t.GuidesByCategory = "guides-by-category", t.RowNotifications = "row-notices", t.NotificationLists = "notification-lists", t.GuideCategories = "guide-categories", t.ContactMethodCategories = "contact-method-categories", t.ContactMethod = "contact-method", t.ContactMethods = "contact-methods", t.Tags = "tags", t.TagsOnGuides = "tagsonguides", t))(Ke || {}),
|
|
499
|
+
var Ke = /* @__PURE__ */ ((t) => (t.Guide = "guide", t.Guides = "guides", t.GuidesByCategory = "guides-by-category", t.RowNotifications = "row-notices", t.NotificationLists = "notification-lists", t.GuideCategories = "guide-categories", t.ContactMethodCategories = "contact-method-categories", t.ContactMethod = "contact-method", t.ContactMethods = "contact-methods", t.Tags = "tags", t.TagsOnGuides = "tagsonguides", t))(Ke || {}), E = /* @__PURE__ */ ((t) => (t.Match = "match", t.Categories = "categories", t.Guide = "guide", t.Contacts = "contacts", t.ContactMethod = "contact-method", t.MatchByCategory = "match-by-category", t.Tags = "tags", t.TagsOnGuides = "tagsonguides", t.Notifications = "notifications", t))(E || {});
|
|
500
500
|
const Se = (t) => {
|
|
501
501
|
switch (t) {
|
|
502
502
|
case "guides":
|
|
@@ -616,37 +616,37 @@ class Q {
|
|
|
616
616
|
guideId: h,
|
|
617
617
|
expandCategories: m = "descendants",
|
|
618
618
|
currentCategory: g,
|
|
619
|
-
sorting:
|
|
620
|
-
guideIds:
|
|
619
|
+
sorting: v = "popularity-descending",
|
|
620
|
+
guideIds: p = []
|
|
621
621
|
} = o, d = n.toString().trim();
|
|
622
622
|
if (await Tt(this.container))
|
|
623
623
|
return Promise.resolve();
|
|
624
624
|
switch (e) {
|
|
625
625
|
case "match": {
|
|
626
|
-
const f = (
|
|
627
|
-
const [
|
|
626
|
+
const f = ($) => {
|
|
627
|
+
const [z, S] = $.split("-");
|
|
628
628
|
return {
|
|
629
629
|
type: (/* @__PURE__ */ new Map([
|
|
630
630
|
["popularity", "popularity"],
|
|
631
631
|
["alphabetic", "title"],
|
|
632
632
|
["modified", "lastModified"],
|
|
633
633
|
["published", "firstPublished"]
|
|
634
|
-
])).get(
|
|
635
|
-
direction:
|
|
634
|
+
])).get(z),
|
|
635
|
+
direction: S
|
|
636
636
|
};
|
|
637
637
|
};
|
|
638
|
-
return
|
|
639
|
-
configuration: { ids:
|
|
638
|
+
return p.length ? this.matchingClient.customRequest("guides", "POST", {
|
|
639
|
+
configuration: { ids: p, take: +c }
|
|
640
640
|
}).then(
|
|
641
|
-
(
|
|
641
|
+
($) => $ && this.handleResponse($, e, o)
|
|
642
642
|
) : this.matchingClient.match(d, {
|
|
643
643
|
categories: i === "0" ? [] : Array.isArray(i) ? i : [+i],
|
|
644
644
|
take: +c,
|
|
645
645
|
tags: r,
|
|
646
|
-
sorting: f(
|
|
647
|
-
ids:
|
|
646
|
+
sorting: f(v),
|
|
647
|
+
ids: p
|
|
648
648
|
}).then(
|
|
649
|
-
(
|
|
649
|
+
($) => $ && this.handleResponse($, e, o)
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
652
|
case "match-by-category":
|
|
@@ -662,11 +662,11 @@ class Q {
|
|
|
662
662
|
return this.matchingClient.getGuide(h, { connectionId: l }).then((f) => {
|
|
663
663
|
f && this.handleResponse(f, e, o);
|
|
664
664
|
}).catch((f) => {
|
|
665
|
-
const
|
|
665
|
+
const $ = {
|
|
666
666
|
message: "Something went wrong.",
|
|
667
667
|
status: f.status || 400
|
|
668
668
|
};
|
|
669
|
-
|
|
669
|
+
$.status === 404 && ($.message = "The guide could not be found."), this.handleResponse({}, e, o, $);
|
|
670
670
|
});
|
|
671
671
|
case "categories":
|
|
672
672
|
return this.matchingClient.getCategories({
|
|
@@ -784,13 +784,13 @@ const At = ({
|
|
|
784
784
|
switch (s) {
|
|
785
785
|
case "default":
|
|
786
786
|
case "guide":
|
|
787
|
-
const { id:
|
|
787
|
+
const { id: v, title: p } = n;
|
|
788
788
|
let d = l || i;
|
|
789
|
-
|
|
789
|
+
v !== o && !l && (d = void 0), h.routeName = m, h.params = W({
|
|
790
790
|
...g,
|
|
791
791
|
guide: o,
|
|
792
792
|
connection: d,
|
|
793
|
-
uriName: ye(o ===
|
|
793
|
+
uriName: ye(o === v ? p : t)
|
|
794
794
|
});
|
|
795
795
|
break;
|
|
796
796
|
case "link":
|
|
@@ -802,7 +802,7 @@ const At = ({
|
|
|
802
802
|
{
|
|
803
803
|
className: G(e, "humany-dialog-link"),
|
|
804
804
|
...h,
|
|
805
|
-
children: c || /* @__PURE__ */
|
|
805
|
+
children: c || /* @__PURE__ */ R(st, { children: [
|
|
806
806
|
s === "link" && /* @__PURE__ */ u(ne, { faIcon: "link" }),
|
|
807
807
|
/* @__PURE__ */ u("span", { children: t })
|
|
808
808
|
] })
|
|
@@ -821,7 +821,7 @@ re(
|
|
|
821
821
|
}
|
|
822
822
|
) : null
|
|
823
823
|
);
|
|
824
|
-
const It =
|
|
824
|
+
const It = y($e)`
|
|
825
825
|
${Le}
|
|
826
826
|
a {
|
|
827
827
|
min-width: 150px;
|
|
@@ -845,7 +845,7 @@ const It = p($e)`
|
|
|
845
845
|
}} 0 0;
|
|
846
846
|
}
|
|
847
847
|
`;
|
|
848
|
-
|
|
848
|
+
y(Z)`
|
|
849
849
|
${J}
|
|
850
850
|
font-family: ${(t) => {
|
|
851
851
|
var e;
|
|
@@ -864,7 +864,7 @@ p(Z)`
|
|
|
864
864
|
}};
|
|
865
865
|
}
|
|
866
866
|
`;
|
|
867
|
-
|
|
867
|
+
y.div`
|
|
868
868
|
background: #fff;
|
|
869
869
|
border: #ccc 1px solid;
|
|
870
870
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -877,7 +877,7 @@ p.div`
|
|
|
877
877
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
878
878
|
}};
|
|
879
879
|
`;
|
|
880
|
-
|
|
880
|
+
y.div`
|
|
881
881
|
padding: ${(t) => {
|
|
882
882
|
var e;
|
|
883
883
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|
|
@@ -911,7 +911,7 @@ p.div`
|
|
|
911
911
|
}};
|
|
912
912
|
}
|
|
913
913
|
`;
|
|
914
|
-
|
|
914
|
+
y($e)`
|
|
915
915
|
list-style: none;
|
|
916
916
|
padding: 0;
|
|
917
917
|
margin: 0;
|
|
@@ -947,7 +947,7 @@ p($e)`
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
`;
|
|
950
|
-
|
|
950
|
+
y(Z)`
|
|
951
951
|
${J}
|
|
952
952
|
font-family: ${(t) => {
|
|
953
953
|
var e;
|
|
@@ -958,7 +958,7 @@ p(Z)`
|
|
|
958
958
|
var e;
|
|
959
959
|
return X(t)(
|
|
960
960
|
"> h1",
|
|
961
|
-
|
|
961
|
+
x`
|
|
962
962
|
font-size: ${(e = t.theme.fonts) == null ? void 0 : e.normal};
|
|
963
963
|
line-height: 1.2em;
|
|
964
964
|
`
|
|
@@ -984,7 +984,7 @@ p(Z)`
|
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
`;
|
|
987
|
-
const Et = (t) =>
|
|
987
|
+
const Et = (t) => x`
|
|
988
988
|
${t["data-loading"] && "position: relative;"};
|
|
989
989
|
${t["data-loading"] && "min-height: 150px;"}
|
|
990
990
|
> * {
|
|
@@ -995,7 +995,7 @@ const Et = (t) => $`
|
|
|
995
995
|
opacity: ${t["data-loading"] ? "1" : "0"};
|
|
996
996
|
}
|
|
997
997
|
`;
|
|
998
|
-
|
|
998
|
+
y(ne)`
|
|
999
999
|
&& {
|
|
1000
1000
|
font-size: ${(t) => {
|
|
1001
1001
|
var e;
|
|
@@ -1004,7 +1004,7 @@ p(ne)`
|
|
|
1004
1004
|
}
|
|
1005
1005
|
width: 1.2em;
|
|
1006
1006
|
`;
|
|
1007
|
-
|
|
1007
|
+
y(je)`
|
|
1008
1008
|
font-size: ${(t) => {
|
|
1009
1009
|
var e;
|
|
1010
1010
|
return (e = t.theme.fonts) == null ? void 0 : e.medium;
|
|
@@ -1016,7 +1016,7 @@ p(je)`
|
|
|
1016
1016
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
1017
1017
|
}};
|
|
1018
1018
|
`;
|
|
1019
|
-
const Ot =
|
|
1019
|
+
const Ot = y(we)`
|
|
1020
1020
|
display: flex;
|
|
1021
1021
|
align-items: center;
|
|
1022
1022
|
|
|
@@ -1033,7 +1033,7 @@ const Ot = p(we)`
|
|
|
1033
1033
|
${(t) => t["data-has-label"] === "true" && ke}
|
|
1034
1034
|
|
|
1035
1035
|
svg, i {
|
|
1036
|
-
${(t) => t["data-has-label"] === "false" && t["data-has-symbol"] === "true" &&
|
|
1036
|
+
${(t) => t["data-has-label"] === "false" && t["data-has-symbol"] === "true" && x`
|
|
1037
1037
|
${ke(t)}
|
|
1038
1038
|
box-sizing: content-box;
|
|
1039
1039
|
`}
|
|
@@ -1057,20 +1057,20 @@ const Ot = p(we)`
|
|
|
1057
1057
|
buttonLabel: l = "",
|
|
1058
1058
|
actions: { addFavorite: h, removeFavorite: m }
|
|
1059
1059
|
}) => {
|
|
1060
|
-
const g =
|
|
1060
|
+
const g = Y(() => {
|
|
1061
1061
|
m(a);
|
|
1062
|
-
}, [a, m]),
|
|
1062
|
+
}, [a, m]), v = Y(() => {
|
|
1063
1063
|
h(a);
|
|
1064
|
-
}, [a, h]),
|
|
1064
|
+
}, [a, h]), p = `${r ? s : t}${c ? `: "${c}"` : ""}`;
|
|
1065
1065
|
return r ? /* @__PURE__ */ u(
|
|
1066
1066
|
ut,
|
|
1067
1067
|
{
|
|
1068
|
-
trigger: /* @__PURE__ */
|
|
1068
|
+
trigger: /* @__PURE__ */ R(
|
|
1069
1069
|
Re,
|
|
1070
1070
|
{
|
|
1071
1071
|
className: "humany-favorite-button",
|
|
1072
|
-
title:
|
|
1073
|
-
"aria-label":
|
|
1072
|
+
title: p,
|
|
1073
|
+
"aria-label": p,
|
|
1074
1074
|
"data-favorite": "true",
|
|
1075
1075
|
"data-has-label": l ? "true" : "false",
|
|
1076
1076
|
"data-has-symbol": "true",
|
|
@@ -1092,13 +1092,13 @@ const Ot = p(we)`
|
|
|
1092
1092
|
header: n,
|
|
1093
1093
|
text: i
|
|
1094
1094
|
}
|
|
1095
|
-
) : /* @__PURE__ */
|
|
1095
|
+
) : /* @__PURE__ */ R(
|
|
1096
1096
|
Re,
|
|
1097
1097
|
{
|
|
1098
1098
|
className: "humany-favorite-button",
|
|
1099
|
-
title:
|
|
1100
|
-
"aria-label":
|
|
1101
|
-
onClick:
|
|
1099
|
+
title: p,
|
|
1100
|
+
"aria-label": p,
|
|
1101
|
+
onClick: v,
|
|
1102
1102
|
"data-favorite": "false",
|
|
1103
1103
|
"data-has-label": l ? "true" : "false",
|
|
1104
1104
|
"data-has-symbol": "true",
|
|
@@ -1108,7 +1108,7 @@ const Ot = p(we)`
|
|
|
1108
1108
|
]
|
|
1109
1109
|
}
|
|
1110
1110
|
);
|
|
1111
|
-
}, Re =
|
|
1111
|
+
}, Re = y(Ot)`
|
|
1112
1112
|
grid-area: favorite;
|
|
1113
1113
|
|
|
1114
1114
|
&:focus-visible {
|
|
@@ -1134,7 +1134,7 @@ const Ot = p(we)`
|
|
|
1134
1134
|
|
|
1135
1135
|
${(t) => {
|
|
1136
1136
|
var e, o, n, i, s, a, r;
|
|
1137
|
-
return ((e = t.theme.colors) == null ? void 0 : e.text) &&
|
|
1137
|
+
return ((e = t.theme.colors) == null ? void 0 : e.text) && x`
|
|
1138
1138
|
svg {
|
|
1139
1139
|
stroke: ${(o = t.theme.colors) == null ? void 0 : o.text};
|
|
1140
1140
|
|
|
@@ -1182,7 +1182,7 @@ re(
|
|
|
1182
1182
|
negative: s,
|
|
1183
1183
|
selected: a,
|
|
1184
1184
|
...r
|
|
1185
|
-
}, c) => /* @__PURE__ */
|
|
1185
|
+
}, c) => /* @__PURE__ */ R(
|
|
1186
1186
|
jt,
|
|
1187
1187
|
{
|
|
1188
1188
|
className: G(o, "humany-feedback"),
|
|
@@ -1191,7 +1191,7 @@ re(
|
|
|
1191
1191
|
ref: c,
|
|
1192
1192
|
children: [
|
|
1193
1193
|
!!n && /* @__PURE__ */ u(qt, { children: n }),
|
|
1194
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ R(
|
|
1195
1195
|
Te,
|
|
1196
1196
|
{
|
|
1197
1197
|
className: "humany-feedback-button",
|
|
@@ -1205,7 +1205,7 @@ re(
|
|
|
1205
1205
|
]
|
|
1206
1206
|
}
|
|
1207
1207
|
),
|
|
1208
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ R(
|
|
1209
1209
|
Te,
|
|
1210
1210
|
{
|
|
1211
1211
|
className: "humany-feedback-button",
|
|
@@ -1223,7 +1223,7 @@ re(
|
|
|
1223
1223
|
}
|
|
1224
1224
|
)
|
|
1225
1225
|
);
|
|
1226
|
-
const qt =
|
|
1226
|
+
const qt = y(se)`
|
|
1227
1227
|
font-weight: normal;
|
|
1228
1228
|
margin: 0 0 ${(t) => {
|
|
1229
1229
|
var e;
|
|
@@ -1234,7 +1234,7 @@ const qt = p(se)`
|
|
|
1234
1234
|
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
1235
1235
|
}};
|
|
1236
1236
|
display: block;
|
|
1237
|
-
`, Te =
|
|
1237
|
+
`, Te = y(we)`
|
|
1238
1238
|
display: inline-block;
|
|
1239
1239
|
font-size: ${(t) => {
|
|
1240
1240
|
var e;
|
|
@@ -1250,13 +1250,13 @@ const qt = p(se)`
|
|
|
1250
1250
|
|
|
1251
1251
|
${(t) => {
|
|
1252
1252
|
var e, o;
|
|
1253
|
-
return t["data-direction"] === "horizontal" &&
|
|
1253
|
+
return t["data-direction"] === "horizontal" && x`
|
|
1254
1254
|
width: 225px;
|
|
1255
1255
|
max-width: calc(50% - ${(e = t.theme.sizes) == null ? void 0 : e.large} - ${(o = t.theme.sizes) == null ? void 0 : o.small});
|
|
1256
1256
|
`;
|
|
1257
1257
|
}}
|
|
1258
1258
|
|
|
1259
|
-
${(t) => t["data-direction"] === "vertical" &&
|
|
1259
|
+
${(t) => t["data-direction"] === "vertical" && x`
|
|
1260
1260
|
min-width: 190px;
|
|
1261
1261
|
`}
|
|
1262
1262
|
|
|
@@ -1276,10 +1276,10 @@ const qt = p(se)`
|
|
|
1276
1276
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
1277
1277
|
}} 0 0;
|
|
1278
1278
|
}
|
|
1279
|
-
`, jt =
|
|
1279
|
+
`, jt = y.div`
|
|
1280
1280
|
${(t) => {
|
|
1281
1281
|
var e;
|
|
1282
|
-
return t["data-direction"] === "vertical" &&
|
|
1282
|
+
return t["data-direction"] === "vertical" && x`
|
|
1283
1283
|
> button {
|
|
1284
1284
|
width: 100%;
|
|
1285
1285
|
&:not(:last-child) {
|
|
@@ -1302,7 +1302,7 @@ const qt = p(se)`
|
|
|
1302
1302
|
);
|
|
1303
1303
|
}
|
|
1304
1304
|
}, []);
|
|
1305
|
-
const i = (c) => n ? n.add(c) : Promise.resolve([]), s = (c) => n ? n.remove(c) : Promise.resolve([]), a = () => n ? n.clear() : Promise.resolve([]), r =
|
|
1305
|
+
const i = (c) => n ? n.add(c) : Promise.resolve([]), s = (c) => n ? n.remove(c) : Promise.resolve([]), a = () => n ? n.clear() : Promise.resolve([]), r = Y(
|
|
1306
1306
|
(c) => e.indexOf(c) > -1 ? s(c) : i(c),
|
|
1307
1307
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1308
1308
|
[e]
|
|
@@ -1334,27 +1334,27 @@ const qt = p(se)`
|
|
|
1334
1334
|
published: h
|
|
1335
1335
|
}) => {
|
|
1336
1336
|
const m = c && h ? /* @__PURE__ */ u(Ae, { format: t, timestamp: h }) : null, g = r && l ? /* @__PURE__ */ u(Ae, { format: t, timestamp: l }) : null;
|
|
1337
|
-
return !m && !g ? null : /* @__PURE__ */
|
|
1338
|
-
m && /* @__PURE__ */
|
|
1337
|
+
return !m && !g ? null : /* @__PURE__ */ R(fe, { className: G(e, "humany-metadata"), children: [
|
|
1338
|
+
m && /* @__PURE__ */ R(fe, { className: "humany-published", children: [
|
|
1339
1339
|
i,
|
|
1340
1340
|
m,
|
|
1341
1341
|
o && a && ` ${o.replace("{{editor}}", a)}`
|
|
1342
1342
|
] }),
|
|
1343
|
-
g && /* @__PURE__ */
|
|
1343
|
+
g && /* @__PURE__ */ R(fe, { className: "humany-modified", children: [
|
|
1344
1344
|
m && ", ",
|
|
1345
1345
|
n,
|
|
1346
1346
|
g,
|
|
1347
1347
|
o && s && ` ${o.replace("{{editor}}", s)}`
|
|
1348
1348
|
] })
|
|
1349
1349
|
] });
|
|
1350
|
-
}, Ae =
|
|
1350
|
+
}, Ae = y(_e)`
|
|
1351
1351
|
&:not(:first-child) {
|
|
1352
1352
|
margin-left: 4px;
|
|
1353
1353
|
}
|
|
1354
1354
|
&:not(:last-child) {
|
|
1355
1355
|
margin-right: 4px;
|
|
1356
1356
|
}
|
|
1357
|
-
`, fe =
|
|
1357
|
+
`, fe = y(je)`
|
|
1358
1358
|
font-style: italic;
|
|
1359
1359
|
`, Dt = ({ tags: t }) => t.filter((e) => e.symbol).length ? /* @__PURE__ */ u(
|
|
1360
1360
|
Ht,
|
|
@@ -1366,7 +1366,7 @@ const qt = p(se)`
|
|
|
1366
1366
|
) : null;
|
|
1367
1367
|
re(({ title: t, id: e, route: o, symbolSize: n, collapseUri: i, children: s }, a) => {
|
|
1368
1368
|
const { params: r } = xe();
|
|
1369
|
-
return /* @__PURE__ */
|
|
1369
|
+
return /* @__PURE__ */ R(Gt, { ref: a, "data-guide": e, children: [
|
|
1370
1370
|
/* @__PURE__ */ u(
|
|
1371
1371
|
ge,
|
|
1372
1372
|
{
|
|
@@ -1393,7 +1393,7 @@ re(({ title: t, id: e, route: o, symbolSize: n, collapseUri: i, children: s }, a
|
|
|
1393
1393
|
s
|
|
1394
1394
|
] });
|
|
1395
1395
|
});
|
|
1396
|
-
const Gt =
|
|
1396
|
+
const Gt = y.li`
|
|
1397
1397
|
> a {
|
|
1398
1398
|
grid-column: 1/-1;
|
|
1399
1399
|
font-weight: bold;
|
|
@@ -1424,27 +1424,27 @@ re(
|
|
|
1424
1424
|
},
|
|
1425
1425
|
metadata: m = {},
|
|
1426
1426
|
pageLabel: g,
|
|
1427
|
-
className:
|
|
1428
|
-
children:
|
|
1427
|
+
className: v,
|
|
1428
|
+
children: p,
|
|
1429
1429
|
items: d,
|
|
1430
1430
|
renderItem: f,
|
|
1431
|
-
addFavoriteTooltip:
|
|
1432
|
-
removeFavoriteCancelLabel:
|
|
1433
|
-
removeFavoriteConfirmLabel:
|
|
1434
|
-
removeFavoriteHeader:
|
|
1435
|
-
removeFavoriteLabel:
|
|
1436
|
-
removeFavoriteTooltip:
|
|
1437
|
-
searchResultsEmptyLabel:
|
|
1438
|
-
...
|
|
1439
|
-
},
|
|
1440
|
-
const
|
|
1441
|
-
guide: We = ({ id:
|
|
1431
|
+
addFavoriteTooltip: $,
|
|
1432
|
+
removeFavoriteCancelLabel: z,
|
|
1433
|
+
removeFavoriteConfirmLabel: S,
|
|
1434
|
+
removeFavoriteHeader: C,
|
|
1435
|
+
removeFavoriteLabel: A,
|
|
1436
|
+
removeFavoriteTooltip: b,
|
|
1437
|
+
searchResultsEmptyLabel: T,
|
|
1438
|
+
...N
|
|
1439
|
+
}, F) => {
|
|
1440
|
+
const P = Mt(), w = He(), M = gt(d), { guide: Qe = "guide", page: Ve = "index" } = e, {
|
|
1441
|
+
guide: We = ({ id: k }) => W({ guide: k }),
|
|
1442
1442
|
page: Ce = () => W()
|
|
1443
1443
|
} = o, [Ze, Je] = Ft();
|
|
1444
|
-
$t(
|
|
1445
|
-
const ae = (
|
|
1446
|
-
const { id: O, title:
|
|
1447
|
-
return /* @__PURE__ */
|
|
1444
|
+
$t(F, () => w.current);
|
|
1445
|
+
const ae = (k) => {
|
|
1446
|
+
const { id: O, title: I, tags: H, published: ee, modified: U, publishedBy: te, modifiedBy: ce } = k;
|
|
1447
|
+
return /* @__PURE__ */ R(
|
|
1448
1448
|
"li",
|
|
1449
1449
|
{
|
|
1450
1450
|
"data-guide": O,
|
|
@@ -1454,12 +1454,12 @@ re(
|
|
|
1454
1454
|
ge,
|
|
1455
1455
|
{
|
|
1456
1456
|
className: "humany-guide-link",
|
|
1457
|
-
title:
|
|
1458
|
-
"aria-label":
|
|
1457
|
+
title: I,
|
|
1458
|
+
"aria-label": I,
|
|
1459
1459
|
routeName: Qe,
|
|
1460
|
-
onClick: (ot) => l(ot,
|
|
1461
|
-
params: We(
|
|
1462
|
-
text:
|
|
1460
|
+
onClick: (ot) => l(ot, k),
|
|
1461
|
+
params: We(k),
|
|
1462
|
+
text: I,
|
|
1463
1463
|
children: /* @__PURE__ */ u(
|
|
1464
1464
|
j,
|
|
1465
1465
|
{
|
|
@@ -1475,19 +1475,19 @@ re(
|
|
|
1475
1475
|
r && /* @__PURE__ */ u(
|
|
1476
1476
|
Lt,
|
|
1477
1477
|
{
|
|
1478
|
-
guideTitle:
|
|
1479
|
-
addFavoriteTooltip:
|
|
1480
|
-
removeFavoriteCancelLabel:
|
|
1481
|
-
removeFavoriteConfirmLabel:
|
|
1482
|
-
removeFavoriteHeader:
|
|
1483
|
-
removeFavoriteLabel:
|
|
1484
|
-
removeFavoriteTooltip:
|
|
1478
|
+
guideTitle: I,
|
|
1479
|
+
addFavoriteTooltip: $,
|
|
1480
|
+
removeFavoriteCancelLabel: z,
|
|
1481
|
+
removeFavoriteConfirmLabel: S,
|
|
1482
|
+
removeFavoriteHeader: C,
|
|
1483
|
+
removeFavoriteLabel: A,
|
|
1484
|
+
removeFavoriteTooltip: b,
|
|
1485
1485
|
isFavorite: Ze.indexOf(O) > -1,
|
|
1486
1486
|
actions: Je,
|
|
1487
1487
|
id: O
|
|
1488
1488
|
}
|
|
1489
1489
|
),
|
|
1490
|
-
a && /* @__PURE__ */ u(Dt, { tags:
|
|
1490
|
+
a && /* @__PURE__ */ u(Dt, { tags: H }),
|
|
1491
1491
|
/* @__PURE__ */ u(
|
|
1492
1492
|
Ut,
|
|
1493
1493
|
{
|
|
@@ -1503,36 +1503,36 @@ re(
|
|
|
1503
1503
|
},
|
|
1504
1504
|
O
|
|
1505
1505
|
);
|
|
1506
|
-
}, Xe =
|
|
1507
|
-
(
|
|
1506
|
+
}, Xe = Y(
|
|
1507
|
+
(k, O, I) => f ? f(k, O, I, ae) : ae(k),
|
|
1508
1508
|
[f, ae]
|
|
1509
|
-
), et =
|
|
1510
|
-
(
|
|
1511
|
-
c && (
|
|
1509
|
+
), et = Y(
|
|
1510
|
+
(k) => {
|
|
1511
|
+
c && (k.preventDefault(), h("page", Ce()));
|
|
1512
1512
|
},
|
|
1513
1513
|
[h, c]
|
|
1514
1514
|
);
|
|
1515
1515
|
q(() => {
|
|
1516
|
-
if (
|
|
1517
|
-
const
|
|
1516
|
+
if (M && M.length < d.length && w.current) {
|
|
1517
|
+
const k = w.current.querySelectorAll(
|
|
1518
1518
|
".humany-guide-list > ul > li"
|
|
1519
|
-
), O =
|
|
1520
|
-
if (
|
|
1521
|
-
const
|
|
1522
|
-
if (
|
|
1523
|
-
const
|
|
1519
|
+
), O = k[M.length];
|
|
1520
|
+
if (k.length === d.length && M.length) {
|
|
1521
|
+
const I = k[M.length];
|
|
1522
|
+
if (I) {
|
|
1523
|
+
const H = I.querySelector(
|
|
1524
1524
|
".humany-guide-link"
|
|
1525
1525
|
);
|
|
1526
|
-
|
|
1526
|
+
H && H.focus();
|
|
1527
1527
|
}
|
|
1528
1528
|
} else
|
|
1529
|
-
O && new MutationObserver((
|
|
1530
|
-
|
|
1529
|
+
O && new MutationObserver((H, ee) => {
|
|
1530
|
+
H.forEach((U) => {
|
|
1531
1531
|
if (U.addedNodes) {
|
|
1532
1532
|
const te = Array.from(
|
|
1533
1533
|
U.addedNodes
|
|
1534
1534
|
).find((ce) => ce.tagName === "A");
|
|
1535
|
-
te && xt(
|
|
1535
|
+
te && xt(w.current, document.activeElement) && (P && te.focus(), ee.disconnect());
|
|
1536
1536
|
}
|
|
1537
1537
|
});
|
|
1538
1538
|
}).observe(O, {
|
|
@@ -1546,20 +1546,20 @@ re(
|
|
|
1546
1546
|
}
|
|
1547
1547
|
});
|
|
1548
1548
|
const tt = !!Object.keys(m).filter(
|
|
1549
|
-
(
|
|
1549
|
+
(k) => typeof m[k] < "u"
|
|
1550
1550
|
).length;
|
|
1551
|
-
return /* @__PURE__ */
|
|
1551
|
+
return /* @__PURE__ */ R(
|
|
1552
1552
|
Pt,
|
|
1553
1553
|
{
|
|
1554
|
-
className: G(
|
|
1554
|
+
className: G(v, "humany-guide-list"),
|
|
1555
1555
|
"data-item-count": d.length,
|
|
1556
1556
|
items: d,
|
|
1557
1557
|
renderItem: Xe,
|
|
1558
|
-
isTabbing:
|
|
1558
|
+
isTabbing: P,
|
|
1559
1559
|
expandable: t ? "true" : "false",
|
|
1560
1560
|
"grid-items": a || r || tt ? "true" : "false",
|
|
1561
|
-
...Fe(
|
|
1562
|
-
ref:
|
|
1561
|
+
...Fe(N),
|
|
1562
|
+
ref: w,
|
|
1563
1563
|
children: [
|
|
1564
1564
|
g ? /* @__PURE__ */ u(
|
|
1565
1565
|
ge,
|
|
@@ -1580,14 +1580,14 @@ re(
|
|
|
1580
1580
|
)
|
|
1581
1581
|
}
|
|
1582
1582
|
) : null,
|
|
1583
|
-
|
|
1584
|
-
!
|
|
1583
|
+
p,
|
|
1584
|
+
!N["data-loading"] && d.length === 0 && /* @__PURE__ */ u("p", { children: T })
|
|
1585
1585
|
]
|
|
1586
1586
|
}
|
|
1587
1587
|
);
|
|
1588
1588
|
}
|
|
1589
1589
|
);
|
|
1590
|
-
const Pt =
|
|
1590
|
+
const Pt = y(Z)`
|
|
1591
1591
|
${J}
|
|
1592
1592
|
padding: ${(t) => {
|
|
1593
1593
|
var e;
|
|
@@ -1602,7 +1602,7 @@ const Pt = p(Z)`
|
|
|
1602
1602
|
> div {
|
|
1603
1603
|
${(t) => X(t)(
|
|
1604
1604
|
"> h1",
|
|
1605
|
-
|
|
1605
|
+
x`
|
|
1606
1606
|
white-space: pre-wrap;
|
|
1607
1607
|
`
|
|
1608
1608
|
)}
|
|
@@ -1611,7 +1611,7 @@ const Pt = p(Z)`
|
|
|
1611
1611
|
> ul > li {
|
|
1612
1612
|
${(t) => {
|
|
1613
1613
|
var e, o;
|
|
1614
|
-
return t["grid-items"] === "true" &&
|
|
1614
|
+
return t["grid-items"] === "true" && x`
|
|
1615
1615
|
display: grid;
|
|
1616
1616
|
grid-template-columns: auto 1fr 1fr;
|
|
1617
1617
|
gap: 0px 0px;
|
|
@@ -1673,7 +1673,7 @@ const Pt = p(Z)`
|
|
|
1673
1673
|
|
|
1674
1674
|
${(t) => {
|
|
1675
1675
|
var e;
|
|
1676
|
-
return t.expandable === "true" &&
|
|
1676
|
+
return t.expandable === "true" && x`
|
|
1677
1677
|
display: flex;
|
|
1678
1678
|
flex-direction: row-reverse;
|
|
1679
1679
|
justify-content: flex-end;
|
|
@@ -1738,7 +1738,7 @@ const Pt = p(Z)`
|
|
|
1738
1738
|
text-decoration: underline;
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
`, Ht =
|
|
1741
|
+
`, Ht = y($e)`
|
|
1742
1742
|
${Le}
|
|
1743
1743
|
display: flex;
|
|
1744
1744
|
margin: 0 0 0 auto;
|
|
@@ -1754,7 +1754,7 @@ const Pt = p(Z)`
|
|
|
1754
1754
|
align-items: center;
|
|
1755
1755
|
justify-content: space-between;
|
|
1756
1756
|
}
|
|
1757
|
-
`, Yt =
|
|
1757
|
+
`, Yt = y(j)`
|
|
1758
1758
|
display: block;
|
|
1759
1759
|
color: ${(t) => {
|
|
1760
1760
|
var e;
|
|
@@ -1771,7 +1771,7 @@ const Pt = p(Z)`
|
|
|
1771
1771
|
font-size: ${t.size}px;
|
|
1772
1772
|
`;
|
|
1773
1773
|
}}
|
|
1774
|
-
`, Ut =
|
|
1774
|
+
`, Ut = y(Bt)`
|
|
1775
1775
|
grid-area: metadata;
|
|
1776
1776
|
text-overflow: ellipsis;
|
|
1777
1777
|
overflow: hidden;
|
|
@@ -1801,7 +1801,7 @@ const Pt = p(Z)`
|
|
|
1801
1801
|
stroke-dashoffset: -124px;
|
|
1802
1802
|
}
|
|
1803
1803
|
`;
|
|
1804
|
-
|
|
1804
|
+
y.svg`
|
|
1805
1805
|
animation: ${_t} 2s linear infinite;
|
|
1806
1806
|
height: 100%;
|
|
1807
1807
|
transform-origin: center center;
|
|
@@ -1814,7 +1814,7 @@ p.svg`
|
|
|
1814
1814
|
margin: auto;
|
|
1815
1815
|
transition: 200ms ease-out opacity;
|
|
1816
1816
|
`;
|
|
1817
|
-
|
|
1817
|
+
y.div`
|
|
1818
1818
|
position: absolute;
|
|
1819
1819
|
top: 0;
|
|
1820
1820
|
bottom: 0;
|
|
@@ -1834,7 +1834,7 @@ p.div`
|
|
|
1834
1834
|
opacity: ${(t) => t["data-loading"] ? "1" : "0"};
|
|
1835
1835
|
}
|
|
1836
1836
|
`;
|
|
1837
|
-
|
|
1837
|
+
y.div`
|
|
1838
1838
|
position: relative;
|
|
1839
1839
|
margin: 0 auto;
|
|
1840
1840
|
width: 100px;
|
|
@@ -1844,7 +1844,7 @@ p.div`
|
|
|
1844
1844
|
padding-top: 100%;
|
|
1845
1845
|
}
|
|
1846
1846
|
`;
|
|
1847
|
-
|
|
1847
|
+
y.circle`
|
|
1848
1848
|
stroke-dasharray: 1, 200;
|
|
1849
1849
|
stroke-dashoffset: 0;
|
|
1850
1850
|
animation: ${Kt} 1.5s ease-in-out infinite;
|
|
@@ -1855,7 +1855,7 @@ p.circle`
|
|
|
1855
1855
|
}};
|
|
1856
1856
|
stroke-width: 2px;
|
|
1857
1857
|
`;
|
|
1858
|
-
|
|
1858
|
+
y(we)`
|
|
1859
1859
|
display: flex;
|
|
1860
1860
|
justify-content: space-between;
|
|
1861
1861
|
align-items: center;
|
|
@@ -1893,7 +1893,7 @@ p(we)`
|
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
`;
|
|
1896
|
-
|
|
1896
|
+
y(Z)`
|
|
1897
1897
|
${Et}
|
|
1898
1898
|
${J}
|
|
1899
1899
|
overflow: hidden;
|
|
@@ -1902,11 +1902,11 @@ p(Z)`
|
|
|
1902
1902
|
var e;
|
|
1903
1903
|
return (e = t.theme.sizes) == null ? void 0 : e.large;
|
|
1904
1904
|
}};
|
|
1905
|
-
${(t) => !t["data-show-header"] &&
|
|
1905
|
+
${(t) => !t["data-show-header"] && x`
|
|
1906
1906
|
> div {
|
|
1907
1907
|
${X(t)(
|
|
1908
1908
|
"h1",
|
|
1909
|
-
|
|
1909
|
+
x`
|
|
1910
1910
|
display: none;
|
|
1911
1911
|
`
|
|
1912
1912
|
)}
|
|
@@ -1919,7 +1919,7 @@ p(Z)`
|
|
|
1919
1919
|
}
|
|
1920
1920
|
}
|
|
1921
1921
|
`;
|
|
1922
|
-
|
|
1922
|
+
y(De)`
|
|
1923
1923
|
${Ge}
|
|
1924
1924
|
font-weight: 300;
|
|
1925
1925
|
|
|
@@ -1927,20 +1927,20 @@ p(De)`
|
|
|
1927
1927
|
white-space: normal;
|
|
1928
1928
|
}
|
|
1929
1929
|
`;
|
|
1930
|
-
|
|
1930
|
+
y.li`
|
|
1931
1931
|
.humany-paragraph {
|
|
1932
1932
|
display: none;
|
|
1933
1933
|
&:not(:only-child) {
|
|
1934
1934
|
${(t) => {
|
|
1935
1935
|
var e, o, n;
|
|
1936
|
-
return ((e = t.theme.sizes) == null ? void 0 : e.cardinal) && ((o = t.theme.sizes) == null ? void 0 : o.normal) &&
|
|
1936
|
+
return ((e = t.theme.sizes) == null ? void 0 : e.cardinal) && ((o = t.theme.sizes) == null ? void 0 : o.normal) && x`
|
|
1937
1937
|
margin: ${(n = t.theme.sizes) == null ? void 0 : n.normal} 0;
|
|
1938
1938
|
`;
|
|
1939
1939
|
}}
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
1942
|
|
|
1943
|
-
${(t) => t["data-expanded"] &&
|
|
1943
|
+
${(t) => t["data-expanded"] && x`
|
|
1944
1944
|
.humany-paragraph {
|
|
1945
1945
|
display: block;
|
|
1946
1946
|
}
|
|
@@ -1955,7 +1955,7 @@ p.li`
|
|
|
1955
1955
|
}};
|
|
1956
1956
|
}
|
|
1957
1957
|
`;
|
|
1958
|
-
|
|
1958
|
+
y(j)`
|
|
1959
1959
|
margin: 0 0 0 ${(t) => {
|
|
1960
1960
|
var e;
|
|
1961
1961
|
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
@@ -1967,26 +1967,26 @@ p(j)`
|
|
|
1967
1967
|
}};
|
|
1968
1968
|
}
|
|
1969
1969
|
`;
|
|
1970
|
-
|
|
1970
|
+
y(_e)`
|
|
1971
1971
|
font-size: ${(t) => {
|
|
1972
1972
|
var e;
|
|
1973
1973
|
return (e = t.theme.fonts) == null ? void 0 : e.small;
|
|
1974
1974
|
}};
|
|
1975
1975
|
font-weight: 300;
|
|
1976
1976
|
`;
|
|
1977
|
-
|
|
1977
|
+
y(De)`
|
|
1978
1978
|
${(t) => {
|
|
1979
1979
|
var e;
|
|
1980
1980
|
return X(t)(
|
|
1981
1981
|
"h1",
|
|
1982
|
-
|
|
1982
|
+
x`
|
|
1983
1983
|
font-weight: normal;
|
|
1984
1984
|
font-size: ${(e = t.theme.fonts) == null ? void 0 : e.medium};
|
|
1985
1985
|
`
|
|
1986
1986
|
);
|
|
1987
1987
|
}}
|
|
1988
1988
|
`;
|
|
1989
|
-
const Qt =
|
|
1989
|
+
const Qt = y(yt)`
|
|
1990
1990
|
${Ge}
|
|
1991
1991
|
font-weight: 300;
|
|
1992
1992
|
line-height: 1.5em;
|
|
@@ -2019,54 +2019,54 @@ const Qt = p(yt)`
|
|
|
2019
2019
|
clientName: h,
|
|
2020
2020
|
symbol: m,
|
|
2021
2021
|
inline: g,
|
|
2022
|
-
onClick:
|
|
2022
|
+
onClick: v = () => {
|
|
2023
2023
|
},
|
|
2024
|
-
description:
|
|
2024
|
+
description: p,
|
|
2025
2025
|
htmlParseInstruction: d,
|
|
2026
2026
|
className: f,
|
|
2027
|
-
disabled:
|
|
2028
|
-
guideId:
|
|
2029
|
-
dispatch:
|
|
2027
|
+
disabled: $,
|
|
2028
|
+
guideId: z,
|
|
2029
|
+
dispatch: S = () => {
|
|
2030
2030
|
},
|
|
2031
|
-
expanded:
|
|
2032
|
-
} = r,
|
|
2033
|
-
onKeyDown: (
|
|
2034
|
-
|
|
2031
|
+
expanded: C
|
|
2032
|
+
} = r, A = g ? {
|
|
2033
|
+
onKeyDown: (b) => {
|
|
2034
|
+
b.key && b.key === "Enter" && (v(b, r), b.defaultPrevented || !C && S("expand", c));
|
|
2035
2035
|
},
|
|
2036
|
-
onClick: (
|
|
2037
|
-
b
|
|
2036
|
+
onClick: (b) => {
|
|
2037
|
+
v(b, r), b.defaultPrevented || !C && S("expand", c);
|
|
2038
2038
|
}
|
|
2039
2039
|
} : {
|
|
2040
|
-
onClick: (
|
|
2040
|
+
onClick: (b) => v(b, r),
|
|
2041
2041
|
routeName: "contact-method",
|
|
2042
2042
|
params: W({
|
|
2043
2043
|
contactCategory: o,
|
|
2044
|
-
guideId:
|
|
2044
|
+
guideId: z,
|
|
2045
2045
|
guideCategory: n,
|
|
2046
2046
|
phrase: i,
|
|
2047
2047
|
contactMethod: c,
|
|
2048
2048
|
uriName: ye(l)
|
|
2049
2049
|
})
|
|
2050
2050
|
};
|
|
2051
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ R(
|
|
2052
2052
|
Zt,
|
|
2053
2053
|
{
|
|
2054
2054
|
title: l,
|
|
2055
2055
|
"aria-label": l,
|
|
2056
2056
|
className: f,
|
|
2057
|
-
disabled:
|
|
2058
|
-
description:
|
|
2057
|
+
disabled: $,
|
|
2058
|
+
description: p,
|
|
2059
2059
|
"data-client-name": h,
|
|
2060
2060
|
...a,
|
|
2061
|
-
...
|
|
2061
|
+
...A,
|
|
2062
2062
|
children: [
|
|
2063
2063
|
m && /* @__PURE__ */ u(j, { symbol: m }),
|
|
2064
|
-
|
|
2064
|
+
p ? /* @__PURE__ */ R("div", { className: "humany-contact-link-rich-content", children: [
|
|
2065
2065
|
/* @__PURE__ */ u(Ie, { children: l }),
|
|
2066
2066
|
/* @__PURE__ */ u(
|
|
2067
2067
|
Qt,
|
|
2068
2068
|
{
|
|
2069
|
-
html:
|
|
2069
|
+
html: p,
|
|
2070
2070
|
htmlParseInstruction: d
|
|
2071
2071
|
}
|
|
2072
2072
|
)
|
|
@@ -2078,7 +2078,7 @@ const Qt = p(yt)`
|
|
|
2078
2078
|
return t.expanded ? /* @__PURE__ */ u(wt, { fallback: null, children: /* @__PURE__ */ u(e, { ...t, renderDefault: s }) }) : s();
|
|
2079
2079
|
}, Wt = (t) => {
|
|
2080
2080
|
var e, o, n, i, s, a, r, c;
|
|
2081
|
-
return
|
|
2081
|
+
return x`
|
|
2082
2082
|
display: flex;
|
|
2083
2083
|
padding: ${(e = t.theme.sizes) == null ? void 0 : e.large};
|
|
2084
2084
|
${t.description ? "" : "align-items: center;"}
|
|
@@ -2098,18 +2098,18 @@ const Qt = p(yt)`
|
|
|
2098
2098
|
color: ${(c = t.theme.colors) == null ? void 0 : c.text};
|
|
2099
2099
|
}
|
|
2100
2100
|
`;
|
|
2101
|
-
}, Ie =
|
|
2101
|
+
}, Ie = y(se)`
|
|
2102
2102
|
line-height: ${(t) => {
|
|
2103
2103
|
var e;
|
|
2104
2104
|
return (e = t.theme.fonts) == null ? void 0 : e.large;
|
|
2105
2105
|
}};
|
|
2106
|
-
`, Zt =
|
|
2106
|
+
`, Zt = y(Oe)`
|
|
2107
2107
|
${(t) => Wt(t)}
|
|
2108
2108
|
|
|
2109
2109
|
&:focus-visible {
|
|
2110
2110
|
${V};
|
|
2111
2111
|
}
|
|
2112
|
-
`, Jt =
|
|
2112
|
+
`, Jt = y.div`
|
|
2113
2113
|
text-align: center;
|
|
2114
2114
|
display: block;
|
|
2115
2115
|
${(t) => {
|
|
@@ -2118,7 +2118,7 @@ const Qt = p(yt)`
|
|
|
2118
2118
|
}}
|
|
2119
2119
|
`, Xt = (t) => {
|
|
2120
2120
|
var e, o, n;
|
|
2121
|
-
return
|
|
2121
|
+
return x`
|
|
2122
2122
|
${J(t)}
|
|
2123
2123
|
|
|
2124
2124
|
> div {
|
|
@@ -2126,7 +2126,7 @@ const Qt = p(yt)`
|
|
|
2126
2126
|
|
|
2127
2127
|
${X(t)(
|
|
2128
2128
|
"h1",
|
|
2129
|
-
|
|
2129
|
+
x`
|
|
2130
2130
|
margin: 0;
|
|
2131
2131
|
`
|
|
2132
2132
|
)}
|
|
@@ -2170,7 +2170,7 @@ const Qt = p(yt)`
|
|
|
2170
2170
|
}
|
|
2171
2171
|
`;
|
|
2172
2172
|
};
|
|
2173
|
-
|
|
2173
|
+
y(Z)`
|
|
2174
2174
|
${(t) => Xt(t)}
|
|
2175
2175
|
`;
|
|
2176
2176
|
const ro = ({
|
|
@@ -2178,94 +2178,95 @@ const ro = ({
|
|
|
2178
2178
|
guideId: e,
|
|
2179
2179
|
groupId: o,
|
|
2180
2180
|
className: n,
|
|
2181
|
-
|
|
2181
|
+
widgetName: i
|
|
2182
2182
|
}) => {
|
|
2183
|
-
var
|
|
2184
|
-
const [s, a] = D(), r = Nt(), c = He(!0), l = kt();
|
|
2185
|
-
|
|
2186
|
-
|
|
2183
|
+
var v, p, d;
|
|
2184
|
+
const [s, a] = D(), r = Nt(), c = He(!0), l = kt(), h = window.humany.widgets.find(i), m = h.container;
|
|
2185
|
+
q(() => {
|
|
2186
|
+
console.log("¤¤¤Widget", h);
|
|
2187
|
+
const { events: f } = h, $ = f.subscribe(
|
|
2187
2188
|
"conversational-hub-provider:form-submitted",
|
|
2188
|
-
async (
|
|
2189
|
-
var
|
|
2190
|
-
if (((
|
|
2189
|
+
async (S, C) => {
|
|
2190
|
+
var w;
|
|
2191
|
+
if (((w = C.form.meta) == null ? void 0 : w.groupId) !== o || C.id !== (s == null ? void 0 : s.id))
|
|
2191
2192
|
return;
|
|
2192
2193
|
l && (C.form.meta || (C.form.meta = {}), C.form.meta.conversation = l);
|
|
2193
|
-
const
|
|
2194
|
+
const A = await (m == null ? void 0 : m.getAsync(
|
|
2194
2195
|
"contactMethods"
|
|
2195
|
-
)),
|
|
2196
|
+
)), b = {
|
|
2196
2197
|
...s,
|
|
2197
2198
|
body: {
|
|
2198
2199
|
...s.body,
|
|
2199
2200
|
form: C.form
|
|
2200
2201
|
}
|
|
2201
|
-
}, { errors:
|
|
2202
|
-
|
|
2202
|
+
}, { errors: T, valid: N, errorTypes: F } = await A.validate(
|
|
2203
|
+
b
|
|
2203
2204
|
);
|
|
2204
|
-
if (!
|
|
2205
|
-
const
|
|
2206
|
-
a(void 0),
|
|
2207
|
-
...
|
|
2208
|
-
form:
|
|
2209
|
-
}, a({ ...
|
|
2205
|
+
if (!N) {
|
|
2206
|
+
const M = new he(s.body.form);
|
|
2207
|
+
a(void 0), M.setValidationErrors(T), b.body = {
|
|
2208
|
+
...b.body,
|
|
2209
|
+
form: M.get()
|
|
2210
|
+
}, a({ ...b });
|
|
2210
2211
|
return;
|
|
2211
2212
|
}
|
|
2212
|
-
const
|
|
2213
|
-
|
|
2213
|
+
const P = await A.submit(b);
|
|
2214
|
+
b.confirmation = P, a(b);
|
|
2214
2215
|
}
|
|
2215
|
-
),
|
|
2216
|
+
), z = f.subscribe(
|
|
2216
2217
|
"bot-provider:evaluate",
|
|
2217
|
-
async (
|
|
2218
|
+
async (S, C) => {
|
|
2218
2219
|
if (C.id !== t)
|
|
2219
2220
|
return;
|
|
2220
|
-
const
|
|
2221
|
+
const b = await (await (m == null ? void 0 : m.getAsync(
|
|
2221
2222
|
"contactMethods"
|
|
2222
2223
|
))).evaluate(s);
|
|
2223
|
-
let
|
|
2224
|
+
let T = {
|
|
2224
2225
|
...s,
|
|
2225
2226
|
body: {
|
|
2226
2227
|
...s.body,
|
|
2227
|
-
form:
|
|
2228
|
+
form: b
|
|
2228
2229
|
}
|
|
2229
2230
|
};
|
|
2230
|
-
const
|
|
2231
|
+
const N = Ne(T, {
|
|
2231
2232
|
submit: "Submit",
|
|
2232
2233
|
errors: {},
|
|
2233
2234
|
meta: { groupId: o }
|
|
2234
2235
|
});
|
|
2235
|
-
|
|
2236
|
-
...
|
|
2237
|
-
body:
|
|
2238
|
-
}, a(
|
|
2236
|
+
T = {
|
|
2237
|
+
...T,
|
|
2238
|
+
body: N
|
|
2239
|
+
}, a(T);
|
|
2239
2240
|
}
|
|
2240
2241
|
);
|
|
2241
2242
|
return () => {
|
|
2242
|
-
|
|
2243
|
+
$(), z();
|
|
2243
2244
|
};
|
|
2244
|
-
}, [
|
|
2245
|
-
const
|
|
2246
|
-
async (
|
|
2247
|
-
const
|
|
2245
|
+
}, [m, s, a, l]);
|
|
2246
|
+
const g = Y(
|
|
2247
|
+
async (f) => {
|
|
2248
|
+
const z = await (await Q.getInstance(m)).fetch(
|
|
2248
2249
|
Ke.ContactMethod,
|
|
2249
2250
|
{
|
|
2250
|
-
contactMethodId:
|
|
2251
|
+
contactMethodId: f,
|
|
2251
2252
|
guideId: e
|
|
2252
2253
|
},
|
|
2253
2254
|
{ noCache: !0 }
|
|
2254
|
-
),
|
|
2255
|
+
), S = Ne(z, {
|
|
2255
2256
|
submit: "Submit",
|
|
2256
2257
|
errors: {},
|
|
2257
2258
|
meta: { groupId: o }
|
|
2258
2259
|
});
|
|
2259
|
-
if (
|
|
2260
|
+
if (z.body = S, z.body.guideId = e, !c.current)
|
|
2260
2261
|
return null;
|
|
2261
|
-
a(
|
|
2262
|
+
a(z);
|
|
2262
2263
|
},
|
|
2263
2264
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2264
2265
|
[c]
|
|
2265
2266
|
);
|
|
2266
|
-
return q(() => (
|
|
2267
|
+
return q(() => (g(t), () => {
|
|
2267
2268
|
c.current = !1;
|
|
2268
|
-
}), [t,
|
|
2269
|
+
}), [t, g]), s ? /* @__PURE__ */ u(
|
|
2269
2270
|
eo,
|
|
2270
2271
|
{
|
|
2271
2272
|
...s,
|
|
@@ -2273,10 +2274,10 @@ const ro = ({
|
|
|
2273
2274
|
...s.body,
|
|
2274
2275
|
form: s.body.form ? {
|
|
2275
2276
|
...s.body.form,
|
|
2276
|
-
data: (
|
|
2277
|
+
data: (v = s.body.form) == null ? void 0 : v.data,
|
|
2277
2278
|
layout: { ...s.body.form.layout },
|
|
2278
|
-
meta: (
|
|
2279
|
-
schema: (
|
|
2279
|
+
meta: (p = s.body.form) == null ? void 0 : p.meta,
|
|
2280
|
+
schema: (d = s.body.form) == null ? void 0 : d.schema
|
|
2280
2281
|
} : void 0,
|
|
2281
2282
|
guideId: s.body.guideId
|
|
2282
2283
|
},
|
|
@@ -2286,7 +2287,7 @@ const ro = ({
|
|
|
2286
2287
|
className: G("humany-bot-contact-method", n)
|
|
2287
2288
|
}
|
|
2288
2289
|
) : null;
|
|
2289
|
-
}, eo =
|
|
2290
|
+
}, eo = y(Vt)`
|
|
2290
2291
|
padding: ${(t) => {
|
|
2291
2292
|
var e;
|
|
2292
2293
|
return (e = t.theme.sizes) == null ? void 0 : e.normal;
|