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