Changes for page Prepare

Last modified by Veronika Kocher on Friday, 18 Sep 2026 16:47

From version 30.3
edited by Veronika Kocher
on Friday, 04 Sep 2026 14:23
Change comment: There is no comment for this version
To version 29.8
edited by Veronika Kocher
on Thursday, 03 Sep 2026 9:34
Change comment: There is no comment for this version

Summary

Details

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