Changes for page Service Navigator

Last modified by Veronika Kocher on Thursday, 03 Sep 2026 14:15

From version 22.14
edited by Veronika Kocher
on Thursday, 03 Sep 2026 9:34
Change comment: There is no comment for this version
To version 22.17
edited by Veronika Kocher
on Thursday, 03 Sep 2026 14:15
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -286,23 +286,132 @@
286 286  {{/html}}
287 287  
288 288  {{html clean="false"}}
289 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
290 -<style data-sn-horizontal-box-harmonizer="4">
291 -[data-sn-equal-height-managed],
292 -[data-sn-first-section-aligned]{
289 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
290 +
291 +<style data-sn-service-navigator-master="1">
292 +/* =========================================================
293 + MASTER TYPOGRAPHY
294 + ========================================================= */
295 +#xwikicontent h1,
296 +#xwikicontent h2,
297 +#xwikicontent h3,
298 +#xwikicontent h4,
299 +#xwikicontent h5,
300 +#xwikicontent h6,
301 +#xwikicontent .box-title,
302 +#xwikicontent [role="heading"],
303 +#xwikicontent h1 a,
304 +#xwikicontent h2 a,
305 +#xwikicontent h3 a,
306 +#xwikicontent h4 a,
307 +#xwikicontent h5 a,
308 +#xwikicontent h6 a,
309 +#xwikicontent .box-title a,
310 +#xwikicontent [role="heading"] a{
311 + text-align:left!important;
312 + text-justify:auto!important;
313 + word-spacing:normal!important;
314 +}
315 +
316 +/* =========================================================
317 + COMING SOON / IN VORBEREITUNG
318 + ========================================================= */
319 +.sn-coming-soon-badge{
320 + display:inline-block;
321 + vertical-align:middle;
322 + margin-left:10px;
323 + padding:4px 8px;
324 + border-radius:14px;
325 + border:1px solid #efd9cc;
326 + background:#fff4ee;
327 + color:#8a4d36;
328 + font-size:11px;
329 + font-weight:700;
330 + letter-spacing:.055em;
331 + line-height:1.2;
332 + white-space:nowrap;
333 +}
334 +
335 +/* =========================================================
336 + NATIVE / DETAIL CALLOUT GEOMETRY
337 + Preserve existing backgrounds.
338 + ========================================================= */
339 +#xwikicontent .arsn-info,
340 +#xwikicontent .dmp-info,
341 +#xwikicontent .ido-info,
342 +#xwikicontent .pp-info,
343 +#xwikicontent .infomessage{
344 + box-sizing:border-box!important;
345 + border-left:4px solid #21b6d7!important;
346 + border-radius:8px;
347 + text-align:left!important;
348 + word-spacing:normal!important;
349 +}
350 +
351 +#xwikicontent .arsn-warn,
352 +#xwikicontent .dmp-warn,
353 +#xwikicontent .ido-warn,
354 +#xwikicontent .pp-warn,
355 +#xwikicontent .warn,
356 +#xwikicontent .warning,
357 +#xwikicontent .warningmessage,
358 +#xwikicontent .errormessage{
359 + box-sizing:border-box!important;
360 + border-left:4px solid #e94b13!important;
361 + border-radius:8px;
362 + text-align:left!important;
363 + word-spacing:normal!important;
364 +}
365 +
366 +[data-sn-master-equal-height],
367 +[data-sn-master-first-row]{
293 293   box-sizing:border-box;
294 294  }
370 +
371 +/* =========================================================
372 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS
373 + ========================================================= */
374 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{
375 + display:grid!important;
376 + grid-template-columns:minmax(0,1fr)!important;
377 + grid-auto-rows:auto!important;
378 + width:100%!important;
379 + max-width:none!important;
380 + box-sizing:border-box!important;
381 + justify-items:start!important;
382 + align-items:start!important;
383 + gap:2px!important;
384 + text-align:left!important;
385 + text-align-last:left!important;
386 + text-justify:auto!important;
387 + word-spacing:normal!important;
388 + white-space:normal!important;
389 +}
390 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number,
391 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title,
392 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{
393 + display:block!important;
394 + width:100%!important;
395 + margin:0!important;
396 + text-align:left!important;
397 + text-align-last:left!important;
398 + text-justify:auto!important;
399 + word-spacing:normal!important;
400 + white-space:normal!important;
401 +}
295 295  </style>
296 -<script data-sn-horizontal-box-harmonizer="4">
403 +
404 +<script data-sn-service-navigator-master="1">
297 297  (function(){
298 298   "use strict";
299 299  
408 + var PAGE_KIND="overview";
409 + var PLACEHOLDER=false;
410 + var PLACEHOLDER_LABEL="COMING SOON";
411 +
300 300   var MOBILE_MAX=767;
301 301   var ROW_TOLERANCE=6;
302 - var MIN_W=150;
303 - var MIN_H=36;
304 - var MAX_PARENT_CHILDREN=16;
305 - var SEARCH_DEPTH=5;
414 + var RESIZE_DEBOUNCE=220;
306 306  
307 307   var root=
308 308   document.getElementById("xwikicontent")||
... ... @@ -312,93 +312,105 @@
312 312  
313 313   if(!root)return;
314 314  
315 - var heightManaged=new Set();
316 - var sectionManaged=new Set();
317 - var originalMinHeight=new WeakMap();
318 - var originalMarginTop=new WeakMap();
319 - var raf=0;
424 + var managedHeight=new Set();
425 + var managedMargin=new Set();
426 + var originalHeight=new WeakMap();
427 + var originalMargin=new WeakMap();
320 320  
321 - function num(v){
322 - var n=parseFloat(v);
323 - return Number.isFinite(n)?n:0;
324 - }
429 + var resizeTimer=0;
430 + var running=false;
325 325  
326 - function visible(el,minW,minH){
327 - if(!el||el.nodeType!==1)return false;
328 -
329 - var s=getComputedStyle(el);
330 -
331 - if(
332 - s.display==="none"||
333 - s.visibility==="hidden"||
334 - Number(s.opacity)===0
335 - ){
336 - return false;
432 + var THEMES=[
433 + {
434 + name:"BLUE",
435 + accent:"#21b6d7",
436 + bg:"#eaf7fb",
437 + text:"#315d68",
438 + labels:[
439 + "HIER STARTEN",
440 + "ENTSCHEIDEN",
441 + "ÜBERPRÜFEN & ANPASSEN",
442 + "START HERE",
443 + "DECIDE",
444 + "REVIEW & ADAPT"
445 + ]
446 + },
447 + {
448 + name:"RED",
449 + accent:"#e94b13",
450 + bg:"#fff1ec",
451 + text:"#8a4d36",
452 + labels:[
453 + "PLANEN & ORGANISIEREN",
454 + "ORGANISIEREN & DOKUMENTIEREN",
455 + "PUBLIZIEREN & PRÄSENTIEREN",
456 + "PLAN & ORGANISE",
457 + "PLAN & ORGANIZE",
458 + "ORGANISE & DOCUMENT",
459 + "ORGANIZE & DOCUMENT",
460 + "PUBLISH & PRESENT"
461 + ]
462 + },
463 + {
464 + name:"YELLOW",
465 + accent:"#f0aa00",
466 + bg:"#fff8e7",
467 + text:"#785b17",
468 + labels:[
469 + "SCHÜTZEN & KLÄREN",
470 + "STANDARDISIEREN & IDENTIFIZIEREN",
471 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
472 + "PROTECT & CLARIFY",
473 + "STANDARDISE & IDENTIFY",
474 + "STANDARDIZE & IDENTIFY",
475 + "OPEN, REUSE & MAKE FINDABLE"
476 + ]
477 + },
478 + {
479 + name:"GREEN",
480 + accent:"#38b76a",
481 + bg:"#edf9f1",
482 + text:"#3f7451",
483 + labels:[
484 + "INFRASTRUKTUR EINRICHTEN",
485 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
486 + "SPEICHERN & ZUGRIFF STEUERN",
487 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
488 + "SET UP INFRASTRUCTURE",
489 + "SET UP INFRASTRUCTURE & COLLABORATION",
490 + "STORE & CONTROL ACCESS",
491 + "REPOSITORY, PRESERVE & HAND OVER"
492 + ]
337 337   }
494 + ];
338 338  
339 - var r=el.getBoundingClientRect();
340 -
341 - return (
342 - r.width>=(minW||1)&&
343 - r.height>=(minH||1)
344 - );
496 + function num(value){
497 + var n=parseFloat(value);
498 + return Number.isFinite(n)?n:0;
345 345   }
346 346  
347 - function excluded(el){
348 - return (
349 - !el.matches||
350 - el.matches(
351 - "button,input,select,textarea,option,label,img,svg,canvas,table,thead,tbody,tfoot,tr,td,th,summary,script,style,noscript,template,.btn,.chip,[role=button]"
352 - )
353 - );
501 + function norm(value){
502 + return String(value||"")
503 + .replace(/\s+/g," ")
504 + .trim()
505 + .toUpperCase();
354 354   }
355 355  
356 - function namedLikeBox(el){
357 - var c=
358 - typeof el.className==="string"
359 - ? el.className
360 - : "";
508 + function visible(el){
509 + if(!el||el.nodeType!==1)return false;
361 361  
362 - return /(^|[s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([s_-]|$)/i.test(c);
363 - }
511 + var style=getComputedStyle(el);
512 + var rect=el.getBoundingClientRect();
364 364  
365 - function boxLike(el){
366 - if(!visible(el,MIN_W,MIN_H)||excluded(el))return false;
367 -
368 - var s=getComputedStyle(el);
369 - var r=el.getBoundingClientRect();
370 -
371 - var border=
372 - num(s.borderTopWidth)+
373 - num(s.borderRightWidth)+
374 - num(s.borderBottomWidth)+
375 - num(s.borderLeftWidth);
376 -
377 - var radius=Math.max(
378 - num(s.borderTopLeftRadius),
379 - num(s.borderTopRightRadius),
380 - num(s.borderBottomLeftRadius),
381 - num(s.borderBottomRightRadius)
382 - );
383 -
384 - var bg=
385 - s.backgroundColor&&
386 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&&
387 - s.backgroundColor!=="transparent";
388 -
389 - var shadow=
390 - s.boxShadow&&
391 - s.boxShadow!=="none";
392 -
393 393   return (
394 - namedLikeBox(el)||
395 - border>=1||
396 - (bg&&radius>=3)||
397 - (shadow&&r.width>=180)
515 + style.display!=="none"&&
516 + style.visibility!=="hidden"&&
517 + rect.width>20&&
518 + rect.height>4
398 398   );
399 399   }
400 400  
401 - function saveOriginal(el,map,property){
522 + function saveStyle(el,map,property){
402 402   if(map.has(el))return;
403 403  
404 404   map.set(el,{
... ... @@ -407,7 +407,7 @@
407 407   });
408 408   }
409 409  
410 - function restoreOriginal(el,map,property){
531 + function restoreStyle(el,map,property){
411 411   var original=map.get(el);
412 412  
413 413   if(original&&original.value){
... ... @@ -421,247 +421,470 @@
421 421   }
422 422   }
423 423  
424 - function reset(){
425 - heightManaged.forEach(function(el){
426 - restoreOriginal(
545 + function resetRuntime(){
546 + managedHeight.forEach(function(el){
547 + restoreStyle(
427 427   el,
428 - originalMinHeight,
549 + originalHeight,
429 429   "min-height"
430 430   );
431 -
432 432   el.removeAttribute(
433 - "data-sn-equal-height-managed"
553 + "data-sn-master-equal-height"
434 434   );
435 435   });
436 436  
437 - sectionManaged.forEach(function(el){
438 - restoreOriginal(
557 + managedMargin.forEach(function(el){
558 + restoreStyle(
439 439   el,
440 - originalMarginTop,
560 + originalMargin,
441 441   "margin-top"
442 442   );
443 -
444 444   el.removeAttribute(
445 - "data-sn-first-section-aligned"
564 + "data-sn-master-first-row"
446 446   );
447 447   });
448 448  
449 - heightManaged.clear();
450 - sectionManaged.clear();
568 + managedHeight.clear();
569 + managedMargin.clear();
451 451   }
452 452  
453 - function pickTarget(child){
454 - if(!visible(child,MIN_W,MIN_H))return null;
572 + function themeFor(text){
573 + var value=norm(text);
455 455  
456 - if(boxLike(child)){
457 - return child;
575 + for(var i=0;i<THEMES.length;i++){
576 + for(var j=0;j<THEMES[i].labels.length;j++){
577 + var label=THEMES[i].labels[j];
578 +
579 + if(
580 + value===label||
581 + value.indexOf(label+" ")===0||
582 + value.indexOf(label+" -")===0||
583 + value.indexOf(label+" ·")===0
584 + ){
585 + return THEMES[i];
586 + }
587 + }
458 458   }
459 459  
460 - var cr=child.getBoundingClientRect();
461 - var q=[];
590 + return null;
591 + }
462 462  
463 - Array.from(child.children||[]).forEach(function(el){
464 - q.push({el:el,depth:1});
593 + /* =======================================================
594 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS
595 + ======================================================= */
596 +
597 + function colourDistance(a,b){
598 + return Math.sqrt(
599 + Math.pow(a[0]-b[0],2)+
600 + Math.pow(a[1]-b[1],2)+
601 + Math.pow(a[2]-b[2],2)
602 + );
603 + }
604 +
605 + function makeFilledRedOrangeCTAsBorderless(){
606 + var RED_ORANGE=[233,75,19];
607 +
608 + Array.from(
609 + root.querySelectorAll(
610 + 'a,button,[role="button"],input[type="submit"],input[type="button"]'
611 + )
612 + ).forEach(function(el){
613 + if(!visible(el))return;
614 +
615 + var style=getComputedStyle(el);
616 + var rgb=parseRGB(style.backgroundColor);
617 +
618 + if(!rgb)return;
619 +
620 + if(
621 + colourDistance(
622 + rgb,
623 + RED_ORANGE
624 + )>55
625 + ){
626 + return;
627 + }
628 +
629 + var rect=el.getBoundingClientRect();
630 +
631 + if(
632 + rect.width<80||
633 + rect.height<24
634 + ){
635 + return;
636 + }
637 +
638 + el.style.setProperty(
639 + "border",
640 + "none",
641 + "important"
642 + );
643 +
644 + el.style.setProperty(
645 + "border-left",
646 + "none",
647 + "important"
648 + );
649 +
650 + el.style.setProperty(
651 + "border-top",
652 + "none",
653 + "important"
654 + );
655 +
656 + el.style.setProperty(
657 + "border-right",
658 + "none",
659 + "important"
660 + );
661 +
662 + el.style.setProperty(
663 + "border-bottom",
664 + "none",
665 + "important"
666 + );
667 +
668 + el.style.setProperty(
669 + "box-shadow",
670 + "none",
671 + "important"
672 + );
465 465   });
674 + }
466 466  
467 - var best=null;
468 - var bestScore=-Infinity;
676 + /* =======================================================
677 + FULL-WIDTH THREE-LINE AREA LABELS
678 + ======================================================= */
469 469  
470 - while(q.length){
471 - var item=q.shift();
472 - var el=item.el;
680 + function compactText(value){
681 + return String(value||"")
682 + .replace(/\s+/g," ")
683 + .trim();
684 + }
473 473  
474 - if(!visible(el,MIN_W,MIN_H))continue;
686 + function makeThreeLineAreaLabels(){
687 + Array.from(
688 + root.querySelectorAll(
689 + ".arsn-area-label"
690 + )
691 + ).forEach(function(label){
692 + if(
693 + label.getAttribute(
694 + "data-sn-three-line"
695 + )==="1"
696 + ){
697 + return;
698 + }
475 475  
476 - var r=el.getBoundingClientRect();
700 + var number=
701 + label.querySelector(
702 + ":scope > .arsn-area-number"
703 + );
477 477  
705 + var action=
706 + label.querySelector(
707 + ":scope > .arsn-area-action"
708 + );
709 +
478 478   if(
479 - r.width>=cr.width*.68&&
480 - boxLike(el)
711 + !number||
712 + !action
481 481   ){
482 - var widthFit=
483 - 1-Math.min(
484 - 1,
485 - Math.abs(cr.width-r.width)/
486 - Math.max(1,cr.width)
487 - );
714 + return;
715 + }
488 488  
489 - var topFit=
490 - 1-Math.min(
491 - 1,
492 - Math.abs(cr.top-r.top)/100
493 - );
717 + var clone=
718 + label.cloneNode(true);
494 494  
495 - var score=
496 - widthFit*6+
497 - topFit*3+
498 - Math.min(r.height,900)/450+
499 - Math.min(r.width*r.height,900000)/900000;
720 + var cloneNumber=
721 + clone.querySelector(
722 + ":scope > .arsn-area-number"
723 + );
500 500  
501 - if(score>bestScore){
502 - best=el;
503 - bestScore=score;
504 - }
725 + var cloneAction=
726 + clone.querySelector(
727 + ":scope > .arsn-area-action"
728 + );
729 +
730 + if(cloneNumber){
731 + cloneNumber.remove();
505 505   }
506 506  
507 - if(item.depth<SEARCH_DEPTH){
508 - Array.from(el.children||[]).forEach(function(next){
509 - q.push({
510 - el:next,
511 - depth:item.depth+1
512 - });
513 - });
734 + if(cloneAction){
735 + cloneAction.remove();
514 514   }
515 - }
516 516  
517 - return best;
518 - }
738 + var titleText=
739 + compactText(
740 + clone.textContent
741 + );
519 519  
520 - function groupsByVisualRow(entries){
521 - var groups=[];
743 + if(!titleText){
744 + return;
745 + }
522 522  
523 - entries
524 - .slice()
525 - .sort(function(a,b){
526 - return (
527 - a.rect.top-b.rect.top||
528 - a.rect.left-b.rect.left
747 + var numberNode=
748 + number.cloneNode(true);
749 +
750 + var actionNode=
751 + action.cloneNode(true);
752 +
753 + var titleNode=
754 + document.createElement(
755 + "span"
529 529   );
530 - })
531 - .forEach(function(entry){
532 - var group=null;
533 533  
534 - for(var i=0;i<groups.length;i++){
535 - if(
536 - Math.abs(
537 - groups[i].top-
538 - entry.rect.top
539 - )<=ROW_TOLERANCE
540 - ){
541 - group=groups[i];
542 - break;
543 - }
544 - }
758 + titleNode.className=
759 + "sn-area-label-title";
545 545  
546 - if(!group){
547 - group={
548 - top:entry.rect.top,
549 - entries:[]
550 - };
551 - groups.push(group);
552 - }
761 + titleNode.textContent=
762 + titleText;
553 553  
554 - group.entries.push(entry);
555 - });
764 + while(label.firstChild){
765 + label.removeChild(
766 + label.firstChild
767 + );
768 + }
556 556  
557 - return groups;
770 + label.appendChild(
771 + numberNode
772 + );
773 +
774 + label.appendChild(
775 + titleNode
776 + );
777 +
778 + label.appendChild(
779 + actionNode
780 + );
781 +
782 + label.setAttribute(
783 + "data-sn-three-line",
784 + "1"
785 + );
786 +
787 + var head=
788 + label.closest(
789 + ".arsn-area-head"
790 + );
791 +
792 + if(head){
793 + head.style.setProperty(
794 + "width",
795 + "100%",
796 + "important"
797 + );
798 +
799 + head.style.setProperty(
800 + "max-width",
801 + "100%",
802 + "important"
803 + );
804 +
805 + head.style.setProperty(
806 + "box-sizing",
807 + "border-box",
808 + "important"
809 + );
810 + }
811 + });
558 558   }
559 559  
560 - function validHorizontalGroup(group){
561 - if(group.entries.length<2)return false;
814 + /* =======================================================
815 + PLACEHOLDER BADGE
816 + ======================================================= */
562 562  
563 - var lefts=
564 - group.entries
565 - .map(function(e){return e.rect.left;})
566 - .sort(function(a,b){return a-b;});
818 + function applyPlaceholderBadge(){
819 + if(!PLACEHOLDER)return;
567 567  
568 568   if(
569 - lefts[lefts.length-1]-
570 - lefts[0]<
571 - 80
822 + document.querySelector(
823 + ".sn-coming-soon-badge"
824 + )
572 572   ){
573 - return false;
826 + return;
574 574   }
575 575  
576 - var widths=
577 - group.entries
578 - .map(function(e){return e.rect.width;})
579 - .filter(function(w){return w>0;});
829 + var title=
830 + document.querySelector(
831 + "#document-title"
832 + )||
833 + document.querySelector(
834 + "h1"
835 + );
580 580  
581 - if(widths.length<2)return false;
837 + if(!title)return;
582 582  
583 - var minWidth=Math.min.apply(Math,widths);
584 - var maxWidth=Math.max.apply(Math,widths);
839 + var badge=
840 + document.createElement(
841 + "span"
842 + );
585 585  
586 - return (
587 - maxWidth/
588 - Math.max(1,minWidth)<=
589 - 1.9
844 + badge.className=
845 + "sn-coming-soon-badge";
846 +
847 + badge.textContent=
848 + PLACEHOLDER_LABEL;
849 +
850 + badge.setAttribute(
851 + "aria-label",
852 + PLACEHOLDER_LABEL
590 590   );
591 - }
592 592  
593 - function normalizeText(text){
594 - return String(text||"")
595 - .replace(/s+/g," ")
596 - .trim()
597 - .toUpperCase();
855 + title.appendChild(
856 + badge
857 + );
598 598   }
599 599  
600 - function exactKnownFirstSection(el){
601 - var text=normalizeText(el.textContent);
860 + /* =======================================================
861 + DETAIL PAGE OWN-ACCENT PROPAGATION
862 + ======================================================= */
602 602  
603 - return (
604 - text==="HIER STARTEN"||
605 - text==="ORGANISIEREN & DOKUMENTIEREN"||
606 - text==="ENTSCHEIDEN"||
607 - text==="START HERE"||
608 - text==="GET STARTED"||
609 - text==="ORGANISE & DOCUMENT"||
610 - text==="ORGANIZE & DOCUMENT"||
611 - text==="DECIDE"
864 + function parseRGB(value){
865 + var match=String(value||"").match(
866 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
612 612   );
868 +
869 + if(!match)return null;
870 +
871 + return [
872 + Number(match[1]),
873 + Number(match[2]),
874 + Number(match[3])
875 + ];
613 613   }
614 614  
615 - function visuallyFirstSectionBar(card){
616 - var cardRect=card.getBoundingClientRect();
617 - var candidates=[];
878 + function distance(a,b){
879 + return Math.sqrt(
880 + Math.pow(a[0]-b[0],2)+
881 + Math.pow(a[1]-b[1],2)+
882 + Math.pow(a[2]-b[2],2)
883 + );
884 + }
618 618  
886 + function paletteMatch(cssColor){
887 + var rgb=parseRGB(cssColor);
888 +
889 + if(!rgb)return null;
890 +
891 + var palette=[
892 + {hex:"#21b6d7",rgb:[33,182,215]},
893 + {hex:"#e94b13",rgb:[233,75,19]},
894 + {hex:"#f0aa00",rgb:[240,170,0]},
895 + {hex:"#38b76a",rgb:[56,183,106]}
896 + ];
897 +
898 + var best=null;
899 + var bestDistance=Infinity;
900 +
901 + palette.forEach(function(item){
902 + var d=distance(rgb,item.rgb);
903 +
904 + if(d<bestDistance){
905 + best=item;
906 + bestDistance=d;
907 + }
908 + });
909 +
910 + return bestDistance<=30
911 + ?best
912 + :null;
913 + }
914 +
915 + function propagateDetailAccents(){
916 + if(PAGE_KIND!=="detail")return;
917 +
619 619   Array.from(
620 - card.querySelectorAll(
621 - "div,p,span,strong,h3,h4,h5,h6"
919 + root.querySelectorAll(
920 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
921 + ".arsn-source,.dmp-source,.ido-source,.pp-source"
622 622   )
623 623   ).forEach(function(el){
624 - if(!visible(el,20,6))return;
625 - if(excluded(el))return;
924 + if(!visible(el))return;
626 626  
627 - var r=el.getBoundingClientRect();
628 - var relativeTop=r.top-cardRect.top;
926 + var style=getComputedStyle(el);
629 629  
630 630   if(
631 - relativeTop<45||
632 - relativeTop>cardRect.height*.72
929 + num(style.borderTopWidth)>=2
633 633   ){
634 - return;
931 + var match=
932 + paletteMatch(
933 + style.borderTopColor
934 + );
935 +
936 + if(match){
937 + el.style.setProperty(
938 + "border-left",
939 + "4px solid "+match.hex,
940 + "important"
941 + );
942 + }
635 635   }
944 + });
636 636  
637 - var widthRatio=
638 - r.width/
639 - Math.max(1,cardRect.width);
946 + // Warning families: explicit safety override.
947 + Array.from(
948 + root.querySelectorAll(
949 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
950 + ".warn,.warning,.warningmessage,.errormessage"
951 + )
952 + ).forEach(function(el){
953 + if(!visible(el))return;
640 640  
641 - if(
642 - widthRatio<.55||
643 - widthRatio>1.05||
644 - r.height>54
645 - ){
646 - return;
647 - }
955 + el.style.setProperty(
956 + "border-left",
957 + "4px solid #e94b13",
958 + "important"
959 + );
960 + });
648 648  
649 - var text=normalizeText(el.textContent);
962 + // Info families: explicit orientation override.
963 + Array.from(
964 + root.querySelectorAll(
965 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
966 + )
967 + ).forEach(function(el){
968 + if(!visible(el))return;
650 650  
651 - if(
652 - text.length<2||
653 - text.length>90
654 - ){
655 - return;
656 - }
970 + el.style.setProperty(
971 + "border-left",
972 + "4px solid #21b6d7",
973 + "important"
974 + );
975 + });
976 + }
657 657  
658 - var style=getComputedStyle(el);
978 + /* =======================================================
979 + OVERVIEW SEMANTIC THEME PALETTE
980 + ======================================================= */
659 659  
660 - var bg=
661 - style.backgroundColor&&
662 - style.backgroundColor!=="rgba(0, 0, 0, 0)"&&
663 - style.backgroundColor!=="transparent";
982 + function smallestThemeHeaders(){
983 + return Array.from(
984 + root.querySelectorAll(
985 + "div,span,p,strong,h3,h4,h5,h6"
986 + )
987 + ).filter(function(el){
988 + if(!visible(el))return false;
989 + if(!themeFor(el.textContent))return false;
664 664  
991 + return !Array.from(
992 + el.children||[]
993 + ).some(function(child){
994 + return !!themeFor(
995 + child.textContent
996 + );
997 + });
998 + });
999 + }
1000 +
1001 + function findOverviewCard(header){
1002 + var node=header.parentElement;
1003 + var candidates=[];
1004 +
1005 + while(node&&node!==root){
1006 + var rect=node.getBoundingClientRect();
1007 + var style=getComputedStyle(node);
1008 +
665 665   var border=
666 666   num(style.borderTopWidth)+
667 667   num(style.borderRightWidth)+
... ... @@ -668,315 +668,677 @@
668 668   num(style.borderBottomWidth)+
669 669   num(style.borderLeftWidth);
670 670  
671 - var mostlyUpper=
672 - text.length>=3&&
673 - text===text.toUpperCase();
674 -
675 - var exact=exactKnownFirstSection(el);
676 -
677 - var score=
678 - (exact?20:0)+
679 - (bg?6:0)+
680 - (border>=1?2:0)+
681 - (mostlyUpper?4:0)+
682 - (num(style.fontWeight)>=600?1:0);
683 -
684 - if(score>=7){
685 - candidates.push({
686 - el:el,
687 - relativeTop:relativeTop,
688 - width:r.width,
689 - score:score
690 - });
1015 + if(
1016 + rect.width>=220&&
1017 + rect.width<=800&&
1018 + rect.height>=120&&
1019 + border>=1
1020 + ){
1021 + candidates.push(node);
691 691   }
692 - });
693 693  
1024 + node=node.parentElement;
1025 + }
1026 +
694 694   if(!candidates.length)return null;
695 695  
696 696   candidates.sort(function(a,b){
697 - if(a.score!==b.score)return b.score-a.score;
698 - if(Math.abs(a.relativeTop-b.relativeTop)>3){
699 - return a.relativeTop-b.relativeTop;
700 - }
701 - return b.width-a.width;
1030 + return (
1031 + b.getBoundingClientRect().height-
1032 + a.getBoundingClientRect().height
1033 + );
702 702   });
703 703  
704 - // For exact known labels always prefer the earliest exact match.
705 - var exacts=candidates.filter(function(c){
706 - return exactKnownFirstSection(c.el);
707 - });
1036 + return candidates[0];
1037 + }
708 708  
709 - if(exacts.length){
710 - exacts.sort(function(a,b){
711 - return a.relativeTop-b.relativeTop||b.width-a.width;
712 - });
713 - return exacts[0].el;
714 - }
1039 + function rowCandidates(link,card){
1040 + var result=[];
1041 + var cardRect=
1042 + card.getBoundingClientRect();
715 715  
716 - // Generic fallback: earliest high-confidence bar.
717 - candidates.sort(function(a,b){
718 - return a.relativeTop-b.relativeTop||b.score-a.score||b.width-a.width;
719 - });
1044 + var node=link;
720 720  
721 - return candidates[0].el;
722 - }
1046 + while(node&&node!==card){
1047 + if(visible(node)){
1048 + var rect=
1049 + node.getBoundingClientRect();
723 723  
724 - function alignFirstSections(cards){
725 - var rows=
726 - cards.map(function(card){
727 - var bar=
728 - visuallyFirstSectionBar(card);
1051 + if(
1052 + rect.height<=105&&
1053 + rect.width>=
1054 + cardRect.width*.50&&
1055 + rect.width<=
1056 + cardRect.width*1.03
1057 + ){
1058 + result.push(node);
1059 + }
1060 + }
729 729  
730 - if(!bar)return null;
1062 + node=node.parentElement;
1063 + }
731 731  
732 - var cardRect=
733 - card.getBoundingClientRect();
1065 + return result;
1066 + }
734 734  
735 - var barRect=
736 - bar.getBoundingClientRect();
1068 + function chooseOuterRow(
1069 + candidates,
1070 + link
1071 + ){
1072 + if(!candidates.length){
1073 + return link;
1074 + }
737 737  
738 - return {
739 - card:card,
740 - bar:bar,
741 - relativeTop:
742 - barRect.top-cardRect.top,
743 - label:
744 - normalizeText(bar.textContent)
745 - };
1076 + var bordered=
1077 + candidates.filter(function(el){
1078 + return (
1079 + num(
1080 + getComputedStyle(el)
1081 + .borderLeftWidth
1082 + )>=1
1083 + );
746 746   });
747 747  
748 - // Conservative: only align when every card in the horizontal row
749 - // has a reliable first section bar.
750 - if(
751 - rows.some(function(row){
752 - return !row;
753 - })
754 - ){
755 - return null;
1086 + var pool=
1087 + bordered.length
1088 + ?bordered
1089 + :candidates;
1090 +
1091 + pool.sort(function(a,b){
1092 + var ar=
1093 + a.getBoundingClientRect();
1094 +
1095 + var br=
1096 + b.getBoundingClientRect();
1097 +
1098 + return (
1099 + ar.left-br.left||
1100 + br.width-ar.width
1101 + );
1102 + });
1103 +
1104 + return pool[0]||link;
1105 + }
1106 +
1107 + function applyOverviewPalette(){
1108 + if(PAGE_KIND!=="overview"){
1109 + return [];
756 756   }
757 757  
758 - var targetTop=
759 - Math.max.apply(
760 - Math,
761 - rows.map(function(row){
762 - return row.relativeTop;
1112 + var headers=
1113 + smallestThemeHeaders()
1114 + .map(function(el){
1115 + return {
1116 + el:el,
1117 + theme:
1118 + themeFor(
1119 + el.textContent
1120 + ),
1121 + card:
1122 + findOverviewCard(
1123 + el
1124 + )
1125 + };
763 763   })
764 - );
1127 + .filter(function(row){
1128 + return !!row.card;
1129 + });
765 765  
766 - rows.forEach(function(row){
767 - var delta=
768 - targetTop-
769 - row.relativeTop;
1131 + var unique=[];
1132 + var seenHeaders=new Set();
770 770  
771 - if(delta<=1)return;
1134 + headers.forEach(function(row){
1135 + var key=
1136 + row.theme.name+
1137 + "|"+
1138 + Math.round(
1139 + row.card
1140 + .getBoundingClientRect()
1141 + .left
1142 + )+
1143 + "|"+
1144 + Math.round(
1145 + row.el
1146 + .getBoundingClientRect()
1147 + .top
1148 + );
772 772  
773 - saveOriginal(
774 - row.bar,
775 - originalMarginTop,
776 - "margin-top"
1150 + if(!seenHeaders.has(key)){
1151 + seenHeaders.add(key);
1152 + unique.push(row);
1153 + }
1154 + });
1155 +
1156 + unique.forEach(function(row){
1157 + var headerRect=
1158 + row.el
1159 + .getBoundingClientRect();
1160 +
1161 + row.el.style.setProperty(
1162 + "background",
1163 + row.theme.bg,
1164 + "important"
777 777   );
778 778  
779 - var currentMargin=
780 - num(
781 - getComputedStyle(
782 - row.bar
783 - ).marginTop
784 - );
1167 + row.el.style.setProperty(
1168 + "color",
1169 + row.theme.text,
1170 + "important"
1171 + );
785 785  
786 - row.bar.style.setProperty(
787 - "margin-top",
788 - (
789 - currentMargin+
790 - delta
791 - )+"px"
1173 + row.el.style.setProperty(
1174 + "text-align",
1175 + "left",
1176 + "important"
792 792   );
793 793  
794 - row.bar.setAttribute(
795 - "data-sn-first-section-aligned",
796 - "4"
1179 + row.el.style.setProperty(
1180 + "word-spacing",
1181 + "normal",
1182 + "important"
797 797   );
798 798  
799 - sectionManaged.add(row.bar);
1185 + var later=
1186 + unique
1187 + .filter(function(other){
1188 + return (
1189 + other.card===row.card&&
1190 + other.el
1191 + .getBoundingClientRect()
1192 + .top>
1193 + headerRect.top+2
1194 + );
1195 + })
1196 + .sort(function(a,b){
1197 + return (
1198 + a.el
1199 + .getBoundingClientRect()
1200 + .top-
1201 + b.el
1202 + .getBoundingClientRect()
1203 + .top
1204 + );
1205 + });
1206 +
1207 + var stopTop=
1208 + later.length
1209 + ?later[0].el
1210 + .getBoundingClientRect()
1211 + .top
1212 + :Infinity;
1213 +
1214 + Array.from(
1215 + row.card.querySelectorAll("a")
1216 + ).forEach(function(link){
1217 + if(!visible(link))return;
1218 +
1219 + var rect=
1220 + link.getBoundingClientRect();
1221 +
1222 + if(
1223 + rect.top<=
1224 + headerRect.bottom-2||
1225 + rect.top>=
1226 + stopTop-2
1227 + ){
1228 + return;
1229 + }
1230 +
1231 + var candidates=
1232 + rowCandidates(
1233 + link,
1234 + row.card
1235 + );
1236 +
1237 + var target=
1238 + chooseOuterRow(
1239 + candidates,
1240 + link
1241 + );
1242 +
1243 + candidates.forEach(function(el){
1244 + el.style.setProperty(
1245 + "border-left",
1246 + "0 solid transparent",
1247 + "important"
1248 + );
1249 + });
1250 +
1251 + target.style.setProperty(
1252 + "border-left",
1253 + "3px solid "+
1254 + row.theme.accent,
1255 + "important"
1256 + );
1257 +
1258 + target.style.setProperty(
1259 + "box-sizing",
1260 + "border-box",
1261 + "important"
1262 + );
1263 + });
800 800   });
801 801  
802 - return {
803 - labels:
804 - rows.map(function(row){
805 - return row.label;
806 - }),
807 - targetRelativeTop:
808 - Math.round(targetTop)
809 - };
1266 + return unique;
810 810   }
811 811  
812 - function applyGroup(group){
813 - if(!validHorizontalGroup(group)){
814 - return null;
1269 + /* =======================================================
1270 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
1271 + ======================================================= */
1272 +
1273 + function alignOverviewCards(headers){
1274 + if(
1275 + PAGE_KIND!=="overview"||
1276 + window.innerWidth<=MOBILE_MAX
1277 + ){
1278 + return;
815 815   }
816 816  
817 817   var cards=[];
818 818   var seen=new Set();
819 819  
820 - group.entries.forEach(function(entry){
821 - if(!seen.has(entry.target)){
822 - seen.add(entry.target);
823 - cards.push(entry.target);
1284 + headers.forEach(function(row){
1285 + if(!seen.has(row.card)){
1286 + seen.add(row.card);
1287 + cards.push(row.card);
824 824   }
825 825   });
826 826  
827 - if(cards.length<2)return null;
1291 + if(cards.length<2){
1292 + return;
1293 + }
828 828  
829 - var firstSection=
830 - alignFirstSections(cards);
1295 + // Group cards by actual top position.
1296 + var groups=[];
831 831  
832 - // The section alignment can change natural card heights.
833 - // Measure only afterwards.
834 - var maxHeight=0;
835 -
836 836   cards.forEach(function(card){
837 - maxHeight=Math.max(
838 - maxHeight,
839 - card.getBoundingClientRect().height
840 - );
1299 + var top=
1300 + card.getBoundingClientRect().top;
1301 +
1302 + var group=null;
1303 +
1304 + for(var i=0;i<groups.length;i++){
1305 + if(
1306 + Math.abs(
1307 + groups[i].top-top
1308 + )<=ROW_TOLERANCE
1309 + ){
1310 + group=groups[i];
1311 + break;
1312 + }
1313 + }
1314 +
1315 + if(!group){
1316 + group={
1317 + top:top,
1318 + cards:[]
1319 + };
1320 + groups.push(group);
1321 + }
1322 +
1323 + group.cards.push(card);
841 841   });
842 842  
843 - maxHeight=Math.ceil(maxHeight);
1326 + groups.forEach(function(group){
1327 + if(group.cards.length<2){
1328 + return;
1329 + }
844 844  
845 - if(maxHeight<MIN_H)return null;
1331 + var firstHeaders=
1332 + group.cards.map(function(card){
1333 + var candidates=
1334 + headers
1335 + .filter(function(row){
1336 + return row.card===card;
1337 + })
1338 + .sort(function(a,b){
1339 + return (
1340 + a.el
1341 + .getBoundingClientRect()
1342 + .top-
1343 + b.el
1344 + .getBoundingClientRect()
1345 + .top
1346 + );
1347 + });
846 846  
847 - cards.forEach(function(card){
848 - saveOriginal(
849 - card,
850 - originalMinHeight,
851 - "min-height"
852 - );
1349 + return candidates.length
1350 + ?candidates[0]
1351 + :null;
1352 + });
853 853  
854 - card.style.setProperty(
855 - "min-height",
856 - maxHeight+"px"
857 - );
1354 + if(
1355 + !firstHeaders.some(function(row){
1356 + return !row;
1357 + })
1358 + ){
1359 + var targetTop=
1360 + Math.max.apply(
1361 + Math,
1362 + firstHeaders.map(function(row){
1363 + return (
1364 + row.el
1365 + .getBoundingClientRect()
1366 + .top-
1367 + row.card
1368 + .getBoundingClientRect()
1369 + .top
1370 + );
1371 + })
1372 + );
858 858  
859 - card.setAttribute(
860 - "data-sn-equal-height-managed",
861 - "4"
862 - );
1374 + firstHeaders.forEach(function(row){
1375 + var relativeTop=
1376 + row.el
1377 + .getBoundingClientRect()
1378 + .top-
1379 + row.card
1380 + .getBoundingClientRect()
1381 + .top;
863 863  
864 - heightManaged.add(card);
865 - });
1383 + var delta=
1384 + targetTop-relativeTop;
866 866  
867 - return {
868 - cards:cards.length,
869 - height:maxHeight,
870 - firstSection:firstSection
871 - };
1386 + if(delta>1){
1387 + saveStyle(
1388 + row.el,
1389 + originalMargin,
1390 + "margin-top"
1391 + );
1392 +
1393 + var current=
1394 + num(
1395 + getComputedStyle(
1396 + row.el
1397 + ).marginTop
1398 + );
1399 +
1400 + row.el.style.setProperty(
1401 + "margin-top",
1402 + (
1403 + current+delta
1404 + )+"px"
1405 + );
1406 +
1407 + row.el.setAttribute(
1408 + "data-sn-master-first-row",
1409 + "1"
1410 + );
1411 +
1412 + managedMargin.add(
1413 + row.el
1414 + );
1415 + }
1416 + });
1417 + }
1418 +
1419 + var maxHeight=0;
1420 +
1421 + group.cards.forEach(function(card){
1422 + maxHeight=
1423 + Math.max(
1424 + maxHeight,
1425 + card
1426 + .getBoundingClientRect()
1427 + .height
1428 + );
1429 + });
1430 +
1431 + maxHeight=
1432 + Math.ceil(maxHeight);
1433 +
1434 + group.cards.forEach(function(card){
1435 + saveStyle(
1436 + card,
1437 + originalHeight,
1438 + "min-height"
1439 + );
1440 +
1441 + card.style.setProperty(
1442 + "min-height",
1443 + maxHeight+"px"
1444 + );
1445 +
1446 + card.setAttribute(
1447 + "data-sn-master-equal-height",
1448 + "1"
1449 + );
1450 +
1451 + managedHeight.add(
1452 + card
1453 + );
1454 + });
1455 + });
872 872   }
873 873  
874 - function run(){
875 - reset();
1458 + /* =======================================================
1459 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
1460 + ======================================================= */
876 876  
1462 + function equaliseDetailGrids(){
877 877   if(
1464 + PAGE_KIND!=="detail"||
878 878   window.innerWidth<=MOBILE_MAX
879 879   ){
880 880   return;
881 881   }
882 882  
883 - var parents=
1470 + var selectors=[
1471 + ".arsn-grid",
1472 + ".arsn-grid-2",
1473 + ".arsn-grid-3",
1474 + ".dmp-grid",
1475 + ".ido-grid",
1476 + ".pp-grid"
1477 + ];
1478 +
1479 + selectors.forEach(function(selector){
884 884   Array.from(
885 - root.querySelectorAll("*")
886 - ).filter(function(parent){
887 - return (
888 - visible(parent,MIN_W,MIN_H)&&
889 - parent.children&&
890 - parent.children.length>=2&&
891 - parent.children.length<=MAX_PARENT_CHILDREN
892 - );
893 - });
1481 + root.querySelectorAll(selector)
1482 + ).forEach(function(grid){
1483 + var children=
1484 + Array.from(
1485 + grid.children||[]
1486 + ).filter(visible);
894 894  
895 - var touched=new Set();
1488 + if(children.length<2){
1489 + return;
1490 + }
896 896  
897 - parents.forEach(function(parent){
898 - var entries=[];
1492 + var groups=[];
899 899  
900 - Array.from(parent.children).forEach(function(child){
901 - if(!visible(child,MIN_W,MIN_H))return;
1494 + children.forEach(function(child){
1495 + var top=
1496 + child
1497 + .getBoundingClientRect()
1498 + .top;
902 902  
903 - var target=pickTarget(child);
904 - if(!target)return;
1500 + var group=null;
905 905  
906 - entries.push({
907 - target:target,
908 - rect:target.getBoundingClientRect()
1502 + for(var i=0;i<groups.length;i++){
1503 + if(
1504 + Math.abs(
1505 + groups[i].top-top
1506 + )<=ROW_TOLERANCE
1507 + ){
1508 + group=groups[i];
1509 + break;
1510 + }
1511 + }
1512 +
1513 + if(!group){
1514 + group={
1515 + top:top,
1516 + items:[]
1517 + };
1518 + groups.push(group);
1519 + }
1520 +
1521 + group.items.push(child);
909 909   });
910 - });
911 911  
912 - if(entries.length<2)return;
1524 + groups.forEach(function(group){
1525 + if(group.items.length<2){
1526 + return;
1527 + }
913 913  
914 - groupsByVisualRow(entries).forEach(function(group){
915 - if(!validHorizontalGroup(group))return;
1529 + var maxHeight=0;
916 916  
917 - var signature=
918 - group.entries.map(function(entry){
919 - return entry.target;
1531 + group.items.forEach(function(item){
1532 + maxHeight=
1533 + Math.max(
1534 + maxHeight,
1535 + item
1536 + .getBoundingClientRect()
1537 + .height
1538 + );
920 920   });
921 921  
922 - if(
923 - !signature.some(function(el){
924 - return !touched.has(el);
925 - })
926 - ){
927 - return;
928 - }
1541 + maxHeight=
1542 + Math.ceil(maxHeight);
929 929  
930 - var applied=
931 - applyGroup(group);
1544 + group.items.forEach(function(item){
1545 + saveStyle(
1546 + item,
1547 + originalHeight,
1548 + "min-height"
1549 + );
932 932  
933 - if(applied){
934 - signature.forEach(function(el){
935 - touched.add(el);
1551 + item.style.setProperty(
1552 + "min-height",
1553 + maxHeight+"px"
1554 + );
1555 +
1556 + item.setAttribute(
1557 + "data-sn-master-equal-height",
1558 + "1"
1559 + );
1560 +
1561 + managedHeight.add(item);
936 936   });
937 - }
1563 + });
938 938   });
939 939   });
940 940   }
941 941  
942 - function schedule(){
943 - if(raf)cancelAnimationFrame(raf);
1568 + /* =======================================================
1569 + RUN / RESPONSIVE SCHEDULING
1570 + ======================================================= */
944 944  
945 - raf=requestAnimationFrame(function(){
946 - raf=requestAnimationFrame(function(){
947 - raf=0;
948 - run();
949 - });
950 - });
1572 + function run(){
1573 + if(running)return;
1574 +
1575 + running=true;
1576 +
1577 + try{
1578 + resetRuntime();
1579 + applyPlaceholderBadge();
1580 + propagateDetailAccents();
1581 +
1582 + var headers=
1583 + applyOverviewPalette();
1584 +
1585 + makeThreeLineAreaLabels();
1586 + makeFilledRedOrangeCTAsBorderless();
1587 +
1588 + if(
1589 + window.innerWidth>
1590 + MOBILE_MAX
1591 + ){
1592 + alignOverviewCards(
1593 + headers
1594 + );
1595 +
1596 + equaliseDetailGrids();
1597 + }
1598 + }finally{
1599 + running=false;
1600 + }
951 951   }
952 952  
953 - addEventListener("resize",schedule,{passive:true});
954 - addEventListener("load",schedule,{once:true});
1603 + function onResize(){
1604 + if(resizeTimer){
1605 + clearTimeout(
1606 + resizeTimer
1607 + );
1608 + }
955 955  
956 - root.addEventListener(
957 - "click",
958 - function(){
959 - setTimeout(schedule,0);
960 - },
961 - true
962 - );
1610 + resizeTimer=
1611 + setTimeout(
1612 + function(){
1613 + resizeTimer=0;
1614 + run();
1615 + },
1616 + RESIZE_DEBOUNCE
1617 + );
1618 + }
963 963  
964 - Array.from(root.querySelectorAll("img")).forEach(function(img){
965 - if(!img.complete){
966 - img.addEventListener("load",schedule,{once:true});
1620 + async function waitForReady(){
1621 + if(
1622 + document.readyState!=="complete"
1623 + ){
1624 + await new Promise(function(resolve){
1625 + window.addEventListener(
1626 + "load",
1627 + resolve,
1628 + {once:true}
1629 + );
1630 + });
967 967   }
968 - });
969 969  
970 - if(document.fonts&&document.fonts.ready){
971 - document.fonts.ready.then(schedule);
1633 + if(
1634 + document.fonts&&
1635 + document.fonts.ready
1636 + ){
1637 + try{
1638 + await document.fonts.ready;
1639 + }catch(error){}
1640 + }
1641 +
1642 + var images=
1643 + Array.from(
1644 + root.querySelectorAll("img")
1645 + );
1646 +
1647 + await Promise.all(
1648 + images.map(function(img){
1649 + if(img.complete){
1650 + return Promise.resolve();
1651 + }
1652 +
1653 + return new Promise(function(resolve){
1654 + var done=function(){
1655 + resolve();
1656 + };
1657 +
1658 + img.addEventListener(
1659 + "load",
1660 + done,
1661 + {once:true}
1662 + );
1663 +
1664 + img.addEventListener(
1665 + "error",
1666 + done,
1667 + {once:true}
1668 + );
1669 + });
1670 + })
1671 + );
1672 +
1673 + run();
972 972   }
973 973  
974 - schedule();
975 - setTimeout(schedule,200);
976 - setTimeout(schedule,650);
977 - setTimeout(schedule,1400);
1676 + window.addEventListener(
1677 + "resize",
1678 + onResize,
1679 + {passive:true}
1680 + );
1681 +
1682 + waitForReady();
978 978  })();
979 979  </script>
980 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1685 +
1686 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
981 981  {{/html}}
982 982