Änderungen von Dokument Get Started

Zuletzt geändert von Veronika Kocher am Freitag, 04 Sep. 2026 14:45

Von Version 2.9
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 14:15
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 2.6
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 9:34
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

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