Last modified by Veronika Kocher on Friday, 04 Sep 2026 14:45

From version 9.1
edited by Veronika Kocher
on Tuesday, 01 Sep 2026 10:25
Change comment: There is no comment for this version
To version 9.5
edited by Veronika Kocher
on Thursday, 03 Sep 2026 10:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Content
... ... @@ -425,3 +425,1120 @@
425 425  </div>
426 426  {{/html}}
427 427  
428 +\n\n
429 +\n\n{{html clean="false"}}
430 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
431 +
432 +<style data-sn-horizontal-box-harmonizer="7">
433 +/* ---------- Typography: never justify headings ---------- */
434 +#xwikicontent h1,
435 +#xwikicontent h2,
436 +#xwikicontent h3,
437 +#xwikicontent h4,
438 +#xwikicontent h5,
439 +#xwikicontent h6,
440 +#xwikicontent .box-title,
441 +#xwikicontent [role="heading"],
442 +#xwikicontent h1 a,
443 +#xwikicontent h2 a,
444 +#xwikicontent h3 a,
445 +#xwikicontent h4 a,
446 +#xwikicontent h5 a,
447 +#xwikicontent h6 a,
448 +#xwikicontent .box-title a,
449 +#xwikicontent [role="heading"] a{
450 + text-align:left!important;
451 + text-justify:auto!important;
452 + word-spacing:normal!important;
453 +}
454 +
455 +/* ---------- Native XWiki semantic callouts ---------- */
456 +#xwikicontent .box.infomessage,
457 +#xwikicontent .infomessage,
458 +#xwikicontent .box.warningmessage,
459 +#xwikicontent .warningmessage,
460 +#xwikicontent .box.successmessage,
461 +#xwikicontent .successmessage,
462 +#xwikicontent .box.errormessage,
463 +#xwikicontent .errormessage,
464 +#xwikicontent [data-sn-callout-harmonized="1"]{
465 + box-sizing:border-box!important;
466 + border-radius:8px!important;
467 + border-top:1px solid rgba(0,0,0,.08)!important;
468 + border-right:1px solid rgba(0,0,0,.08)!important;
469 + border-bottom:1px solid rgba(0,0,0,.08)!important;
470 + border-left:4px solid var(--sn-callout-accent,#21b6d7)!important;
471 + padding:14px 16px!important;
472 + text-align:left!important;
473 + text-justify:auto!important;
474 + word-spacing:normal!important;
475 + box-shadow:none!important;
476 +}
477 +
478 +#xwikicontent .box.infomessage,
479 +#xwikicontent .infomessage{
480 + --sn-callout-accent:#21b6d7;
481 + background:#eaf7fb!important;
482 +}
483 +
484 +#xwikicontent .box.warningmessage,
485 +#xwikicontent .warningmessage{
486 + --sn-callout-accent:#f0aa00;
487 + background:#fff8e7!important;
488 +}
489 +
490 +#xwikicontent .box.successmessage,
491 +#xwikicontent .successmessage{
492 + --sn-callout-accent:#38b76a;
493 + background:#edf9f1!important;
494 +}
495 +
496 +#xwikicontent .box.errormessage,
497 +#xwikicontent .errormessage{
498 + --sn-callout-accent:#e94b13;
499 + background:#fff1ec!important;
500 +}
501 +
502 +#xwikicontent [data-sn-callout-harmonized="1"] > :first-child,
503 +#xwikicontent .infomessage > :first-child,
504 +#xwikicontent .warningmessage > :first-child,
505 +#xwikicontent .successmessage > :first-child,
506 +#xwikicontent .errormessage > :first-child{
507 + margin-top:0!important;
508 +}
509 +
510 +#xwikicontent [data-sn-callout-harmonized="1"] > :last-child,
511 +#xwikicontent .infomessage > :last-child,
512 +#xwikicontent .warningmessage > :last-child,
513 +#xwikicontent .successmessage > :last-child,
514 +#xwikicontent .errormessage > :last-child{
515 + margin-bottom:0!important;
516 +}
517 +
518 +#xwikicontent [data-sn-equal-height-managed],
519 +#xwikicontent [data-sn-first-section-aligned],
520 +#xwikicontent [data-sn-first-content-aligned]{
521 + box-sizing:border-box;
522 +}
523 +</style>
524 +
525 +<script data-sn-horizontal-box-harmonizer="7">
526 +(function(){
527 + "use strict";
528 +
529 + var MOBILE_MAX=767;
530 + var ROW_TOLERANCE=6;
531 + var MIN_W=150;
532 + var MIN_H=36;
533 + var MAX_PARENT_CHILDREN=18;
534 + var SEARCH_DEPTH=5;
535 + var RESIZE_DEBOUNCE=220;
536 + var MIN_WIDTH_CHANGE=2;
537 +
538 + var root=
539 + document.getElementById("xwikicontent")||
540 + document.querySelector(".xwiki-rendering-content")||
541 + document.querySelector("main")||
542 + document.body;
543 +
544 + if(!root)return;
545 +
546 + var heightManaged=new Set();
547 + var sectionManaged=new Set();
548 + var contentManaged=new Set();
549 +
550 + var originalMinHeight=new WeakMap();
551 + var originalMarginTop=new WeakMap();
552 +
553 + var resizeTimer=0;
554 + var lastWidth=-1;
555 + var hasApplied=false;
556 + var applying=false;
557 +
558 + function num(v){
559 + var n=parseFloat(v);
560 + return Number.isFinite(n)?n:0;
561 + }
562 +
563 + function visible(el,minW,minH){
564 + if(!el||el.nodeType!==1)return false;
565 +
566 + var s=getComputedStyle(el);
567 +
568 + if(
569 + s.display==="none"||
570 + s.visibility==="hidden"||
571 + Number(s.opacity)===0
572 + ){
573 + return false;
574 + }
575 +
576 + var r=el.getBoundingClientRect();
577 +
578 + return (
579 + r.width>=(minW||1)&&
580 + r.height>=(minH||1)
581 + );
582 + }
583 +
584 + function normalizeText(text){
585 + return String(text||"")
586 + .replace(/\s+/g," ")
587 + .trim()
588 + .toUpperCase();
589 + }
590 +
591 + function excluded(el){
592 + return (
593 + !el.matches||
594 + el.matches(
595 + "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]"
596 + )
597 + );
598 + }
599 +
600 + /* ---------- Custom coloured callouts ---------- */
601 +
602 + function nativeCallout(el){
603 + var c=
604 + typeof el.className==="string"
605 + ? el.className.toLowerCase()
606 + : "";
607 +
608 + return (
609 + /(^|\s)(infomessage|warningmessage|successmessage|errormessage)(\s|$)/.test(c)
610 + );
611 + }
612 +
613 + function customCallout(el){
614 + if(!visible(el,220,42)||excluded(el))return false;
615 +
616 + var r=el.getBoundingClientRect();
617 +
618 + if(r.height>520)return false;
619 +
620 + var s=getComputedStyle(el);
621 +
622 + var bg=
623 + s.backgroundColor&&
624 + s.backgroundColor!=="rgba(0, 0, 0, 0)"&&
625 + s.backgroundColor!=="transparent"&&
626 + s.backgroundColor!=="rgb(255, 255, 255)";
627 +
628 + var left=
629 + num(s.borderLeftWidth);
630 +
631 + return (
632 + bg&&
633 + left>=2
634 + );
635 + }
636 +
637 + function harmoniseCustomCallouts(){
638 + Array.from(
639 + root.querySelectorAll(
640 + "div,aside,section"
641 + )
642 + ).forEach(function(el){
643 + if(nativeCallout(el))return;
644 + if(!customCallout(el))return;
645 +
646 + var s=getComputedStyle(el);
647 +
648 + el.setAttribute(
649 + "data-sn-callout-harmonized",
650 + "1"
651 + );
652 +
653 + if(
654 + s.borderLeftColor
655 + ){
656 + el.style.setProperty(
657 + "--sn-callout-accent",
658 + s.borderLeftColor
659 + );
660 + }
661 + });
662 + }
663 +
664 + /* ---------- Restore only values V7 itself changed ---------- */
665 +
666 + function saveOriginal(el,map,property){
667 + if(map.has(el))return;
668 +
669 + map.set(el,{
670 + value:
671 + el.style.getPropertyValue(
672 + property
673 + ),
674 + priority:
675 + el.style.getPropertyPriority(
676 + property
677 + )
678 + });
679 + }
680 +
681 + function restoreOriginal(el,map,property){
682 + var original=map.get(el);
683 +
684 + if(original&&original.value){
685 + el.style.setProperty(
686 + property,
687 + original.value,
688 + original.priority||""
689 + );
690 + }else{
691 + el.style.removeProperty(
692 + property
693 + );
694 + }
695 + }
696 +
697 + function resetRuntime(){
698 + heightManaged.forEach(function(el){
699 + restoreOriginal(
700 + el,
701 + originalMinHeight,
702 + "min-height"
703 + );
704 +
705 + el.removeAttribute(
706 + "data-sn-equal-height-managed"
707 + );
708 + });
709 +
710 + sectionManaged.forEach(function(el){
711 + restoreOriginal(
712 + el,
713 + originalMarginTop,
714 + "margin-top"
715 + );
716 +
717 + el.removeAttribute(
718 + "data-sn-first-section-aligned"
719 + );
720 + });
721 +
722 + contentManaged.forEach(function(el){
723 + restoreOriginal(
724 + el,
725 + originalMarginTop,
726 + "margin-top"
727 + );
728 +
729 + el.removeAttribute(
730 + "data-sn-first-content-aligned"
731 + );
732 + });
733 +
734 + heightManaged.clear();
735 + sectionManaged.clear();
736 + contentManaged.clear();
737 + }
738 +
739 + /* ---------- Card detection ---------- */
740 +
741 + function namedLikeBox(el){
742 + var c=
743 + typeof el.className==="string"
744 + ? el.className
745 + : "";
746 +
747 + return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c);
748 + }
749 +
750 + function boxLike(el){
751 + if(
752 + !visible(el,MIN_W,MIN_H)||
753 + excluded(el)
754 + ){
755 + return false;
756 + }
757 +
758 + var s=getComputedStyle(el);
759 + var r=el.getBoundingClientRect();
760 +
761 + var border=
762 + num(s.borderTopWidth)+
763 + num(s.borderRightWidth)+
764 + num(s.borderBottomWidth)+
765 + num(s.borderLeftWidth);
766 +
767 + var radius=Math.max(
768 + num(s.borderTopLeftRadius),
769 + num(s.borderTopRightRadius),
770 + num(s.borderBottomLeftRadius),
771 + num(s.borderBottomRightRadius)
772 + );
773 +
774 + var bg=
775 + s.backgroundColor&&
776 + s.backgroundColor!=="rgba(0, 0, 0, 0)"&&
777 + s.backgroundColor!=="transparent";
778 +
779 + var shadow=
780 + s.boxShadow&&
781 + s.boxShadow!=="none";
782 +
783 + return (
784 + namedLikeBox(el)||
785 + border>=1||
786 + (bg&&radius>=3)||
787 + (shadow&&r.width>=180)
788 + );
789 + }
790 +
791 + function pickTarget(child){
792 + if(!visible(child,MIN_W,MIN_H))return null;
793 +
794 + if(boxLike(child))return child;
795 +
796 + var cr=child.getBoundingClientRect();
797 + var q=[];
798 +
799 + Array.from(child.children||[]).forEach(function(el){
800 + q.push({el:el,depth:1});
801 + });
802 +
803 + var best=null;
804 + var bestScore=-Infinity;
805 +
806 + while(q.length){
807 + var item=q.shift();
808 + var el=item.el;
809 +
810 + if(!visible(el,MIN_W,MIN_H))continue;
811 +
812 + var r=el.getBoundingClientRect();
813 +
814 + if(
815 + r.width>=cr.width*.68&&
816 + boxLike(el)
817 + ){
818 + var widthFit=
819 + 1-Math.min(
820 + 1,
821 + Math.abs(cr.width-r.width)/
822 + Math.max(1,cr.width)
823 + );
824 +
825 + var topFit=
826 + 1-Math.min(
827 + 1,
828 + Math.abs(cr.top-r.top)/100
829 + );
830 +
831 + var score=
832 + widthFit*6+
833 + topFit*3+
834 + Math.min(r.height,900)/450+
835 + Math.min(r.width*r.height,900000)/900000;
836 +
837 + if(score>bestScore){
838 + best=el;
839 + bestScore=score;
840 + }
841 + }
842 +
843 + if(item.depth<SEARCH_DEPTH){
844 + Array.from(el.children||[]).forEach(function(next){
845 + q.push({
846 + el:next,
847 + depth:item.depth+1
848 + });
849 + });
850 + }
851 + }
852 +
853 + return best;
854 + }
855 +
856 + function groupRows(entries){
857 + var groups=[];
858 +
859 + entries
860 + .slice()
861 + .sort(function(a,b){
862 + return (
863 + a.rect.top-b.rect.top||
864 + a.rect.left-b.rect.left
865 + );
866 + })
867 + .forEach(function(entry){
868 + var group=null;
869 +
870 + for(var i=0;i<groups.length;i++){
871 + if(
872 + Math.abs(
873 + groups[i].top-
874 + entry.rect.top
875 + )<=ROW_TOLERANCE
876 + ){
877 + group=groups[i];
878 + break;
879 + }
880 + }
881 +
882 + if(!group){
883 + group={
884 + top:entry.rect.top,
885 + entries:[]
886 + };
887 + groups.push(group);
888 + }
889 +
890 + group.entries.push(entry);
891 + });
892 +
893 + return groups;
894 + }
895 +
896 + function validRow(group){
897 + if(group.entries.length<2)return false;
898 +
899 + var lefts=
900 + group.entries
901 + .map(function(e){return e.rect.left;})
902 + .sort(function(a,b){return a-b;});
903 +
904 + if(
905 + lefts[lefts.length-1]-
906 + lefts[0]<
907 + 80
908 + ){
909 + return false;
910 + }
911 +
912 + var widths=
913 + group.entries
914 + .map(function(e){return e.rect.width;})
915 + .filter(function(w){return w>0;});
916 +
917 + if(widths.length<2)return false;
918 +
919 + var minW=
920 + Math.min.apply(Math,widths);
921 +
922 + var maxW=
923 + Math.max.apply(Math,widths);
924 +
925 + return (
926 + maxW/
927 + Math.max(1,minW)<=
928 + 1.9
929 + );
930 + }
931 +
932 + /* ---------- Known ARSN first section bars ---------- */
933 +
934 + function knownBar(el){
935 + var text=
936 + normalizeText(
937 + el.textContent
938 + );
939 +
940 + return (
941 + text==="HIER STARTEN"||
942 + text==="ORGANISIEREN & DOKUMENTIEREN"||
943 + text==="ENTSCHEIDEN"||
944 + text==="START HERE"||
945 + text==="GET STARTED"||
946 + text==="ORGANISE & DOCUMENT"||
947 + text==="ORGANIZE & DOCUMENT"||
948 + text==="DECIDE"
949 + );
950 + }
951 +
952 + function findKnownBar(card){
953 + var cardRect=
954 + card.getBoundingClientRect();
955 +
956 + var rows=
957 + Array.from(
958 + card.querySelectorAll(
959 + "div,p,span,strong,h3,h4,h5,h6"
960 + )
961 + )
962 + .filter(function(el){
963 + if(!visible(el,20,6))return false;
964 + if(!knownBar(el))return false;
965 +
966 + var r=el.getBoundingClientRect();
967 +
968 + var rel=
969 + r.top-
970 + cardRect.top;
971 +
972 + return (
973 + rel>=35&&
974 + rel<=
975 + cardRect.height*.75
976 + );
977 + })
978 + .sort(function(a,b){
979 + return (
980 + a.getBoundingClientRect().top-
981 + b.getBoundingClientRect().top
982 + );
983 + });
984 +
985 + return rows[0]||null;
986 + }
987 +
988 + function alignKnownBars(cards){
989 + var rows=
990 + cards.map(function(card){
991 + var bar=
992 + findKnownBar(card);
993 +
994 + if(!bar)return null;
995 +
996 + var cr=
997 + card.getBoundingClientRect();
998 +
999 + var br=
1000 + bar.getBoundingClientRect();
1001 +
1002 + return {
1003 + bar:bar,
1004 + relativeTop:
1005 + br.top-
1006 + cr.top
1007 + };
1008 + });
1009 +
1010 + if(
1011 + rows.some(function(row){
1012 + return !row;
1013 + })
1014 + ){
1015 + return false;
1016 + }
1017 +
1018 + var target=
1019 + Math.max.apply(
1020 + Math,
1021 + rows.map(function(row){
1022 + return row.relativeTop;
1023 + })
1024 + );
1025 +
1026 + rows.forEach(function(row){
1027 + var delta=
1028 + target-
1029 + row.relativeTop;
1030 +
1031 + if(delta<=1)return;
1032 +
1033 + saveOriginal(
1034 + row.bar,
1035 + originalMarginTop,
1036 + "margin-top"
1037 + );
1038 +
1039 + var current=
1040 + num(
1041 + getComputedStyle(
1042 + row.bar
1043 + ).marginTop
1044 + );
1045 +
1046 + row.bar.style.setProperty(
1047 + "margin-top",
1048 + (
1049 + current+
1050 + delta
1051 + )+"px"
1052 + );
1053 +
1054 + row.bar.setAttribute(
1055 + "data-sn-first-section-aligned",
1056 + "7"
1057 + );
1058 +
1059 + sectionManaged.add(
1060 + row.bar
1061 + );
1062 + });
1063 +
1064 + return true;
1065 + }
1066 +
1067 + /* ---------- Generic first content after heading ---------- */
1068 +
1069 + function heading(card){
1070 + var cr=
1071 + card.getBoundingClientRect();
1072 +
1073 + var rows=
1074 + Array.from(
1075 + card.querySelectorAll(
1076 + "h1,h2,h3,h4,h5,h6,.box-title,[role=heading]"
1077 + )
1078 + )
1079 + .filter(function(el){
1080 + if(!visible(el,20,8))return false;
1081 +
1082 + var r=el.getBoundingClientRect();
1083 +
1084 + var rel=
1085 + r.top-
1086 + cr.top;
1087 +
1088 + return (
1089 + rel>=0&&
1090 + rel<=
1091 + Math.min(
1092 + 160,
1093 + cr.height*.45
1094 + )
1095 + );
1096 + })
1097 + .sort(function(a,b){
1098 + return (
1099 + a.getBoundingClientRect().top-
1100 + b.getBoundingClientRect().top
1101 + );
1102 + });
1103 +
1104 + return rows[0]||null;
1105 + }
1106 +
1107 + function firstContent(card,h){
1108 + if(!h)return null;
1109 +
1110 + var cr=
1111 + card.getBoundingClientRect();
1112 +
1113 + var hr=
1114 + h.getBoundingClientRect();
1115 +
1116 + var rows=
1117 + Array.from(
1118 + card.querySelectorAll(
1119 + "p,div,ul,ol,dl,blockquote"
1120 + )
1121 + )
1122 + .filter(function(el){
1123 + if(
1124 + el===h||
1125 + h.contains(el)||
1126 + el.contains(h)
1127 + ){
1128 + return false;
1129 + }
1130 +
1131 + if(!visible(el,30,8))return false;
1132 +
1133 + var text=
1134 + String(el.textContent||"")
1135 + .replace(/\s+/g," ")
1136 + .trim();
1137 +
1138 + if(text.length<3)return false;
1139 +
1140 + var r=el.getBoundingClientRect();
1141 +
1142 + if(
1143 + r.top<
1144 + hr.bottom-1
1145 + ){
1146 + return false;
1147 + }
1148 +
1149 + if(
1150 + r.top-cr.top>
1151 + Math.min(
1152 + 280,
1153 + cr.height*.65
1154 + )
1155 + ){
1156 + return false;
1157 + }
1158 +
1159 + if(
1160 + r.height>
1161 + cr.height*.58
1162 + ){
1163 + return false;
1164 + }
1165 +
1166 + return true;
1167 + })
1168 + .sort(function(a,b){
1169 + var ar=
1170 + a.getBoundingClientRect();
1171 +
1172 + var br=
1173 + b.getBoundingClientRect();
1174 +
1175 + return (
1176 + ar.top-br.top||
1177 + ar.height-br.height
1178 + );
1179 + });
1180 +
1181 + return rows[0]||null;
1182 + }
1183 +
1184 + function alignGeneric(cards){
1185 + var rows=
1186 + cards.map(function(card){
1187 + var h=
1188 + heading(card);
1189 +
1190 + var c=
1191 + firstContent(
1192 + card,
1193 + h
1194 + );
1195 +
1196 + if(!h||!c)return null;
1197 +
1198 + var cr=
1199 + card.getBoundingClientRect();
1200 +
1201 + var rr=
1202 + c.getBoundingClientRect();
1203 +
1204 + return {
1205 + content:c,
1206 + relativeTop:
1207 + rr.top-cr.top
1208 + };
1209 + });
1210 +
1211 + if(
1212 + rows.some(function(row){
1213 + return !row;
1214 + })
1215 + ){
1216 + return false;
1217 + }
1218 +
1219 + var target=
1220 + Math.max.apply(
1221 + Math,
1222 + rows.map(function(row){
1223 + return row.relativeTop;
1224 + })
1225 + );
1226 +
1227 + rows.forEach(function(row){
1228 + var delta=
1229 + target-
1230 + row.relativeTop;
1231 +
1232 + if(delta<=1)return;
1233 +
1234 + saveOriginal(
1235 + row.content,
1236 + originalMarginTop,
1237 + "margin-top"
1238 + );
1239 +
1240 + var current=
1241 + num(
1242 + getComputedStyle(
1243 + row.content
1244 + ).marginTop
1245 + );
1246 +
1247 + row.content.style.setProperty(
1248 + "margin-top",
1249 + (
1250 + current+
1251 + delta
1252 + )+"px"
1253 + );
1254 +
1255 + row.content.setAttribute(
1256 + "data-sn-first-content-aligned",
1257 + "7"
1258 + );
1259 +
1260 + contentManaged.add(
1261 + row.content
1262 + );
1263 + });
1264 +
1265 + return true;
1266 + }
1267 +
1268 + function applyRow(group){
1269 + if(!validRow(group))return false;
1270 +
1271 + var cards=[];
1272 + var seen=new Set();
1273 +
1274 + group.entries.forEach(function(entry){
1275 + if(!seen.has(entry.target)){
1276 + seen.add(entry.target);
1277 + cards.push(entry.target);
1278 + }
1279 + });
1280 +
1281 + if(cards.length<2)return false;
1282 +
1283 + if(
1284 + !alignKnownBars(cards)
1285 + ){
1286 + alignGeneric(cards);
1287 + }
1288 +
1289 + var maxHeight=0;
1290 +
1291 + cards.forEach(function(card){
1292 + maxHeight=
1293 + Math.max(
1294 + maxHeight,
1295 + card.getBoundingClientRect().height
1296 + );
1297 + });
1298 +
1299 + maxHeight=
1300 + Math.ceil(
1301 + maxHeight
1302 + );
1303 +
1304 + if(maxHeight<MIN_H)return false;
1305 +
1306 + cards.forEach(function(card){
1307 + saveOriginal(
1308 + card,
1309 + originalMinHeight,
1310 + "min-height"
1311 + );
1312 +
1313 + card.style.setProperty(
1314 + "min-height",
1315 + maxHeight+"px"
1316 + );
1317 +
1318 + card.setAttribute(
1319 + "data-sn-equal-height-managed",
1320 + "7"
1321 + );
1322 +
1323 + heightManaged.add(card);
1324 + });
1325 +
1326 + return true;
1327 + }
1328 +
1329 + function calculate(force){
1330 + if(applying)return;
1331 +
1332 + var width=
1333 + Math.round(
1334 + window.innerWidth
1335 + );
1336 +
1337 + var meaningful=
1338 + lastWidth<0||
1339 + Math.abs(
1340 + width-
1341 + lastWidth
1342 + )>=
1343 + MIN_WIDTH_CHANGE;
1344 +
1345 + if(
1346 + hasApplied&&
1347 + !force&&
1348 + !meaningful
1349 + ){
1350 + return;
1351 + }
1352 +
1353 + applying=true;
1354 +
1355 + try{
1356 + harmoniseCustomCallouts();
1357 +
1358 + if(width<=MOBILE_MAX){
1359 + if(hasApplied){
1360 + resetRuntime();
1361 + }
1362 +
1363 + hasApplied=false;
1364 + lastWidth=width;
1365 + return;
1366 + }
1367 +
1368 + if(hasApplied){
1369 + resetRuntime();
1370 + }
1371 +
1372 + var parents=
1373 + Array.from(
1374 + root.querySelectorAll("*")
1375 + )
1376 + .filter(function(parent){
1377 + return (
1378 + visible(
1379 + parent,
1380 + MIN_W,
1381 + MIN_H
1382 + )&&
1383 + parent.children&&
1384 + parent.children.length>=2&&
1385 + parent.children.length<=
1386 + MAX_PARENT_CHILDREN
1387 + );
1388 + });
1389 +
1390 + var touched=
1391 + new Set();
1392 +
1393 + parents.forEach(function(parent){
1394 + var entries=[];
1395 +
1396 + Array.from(
1397 + parent.children
1398 + ).forEach(function(child){
1399 + if(
1400 + !visible(
1401 + child,
1402 + MIN_W,
1403 + MIN_H
1404 + )
1405 + ){
1406 + return;
1407 + }
1408 +
1409 + var target=
1410 + pickTarget(child);
1411 +
1412 + if(!target)return;
1413 +
1414 + entries.push({
1415 + target:target,
1416 + rect:
1417 + target.getBoundingClientRect()
1418 + });
1419 + });
1420 +
1421 + groupRows(
1422 + entries
1423 + ).forEach(function(group){
1424 + if(!validRow(group))return;
1425 +
1426 + var targets=
1427 + group.entries.map(function(entry){
1428 + return entry.target;
1429 + });
1430 +
1431 + if(
1432 + !targets.some(function(el){
1433 + return !touched.has(el);
1434 + })
1435 + ){
1436 + return;
1437 + }
1438 +
1439 + if(applyRow(group)){
1440 + targets.forEach(function(el){
1441 + touched.add(el);
1442 + });
1443 + }
1444 + });
1445 + });
1446 +
1447 + lastWidth=width;
1448 + hasApplied=true;
1449 + }finally{
1450 + applying=false;
1451 + }
1452 + }
1453 +
1454 + function resize(){
1455 + if(resizeTimer){
1456 + clearTimeout(
1457 + resizeTimer
1458 + );
1459 + }
1460 +
1461 + resizeTimer=
1462 + setTimeout(
1463 + function(){
1464 + resizeTimer=0;
1465 + calculate(false);
1466 + },
1467 + RESIZE_DEBOUNCE
1468 + );
1469 + }
1470 +
1471 + function waitImages(){
1472 + var images=
1473 + Array.from(
1474 + root.querySelectorAll("img")
1475 + );
1476 +
1477 + return Promise.all(
1478 + images.map(function(img){
1479 + if(img.complete){
1480 + return Promise.resolve();
1481 + }
1482 +
1483 + return new Promise(function(resolve){
1484 + var done=function(){
1485 + resolve();
1486 + };
1487 +
1488 + img.addEventListener(
1489 + "load",
1490 + done,
1491 + {once:true}
1492 + );
1493 +
1494 + img.addEventListener(
1495 + "error",
1496 + done,
1497 + {once:true}
1498 + );
1499 + });
1500 + })
1501 + );
1502 + }
1503 +
1504 + async function initial(){
1505 + if(
1506 + document.readyState!==
1507 + "complete"
1508 + ){
1509 + await new Promise(function(resolve){
1510 + addEventListener(
1511 + "load",
1512 + resolve,
1513 + {once:true}
1514 + );
1515 + });
1516 + }
1517 +
1518 + if(
1519 + document.fonts&&
1520 + document.fonts.ready
1521 + ){
1522 + try{
1523 + await document.fonts.ready;
1524 + }catch(error){}
1525 + }
1526 +
1527 + await waitImages();
1528 +
1529 + // Exactly one initial layout calculation.
1530 + calculate(true);
1531 + }
1532 +
1533 + addEventListener(
1534 + "resize",
1535 + resize,
1536 + {passive:true}
1537 + );
1538 +
1539 + initial();
1540 +})();
1541 +</script>
1542 +
1543 +<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1544 +{{/html}}\n