Changes for page Plan Your Data Management

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

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

Summary

Details

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