pygpt-net 2.6.64__py3-none-any.whl → 2.6.66__py3-none-any.whl
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.
- pygpt_net/CHANGELOG.txt +21 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app.py +5 -1
- pygpt_net/controller/chat/chat.py +0 -0
- pygpt_net/controller/chat/handler/openai_stream.py +137 -7
- pygpt_net/controller/chat/render.py +0 -0
- pygpt_net/controller/config/field/checkbox_list.py +34 -1
- pygpt_net/controller/files/files.py +71 -2
- pygpt_net/controller/media/media.py +20 -1
- pygpt_net/controller/presets/editor.py +137 -22
- pygpt_net/controller/presets/presets.py +4 -1
- pygpt_net/controller/ui/mode.py +14 -10
- pygpt_net/controller/ui/ui.py +18 -1
- pygpt_net/core/agents/custom/__init__.py +18 -2
- pygpt_net/core/agents/custom/runner.py +2 -2
- pygpt_net/core/attachments/clipboard.py +146 -0
- pygpt_net/core/image/image.py +34 -1
- pygpt_net/core/render/web/renderer.py +33 -11
- pygpt_net/core/tabs/tabs.py +0 -0
- pygpt_net/core/types/image.py +61 -3
- pygpt_net/data/config/config.json +4 -3
- pygpt_net/data/config/models.json +629 -41
- pygpt_net/data/css/style.dark.css +12 -0
- pygpt_net/data/css/style.light.css +12 -0
- pygpt_net/data/icons/pin2.svg +1 -0
- pygpt_net/data/icons/pin3.svg +3 -0
- pygpt_net/data/icons/point.svg +1 -0
- pygpt_net/data/icons/target.svg +1 -0
- pygpt_net/data/js/app/ui.js +19 -2
- pygpt_net/data/js/app/user.js +22 -54
- pygpt_net/data/js/app.min.js +7 -9
- pygpt_net/data/locale/locale.de.ini +4 -0
- pygpt_net/data/locale/locale.en.ini +8 -0
- pygpt_net/data/locale/locale.es.ini +4 -0
- pygpt_net/data/locale/locale.fr.ini +4 -0
- pygpt_net/data/locale/locale.it.ini +4 -0
- pygpt_net/data/locale/locale.pl.ini +4 -0
- pygpt_net/data/locale/locale.uk.ini +4 -0
- pygpt_net/data/locale/locale.zh.ini +4 -0
- pygpt_net/icons.qrc +4 -0
- pygpt_net/icons_rc.py +274 -137
- pygpt_net/item/model.py +15 -19
- pygpt_net/js_rc.py +2038 -2075
- pygpt_net/provider/agents/openai/agent.py +0 -0
- pygpt_net/provider/api/google/__init__.py +20 -9
- pygpt_net/provider/api/google/image.py +161 -28
- pygpt_net/provider/api/google/video.py +73 -36
- pygpt_net/provider/api/openai/__init__.py +21 -11
- pygpt_net/provider/api/openai/agents/client.py +0 -0
- pygpt_net/provider/api/openai/video.py +562 -0
- pygpt_net/provider/core/config/patch.py +15 -0
- pygpt_net/provider/core/model/patch.py +29 -3
- pygpt_net/provider/vector_stores/qdrant.py +117 -0
- pygpt_net/ui/__init__.py +6 -1
- pygpt_net/ui/dialog/preset.py +9 -4
- pygpt_net/ui/layout/chat/attachments.py +18 -1
- pygpt_net/ui/layout/status.py +3 -3
- pygpt_net/ui/layout/toolbox/raw.py +7 -1
- pygpt_net/ui/widget/element/status.py +55 -0
- pygpt_net/ui/widget/filesystem/explorer.py +116 -2
- pygpt_net/ui/widget/lists/context.py +26 -16
- pygpt_net/ui/widget/option/checkbox_list.py +14 -2
- pygpt_net/ui/widget/textarea/input.py +71 -17
- {pygpt_net-2.6.64.dist-info → pygpt_net-2.6.66.dist-info}/METADATA +76 -25
- {pygpt_net-2.6.64.dist-info → pygpt_net-2.6.66.dist-info}/RECORD +63 -55
- {pygpt_net-2.6.64.dist-info → pygpt_net-2.6.66.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.64.dist-info → pygpt_net-2.6.66.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.64.dist-info → pygpt_net-2.6.66.dist-info}/entry_points.txt +0 -0
pygpt_net/js_rc.py
CHANGED
|
@@ -70395,114 +70395,161 @@ heduleTick(tick)\
|
|
|
70395
70395
|
;\x0a\x09\x09};\x0a\x09\x09this._s\
|
|
70396
70396
|
cheduleTick(tick\
|
|
70397
70397
|
);\x0a\x09}\x0a}\
|
|
70398
|
-
\x00\x00\
|
|
70398
|
+
\x00\x00\x16\xbe\
|
|
70399
70399
|
/\
|
|
70400
|
-
/
|
|
70400
|
+
/ app/ui.js\x0a\x0a// \
|
|
70401
70401
|
================\
|
|
70402
70402
|
================\
|
|
70403
70403
|
================\
|
|
70404
|
-
============\x0a// \
|
|
70405
|
-
UI manager\x0a// ==\
|
|
70406
70404
|
================\
|
|
70405
|
+
==========\x0a// UI\
|
|
70406
|
+
manager\x0a// ====\
|
|
70407
70407
|
================\
|
|
70408
70408
|
================\
|
|
70409
70409
|
================\
|
|
70410
|
-
|
|
70411
|
-
|
|
70412
|
-
|
|
70413
|
-
|
|
70414
|
-
|
|
70415
|
-
|
|
70416
|
-
|
|
70417
|
-
|
|
70418
|
-
|
|
70419
|
-
|
|
70420
|
-
|
|
70421
|
-
|
|
70422
|
-
|
|
70423
|
-
|
|
70424
|
-
|
|
70425
|
-
';\
|
|
70426
|
-
|
|
70427
|
-
|
|
70428
|
-
yle
|
|
70429
|
-
=
|
|
70430
|
-
|
|
70431
|
-
|
|
70432
|
-
|
|
70433
|
-
|
|
70434
|
-
|
|
70435
|
-
|
|
70436
|
-
|
|
70437
|
-
|
|
70438
|
-
|
|
70439
|
-
|
|
70440
|
-
)
|
|
70441
|
-
|
|
70442
|
-
|
|
70443
|
-
|
|
70444
|
-
=
|
|
70445
|
-
|
|
70446
|
-
|
|
70447
|
-
\x09\x09
|
|
70448
|
-
{
|
|
70449
|
-
|
|
70450
|
-
|
|
70451
|
-
de-
|
|
70452
|
-
|
|
70453
|
-
|
|
70454
|
-
|
|
70455
|
-
|
|
70456
|
-
|
|
70457
|
-
|
|
70458
|
-
|
|
70459
|
-
}
|
|
70460
|
-
rapper pre { ove\
|
|
70461
|
-
rflow: visible; \
|
|
70462
|
-
margin-top: 0; }\
|
|
70410
|
+
================\
|
|
70411
|
+
======\x0a\x0aclass UI\
|
|
70412
|
+
Manager {\x0a\x0a\x09// R\
|
|
70413
|
+
eplace or insert\
|
|
70414
|
+
app-level CSS i\
|
|
70415
|
+
n a <style> tag.\
|
|
70416
|
+
\x0a\x09updateCSS(styl\
|
|
70417
|
+
es) {\x0a\x09\x09let styl\
|
|
70418
|
+
e = document.get\
|
|
70419
|
+
ElementById('app\
|
|
70420
|
+
-style');\x0a\x09\x09if (\
|
|
70421
|
+
!style) {\x0a\x09\x09\x09sty\
|
|
70422
|
+
le = document.cr\
|
|
70423
|
+
eateElement('sty\
|
|
70424
|
+
le');\x0a\x09\x09\x09style.i\
|
|
70425
|
+
d = 'app-style';\
|
|
70426
|
+
\x0a\x09\x09\x09document.hea\
|
|
70427
|
+
d.appendChild(st\
|
|
70428
|
+
yle);\x0a\x09\x09}\x0a\x09\x09styl\
|
|
70429
|
+
e.textContent = \
|
|
70430
|
+
styles;\x0a\x09}\x0a\x0a\x09// \
|
|
70431
|
+
Ensure base styl\
|
|
70432
|
+
es for code head\
|
|
70433
|
+
er sticky behavi\
|
|
70434
|
+
or exist.\x0a\x09ensur\
|
|
70435
|
+
eStickyHeaderSty\
|
|
70436
|
+
le() {\x0a\x09\x09let sty\
|
|
70437
|
+
le = document.ge\
|
|
70438
|
+
tElementById('co\
|
|
70439
|
+
de-sticky-style'\
|
|
70440
|
+
);\x0a\x09\x09if (style) \
|
|
70441
|
+
return;\x0a\x09\x09style \
|
|
70442
|
+
= document.creat\
|
|
70443
|
+
eElement('style'\
|
|
70444
|
+
);\x0a\x09\x09style.id = \
|
|
70445
|
+
'code-sticky-sty\
|
|
70446
|
+
le';\x0a\x09\x09style.tex\
|
|
70447
|
+
tContent = [\x0a\x09\x09\x09\
|
|
70448
|
+
'.code-wrapper {\
|
|
70449
|
+
position: relat\
|
|
70450
|
+
ive; }',\x0a\x09\x09\x09'.co\
|
|
70451
|
+
de-wrapper .code\
|
|
70452
|
+
-header-wrapper \
|
|
70453
|
+
{ position: stic\
|
|
70454
|
+
ky; top: var(--c\
|
|
70455
|
+
ode-header-stick\
|
|
70456
|
+
y-top, -2px); z-\
|
|
70457
|
+
index: 2; box-sh\
|
|
70458
|
+
adow: 0 1px 0 rg\
|
|
70459
|
+
ba(0,0,0,.06); }\
|
|
70463
70460
|
',\x0a\x09\x09\x09'.code-wra\
|
|
70464
|
-
pper pre
|
|
70461
|
+
pper pre { overf\
|
|
70462
|
+
low: visible; ma\
|
|
70463
|
+
rgin-top: 0; }',\
|
|
70464
|
+
\x0a\x09\x09\x09'.code-wrapp\
|
|
70465
|
+
er pre code { di\
|
|
70466
|
+
splay: block; wh\
|
|
70467
|
+
ite-space: pre; \
|
|
70468
|
+
max-height: 100d\
|
|
70469
|
+
vh; overflow: au\
|
|
70470
|
+
to;',\x0a\x09\x09\x09' over\
|
|
70471
|
+
scroll-behavior:\
|
|
70472
|
+
contain; -webki\
|
|
70473
|
+
t-overflow-scrol\
|
|
70474
|
+
ling: touch; ove\
|
|
70475
|
+
rflow-anchor: no\
|
|
70476
|
+
ne; scrollbar-gu\
|
|
70477
|
+
tter: stable bot\
|
|
70478
|
+
h-edges; scroll-\
|
|
70479
|
+
behavior: auto; \
|
|
70480
|
+
}',\x0a\x09\x09\x09'#_loader\
|
|
70481
|
+
_.hidden { displ\
|
|
70482
|
+
ay: none !import\
|
|
70483
|
+
ant; visibility:\
|
|
70484
|
+
hidden !importa\
|
|
70485
|
+
nt; }',\x0a\x09\x09\x09'#_lo\
|
|
70486
|
+
ader_.visible { \
|
|
70465
70487
|
display: block; \
|
|
70466
|
-
|
|
70467
|
-
;
|
|
70468
|
-
|
|
70469
|
-
|
|
70470
|
-
|
|
70471
|
-
|
|
70472
|
-
|
|
70473
|
-
|
|
70474
|
-
|
|
70475
|
-
|
|
70476
|
-
|
|
70477
|
-
|
|
70478
|
-
|
|
70479
|
-
|
|
70480
|
-
|
|
70481
|
-
|
|
70482
|
-
|
|
70483
|
-
|
|
70484
|
-
|
|
70485
|
-
|
|
70486
|
-
{ display:
|
|
70487
|
-
;
|
|
70488
|
-
|
|
70489
|
-
|
|
70490
|
-
|
|
70491
|
-
|
|
70492
|
-
|
|
70493
|
-
|
|
70494
|
-
|
|
70495
|
-
|
|
70496
|
-
|
|
70497
|
-
|
|
70498
|
-
|
|
70499
|
-
|
|
70500
|
-
|
|
70501
|
-
|
|
70502
|
-
|
|
70503
|
-
|
|
70504
|
-
|
|
70505
|
-
|
|
70488
|
+
visibility: visi\
|
|
70489
|
+
ble; }',\x0a\x0a\x09\x09\x09/* \
|
|
70490
|
+
User message col\
|
|
70491
|
+
lapse (uc-*)\x0a\x09\x09\x09\
|
|
70492
|
+
Collapsed con\
|
|
70493
|
+
tent now fades o\
|
|
70494
|
+
ut towards the b\
|
|
70495
|
+
ottom using a CS\
|
|
70496
|
+
S mask.\x0a\x09\x09\x09 Th\
|
|
70497
|
+
is removes the n\
|
|
70498
|
+
eed for an inlin\
|
|
70499
|
+
e \x22...\x22 overlay \
|
|
70500
|
+
and works in lig\
|
|
70501
|
+
ht/dark themes. \
|
|
70502
|
+
*/\x0a\x09\x09\x09'.msg-box.\
|
|
70503
|
+
msg-user .msg { \
|
|
70504
|
+
position: relati\
|
|
70505
|
+
ve; }',\x0a\x09\x09\x09'.msg\
|
|
70506
|
+
-box.msg-user .m\
|
|
70507
|
+
sg > .uc-content\
|
|
70508
|
+
{ display: bloc\
|
|
70509
|
+
k; overflow: vis\
|
|
70510
|
+
ible; }',\x0a\x09\x09\x09'.m\
|
|
70511
|
+
sg-box.msg-user \
|
|
70512
|
+
.msg > .uc-conte\
|
|
70513
|
+
nt.uc-collapsed \
|
|
70514
|
+
{',\x0a\x09\x09\x09' max-he\
|
|
70515
|
+
ight: var(--user\
|
|
70516
|
+
-msg-collapse-ma\
|
|
70517
|
+
x-h, 1000px);',\x0a\
|
|
70518
|
+
\x09\x09\x09' overflow: \
|
|
70519
|
+
hidden;',\x0a\x09\x09\x09' \
|
|
70520
|
+
-webkit-mask-ima\
|
|
70521
|
+
ge: linear-gradi\
|
|
70522
|
+
ent(to bottom, r\
|
|
70523
|
+
gba(0,0,0,1) cal\
|
|
70524
|
+
c(100% - var(--u\
|
|
70525
|
+
c-fade-height, 6\
|
|
70526
|
+
4px)), rgba(0,0,\
|
|
70527
|
+
0,0) 100%);',\x0a\x09\x09\
|
|
70528
|
+
\x09' mask-image: \
|
|
70529
|
+
linear-gradient(\
|
|
70530
|
+
to bottom, rgba(\
|
|
70531
|
+
0,0,0,1) calc(10\
|
|
70532
|
+
0% - var(--uc-fa\
|
|
70533
|
+
de-height, 64px)\
|
|
70534
|
+
), rgba(0,0,0,0)\
|
|
70535
|
+
100%);',\x0a\x09\x09\x09' \
|
|
70536
|
+
-webkit-mask-siz\
|
|
70537
|
+
e: 100% 100%;',\x0a\
|
|
70538
|
+
\x09\x09\x09' mask-size:\
|
|
70539
|
+
100% 100%;',\x0a\x09\x09\
|
|
70540
|
+
\x09' -webkit-mask\
|
|
70541
|
+
-repeat: no-repe\
|
|
70542
|
+
at;',\x0a\x09\x09\x09' mask\
|
|
70543
|
+
-repeat: no-repe\
|
|
70544
|
+
at;',\x0a\x09\x09\x09'}',\x0a\x09\x09\
|
|
70545
|
+
\x09'.msg-box.msg-u\
|
|
70546
|
+
ser .msg > .uc-c\
|
|
70547
|
+
ontent.uc-expand\
|
|
70548
|
+
ed {',\x0a\x09\x09\x09' -we\
|
|
70549
|
+
bkit-mask-image:\
|
|
70550
|
+
none;',\x0a\x09\x09\x09' m\
|
|
70551
|
+
ask-image: none;\
|
|
70552
|
+
',\x0a\x09\x09\x09'}',\x0a\x09\x09\x09'.\
|
|
70506
70553
|
msg-box.msg-user\
|
|
70507
70554
|
.msg > .uc-togg\
|
|
70508
70555
|
le { display: no\
|
|
@@ -97254,8 +97301,9 @@ olNode:Z,SvgNode\
|
|
|
97254
97301
|
neNode:Q}};retur\
|
|
97255
97302
|
n t=t.default}()\
|
|
97256
97303
|
}));\
|
|
97257
|
-
\x00\x00
|
|
97304
|
+
\x00\x00(N\
|
|
97258
97305
|
/\
|
|
97306
|
+
/ app/user.js\x0a\x0a/\
|
|
97259
97307
|
/ ==============\
|
|
97260
97308
|
================\
|
|
97261
97309
|
================\
|
|
@@ -97293,451 +97341,380 @@ ize if needed.\x0a\x09\
|
|
|
97293
97341
|
\x09this._processed\
|
|
97294
97342
|
= new Set();\x0a\x0a\x09\
|
|
97295
97343
|
\x09// Visual indic\
|
|
97296
|
-
ator
|
|
97297
|
-
|
|
97298
|
-
|
|
97299
|
-
|
|
97300
|
-
\
|
|
97301
|
-
|
|
97302
|
-
|
|
97303
|
-
|
|
97304
|
-
|
|
97305
|
-
|
|
97306
|
-
|
|
97344
|
+
ator is now pure\
|
|
97345
|
+
ly CSS-based (ma\
|
|
97346
|
+
sk fade) \xe2\x80\x93 no \
|
|
97347
|
+
inline \x22...\x22 tex\
|
|
97348
|
+
t injected anymo\
|
|
97349
|
+
re.\x0a\x09}\x0a\x0a\x09// Icon\
|
|
97350
|
+
paths for the c\
|
|
97351
|
+
ollapse/expand b\
|
|
97352
|
+
uttons.\x0a\x09_icons(\
|
|
97353
|
+
) {\x0a\x09\x09const I = \
|
|
97354
|
+
(this.cfg && thi\
|
|
97355
|
+
s.cfg.ICONS) || \
|
|
97356
|
+
{};\x0a\x09\x09return {\x0a\x09\
|
|
97357
|
+
\x09\x09expand: I.EXPA\
|
|
97358
|
+
ND || '',\x0a\x09\x09\x09col\
|
|
97359
|
+
lapse: I.COLLAPS\
|
|
97360
|
+
E || ''\x0a\x09\x09};\x0a\x09}\x0a\
|
|
97361
|
+
\x0a\x09// Label texts\
|
|
97362
|
+
for the collaps\
|
|
97363
|
+
e/expand buttons\
|
|
97364
|
+
.\x0a\x09_labels() {\x0a\x09\
|
|
97365
|
+
\x09const L = (this\
|
|
97307
97366
|
.cfg && this.cfg\
|
|
97308
|
-
.
|
|
97309
|
-
\x09return {\x0a\x09\x09\
|
|
97310
|
-
|
|
97311
|
-
'',\x0a\x09\x09\
|
|
97312
|
-
:
|
|
97313
|
-
'
|
|
97314
|
-
|
|
97315
|
-
|
|
97316
|
-
|
|
97317
|
-
|
|
97318
|
-
t
|
|
97319
|
-
|
|
97320
|
-
|
|
97321
|
-
|
|
97322
|
-
|
|
97323
|
-
|
|
97324
|
-
|
|
97325
|
-
|
|
97326
|
-
|
|
97327
|
-
le
|
|
97328
|
-
|
|
97329
|
-
|
|
97330
|
-
|
|
97331
|
-
|
|
97332
|
-
|
|
97333
|
-
|
|
97334
|
-
(
|
|
97335
|
-
|
|
97336
|
-
&&
|
|
97337
|
-
|
|
97338
|
-
|
|
97339
|
-
|
|
97340
|
-
\x09\x09\x09\
|
|
97341
|
-
|
|
97342
|
-
|
|
97343
|
-
\
|
|
97344
|
-
)\x0a\x09\x09\x09\
|
|
97345
|
-
|
|
97346
|
-
|
|
97347
|
-
|
|
97348
|
-
|
|
97349
|
-
\x09
|
|
97350
|
-
\x09\x09\x09\x09}, 'UserColl\
|
|
97351
|
-
apse', 0);\x0a\x09\x09\x09\x09r\
|
|
97352
|
-
eturn;\x0a\x09\x09\x09}\x0a\x09\x09} \
|
|
97353
|
-
catch (_) {}\x0a\x09\x09t\
|
|
97354
|
-
ry {\x0a\x09\x09\x09requestA\
|
|
97355
|
-
nimationFrame(()\
|
|
97367
|
+
.LOCALE) || {};\x0a\
|
|
97368
|
+
\x09\x09return {\x0a\x09\x09\x09ex\
|
|
97369
|
+
pand: L.EXPAND |\
|
|
97370
|
+
| 'Expand',\x0a\x09\x09\x09c\
|
|
97371
|
+
ollapse: L.COLLA\
|
|
97372
|
+
PSE || 'Collapse\
|
|
97373
|
+
'\x0a\x09\x09};\x0a\x09}\x0a\x0a\x09// S\
|
|
97374
|
+
chedule a functi\
|
|
97375
|
+
on for next fram\
|
|
97376
|
+
e (ensures layou\
|
|
97377
|
+
t is up-to-date \
|
|
97378
|
+
before scrolling\
|
|
97379
|
+
).\x0a\x09_afterLayout\
|
|
97380
|
+
(fn) {\x0a\x09\x09try {\x0a\x09\
|
|
97381
|
+
\x09\x09if (typeof run\
|
|
97382
|
+
time !== 'undefi\
|
|
97383
|
+
ned' && runtime.\
|
|
97384
|
+
raf && typeof ru\
|
|
97385
|
+
ntime.raf.schedu\
|
|
97386
|
+
le === 'function\
|
|
97387
|
+
') {\x0a\x09\x09\x09\x09const k\
|
|
97388
|
+
ey = {\x0a\x09\x09\x09\x09\x09t: '\
|
|
97389
|
+
UC:afterLayout',\
|
|
97390
|
+
\x0a\x09\x09\x09\x09\x09i: Math.ra\
|
|
97391
|
+
ndom()\x0a\x09\x09\x09\x09};\x0a\x09\x09\
|
|
97392
|
+
\x09\x09runtime.raf.sc\
|
|
97393
|
+
hedule(key, () =\
|
|
97394
|
+
> {\x0a\x09\x09\x09\x09\x09try {\x0a\x09\
|
|
97395
|
+
\x09\x09\x09\x09\x09fn && fn();\
|
|
97396
|
+
\x0a\x09\x09\x09\x09\x09} catch (_\
|
|
97397
|
+
) {}\x0a\x09\x09\x09\x09}, 'Use\
|
|
97398
|
+
rCollapse', 0);\x0a\
|
|
97399
|
+
\x09\x09\x09\x09return;\x0a\x09\x09\x09}\
|
|
97400
|
+
\x0a\x09\x09} catch (_) {\
|
|
97401
|
+
}\x0a\x09\x09try {\x0a\x09\x09\x09req\
|
|
97402
|
+
uestAnimationFra\
|
|
97403
|
+
me(() => {\x0a\x09\x09\x09\x09t\
|
|
97404
|
+
ry {\x0a\x09\x09\x09\x09\x09fn && \
|
|
97405
|
+
fn();\x0a\x09\x09\x09\x09} catc\
|
|
97406
|
+
h (_) {}\x0a\x09\x09\x09});\x0a\
|
|
97407
|
+
\x09\x09} catch (_) {\x0a\
|
|
97408
|
+
\x09\x09\x09setTimeout(()\
|
|
97356
97409
|
=> {\x0a\x09\x09\x09\x09try {\x0a\
|
|
97357
97410
|
\x09\x09\x09\x09\x09fn && fn();\
|
|
97358
|
-
\x0a\x09\x09\x09\x09} catch (
|
|
97359
|
-
{}\x0a\x09\x09\x09});\x0a\x09\
|
|
97360
|
-
|
|
97361
|
-
|
|
97362
|
-
|
|
97363
|
-
|
|
97364
|
-
|
|
97365
|
-
|
|
97366
|
-
|
|
97367
|
-
|
|
97368
|
-
|
|
97369
|
-
|
|
97370
|
-
|
|
97371
|
-
|
|
97372
|
-
|
|
97373
|
-
|
|
97374
|
-
\x09\
|
|
97375
|
-
|
|
97376
|
-
|
|
97377
|
-
;\x0a\x09\
|
|
97378
|
-
|
|
97379
|
-
|
|
97380
|
-
\x0a\x09\x09\
|
|
97381
|
-
|
|
97382
|
-
|
|
97383
|
-
\x09\
|
|
97384
|
-
|
|
97385
|
-
|
|
97386
|
-
|
|
97387
|
-
|
|
97388
|
-
|
|
97389
|
-
|
|
97390
|
-
|
|
97391
|
-
|
|
97392
|
-
|
|
97393
|
-
|
|
97394
|
-
|
|
97395
|
-
|
|
97396
|
-
|
|
97411
|
+
\x0a\x09\x09\x09\x09} catch (__\
|
|
97412
|
+
) {}\x0a\x09\x09\x09}, 0);\x0a\x09\
|
|
97413
|
+
\x09}\x0a\x09}\x0a\x0a\x09// Bring\
|
|
97414
|
+
toggle into vie\
|
|
97415
|
+
w with minimal s\
|
|
97416
|
+
croll (upwards i\
|
|
97417
|
+
f it moved above\
|
|
97418
|
+
after collapse)\
|
|
97419
|
+
.\x0a\x09_scrollToggle\
|
|
97420
|
+
IntoView(toggleE\
|
|
97421
|
+
l) {\x0a\x09\x09if (!togg\
|
|
97422
|
+
leEl || !toggleE\
|
|
97423
|
+
l.isConnected) r\
|
|
97424
|
+
eturn;\x0a\x09\x09try {\x0a\x09\
|
|
97425
|
+
\x09\x09if (runtime &&\
|
|
97426
|
+
runtime.scrollM\
|
|
97427
|
+
gr) {\x0a\x09\x09\x09\x09runtim\
|
|
97428
|
+
e.scrollMgr.user\
|
|
97429
|
+
Interacted = tru\
|
|
97430
|
+
e;\x0a\x09\x09\x09\x09runtime.s\
|
|
97431
|
+
crollMgr.autoFol\
|
|
97432
|
+
low = false;\x0a\x09\x09\x09\
|
|
97433
|
+
}\x0a\x09\x09} catch (_) \
|
|
97434
|
+
{}\x0a\x09\x09this._after\
|
|
97435
|
+
Layout(() => {\x0a\x09\
|
|
97436
|
+
\x09\x09try {\x0a\x09\x09\x09\x09if (\
|
|
97437
|
+
toggleEl.scrollI\
|
|
97438
|
+
ntoView) {\x0a\x09\x09\x09\x09\x09\
|
|
97439
|
+
// Prefer minima\
|
|
97440
|
+
l movement; keep\
|
|
97441
|
+
behavior non-an\
|
|
97442
|
+
imated and predi\
|
|
97443
|
+
ctable.\x0a\x09\x09\x09\x09\x09try\
|
|
97444
|
+
{\x0a\x09\x09\x09\x09\x09\x09toggleE\
|
|
97445
|
+
l.scrollIntoView\
|
|
97446
|
+
({\x0a\x09\x09\x09\x09\x09\x09\x09block:\
|
|
97447
|
+
'nearest',\x0a\x09\x09\x09\x09\
|
|
97448
|
+
\x09\x09\x09inline: 'near\
|
|
97449
|
+
est',\x0a\x09\x09\x09\x09\x09\x09\x09beh\
|
|
97450
|
+
avior: 'instant'\
|
|
97451
|
+
\x0a\x09\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09\x09\
|
|
97452
|
+
} catch (_) {\x0a\x09\x09\
|
|
97397
97453
|
\x09\x09\x09\x09toggleEl.scr\
|
|
97398
|
-
ollIntoView(
|
|
97399
|
-
\x09\x09\x09\x09\
|
|
97400
|
-
|
|
97401
|
-
|
|
97402
|
-
\
|
|
97403
|
-
|
|
97404
|
-
|
|
97405
|
-
|
|
97406
|
-
|
|
97407
|
-
|
|
97408
|
-
\
|
|
97409
|
-
|
|
97410
|
-
|
|
97411
|
-
|
|
97412
|
-
|
|
97413
|
-
|
|
97414
|
-
|
|
97415
|
-
|
|
97416
|
-
\
|
|
97417
|
-
|
|
97418
|
-
|
|
97419
|
-
|
|
97420
|
-
t
|
|
97421
|
-
|
|
97422
|
-
|
|
97423
|
-
|
|
97424
|
-
|
|
97425
|
-
|
|
97426
|
-
|
|
97427
|
-
|
|
97428
|
-
|
|
97429
|
-
|
|
97430
|
-
|
|
97431
|
-
|
|
97432
|
-
|
|
97433
|
-
|
|
97434
|
-
|
|
97435
|
-
|
|
97436
|
-
|
|
97437
|
-
|
|
97438
|
-
|
|
97439
|
-
|
|
97440
|
-
|
|
97441
|
-
|
|
97442
|
-
|
|
97443
|
-
\
|
|
97444
|
-
|
|
97445
|
-
|
|
97446
|
-
|
|
97447
|
-
|
|
97448
|
-
|
|
97449
|
-
|
|
97450
|
-
|
|
97451
|
-
|
|
97452
|
-
'
|
|
97453
|
-
|
|
97454
|
-
|
|
97455
|
-
|
|
97456
|
-
|
|
97457
|
-
|
|
97458
|
-
|
|
97459
|
-
|
|
97460
|
-
);\x0a\x09\
|
|
97461
|
-
|
|
97462
|
-
|
|
97463
|
-
|
|
97464
|
-
\x09toggle.setAttri\
|
|
97465
|
-
bute('role', 'bu\
|
|
97466
|
-
tton');\x0a\x09\x09\x09toggl\
|
|
97467
|
-
e.setAttribute('\
|
|
97468
|
-
aria-expanded', \
|
|
97469
|
-
'false');\x0a\x09\x09\x09tog\
|
|
97470
|
-
gle.title = labe\
|
|
97471
|
-
ls.expand;\x0a\x0a\x09\x09\x09c\
|
|
97472
|
-
onst img = docum\
|
|
97473
|
-
ent.createElemen\
|
|
97474
|
-
t('img');\x0a\x09\x09\x09img\
|
|
97475
|
-
.className = 'uc\
|
|
97476
|
-
-toggle-icon';\x0a\x09\
|
|
97477
|
-
\x09\x09img.alt = labe\
|
|
97478
|
-
ls.expand;\x0a\x09\x09\x09im\
|
|
97479
|
-
g.src = icons.ex\
|
|
97480
|
-
pand;\x0a\x0a\x09\x09\x09// Pro\
|
|
97481
|
-
vide a sane defa\
|
|
97482
|
-
ult size even if\
|
|
97483
|
-
CSS did not loa\
|
|
97484
|
-
d yet (CSS will \
|
|
97485
|
-
override when pr\
|
|
97486
|
-
esent).\x0a\x09\x09\x09img.w\
|
|
97487
|
-
idth = 26; // ke\
|
|
97488
|
-
ep in sync with \
|
|
97489
|
-
CSS fallback var\
|
|
97490
|
-
(--uc-toggle-ico\
|
|
97491
|
-
n-size, 26px)\x0a\x09\x09\
|
|
97492
|
-
\x09img.height = 26\
|
|
97493
|
-
; // ensures a c\
|
|
97494
|
-
onsistent, non-t\
|
|
97495
|
-
iny control from\
|
|
97496
|
-
the first paint\
|
|
97497
|
-
\x0a\x0a\x09\x09\x09toggle.appe\
|
|
97498
|
-
ndChild(img);\x0a\x0a\x09\
|
|
97499
|
-
\x09\x09// Attach loca\
|
|
97500
|
-
l listeners (no \
|
|
97501
|
-
global handler c\
|
|
97502
|
-
hange; productio\
|
|
97503
|
-
n-safe).\x0a\x09\x09\x09togg\
|
|
97504
|
-
le.addEventListe\
|
|
97505
|
-
ner('click', (ev\
|
|
97506
|
-
) => {\x0a\x09\x09\x09\x09ev.pr\
|
|
97507
|
-
eventDefault();\x0a\
|
|
97508
|
-
\x09\x09\x09\x09ev.stopPropa\
|
|
97509
|
-
gation();\x0a\x09\x09\x09\x09th\
|
|
97510
|
-
is.toggleFromTog\
|
|
97511
|
-
gle(toggle);\x0a\x09\x09\x09\
|
|
97512
|
-
});\x0a\x09\x09\x09toggle.ad\
|
|
97513
|
-
dEventListener('\
|
|
97514
|
-
keydown', (ev) =\
|
|
97515
|
-
> {\x0a\x09\x09\x09\x09if (ev.k\
|
|
97516
|
-
ey === 'Enter' |\
|
|
97517
|
-
| ev.key === ' '\
|
|
97518
|
-
) {\x0a\x09\x09\x09\x09\x09ev.prev\
|
|
97519
|
-
entDefault();\x0a\x09\x09\
|
|
97520
|
-
\x09\x09\x09ev.stopPropag\
|
|
97521
|
-
ation();\x0a\x09\x09\x09\x09\x09th\
|
|
97522
|
-
is.toggleFromTog\
|
|
97523
|
-
gle(toggle);\x0a\x09\x09\x09\
|
|
97524
|
-
\x09}\x0a\x09\x09\x09}, {\x0a\x09\x09\x09\x09p\
|
|
97525
|
-
assive: false\x0a\x09\x09\
|
|
97526
|
-
\x09});\x0a\x0a\x09\x09\x09msg.app\
|
|
97527
|
-
endChild(toggle)\
|
|
97528
|
-
;\x0a\x09\x09}\x0a\x0a\x09\x09this._p\
|
|
97529
|
-
rocessed.add(msg\
|
|
97530
|
-
);\x0a\x09\x09msg.dataset\
|
|
97531
|
-
.ucInit = '1';\x0a\x09\
|
|
97532
|
-
\x09return {\x0a\x09\x09\x09con\
|
|
97533
|
-
tent,\x0a\x09\x09\x09toggle\x0a\
|
|
97534
|
-
\x09\x09};\x0a\x09}\x0a\x0a\x09// Cre\
|
|
97535
|
-
ate or update th\
|
|
97536
|
-
e ellipsis indic\
|
|
97537
|
-
ator inside cont\
|
|
97538
|
-
ent (absolute in\
|
|
97539
|
-
the bottom-righ\
|
|
97540
|
-
t corner).\x0a\x09_ens\
|
|
97541
|
-
ureEllipsisEl(ms\
|
|
97542
|
-
g, contentEl) {\x0a\
|
|
97543
|
-
\x09\x09const content \
|
|
97544
|
-
= contentEl || (\
|
|
97545
|
-
msg && msg.query\
|
|
97546
|
-
Selector('.uc-co\
|
|
97547
|
-
ntent'));\x0a\x09\x09if (\
|
|
97548
|
-
!content) return\
|
|
97549
|
-
null;\x0a\x0a\x09\x09// Ens\
|
|
97550
|
-
ure the content \
|
|
97551
|
-
becomes a positi\
|
|
97552
|
-
oning context on\
|
|
97553
|
-
ly when needed.\x0a\
|
|
97554
|
-
\x09\x09if (getCompute\
|
|
97555
|
-
dStyle(content).\
|
|
97556
|
-
position === 'st\
|
|
97557
|
-
atic') {\x0a\x09\x09\x09cont\
|
|
97558
|
-
ent.style.positi\
|
|
97559
|
-
on = 'relative';\
|
|
97560
|
-
\x0a\x09\x09}\x0a\x0a\x09\x09let dot \
|
|
97561
|
-
= content.queryS\
|
|
97562
|
-
elector('.uc-ell\
|
|
97563
|
-
ipsis');\x0a\x09\x09if (!\
|
|
97564
|
-
dot) {\x0a\x09\x09\x09dot = \
|
|
97454
|
+
ollIntoView(fals\
|
|
97455
|
+
e);\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\
|
|
97456
|
+
\x0a\x09\x09\x09} catch (_) \
|
|
97457
|
+
{}\x0a\x09\x09});\x0a\x09}\x0a\x0a\x09//\
|
|
97458
|
+
Ensure wrapper \
|
|
97459
|
+
and toggle exist\
|
|
97460
|
+
for a given .ms\
|
|
97461
|
+
g element.\x0a\x09_ens\
|
|
97462
|
+
ureStructure(msg\
|
|
97463
|
+
) {\x0a\x09\x09if (!msg |\
|
|
97464
|
+
| !msg.isConnect\
|
|
97465
|
+
ed) return null;\
|
|
97466
|
+
\x0a\x0a\x09\x09// Wrap all \
|
|
97467
|
+
direct children \
|
|
97468
|
+
into a dedicated\
|
|
97469
|
+
content contain\
|
|
97470
|
+
er to measure he\
|
|
97471
|
+
ight accurately.\
|
|
97472
|
+
\x0a\x09\x09let content =\
|
|
97473
|
+
msg.querySelect\
|
|
97474
|
+
or('.uc-content'\
|
|
97475
|
+
);\x0a\x09\x09if (!conten\
|
|
97476
|
+
t) {\x0a\x09\x09\x09content \
|
|
97477
|
+
= document.creat\
|
|
97478
|
+
eElement('div');\
|
|
97479
|
+
\x0a\x09\x09\x09content.clas\
|
|
97480
|
+
sName = 'uc-cont\
|
|
97481
|
+
ent';\x0a\x09\x09\x09const f\
|
|
97482
|
+
rag = document.c\
|
|
97483
|
+
reateDocumentFra\
|
|
97484
|
+
gment();\x0a\x09\x09\x09whil\
|
|
97485
|
+
e (msg.firstChil\
|
|
97486
|
+
d) frag.appendCh\
|
|
97487
|
+
ild(msg.firstChi\
|
|
97488
|
+
ld);\x0a\x09\x09\x09content.\
|
|
97489
|
+
appendChild(frag\
|
|
97490
|
+
);\x0a\x09\x09\x09msg.append\
|
|
97491
|
+
Child(content);\x0a\
|
|
97492
|
+
\x09\x09}\x0a\x0a\x09\x09// Ensure\
|
|
97493
|
+
a single toggle\
|
|
97494
|
+
exists (click a\
|
|
97495
|
+
nd keyboard acce\
|
|
97496
|
+
ssible).\x0a\x09\x09let t\
|
|
97497
|
+
oggle = msg.quer\
|
|
97498
|
+
ySelector('.uc-t\
|
|
97499
|
+
oggle');\x0a\x09\x09if (!\
|
|
97500
|
+
toggle) {\x0a\x09\x09\x09con\
|
|
97501
|
+
st icons = this.\
|
|
97502
|
+
_icons();\x0a\x09\x09\x09con\
|
|
97503
|
+
st labels = this\
|
|
97504
|
+
._labels();\x0a\x0a\x09\x09\x09\
|
|
97505
|
+
toggle = documen\
|
|
97506
|
+
t.createElement(\
|
|
97507
|
+
'div');\x0a\x09\x09\x09toggl\
|
|
97508
|
+
e.className = 'u\
|
|
97509
|
+
c-toggle';\x0a\x09\x09\x09to\
|
|
97510
|
+
ggle.tabIndex = \
|
|
97511
|
+
0;\x0a\x09\x09\x09toggle.set\
|
|
97512
|
+
Attribute('role'\
|
|
97513
|
+
, 'button');\x0a\x09\x09\x09\
|
|
97514
|
+
toggle.setAttrib\
|
|
97515
|
+
ute('aria-expand\
|
|
97516
|
+
ed', 'false');\x0a\x09\
|
|
97517
|
+
\x09\x09toggle.title =\
|
|
97518
|
+
labels.expand;\x0a\
|
|
97519
|
+
\x0a\x09\x09\x09const img = \
|
|
97565
97520
|
document.createE\
|
|
97566
|
-
lement('
|
|
97567
|
-
\x09\
|
|
97568
|
-
|
|
97569
|
-
;\x0a\x09\x09\
|
|
97570
|
-
|
|
97571
|
-
|
|
97572
|
-
|
|
97573
|
-
|
|
97574
|
-
|
|
97575
|
-
|
|
97576
|
-
\
|
|
97577
|
-
|
|
97578
|
-
|
|
97579
|
-
|
|
97580
|
-
\
|
|
97581
|
-
|
|
97582
|
-
|
|
97583
|
-
|
|
97584
|
-
|
|
97585
|
-
|
|
97586
|
-
\
|
|
97587
|
-
|
|
97588
|
-
|
|
97589
|
-
|
|
97590
|
-
|
|
97591
|
-
|
|
97592
|
-
|
|
97593
|
-
|
|
97594
|
-
|
|
97595
|
-
|
|
97596
|
-
|
|
97597
|
-
|
|
97598
|
-
|
|
97599
|
-
|
|
97600
|
-
|
|
97601
|
-
|
|
97602
|
-
\x09
|
|
97603
|
-
\
|
|
97604
|
-
|
|
97605
|
-
|
|
97606
|
-
|
|
97607
|
-
|
|
97608
|
-
|
|
97609
|
-
|
|
97610
|
-
|
|
97611
|
-
|
|
97612
|
-
|
|
97613
|
-
|
|
97614
|
-
|
|
97615
|
-
|
|
97616
|
-
|
|
97617
|
-
|
|
97618
|
-
|
|
97619
|
-
|
|
97620
|
-
|
|
97621
|
-
|
|
97622
|
-
|
|
97521
|
+
lement('img');\x0a\x09\
|
|
97522
|
+
\x09\x09img.className \
|
|
97523
|
+
= 'uc-toggle-ico\
|
|
97524
|
+
n';\x0a\x09\x09\x09img.alt =\
|
|
97525
|
+
labels.expand;\x0a\
|
|
97526
|
+
\x09\x09\x09img.src = ico\
|
|
97527
|
+
ns.expand;\x0a\x0a\x09\x09\x09/\
|
|
97528
|
+
/ Provide a sane\
|
|
97529
|
+
default size ev\
|
|
97530
|
+
en if CSS did no\
|
|
97531
|
+
t load yet (CSS \
|
|
97532
|
+
will override wh\
|
|
97533
|
+
en present).\x0a\x09\x09\x09\
|
|
97534
|
+
img.width = 26; \
|
|
97535
|
+
// keep in sync \
|
|
97536
|
+
with CSS fallbac\
|
|
97537
|
+
k var(--uc-toggl\
|
|
97538
|
+
e-icon-size, 26p\
|
|
97539
|
+
x)\x0a\x09\x09\x09img.height\
|
|
97540
|
+
= 26; // ensure\
|
|
97541
|
+
s a consistent, \
|
|
97542
|
+
non-tiny control\
|
|
97543
|
+
from the first \
|
|
97544
|
+
paint\x0a\x0a\x09\x09\x09toggle\
|
|
97545
|
+
.appendChild(img\
|
|
97546
|
+
);\x0a\x0a\x09\x09\x09// Attach\
|
|
97547
|
+
local listeners\
|
|
97548
|
+
(no global hand\
|
|
97549
|
+
ler change; prod\
|
|
97550
|
+
uction-safe).\x0a\x09\x09\
|
|
97551
|
+
\x09toggle.addEvent\
|
|
97552
|
+
Listener('click'\
|
|
97553
|
+
, (ev) => {\x0a\x09\x09\x09\x09\
|
|
97554
|
+
ev.preventDefaul\
|
|
97555
|
+
t();\x0a\x09\x09\x09\x09ev.stop\
|
|
97556
|
+
Propagation();\x0a\x09\
|
|
97557
|
+
\x09\x09\x09this.toggleFr\
|
|
97558
|
+
omToggle(toggle)\
|
|
97559
|
+
;\x0a\x09\x09\x09});\x0a\x09\x09\x09togg\
|
|
97560
|
+
le.addEventListe\
|
|
97561
|
+
ner('keydown', (\
|
|
97562
|
+
ev) => {\x0a\x09\x09\x09\x09if \
|
|
97563
|
+
(ev.key === 'Ent\
|
|
97564
|
+
er' || ev.key ==\
|
|
97565
|
+
= ' ') {\x0a\x09\x09\x09\x09\x09ev\
|
|
97566
|
+
.preventDefault(\
|
|
97567
|
+
);\x0a\x09\x09\x09\x09\x09ev.stopP\
|
|
97568
|
+
ropagation();\x0a\x09\x09\
|
|
97569
|
+
\x09\x09\x09this.toggleFr\
|
|
97570
|
+
omToggle(toggle)\
|
|
97571
|
+
;\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09}, {\x0a\
|
|
97572
|
+
\x09\x09\x09\x09passive: fal\
|
|
97573
|
+
se\x0a\x09\x09\x09});\x0a\x0a\x09\x09\x09ms\
|
|
97574
|
+
g.appendChild(to\
|
|
97575
|
+
ggle);\x0a\x09\x09}\x0a\x0a\x09\x09th\
|
|
97576
|
+
is._processed.ad\
|
|
97577
|
+
d(msg);\x0a\x09\x09msg.da\
|
|
97578
|
+
taset.ucInit = '\
|
|
97579
|
+
1';\x0a\x09\x09return {\x0a\x09\
|
|
97580
|
+
\x09\x09content,\x0a\x09\x09\x09to\
|
|
97581
|
+
ggle\x0a\x09\x09};\x0a\x09}\x0a\x0a\x09/\
|
|
97582
|
+
/ Previously cre\
|
|
97583
|
+
ated an inline \x22\
|
|
97584
|
+
...\x22 indicator; \
|
|
97585
|
+
now acts as a no\
|
|
97586
|
+
-op and cleans l\
|
|
97587
|
+
egacy nodes if p\
|
|
97588
|
+
resent.\x0a\x09_ensure\
|
|
97589
|
+
EllipsisEl(msg, \
|
|
97590
|
+
contentEl) {\x0a\x09\x09c\
|
|
97591
|
+
onst content = c\
|
|
97592
|
+
ontentEl || (msg\
|
|
97623
97593
|
&& msg.querySel\
|
|
97624
97594
|
ector('.uc-conte\
|
|
97625
|
-
nt');\x0a\x09\x09if (!
|
|
97626
|
-
|
|
97627
|
-
|
|
97628
|
-
|
|
97629
|
-
|
|
97630
|
-
|
|
97631
|
-
|
|
97632
|
-
|
|
97633
|
-
|
|
97634
|
-
|
|
97635
|
-
|
|
97636
|
-
|
|
97637
|
-
\
|
|
97638
|
-
|
|
97639
|
-
|
|
97640
|
-
|
|
97641
|
-
|
|
97642
|
-
|
|
97643
|
-
|
|
97644
|
-
|
|
97645
|
-
{\x0a\
|
|
97646
|
-
|
|
97647
|
-
|
|
97648
|
-
|
|
97649
|
-
|
|
97650
|
-
|
|
97651
|
-
|
|
97652
|
-
|
|
97653
|
-
|
|
97654
|
-
\
|
|
97655
|
-
|
|
97656
|
-
|
|
97657
|
-
|
|
97658
|
-
|
|
97659
|
-
|
|
97660
|
-
|
|
97661
|
-
|
|
97662
|
-
|
|
97663
|
-
|
|
97664
|
-
|
|
97665
|
-
|
|
97666
|
-
|
|
97667
|
-
|
|
97668
|
-
|
|
97669
|
-
.msg-
|
|
97670
|
-
|
|
97671
|
-
|
|
97672
|
-
|
|
97673
|
-
|
|
97674
|
-
|
|
97675
|
-
|
|
97676
|
-
|
|
97677
|
-
|
|
97678
|
-
|
|
97679
|
-
|
|
97680
|
-
|
|
97681
|
-
|
|
97682
|
-
|
|
97683
|
-
|
|
97684
|
-
|
|
97685
|
-
|
|
97686
|
-
|
|
97687
|
-
|
|
97688
|
-
|
|
97689
|
-
|
|
97690
|
-
|
|
97691
|
-
|
|
97692
|
-
|
|
97595
|
+
nt'));\x0a\x09\x09if (!co\
|
|
97596
|
+
ntent) return nu\
|
|
97597
|
+
ll;\x0a\x09\x09try {\x0a\x09\x09\x09c\
|
|
97598
|
+
onst legacy = co\
|
|
97599
|
+
ntent.querySelec\
|
|
97600
|
+
tor('.uc-ellipsi\
|
|
97601
|
+
s');\x0a\x09\x09\x09if (lega\
|
|
97602
|
+
cy && legacy.par\
|
|
97603
|
+
entNode) {\x0a\x09\x09\x09\x09l\
|
|
97604
|
+
egacy.parentNode\
|
|
97605
|
+
.removeChild(leg\
|
|
97606
|
+
acy);\x0a\x09\x09\x09}\x0a\x09\x09} c\
|
|
97607
|
+
atch (_) {}\x0a\x09\x09re\
|
|
97608
|
+
turn null;\x0a\x09}\x0a\x0a\x09\
|
|
97609
|
+
// No visual nod\
|
|
97610
|
+
e is needed anym\
|
|
97611
|
+
ore; fade is app\
|
|
97612
|
+
lied via CSS on \
|
|
97613
|
+
.uc-collapsed.\x0a\x09\
|
|
97614
|
+
_showEllipsis(ms\
|
|
97615
|
+
g, contentEl) {\x0a\
|
|
97616
|
+
\x09\x09this._ensureEl\
|
|
97617
|
+
lipsisEl(msg, co\
|
|
97618
|
+
ntentEl);\x0a\x09}\x0a\x0a\x09/\
|
|
97619
|
+
/ No visual node\
|
|
97620
|
+
is needed anymo\
|
|
97621
|
+
re; keep DOM lea\
|
|
97622
|
+
n and clean any \
|
|
97623
|
+
legacy nodes.\x0a\x09_\
|
|
97624
|
+
hideEllipsis(msg\
|
|
97625
|
+
) {\x0a\x09\x09this._ensu\
|
|
97626
|
+
reEllipsisEl(msg\
|
|
97627
|
+
, null);\x0a\x09}\x0a\x0a\x09//\
|
|
97628
|
+
Apply collapse \
|
|
97629
|
+
to all user mess\
|
|
97630
|
+
ages under root.\
|
|
97631
|
+
\x0a\x09apply(root) {\x0a\
|
|
97632
|
+
\x09\x09const scope = \
|
|
97633
|
+
root || document\
|
|
97634
|
+
;\x0a\x09\x09let list;\x0a\x09\x09\
|
|
97635
|
+
if (scope.nodeTy\
|
|
97636
|
+
pe === 1) list =\
|
|
97637
|
+
scope.querySele\
|
|
97638
|
+
ctorAll('.msg-bo\
|
|
97639
|
+
x.msg-user .msg'\
|
|
97640
|
+
);\x0a\x09\x09else list =\
|
|
97641
|
+
document.queryS\
|
|
97642
|
+
electorAll('.msg\
|
|
97643
|
+
-box.msg-user .m\
|
|
97644
|
+
sg');\x0a\x09\x09if (!lis\
|
|
97645
|
+
t || !list.lengt\
|
|
97646
|
+
h) return;\x0a\x0a\x09\x09fo\
|
|
97647
|
+
r (let i = 0; i \
|
|
97648
|
+
< list.length; i\
|
|
97649
|
+
++) {\x0a\x09\x09\x09const m\
|
|
97650
|
+
sg = list[i];\x0a\x09\x09\
|
|
97651
|
+
\x09const st = this\
|
|
97652
|
+
._ensureStructur\
|
|
97653
|
+
e(msg);\x0a\x09\x09\x09if (!\
|
|
97654
|
+
st) continue;\x0a\x09\x09\
|
|
97655
|
+
\x09this._update(ms\
|
|
97656
|
+
g, st.content, s\
|
|
97657
|
+
t.toggle);\x0a\x09\x09}\x0a\x09\
|
|
97658
|
+
}\x0a\x0a\x09// Update co\
|
|
97659
|
+
llapsed/expanded\
|
|
97660
|
+
state depending\
|
|
97661
|
+
on content heig\
|
|
97662
|
+
ht.\x0a\x09_update(msg\
|
|
97663
|
+
, contentEl, tog\
|
|
97664
|
+
gleEl) {\x0a\x09\x09const\
|
|
97665
|
+
c = contentEl |\
|
|
97666
|
+
| (msg && msg.qu\
|
|
97667
|
+
erySelector('.uc\
|
|
97668
|
+
-content'));\x0a\x09\x09i\
|
|
97669
|
+
f (!msg || !c) r\
|
|
97670
|
+
eturn;\x0a\x0a\x09\x09// Spe\
|
|
97671
|
+
cial-case: when \
|
|
97672
|
+
threshold = 0 (o\
|
|
97673
|
+
r '0'), auto-col\
|
|
97674
|
+
lapse is globall\
|
|
97675
|
+
y disabled.\x0a\x09\x09//\
|
|
97676
|
+
We avoid any me\
|
|
97677
|
+
asurement, force\
|
|
97678
|
+
the content to \
|
|
97679
|
+
be fully expande\
|
|
97680
|
+
d, and ensure th\
|
|
97681
|
+
e toggle is hidd\
|
|
97682
|
+
en.\x0a\x09\x09// This pr\
|
|
97683
|
+
eserves public A\
|
|
97684
|
+
PI while providi\
|
|
97685
|
+
ng an explicit o\
|
|
97686
|
+
pt-out, without \
|
|
97687
|
+
impacting existi\
|
|
97688
|
+
ng behavior.\x0a\x09\x09i\
|
|
97689
|
+
f (this.threshol\
|
|
97690
|
+
d === 0 || this.\
|
|
97691
|
+
threshold === '0\
|
|
97692
|
+
') {\x0a\x09\x09\x09const t \
|
|
97693
|
+
= toggleEl || ms\
|
|
97693
97694
|
g.querySelector(\
|
|
97694
|
-
'.uc-
|
|
97695
|
-
\
|
|
97696
|
-
|
|
97697
|
-
|
|
97698
|
-
|
|
97699
|
-
|
|
97700
|
-
|
|
97701
|
-
|
|
97702
|
-
\
|
|
97703
|
-
|
|
97704
|
-
|
|
97705
|
-
|
|
97706
|
-
|
|
97707
|
-
|
|
97708
|
-
|
|
97709
|
-
|
|
97710
|
-
|
|
97711
|
-
|
|
97712
|
-
|
|
97713
|
-
|
|
97714
|
-
|
|
97715
|
-
|
|
97716
|
-
|
|
97717
|
-
his.threshold ==\
|
|
97718
|
-
= '0') {\x0a\x09\x09\x09cons\
|
|
97719
|
-
t t = toggleEl |\
|
|
97720
|
-
| msg.querySelec\
|
|
97721
|
-
tor('.uc-toggle'\
|
|
97722
|
-
);\x0a\x09\x09\x09const labe\
|
|
97723
|
-
ls = this._label\
|
|
97724
|
-
s();\x0a\x0a\x09\x09\x09// Ensu\
|
|
97725
|
-
re expanded stat\
|
|
97726
|
-
e and remove any\
|
|
97727
|
-
limiting classe\
|
|
97728
|
-
s.\x0a\x09\x09\x09c.classLis\
|
|
97729
|
-
t.remove('uc-col\
|
|
97730
|
-
lapsed');\x0a\x09\x09\x09c.c\
|
|
97731
|
-
lassList.remove(\
|
|
97732
|
-
'uc-expanded'); \
|
|
97733
|
-
// No class => f\
|
|
97734
|
-
ully expanded by\
|
|
97735
|
-
default CSS.\x0a\x09\x09\
|
|
97736
|
-
\x09msg.dataset.ucS\
|
|
97737
|
-
tate = 'expanded\
|
|
97738
|
-
';\x0a\x0a\x09\x09\x09// Hide e\
|
|
97739
|
-
llipsis in disab\
|
|
97740
|
-
led mode.\x0a\x09\x09\x09thi\
|
|
97695
|
+
'.uc-toggle');\x0a\x09\
|
|
97696
|
+
\x09\x09const labels =\
|
|
97697
|
+
this._labels();\
|
|
97698
|
+
\x0a\x0a\x09\x09\x09// Ensure e\
|
|
97699
|
+
xpanded state an\
|
|
97700
|
+
d remove any lim\
|
|
97701
|
+
iting classes.\x0a\x09\
|
|
97702
|
+
\x09\x09c.classList.re\
|
|
97703
|
+
move('uc-collaps\
|
|
97704
|
+
ed');\x0a\x09\x09\x09c.class\
|
|
97705
|
+
List.remove('uc-\
|
|
97706
|
+
expanded'); // N\
|
|
97707
|
+
o class => fully\
|
|
97708
|
+
expanded by def\
|
|
97709
|
+
ault CSS.\x0a\x09\x09\x09msg\
|
|
97710
|
+
.dataset.ucState\
|
|
97711
|
+
= 'expanded';\x0a\x0a\
|
|
97712
|
+
\x09\x09\x09// Hide ellip\
|
|
97713
|
+
sis in disabled \
|
|
97714
|
+
mode (no-op, CSS\
|
|
97715
|
+
fade not applie\
|
|
97716
|
+
d without .uc-co\
|
|
97717
|
+
llapsed).\x0a\x09\x09\x09thi\
|
|
97741
97718
|
s._hideEllipsis(\
|
|
97742
97719
|
msg);\x0a\x0a\x09\x09\x09// Hid\
|
|
97743
97720
|
e toggle in disa\
|
|
@@ -97797,178 +97774,180 @@ ssList.add('uc-e\
|
|
|
97797
97774
|
xpanded');\x0a\x09\x09\x09\x09t\
|
|
97798
97775
|
his._hideEllipsi\
|
|
97799
97776
|
s(msg); // Expan\
|
|
97800
|
-
ded =>
|
|
97801
|
-
|
|
97802
|
-
\
|
|
97803
|
-
|
|
97804
|
-
|
|
97805
|
-
|
|
97806
|
-
|
|
97807
|
-
|
|
97808
|
-
|
|
97809
|
-
|
|
97810
|
-
|
|
97811
|
-
|
|
97812
|
-
|
|
97813
|
-
|
|
97814
|
-
|
|
97815
|
-
|
|
97816
|
-
|
|
97817
|
-
|
|
97818
|
-
|
|
97819
|
-
|
|
97820
|
-
|
|
97821
|
-
|
|
97822
|
-
|
|
97823
|
-
|
|
97824
|
-
\x09\x09\
|
|
97825
|
-
|
|
97826
|
-
|
|
97827
|
-
|
|
97828
|
-
\
|
|
97829
|
-
|
|
97830
|
-
|
|
97831
|
-
|
|
97832
|
-
|
|
97833
|
-
|
|
97834
|
-
|
|
97835
|
-
|
|
97836
|
-
|
|
97837
|
-
\
|
|
97838
|
-
|
|
97839
|
-
|
|
97777
|
+
ded => nothing t\
|
|
97778
|
+
o show (CSS fade\
|
|
97779
|
+
applies only to\
|
|
97780
|
+
.uc-collapsed)\x0a\
|
|
97781
|
+
\x09\x09\x09} else {\x0a\x09\x09\x09\x09\
|
|
97782
|
+
c.classList.add(\
|
|
97783
|
+
'uc-collapsed');\
|
|
97784
|
+
\x0a\x09\x09\x09\x09this._showE\
|
|
97785
|
+
llipsis(msg, c);\
|
|
97786
|
+
// Collapsed =>\
|
|
97787
|
+
CSS fade handle\
|
|
97788
|
+
d by stylesheet\x0a\
|
|
97789
|
+
\x09\x09\x09}\x0a\x0a\x09\x09\x09if (t) \
|
|
97790
|
+
{\x0a\x09\x09\x09\x09const img \
|
|
97791
|
+
= t.querySelecto\
|
|
97792
|
+
r('img');\x0a\x09\x09\x09\x09if\
|
|
97793
|
+
(img) {\x0a\x09\x09\x09\x09\x09if\
|
|
97794
|
+
(expand) {\x0a\x09\x09\x09\x09\
|
|
97795
|
+
\x09\x09img.src = icon\
|
|
97796
|
+
s.collapse;\x0a\x09\x09\x09\x09\
|
|
97797
|
+
\x09\x09img.alt = labe\
|
|
97798
|
+
ls.collapse;\x0a\x09\x09\x09\
|
|
97799
|
+
\x09\x09} else {\x0a\x09\x09\x09\x09\x09\
|
|
97800
|
+
\x09img.src = icons\
|
|
97801
|
+
.expand;\x0a\x09\x09\x09\x09\x09\x09i\
|
|
97802
|
+
mg.alt = labels.\
|
|
97803
|
+
expand;\x0a\x09\x09\x09\x09\x09}\x0a\x09\
|
|
97804
|
+
\x09\x09\x09}\x0a\x09\x09\x09\x09t.setAt\
|
|
97805
|
+
tribute('aria-ex\
|
|
97806
|
+
panded', expand \
|
|
97807
|
+
? 'true' : 'fals\
|
|
97808
|
+
e');\x0a\x09\x09\x09\x09t.title\
|
|
97809
|
+
= expand ? labe\
|
|
97810
|
+
ls.collapse : la\
|
|
97811
|
+
bels.expand;\x0a\x09\x09\x09\
|
|
97812
|
+
}\x0a\x09\x09} else {\x0a\x09\x09\x09\
|
|
97813
|
+
// Short content\
|
|
97814
|
+
\xe2\x80\x93 ensure full\
|
|
97815
|
+
y expanded and h\
|
|
97816
|
+
ide toggle + (le\
|
|
97817
|
+
gacy) ellipsis c\
|
|
97818
|
+
leanup.\x0a\x09\x09\x09c.cla\
|
|
97840
97819
|
ssList.remove('u\
|
|
97820
|
+
c-collapsed');\x0a\x09\
|
|
97821
|
+
\x09\x09c.classList.re\
|
|
97822
|
+
move('uc-expande\
|
|
97823
|
+
d');\x0a\x09\x09\x09msg.data\
|
|
97824
|
+
set.ucState = 'e\
|
|
97825
|
+
xpanded';\x0a\x09\x09\x09thi\
|
|
97826
|
+
s._hideEllipsis(\
|
|
97827
|
+
msg);\x0a\x09\x09\x09if (t) \
|
|
97828
|
+
{\x0a\x09\x09\x09\x09t.classLis\
|
|
97829
|
+
t.remove('visibl\
|
|
97830
|
+
e');\x0a\x09\x09\x09\x09t.setAt\
|
|
97831
|
+
tribute('aria-ex\
|
|
97832
|
+
panded', 'false'\
|
|
97833
|
+
);\x0a\x09\x09\x09\x09t.title =\
|
|
97834
|
+
labels.expand;\x0a\
|
|
97835
|
+
\x09\x09\x09}\x0a\x09\x09}\x0a\x09}\x0a\x0a\x09//\
|
|
97836
|
+
Toggle handler \
|
|
97837
|
+
via the toggle e\
|
|
97838
|
+
lement (div.uc-t\
|
|
97839
|
+
oggle).\x0a\x09toggleF\
|
|
97840
|
+
romToggle(toggle\
|
|
97841
|
+
El) {\x0a\x09\x09const ms\
|
|
97842
|
+
g = toggleEl && \
|
|
97843
|
+
toggleEl.closest\
|
|
97844
|
+
? toggleEl.clos\
|
|
97845
|
+
est('.msg-box.ms\
|
|
97846
|
+
g-user .msg') : \
|
|
97847
|
+
null;\x0a\x09\x09if (!msg\
|
|
97848
|
+
) return;\x0a\x09\x09this\
|
|
97849
|
+
.toggle(msg);\x0a\x09}\
|
|
97850
|
+
\x0a\x0a\x09// Core toggl\
|
|
97851
|
+
e logic.\x0a\x09toggle\
|
|
97852
|
+
(msg) {\x0a\x09\x09if (!m\
|
|
97853
|
+
sg || !msg.isCon\
|
|
97854
|
+
nected) return;\x0a\
|
|
97855
|
+
\x09\x09const c = msg.\
|
|
97856
|
+
querySelector('.\
|
|
97857
|
+
uc-content');\x0a\x09\x09\
|
|
97858
|
+
if (!c) return;\x0a\
|
|
97859
|
+
\x09\x09const t = msg.\
|
|
97860
|
+
querySelector('.\
|
|
97861
|
+
uc-toggle');\x0a\x09\x09c\
|
|
97862
|
+
onst labels = th\
|
|
97863
|
+
is._labels();\x0a\x09\x09\
|
|
97864
|
+
const icons = th\
|
|
97865
|
+
is._icons();\x0a\x0a\x09\x09\
|
|
97866
|
+
const isCollapse\
|
|
97867
|
+
d = c.classList.\
|
|
97868
|
+
contains('uc-col\
|
|
97869
|
+
lapsed');\x0a\x09\x09if (\
|
|
97870
|
+
isCollapsed) {\x0a\x09\
|
|
97871
|
+
\x09\x09// Expand \xe2\x80\x93 \
|
|
97872
|
+
leave scroll as-\
|
|
97873
|
+
is.\x0a\x09\x09\x09c.classLi\
|
|
97874
|
+
st.remove('uc-co\
|
|
97875
|
+
llapsed');\x0a\x09\x09\x09c.\
|
|
97876
|
+
classList.add('u\
|
|
97841
97877
|
c-expanded');\x0a\x09\x09\
|
|
97842
97878
|
\x09msg.dataset.ucS\
|
|
97843
97879
|
tate = 'expanded\
|
|
97844
97880
|
';\x0a\x09\x09\x09this._hide\
|
|
97845
97881
|
Ellipsis(msg);\x0a\x09\
|
|
97846
97882
|
\x09\x09if (t) {\x0a\x09\x09\x09\x09t\
|
|
97847
|
-
.
|
|
97848
|
-
|
|
97849
|
-
\x09\x09t.
|
|
97850
|
-
|
|
97851
|
-
|
|
97852
|
-
t.title = labels\
|
|
97853
|
-
.expand;\x0a\x09\x09\x09}\x0a\x09\x09\
|
|
97854
|
-
}\x0a\x09}\x0a\x0a\x09// Toggle\
|
|
97855
|
-
handler via the\
|
|
97856
|
-
toggle element \
|
|
97857
|
-
(div.uc-toggle).\
|
|
97858
|
-
\x0a\x09toggleFromTogg\
|
|
97859
|
-
le(toggleEl) {\x0a\x09\
|
|
97860
|
-
\x09const msg = tog\
|
|
97861
|
-
gleEl && toggleE\
|
|
97862
|
-
l.closest ? togg\
|
|
97863
|
-
leEl.closest('.m\
|
|
97864
|
-
sg-box.msg-user \
|
|
97865
|
-
.msg') : null;\x0a\x09\
|
|
97866
|
-
\x09if (!msg) retur\
|
|
97867
|
-
n;\x0a\x09\x09this.toggle\
|
|
97868
|
-
(msg);\x0a\x09}\x0a\x0a\x09// C\
|
|
97869
|
-
ore toggle logic\
|
|
97870
|
-
.\x0a\x09toggle(msg) {\
|
|
97871
|
-
\x0a\x09\x09if (!msg || !\
|
|
97872
|
-
msg.isConnected)\
|
|
97873
|
-
return;\x0a\x09\x09const\
|
|
97874
|
-
c = msg.querySe\
|
|
97875
|
-
lector('.uc-cont\
|
|
97876
|
-
ent');\x0a\x09\x09if (!c)\
|
|
97877
|
-
return;\x0a\x09\x09const\
|
|
97878
|
-
t = msg.querySe\
|
|
97879
|
-
lector('.uc-togg\
|
|
97880
|
-
le');\x0a\x09\x09const la\
|
|
97881
|
-
bels = this._lab\
|
|
97882
|
-
els();\x0a\x09\x09const i\
|
|
97883
|
-
cons = this._ico\
|
|
97884
|
-
ns();\x0a\x0a\x09\x09const i\
|
|
97885
|
-
sCollapsed = c.c\
|
|
97886
|
-
lassList.contain\
|
|
97887
|
-
s('uc-collapsed'\
|
|
97888
|
-
);\x0a\x09\x09if (isColla\
|
|
97889
|
-
psed) {\x0a\x09\x09\x09// Ex\
|
|
97890
|
-
pand \xe2\x80\x93 leave s\
|
|
97891
|
-
croll as-is; rem\
|
|
97892
|
-
ove ellipsis.\x0a\x09\x09\
|
|
97893
|
-
\x09c.classList.rem\
|
|
97894
|
-
ove('uc-collapse\
|
|
97895
|
-
d');\x0a\x09\x09\x09c.classL\
|
|
97896
|
-
ist.add('uc-expa\
|
|
97897
|
-
nded');\x0a\x09\x09\x09msg.d\
|
|
97898
|
-
ataset.ucState =\
|
|
97899
|
-
'expanded';\x0a\x09\x09\x09\
|
|
97900
|
-
this._hideEllips\
|
|
97901
|
-
is(msg);\x0a\x09\x09\x09if (\
|
|
97902
|
-
t) {\x0a\x09\x09\x09\x09t.setAt\
|
|
97903
|
-
tribute('aria-ex\
|
|
97904
|
-
panded', 'true')\
|
|
97905
|
-
;\x0a\x09\x09\x09\x09t.title = \
|
|
97906
|
-
labels.collapse;\
|
|
97907
|
-
\x0a\x09\x09\x09\x09const img =\
|
|
97908
|
-
t.querySelector\
|
|
97909
|
-
('img');\x0a\x09\x09\x09\x09if \
|
|
97910
|
-
(img) {\x0a\x09\x09\x09\x09\x09img\
|
|
97911
|
-
.src = icons.col\
|
|
97912
|
-
lapse;\x0a\x09\x09\x09\x09\x09img.\
|
|
97913
|
-
alt = labels.col\
|
|
97914
|
-
lapse;\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\
|
|
97915
|
-
}\x0a\x09\x09} else {\x0a\x09\x09\x09\
|
|
97916
|
-
// Collapse \xe2\x80\x93 \
|
|
97917
|
-
apply classes, s\
|
|
97918
|
-
how ellipsis, th\
|
|
97919
|
-
en bring toggle \
|
|
97920
|
-
into view (scrol\
|
|
97921
|
-
l up if needed).\
|
|
97922
|
-
\x0a\x09\x09\x09c.classList.\
|
|
97923
|
-
remove('uc-expan\
|
|
97924
|
-
ded');\x0a\x09\x09\x09c.clas\
|
|
97925
|
-
sList.add('uc-co\
|
|
97926
|
-
llapsed');\x0a\x09\x09\x09ms\
|
|
97927
|
-
g.dataset.ucStat\
|
|
97928
|
-
e = 'collapsed';\
|
|
97929
|
-
\x0a\x09\x09\x09this._showEl\
|
|
97930
|
-
lipsis(msg, c);\x0a\
|
|
97931
|
-
\x09\x09\x09if (t) {\x0a\x09\x09\x09\x09\
|
|
97932
|
-
t.setAttribute('\
|
|
97933
|
-
aria-expanded', \
|
|
97934
|
-
'false');\x0a\x09\x09\x09\x09t.\
|
|
97935
|
-
title = labels.e\
|
|
97936
|
-
xpand;\x0a\x09\x09\x09\x09const\
|
|
97883
|
+
.setAttribute('a\
|
|
97884
|
+
ria-expanded', '\
|
|
97885
|
+
true');\x0a\x09\x09\x09\x09t.ti\
|
|
97886
|
+
tle = labels.col\
|
|
97887
|
+
lapse;\x0a\x09\x09\x09\x09const\
|
|
97937
97888
|
img = t.querySe\
|
|
97938
97889
|
lector('img');\x0a\x09\
|
|
97939
97890
|
\x09\x09\x09if (img) {\x0a\x09\x09\
|
|
97940
97891
|
\x09\x09\x09img.src = ico\
|
|
97941
|
-
ns.
|
|
97942
|
-
|
|
97943
|
-
.
|
|
97944
|
-
\x09\x09\x09
|
|
97945
|
-
|
|
97946
|
-
|
|
97947
|
-
|
|
97948
|
-
|
|
97949
|
-
|
|
97950
|
-
|
|
97951
|
-
\
|
|
97952
|
-
|
|
97953
|
-
|
|
97954
|
-
|
|
97955
|
-
|
|
97956
|
-
|
|
97957
|
-
\x09\
|
|
97958
|
-
|
|
97959
|
-
|
|
97960
|
-
\x0a\x09\
|
|
97961
|
-
|
|
97962
|
-
|
|
97963
|
-
|
|
97964
|
-
|
|
97965
|
-
|
|
97966
|
-
|
|
97967
|
-
|
|
97968
|
-
|
|
97969
|
-
|
|
97970
|
-
|
|
97971
|
-
|
|
97892
|
+
ns.collapse;\x0a\x09\x09\x09\
|
|
97893
|
+
\x09\x09img.alt = labe\
|
|
97894
|
+
ls.collapse;\x0a\x09\x09\x09\
|
|
97895
|
+
\x09}\x0a\x09\x09\x09}\x0a\x09\x09} else\
|
|
97896
|
+
{\x0a\x09\x09\x09// Collaps\
|
|
97897
|
+
e \xe2\x80\x93 apply clas\
|
|
97898
|
+
ses, then bring \
|
|
97899
|
+
toggle into view\
|
|
97900
|
+
(scroll up if n\
|
|
97901
|
+
eeded).\x0a\x09\x09\x09c.cla\
|
|
97902
|
+
ssList.remove('u\
|
|
97903
|
+
c-expanded');\x0a\x09\x09\
|
|
97904
|
+
\x09c.classList.add\
|
|
97905
|
+
('uc-collapsed')\
|
|
97906
|
+
;\x0a\x09\x09\x09msg.dataset\
|
|
97907
|
+
.ucState = 'coll\
|
|
97908
|
+
apsed';\x0a\x09\x09\x09this.\
|
|
97909
|
+
_showEllipsis(ms\
|
|
97910
|
+
g, c);\x0a\x09\x09\x09if (t)\
|
|
97911
|
+
{\x0a\x09\x09\x09\x09t.setAttr\
|
|
97912
|
+
ibute('aria-expa\
|
|
97913
|
+
nded', 'false');\
|
|
97914
|
+
\x0a\x09\x09\x09\x09t.title = l\
|
|
97915
|
+
abels.expand;\x0a\x09\x09\
|
|
97916
|
+
\x09\x09const img = t.\
|
|
97917
|
+
querySelector('i\
|
|
97918
|
+
mg');\x0a\x09\x09\x09\x09if (im\
|
|
97919
|
+
g) {\x0a\x09\x09\x09\x09\x09img.sr\
|
|
97920
|
+
c = icons.expand\
|
|
97921
|
+
;\x0a\x09\x09\x09\x09\x09img.alt =\
|
|
97922
|
+
labels.expand;\x0a\
|
|
97923
|
+
\x09\x09\x09\x09}\x0a\x09\x09\x09\x09// Fol\
|
|
97924
|
+
low the collapsi\
|
|
97925
|
+
ng content upwar\
|
|
97926
|
+
d \xe2\x80\x93 keep the t\
|
|
97927
|
+
oggle visible.\x0a\x09\
|
|
97928
|
+
\x09\x09\x09this._scrollT\
|
|
97929
|
+
oggleIntoView(t)\
|
|
97930
|
+
;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09}\x0a\x0a\x09\
|
|
97931
|
+
// Optional publ\
|
|
97932
|
+
ic method to re-\
|
|
97933
|
+
evaluate height \
|
|
97934
|
+
after layout/res\
|
|
97935
|
+
ize.\x0a\x09remeasureA\
|
|
97936
|
+
ll() {\x0a\x09\x09const a\
|
|
97937
|
+
rr = Array.from(\
|
|
97938
|
+
this._processed \
|
|
97939
|
+
|| []);\x0a\x09\x09for (l\
|
|
97940
|
+
et i = 0; i < ar\
|
|
97941
|
+
r.length; i++) {\
|
|
97942
|
+
\x0a\x09\x09\x09const msg = \
|
|
97943
|
+
arr[i];\x0a\x09\x09\x09if (!\
|
|
97944
|
+
msg || !msg.isCo\
|
|
97945
|
+
nnected) {\x0a\x09\x09\x09\x09t\
|
|
97946
|
+
his._processed.d\
|
|
97947
|
+
elete(msg);\x0a\x09\x09\x09\x09\
|
|
97948
|
+
continue;\x0a\x09\x09\x09}\x0a\x09\
|
|
97949
|
+
\x09\x09this._update(m\
|
|
97950
|
+
sg);\x0a\x09\x09}\x0a\x09}\x0a}\
|
|
97972
97951
|
\x00\x00\x1a\xdb\
|
|
97973
97952
|
/\
|
|
97974
97953
|
/ ==============\
|
|
@@ -113545,11 +113524,11 @@ r,r.macros=r.mac\
|
|
|
113545
113524
|
ros||{},d(e,r)}}\
|
|
113546
113525
|
(),i=i.default}(\
|
|
113547
113526
|
)}));\
|
|
113548
|
-
\x00\x03
|
|
113527
|
+
\x00\x03?\xc4\
|
|
113549
113528
|
/\
|
|
113550
113529
|
* app.min.js \xe2\x80\x94\
|
|
113551
113530
|
generated on 20\
|
|
113552
|
-
25-09-
|
|
113531
|
+
25-09-28 09:12:3\
|
|
113553
113532
|
3 by bin/minify_\
|
|
113554
113533
|
js.py using rjsm\
|
|
113555
113534
|
in */\x0a\x0a/* data/j\
|
|
@@ -125333,199 +125312,230 @@ ow: visible; }',\
|
|
|
125333
125312
|
'.msg-box.msg-us\
|
|
125334
125313
|
er .msg > .uc-co\
|
|
125335
125314
|
ntent.uc-collaps\
|
|
125336
|
-
ed {
|
|
125337
|
-
|
|
125338
|
-
|
|
125339
|
-
|
|
125340
|
-
|
|
125341
|
-
|
|
125342
|
-
|
|
125343
|
-
|
|
125344
|
-
|
|
125345
|
-
|
|
125346
|
-
|
|
125347
|
-
|
|
125348
|
-
|
|
125349
|
-
|
|
125350
|
-
|
|
125351
|
-
|
|
125352
|
-
|
|
125353
|
-
|
|
125354
|
-
|
|
125355
|
-
|
|
125356
|
-
|
|
125357
|
-
|
|
125358
|
-
|
|
125359
|
-
|
|
125360
|
-
'
|
|
125361
|
-
|
|
125362
|
-
|
|
125363
|
-
|
|
125364
|
-
'.
|
|
125365
|
-
|
|
125366
|
-
|
|
125367
|
-
|
|
125368
|
-
|
|
125369
|
-
|
|
125370
|
-
|
|
125371
|
-
|
|
125372
|
-
ne; transition: \
|
|
125373
|
-
opacity .15s eas\
|
|
125374
|
-
e, transform .15\
|
|
125375
|
-
s ease, backgrou\
|
|
125376
|
-
nd-color .15s ea\
|
|
125377
|
-
se, border-color\
|
|
125378
|
-
.15s ease;',' \
|
|
125379
|
-
border-radius: 6\
|
|
125380
|
-
px; padding: 4px\
|
|
125381
|
-
; line-height: 0\
|
|
125382
|
-
; border: 1px so\
|
|
125383
|
-
lid transparent;\
|
|
125384
|
-
background: tra\
|
|
125385
|
-
nsparent; }','.m\
|
|
125386
|
-
sg-box.msg-user \
|
|
125387
|
-
.msg:hover .msg-\
|
|
125388
|
-
copy-btn, .msg-b\
|
|
125315
|
+
ed {',' max-hei\
|
|
125316
|
+
ght: var(--user-\
|
|
125317
|
+
msg-collapse-max\
|
|
125318
|
+
-h, 1000px);',' \
|
|
125319
|
+
overflow: hidde\
|
|
125320
|
+
n;',' -webkit-m\
|
|
125321
|
+
ask-image: linea\
|
|
125322
|
+
r-gradient(to bo\
|
|
125323
|
+
ttom, rgba(0,0,0\
|
|
125324
|
+
,1) calc(100% - \
|
|
125325
|
+
var(--uc-fade-he\
|
|
125326
|
+
ight, 64px)), rg\
|
|
125327
|
+
ba(0,0,0,0) 100%\
|
|
125328
|
+
);',' mask-imag\
|
|
125329
|
+
e: linear-gradie\
|
|
125330
|
+
nt(to bottom, rg\
|
|
125331
|
+
ba(0,0,0,1) calc\
|
|
125332
|
+
(100% - var(--uc\
|
|
125333
|
+
-fade-height, 64\
|
|
125334
|
+
px)), rgba(0,0,0\
|
|
125335
|
+
,0) 100%);',' -\
|
|
125336
|
+
webkit-mask-size\
|
|
125337
|
+
: 100% 100%;',' \
|
|
125338
|
+
mask-size: 100%\
|
|
125339
|
+
100%;',' -webk\
|
|
125340
|
+
it-mask-repeat: \
|
|
125341
|
+
no-repeat;',' m\
|
|
125342
|
+
ask-repeat: no-r\
|
|
125343
|
+
epeat;','}','.ms\
|
|
125344
|
+
g-box.msg-user .\
|
|
125345
|
+
msg > .uc-conten\
|
|
125346
|
+
t.uc-expanded {'\
|
|
125347
|
+
,' -webkit-mask\
|
|
125348
|
+
-image: none;','\
|
|
125349
|
+
mask-image: no\
|
|
125350
|
+
ne;','}','.msg-b\
|
|
125389
125351
|
ox.msg-user .msg\
|
|
125390
|
-
|
|
125391
|
-
|
|
125392
|
-
|
|
125393
|
-
|
|
125394
|
-
|
|
125395
|
-
-
|
|
125396
|
-
|
|
125397
|
-
|
|
125398
|
-
|
|
125399
|
-
|
|
125400
|
-
|
|
125401
|
-
|
|
125402
|
-
|
|
125403
|
-
|
|
125404
|
-
|
|
125405
|
-
|
|
125406
|
-
|
|
125407
|
-
|
|
125408
|
-
|
|
125409
|
-
|
|
125410
|
-
|
|
125411
|
-
|
|
125412
|
-
|
|
125413
|
-
|
|
125414
|
-
|
|
125415
|
-
|
|
125416
|
-
|
|
125417
|
-
|
|
125418
|
-
|
|
125419
|
-
,'
|
|
125420
|
-
|
|
125421
|
-
|
|
125422
|
-
|
|
125423
|
-
|
|
125424
|
-
|
|
125425
|
-
e-
|
|
125426
|
-
|
|
125427
|
-
|
|
125428
|
-
,'
|
|
125429
|
-
|
|
125430
|
-
|
|
125431
|
-
|
|
125432
|
-
|
|
125433
|
-
|
|
125434
|
-
|
|
125435
|
-
|
|
125436
|
-
|
|
125437
|
-
|
|
125438
|
-
|
|
125439
|
-
|
|
125440
|
-
|
|
125441
|
-
|
|
125442
|
-
|
|
125443
|
-
|
|
125444
|
-
|
|
125352
|
+
> .uc-toggle { \
|
|
125353
|
+
display: none; m\
|
|
125354
|
+
argin-top: 8px; \
|
|
125355
|
+
text-align: cent\
|
|
125356
|
+
er; cursor: poin\
|
|
125357
|
+
ter; user-select\
|
|
125358
|
+
: none; }','.msg\
|
|
125359
|
+
-box.msg-user .m\
|
|
125360
|
+
sg > .uc-toggle.\
|
|
125361
|
+
visible { displa\
|
|
125362
|
+
y: block; }','.m\
|
|
125363
|
+
sg-box.msg-user \
|
|
125364
|
+
.msg > .uc-toggl\
|
|
125365
|
+
e img { width: v\
|
|
125366
|
+
ar(--uc-toggle-i\
|
|
125367
|
+
con-size, 26px);\
|
|
125368
|
+
height: var(--u\
|
|
125369
|
+
c-toggle-icon-si\
|
|
125370
|
+
ze, 26px); opaci\
|
|
125371
|
+
ty: .8; }','.msg\
|
|
125372
|
+
-box.msg-user .m\
|
|
125373
|
+
sg > .uc-toggle:\
|
|
125374
|
+
hover img { opac\
|
|
125375
|
+
ity: 1; }','.msg\
|
|
125376
|
+
-box.msg-user .m\
|
|
125377
|
+
sg .msg-copy-btn\
|
|
125378
|
+
{ position: abs\
|
|
125379
|
+
olute; top: 2px;\
|
|
125380
|
+
right: 0px; z-i\
|
|
125381
|
+
ndex: 3;',' opa\
|
|
125382
|
+
city: 0; pointer\
|
|
125383
|
+
-events: none; t\
|
|
125384
|
+
ransition: opaci\
|
|
125385
|
+
ty .15s ease, tr\
|
|
125386
|
+
ansform .15s eas\
|
|
125387
|
+
e, background-co\
|
|
125388
|
+
lor .15s ease, b\
|
|
125389
|
+
order-color .15s\
|
|
125390
|
+
ease;',' borde\
|
|
125391
|
+
r-radius: 6px; p\
|
|
125392
|
+
adding: 4px; lin\
|
|
125393
|
+
e-height: 0; bor\
|
|
125394
|
+
der: 1px solid t\
|
|
125395
|
+
ransparent; back\
|
|
125396
|
+
ground: transpar\
|
|
125397
|
+
ent; }','.msg-bo\
|
|
125398
|
+
x.msg-user .msg:\
|
|
125399
|
+
hover .msg-copy-\
|
|
125400
|
+
btn, .msg-box.ms\
|
|
125401
|
+
g-user .msg:focu\
|
|
125402
|
+
s-within .msg-co\
|
|
125403
|
+
py-btn { opacity\
|
|
125404
|
+
: 1; pointer-eve\
|
|
125405
|
+
nts: auto; }','.\
|
|
125406
|
+
msg-box.msg-user\
|
|
125407
|
+
.msg .msg-copy-\
|
|
125408
|
+
btn:hover { tran\
|
|
125409
|
+
sform: scale(1.0\
|
|
125410
|
+
6); background: \
|
|
125411
|
+
var(--copy-btn-b\
|
|
125412
|
+
g-hover, rgba(0,\
|
|
125413
|
+
0,0,.86)); borde\
|
|
125414
|
+
r-color: var(--c\
|
|
125415
|
+
opy-btn-border, \
|
|
125416
|
+
rgba(0,0,0,.08))\
|
|
125417
|
+
; }','.msg-box.m\
|
|
125418
|
+
sg-user .msg .ms\
|
|
125419
|
+
g-copy-btn.copie\
|
|
125420
|
+
d { background: \
|
|
125421
|
+
var(--copy-btn-b\
|
|
125422
|
+
g-copied, rgba(1\
|
|
125423
|
+
50,150,150,.12))\
|
|
125424
|
+
; border-color: \
|
|
125425
|
+
var(--copy-btn-b\
|
|
125426
|
+
order-copied, rg\
|
|
125427
|
+
ba(150,150,150,.\
|
|
125428
|
+
35)); animation:\
|
|
125429
|
+
msg-copy-pop .2\
|
|
125430
|
+
5s ease; }','.ms\
|
|
125431
|
+
g-box.msg-user .\
|
|
125432
|
+
msg .msg-copy-bt\
|
|
125433
|
+
n img { display:\
|
|
125434
|
+
block; width: 1\
|
|
125435
|
+
8px; height: 18p\
|
|
125436
|
+
x; }','.code-wra\
|
|
125437
|
+
pper .code-heade\
|
|
125438
|
+
r-action.code-he\
|
|
125439
|
+
ader-copy,','.co\
|
|
125440
|
+
de-wrapper .code\
|
|
125441
|
+
-header-action.c\
|
|
125442
|
+
ode-header-colla\
|
|
125443
|
+
pse { display: i\
|
|
125444
|
+
nline-flex; alig\
|
|
125445
|
+
n-items: center;\
|
|
125446
|
+
border-radius: \
|
|
125447
|
+
6px; padding: 2p\
|
|
125448
|
+
x; line-height: \
|
|
125449
|
+
0; border: 1px s\
|
|
125450
|
+
olid transparent\
|
|
125451
|
+
; transition: tr\
|
|
125452
|
+
ansform .15s eas\
|
|
125453
|
+
e, background-co\
|
|
125454
|
+
lor .15s ease, b\
|
|
125455
|
+
order-color .15s\
|
|
125456
|
+
ease; }','.code\
|
|
125457
|
+
-wrapper .code-h\
|
|
125458
|
+
eader-action.cod\
|
|
125459
|
+
e-header-copy:ho\
|
|
125460
|
+
ver,','.code-wra\
|
|
125461
|
+
pper .code-heade\
|
|
125462
|
+
r-action.code-he\
|
|
125463
|
+
ader-collapse:ho\
|
|
125464
|
+
ver { transform:\
|
|
125465
|
+
scale(1.06); ba\
|
|
125466
|
+
ckground: var(--\
|
|
125467
|
+
copy-btn-bg-hove\
|
|
125468
|
+
r, rgba(0,0,0,.7\
|
|
125469
|
+
6)); border-colo\
|
|
125470
|
+
r: var(--copy-bt\
|
|
125471
|
+
n-border, rgba(0\
|
|
125472
|
+
,0,0,.08)); }','\
|
|
125445
125473
|
.code-wrapper .c\
|
|
125446
125474
|
ode-header-actio\
|
|
125447
|
-
n.
|
|
125448
|
-
|
|
125449
|
-
|
|
125450
|
-
|
|
125451
|
-
|
|
125452
|
-
|
|
125453
|
-
|
|
125454
|
-
|
|
125455
|
-
|
|
125456
|
-
-
|
|
125457
|
-
|
|
125458
|
-
|
|
125459
|
-
|
|
125460
|
-
gba(0,0,0,.08));\
|
|
125461
|
-
}','.code-wrapp\
|
|
125462
|
-
er .code-header-\
|
|
125463
|
-
action.copied { \
|
|
125464
|
-
background: var(\
|
|
125465
|
-
--copy-btn-bg-co\
|
|
125466
|
-
pied, rgba(150,1\
|
|
125467
|
-
50,150,.12)); bo\
|
|
125468
|
-
rder-color: var(\
|
|
125469
|
-
--copy-btn-borde\
|
|
125470
|
-
r-copied, rgba(1\
|
|
125471
|
-
50,150,150,.35))\
|
|
125472
|
-
; animation: msg\
|
|
125473
|
-
-copy-pop .25s e\
|
|
125474
|
-
ase; }','@keyfra\
|
|
125475
|
-
mes msg-copy-pop\
|
|
125476
|
-
{ 0%{ transform\
|
|
125477
|
-
: scale(1); } 60\
|
|
125478
|
-
%{ transform: sc\
|
|
125479
|
-
ale(1.1); } 100%\
|
|
125475
|
+
n.copied { backg\
|
|
125476
|
+
round: var(--cop\
|
|
125477
|
+
y-btn-bg-copied,\
|
|
125478
|
+
rgba(150,150,15\
|
|
125479
|
+
0,.12)); border-\
|
|
125480
|
+
color: var(--cop\
|
|
125481
|
+
y-btn-border-cop\
|
|
125482
|
+
ied, rgba(150,15\
|
|
125483
|
+
0,150,.35)); ani\
|
|
125484
|
+
mation: msg-copy\
|
|
125485
|
+
-pop .25s ease; \
|
|
125486
|
+
}','@keyframes m\
|
|
125487
|
+
sg-copy-pop { 0%\
|
|
125480
125488
|
{ transform: sca\
|
|
125481
|
-
le(1); }
|
|
125482
|
-
|
|
125483
|
-
.
|
|
125484
|
-
|
|
125485
|
-
|
|
125486
|
-
|
|
125487
|
-
|
|
125488
|
-
|
|
125489
|
-
|
|
125490
|
-
|
|
125491
|
-
|
|
125492
|
-
|
|
125493
|
-
|
|
125494
|
-
(
|
|
125495
|
-
|
|
125489
|
+
le(1); } 60%{ tr\
|
|
125490
|
+
ansform: scale(1\
|
|
125491
|
+
.1); } 100%{ tra\
|
|
125492
|
+
nsform: scale(1)\
|
|
125493
|
+
; } }'].join('\x5cn\
|
|
125494
|
+
');document.head\
|
|
125495
|
+
.appendChild(sty\
|
|
125496
|
+
le);}\x0aenableEdit\
|
|
125497
|
+
Icons(){document\
|
|
125498
|
+
.body&&document.\
|
|
125499
|
+
body.classList.a\
|
|
125500
|
+
dd('display-edit\
|
|
125501
|
+
-icons');}\x0adisab\
|
|
125502
|
+
leEditIcons(){do\
|
|
125503
|
+
cument.body&&doc\
|
|
125504
|
+
ument.body.class\
|
|
125505
|
+
List.remove('dis\
|
|
125506
|
+
play-edit-icons'\
|
|
125507
|
+
);}\x0aenableTimest\
|
|
125508
|
+
amp(){document.b\
|
|
125509
|
+
ody&&document.bo\
|
|
125510
|
+
dy.classList.add\
|
|
125511
|
+
('display-timest\
|
|
125512
|
+
amp');}\x0adisableT\
|
|
125496
125513
|
imestamp(){docum\
|
|
125497
125514
|
ent.body&&docume\
|
|
125498
125515
|
nt.body.classLis\
|
|
125499
|
-
t.
|
|
125500
|
-
|
|
125501
|
-
|
|
125502
|
-
|
|
125503
|
-
|
|
125504
|
-
|
|
125505
|
-
|
|
125506
|
-
|
|
125507
|
-
|
|
125508
|
-
|
|
125509
|
-
.
|
|
125510
|
-
|
|
125511
|
-
|
|
125512
|
-
|
|
125513
|
-
|
|
125514
|
-
|
|
125515
|
-
(
|
|
125516
|
-
|
|
125517
|
-
|
|
125518
|
-
|
|
125519
|
-
|
|
125520
|
-
|
|
125521
|
-
|
|
125522
|
-
is.threshold=Uti\
|
|
125523
|
-
ls.g('USER_MSG_C\
|
|
125524
|
-
OLLAPSE_HEIGHT_P\
|
|
125525
|
-
X',1000);this._p\
|
|
125526
|
-
rocessed=new Set\
|
|
125527
|
-
();this.ellipsis\
|
|
125528
|
-
Text=' [...]';}\x0a\
|
|
125516
|
+
t.remove('displa\
|
|
125517
|
+
y-timestamp');}\x0a\
|
|
125518
|
+
enableBlocks(){d\
|
|
125519
|
+
ocument.body&&do\
|
|
125520
|
+
cument.body.clas\
|
|
125521
|
+
sList.add('displ\
|
|
125522
|
+
ay-blocks');}\x0adi\
|
|
125523
|
+
sableBlocks(){do\
|
|
125524
|
+
cument.body&&doc\
|
|
125525
|
+
ument.body.class\
|
|
125526
|
+
List.remove('dis\
|
|
125527
|
+
play-blocks');}}\
|
|
125528
|
+
;\x0a\x0a/* data/js/ap\
|
|
125529
|
+
p/user.js */\x0acla\
|
|
125530
|
+
ss UserCollapseM\
|
|
125531
|
+
anager{construct\
|
|
125532
|
+
or(cfg){this.cfg\
|
|
125533
|
+
=cfg||{};this.th\
|
|
125534
|
+
reshold=Utils.g(\
|
|
125535
|
+
'USER_MSG_COLLAP\
|
|
125536
|
+
SE_HEIGHT_PX',10\
|
|
125537
|
+
00);this._proces\
|
|
125538
|
+
sed=new Set();}\x0a\
|
|
125529
125539
|
_icons(){const I\
|
|
125530
125540
|
=(this.cfg&&this\
|
|
125531
125541
|
.cfg.ICONS)||{};\
|
|
@@ -125668,894 +125678,384 @@ ent=contentEl||(\
|
|
|
125668
125678
|
msg&&msg.querySe\
|
|
125669
125679
|
lector('.uc-cont\
|
|
125670
125680
|
ent'));if(!conte\
|
|
125671
|
-
nt)return null;
|
|
125672
|
-
|
|
125673
|
-
|
|
125674
|
-
|
|
125675
|
-
|
|
125676
|
-
|
|
125677
|
-
|
|
125678
|
-
|
|
125679
|
-
|
|
125680
|
-
|
|
125681
|
-
|
|
125682
|
-
|
|
125683
|
-
|
|
125684
|
-
|
|
125685
|
-
|
|
125686
|
-
|
|
125687
|
-
.
|
|
125688
|
-
|
|
125689
|
-
|
|
125690
|
-
|
|
125691
|
-
|
|
125692
|
-
|
|
125693
|
-
|
|
125694
|
-
|
|
125695
|
-
|
|
125696
|
-
'
|
|
125697
|
-
|
|
125698
|
-
|
|
125699
|
-
|
|
125700
|
-
|
|
125701
|
-
|
|
125702
|
-
|
|
125703
|
-
|
|
125704
|
-
|
|
125705
|
-
|
|
125706
|
-
|
|
125707
|
-
|
|
125708
|
-
|
|
125709
|
-
st
|
|
125710
|
-
|
|
125711
|
-
|
|
125712
|
-
|
|
125713
|
-
|
|
125714
|
-
|
|
125715
|
-
|
|
125716
|
-
|
|
125717
|
-
|
|
125718
|
-
|
|
125719
|
-
|
|
125720
|
-
|
|
125721
|
-
|
|
125722
|
-
|
|
125723
|
-
|
|
125724
|
-
e)
|
|
125725
|
-
|
|
125726
|
-
|
|
125727
|
-
|
|
125728
|
-
|
|
125729
|
-
|
|
125730
|
-
|
|
125731
|
-
|
|
125732
|
-
|
|
125733
|
-
|
|
125734
|
-
|
|
125735
|
-
|
|
125736
|
-
|
|
125737
|
-
|
|
125738
|
-
|
|
125739
|
-
|
|
125740
|
-
|
|
125741
|
-
|
|
125742
|
-
|
|
125743
|
-
|
|
125744
|
-
|
|
125745
|
-
');if(!list||!li\
|
|
125746
|
-
st.length)return\
|
|
125747
|
-
;for(let i=0;i<l\
|
|
125748
|
-
ist.length;i++){\
|
|
125749
|
-
const msg=list[i\
|
|
125750
|
-
];const st=this.\
|
|
125751
|
-
_ensureStructure\
|
|
125752
|
-
(msg);if(!st)con\
|
|
125753
|
-
tinue;this._upda\
|
|
125754
|
-
te(msg,st.conten\
|
|
125755
|
-
t,st.toggle);}}\x0a\
|
|
125756
|
-
_update(msg,cont\
|
|
125757
|
-
entEl,toggleEl){\
|
|
125758
|
-
const c=contentE\
|
|
125759
|
-
l||(msg&&msg.que\
|
|
125760
|
-
rySelector('.uc-\
|
|
125761
|
-
content'));if(!m\
|
|
125762
|
-
sg||!c)return;if\
|
|
125763
|
-
(this.threshold=\
|
|
125764
|
-
==0||this.thresh\
|
|
125765
|
-
old==='0'){const\
|
|
125766
|
-
t=toggleEl||msg\
|
|
125767
|
-
.querySelector('\
|
|
125768
|
-
.uc-toggle');con\
|
|
125769
|
-
st labels=this._\
|
|
125770
|
-
labels();c.class\
|
|
125681
|
+
nt)return null;t\
|
|
125682
|
+
ry{const legacy=\
|
|
125683
|
+
content.querySel\
|
|
125684
|
+
ector('.uc-ellip\
|
|
125685
|
+
sis');if(legacy&\
|
|
125686
|
+
&legacy.parentNo\
|
|
125687
|
+
de){legacy.paren\
|
|
125688
|
+
tNode.removeChil\
|
|
125689
|
+
d(legacy);}}catc\
|
|
125690
|
+
h(_){}\x0areturn nu\
|
|
125691
|
+
ll;}\x0a_showEllips\
|
|
125692
|
+
is(msg,contentEl\
|
|
125693
|
+
){this._ensureEl\
|
|
125694
|
+
lipsisEl(msg,con\
|
|
125695
|
+
tentEl);}\x0a_hideE\
|
|
125696
|
+
llipsis(msg){thi\
|
|
125697
|
+
s._ensureEllipsi\
|
|
125698
|
+
sEl(msg,null);}\x0a\
|
|
125699
|
+
apply(root){cons\
|
|
125700
|
+
t scope=root||do\
|
|
125701
|
+
cument;let list;\
|
|
125702
|
+
if(scope.nodeTyp\
|
|
125703
|
+
e===1)list=scope\
|
|
125704
|
+
.querySelectorAl\
|
|
125705
|
+
l('.msg-box.msg-\
|
|
125706
|
+
user .msg');else\
|
|
125707
|
+
list=document.q\
|
|
125708
|
+
uerySelectorAll(\
|
|
125709
|
+
'.msg-box.msg-us\
|
|
125710
|
+
er .msg');if(!li\
|
|
125711
|
+
st||!list.length\
|
|
125712
|
+
)return;for(let \
|
|
125713
|
+
i=0;i<list.lengt\
|
|
125714
|
+
h;i++){const msg\
|
|
125715
|
+
=list[i];const s\
|
|
125716
|
+
t=this._ensureSt\
|
|
125717
|
+
ructure(msg);if(\
|
|
125718
|
+
!st)continue;thi\
|
|
125719
|
+
s._update(msg,st\
|
|
125720
|
+
.content,st.togg\
|
|
125721
|
+
le);}}\x0a_update(m\
|
|
125722
|
+
sg,contentEl,tog\
|
|
125723
|
+
gleEl){const c=c\
|
|
125724
|
+
ontentEl||(msg&&\
|
|
125725
|
+
msg.querySelecto\
|
|
125726
|
+
r('.uc-content')\
|
|
125727
|
+
);if(!msg||!c)re\
|
|
125728
|
+
turn;if(this.thr\
|
|
125729
|
+
eshold===0||this\
|
|
125730
|
+
.threshold==='0'\
|
|
125731
|
+
){const t=toggle\
|
|
125732
|
+
El||msg.querySel\
|
|
125733
|
+
ector('.uc-toggl\
|
|
125734
|
+
e');const labels\
|
|
125735
|
+
=this._labels();\
|
|
125736
|
+
c.classList.remo\
|
|
125737
|
+
ve('uc-collapsed\
|
|
125738
|
+
');c.classList.r\
|
|
125739
|
+
emove('uc-expand\
|
|
125740
|
+
ed');msg.dataset\
|
|
125741
|
+
.ucState='expand\
|
|
125742
|
+
ed';this._hideEl\
|
|
125743
|
+
lipsis(msg);if(t\
|
|
125744
|
+
){t.classList.re\
|
|
125745
|
+
move('visible');\
|
|
125746
|
+
t.setAttribute('\
|
|
125747
|
+
aria-expanded','\
|
|
125748
|
+
false');t.title=\
|
|
125749
|
+
labels.expand;co\
|
|
125750
|
+
nst img=t.queryS\
|
|
125751
|
+
elector('img');i\
|
|
125752
|
+
f(img){img.alt=l\
|
|
125753
|
+
abels.expand;}}\x0a\
|
|
125754
|
+
return;}\x0ac.class\
|
|
125771
125755
|
List.remove('uc-\
|
|
125772
125756
|
collapsed');c.cl\
|
|
125773
125757
|
assList.remove('\
|
|
125774
|
-
uc-expanded');
|
|
125775
|
-
|
|
125776
|
-
|
|
125777
|
-
|
|
125778
|
-
|
|
125779
|
-
|
|
125780
|
-
|
|
125758
|
+
uc-expanded');co\
|
|
125759
|
+
nst fullHeight=M\
|
|
125760
|
+
ath.ceil(c.scrol\
|
|
125761
|
+
lHeight);const l\
|
|
125762
|
+
abels=this._labe\
|
|
125763
|
+
ls();const icons\
|
|
125764
|
+
=this._icons();c\
|
|
125765
|
+
onst t=toggleEl|\
|
|
125766
|
+
|msg.querySelect\
|
|
125767
|
+
or('.uc-toggle')\
|
|
125768
|
+
;if(fullHeight>t\
|
|
125769
|
+
his.threshold){i\
|
|
125770
|
+
f(t)t.classList.\
|
|
125771
|
+
add('visible');c\
|
|
125772
|
+
onst desired=msg\
|
|
125773
|
+
.dataset.ucState\
|
|
125774
|
+
||'collapsed';co\
|
|
125775
|
+
nst expand=(desi\
|
|
125776
|
+
red==='expanded'\
|
|
125777
|
+
);if(expand){c.c\
|
|
125778
|
+
lassList.add('uc\
|
|
125779
|
+
-expanded');this\
|
|
125780
|
+
._hideEllipsis(m\
|
|
125781
|
+
sg);}else{c.clas\
|
|
125782
|
+
sList.add('uc-co\
|
|
125783
|
+
llapsed');this._\
|
|
125784
|
+
showEllipsis(msg\
|
|
125785
|
+
,c);}\x0aif(t){cons\
|
|
125786
|
+
t img=t.querySel\
|
|
125787
|
+
ector('img');if(\
|
|
125788
|
+
img){if(expand){\
|
|
125789
|
+
img.src=icons.co\
|
|
125790
|
+
llapse;img.alt=l\
|
|
125791
|
+
abels.collapse;}\
|
|
125792
|
+
else{img.src=ico\
|
|
125793
|
+
ns.expand;img.al\
|
|
125794
|
+
t=labels.expand;\
|
|
125795
|
+
}}\x0at.setAttribut\
|
|
125796
|
+
e('aria-expanded\
|
|
125797
|
+
',expand?'true':\
|
|
125798
|
+
'false');t.title\
|
|
125799
|
+
=expand?labels.c\
|
|
125800
|
+
ollapse:labels.e\
|
|
125801
|
+
xpand;}}else{c.c\
|
|
125802
|
+
lassList.remove(\
|
|
125803
|
+
'uc-collapsed');\
|
|
125804
|
+
c.classList.remo\
|
|
125805
|
+
ve('uc-expanded'\
|
|
125806
|
+
);msg.dataset.uc\
|
|
125807
|
+
State='expanded'\
|
|
125808
|
+
;this._hideEllip\
|
|
125809
|
+
sis(msg);if(t){t\
|
|
125810
|
+
.classList.remov\
|
|
125811
|
+
e('visible');t.s\
|
|
125812
|
+
etAttribute('ari\
|
|
125813
|
+
a-expanded','fal\
|
|
125814
|
+
se');t.title=lab\
|
|
125815
|
+
els.expand;}}}\x0at\
|
|
125816
|
+
oggleFromToggle(\
|
|
125817
|
+
toggleEl){const \
|
|
125818
|
+
msg=toggleEl&&to\
|
|
125819
|
+
ggleEl.closest?t\
|
|
125820
|
+
oggleEl.closest(\
|
|
125821
|
+
'.msg-box.msg-us\
|
|
125822
|
+
er .msg'):null;i\
|
|
125823
|
+
f(!msg)return;th\
|
|
125824
|
+
is.toggle(msg);}\
|
|
125825
|
+
\x0atoggle(msg){if(\
|
|
125826
|
+
!msg||!msg.isCon\
|
|
125827
|
+
nected)return;co\
|
|
125828
|
+
nst c=msg.queryS\
|
|
125829
|
+
elector('.uc-con\
|
|
125830
|
+
tent');if(!c)ret\
|
|
125831
|
+
urn;const t=msg.\
|
|
125832
|
+
querySelector('.\
|
|
125833
|
+
uc-toggle');cons\
|
|
125834
|
+
t labels=this._l\
|
|
125835
|
+
abels();const ic\
|
|
125836
|
+
ons=this._icons(\
|
|
125837
|
+
);const isCollap\
|
|
125838
|
+
sed=c.classList.\
|
|
125839
|
+
contains('uc-col\
|
|
125840
|
+
lapsed');if(isCo\
|
|
125841
|
+
llapsed){c.class\
|
|
125842
|
+
List.remove('uc-\
|
|
125843
|
+
collapsed');c.cl\
|
|
125844
|
+
assList.add('uc-\
|
|
125845
|
+
expanded');msg.d\
|
|
125846
|
+
ataset.ucState='\
|
|
125847
|
+
expanded';this._\
|
|
125848
|
+
hideEllipsis(msg\
|
|
125849
|
+
);if(t){t.setAtt\
|
|
125850
|
+
ribute('aria-exp\
|
|
125851
|
+
anded','true');t\
|
|
125852
|
+
.title=labels.co\
|
|
125853
|
+
llapse;const img\
|
|
125854
|
+
=t.querySelector\
|
|
125855
|
+
('img');if(img){\
|
|
125856
|
+
img.src=icons.co\
|
|
125857
|
+
llapse;img.alt=l\
|
|
125858
|
+
abels.collapse;}\
|
|
125859
|
+
}}else{c.classLi\
|
|
125860
|
+
st.remove('uc-ex\
|
|
125861
|
+
panded');c.class\
|
|
125862
|
+
List.add('uc-col\
|
|
125863
|
+
lapsed');msg.dat\
|
|
125864
|
+
aset.ucState='co\
|
|
125865
|
+
llapsed';this._s\
|
|
125866
|
+
howEllipsis(msg,\
|
|
125867
|
+
c);if(t){t.setAt\
|
|
125781
125868
|
tribute('aria-ex\
|
|
125782
125869
|
panded','false')\
|
|
125783
125870
|
;t.title=labels.\
|
|
125784
125871
|
expand;const img\
|
|
125785
125872
|
=t.querySelector\
|
|
125786
125873
|
('img');if(img){\
|
|
125787
|
-
img.
|
|
125788
|
-
|
|
125789
|
-
}\
|
|
125790
|
-
|
|
125791
|
-
|
|
125792
|
-
|
|
125793
|
-
|
|
125794
|
-
|
|
125795
|
-
|
|
125796
|
-
|
|
125797
|
-
|
|
125798
|
-
|
|
125799
|
-
|
|
125800
|
-
|
|
125801
|
-
|
|
125802
|
-
|
|
125803
|
-
|
|
125804
|
-
eshold){if(t)t.c\
|
|
125805
|
-
lassList.add('vi\
|
|
125806
|
-
sible');const de\
|
|
125807
|
-
sired=msg.datase\
|
|
125808
|
-
t.ucState||'coll\
|
|
125809
|
-
apsed';const exp\
|
|
125810
|
-
and=(desired==='\
|
|
125811
|
-
expanded');if(ex\
|
|
125812
|
-
pand){c.classLis\
|
|
125813
|
-
t.add('uc-expand\
|
|
125814
|
-
ed');this._hideE\
|
|
125815
|
-
llipsis(msg);}el\
|
|
125816
|
-
se{c.classList.a\
|
|
125817
|
-
dd('uc-collapsed\
|
|
125818
|
-
');this._showEll\
|
|
125819
|
-
ipsis(msg,c);}\x0ai\
|
|
125820
|
-
f(t){const img=t\
|
|
125821
|
-
.querySelector('\
|
|
125822
|
-
img');if(img){if\
|
|
125823
|
-
(expand){img.src\
|
|
125824
|
-
=icons.collapse;\
|
|
125825
|
-
img.alt=labels.c\
|
|
125826
|
-
ollapse;}else{im\
|
|
125827
|
-
g.src=icons.expa\
|
|
125828
|
-
nd;img.alt=label\
|
|
125829
|
-
s.expand;}}\x0at.se\
|
|
125830
|
-
tAttribute('aria\
|
|
125831
|
-
-expanded',expan\
|
|
125832
|
-
d?'true':'false'\
|
|
125833
|
-
);t.title=expand\
|
|
125834
|
-
?labels.collapse\
|
|
125835
|
-
:labels.expand;}\
|
|
125836
|
-
}else{c.classLis\
|
|
125837
|
-
t.remove('uc-col\
|
|
125838
|
-
lapsed');c.class\
|
|
125839
|
-
List.remove('uc-\
|
|
125840
|
-
expanded');msg.d\
|
|
125841
|
-
ataset.ucState='\
|
|
125842
|
-
expanded';this._\
|
|
125843
|
-
hideEllipsis(msg\
|
|
125844
|
-
);if(t){t.classL\
|
|
125845
|
-
ist.remove('visi\
|
|
125846
|
-
ble');t.setAttri\
|
|
125847
|
-
bute('aria-expan\
|
|
125848
|
-
ded','false');t.\
|
|
125849
|
-
title=labels.exp\
|
|
125850
|
-
and;}}}\x0atoggleFr\
|
|
125851
|
-
omToggle(toggleE\
|
|
125852
|
-
l){const msg=tog\
|
|
125853
|
-
gleEl&&toggleEl.\
|
|
125854
|
-
closest?toggleEl\
|
|
125855
|
-
.closest('.msg-b\
|
|
125856
|
-
ox.msg-user .msg\
|
|
125857
|
-
'):null;if(!msg)\
|
|
125858
|
-
return;this.togg\
|
|
125859
|
-
le(msg);}\x0atoggle\
|
|
125860
|
-
(msg){if(!msg||!\
|
|
125861
|
-
msg.isConnected)\
|
|
125862
|
-
return;const c=m\
|
|
125863
|
-
sg.querySelector\
|
|
125864
|
-
('.uc-content');\
|
|
125865
|
-
if(!c)return;con\
|
|
125866
|
-
st t=msg.querySe\
|
|
125867
|
-
lector('.uc-togg\
|
|
125868
|
-
le');const label\
|
|
125869
|
-
s=this._labels()\
|
|
125870
|
-
;const icons=thi\
|
|
125871
|
-
s._icons();const\
|
|
125872
|
-
isCollapsed=c.c\
|
|
125873
|
-
lassList.contain\
|
|
125874
|
-
s('uc-collapsed'\
|
|
125875
|
-
);if(isCollapsed\
|
|
125876
|
-
){c.classList.re\
|
|
125877
|
-
move('uc-collaps\
|
|
125878
|
-
ed');c.classList\
|
|
125879
|
-
.add('uc-expande\
|
|
125880
|
-
d');msg.dataset.\
|
|
125881
|
-
ucState='expande\
|
|
125882
|
-
d';this._hideEll\
|
|
125883
|
-
ipsis(msg);if(t)\
|
|
125884
|
-
{t.setAttribute(\
|
|
125885
|
-
'aria-expanded',\
|
|
125886
|
-
'true');t.title=\
|
|
125887
|
-
labels.collapse;\
|
|
125888
|
-
const img=t.quer\
|
|
125889
|
-
ySelector('img')\
|
|
125890
|
-
;if(img){img.src\
|
|
125891
|
-
=icons.collapse;\
|
|
125892
|
-
img.alt=labels.c\
|
|
125893
|
-
ollapse;}}}else{\
|
|
125894
|
-
c.classList.remo\
|
|
125895
|
-
ve('uc-expanded'\
|
|
125896
|
-
);c.classList.ad\
|
|
125897
|
-
d('uc-collapsed'\
|
|
125898
|
-
);msg.dataset.uc\
|
|
125899
|
-
State='collapsed\
|
|
125900
|
-
';this._showElli\
|
|
125901
|
-
psis(msg,c);if(t\
|
|
125902
|
-
){t.setAttribute\
|
|
125903
|
-
('aria-expanded'\
|
|
125904
|
-
,'false');t.titl\
|
|
125905
|
-
e=labels.expand;\
|
|
125906
|
-
const img=t.quer\
|
|
125907
|
-
ySelector('img')\
|
|
125908
|
-
;if(img){img.src\
|
|
125909
|
-
=icons.expand;im\
|
|
125910
|
-
g.alt=labels.exp\
|
|
125911
|
-
and;}\x0athis._scro\
|
|
125912
|
-
llToggleIntoView\
|
|
125913
|
-
(t);}}}\x0aremeasur\
|
|
125914
|
-
eAll(){const arr\
|
|
125915
|
-
=Array.from(this\
|
|
125916
|
-
._processed||[])\
|
|
125917
|
-
;for(let i=0;i<a\
|
|
125918
|
-
rr.length;i++){c\
|
|
125919
|
-
onst msg=arr[i];\
|
|
125920
|
-
if(!msg||!msg.is\
|
|
125921
|
-
Connected){this.\
|
|
125922
|
-
_processed.delet\
|
|
125923
|
-
e(msg);continue;\
|
|
125924
|
-
}\x0athis._update(m\
|
|
125925
|
-
sg);}}};\x0a\x0a/* dat\
|
|
125926
|
-
a/js/app/utils.j\
|
|
125927
|
-
s */\x0aclass Utils\
|
|
125928
|
-
{static g(name,d\
|
|
125929
|
-
flt){return(type\
|
|
125930
|
-
of window[name]!\
|
|
125931
|
-
=='undefined')?w\
|
|
125932
|
-
indow[name]:dflt\
|
|
125933
|
-
;}\x0astatic now(){\
|
|
125934
|
-
return(typeof pe\
|
|
125935
|
-
rformance!=='und\
|
|
125936
|
-
efined'&&perform\
|
|
125937
|
-
ance.now)?perfor\
|
|
125938
|
-
mance.now():Date\
|
|
125939
|
-
.now();}\x0astatic \
|
|
125940
|
-
escapeHtml(s){co\
|
|
125941
|
-
nst d=Utils._esc\
|
|
125942
|
-
Div||(Utils._esc\
|
|
125943
|
-
Div=document.cre\
|
|
125944
|
-
ateElement('div'\
|
|
125945
|
-
));d.textContent\
|
|
125946
|
-
=String(s??'');r\
|
|
125947
|
-
eturn d.innerHTM\
|
|
125948
|
-
L;}\x0astatic count\
|
|
125949
|
-
Newlines(s){if(!\
|
|
125950
|
-
s)return 0;let c\
|
|
125951
|
-
=0,i=-1;while((i\
|
|
125952
|
-
=s.indexOf('\x5cn',\
|
|
125953
|
-
i+1))!==-1)c++;r\
|
|
125954
|
-
eturn c;}\x0astatic\
|
|
125955
|
-
reEscape(s){ret\
|
|
125956
|
-
urn String(s).re\
|
|
125957
|
-
place(/[.*+?^${}\
|
|
125958
|
-
()|[\x5c]\x5c\x5c]/g,'\x5c\x5c$\
|
|
125959
|
-
&');}\x0astatic idl\
|
|
125960
|
-
e(fn,timeout){if\
|
|
125961
|
-
('requestIdleCal\
|
|
125962
|
-
lback'in window)\
|
|
125963
|
-
return requestId\
|
|
125964
|
-
leCallback(fn,{t\
|
|
125965
|
-
imeout:timeout||\
|
|
125966
|
-
800});return set\
|
|
125967
|
-
Timeout(fn,50);}\
|
|
125968
|
-
\x0astatic cancelId\
|
|
125969
|
-
le(id){try{if('c\
|
|
125970
|
-
ancelIdleCallbac\
|
|
125971
|
-
k'in window)canc\
|
|
125972
|
-
elIdleCallback(i\
|
|
125973
|
-
d);else clearTim\
|
|
125974
|
-
eout(id);}catch(\
|
|
125975
|
-
_){}}\x0astatic get\
|
|
125976
|
-
SE(){return doc\
|
|
125977
|
-
ument.scrollingE\
|
|
125978
|
-
lement||document\
|
|
125979
|
-
.documentElement\
|
|
125980
|
-
;}\x0astatic utf8De\
|
|
125981
|
-
code(bytes){if(!\
|
|
125982
|
-
Utils._td)Utils.\
|
|
125983
|
-
_td=new TextDeco\
|
|
125984
|
-
der('utf-8');ret\
|
|
125985
|
-
urn Utils._td.de\
|
|
125986
|
-
code(bytes);}};\x0a\
|
|
125874
|
+
img.src=icons.ex\
|
|
125875
|
+
pand;img.alt=lab\
|
|
125876
|
+
els.expand;}\x0athi\
|
|
125877
|
+
s._scrollToggleI\
|
|
125878
|
+
ntoView(t);}}}\x0ar\
|
|
125879
|
+
emeasureAll(){co\
|
|
125880
|
+
nst arr=Array.fr\
|
|
125881
|
+
om(this._process\
|
|
125882
|
+
ed||[]);for(let \
|
|
125883
|
+
i=0;i<arr.length\
|
|
125884
|
+
;i++){const msg=\
|
|
125885
|
+
arr[i];if(!msg||\
|
|
125886
|
+
!msg.isConnected\
|
|
125887
|
+
){this._processe\
|
|
125888
|
+
d.delete(msg);co\
|
|
125889
|
+
ntinue;}\x0athis._u\
|
|
125890
|
+
pdate(msg);}}};\x0a\
|
|
125987
125891
|
\x0a/* data/js/app/\
|
|
125988
|
-
|
|
125989
|
-
|
|
125990
|
-
|
|
125991
|
-
|
|
125992
|
-
|
|
125993
|
-
|
|
125994
|
-
;
|
|
125995
|
-
|
|
125996
|
-
|
|
125997
|
-
|
|
125998
|
-
|
|
125999
|
-
|
|
126000
|
-
|
|
126001
|
-
|
|
126002
|
-
|
|
126003
|
-
|
|
126004
|
-
|
|
126005
|
-
|
|
126006
|
-
|
|
126007
|
-
|
|
126008
|
-
|
|
126009
|
-
|
|
126010
|
-
|
|
126011
|
-
s
|
|
126012
|
-
|
|
126013
|
-
|
|
126014
|
-
|
|
126015
|
-
|
|
126016
|
-
|
|
126017
|
-
|
|
126018
|
-
|
|
126019
|
-
|
|
126020
|
-
|
|
126021
|
-
|
|
126022
|
-
|
|
126023
|
-
|
|
126024
|
-
)
|
|
126025
|
-
|
|
125892
|
+
utils.js */\x0aclas\
|
|
125893
|
+
s Utils{static g\
|
|
125894
|
+
(name,dflt){retu\
|
|
125895
|
+
rn(typeof window\
|
|
125896
|
+
[name]!=='undefi\
|
|
125897
|
+
ned')?window[nam\
|
|
125898
|
+
e]:dflt;}\x0astatic\
|
|
125899
|
+
now(){return(ty\
|
|
125900
|
+
peof performance\
|
|
125901
|
+
!=='undefined'&&\
|
|
125902
|
+
performance.now)\
|
|
125903
|
+
?performance.now\
|
|
125904
|
+
():Date.now();}\x0a\
|
|
125905
|
+
static escapeHtm\
|
|
125906
|
+
l(s){const d=Uti\
|
|
125907
|
+
ls._escDiv||(Uti\
|
|
125908
|
+
ls._escDiv=docum\
|
|
125909
|
+
ent.createElemen\
|
|
125910
|
+
t('div'));d.text\
|
|
125911
|
+
Content=String(s\
|
|
125912
|
+
??'');return d.i\
|
|
125913
|
+
nnerHTML;}\x0astati\
|
|
125914
|
+
c countNewlines(\
|
|
125915
|
+
s){if(!s)return \
|
|
125916
|
+
0;let c=0,i=-1;w\
|
|
125917
|
+
hile((i=s.indexO\
|
|
125918
|
+
f('\x5cn',i+1))!==-\
|
|
125919
|
+
1)c++;return c;}\
|
|
125920
|
+
\x0astatic reEscape\
|
|
125921
|
+
(s){return Strin\
|
|
125922
|
+
g(s).replace(/[.\
|
|
125923
|
+
*+?^${}()|[\x5c]\x5c\x5c]\
|
|
125924
|
+
/g,'\x5c\x5c$&');}\x0asta\
|
|
125925
|
+
tic idle(fn,time\
|
|
125926
|
+
out){if('request\
|
|
125927
|
+
IdleCallback'in \
|
|
125928
|
+
window)return re\
|
|
125929
|
+
questIdleCallbac\
|
|
125930
|
+
k(fn,{timeout:ti\
|
|
125931
|
+
meout||800});ret\
|
|
125932
|
+
urn setTimeout(f\
|
|
125933
|
+
n,50);}\x0astatic c\
|
|
125934
|
+
ancelIdle(id){tr\
|
|
125935
|
+
y{if('cancelIdle\
|
|
125936
|
+
Callback'in wind\
|
|
125937
|
+
ow)cancelIdleCal\
|
|
125938
|
+
lback(id);else c\
|
|
125939
|
+
learTimeout(id);\
|
|
125940
|
+
}catch(_){}}\x0asta\
|
|
125941
|
+
tic get SE(){ret\
|
|
125942
|
+
urn document.scr\
|
|
125943
|
+
ollingElement||d\
|
|
125944
|
+
ocument.document\
|
|
125945
|
+
Element;}\x0astatic\
|
|
125946
|
+
utf8Decode(byte\
|
|
125947
|
+
s){if(!Utils._td\
|
|
125948
|
+
)Utils._td=new T\
|
|
125949
|
+
extDecoder('utf-\
|
|
125950
|
+
8');return Utils\
|
|
125951
|
+
._td.decode(byte\
|
|
125952
|
+
s);}};\x0a\x0a/* data/\
|
|
125953
|
+
js/app/runtime.j\
|
|
125954
|
+
s */\x0aclass Runti\
|
|
125955
|
+
me{constructor()\
|
|
125956
|
+
{this.cfg=new Co\
|
|
125957
|
+
nfig();this.logg\
|
|
125958
|
+
er=new Logger(th\
|
|
125959
|
+
is.cfg);this.dom\
|
|
125960
|
+
=new DOMRefs();t\
|
|
125961
|
+
his.customMarkup\
|
|
125962
|
+
=new CustomMarku\
|
|
125963
|
+
p(this.cfg,this.\
|
|
125964
|
+
logger);this.raf\
|
|
125965
|
+
=new RafManager(\
|
|
125966
|
+
this.cfg);try{th\
|
|
125967
|
+
is.logger.bindRa\
|
|
125968
|
+
f(this.raf);}cat\
|
|
125969
|
+
ch(_){}\x0athis.asy\
|
|
125970
|
+
nc=new AsyncRunn\
|
|
126026
125971
|
er(this.cfg,this\
|
|
126027
|
-
.
|
|
126028
|
-
|
|
126029
|
-
|
|
126030
|
-
this.
|
|
126031
|
-
|
|
126032
|
-
|
|
126033
|
-
|
|
126034
|
-
|
|
126035
|
-
|
|
126036
|
-
|
|
126037
|
-
|
|
126038
|
-
w
|
|
126039
|
-
this.cfg,this
|
|
126040
|
-
|
|
126041
|
-
|
|
126042
|
-
|
|
126043
|
-
|
|
126044
|
-
|
|
126045
|
-
|
|
126046
|
-
|
|
126047
|
-
|
|
126048
|
-
|
|
126049
|
-
|
|
126050
|
-
|
|
126051
|
-
|
|
126052
|
-
|
|
126053
|
-
|
|
126054
|
-
.
|
|
126055
|
-
|
|
126056
|
-
|
|
126057
|
-
|
|
126058
|
-
|
|
126059
|
-
this.
|
|
126060
|
-
|
|
126061
|
-
|
|
126062
|
-
this.
|
|
126063
|
-
|
|
126064
|
-
|
|
126065
|
-
|
|
126066
|
-
|
|
126067
|
-
|
|
126068
|
-
|
|
126069
|
-
|
|
126070
|
-
|
|
126071
|
-
|
|
126072
|
-
.
|
|
126073
|
-
|
|
126074
|
-
|
|
126075
|
-
|
|
126076
|
-
|
|
126077
|
-
|
|
126078
|
-
this.
|
|
126079
|
-
|
|
126080
|
-
|
|
126081
|
-
|
|
126082
|
-
|
|
126083
|
-
,
|
|
126084
|
-
|
|
126085
|
-
NewCode(root,opt\
|
|
126086
|
-
s,this.stream.ac\
|
|
126087
|
-
tiveCode);this.r\
|
|
126088
|
-
enderer.hooks.ob\
|
|
126089
|
-
serveMsgBoxes=(r\
|
|
126090
|
-
oot)=>this.highl\
|
|
126091
|
-
ighter.observeMs\
|
|
126092
|
-
gBoxes(root,(box\
|
|
126093
|
-
)=>{this.highlig\
|
|
126094
|
-
hter.observeNewC\
|
|
126095
|
-
ode(box,{deferLa\
|
|
126096
|
-
stIfStreaming:tr\
|
|
126097
|
-
ue,minLinesForLa\
|
|
126098
|
-
st:this.cfg.PROF\
|
|
126099
|
-
ILE_CODE.minLine\
|
|
126100
|
-
sForHL,minCharsF\
|
|
126101
|
-
orLast:this.cfg.\
|
|
126102
|
-
PROFILE_CODE.min\
|
|
126103
|
-
CharsForHL},this\
|
|
126104
|
-
.stream.activeCo\
|
|
126105
|
-
de);this.codeScr\
|
|
126106
|
-
oll.initScrollab\
|
|
126107
|
-
leBlocks(box);})\
|
|
126108
|
-
;this.renderer.h\
|
|
126109
|
-
ooks.scheduleMat\
|
|
126110
|
-
hRender=(root)=>\
|
|
126111
|
-
{const mm=getMat\
|
|
126112
|
-
hMode();if(mm===\
|
|
126113
|
-
'idle')this.math\
|
|
126114
|
-
.schedule(root);\
|
|
126115
|
-
else if(mm==='al\
|
|
126116
|
-
ways')this.math.\
|
|
126117
|
-
schedule(root,0,\
|
|
126118
|
-
true);};this.ren\
|
|
126119
|
-
derer.hooks.code\
|
|
126120
|
-
ScrollInit=(root\
|
|
126121
|
-
)=>this.codeScro\
|
|
126122
|
-
ll.initScrollabl\
|
|
126123
|
-
eBlocks(root);}\x0a\
|
|
126124
|
-
resetStreamState\
|
|
126125
|
-
(origin,opts){tr\
|
|
126126
|
-
y{this.streamQ.c\
|
|
126127
|
-
lear();}catch(_)\
|
|
126128
|
-
{}\x0aconst def=Obj\
|
|
126129
|
-
ect.assign({fina\
|
|
126130
|
-
lizeActive:true,\
|
|
126131
|
-
clearBuffer:true\
|
|
126132
|
-
,clearMsg:false,\
|
|
126133
|
-
defuseOrphans:tr\
|
|
126134
|
-
ue,forceHeavy:fa\
|
|
126135
|
-
lse,reason:Strin\
|
|
126136
|
-
g(origin||'exter\
|
|
126137
|
-
nal-op')},(opts|\
|
|
126138
|
-
|{}));const now=\
|
|
126139
|
-
Utils.now();cons\
|
|
126140
|
-
t withinDebounce\
|
|
126141
|
-
=(now-(this._las\
|
|
126142
|
-
tHeavyResetMs||0\
|
|
126143
|
-
))<=(this.cfg.RE\
|
|
126144
|
-
SET.HEAVY_DEBOUN\
|
|
126145
|
-
CE_MS||24);const\
|
|
126146
|
-
mustHeavyByOrig\
|
|
126147
|
-
in=def.forceHeav\
|
|
126148
|
-
y===true||def.cl\
|
|
126149
|
-
earMsg===true||o\
|
|
126150
|
-
rigin==='beginSt\
|
|
126151
|
-
ream'||origin===\
|
|
126152
|
-
'nextStream'||or\
|
|
126153
|
-
igin==='clearStr\
|
|
126154
|
-
eam'||origin==='\
|
|
126155
|
-
replaceNodes'||o\
|
|
126156
|
-
rigin==='clearNo\
|
|
126157
|
-
des'||origin==='\
|
|
126158
|
-
clearOutput'||or\
|
|
126159
|
-
igin==='clearLiv\
|
|
126160
|
-
e'||origin==='cl\
|
|
126161
|
-
earInput';const \
|
|
126162
|
-
shouldHeavy=must\
|
|
126163
|
-
HeavyByOrigin||!\
|
|
126164
|
-
withinDebounce;c\
|
|
126165
|
-
onst suppressLog\
|
|
126166
|
-
=withinDebounce&\
|
|
126167
|
-
&origin!=='begin\
|
|
126168
|
-
Stream';try{this\
|
|
126169
|
-
.stream.abortAnd\
|
|
126170
|
-
Reset({...def,su\
|
|
126171
|
-
ppressLog});}cat\
|
|
126172
|
-
ch(_){}\x0aif(shoul\
|
|
126173
|
-
dHeavy){try{this\
|
|
126174
|
-
.highlighter.cle\
|
|
126175
|
-
anup();}catch(_)\
|
|
126176
|
-
{}\x0atry{this.math\
|
|
126177
|
-
.cleanup();}catc\
|
|
126178
|
-
h(_){}\x0atry{this.\
|
|
126179
|
-
codeScroll.cance\
|
|
126180
|
-
lAllScrolls();}c\
|
|
126181
|
-
atch(_){}\x0atry{th\
|
|
126182
|
-
is.scrollMgr.can\
|
|
126183
|
-
celPendingScroll\
|
|
126184
|
-
();}catch(_){}\x0at\
|
|
126185
|
-
ry{this.raf.canc\
|
|
126186
|
-
elAll();}catch(_\
|
|
126187
|
-
){}\x0athis._lastHe\
|
|
126188
|
-
avyResetMs=now;}\
|
|
126189
|
-
else{try{this.ra\
|
|
126190
|
-
f.cancelGroup('S\
|
|
126191
|
-
treamQueue');}ca\
|
|
126192
|
-
tch(_){}}\x0atry{th\
|
|
126193
|
-
is.tips&&this.ti\
|
|
126194
|
-
ps.hide();}catch\
|
|
126195
|
-
(_){}}\x0aapi_onChu\
|
|
126196
|
-
nk=(name,chunk,t\
|
|
126197
|
-
ype)=>{const t=S\
|
|
126198
|
-
tring(type||'tex\
|
|
126199
|
-
t_delta');if(t==\
|
|
126200
|
-
='text_delta'){t\
|
|
126201
|
-
his.api_appendSt\
|
|
126202
|
-
ream(name,chunk)\
|
|
126203
|
-
;return;}\x0athis.l\
|
|
126204
|
-
ogger.debug('STR\
|
|
126205
|
-
EAM','IGNORED_NO\
|
|
126206
|
-
N_TEXT_CHUNK',{t\
|
|
126207
|
-
ype:t,len:(chunk\
|
|
126208
|
-
?String(chunk).l\
|
|
126209
|
-
ength:0)});};api\
|
|
126210
|
-
_beginStream=(ch\
|
|
126211
|
-
unk=false)=>{thi\
|
|
126212
|
-
s.tips&&this.tip\
|
|
126213
|
-
s.hide();this.re\
|
|
126214
|
-
setStreamState('\
|
|
126215
|
-
beginStream',{cl\
|
|
126216
|
-
earMsg:true,fina\
|
|
126217
|
-
lizeActive:false\
|
|
126218
|
-
,forceHeavy:true\
|
|
126219
|
-
});this.stream.b\
|
|
126220
|
-
eginStream(chunk\
|
|
126221
|
-
);};api_endStrea\
|
|
126222
|
-
m=()=>{this.stre\
|
|
126223
|
-
am.endStream();}\
|
|
126224
|
-
;api_applyStream\
|
|
126225
|
-
=(name,chunk)=>{\
|
|
126226
|
-
this.stream.appl\
|
|
126227
|
-
yStream(name,chu\
|
|
126228
|
-
nk);};api_append\
|
|
126229
|
-
Stream=(name,chu\
|
|
126230
|
-
nk)=>{this.strea\
|
|
126231
|
-
mQ.enqueue(name,\
|
|
126232
|
-
chunk);};api_nex\
|
|
126233
|
-
tStream=()=>{thi\
|
|
126234
|
-
s.tips&&this.tip\
|
|
126235
|
-
s.hide();const e\
|
|
126236
|
-
lement=this.dom.\
|
|
126237
|
-
get('_append_out\
|
|
126238
|
-
put_');const bef\
|
|
126239
|
-
ore=this.dom.get\
|
|
126240
|
-
('_append_output\
|
|
126241
|
-
_before_');if(el\
|
|
126242
|
-
ement&&before){c\
|
|
126243
|
-
onst frag=docume\
|
|
126244
|
-
nt.createDocumen\
|
|
126245
|
-
tFragment();whil\
|
|
126246
|
-
e(element.firstC\
|
|
126247
|
-
hild)frag.append\
|
|
126248
|
-
Child(element.fi\
|
|
126249
|
-
rstChild);before\
|
|
126250
|
-
.appendChild(fra\
|
|
126251
|
-
g);}\x0athis.resetS\
|
|
126252
|
-
treamState('next\
|
|
126253
|
-
Stream',{clearMs\
|
|
126254
|
-
g:true,finalizeA\
|
|
126255
|
-
ctive:false,forc\
|
|
126256
|
-
eHeavy:true});th\
|
|
126257
|
-
is.scrollMgr.sch\
|
|
126258
|
-
eduleScroll();};\
|
|
126259
|
-
api_clearStream=\
|
|
126260
|
-
()=>{this.tips&&\
|
|
126261
|
-
this.tips.hide()\
|
|
126262
|
-
;this.resetStrea\
|
|
126263
|
-
mState('clearStr\
|
|
126264
|
-
eam',{clearMsg:t\
|
|
126265
|
-
rue,forceHeavy:t\
|
|
126266
|
-
rue});const el=t\
|
|
126267
|
-
his.dom.getStrea\
|
|
126268
|
-
mContainer();if(\
|
|
126269
|
-
!el)return;el.re\
|
|
126270
|
-
placeChildren();\
|
|
126271
|
-
};api_appendNode\
|
|
126272
|
-
=(payload)=>{thi\
|
|
126273
|
-
s.resetStreamSta\
|
|
126274
|
-
te('appendNode')\
|
|
126275
|
-
;this.data.appen\
|
|
126276
|
-
d(payload);this.\
|
|
126277
|
-
scrollMgr.schedu\
|
|
126278
|
-
leScroll();};api\
|
|
126279
|
-
_replaceNodes=(p\
|
|
126280
|
-
ayload)=>{this.r\
|
|
126281
|
-
esetStreamState(\
|
|
126282
|
-
'replaceNodes',{\
|
|
126283
|
-
clearMsg:true,fo\
|
|
126284
|
-
rceHeavy:true});\
|
|
126285
|
-
this.dom.clearNo\
|
|
126286
|
-
des();this.data.\
|
|
126287
|
-
replace(payload)\
|
|
126288
|
-
;};api_appendToI\
|
|
126289
|
-
nput=(payload)=>\
|
|
126290
|
-
{this.nodes.appe\
|
|
126291
|
-
ndToInput(payloa\
|
|
126292
|
-
d);this.scrollMg\
|
|
126293
|
-
r.autoFollow=tru\
|
|
126294
|
-
e;this.scrollMgr\
|
|
126295
|
-
.userInteracted=\
|
|
126296
|
-
false;try{this.s\
|
|
126297
|
-
crollMgr.lastScr\
|
|
126298
|
-
ollTop=Utils.SE.\
|
|
126299
|
-
scrollTop|0;}cat\
|
|
126300
|
-
ch(_){}\x0athis.scr\
|
|
126301
|
-
ollMgr.scheduleS\
|
|
126302
|
-
croll();};api_cl\
|
|
126303
|
-
earNodes=()=>{th\
|
|
126304
|
-
is.dom.clearNode\
|
|
126305
|
-
s();this.resetSt\
|
|
126306
|
-
reamState('clear\
|
|
126307
|
-
Nodes',{clearMsg\
|
|
126308
|
-
:true,forceHeavy\
|
|
126309
|
-
:true});};api_cl\
|
|
126310
|
-
earInput=()=>{th\
|
|
126311
|
-
is.resetStreamSt\
|
|
126312
|
-
ate('clearInput'\
|
|
126313
|
-
,{forceHeavy:tru\
|
|
126314
|
-
e});this.dom.cle\
|
|
126315
|
-
arInput();};api_\
|
|
126316
|
-
clearOutput=()=>\
|
|
126317
|
-
{this.dom.clearO\
|
|
126318
|
-
utput();this.res\
|
|
126319
|
-
etStreamState('c\
|
|
126320
|
-
learOutput',{cle\
|
|
126321
|
-
arMsg:true,force\
|
|
126322
|
-
Heavy:true});};a\
|
|
126323
|
-
pi_clearLive=()=\
|
|
126324
|
-
>{this.dom.clear\
|
|
126325
|
-
Live();this.rese\
|
|
126326
|
-
tStreamState('cl\
|
|
126327
|
-
earLive',{forceH\
|
|
126328
|
-
eavy:true});};ap\
|
|
126329
|
-
i_appendToolOutp\
|
|
126330
|
-
ut=(c)=>this.too\
|
|
126331
|
-
lOutput.append(c\
|
|
126332
|
-
);api_updateTool\
|
|
126333
|
-
Output=(c)=>this\
|
|
126334
|
-
.toolOutput.upda\
|
|
126335
|
-
te(c);api_clearT\
|
|
126336
|
-
oolOutput=()=>th\
|
|
126337
|
-
is.toolOutput.cl\
|
|
126338
|
-
ear();api_beginT\
|
|
126339
|
-
oolOutput=()=>th\
|
|
126340
|
-
is.toolOutput.be\
|
|
126341
|
-
gin();api_endToo\
|
|
126342
|
-
lOutput=()=>this\
|
|
126343
|
-
.toolOutput.end(\
|
|
126344
|
-
);api_enableTool\
|
|
126345
|
-
Output=()=>this.\
|
|
126346
|
-
toolOutput.enabl\
|
|
126347
|
-
e();api_disableT\
|
|
126348
|
-
oolOutput=()=>th\
|
|
126349
|
-
is.toolOutput.di\
|
|
126350
|
-
sable();api_togg\
|
|
126351
|
-
leToolOutput=(id\
|
|
126352
|
-
)=>this.toolOutp\
|
|
126353
|
-
ut.toggle(id);ap\
|
|
126354
|
-
i_appendExtra=(i\
|
|
126355
|
-
d,c)=>this.nodes\
|
|
126356
|
-
.appendExtra(id,\
|
|
126357
|
-
c,this.scrollMgr\
|
|
126358
|
-
);api_removeNode\
|
|
126359
|
-
=(id)=>this.node\
|
|
126360
|
-
s.removeNode(id,\
|
|
126361
|
-
this.scrollMgr);\
|
|
126362
|
-
api_removeNodesF\
|
|
126363
|
-
romId=(id)=>this\
|
|
126364
|
-
.nodes.removeNod\
|
|
126365
|
-
esFromId(id,this\
|
|
126366
|
-
.scrollMgr);api_\
|
|
126367
|
-
replaceLive=(con\
|
|
126368
|
-
tent)=>{const el\
|
|
126369
|
-
=this.dom.get('_\
|
|
126370
|
-
append_live_');i\
|
|
126371
|
-
f(!el)return;if(\
|
|
126372
|
-
el.classList.con\
|
|
126373
|
-
tains('hidden'))\
|
|
126374
|
-
{el.classList.re\
|
|
126375
|
-
move('hidden');e\
|
|
126376
|
-
l.classList.add(\
|
|
126377
|
-
'visible');}\x0ael.\
|
|
126378
|
-
innerHTML=conten\
|
|
126379
|
-
t;try{const mayb\
|
|
126380
|
-
ePromise=this.re\
|
|
126381
|
-
nderer.renderPen\
|
|
126382
|
-
dingMarkdown(el)\
|
|
126383
|
-
;const post=()=>\
|
|
126384
|
-
{try{this.highli\
|
|
126385
|
-
ghter.observeNew\
|
|
126386
|
-
Code(el,{deferLa\
|
|
126387
|
-
stIfStreaming:tr\
|
|
126388
|
-
ue,minLinesForLa\
|
|
126389
|
-
st:this.cfg.PROF\
|
|
126390
|
-
ILE_CODE.minLine\
|
|
126391
|
-
sForHL,minCharsF\
|
|
126392
|
-
orLast:this.cfg.\
|
|
126393
|
-
PROFILE_CODE.min\
|
|
126394
|
-
CharsForHL},this\
|
|
126395
|
-
.stream.activeCo\
|
|
126396
|
-
de);this.highlig\
|
|
126397
|
-
hter.observeMsgB\
|
|
126398
|
-
oxes(el,(box)=>{\
|
|
126399
|
-
this.highlighter\
|
|
126400
|
-
.observeNewCode(\
|
|
126401
|
-
box,{deferLastIf\
|
|
126402
|
-
Streaming:true,m\
|
|
126403
|
-
inLinesForLast:t\
|
|
126404
|
-
his.cfg.PROFILE_\
|
|
126405
|
-
CODE.minLinesFor\
|
|
126406
|
-
HL,minCharsForLa\
|
|
126407
|
-
st:this.cfg.PROF\
|
|
126408
|
-
ILE_CODE.minChar\
|
|
126409
|
-
sForHL},this.str\
|
|
126410
|
-
eam.activeCode);\
|
|
126411
|
-
this.codeScroll.\
|
|
126412
|
-
initScrollableBl\
|
|
126413
|
-
ocks(box);});}ca\
|
|
126414
|
-
tch(_){}\x0atry{con\
|
|
126415
|
-
st mm=getMathMod\
|
|
126416
|
-
e();if(mm==='fin\
|
|
126417
|
-
alize-only')this\
|
|
126418
|
-
.math.schedule(e\
|
|
126419
|
-
l,0,true);else t\
|
|
126420
|
-
his.math.schedul\
|
|
126421
|
-
e(el);}catch(_){\
|
|
126422
|
-
}\x0athis.scrollMgr\
|
|
126423
|
-
.scheduleScroll(\
|
|
126424
|
-
);};if(maybeProm\
|
|
126425
|
-
ise&&typeof mayb\
|
|
126426
|
-
ePromise.then===\
|
|
126427
|
-
'function'){mayb\
|
|
126428
|
-
ePromise.then(po\
|
|
126429
|
-
st);}else{post()\
|
|
126430
|
-
;}}catch(_){this\
|
|
126431
|
-
.scrollMgr.sched\
|
|
126432
|
-
uleScroll();}};a\
|
|
126433
|
-
pi_updateFooter=\
|
|
126434
|
-
(html)=>{const e\
|
|
126435
|
-
l=this.dom.get('\
|
|
126436
|
-
_footer_');if(el\
|
|
126437
|
-
)el.innerHTML=ht\
|
|
126438
|
-
ml;};api_enableE\
|
|
126439
|
-
ditIcons=()=>thi\
|
|
126440
|
-
s.ui.enableEditI\
|
|
126441
|
-
cons();api_disab\
|
|
126442
|
-
leEditIcons=()=>\
|
|
126443
|
-
this.ui.disableE\
|
|
126444
|
-
ditIcons();api_e\
|
|
126445
|
-
nableTimestamp=(\
|
|
126446
|
-
)=>this.ui.enabl\
|
|
126447
|
-
eTimestamp();api\
|
|
126448
|
-
_disableTimestam\
|
|
126449
|
-
p=()=>this.ui.di\
|
|
126450
|
-
sableTimestamp()\
|
|
126451
|
-
;api_enableBlock\
|
|
126452
|
-
s=()=>this.ui.en\
|
|
126453
|
-
ableBlocks();api\
|
|
126454
|
-
_disableBlocks=(\
|
|
126455
|
-
)=>this.ui.disab\
|
|
126456
|
-
leBlocks();api_u\
|
|
126457
|
-
pdateCSS=(styles\
|
|
126458
|
-
)=>this.ui.updat\
|
|
126459
|
-
eCSS(styles);api\
|
|
126460
|
-
_getScrollPositi\
|
|
126461
|
-
on=()=>{this.bri\
|
|
126462
|
-
dge.updateScroll\
|
|
126463
|
-
Position(window.\
|
|
126464
|
-
scrollY);};api_s\
|
|
126465
|
-
etScrollPosition\
|
|
126466
|
-
=(pos)=>{try{win\
|
|
126467
|
-
dow.scrollTo(0,p\
|
|
126468
|
-
os);this.scrollM\
|
|
126469
|
-
gr.prevScroll=pa\
|
|
126470
|
-
rseInt(pos);}cat\
|
|
126471
|
-
ch(_){}};api_sho\
|
|
126472
|
-
wLoading=()=>thi\
|
|
126473
|
-
s.loading.show()\
|
|
126474
|
-
;api_hideLoading\
|
|
126475
|
-
=()=>this.loadin\
|
|
126476
|
-
g.hide();api_res\
|
|
126477
|
-
toreCollapsedCod\
|
|
126478
|
-
e=(root)=>this.r\
|
|
126479
|
-
enderer.restoreC\
|
|
126480
|
-
ollapsedCode(roo\
|
|
126481
|
-
t);api_scrollToT\
|
|
126482
|
-
opUser=()=>this.\
|
|
126483
|
-
scrollMgr.scroll\
|
|
126484
|
-
ToTopUser();api_\
|
|
126485
|
-
scrollToBottomUs\
|
|
126486
|
-
er=()=>this.scro\
|
|
126487
|
-
llMgr.scrollToBo\
|
|
126488
|
-
ttomUser();api_s\
|
|
126489
|
-
howTips=()=>this\
|
|
126490
|
-
.tips.show();api\
|
|
126491
|
-
_hideTips=()=>th\
|
|
126492
|
-
is.tips.hide();a\
|
|
126493
|
-
pi_begin=()=>{th\
|
|
126494
|
-
is.scrollMgr.for\
|
|
126495
|
-
ceScrollToBottom\
|
|
126496
|
-
ImmediateAtEnd()\
|
|
126497
|
-
;}\x0aapi_end=()=>{\
|
|
126498
|
-
this.scrollMgr.f\
|
|
126499
|
-
orceScrollToBott\
|
|
126500
|
-
omImmediateAtEnd\
|
|
126501
|
-
();}\x0aapi_getCust\
|
|
126502
|
-
omMarkupRules=()\
|
|
126503
|
-
=>this.customMar\
|
|
126504
|
-
kup.getRules();a\
|
|
126505
|
-
pi_setCustomMark\
|
|
126506
|
-
upRules=(rules)=\
|
|
126507
|
-
>{this.customMar\
|
|
126508
|
-
kup.setRules(rul\
|
|
126509
|
-
es);try{this.str\
|
|
125972
|
+
.raf);this.rende\
|
|
125973
|
+
rer=new Markdown\
|
|
125974
|
+
Renderer(this.cf\
|
|
125975
|
+
g,this.customMar\
|
|
125976
|
+
kup,this.logger,\
|
|
125977
|
+
this.async,this.\
|
|
125978
|
+
raf);this.math=n\
|
|
125979
|
+
ew MathRenderer(\
|
|
125980
|
+
this.cfg,this.ra\
|
|
125981
|
+
f,this.async);th\
|
|
125982
|
+
is.codeScroll=ne\
|
|
125983
|
+
w CodeScrollStat\
|
|
125984
|
+
e(this.cfg,this.\
|
|
125985
|
+
raf);this.highli\
|
|
125986
|
+
ghter=new Highli\
|
|
125987
|
+
ghter(this.cfg,t\
|
|
125988
|
+
his.codeScroll,t\
|
|
125989
|
+
his.raf);this.sc\
|
|
125990
|
+
rollMgr=new Scro\
|
|
125991
|
+
llManager(this.c\
|
|
125992
|
+
fg,this.dom,this\
|
|
125993
|
+
.raf);this.toolO\
|
|
125994
|
+
utput=new ToolOu\
|
|
125995
|
+
tput();this.load\
|
|
125996
|
+
ing=new Loading(\
|
|
125997
|
+
this.dom);this.n\
|
|
125998
|
+
odes=new NodesMa\
|
|
125999
|
+
nager(this.dom,t\
|
|
126000
|
+
his.renderer,thi\
|
|
126001
|
+
s.highlighter,th\
|
|
126002
|
+
is.math);this.br\
|
|
126003
|
+
idge=new BridgeM\
|
|
126004
|
+
anager(this.cfg,\
|
|
126005
|
+
this.logger);thi\
|
|
126006
|
+
s.ui=new UIManag\
|
|
126007
|
+
er();this.stream\
|
|
126008
|
+
=new StreamEngin\
|
|
126009
|
+
e(this.cfg,this.\
|
|
126010
|
+
dom,this.rendere\
|
|
126011
|
+
r,this.math,this\
|
|
126012
|
+
.highlighter,thi\
|
|
126013
|
+
s.codeScroll,thi\
|
|
126014
|
+
s.scrollMgr,this\
|
|
126015
|
+
.raf,this.async,\
|
|
126016
|
+
this.logger);thi\
|
|
126017
|
+
s.streamQ=new St\
|
|
126018
|
+
reamQueue(this.c\
|
|
126019
|
+
fg,this.stream,t\
|
|
126020
|
+
his.scrollMgr,th\
|
|
126021
|
+
is.raf);this.eve\
|
|
126022
|
+
nts=new EventMan\
|
|
126023
|
+
ager(this.cfg,th\
|
|
126024
|
+
is.dom,this.scro\
|
|
126025
|
+
llMgr,this.highl\
|
|
126026
|
+
ighter,this.code\
|
|
126027
|
+
Scroll,this.tool\
|
|
126028
|
+
Output,this.brid\
|
|
126029
|
+
ge);try{this.str\
|
|
126510
126030
|
eam.setCustomFen\
|
|
126511
126031
|
ceSpecs(this.cus\
|
|
126512
126032
|
tomMarkup.getSou\
|
|
126513
126033
|
rceFenceSpecs())\
|
|
126514
|
-
;}catch(_){}
|
|
126515
|
-
|
|
126516
|
-
|
|
126517
|
-
|
|
126518
|
-
;this.
|
|
126519
|
-
|
|
126520
|
-
(
|
|
126521
|
-
|
|
126522
|
-
|
|
126523
|
-
|
|
126524
|
-
|
|
126525
|
-
|
|
126526
|
-
|
|
126527
|
-
|
|
126528
|
-
|
|
126529
|
-
|
|
126530
|
-
|
|
126531
|
-
|
|
126532
|
-
|
|
126533
|
-
.
|
|
126534
|
-
|
|
126535
|
-
|
|
126536
|
-
|
|
126537
|
-
|
|
126538
|
-
|
|
126539
|
-
odeInput=(html)=\
|
|
126540
|
-
>this.api_append\
|
|
126541
|
-
ToInput(html);th\
|
|
126542
|
-
is.bridge.connec\
|
|
126543
|
-
t(onChunk,onNode\
|
|
126544
|
-
,onNodeReplace,o\
|
|
126545
|
-
nNodeInput);try{\
|
|
126546
|
-
this.logger.bind\
|
|
126547
|
-
Bridge(this.brid\
|
|
126548
|
-
ge.bridge||this.\
|
|
126549
|
-
bridge);}catch(_\
|
|
126550
|
-
){}});this.rende\
|
|
126551
|
-
rer.init();try{t\
|
|
126552
|
-
his.renderer.ren\
|
|
126553
|
-
derPendingMarkdo\
|
|
126554
|
-
wn(document);}ca\
|
|
126555
|
-
tch(_){}\x0athis.hi\
|
|
126556
|
-
ghlighter.observ\
|
|
126557
|
-
eMsgBoxes(docume\
|
|
126558
|
-
nt,(box)=>{this.\
|
|
126034
|
+
;}catch(_){}\x0athi\
|
|
126035
|
+
s.templates=new \
|
|
126036
|
+
NodeTemplateEngi\
|
|
126037
|
+
ne(this.cfg,this\
|
|
126038
|
+
.logger);this.da\
|
|
126039
|
+
ta=new DataRecei\
|
|
126040
|
+
ver(this.cfg,thi\
|
|
126041
|
+
s.templates,this\
|
|
126042
|
+
.nodes,this.scro\
|
|
126043
|
+
llMgr);this.tips\
|
|
126044
|
+
=null;this._last\
|
|
126045
|
+
HeavyResetMs=0;t\
|
|
126046
|
+
his.renderer.hoo\
|
|
126047
|
+
ks.observeNewCod\
|
|
126048
|
+
e=(root,opts)=>t\
|
|
126049
|
+
his.highlighter.\
|
|
126050
|
+
observeNewCode(r\
|
|
126051
|
+
oot,opts,this.st\
|
|
126052
|
+
ream.activeCode)\
|
|
126053
|
+
;this.renderer.h\
|
|
126054
|
+
ooks.observeMsgB\
|
|
126055
|
+
oxes=(root)=>thi\
|
|
126056
|
+
s.highlighter.ob\
|
|
126057
|
+
serveMsgBoxes(ro\
|
|
126058
|
+
ot,(box)=>{this.\
|
|
126559
126059
|
highlighter.obse\
|
|
126560
126060
|
rveNewCode(box,{\
|
|
126561
126061
|
deferLastIfStrea\
|
|
@@ -126570,308 +126070,771 @@ L},this.stream.a\
|
|
|
126570
126070
|
ctiveCode);this.\
|
|
126571
126071
|
codeScroll.initS\
|
|
126572
126072
|
crollableBlocks(\
|
|
126573
|
-
box);});this.
|
|
126574
|
-
|
|
126575
|
-
|
|
126576
|
-
|
|
126577
|
-
|
|
126578
|
-
|
|
126579
|
-
.
|
|
126580
|
-
|
|
126581
|
-
|
|
126582
|
-
|
|
126583
|
-
|
|
126584
|
-
|
|
126585
|
-
.
|
|
126586
|
-
|
|
126587
|
-
|
|
126588
|
-
|
|
126589
|
-
|
|
126590
|
-
|
|
126591
|
-
|
|
126592
|
-
|
|
126593
|
-
|
|
126594
|
-
|
|
126595
|
-
|
|
126596
|
-
|
|
126597
|
-
|
|
126598
|
-
|
|
126599
|
-
|
|
126600
|
-
|
|
126601
|
-
|
|
126602
|
-
|
|
126603
|
-
|
|
126604
|
-
|
|
126605
|
-
|
|
126606
|
-
|
|
126607
|
-
|
|
126608
|
-
|
|
126609
|
-
|
|
126610
|
-
|
|
126611
|
-
|
|
126612
|
-
|
|
126613
|
-
|
|
126614
|
-
|
|
126615
|
-
|
|
126616
|
-
|
|
126617
|
-
|
|
126618
|
-
|
|
126619
|
-
|
|
126620
|
-
|
|
126621
|
-
|
|
126622
|
-
|
|
126623
|
-
|
|
126624
|
-
|
|
126625
|
-
|
|
126626
|
-
|
|
126627
|
-
|
|
126628
|
-
|
|
126629
|
-
|
|
126630
|
-
|
|
126631
|
-
|
|
126632
|
-
|
|
126633
|
-
|
|
126634
|
-
|
|
126635
|
-
|
|
126636
|
-
|
|
126637
|
-
|
|
126638
|
-
|
|
126639
|
-
|
|
126640
|
-
|
|
126641
|
-
|
|
126642
|
-
|
|
126643
|
-
|
|
126644
|
-
.
|
|
126645
|
-
|
|
126646
|
-
|
|
126647
|
-
|
|
126648
|
-
|
|
126649
|
-
|
|
126650
|
-
|
|
126651
|
-
|
|
126652
|
-
|
|
126653
|
-
|
|
126654
|
-
|
|
126655
|
-
|
|
126656
|
-
|
|
126657
|
-
|
|
126658
|
-
|
|
126659
|
-
|
|
126660
|
-
()
|
|
126661
|
-
|
|
126662
|
-
|
|
126663
|
-
(
|
|
126664
|
-
|
|
126665
|
-
|
|
126666
|
-
|
|
126667
|
-
(
|
|
126668
|
-
|
|
126669
|
-
|
|
126670
|
-
|
|
126671
|
-
|
|
126672
|
-
|
|
126673
|
-
|
|
126073
|
+
box);});this.ren\
|
|
126074
|
+
derer.hooks.sche\
|
|
126075
|
+
duleMathRender=(\
|
|
126076
|
+
root)=>{const mm\
|
|
126077
|
+
=getMathMode();i\
|
|
126078
|
+
f(mm==='idle')th\
|
|
126079
|
+
is.math.schedule\
|
|
126080
|
+
(root);else if(m\
|
|
126081
|
+
m==='always')thi\
|
|
126082
|
+
s.math.schedule(\
|
|
126083
|
+
root,0,true);};t\
|
|
126084
|
+
his.renderer.hoo\
|
|
126085
|
+
ks.codeScrollIni\
|
|
126086
|
+
t=(root)=>this.c\
|
|
126087
|
+
odeScroll.initSc\
|
|
126088
|
+
rollableBlocks(r\
|
|
126089
|
+
oot);}\x0aresetStre\
|
|
126090
|
+
amState(origin,o\
|
|
126091
|
+
pts){try{this.st\
|
|
126092
|
+
reamQ.clear();}c\
|
|
126093
|
+
atch(_){}\x0aconst \
|
|
126094
|
+
def=Object.assig\
|
|
126095
|
+
n({finalizeActiv\
|
|
126096
|
+
e:true,clearBuff\
|
|
126097
|
+
er:true,clearMsg\
|
|
126098
|
+
:false,defuseOrp\
|
|
126099
|
+
hans:true,forceH\
|
|
126100
|
+
eavy:false,reaso\
|
|
126101
|
+
n:String(origin|\
|
|
126102
|
+
|'external-op')}\
|
|
126103
|
+
,(opts||{}));con\
|
|
126104
|
+
st now=Utils.now\
|
|
126105
|
+
();const withinD\
|
|
126106
|
+
ebounce=(now-(th\
|
|
126107
|
+
is._lastHeavyRes\
|
|
126108
|
+
etMs||0))<=(this\
|
|
126109
|
+
.cfg.RESET.HEAVY\
|
|
126110
|
+
_DEBOUNCE_MS||24\
|
|
126111
|
+
);const mustHeav\
|
|
126112
|
+
yByOrigin=def.fo\
|
|
126113
|
+
rceHeavy===true|\
|
|
126114
|
+
|def.clearMsg===\
|
|
126115
|
+
true||origin==='\
|
|
126116
|
+
beginStream'||or\
|
|
126117
|
+
igin==='nextStre\
|
|
126118
|
+
am'||origin==='c\
|
|
126119
|
+
learStream'||ori\
|
|
126120
|
+
gin==='replaceNo\
|
|
126121
|
+
des'||origin==='\
|
|
126122
|
+
clearNodes'||ori\
|
|
126123
|
+
gin==='clearOutp\
|
|
126124
|
+
ut'||origin==='c\
|
|
126125
|
+
learLive'||origi\
|
|
126126
|
+
n==='clearInput'\
|
|
126127
|
+
;const shouldHea\
|
|
126128
|
+
vy=mustHeavyByOr\
|
|
126129
|
+
igin||!withinDeb\
|
|
126130
|
+
ounce;const supp\
|
|
126131
|
+
ressLog=withinDe\
|
|
126132
|
+
bounce&&origin!=\
|
|
126133
|
+
='beginStream';t\
|
|
126134
|
+
ry{this.stream.a\
|
|
126135
|
+
bortAndReset({..\
|
|
126136
|
+
.def,suppressLog\
|
|
126137
|
+
});}catch(_){}\x0ai\
|
|
126138
|
+
f(shouldHeavy){t\
|
|
126139
|
+
ry{this.highligh\
|
|
126140
|
+
ter.cleanup();}c\
|
|
126141
|
+
atch(_){}\x0atry{th\
|
|
126142
|
+
is.math.cleanup(\
|
|
126143
|
+
);}catch(_){}\x0atr\
|
|
126144
|
+
y{this.codeScrol\
|
|
126145
|
+
l.cancelAllScrol\
|
|
126146
|
+
ls();}catch(_){}\
|
|
126147
|
+
\x0atry{this.scroll\
|
|
126148
|
+
Mgr.cancelPendin\
|
|
126149
|
+
gScroll();}catch\
|
|
126150
|
+
(_){}\x0atry{this.r\
|
|
126151
|
+
af.cancelAll();}\
|
|
126152
|
+
catch(_){}\x0athis.\
|
|
126153
|
+
_lastHeavyResetM\
|
|
126154
|
+
s=now;}else{try{\
|
|
126155
|
+
this.raf.cancelG\
|
|
126156
|
+
roup('StreamQueu\
|
|
126157
|
+
e');}catch(_){}}\
|
|
126158
|
+
\x0atry{this.tips&&\
|
|
126159
|
+
this.tips.hide()\
|
|
126160
|
+
;}catch(_){}}\x0aap\
|
|
126161
|
+
i_onChunk=(name,\
|
|
126162
|
+
chunk,type)=>{co\
|
|
126163
|
+
nst t=String(typ\
|
|
126164
|
+
e||'text_delta')\
|
|
126165
|
+
;if(t==='text_de\
|
|
126166
|
+
lta'){this.api_a\
|
|
126167
|
+
ppendStream(name\
|
|
126168
|
+
,chunk);return;}\
|
|
126169
|
+
\x0athis.logger.deb\
|
|
126170
|
+
ug('STREAM','IGN\
|
|
126171
|
+
ORED_NON_TEXT_CH\
|
|
126172
|
+
UNK',{type:t,len\
|
|
126173
|
+
:(chunk?String(c\
|
|
126174
|
+
hunk).length:0)}\
|
|
126175
|
+
);};api_beginStr\
|
|
126176
|
+
eam=(chunk=false\
|
|
126177
|
+
)=>{this.tips&&t\
|
|
126178
|
+
his.tips.hide();\
|
|
126179
|
+
this.resetStream\
|
|
126180
|
+
State('beginStre\
|
|
126181
|
+
am',{clearMsg:tr\
|
|
126182
|
+
ue,finalizeActiv\
|
|
126183
|
+
e:false,forceHea\
|
|
126184
|
+
vy:true});this.s\
|
|
126185
|
+
tream.beginStrea\
|
|
126186
|
+
m(chunk);};api_e\
|
|
126187
|
+
ndStream=()=>{th\
|
|
126188
|
+
is.stream.endStr\
|
|
126189
|
+
eam();};api_appl\
|
|
126190
|
+
yStream=(name,ch\
|
|
126191
|
+
unk)=>{this.stre\
|
|
126192
|
+
am.applyStream(n\
|
|
126193
|
+
ame,chunk);};api\
|
|
126194
|
+
_appendStream=(n\
|
|
126195
|
+
ame,chunk)=>{thi\
|
|
126196
|
+
s.streamQ.enqueu\
|
|
126197
|
+
e(name,chunk);};\
|
|
126198
|
+
api_nextStream=(\
|
|
126199
|
+
)=>{this.tips&&t\
|
|
126200
|
+
his.tips.hide();\
|
|
126201
|
+
const element=th\
|
|
126202
|
+
is.dom.get('_app\
|
|
126203
|
+
end_output_');co\
|
|
126204
|
+
nst before=this.\
|
|
126205
|
+
dom.get('_append\
|
|
126206
|
+
_output_before_'\
|
|
126207
|
+
);if(element&&be\
|
|
126208
|
+
fore){const frag\
|
|
126209
|
+
=document.create\
|
|
126210
|
+
DocumentFragment\
|
|
126211
|
+
();while(element\
|
|
126212
|
+
.firstChild)frag\
|
|
126213
|
+
.appendChild(ele\
|
|
126214
|
+
ment.firstChild)\
|
|
126215
|
+
;before.appendCh\
|
|
126216
|
+
ild(frag);}\x0athis\
|
|
126217
|
+
.resetStreamStat\
|
|
126218
|
+
e('nextStream',{\
|
|
126219
|
+
clearMsg:true,fi\
|
|
126220
|
+
nalizeActive:fal\
|
|
126221
|
+
se,forceHeavy:tr\
|
|
126222
|
+
ue});this.scroll\
|
|
126223
|
+
Mgr.scheduleScro\
|
|
126224
|
+
ll();};api_clear\
|
|
126225
|
+
Stream=()=>{this\
|
|
126226
|
+
.tips&&this.tips\
|
|
126227
|
+
.hide();this.res\
|
|
126228
|
+
etStreamState('c\
|
|
126229
|
+
learStream',{cle\
|
|
126230
|
+
arMsg:true,force\
|
|
126231
|
+
Heavy:true});con\
|
|
126232
|
+
st el=this.dom.g\
|
|
126233
|
+
etStreamContaine\
|
|
126234
|
+
r();if(!el)retur\
|
|
126235
|
+
n;el.replaceChil\
|
|
126236
|
+
dren();};api_app\
|
|
126237
|
+
endNode=(payload\
|
|
126238
|
+
)=>{this.resetSt\
|
|
126239
|
+
reamState('appen\
|
|
126240
|
+
dNode');this.dat\
|
|
126241
|
+
a.append(payload\
|
|
126242
|
+
);this.scrollMgr\
|
|
126243
|
+
.scheduleScroll(\
|
|
126244
|
+
);};api_replaceN\
|
|
126674
126245
|
odes=(payload)=>\
|
|
126675
|
-
|
|
126676
|
-
|
|
126677
|
-
|
|
126678
|
-
|
|
126679
|
-
|
|
126680
|
-
|
|
126681
|
-
|
|
126682
|
-
|
|
126683
|
-
|
|
126684
|
-
|
|
126246
|
+
{this.resetStrea\
|
|
126247
|
+
mState('replaceN\
|
|
126248
|
+
odes',{clearMsg:\
|
|
126249
|
+
true,forceHeavy:\
|
|
126250
|
+
true});this.dom.\
|
|
126251
|
+
clearNodes();thi\
|
|
126252
|
+
s.data.replace(p\
|
|
126253
|
+
ayload);};api_ap\
|
|
126254
|
+
pendToInput=(pay\
|
|
126255
|
+
load)=>{this.nod\
|
|
126256
|
+
es.appendToInput\
|
|
126257
|
+
(payload);this.s\
|
|
126258
|
+
crollMgr.autoFol\
|
|
126259
|
+
low=true;this.sc\
|
|
126260
|
+
rollMgr.userInte\
|
|
126261
|
+
racted=false;try\
|
|
126262
|
+
{this.scrollMgr.\
|
|
126263
|
+
lastScrollTop=Ut\
|
|
126264
|
+
ils.SE.scrollTop\
|
|
126265
|
+
|0;}catch(_){}\x0at\
|
|
126266
|
+
his.scrollMgr.sc\
|
|
126267
|
+
heduleScroll();}\
|
|
126268
|
+
;api_clearNodes=\
|
|
126269
|
+
()=>{this.dom.cl\
|
|
126270
|
+
earNodes();this.\
|
|
126271
|
+
resetStreamState\
|
|
126272
|
+
('clearNodes',{c\
|
|
126273
|
+
learMsg:true,for\
|
|
126274
|
+
ceHeavy:true});}\
|
|
126275
|
+
;api_clearInput=\
|
|
126276
|
+
()=>{this.resetS\
|
|
126277
|
+
treamState('clea\
|
|
126278
|
+
rInput',{forceHe\
|
|
126279
|
+
avy:true});this.\
|
|
126280
|
+
dom.clearInput()\
|
|
126281
|
+
;};api_clearOutp\
|
|
126282
|
+
ut=()=>{this.dom\
|
|
126283
|
+
.clearOutput();t\
|
|
126284
|
+
his.resetStreamS\
|
|
126285
|
+
tate('clearOutpu\
|
|
126286
|
+
t',{clearMsg:tru\
|
|
126287
|
+
e,forceHeavy:tru\
|
|
126288
|
+
e});};api_clearL\
|
|
126289
|
+
ive=()=>{this.do\
|
|
126290
|
+
m.clearLive();th\
|
|
126291
|
+
is.resetStreamSt\
|
|
126292
|
+
ate('clearLive',\
|
|
126293
|
+
{forceHeavy:true\
|
|
126294
|
+
});};api_appendT\
|
|
126295
|
+
oolOutput=(c)=>t\
|
|
126296
|
+
his.toolOutput.a\
|
|
126297
|
+
ppend(c);api_upd\
|
|
126298
|
+
ateToolOutput=(c\
|
|
126299
|
+
)=>this.toolOutp\
|
|
126300
|
+
ut.update(c);api\
|
|
126301
|
+
_clearToolOutput\
|
|
126302
|
+
=()=>this.toolOu\
|
|
126303
|
+
tput.clear();api\
|
|
126304
|
+
_beginToolOutput\
|
|
126305
|
+
=()=>this.toolOu\
|
|
126306
|
+
tput.begin();api\
|
|
126307
|
+
_endToolOutput=(\
|
|
126308
|
+
)=>this.toolOutp\
|
|
126309
|
+
ut.end();api_ena\
|
|
126310
|
+
bleToolOutput=()\
|
|
126311
|
+
=>this.toolOutpu\
|
|
126312
|
+
t.enable();api_d\
|
|
126313
|
+
isableToolOutput\
|
|
126314
|
+
=()=>this.toolOu\
|
|
126315
|
+
tput.disable();a\
|
|
126316
|
+
pi_toggleToolOut\
|
|
126317
|
+
put=(id)=>this.t\
|
|
126318
|
+
oolOutput.toggle\
|
|
126319
|
+
(id);api_appendE\
|
|
126320
|
+
xtra=(id,c)=>thi\
|
|
126321
|
+
s.nodes.appendEx\
|
|
126322
|
+
tra(id,c,this.sc\
|
|
126323
|
+
rollMgr);api_rem\
|
|
126324
|
+
oveNode=(id)=>th\
|
|
126325
|
+
is.nodes.removeN\
|
|
126326
|
+
ode(id,this.scro\
|
|
126327
|
+
llMgr);api_remov\
|
|
126328
|
+
eNodesFromId=(id\
|
|
126329
|
+
)=>this.nodes.re\
|
|
126330
|
+
moveNodesFromId(\
|
|
126331
|
+
id,this.scrollMg\
|
|
126332
|
+
r);api_replaceLi\
|
|
126333
|
+
ve=(content)=>{c\
|
|
126334
|
+
onst el=this.dom\
|
|
126335
|
+
.get('_append_li\
|
|
126336
|
+
ve_');if(!el)ret\
|
|
126337
|
+
urn;if(el.classL\
|
|
126338
|
+
ist.contains('hi\
|
|
126339
|
+
dden')){el.class\
|
|
126340
|
+
List.remove('hid\
|
|
126341
|
+
den');el.classLi\
|
|
126342
|
+
st.add('visible'\
|
|
126343
|
+
);}\x0ael.innerHTML\
|
|
126344
|
+
=content;try{con\
|
|
126345
|
+
st maybePromise=\
|
|
126346
|
+
this.renderer.re\
|
|
126347
|
+
nderPendingMarkd\
|
|
126348
|
+
own(el);const po\
|
|
126349
|
+
st=()=>{try{this\
|
|
126350
|
+
.highlighter.obs\
|
|
126351
|
+
erveNewCode(el,{\
|
|
126352
|
+
deferLastIfStrea\
|
|
126353
|
+
ming:true,minLin\
|
|
126354
|
+
esForLast:this.c\
|
|
126355
|
+
fg.PROFILE_CODE.\
|
|
126356
|
+
minLinesForHL,mi\
|
|
126357
|
+
nCharsForLast:th\
|
|
126358
|
+
is.cfg.PROFILE_C\
|
|
126359
|
+
ODE.minCharsForH\
|
|
126360
|
+
L},this.stream.a\
|
|
126361
|
+
ctiveCode);this.\
|
|
126362
|
+
highlighter.obse\
|
|
126363
|
+
rveMsgBoxes(el,(\
|
|
126364
|
+
box)=>{this.high\
|
|
126365
|
+
lighter.observeN\
|
|
126366
|
+
ewCode(box,{defe\
|
|
126367
|
+
rLastIfStreaming\
|
|
126368
|
+
:true,minLinesFo\
|
|
126369
|
+
rLast:this.cfg.P\
|
|
126370
|
+
ROFILE_CODE.minL\
|
|
126371
|
+
inesForHL,minCha\
|
|
126372
|
+
rsForLast:this.c\
|
|
126373
|
+
fg.PROFILE_CODE.\
|
|
126374
|
+
minCharsForHL},t\
|
|
126375
|
+
his.stream.activ\
|
|
126376
|
+
eCode);this.code\
|
|
126377
|
+
Scroll.initScrol\
|
|
126378
|
+
lableBlocks(box)\
|
|
126379
|
+
;});}catch(_){}\x0a\
|
|
126380
|
+
try{const mm=get\
|
|
126381
|
+
MathMode();if(mm\
|
|
126382
|
+
==='finalize-onl\
|
|
126383
|
+
y')this.math.sch\
|
|
126384
|
+
edule(el,0,true)\
|
|
126385
|
+
;else this.math.\
|
|
126386
|
+
schedule(el);}ca\
|
|
126387
|
+
tch(_){}\x0athis.sc\
|
|
126388
|
+
rollMgr.schedule\
|
|
126389
|
+
Scroll();};if(ma\
|
|
126390
|
+
ybePromise&&type\
|
|
126391
|
+
of maybePromise.\
|
|
126392
|
+
then==='function\
|
|
126393
|
+
'){maybePromise.\
|
|
126394
|
+
then(post);}else\
|
|
126395
|
+
{post();}}catch(\
|
|
126396
|
+
_){this.scrollMg\
|
|
126397
|
+
r.scheduleScroll\
|
|
126398
|
+
();}};api_update\
|
|
126399
|
+
Footer=(html)=>{\
|
|
126400
|
+
const el=this.do\
|
|
126401
|
+
m.get('_footer_'\
|
|
126402
|
+
);if(el)el.inner\
|
|
126403
|
+
HTML=html;};api_\
|
|
126404
|
+
enableEditIcons=\
|
|
126405
|
+
()=>this.ui.enab\
|
|
126406
|
+
leEditIcons();ap\
|
|
126407
|
+
i_disableEditIco\
|
|
126408
|
+
ns=()=>this.ui.d\
|
|
126409
|
+
isableEditIcons(\
|
|
126410
|
+
);api_enableTime\
|
|
126411
|
+
stamp=()=>this.u\
|
|
126412
|
+
i.enableTimestam\
|
|
126413
|
+
p();api_disableT\
|
|
126414
|
+
imestamp=()=>thi\
|
|
126415
|
+
s.ui.disableTime\
|
|
126416
|
+
stamp();api_enab\
|
|
126417
|
+
leBlocks=()=>thi\
|
|
126418
|
+
s.ui.enableBlock\
|
|
126419
|
+
s();api_disableB\
|
|
126420
|
+
locks=()=>this.u\
|
|
126421
|
+
i.disableBlocks(\
|
|
126422
|
+
);api_updateCSS=\
|
|
126423
|
+
(styles)=>this.u\
|
|
126424
|
+
i.updateCSS(styl\
|
|
126425
|
+
es);api_getScrol\
|
|
126426
|
+
lPosition=()=>{t\
|
|
126427
|
+
his.bridge.updat\
|
|
126428
|
+
eScrollPosition(\
|
|
126429
|
+
window.scrollY);\
|
|
126430
|
+
};api_setScrollP\
|
|
126431
|
+
osition=(pos)=>{\
|
|
126432
|
+
try{window.scrol\
|
|
126433
|
+
lTo(0,pos);this.\
|
|
126434
|
+
scrollMgr.prevSc\
|
|
126435
|
+
roll=parseInt(po\
|
|
126436
|
+
s);}catch(_){}};\
|
|
126437
|
+
api_showLoading=\
|
|
126438
|
+
()=>this.loading\
|
|
126439
|
+
.show();api_hide\
|
|
126440
|
+
Loading=()=>this\
|
|
126441
|
+
.loading.hide();\
|
|
126442
|
+
api_restoreColla\
|
|
126443
|
+
psedCode=(root)=\
|
|
126444
|
+
>this.renderer.r\
|
|
126445
|
+
estoreCollapsedC\
|
|
126446
|
+
ode(root);api_sc\
|
|
126447
|
+
rollToTopUser=()\
|
|
126448
|
+
=>this.scrollMgr\
|
|
126449
|
+
.scrollToTopUser\
|
|
126450
|
+
();api_scrollToB\
|
|
126451
|
+
ottomUser=()=>th\
|
|
126452
|
+
is.scrollMgr.scr\
|
|
126453
|
+
ollToBottomUser(\
|
|
126454
|
+
);api_showTips=(\
|
|
126455
|
+
)=>this.tips.sho\
|
|
126456
|
+
w();api_hideTips\
|
|
126457
|
+
=()=>this.tips.h\
|
|
126458
|
+
ide();api_begin=\
|
|
126459
|
+
()=>{};api_end=(\
|
|
126460
|
+
)=>{this.scrollM\
|
|
126461
|
+
gr.forceScrollTo\
|
|
126462
|
+
BottomImmediateA\
|
|
126463
|
+
tEnd();}\x0aapi_get\
|
|
126464
|
+
CustomMarkupRule\
|
|
126465
|
+
s=()=>this.custo\
|
|
126466
|
+
mMarkup.getRules\
|
|
126467
|
+
();api_setCustom\
|
|
126468
|
+
MarkupRules=(rul\
|
|
126469
|
+
es)=>{this.custo\
|
|
126470
|
+
mMarkup.setRules\
|
|
126471
|
+
(rules);try{this\
|
|
126472
|
+
.stream.setCusto\
|
|
126473
|
+
mFenceSpecs(this\
|
|
126474
|
+
.customMarkup.ge\
|
|
126475
|
+
tSourceFenceSpec\
|
|
126476
|
+
s());}catch(_){}\
|
|
126477
|
+
};init(){this.hi\
|
|
126478
|
+
ghlighter.initHL\
|
|
126479
|
+
JS();this.dom.in\
|
|
126480
|
+
it();this.ui.ens\
|
|
126481
|
+
ureStickyHeaderS\
|
|
126482
|
+
tyle();this.tips\
|
|
126483
|
+
=new TipsManager\
|
|
126484
|
+
(this.dom);this.\
|
|
126485
|
+
events.install()\
|
|
126486
|
+
;this.bridge.ini\
|
|
126487
|
+
tQWebChannel(thi\
|
|
126488
|
+
s.cfg.PID,(bridg\
|
|
126489
|
+
e)=>{const onChu\
|
|
126490
|
+
nk=(name,chunk,t\
|
|
126491
|
+
ype)=>this.api_o\
|
|
126492
|
+
nChunk(name,chun\
|
|
126493
|
+
k,type);const on\
|
|
126494
|
+
Node=(payload)=>\
|
|
126495
|
+
this.api_appendN\
|
|
126496
|
+
ode(payload);con\
|
|
126497
|
+
st onNodeReplace\
|
|
126498
|
+
=(payload)=>this\
|
|
126499
|
+
.api_replaceNode\
|
|
126500
|
+
s(payload);const\
|
|
126501
|
+
onNodeInput=(ht\
|
|
126502
|
+
ml)=>this.api_ap\
|
|
126503
|
+
pendToInput(html\
|
|
126504
|
+
);this.bridge.co\
|
|
126505
|
+
nnect(onChunk,on\
|
|
126506
|
+
Node,onNodeRepla\
|
|
126507
|
+
ce,onNodeInput);\
|
|
126508
|
+
try{this.logger.\
|
|
126509
|
+
bindBridge(this.\
|
|
126510
|
+
bridge.bridge||t\
|
|
126511
|
+
his.bridge);}cat\
|
|
126512
|
+
ch(_){}});this.r\
|
|
126513
|
+
enderer.init();t\
|
|
126514
|
+
ry{this.renderer\
|
|
126515
|
+
.renderPendingMa\
|
|
126516
|
+
rkdown(document)\
|
|
126517
|
+
;}catch(_){}\x0athi\
|
|
126518
|
+
s.highlighter.ob\
|
|
126519
|
+
serveMsgBoxes(do\
|
|
126520
|
+
cument,(box)=>{t\
|
|
126521
|
+
his.highlighter.\
|
|
126522
|
+
observeNewCode(b\
|
|
126523
|
+
ox,{deferLastIfS\
|
|
126524
|
+
treaming:true,mi\
|
|
126525
|
+
nLinesForLast:th\
|
|
126526
|
+
is.cfg.PROFILE_C\
|
|
126527
|
+
ODE.minLinesForH\
|
|
126528
|
+
L,minCharsForLas\
|
|
126529
|
+
t:this.cfg.PROFI\
|
|
126530
|
+
LE_CODE.minChars\
|
|
126531
|
+
ForHL},this.stre\
|
|
126532
|
+
am.activeCode);t\
|
|
126533
|
+
his.codeScroll.i\
|
|
126534
|
+
nitScrollableBlo\
|
|
126535
|
+
cks(box);});this\
|
|
126536
|
+
.highlighter.obs\
|
|
126537
|
+
erveNewCode(docu\
|
|
126538
|
+
ment,{deferLastI\
|
|
126539
|
+
fStreaming:true,\
|
|
126540
|
+
minLinesForLast:\
|
|
126541
|
+
this.cfg.PROFILE\
|
|
126542
|
+
_CODE.minLinesFo\
|
|
126543
|
+
rHL,minCharsForL\
|
|
126544
|
+
ast:this.cfg.PRO\
|
|
126545
|
+
FILE_CODE.minCha\
|
|
126546
|
+
rsForHL},this.st\
|
|
126547
|
+
ream.activeCode)\
|
|
126548
|
+
;this.highlighte\
|
|
126549
|
+
r.scheduleScanVi\
|
|
126550
|
+
sibleCodes(this.\
|
|
126551
|
+
stream.activeCod\
|
|
126552
|
+
e);this.tips.cyc\
|
|
126553
|
+
le();this.scroll\
|
|
126554
|
+
Mgr.updateScroll\
|
|
126555
|
+
Fab(true);}\x0aclea\
|
|
126556
|
+
nup(){this.tips.\
|
|
126557
|
+
cleanup();try{th\
|
|
126558
|
+
is.bridge.discon\
|
|
126559
|
+
nect();}catch(_)\
|
|
126560
|
+
{}\x0athis.events.c\
|
|
126561
|
+
leanup();this.hi\
|
|
126562
|
+
ghlighter.cleanu\
|
|
126563
|
+
p();this.math.cl\
|
|
126564
|
+
eanup();this.str\
|
|
126565
|
+
eamQ.clear();thi\
|
|
126566
|
+
s.dom.cleanup();\
|
|
126567
|
+
}}\x0aif(typeof Raf\
|
|
126568
|
+
Manager!=='undef\
|
|
126569
|
+
ined'&&RafManage\
|
|
126570
|
+
r.prototype&&typ\
|
|
126571
|
+
eof RafManager.p\
|
|
126572
|
+
rototype.cancel=\
|
|
126573
|
+
=='function'){Ra\
|
|
126574
|
+
fManager.prototy\
|
|
126575
|
+
pe.cancel=functi\
|
|
126576
|
+
on(key){const t=\
|
|
126577
|
+
this.tasks.get(k\
|
|
126578
|
+
ey);if(!t)return\
|
|
126579
|
+
;this.tasks.dele\
|
|
126580
|
+
te(key);if(t.gro\
|
|
126581
|
+
up){const set=th\
|
|
126582
|
+
is.groups.get(t.\
|
|
126583
|
+
group);if(set){s\
|
|
126584
|
+
et.delete(key);i\
|
|
126585
|
+
f(set.size===0)t\
|
|
126586
|
+
his.groups.delet\
|
|
126587
|
+
e(t.group);}}};}\
|
|
126588
|
+
\x0awindow.__collap\
|
|
126589
|
+
sed_idx=window._\
|
|
126590
|
+
_collapsed_idx||\
|
|
126591
|
+
[];const runtime\
|
|
126592
|
+
=new Runtime();d\
|
|
126593
|
+
ocument.addEvent\
|
|
126594
|
+
Listener('DOMCon\
|
|
126595
|
+
tentLoaded',()=>\
|
|
126596
|
+
runtime.init());\
|
|
126597
|
+
Object.definePro\
|
|
126598
|
+
perty(window,'SE\
|
|
126599
|
+
',{get(){return \
|
|
126600
|
+
Utils.SE;}});win\
|
|
126601
|
+
dow.beginStream=\
|
|
126602
|
+
(chunk)=>runtime\
|
|
126603
|
+
.api_beginStream\
|
|
126604
|
+
(chunk);window.e\
|
|
126605
|
+
ndStream=()=>run\
|
|
126606
|
+
time.api_endStre\
|
|
126607
|
+
am();window.appl\
|
|
126608
|
+
yStream=(name,ch\
|
|
126609
|
+
unk)=>runtime.ap\
|
|
126610
|
+
i_applyStream(na\
|
|
126611
|
+
me,chunk);window\
|
|
126612
|
+
.appendStream=(n\
|
|
126613
|
+
ame,chunk)=>runt\
|
|
126614
|
+
ime.api_appendSt\
|
|
126615
|
+
ream(name,chunk)\
|
|
126616
|
+
;window.appendSt\
|
|
126617
|
+
reamTyped=(type,\
|
|
126618
|
+
name,chunk)=>run\
|
|
126619
|
+
time.api_onChunk\
|
|
126620
|
+
(name,chunk,type\
|
|
126621
|
+
);window.nextStr\
|
|
126622
|
+
eam=()=>runtime.\
|
|
126623
|
+
api_nextStream()\
|
|
126624
|
+
;window.clearStr\
|
|
126625
|
+
eam=()=>runtime.\
|
|
126626
|
+
api_clearStream(\
|
|
126627
|
+
);window.begin=(\
|
|
126628
|
+
)=>runtime.api_b\
|
|
126629
|
+
egin();window.en\
|
|
126630
|
+
d=()=>runtime.ap\
|
|
126631
|
+
i_end();window.a\
|
|
126632
|
+
ppendNode=(paylo\
|
|
126633
|
+
ad)=>runtime.api\
|
|
126634
|
+
_appendNode(payl\
|
|
126635
|
+
oad);window.repl\
|
|
126636
|
+
aceNodes=(payloa\
|
|
126637
|
+
d)=>runtime.api_\
|
|
126638
|
+
replaceNodes(pay\
|
|
126639
|
+
load);window.app\
|
|
126640
|
+
endToInput=(html\
|
|
126641
|
+
)=>runtime.api_a\
|
|
126642
|
+
ppendToInput(htm\
|
|
126643
|
+
l);window.clearN\
|
|
126644
|
+
odes=()=>runtime\
|
|
126645
|
+
.api_clearNodes(\
|
|
126646
|
+
);window.clearIn\
|
|
126647
|
+
put=()=>runtime.\
|
|
126648
|
+
api_clearInput()\
|
|
126649
|
+
;window.clearOut\
|
|
126650
|
+
put=()=>runtime.\
|
|
126651
|
+
api_clearOutput(\
|
|
126652
|
+
);window.clearLi\
|
|
126653
|
+
ve=()=>runtime.a\
|
|
126654
|
+
pi_clearLive();w\
|
|
126655
|
+
indow.appendTool\
|
|
126656
|
+
Output=(c)=>runt\
|
|
126657
|
+
ime.api_appendTo\
|
|
126658
|
+
olOutput(c);wind\
|
|
126659
|
+
ow.updateToolOut\
|
|
126660
|
+
put=(c)=>runtime\
|
|
126661
|
+
.api_updateToolO\
|
|
126662
|
+
utput(c);window.\
|
|
126663
|
+
clearToolOutput=\
|
|
126685
126664
|
()=>runtime.api_\
|
|
126686
|
-
|
|
126687
|
-
|
|
126665
|
+
clearToolOutput(\
|
|
126666
|
+
);window.beginTo\
|
|
126667
|
+
olOutput=()=>run\
|
|
126668
|
+
time.api_beginTo\
|
|
126669
|
+
olOutput();windo\
|
|
126670
|
+
w.endToolOutput=\
|
|
126688
126671
|
()=>runtime.api_\
|
|
126689
|
-
|
|
126690
|
-
|
|
126691
|
-
)=>
|
|
126692
|
-
|
|
126693
|
-
|
|
126694
|
-
|
|
126695
|
-
api_appendToolOu\
|
|
126696
|
-
tput(c);window.u\
|
|
126697
|
-
pdateToolOutput=\
|
|
126698
|
-
(c)=>runtime.api\
|
|
126699
|
-
_updateToolOutpu\
|
|
126700
|
-
t(c);window.clea\
|
|
126701
|
-
rToolOutput=()=>\
|
|
126702
|
-
runtime.api_clea\
|
|
126703
|
-
rToolOutput();wi\
|
|
126704
|
-
ndow.beginToolOu\
|
|
126705
|
-
tput=()=>runtime\
|
|
126706
|
-
.api_beginToolOu\
|
|
126707
|
-
tput();window.en\
|
|
126708
|
-
dToolOutput=()=>\
|
|
126709
|
-
runtime.api_endT\
|
|
126710
|
-
oolOutput();wind\
|
|
126711
|
-
ow.enableToolOut\
|
|
126672
|
+
endToolOutput();\
|
|
126673
|
+
window.enableToo\
|
|
126674
|
+
lOutput=()=>runt\
|
|
126675
|
+
ime.api_enableTo\
|
|
126676
|
+
olOutput();windo\
|
|
126677
|
+
w.disableToolOut\
|
|
126712
126678
|
put=()=>runtime.\
|
|
126713
|
-
|
|
126714
|
-
|
|
126715
|
-
|
|
126716
|
-
()=>runtime.
|
|
126717
|
-
|
|
126718
|
-
|
|
126719
|
-
|
|
126720
|
-
=>runtime.
|
|
126721
|
-
|
|
126722
|
-
|
|
126723
|
-
|
|
126724
|
-
|
|
126725
|
-
|
|
126726
|
-
|
|
126727
|
-
|
|
126728
|
-
|
|
126729
|
-
|
|
126730
|
-
|
|
126731
|
-
|
|
126732
|
-
|
|
126733
|
-
|
|
126734
|
-
|
|
126735
|
-
|
|
126736
|
-
|
|
126737
|
-
|
|
126738
|
-
|
|
126739
|
-
|
|
126740
|
-
|
|
126741
|
-
)=>runtime.api_e\
|
|
126742
|
-
nableEditIcons()\
|
|
126743
|
-
;window.disableE\
|
|
126744
|
-
ditIcons=()=>run\
|
|
126745
|
-
time.api_disable\
|
|
126746
|
-
EditIcons();wind\
|
|
126747
|
-
ow.enableTimesta\
|
|
126748
|
-
mp=()=>runtime.a\
|
|
126749
|
-
pi_enableTimesta\
|
|
126750
|
-
mp();window.disa\
|
|
126751
|
-
bleTimestamp=()=\
|
|
126679
|
+
api_disableToolO\
|
|
126680
|
+
utput();window.t\
|
|
126681
|
+
oggleToolOutput=\
|
|
126682
|
+
(id)=>runtime.ap\
|
|
126683
|
+
i_toggleToolOutp\
|
|
126684
|
+
ut(id);window.ap\
|
|
126685
|
+
pendExtra=(id,c)\
|
|
126686
|
+
=>runtime.api_ap\
|
|
126687
|
+
pendExtra(id,c);\
|
|
126688
|
+
window.removeNod\
|
|
126689
|
+
e=(id)=>runtime.\
|
|
126690
|
+
api_removeNode(i\
|
|
126691
|
+
d);window.remove\
|
|
126692
|
+
NodesFromId=(id)\
|
|
126693
|
+
=>runtime.api_re\
|
|
126694
|
+
moveNodesFromId(\
|
|
126695
|
+
id);window.repla\
|
|
126696
|
+
ceLive=(c)=>runt\
|
|
126697
|
+
ime.api_replaceL\
|
|
126698
|
+
ive(c);window.up\
|
|
126699
|
+
dateFooter=(c)=>\
|
|
126700
|
+
runtime.api_upda\
|
|
126701
|
+
teFooter(c);wind\
|
|
126702
|
+
ow.enableEditIco\
|
|
126703
|
+
ns=()=>runtime.a\
|
|
126704
|
+
pi_enableEditIco\
|
|
126705
|
+
ns();window.disa\
|
|
126706
|
+
bleEditIcons=()=\
|
|
126752
126707
|
>runtime.api_dis\
|
|
126753
|
-
|
|
126754
|
-
window.
|
|
126755
|
-
|
|
126756
|
-
|
|
126757
|
-
();window
|
|
126708
|
+
ableEditIcons();\
|
|
126709
|
+
window.enableTim\
|
|
126710
|
+
estamp=()=>runti\
|
|
126711
|
+
me.api_enableTim\
|
|
126712
|
+
estamp();window.\
|
|
126713
|
+
disableTimestamp\
|
|
126714
|
+
=()=>runtime.api\
|
|
126715
|
+
_disableTimestam\
|
|
126716
|
+
p();window.enabl\
|
|
126758
126717
|
eBlocks=()=>runt\
|
|
126759
|
-
ime.
|
|
126760
|
-
|
|
126761
|
-
|
|
126762
|
-
|
|
126763
|
-
|
|
126764
|
-
|
|
126765
|
-
|
|
126766
|
-
|
|
126767
|
-
|
|
126768
|
-
|
|
126769
|
-
|
|
126770
|
-
|
|
126771
|
-
|
|
126772
|
-
|
|
126773
|
-
|
|
126774
|
-
|
|
126775
|
-
|
|
126776
|
-
|
|
126777
|
-
|
|
126778
|
-
|
|
126779
|
-
|
|
126780
|
-
|
|
126781
|
-
|
|
126782
|
-
|
|
126783
|
-
|
|
126718
|
+
ime.api_enableBl\
|
|
126719
|
+
ocks();window.di\
|
|
126720
|
+
sableBlocks=()=>\
|
|
126721
|
+
runtime.api_disa\
|
|
126722
|
+
bleBlocks();wind\
|
|
126723
|
+
ow.updateCSS=(s)\
|
|
126724
|
+
=>runtime.api_up\
|
|
126725
|
+
dateCSS(s);windo\
|
|
126726
|
+
w.getScrollPosit\
|
|
126727
|
+
ion=()=>runtime.\
|
|
126728
|
+
api_getScrollPos\
|
|
126729
|
+
ition();window.s\
|
|
126730
|
+
etScrollPosition\
|
|
126731
|
+
=(pos)=>runtime.\
|
|
126732
|
+
api_setScrollPos\
|
|
126733
|
+
ition(pos);windo\
|
|
126734
|
+
w.showLoading=()\
|
|
126735
|
+
=>runtime.api_sh\
|
|
126736
|
+
owLoading();wind\
|
|
126737
|
+
ow.hideLoading=(\
|
|
126738
|
+
)=>runtime.api_h\
|
|
126739
|
+
ideLoading();win\
|
|
126740
|
+
dow.restoreColla\
|
|
126741
|
+
psedCode=(root)=\
|
|
126742
|
+
>runtime.api_res\
|
|
126743
|
+
toreCollapsedCod\
|
|
126744
|
+
e(root);window.s\
|
|
126745
|
+
crollToTopUser=(\
|
|
126746
|
+
)=>runtime.api_s\
|
|
126747
|
+
crollToTopUser()\
|
|
126748
|
+
;window.scrollTo\
|
|
126749
|
+
BottomUser=()=>r\
|
|
126784
126750
|
untime.api_scrol\
|
|
126785
|
-
|
|
126786
|
-
|
|
126787
|
-
|
|
126788
|
-
|
|
126789
|
-
|
|
126790
|
-
|
|
126791
|
-
|
|
126792
|
-
|
|
126793
|
-
|
|
126794
|
-
|
|
126795
|
-
);window
|
|
126796
|
-
|
|
126797
|
-
=>
|
|
126798
|
-
|
|
126799
|
-
|
|
126800
|
-
|
|
126801
|
-
=(
|
|
126802
|
-
|
|
126803
|
-
|
|
126804
|
-
|
|
126805
|
-
|
|
126806
|
-
|
|
126807
|
-
|
|
126808
|
-
|
|
126809
|
-
|
|
126810
|
-
|
|
126751
|
+
lToBottomUser();\
|
|
126752
|
+
window.showTips=\
|
|
126753
|
+
()=>runtime.api_\
|
|
126754
|
+
showTips();windo\
|
|
126755
|
+
w.hideTips=()=>r\
|
|
126756
|
+
untime.api_hideT\
|
|
126757
|
+
ips();window.get\
|
|
126758
|
+
CustomMarkupRule\
|
|
126759
|
+
s=()=>runtime.ap\
|
|
126760
|
+
i_getCustomMarku\
|
|
126761
|
+
pRules();window.\
|
|
126762
|
+
setCustomMarkupR\
|
|
126763
|
+
ules=(rules)=>ru\
|
|
126764
|
+
ntime.api_setCus\
|
|
126765
|
+
tomMarkupRules(r\
|
|
126766
|
+
ules);window.__p\
|
|
126767
|
+
ygpt_cleanup=()=\
|
|
126768
|
+
>runtime.cleanup\
|
|
126769
|
+
();RafManager.pr\
|
|
126770
|
+
ototype.stats=fu\
|
|
126771
|
+
nction(){const b\
|
|
126772
|
+
yGroup=new Map()\
|
|
126773
|
+
;for(const[key,t\
|
|
126774
|
+
]of this.tasks){\
|
|
126775
|
+
const g=t.group|\
|
|
126776
|
+
|'default';byGro\
|
|
126777
|
+
up.set(g,(byGrou\
|
|
126778
|
+
p.get(g)||0)+1);\
|
|
126779
|
+
}\x0areturn{tasks:t\
|
|
126780
|
+
his.tasks.size,g\
|
|
126781
|
+
roups:Array.from\
|
|
126782
|
+
(byGroup,([group\
|
|
126783
|
+
,count])=>({grou\
|
|
126784
|
+
p,count})).sort(\
|
|
126785
|
+
(a,b)=>b.count-a\
|
|
126786
|
+
.count)};};RafMa\
|
|
126787
|
+
nager.prototype.\
|
|
126788
|
+
dumpHotGroups=fu\
|
|
126789
|
+
nction(label='')\
|
|
126790
|
+
{const s=this.st\
|
|
126791
|
+
ats();console.lo\
|
|
126792
|
+
g('[RAF]',label,\
|
|
126793
|
+
'tasks=',s.tasks\
|
|
126794
|
+
,'byGroup=',s.gr\
|
|
126795
|
+
oups.slice(0,8))\
|
|
126796
|
+
;};RafManager.pr\
|
|
126797
|
+
ototype.findDomT\
|
|
126798
|
+
asks=function(){\
|
|
126799
|
+
const out=[];for\
|
|
126811
126800
|
(const[key,t]of \
|
|
126812
|
-
this.tasks){
|
|
126813
|
-
|
|
126814
|
-
|
|
126815
|
-
|
|
126816
|
-
|
|
126817
|
-
|
|
126818
|
-
|
|
126819
|
-
|
|
126820
|
-
|
|
126821
|
-
|
|
126822
|
-
|
|
126823
|
-
)
|
|
126824
|
-
|
|
126825
|
-
|
|
126826
|
-
|
|
126827
|
-
|
|
126828
|
-
|
|
126829
|
-
|
|
126830
|
-
|
|
126831
|
-
|
|
126832
|
-
|
|
126833
|
-
|
|
126834
|
-
|
|
126835
|
-
|
|
126836
|
-
=
|
|
126837
|
-
|
|
126838
|
-
|
|
126839
|
-
|
|
126840
|
-
|
|
126841
|
-
|
|
126842
|
-
|
|
126843
|
-
|
|
126844
|
-
|
|
126845
|
-
|
|
126846
|
-
|
|
126847
|
-
|
|
126848
|
-
|
|
126849
|
-
.isConnected});}\
|
|
126850
|
-
\x0areturn out;};fu\
|
|
126851
|
-
nction gaugeSE(s\
|
|
126852
|
-
e){const ropeLen\
|
|
126853
|
-
=(se.streamBuf.l\
|
|
126854
|
-
ength+se._sbLen)\
|
|
126855
|
-
;const ac=se.act\
|
|
126856
|
-
iveCode;const do\
|
|
126857
|
-
mFrozen=ac?.froz\
|
|
126858
|
-
enEl?.textConten\
|
|
126859
|
-
t?.length||0;con\
|
|
126860
|
-
st domTail=ac?.t\
|
|
126861
|
-
ailEl?.textConte\
|
|
126862
|
-
nt?.length||0;co\
|
|
126863
|
-
nst domLen=domFr\
|
|
126864
|
-
ozen+domTail;ret\
|
|
126865
|
-
urn{ropeLen,domL\
|
|
126866
|
-
en,totalChars:ro\
|
|
126867
|
-
peLen+domLen,rat\
|
|
126868
|
-
ioRopeToDom:(dom\
|
|
126869
|
-
Len?(ropeLen/dom\
|
|
126870
|
-
Len).toFixed(2):\
|
|
126871
|
-
'n/a'),fenceOpen\
|
|
126872
|
-
:se.fenceOpen,co\
|
|
126873
|
-
deOpen:se.codeSt\
|
|
126874
|
-
ream?.open};};\x0a\
|
|
126801
|
+
this.tasks){let \
|
|
126802
|
+
el=null;if(key&&\
|
|
126803
|
+
key.nodeType===1\
|
|
126804
|
+
)el=key;else if(\
|
|
126805
|
+
key&&key.el&&key\
|
|
126806
|
+
.el.nodeType===1\
|
|
126807
|
+
)el=key.el;if(el\
|
|
126808
|
+
)out.push({group\
|
|
126809
|
+
:t.group,tag:el.\
|
|
126810
|
+
tagName,connecte\
|
|
126811
|
+
d:el.isConnected\
|
|
126812
|
+
});}\x0areturn out;\
|
|
126813
|
+
};function gauge\
|
|
126814
|
+
SE(se){const rop\
|
|
126815
|
+
eLen=(se.streamB\
|
|
126816
|
+
uf.length+se._sb\
|
|
126817
|
+
Len);const ac=se\
|
|
126818
|
+
.activeCode;cons\
|
|
126819
|
+
t domFrozen=ac?.\
|
|
126820
|
+
frozenEl?.textCo\
|
|
126821
|
+
ntent?.length||0\
|
|
126822
|
+
;const domTail=a\
|
|
126823
|
+
c?.tailEl?.textC\
|
|
126824
|
+
ontent?.length||\
|
|
126825
|
+
0;const domLen=d\
|
|
126826
|
+
omFrozen+domTail\
|
|
126827
|
+
;return{ropeLen,\
|
|
126828
|
+
domLen,totalChar\
|
|
126829
|
+
s:ropeLen+domLen\
|
|
126830
|
+
,ratioRopeToDom:\
|
|
126831
|
+
(domLen?(ropeLen\
|
|
126832
|
+
/domLen).toFixed\
|
|
126833
|
+
(2):'n/a'),fence\
|
|
126834
|
+
Open:se.fenceOpe\
|
|
126835
|
+
n,codeOpen:se.co\
|
|
126836
|
+
deStream?.open};\
|
|
126837
|
+
};\x0a\
|
|
126875
126838
|
"
|
|
126876
126839
|
|
|
126877
126840
|
qt_resource_name = b"\
|
|
@@ -127004,34 +126967,34 @@ qt_resource_struct = b"\
|
|
|
127004
126967
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
|
127005
126968
|
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x1d\x00\x00\x00\x02\
|
|
127006
126969
|
\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x01\x00\x11.\x9b\
|
|
127007
|
-
\x00\x00\x01V\x00\x00\x00\x00\x00\x01\x00\x12\
|
|
126970
|
+
\x00\x00\x01V\x00\x00\x00\x00\x00\x01\x00\x12\xc7D\
|
|
127008
126971
|
\x00\x00\x00p\x00\x00\x00\x00\x00\x01\x00\x10\xde9\
|
|
127009
|
-
\x00\x00\x01r\x00\x00\x00\x00\x00\x01\x00\x12\
|
|
127010
|
-
\x00\x00\x02h\x00\x00\x00\x00\x00\x01\x00\x17\
|
|
126972
|
+
\x00\x00\x01r\x00\x00\x00\x00\x00\x01\x00\x12\xdd\x12\
|
|
126973
|
+
\x00\x00\x02h\x00\x00\x00\x00\x00\x01\x00\x17\xe6\xb5\
|
|
127011
126974
|
\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x10s\xea\
|
|
127012
|
-
\x00\x00\x02\x88\x00\x00\x00\x00\x00\x01\x00\x18\
|
|
127013
|
-
\x00\x00\x030\x00\x00\x00\x00\x00\x01\x00\x1b
|
|
127014
|
-
\x00\x00\x02\x0e\x00\x00\x00\x00\x00\x01\x00\
|
|
127015
|
-
\x00\x00\x03\x9c\x00\x00\x00\x00\x00\x01\x00\x1b\
|
|
127016
|
-
\x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x13\
|
|
127017
|
-
\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x01\x00\
|
|
127018
|
-
\x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\
|
|
126975
|
+
\x00\x00\x02\x88\x00\x00\x00\x00\x00\x01\x00\x18\x01\x94\
|
|
126976
|
+
\x00\x00\x030\x00\x00\x00\x00\x00\x01\x00\x1b)\xd0\
|
|
126977
|
+
\x00\x00\x02\x0e\x00\x00\x00\x00\x00\x01\x00\x13n4\
|
|
126978
|
+
\x00\x00\x03\x9c\x00\x00\x00\x00\x00\x01\x00\x1b\xb2\xf6\
|
|
126979
|
+
\x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x13\x10I\
|
|
126980
|
+
\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x01\x00\x11K\xe7\
|
|
126981
|
+
\x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\x13g.\
|
|
127019
126982
|
\x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x10\x8c-\
|
|
127020
|
-
\x00\x00\x016\x00\x00\x00\x00\x00\x01\x00\
|
|
127021
|
-
\x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x19\
|
|
127022
|
-
\x00\x00\x03R\x00\x00\x00\x00\x00\x01\x00\
|
|
127023
|
-
\x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x1a\
|
|
127024
|
-
\x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x13\
|
|
127025
|
-
\x00\x00\x02.\x00\x00\x00\x00\x00\x01\x00\x13\
|
|
126983
|
+
\x00\x00\x016\x00\x00\x00\x00\x00\x01\x00\x11m\xca\
|
|
126984
|
+
\x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x19\xe4z\
|
|
126985
|
+
\x00\x00\x03R\x00\x00\x00\x00\x00\x01\x00\x1bu \
|
|
126986
|
+
\x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x1a\x13\xe6\
|
|
126987
|
+
\x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x13\x06\xfb\
|
|
126988
|
+
\x00\x00\x02.\x00\x00\x00\x00\x00\x01\x00\x13\x85J\
|
|
127026
126989
|
\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
|
|
127027
|
-
\x00\x00\x03\x14\x00\x00\x00\x00\x00\x01\x00\x1b
|
|
127028
|
-
\x00\x00\x02L\x00\x00\x00\x00\x00\x01\x00\x17\
|
|
127029
|
-
\x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x13
|
|
126990
|
+
\x00\x00\x03\x14\x00\x00\x00\x00\x00\x01\x00\x1b\x1f\xf9\
|
|
126991
|
+
\x00\x00\x02L\x00\x00\x00\x00\x00\x01\x00\x17\xbec\
|
|
126992
|
+
\x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x13-\xb0\
|
|
127030
126993
|
\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x01\x00\x11\x07\xcf\
|
|
127031
|
-
\x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x1a\
|
|
127032
|
-
\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x01\x00\
|
|
127033
|
-
\x00\x00\x03r\x00\x00\x00\x00\x00\x01\x00\x1b\
|
|
127034
|
-
\x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\
|
|
126994
|
+
\x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x1a\x8b\xb8\
|
|
126995
|
+
\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x01\x00\x11E]\
|
|
126996
|
+
\x00\x00\x03r\x00\x00\x00\x00\x00\x01\x00\x1b\xa5\x5c\
|
|
126997
|
+
\x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\x11d\x16\
|
|
127035
126998
|
"
|
|
127036
126999
|
|
|
127037
127000
|
def qInitResources():
|