Changes for page Get Started

Last modified by Veronika Kocher on Friday, 04 Sep 2026 15:32

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

Summary

Details

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