antragstracker/static/_app/immutable/nodes/3.s-yat7Fq.js
Dotty Dotter ea3e5cd329 feat: Intuitivere Bedienung — klickbare Stats + Abstimmungs-Filter + Fraktions-Normalisierung (#14)
Dashboard:
- Neuer Endpoint GET /api/stats/dashboard mit allen Kennzahlen
- Klickbare Kacheln: Vorlagen nach Typ, Ketten nach Status → navigieren zu Filterlisten
- Umsetzungsquote als horizontaler Balken mit klickbaren Segmenten

Abstimmungen:
- Stimmverhalten-Tabelle klickbar: Fraktion oder Ja/Nein/Enthaltung → filtert
- Neuer Endpoint GET /api/abstimmungen/details (?fraktion=&stimme=) mit Pagination
- Neuer Endpoint GET /api/abstimmungen/vergleich (?f1=&f2=) für Koalitionsmatrix-Drill-Down
- Koalitionsmatrix-Zellen klickbar → zeigt Abstimmungsvergleich beider Fraktionen

Fraktions-Normalisierung:
- fraktionen_mapping.py: 40+ DB-Varianten → kanonische Namen
- 'Bündnis 90 / Die Grünen' / 'Bündnis 90/Die Grünen' / 'Grüne' → 'Grüne'
- 'Die Linke' / 'Die Linke.' / 'Linke' → 'Linke'
- BfHo-Varianten, Hagen Aktiv, Einzelvertreter etc. normalisiert
- Mapping in allen Abstimmungs-Endpoints aktiv
- ist_ratsfraktion Flag in Fraktionen-Response

Closes #14
2026-04-01 14:32:06 +02:00

2 lines
19 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as le,a as d,f as p,b as S,c as ve}from"../chunks/B89f14j0.js";import{o as ce}from"../chunks/DrzKg1h1.js";import{p as pe,s as I,a as St,b as r,f as gt,c as xe,e as ue,d as x,$ as ge,g as t,h as a,r as e,t as T,n as mt,u as Ft}from"../chunks/reyx9_7L.js";import{s}from"../chunks/BwTTNG21.js";import{i as Q}from"../chunks/Do7Yo2YN.js";import{h as me,e as Y,i as tt}from"../chunks/D5EBvEcH.js";import{s as Rt}from"../chunks/B-WTs0fq.js";import{s as dt}from"../chunks/C7sCDBjT.js";import{s as Nt}from"../chunks/DnBxR3jh.js";import{g as Wt}from"../chunks/BHBF0lbh.js";var _e=p('<div class="bg-red-50 text-red-700 p-4 rounded-lg mb-6"> </div>'),be=p('<div class="flex justify-center py-20"><div class="animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"></div></div>'),ye=p('<tr class="hover:bg-gray-50"><td class="px-4 py-3"><button class="font-medium text-gray-900 hover:text-green-700 hover:underline cursor-pointer"> </button></td><td class="px-4 py-3 text-center"><button class="text-green-600 font-medium hover:bg-green-100 px-2 py-1 rounded cursor-pointer transition-colors"> </button></td><td class="px-4 py-3 text-center"><button class="text-red-600 font-medium hover:bg-red-100 px-2 py-1 rounded cursor-pointer transition-colors"> </button></td><td class="px-4 py-3 text-center"><button class="text-yellow-600 font-medium hover:bg-yellow-100 px-2 py-1 rounded cursor-pointer transition-colors"> </button></td><td class="px-4 py-3 text-center text-gray-600"> </td><td class="px-4 py-3"><div class="flex items-center gap-2"><div class="flex-1 bg-gray-200 rounded-full h-2 max-w-24"><div class="bg-green-500 h-2 rounded-full"></div></div> <span class="text-sm text-gray-600"> </span></div></td></tr>'),fe=p('<div class="border border-gray-200 rounded-lg p-4"><div class="flex items-center justify-between mb-3"><button class="font-medium text-gray-900 hover:text-green-700 hover:underline cursor-pointer"> </button> <span class="text-sm font-medium text-gray-600"> </span></div> <div class="bg-gray-200 rounded-full h-2.5 mb-3"><div class="bg-green-500 h-2.5 rounded-full"></div></div> <div class="grid grid-cols-4 gap-2 text-center text-xs"><button class="cursor-pointer hover:bg-green-50 rounded p-1 transition-colors"><div class="font-medium text-green-600"> </div> <div class="text-gray-500">Ja</div></button> <button class="cursor-pointer hover:bg-red-50 rounded p-1 transition-colors"><div class="font-medium text-red-600"> </div> <div class="text-gray-500">Nein</div></button> <button class="cursor-pointer hover:bg-yellow-50 rounded p-1 transition-colors"><div class="font-medium text-yellow-600"> </div> <div class="text-gray-500">Enth.</div></button> <div><div class="font-medium text-gray-600"> </div> <div class="text-gray-500">Gesamt</div></div></div></div>'),he=p('<div class="flex justify-center py-8"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-green-600"></div></div>'),we=p('<p class="text-gray-500 py-4">Keine Abstimmungen gefunden.</p>'),ke=p('<tr class="hover:bg-gray-50 cursor-pointer"><td class="px-3 py-2 text-gray-500 whitespace-nowrap"> </td><td class="px-3 py-2"><span class="font-mono text-green-700 text-xs bg-green-50 px-1.5 py-0.5 rounded"> </span></td><td class="px-3 py-2 text-gray-700 max-w-md truncate"> </td><td class="px-3 py-2 text-center"><span> </span></td><td class="px-3 py-2 text-gray-600 max-w-xs truncate"> </td></tr>'),$e=p('<a class="block border border-gray-200 rounded-lg p-3 hover:shadow-sm transition-shadow"><div class="flex items-center justify-between mb-1"><span class="font-mono text-xs text-green-700 bg-green-50 px-1.5 py-0.5 rounded"> </span> <span> </span></div> <p class="text-sm text-gray-700 line-clamp-2"> </p> <div class="flex justify-between text-xs text-gray-500 mt-1"><span> </span> <span class="truncate ml-2"> </span></div></a>'),je=p('<div class="flex justify-center mt-4 space-x-2"><button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">« Zurück</button> <span class="px-3 py-2 text-sm text-gray-600"> </span> <button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">Weiter »</button></div>'),ze=p('<div class="hidden md:block overflow-x-auto"><table class="w-full text-sm"><thead class="bg-gray-50"><tr><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Datum</th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Aktenzeichen</th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Betreff</th><th class="px-3 py-2 text-center text-xs font-medium text-gray-500 uppercase">Stimme</th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Ergebnis</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div> <div class="md:hidden space-y-2"></div> <!>',1),Ae=p('<section id="detail-section" class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6 mb-8"><div class="flex items-center justify-between mb-4"><div><h2 class="text-lg font-semibold text-gray-900"> </h2> <p class="text-sm text-gray-500"> </p></div> <button class="text-sm text-gray-500 hover:text-gray-700 border border-gray-300 rounded-lg px-3 py-1.5 hover:bg-gray-50 transition-colors">✕ Schließen</button></div> <!></section>'),Se=p('<th class="p-2 text-center writing-mode-vertical" style="writing-mode: vertical-lr; transform: rotate(180deg); height: 100px;"> </th>'),Fe=p('<td class="p-1"><div class="w-10 h-10 bg-gray-300 rounded flex items-center justify-center text-gray-500">—</div></td>'),Pe=p('<td class="p-1"><button> </button></td>'),Ee=p('<td class="p-1"><div class="w-10 h-10 bg-gray-100 rounded flex items-center justify-center text-gray-400">-</div></td>'),Ie=p('<tr><td class="p-2 font-medium text-right pr-3 whitespace-nowrap"> </td><!></tr>'),qe=p('<div class="overflow-x-auto -mx-4 sm:mx-0 px-4 sm:px-0"><table class="text-xs"><thead><tr><th class="p-2 text-left"></th><!></tr></thead><tbody></tbody></table></div> <div class="mt-4 flex flex-wrap items-center gap-3 sm:gap-4 text-xs text-gray-500"><span>Legende:</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-green-500 rounded"></span> 90-100%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-green-400 rounded"></span> 70-90%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-yellow-400 rounded"></span> 50-70%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-orange-400 rounded"></span> 30-50%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-red-400 rounded"></span> &lt;30%</span></div>',1),De=p('<p class="text-gray-500">Noch keine Koalitionsdaten verfügbar.</p>'),Ke=p('<div class="flex justify-center py-8"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-green-600"></div></div>'),Be=p('<p class="text-gray-500 py-4">Keine gemeinsamen Abstimmungen gefunden.</p>'),Le=p('<tr class="hover:bg-gray-50 cursor-pointer"><td class="px-3 py-2 text-gray-500 whitespace-nowrap"> </td><td class="px-3 py-2"><span class="font-mono text-green-700 text-xs bg-green-50 px-1.5 py-0.5 rounded"> </span></td><td class="px-3 py-2 text-gray-700 max-w-sm truncate"> </td><td class="px-3 py-2 text-center"><span> </span></td><td class="px-3 py-2 text-center"><span> </span></td><td class="px-3 py-2 text-gray-600 max-w-xs truncate"> </td></tr>'),Re=p('<a class="block border border-gray-200 rounded-lg p-3 hover:shadow-sm transition-shadow"><div class="flex items-center justify-between mb-1"><span class="font-mono text-xs text-green-700 bg-green-50 px-1.5 py-0.5 rounded"> </span> <span class="text-xs text-gray-500"> </span></div> <p class="text-sm text-gray-700 line-clamp-2 mb-2"> </p> <div class="flex items-center gap-3 text-xs"><span> <span> </span></span> <span> <span> </span></span></div></a>'),Te=p('<div class="flex justify-center mt-4 space-x-2"><button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">« Zurück</button> <span class="px-3 py-2 text-sm text-gray-600"> </span> <button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">Weiter »</button></div>'),Ve=p('<div class="hidden md:block overflow-x-auto"><table class="w-full text-sm"><thead class="bg-gray-50"><tr><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Datum</th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Aktenzeichen</th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Betreff</th><th class="px-3 py-2 text-center text-xs font-medium text-gray-500 uppercase"> </th><th class="px-3 py-2 text-center text-xs font-medium text-gray-500 uppercase"> </th><th class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase">Ergebnis</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div> <div class="md:hidden space-y-2"></div> <!>',1),Ze=p('<section id="vergleich-section" class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6 mt-8"><div class="flex items-center justify-between mb-4"><div><h2 class="text-lg font-semibold text-gray-900"> </h2> <p class="text-sm text-gray-500"> </p></div> <button class="text-sm text-gray-500 hover:text-gray-700 border border-gray-300 rounded-lg px-3 py-1.5 hover:bg-gray-50 transition-colors">✕ Schließen</button></div> <!></section>'),Me=p('<section class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6 mb-8"><h2 class="text-lg font-semibold text-gray-900 mb-4">📊 Stimmverhalten nach Fraktion</h2> <p class="text-sm text-gray-500 mb-4">Klicke auf eine Fraktion oder Zelle, um die Abstimmungen zu sehen.</p> <div class="hidden md:block overflow-x-auto"><table class="w-full"><thead class="bg-gray-50"><tr><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Fraktion</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Ja</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Nein</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Enthaltung</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Gesamt</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Zustimmungsquote</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div> <div class="md:hidden space-y-3"></div></section> <!> <section class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6"><h2 class="text-lg font-semibold text-gray-900 mb-4">🤝 Koalitionsmatrix</h2> <p class="text-sm text-gray-500 mb-4">Wie oft stimmen Fraktionen gleich ab? Klicke auf eine Zelle für Details.</p> <!></section> <!>',1),Ce=p('<div class="mb-6"><h1 class="text-2xl font-bold text-gray-900">Abstimmungsverhalten</h1> <p class="text-gray-500 text-sm mt-1">Analyse des Stimmverhaltens der Ratsfraktionen</p></div> <!> <!>',1);function ta(Gt,Jt){pe(Jt,!0);let Pt=I(St([])),$t=I(St([])),Tt=I(!0),Et=I(""),lt=I(""),vt=I(""),_t=I(St([])),bt=I(0),ct=I(1),It=I(!1),et=I(""),at=I(""),yt=I(St([])),ft=I(0),pt=I(1),qt=I(!1);const jt=typeof window<"u"&&window.location.port==="5173"?`http://${window.location.hostname}:8099/api`:"/api";ce(async()=>{try{const[i,f]=await Promise.all([fetch(`${jt}/abstimmungen/fraktionen`),fetch(`${jt}/abstimmungen/koalitionsmatrix`)]);i.ok&&x(Pt,await i.json(),!0),f.ok&&x($t,await f.json(),!0)}catch(i){x(Et,`Fehler: ${i}`)}finally{x(Tt,!1)}});async function H(i,f,N=1){x(lt,i,!0),x(vt,f,!0),x(ct,N,!0),x(It,!0);try{const q=new URLSearchParams;i&&q.set("fraktion",i),f&&q.set("stimme",f),q.set("page",String(N)),q.set("page_size","20");const rt=await fetch(`${jt}/abstimmungen/details?${q}`);if(rt.ok){const st=await rt.json();x(_t,st.items,!0),x(bt,st.total,!0)}}catch(q){console.error("Detail-Fehler:",q)}finally{x(It,!1)}setTimeout(()=>{document.getElementById("detail-section")?.scrollIntoView({behavior:"smooth"})},100)}async function Dt(i,f,N=1){x(et,i,!0),x(at,f,!0),x(pt,N,!0),x(qt,!0);try{const q=new URLSearchParams({f1:i,f2:f,page:String(N),page_size:"20"}),rt=await fetch(`${jt}/abstimmungen/vergleich?${q}`);if(rt.ok){const st=await rt.json();x(yt,st.items,!0),x(ft,st.total,!0)}}catch(q){console.error("Vergleich-Fehler:",q)}finally{x(qt,!1)}setTimeout(()=>{document.getElementById("vergleich-section")?.scrollIntoView({behavior:"smooth"})},100)}function Ut(){x(lt,""),x(vt,""),x(_t,[],!0),x(bt,0)}function Ht(){x(et,""),x(at,""),x(yt,[],!0),x(ft,0)}function Ot(i){return i>=90?"bg-green-500":i>=70?"bg-green-400":i>=50?"bg-yellow-400":i>=30?"bg-orange-400":"bg-red-400"}function Qt(i){return i>=50?"text-white":"text-gray-900"}function xt(i){return i==="ja"?"text-green-700 bg-green-50":i==="nein"?"text-red-700 bg-red-50":"text-yellow-700 bg-yellow-50"}var Vt=Ce();me("hpy8l9",i=>{ue(()=>{ge.title="Abstimmungen - Antragstracker Hagen"})});var Zt=r(gt(Vt),2);{var Xt=i=>{var f=_e(),N=a(f,!0);e(f),T(()=>s(N,t(Et))),d(i,f)};Q(Zt,i=>{t(Et)&&i(Xt)})}var Yt=r(Zt,2);{var te=i=>{var f=be();d(i,f)},ee=i=>{var f=Me(),N=gt(f),q=r(a(N),4),rt=a(q),st=r(a(rt));Y(st,21,()=>t(Pt),tt,(h,n)=>{var w=ye(),k=a(w),m=a(k),W=a(m,!0);e(m),e(k);var D=r(k),G=a(D),M=a(G,!0);e(G),e(D);var K=r(D),_=a(K),$=a(_,!0);e(_),e(K);var F=r(K),l=a(F),g=a(l,!0);e(l),e(F);var P=r(F),B=a(P,!0);e(P);var z=r(P),V=a(z),Z=a(V),O=a(Z);e(Z);var j=r(Z,2),o=a(j);e(j),e(V),e(z),e(w),T(()=>{s(W,t(n).fraktion),s(M,t(n).ja),s($,t(n).nein),s(g,t(n).enthaltung),s(B,t(n).gesamt),Nt(O,`width: ${t(n).ja_quote??""}%`),s(o,`${t(n).ja_quote??""}%`)}),S("click",m,()=>H(t(n).fraktion,"")),S("click",G,()=>H(t(n).fraktion,"ja")),S("click",_,()=>H(t(n).fraktion,"nein")),S("click",l,()=>H(t(n).fraktion,"enthaltung")),d(h,w)}),e(st),e(rt),e(q);var Mt=r(q,2);Y(Mt,21,()=>t(Pt),tt,(h,n)=>{var w=fe(),k=a(w),m=a(k),W=a(m,!0);e(m);var D=r(m,2),G=a(D);e(D),e(k);var M=r(k,2),K=a(M);e(M);var _=r(M,2),$=a(_),F=a($),l=a(F,!0);e(F),mt(2),e($);var g=r($,2),P=a(g),B=a(P,!0);e(P),mt(2),e(g);var z=r(g,2),V=a(z),Z=a(V,!0);e(V),mt(2),e(z);var O=r(z,2),j=a(O),o=a(j,!0);e(j),mt(2),e(O),e(_),e(w),T(()=>{s(W,t(n).fraktion),s(G,`${t(n).ja_quote??""}%`),Nt(K,`width: ${t(n).ja_quote??""}%`),s(l,t(n).ja),s(B,t(n).nein),s(Z,t(n).enthaltung),s(o,t(n).gesamt)}),S("click",m,()=>H(t(n).fraktion,"")),S("click",$,()=>H(t(n).fraktion,"ja")),S("click",g,()=>H(t(n).fraktion,"nein")),S("click",z,()=>H(t(n).fraktion,"enthaltung")),d(h,w)}),e(Mt),e(N);var Ct=r(N,2);{var ae=h=>{var n=Ae(),w=a(n),k=a(w),m=a(k),W=a(m);e(m);var D=r(m,2),G=a(D);e(D),e(k);var M=r(k,2);e(w);var K=r(w,2);{var _=l=>{var g=he();d(l,g)},$=l=>{var g=we();d(l,g)},F=l=>{var g=ze(),P=gt(g),B=a(P),z=r(a(B));Y(z,21,()=>t(_t),tt,(j,o)=>{var v=ke(),b=a(v),A=a(b,!0);e(b);var J=r(b),y=a(J),c=a(y,!0);e(y),e(J);var u=r(J),L=a(u,!0);e(u);var E=r(u),R=a(E),C=a(R,!0);e(R),e(E);var X=r(E),U=a(X,!0);e(X),e(v),T(nt=>{s(A,t(o).sitzung_datum||""),s(c,t(o).aktenzeichen||""),s(L,t(o).betreff||""),dt(R,1,`px-2 py-0.5 rounded text-xs font-medium ${nt??""}`),s(C,t(o).stimme),s(U,t(o).ergebnis||"")},[()=>xt(t(o).stimme)]),S("click",v,()=>Wt(`/vorlagen/${t(o).vorlage_id}`)),d(j,v)}),e(z),e(B),e(P);var V=r(P,2);Y(V,21,()=>t(_t),tt,(j,o)=>{var v=$e(),b=a(v),A=a(b),J=a(A,!0);e(A);var y=r(A,2),c=a(y,!0);e(y),e(b);var u=r(b,2),L=a(u,!0);e(u);var E=r(u,2),R=a(E),C=a(R,!0);e(R);var X=r(R,2),U=a(X,!0);e(X),e(E),e(v),T(nt=>{Rt(v,"href",`/vorlagen/${t(o).vorlage_id??""}`),s(J,t(o).aktenzeichen||""),dt(y,1,`px-2 py-0.5 rounded text-xs font-medium ${nt??""}`),s(c,t(o).stimme),s(L,t(o).betreff||""),s(C,t(o).sitzung_datum||""),s(U,t(o).ergebnis||"")},[()=>xt(t(o).stimme)]),d(j,v)}),e(V);var Z=r(V,2);{var O=j=>{const o=Ft(()=>Math.ceil(t(bt)/20));var v=je(),b=a(v),A=r(b,2),J=a(A);e(A);var y=r(A,2);e(v),T(()=>{b.disabled=t(ct)<=1,s(J,`Seite ${t(ct)??""} von ${t(o)??""}`),y.disabled=t(ct)>=t(o)}),S("click",b,()=>H(t(lt),t(vt),t(ct)-1)),S("click",y,()=>H(t(lt),t(vt),t(ct)+1)),d(j,v)};Q(Z,j=>{t(bt)>20&&j(O)})}d(l,g)};Q(K,l=>{t(It)?l(_):t(_t).length===0?l($,1):l(F,-1)})}e(n),T(()=>{s(W,`🔍 ${t(lt)??""}${t(vt)?`${t(vt)}`:""}`),s(G,`${t(bt)??""} Abstimmungen`)}),S("click",M,Ut),d(h,n)};Q(Ct,h=>{t(lt)&&h(ae)})}var Kt=r(Ct,2),re=r(a(Kt),4);{var se=h=>{const n=Ft(()=>t($t).map(K=>K.fraktion).sort());var w=qe(),k=gt(w),m=a(k),W=a(m),D=a(W),G=r(a(D));Y(G,17,()=>t(n),tt,(K,_)=>{var $=Se(),F=a($,!0);e($),T(()=>s(F,t(_))),d(K,$)}),e(D),e(W);var M=r(W);Y(M,21,()=>t($t),tt,(K,_)=>{var $=Ie(),F=a($),l=a(F,!0);e(F);var g=r(F);Y(g,17,()=>t(n),tt,(P,B)=>{var z=ve(),V=gt(z);{var Z=o=>{var v=Fe();d(o,v)},O=o=>{const v=Ft(()=>t(_).uebereinstimmung[t(B)]);var b=Pe(),A=a(b),J=a(A,!0);e(A),e(b),T((y,c,u)=>{dt(A,1,`w-10 h-10 ${y??""} ${c??""} rounded flex items-center justify-center font-medium cursor-pointer hover:ring-2 hover:ring-offset-1 hover:ring-green-500 transition-all`),Rt(A,"title",`${t(_).fraktion??""} & ${t(B)??""}: ${t(v).gleich??""}/${t(v).gesamt??""} (${t(v).quote??""}%)`),s(J,u)},[()=>Ot(t(v).quote),()=>Qt(t(v).quote),()=>Math.round(t(v).quote)]),S("click",A,()=>Dt(t(_).fraktion,t(B))),d(o,b)},j=o=>{var v=Ee();d(o,v)};Q(V,o=>{t(_).fraktion===t(B)?o(Z):t(_).uebereinstimmung[t(B)]?o(O,1):o(j,-1)})}d(P,z)}),e($),T(()=>s(l,t(_).fraktion)),d(K,$)}),e(M),e(m),e(k),mt(2),d(h,w)},ne=h=>{var n=De();d(h,n)};Q(re,h=>{t($t).length>0?h(se):h(ne,-1)})}e(Kt);var oe=r(Kt,2);{var ie=h=>{var n=Ze(),w=a(n),k=a(w),m=a(k),W=a(m);e(m);var D=r(m,2),G=a(D);e(D),e(k);var M=r(k,2);e(w);var K=r(w,2);{var _=l=>{var g=Ke();d(l,g)},$=l=>{var g=Be();d(l,g)},F=l=>{var g=Ve(),P=gt(g),B=a(P),z=a(B),V=a(z),Z=r(a(V),3),O=a(Z,!0);e(Z);var j=r(Z),o=a(j,!0);e(j),mt(),e(V),e(z);var v=r(z);Y(v,21,()=>t(yt),tt,(y,c)=>{var u=Le(),L=a(u),E=a(L,!0);e(L);var R=r(L),C=a(R),X=a(C,!0);e(C),e(R);var U=r(R),nt=a(U,!0);e(U);var ut=r(U),ot=a(ut),zt=a(ot,!0);e(ot),e(ut);var it=r(ut),ht=a(it),At=a(ht,!0);e(ht),e(it);var wt=r(it),kt=a(wt,!0);e(wt),e(u),T((Bt,Lt)=>{s(E,t(c).sitzung_datum||""),s(X,t(c).aktenzeichen||""),s(nt,t(c).betreff||""),dt(ot,1,`px-2 py-0.5 rounded text-xs font-medium ${Bt??""}`),s(zt,t(c).stimme_f1),dt(ht,1,`px-2 py-0.5 rounded text-xs font-medium ${Lt??""}`),s(At,t(c).stimme_f2),s(kt,t(c).ergebnis||"")},[()=>xt(t(c).stimme_f1),()=>xt(t(c).stimme_f2)]),S("click",u,()=>Wt(`/vorlagen/${t(c).vorlage_id}`)),d(y,u)}),e(v),e(B),e(P);var b=r(P,2);Y(b,21,()=>t(yt),tt,(y,c)=>{var u=Re(),L=a(u),E=a(L),R=a(E,!0);e(E);var C=r(E,2),X=a(C,!0);e(C),e(L);var U=r(L,2),nt=a(U,!0);e(U);var ut=r(U,2),ot=a(ut),zt=a(ot),it=r(zt),ht=a(it,!0);e(it),e(ot);var At=r(ot,2),wt=a(At),kt=r(wt),Bt=a(kt,!0);e(kt),e(At),e(ut),e(u),T((Lt,de)=>{Rt(u,"href",`/vorlagen/${t(c).vorlage_id??""}`),s(R,t(c).aktenzeichen||""),s(X,t(c).sitzung_datum||""),s(nt,t(c).betreff||""),s(zt,`${t(et)??""}: `),dt(it,1,`font-medium ${Lt??""} px-1.5 py-0.5 rounded`),s(ht,t(c).stimme_f1),s(wt,`${t(at)??""}: `),dt(kt,1,`font-medium ${de??""} px-1.5 py-0.5 rounded`),s(Bt,t(c).stimme_f2)},[()=>xt(t(c).stimme_f1),()=>xt(t(c).stimme_f2)]),d(y,u)}),e(b);var A=r(b,2);{var J=y=>{const c=Ft(()=>Math.ceil(t(ft)/20));var u=Te(),L=a(u),E=r(L,2),R=a(E);e(E);var C=r(E,2);e(u),T(()=>{L.disabled=t(pt)<=1,s(R,`Seite ${t(pt)??""} von ${t(c)??""}`),C.disabled=t(pt)>=t(c)}),S("click",L,()=>Dt(t(et),t(at),t(pt)-1)),S("click",C,()=>Dt(t(et),t(at),t(pt)+1)),d(y,u)};Q(A,y=>{t(ft)>20&&y(J)})}T(()=>{s(O,t(et)),s(o,t(at))}),d(l,g)};Q(K,l=>{t(qt)?l(_):t(yt).length===0?l($,1):l(F,-1)})}e(n),T(()=>{s(W,`⚖️ ${t(et)??""} vs. ${t(at)??""}`),s(G,`${t(ft)??""} gemeinsame Abstimmungen`)}),S("click",M,Ht),d(h,n)};Q(oe,h=>{t(et)&&t(at)&&h(ie)})}d(i,f)};Q(Yt,i=>{t(Tt)?i(te):i(ee,-1)})}d(Gt,Vt),xe()}le(["click"]);export{ta as component};