diff --git a/bundle.js b/bundle.js index 07a86d8..dd74740 100644 --- a/bundle.js +++ b/bundle.js @@ -1 +1 @@ -(()=>{var e={50:e=>{function t(e){var t=""+e,i=n.exec(t);if(!i)return e;var s,a,r,o="";for(s=i.index,a=0;s]/;e.exports=function(e){var n,i="",s=e||{};return function(e,s,a,r){i=i+'

Okręg '+t(null==(n=a)?"":n)+" "+t(null==(n=s)?"":n)+"

Łącznie "+t(null==(n=r)?"":n)+" mandatów

",function(){var s=e;if("number"==typeof s.length)for(var a=0,r=s.length;a"}else for(var a in r=0,s)r++,o=s[a],i=i+""}.call(this),i+="
"+t(null==(n=o.committee)?"":n)+""+t(null==(n=o.mandates)?"":n)+"
"+t(null==(n=o.committee)?"":n)+""+t(null==(n=o.mandates)?"":n)+"
"}.call(this,"data"in s?s.data:"undefined"!=typeof data?data:void 0,"name"in s?s.name:"undefined"!=typeof name?name:void 0,"number"in s?s.number:"undefined"!=typeof number?number:void 0,"size"in s?s.size:"undefined"!=typeof size?size:void 0),i}},587:e=>{function t(e,s){return Array.isArray(e)?function(e,i){for(var s,a="",r="",o=Array.isArray(i),l=0;l]/;e.exports=function(e){var n="",i=e||{};return function(e){n=n+"",e||(n+='

Kalkulator mandatów w wyborach do Sejmu

Kalkulator zwraca szacowany rozkład mandatów w Sejmie na podstawie wyników sondażowych.\nObliczenia są dokonywane zgodnie z obowiązującą w Polsce ordynacją wyborczą, tj. stosując\nmetodę D’Hondta osobno w każdym z 41 okręgów wyborczych.

Dodatkowo poparcie dla poszczególnych komitetów w okręgach jest różnicowane na podstawie\nszczegółowych wyników ostatnich wyborów parlamentarnych. Ugrupowanie, które w danym okręgu miało\nwtedy poparcie wyższe/niższe niż w całym kraju, również w tej symulacji będzie miało w tym\nokręgu odpowiednio wyższe/niższe poparcie. Pozwala to na sporządzenie szczegółowej prognozy\npodziału mandatów na poziomie poszczególnych okręgów.

Aktualizacje:

  1. 2019-11-15: od teraz w prognozie brane są pod uwagę wyniki wyborów do Sejmu z 2019 roku.
  2. 2020-10-28: dodano partię polityczną Polska 2050; jej prognozowane poparcie w okręgach jest\nliczone na podstawie deklaracji wyborców Szymona Hołowni przedstawionych w artykule\nAnaliza przepływów wyborców z 29 czerwca 2020 roku.
  3. 2023-08-21: dodano koalicyjny komitet wyborczy Trzecia Droga (Polska 2050 + PSL – Koalicja Polska).\n\n
'),n+='
',e||(n+='
'),n+='
',e||(n+='
'),n+=""}.call(this,"embed"in i?i.embed:"undefined"!=typeof embed?embed:void 0),n}},253:e=>{function t(e,t,n,s){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(s?e:e+'="'+e+'"');var a=typeof t;return"object"!==a&&"function"!==a||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),n||-1===t.indexOf('"'))?(n&&(t=i(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"'")+"'"}function n(e,t){return Array.isArray(e)?function(e,t){for(var s,a="",r="",o=Array.isArray(t),l=0;l]/;e.exports=function(e){var s,a="",r=e||{};return function(e){a+="",function(){var r=e;if("number"==typeof r.length)for(var o=0,l=r.length;o"}else for(var o in l=0,r)l++,c=r[o],a=a+""}.call(this),a+="
KomitetPoparcieMandaty
"+i(null==(s=c.name)?"":s)+"","mn"!==c.id&&(a=a+'%"),a+="
"+i(null==(s=c.name)?"":s)+"","mn"!==c.id&&(a=a+'%"),a+="
"}.call(this,"committees"in r?r.committees:"undefined"!=typeof committees?committees:void 0),a}}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},t=8,i={"&":"&","<":"<",">":">",'"':""","'":"'"};function s(e,t){return"number"==typeof e?e+t:e}function a(e){if("string"==typeof e){const t=/^(\d+)\s*(.*)$/g.exec(e);return{value:t?+t[1]:0,unit:(null==t?void 0:t[2])||void 0}}return{value:Number(e)}}function r(e){return String.fromCharCode(97+e%26)}const o=2221e-19;function l(e,t,n){return t/n.range*e}function c(e,n){const i=Math.pow(10,n||t);return Math.round(e*i)/i}function u(e,t,n,i){const s=(i-90)*Math.PI/180;return{x:e+n*Math.cos(s),y:t+n*Math.sin(s)}}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;ie;function d(e,t){return Array.from({length:e},t?(e,n)=>t(n):()=>{})}const m=(e,t)=>e+(t||0);function f(e,t){return null!==e&&"object"==typeof e&&Reflect.has(e,t)}function g(e){return null!==e&&isFinite(e)}function y(e){return!e&&0!==e}function v(e){return g(e)?Number(e):void 0}function w(e){return null==e||"number"==typeof e&&isNaN(e)}function x(e,t,n){const i={high:void 0===(t={...t,...n?"x"===n?t.axisX:t.axisY:{}}).high?-Number.MAX_VALUE:+t.high,low:void 0===t.low?Number.MAX_VALUE:+t.low},s=void 0===t.high,a=void 0===t.low;return(s||a)&&function e(t){if(!w(t))if(Array.isArray(t))for(let n=0;ni.high&&(i.high=e),a&&e0||(i.high=1),i.low=0)),i}function b(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const a={labels:(e.labels||[]).slice(),series:S(e.series,i,s)},r=a.labels.length;return function(e){return!!Array.isArray(e)&&e.every(Array.isArray)}(a.series)?(t=Math.max(r,...a.series.map((e=>e.length))),a.series.forEach((e=>{e.push(...d(Math.max(0,t-e.length)))}))):t=a.series.length,a.labels.push(...d(Math.max(0,t-r),(()=>""))),n&&function(e){var t;null===(t=e.labels)||void 0===t||t.reverse(),e.series.reverse();for(const t of e.series)f(t,"data")?t.data.reverse():Array.isArray(t)&&t.reverse()}(a),a}function k(e,t){if(!w(e))return t?function(e,t){let n,i;if("object"!=typeof e){const s=v(e);"x"===t?n=s:i=s}else f(e,"x")&&(n=v(e.x)),f(e,"y")&&(i=v(e.y));if(void 0!==n||void 0!==i)return{x:n,y:i}}(e,t):v(e)}function z(e,t){return Array.isArray(e)?e.map((e=>f(e,"value")?k(e.value,t):k(e,t))):z(e.data,t)}function S(e,t,n){if(i=e,Array.isArray(i)&&i.every((e=>Array.isArray(e)||f(e,"data"))))return e.map((e=>z(e,t)));var i;const s=z(e,t);return n?s.map((e=>[e])):s}function E(e){let t="";return null==e?e:(t="number"==typeof e?""+e:"object"==typeof e?JSON.stringify({data:e}):String(e),Object.keys(i).reduce(((e,t)=>e.replaceAll(t,i[t])),t))}class j{call(e,t){return this.svgElements.forEach((n=>Reflect.apply(n[e],n,t))),this}attr(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0;const{easing:o,...l}=n,c={};let u,h;o&&(u=Array.isArray(o)?o:A[o]),l.begin=s(l.begin,"ms"),l.dur=s(l.dur,"ms"),u&&(l.calcMode="spline",l.keySplines=u.join(" "),l.keyTimes="0;1"),i&&(l.fill="freeze",c[t]=l.from,e.attr(c),h=a(l.begin||0).value,l.begin="indefinite");const p=e.elem("animate",{attributeName:t,...l});i&&setTimeout((()=>{try{p._node.beginElement()}catch(n){c[t]=l.to,e.attr(c),p.remove()}}),h);const d=p.getNode();r&&d.addEventListener("beginEvent",(()=>r.emit("animationBegin",{element:e,animate:d,params:n}))),d.addEventListener("endEvent",(()=>{r&&r.emit("animationEnd",{element:e,animate:d,params:n}),i&&(c[t]=l.to,e.attr(c),p.remove())}))}class O{attr(t,n){return"string"==typeof t?n?this._node.getAttributeNS(n,t):this._node.getAttribute(t):(Object.keys(t).forEach((n=>{if(void 0!==t[n])if(-1!==n.indexOf(":")){const i=n.split(":");this._node.setAttributeNS(e[i[0]],n,String(t[n]))}else this._node.setAttribute(n,String(t[n]))})),this)}elem(e,t,n){return new O(e,t,n,this,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}parent(){return this._node.parentNode instanceof SVGElement?new O(this._node.parentNode):null}root(){let e=this._node;for(;"svg"!==e.nodeName&&e.parentElement;)e=e.parentElement;return new O(e)}querySelector(e){const t=this._node.querySelector(e);return t?new O(t):null}querySelectorAll(e){const t=this._node.querySelectorAll(e);return new j(t)}getNode(){return this._node}foreignObject(t,n,i){let s,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("string"==typeof t){const e=document.createElement("div");e.innerHTML=t,s=e.firstChild}else s=t;s instanceof Element&&s.setAttribute("xmlns",e.xmlns);const r=this.elem("foreignObject",n,i,a);return r._node.appendChild(s),r}text(e){return this._node.appendChild(document.createTextNode(e)),this}empty(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}remove(){var e;return null===(e=this._node.parentNode)||void 0===e||e.removeChild(this._node),this.parent()}replace(e){var t;return null===(t=this._node.parentNode)||void 0===t||t.replaceChild(e._node,this._node),e}append(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this._node.firstChild?this._node.insertBefore(e._node,this._node.firstChild):this._node.appendChild(e._node),this}classes(){const e=this._node.getAttribute("class");return e?e.trim().split(/\s+/):[]}addClass(e){return this._node.setAttribute("class",this.classes().concat(e.trim().split(/\s+/)).filter((function(e,t,n){return n.indexOf(e)===t})).join(" ")),this}removeClass(e){const t=e.trim().split(/\s+/);return this._node.setAttribute("class",this.classes().filter((e=>-1===t.indexOf(e))).join(" ")),this}removeAllClasses(){return this._node.setAttribute("class",""),this}height(){return this._node.getBoundingClientRect().height}width(){return this._node.getBoundingClientRect().width}animate(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return Object.keys(e).forEach((i=>{const s=e[i];Array.isArray(s)?s.forEach((e=>M(this,i,e,!1,n))):M(this,i,s,t,n)})),this}constructor(t,n,i,s,a=!1){t instanceof Element?this._node=t:(this._node=document.createElementNS(e.svg,t),"svg"===t&&this.attr({"xmlns:ct":e.ct})),n&&this.attr(n),i&&this.addClass(i),s&&(a&&s._node.firstChild?s._node.insertBefore(this._node,s._node.firstChild):s._node.appendChild(this._node))}}function N(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"100%",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"100%",s=arguments.length>3?arguments[3]:void 0;Array.from(t.querySelectorAll("svg")).filter((t=>t.getAttributeNS(e.xmlns,"ct"))).forEach((e=>t.removeChild(e)));const a=new O("svg").attr({width:n,height:i}).attr({style:"width: ".concat(n,"; height: ").concat(i,";")});return s&&a.addClass(s),t.appendChild(a.getNode()),a}function C(e,t){var n,i,s,r;const o=Boolean(t.axisX||t.axisY),l=(null===(n=t.axisY)||void 0===n?void 0:n.offset)||0,c=(null===(i=t.axisX)||void 0===i?void 0:i.offset)||0,u=null===(s=t.axisY)||void 0===s?void 0:s.position,h=null===(r=t.axisX)||void 0===r?void 0:r.position;let p=e.width()||a(t.width).value||0,d=e.height()||a(t.height).value||0;const m="number"==typeof(f=t.chartPadding)?{top:f,right:f,bottom:f,left:f}:void 0===f?{top:0,right:0,bottom:0,left:0}:{top:"number"==typeof f.top?f.top:0,right:"number"==typeof f.right?f.right:0,bottom:"number"==typeof f.bottom?f.bottom:0,left:"number"==typeof f.left?f.left:0};var f;p=Math.max(p,l+m.left+m.right),d=Math.max(d,c+m.top+m.bottom);const g={x1:0,x2:0,y1:0,y2:0,padding:m,width(){return this.x2-this.x1},height(){return this.y1-this.y2}};return o?("start"===h?(g.y2=m.top+c,g.y1=Math.max(d-m.bottom,g.y2+1)):(g.y2=m.top,g.y1=Math.max(d-m.bottom-c,g.y2+1)),"start"===u?(g.x1=m.left+l,g.x2=Math.max(p-m.right,g.x1+1)):(g.x1=m.left,g.x2=Math.max(p-m.right-l,g.x1+1))):(g.x1=m.left,g.x2=Math.max(p-m.right,g.x1+1),g.y2=m.top,g.y1=Math.max(d-m.bottom,g.y2+1)),g}function L(e,t,n){let i;const s=[];function a(s){const a=i;i=h({},e),t&&t.forEach((e=>{window.matchMedia(e[0]).matches&&(i=h(i,e[1]))})),n&&s&&n.emit("optionsChanged",{previousOptions:a,currentOptions:i})}if(!window.matchMedia)throw new Error("window.matchMedia not found! Make sure you're using a polyfill.");return t&&t.forEach((e=>{const t=window.matchMedia(e[0]);t.addEventListener("change",a),s.push(t)})),a(),{removeMediaQueryListeners:function(){s.forEach((e=>e.removeEventListener("change",a)))},getCurrentOptions:()=>i}}O.Easing=A;const B={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},I={accuracy:3};function _(e,t,n,i,s,a){const r={command:s?e.toLowerCase():e.toUpperCase(),...t,...a?{data:a}:{}};n.splice(i,0,r)}function P(e,t){e.forEach(((n,i)=>{B[n.command.toLowerCase()].forEach(((s,a)=>{t(n,s,i,a,e)}))}))}class q{static join(e){const t=new q(arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2?arguments[2]:void 0);for(let n=0;n2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return _("M",{x:+e,y:+t},this.pathElements,this.pos++,n,i),this}line(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return _("L",{x:+e,y:+t},this.pathElements,this.pos++,n,i),this}curve(e,t,n,i,s,a){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7?arguments[7]:void 0;return _("C",{x1:+e,y1:+t,x2:+n,y2:+i,x:+s,y:+a},this.pathElements,this.pos++,r,o),this}arc(e,t,n,i,s,a,r){let o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8?arguments[8]:void 0;return _("A",{rx:e,ry:t,xAr:n,lAf:i,sf:s,x:a,y:r},this.pathElements,this.pos++,o,l),this}parse(e){const t=e.replace(/([A-Za-z])(-?[0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(((e,t)=>(t.match(/[A-Za-z]/)&&e.push([]),e[e.length-1].push(t),e)),[]);"Z"===t[t.length-1][0].toUpperCase()&&t.pop();const n=t.map((e=>{const t=e.shift(),n=B[t.toLowerCase()];return{command:t,...n.reduce(((t,n,i)=>(t[n]=+e[i],t)),{})}}));return this.pathElements.splice(this.pos,0,...n),this.pos+=n.length,this}stringify(){const e=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(((t,n)=>{const i=B[n.command.toLowerCase()].map((t=>{const i=n[t];return this.options.accuracy?Math.round(i*e)/e:i}));return t+n.command+i.join(",")}),"")+(this.close?"Z":"")}scale(e,t){return P(this.pathElements,((n,i)=>{n[i]*="x"===i[0]?e:t})),this}translate(e,t){return P(this.pathElements,((n,i)=>{n[i]+="x"===i[0]?e:t})),this}transform(e){return P(this.pathElements,((t,n,i,s,a)=>{const r=e(t,n,i,s,a);(r||0===r)&&(t[n]=r)})),this}clone(){const e=new q(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.close);return e.pos=this.pos,e.pathElements=this.pathElements.slice().map((e=>({...e}))),e.options={...this.options},e}splitByCommand(e){const t=[new q];return this.pathElements.forEach((n=>{n.command===e.toUpperCase()&&0!==t[t.length-1].pathElements.length&&t.push(new q),t[t.length-1].pathElements.push(n)})),t}constructor(e=!1,t){this.close=e,this.pathElements=[],this.pos=0,this.options={...I,...t}}}class R{on(e,t){const{allListeners:n,listeners:i}=this;"*"===e?n.add(t):(i.has(e)||i.set(e,new Set),i.get(e).add(t))}off(e,t){const{allListeners:n,listeners:i}=this;if("*"===e)t?n.delete(t):n.clear();else if(i.has(e)){const n=i.get(e);t?n.delete(t):n.clear(),n.size||i.delete(e)}}emit(e,t){const{allListeners:n,listeners:i}=this;i.has(e)&&i.get(e).forEach((e=>e(t))),n.forEach((n=>n(e,t)))}constructor(){this.listeners=new Map,this.allListeners=new Set}}const T=new WeakMap;class V{update(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i;return e&&(this.data=e||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),t&&(this.options=h({},n?this.options:this.defaultOptions,t),this.initializeTimeoutId||(null===(i=this.optionsProvider)||void 0===i||i.removeMediaQueryListeners(),this.optionsProvider=L(this.options,this.responsiveOptions,this.eventEmitter))),!this.initializeTimeoutId&&this.optionsProvider&&this.createChart(this.optionsProvider.getCurrentOptions()),this}detach(){var e;return this.initializeTimeoutId?window.clearTimeout(this.initializeTimeoutId):(window.removeEventListener("resize",this.resizeListener),null===(e=this.optionsProvider)||void 0===e||e.removeMediaQueryListeners()),T.delete(this.container),this}on(e,t){return this.eventEmitter.on(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}initialize(){window.addEventListener("resize",this.resizeListener),this.optionsProvider=L(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.on("optionsChanged",(()=>this.update())),this.options.plugins&&this.options.plugins.forEach((e=>{Array.isArray(e)?e[0](this,e[1]):e(this)})),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=null}constructor(e,t,n,i,s){this.data=t,this.defaultOptions=n,this.options=i,this.responsiveOptions=s,this.eventEmitter=new R,this.resizeListener=()=>this.update(),this.initializeTimeoutId=setTimeout((()=>this.initialize()),0);const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Target element is not found");this.container=a;const r=T.get(a);r&&r.detach(),T.set(a,this)}}const U={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};class D{createGridAndLabels(e,t,n,i){const s="x"===this.units.pos?n.axisX:n.axisY,a=this.ticks.map(((e,t)=>this.projectValue(e,t))),r=this.ticks.map(s.labelInterpolationFnc);a.forEach(((o,l)=>{const c=r[l],u={x:0,y:0};let h;h=a[l+1]?a[l+1]-o:Math.max(this.axisLength-o,this.axisLength/this.ticks.length),""!==c&&y(c)||("x"===this.units.pos?(o=this.chartRect.x1+o,u.x=n.axisX.labelOffset.x,"start"===n.axisX.position?u.y=this.chartRect.padding.top+n.axisX.labelOffset.y+5:u.y=this.chartRect.y1+n.axisX.labelOffset.y+5):(o=this.chartRect.y1-o,u.y=n.axisY.labelOffset.y-h,"start"===n.axisY.position?u.x=this.chartRect.padding.left+n.axisY.labelOffset.x:u.x=this.chartRect.x2+n.axisY.labelOffset.x+10),s.showGrid&&function(e,t,n,i,s,a,r,o){const l={["".concat(n.units.pos,"1")]:e,["".concat(n.units.pos,"2")]:e,["".concat(n.counterUnits.pos,"1")]:i,["".concat(n.counterUnits.pos,"2")]:i+s},c=a.elem("line",l,r.join(" "));o.emit("draw",{type:"grid",axis:n,index:t,group:a,element:c,...l})}(o,l,this,this.gridOffset,this.chartRect[this.counterUnits.len](),e,[n.classNames.grid,n.classNames[this.units.dir]],i),s.showLabel&&function(e,t,n,i,s,a,r,o,l,c){const u={[s.units.pos]:e+r[s.units.pos],[s.counterUnits.pos]:r[s.counterUnits.pos],[s.units.len]:t,[s.counterUnits.len]:Math.max(0,a-10)},h=Math.round(u[s.units.len]),p=Math.round(u[s.counterUnits.len]),d=document.createElement("span");d.className=l.join(" "),d.style[s.units.len]=h+"px",d.style[s.counterUnits.len]=p+"px",d.textContent=String(i);const m=o.foreignObject(d,{style:"overflow: visible;",...u});c.emit("draw",{type:"label",axis:s,index:n,group:o,element:m,text:i,...u})}(o,h,l,c,this,s.offset,u,t,[n.classNames.label,n.classNames[this.units.dir],"start"===s.position?n.classNames[s.position]:n.classNames.end],i))}))}constructor(e,t,n){this.units=e,this.chartRect=t,this.ticks=n,this.counterUnits=e===U.x?U.y:U.x,this.axisLength=t[this.units.rectEnd]-t[this.units.rectStart],this.gridOffset=t[this.units.rectOffset]}}class X extends D{projectValue(e){const t=Number(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";return function(e){return"object"==typeof e&&null!==e&&(Reflect.has(e,"x")||Reflect.has(e,"y"))}(e)&&f(e,t)?v(e[t]):v(e)}(e,this.units.pos));return this.axisLength*(t-this.bounds.min)/this.bounds.range}constructor(e,t,n,i){const s=i.highLow||x(t,i,e.pos),a=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s={high:t.high,low:t.low,valueRange:0,oom:0,step:0,min:0,max:0,range:0,numberOfSteps:0,values:[]};var a;s.valueRange=s.high-s.low,s.oom=(a=s.valueRange,Math.floor(Math.log(Math.abs(a))/Math.LN10)),s.step=Math.pow(10,s.oom),s.min=Math.floor(s.low/s.step)*s.step,s.max=Math.ceil(s.high/s.step)*s.step,s.range=s.max-s.min,s.numberOfSteps=Math.round(s.range/s.step);const r=l(e,s.step,s)=n)s.step=1;else if(i&&u=n)s.step=u;else{let t=0;for(;;){if(r&&l(e,s.step,s)<=n)s.step*=2;else{if(r||!(l(e,s.step/2,s)>=n))break;if(s.step/=2,i&&s.step%1!=0){s.step*=2;break}}if(t++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}}function h(e,t){return e===(e+=t)&&(e*=1+(t>0?o:-o)),e}s.step=Math.max(s.step,o);let p=s.min,d=s.max;for(;p+s.step<=s.low;)p=h(p,s.step);for(;d-s.step>=s.high;)d=h(d,-s.step);s.min=p,s.max=d,s.range=s.max-s.min;const m=[];for(let e=s.min;e<=s.max;e=h(e,s.step)){const t=c(e);t!==m[m.length-1]&&m.push(t)}return s.values=m,s}(n[e.rectEnd]-n[e.rectStart],s,i.scaleMinSpace||20,i.onlyInteger),r={min:a.min,max:a.max};super(e,n,a.values),this.bounds=a,this.range=r}}class Y extends D{projectValue(e,t){return this.stepLength*t}constructor(e,t,n,i){const s=i.ticks||[];super(e,n,s);const a=Math.max(1,s.length-(i.stretch?1:0));this.stepLength=this.axisLength/a,this.stretch=Boolean(i.stretch)}}const G={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:p,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:p,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};class K extends V{createChart(e){const{data:t}=this,n=b(t,e.reverseData,e.horizontalBars?"x":"y",!0),i=N(this.container,e.width,e.height,e.classNames.chart+(e.horizontalBars?" "+e.classNames.horizontalBars:"")),s=e.stackBars&&!0!==e.stackMode&&n.series.length?x([(a=n.series,o=a,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n({x:e.x+(f(t,"x")?t.x:0),y:e.y+(f(t,"y")?t.y:0)})),{x:0,y:0})},d(Math.max(...o.map((e=>e.length))),(e=>l(...o.map((t=>t[e]))))))],e,e.horizontalBars?"x":"y"):x(n.series,e,e.horizontalBars?"x":"y");var a,o,l;this.svg=i;const c=i.elem("g").addClass(e.classNames.gridGroup),u=i.elem("g"),h=i.elem("g").addClass(e.classNames.labelGroup);"number"==typeof e.high&&(s.high=e.high),"number"==typeof e.low&&(s.low=e.low);const p=C(i,e);let m;const y=e.distributeSeries&&e.stackBars?n.labels.slice(0,1):n.labels;let v,w,k;e.horizontalBars?(m=w=void 0===e.axisX.type?new X(U.x,n.series,p,{...e.axisX,highLow:s,referenceValue:0}):new e.axisX.type(U.x,n.series,p,{...e.axisX,highLow:s,referenceValue:0}),v=k=void 0===e.axisY.type?new Y(U.y,n.series,p,{ticks:y}):new e.axisY.type(U.y,n.series,p,e.axisY)):(v=w=void 0===e.axisX.type?new Y(U.x,n.series,p,{ticks:y}):new e.axisX.type(U.x,n.series,p,e.axisX),m=k=void 0===e.axisY.type?new X(U.y,n.series,p,{...e.axisY,highLow:s,referenceValue:0}):new e.axisY.type(U.y,n.series,p,{...e.axisY,highLow:s,referenceValue:0}));const z=e.horizontalBars?p.x1+m.projectValue(0):p.y1-m.projectValue(0),S="accumulate"===e.stackMode,j="accumulate-relative"===e.stackMode,A=[],M=[];let O=A;v.createGridAndLabels(c,h,e,this.eventEmitter),m.createGridAndLabels(c,h,e,this.eventEmitter),e.showGridBackground&&function(e,t,n,i){const s=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},n,!0);i.emit("draw",{type:"gridBackground",group:e,element:s})}(c,p,e.classNames.gridBackground,this.eventEmitter),function(e,t){let n=0;e[arguments.length>2&&void 0!==arguments[2]&&arguments[2]?"reduceRight":"reduce"](((e,i,s)=>t(i,n++,s)),void 0)}(t.series,((i,s)=>{const a=s-(t.series.length-1)/2;let o;o=e.distributeSeries&&!e.stackBars?v.axisLength/n.series.length/2:e.distributeSeries&&e.stackBars?v.axisLength/2:v.axisLength/n.series[s].length/2;const l=u.elem("g"),c=f(i,"name")&&i.name,h=f(i,"className")&&i.className,d=f(i,"meta")?i.meta:void 0;c&&l.attr({"ct:series-name":c}),d&&l.attr({"ct:meta":E(d)}),l.addClass([e.classNames.series,h||"".concat(e.classNames.series,"-").concat(r(s))].join(" ")),n.series[s].forEach(((t,r)=>{const c=f(t,"x")&&t.x,u=f(t,"y")&&t.y;let h,d;h=e.distributeSeries&&!e.stackBars?s:e.distributeSeries&&e.stackBars?0:r,d=e.horizontalBars?{x:p.x1+m.projectValue(c||0,r,n.series[s]),y:p.y1-v.projectValue(u||0,h,n.series[s])}:{x:p.x1+v.projectValue(c||0,h,n.series[s]),y:p.y1-m.projectValue(u||0,r,n.series[s])},v instanceof Y&&(v.stretch||(d[v.units.pos]+=o*(e.horizontalBars?-1:1)),d[v.units.pos]+=e.stackBars||e.distributeSeries?0:a*e.seriesBarDistance*(e.horizontalBars?-1:1)),j&&(O=u>=0||c>=0?A:M);const y=O[r]||z;if(O[r]=y-(z-d[v.counterUnits.pos]),void 0===t)return;const x={["".concat(v.units.pos,"1")]:d[v.units.pos],["".concat(v.units.pos,"2")]:d[v.units.pos]};e.stackBars&&(S||j||!e.stackMode)?(x["".concat(v.counterUnits.pos,"1")]=y,x["".concat(v.counterUnits.pos,"2")]=O[r]):(x["".concat(v.counterUnits.pos,"1")]=z,x["".concat(v.counterUnits.pos,"2")]=d[v.counterUnits.pos]),x.x1=Math.min(Math.max(x.x1,p.x1),p.x2),x.x2=Math.min(Math.max(x.x2,p.x1),p.x2),x.y1=Math.min(Math.max(x.y1,p.y2),p.y1),x.y2=Math.min(Math.max(x.y2,p.y2),p.y1);const b=function(e,t){const n=Array.isArray(e)?e[t]:f(e,"data")?e.data[t]:null;return f(n,"meta")?n.meta:void 0}(i,r),N=l.elem("line",x,e.classNames.bar).attr({"ct:value":[c,u].filter(g).join(","),"ct:meta":E(b)});this.eventEmitter.emit("draw",{type:"bar",value:t,index:r,meta:b,series:i,seriesIndex:s,axisX:w,axisY:k,chartRect:p,group:l,element:N,...x})}))}),e.reverseData),this.eventEmitter.emit("created",{chartRect:p,axisX:w,axisY:k,svg:i,options:e})}constructor(e,t,n,i){super(e,t,G,h({},G,n),i),this.data=t}}const H={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:p,labelDirection:"neutral",ignoreEmptyValues:!1};function Q(e,t,n){const i=t.x>e.x;return i&&"explode"===n||!i&&"implode"===n?"start":i&&"implode"===n||!i&&"explode"===n?"end":"middle"}class F extends V{createChart(e){const{data:t}=this,n=b(t),i=[];let s,o,l=e.startAngle;const c=N(this.container,e.width,e.height,e.donut?e.classNames.chartDonut:e.classNames.chartPie);this.svg=c;const h=C(c,e);let p=Math.min(h.width()/2,h.height()/2);const d=e.total||n.series.reduce(m,0),g=a(e.donutWidth);"%"===g.unit&&(g.value*=p/100),p-=e.donut?g.value/2:0,o="outside"===e.labelPosition||e.donut?p:"center"===e.labelPosition?0:p/2,e.labelOffset&&(o+=e.labelOffset);const v={x:h.x1+h.width()/2,y:h.y2+h.height()/2},w=1===t.series.filter((e=>f(e,"value")?0!==e.value:0!==e)).length;t.series.forEach(((e,t)=>i[t]=c.elem("g"))),e.showLabel&&(s=c.elem("g")),t.series.forEach(((a,c)=>{var m,x;if(0===n.series[c]&&e.ignoreEmptyValues)return;const b=f(a,"name")&&a.name,k=f(a,"className")&&a.className,z=f(a,"meta")?a.meta:void 0;b&&i[c].attr({"ct:series-name":b}),i[c].addClass([null===(m=e.classNames)||void 0===m?void 0:m.series,k||"".concat(null===(x=e.classNames)||void 0===x?void 0:x.series,"-").concat(r(c))].join(" "));let S=d>0?l+n.series[c]/d*360:0;const j=Math.max(0,l-(0===c||w?0:.2));S-j>=359.99&&(S=j+359.99);const A=u(v.x,v.y,p,j),M=u(v.x,v.y,p,S),O=new q(!e.donut).move(M.x,M.y).arc(p,p,0,Number(S-l>180),0,A.x,A.y);e.donut||O.line(v.x,v.y);const N=i[c].elem("path",{d:O.stringify()},e.donut?e.classNames.sliceDonut:e.classNames.slicePie);if(N.attr({"ct:value":n.series[c],"ct:meta":E(z)}),e.donut&&N.attr({style:"stroke-width: "+g.value+"px"}),this.eventEmitter.emit("draw",{type:"slice",value:n.series[c],totalDataSum:d,index:c,meta:z,series:a,group:i[c],element:N,path:O.clone(),center:v,radius:p,startAngle:l,endAngle:S,chartRect:h}),e.showLabel){let i,r;i=1===t.series.length?{x:v.x,y:v.y}:u(v.x,v.y,o,l+(S-l)/2),r=n.labels&&!y(n.labels[c])?n.labels[c]:n.series[c];const p=e.labelInterpolationFnc(r,c);if(p||0===p){const t=s.elem("text",{dx:i.x,dy:i.y,"text-anchor":Q(v,i,e.labelDirection)},e.classNames.label).text(String(p));this.eventEmitter.emit("draw",{type:"label",index:c,group:s,element:t,text:""+p,chartRect:h,series:a,meta:z,...i})}}l=S})),this.eventEmitter.emit("created",{chartRect:h,svg:c,options:e})}constructor(e,t,n,i){super(e,t,H,h({},H,n),i),this.data=t}}var W={pis:43.59,ko:27.4,lewica:12.56,psl:8.55,konfederacja:6.81},J=[{id:"pis",name:"Prawo i Sprawiedliwość",shortName:"PiS",threshold:5,pastSupportEquivalence:[["pis",1]]},{id:"ko",name:"Koalicja Obywatelska",shortName:"KO",threshold:8,pastSupportEquivalence:[["ko",1]]},{id:"lewica",name:"Lewica",shortName:"Lew.",threshold:5,pastSupportEquivalence:[["lewica",1]]},{id:"td",name:"Trzecia Droga",shortName:"TD",threshold:8,pastSupportEquivalence:[["psl",.48],["lewica",.23],["konfederacja",.17],["ko",.15],["pis",.03]]},{id:"konfederacja",name:"Konfederacja",shortName:"Konf.",threshold:5,pastSupportEquivalence:[["konfederacja",1]]},{id:"mn",name:"Mniejszość Niemiecka",shortName:"MN",threshold:0,pastSupportEquivalence:[]}],Z=[{name:"Legnica",size:12,pastSupport:{ko:25.02,konfederacja:5.85,psl:7.17,pis:42.4,lewica:16.43}},{name:"Wałbrzych",size:8,pastSupport:{ko:32.09,konfederacja:5.42,psl:7.25,pis:40.54,lewica:12.35}},{name:"Wrocław",size:14,pastSupport:{ko:32.8,konfederacja:7.45,psl:6.46,pis:34.67,lewica:15.41}},{name:"Bydgoszcz",size:12,pastSupport:{ko:31.05,konfederacja:7.05,psl:9.02,pis:36.43,lewica:15.17}},{name:"Toruń",size:13,pastSupport:{ko:26.42,konfederacja:6.33,psl:10.88,pis:40.38,lewica:14.83}},{name:"Lublin",size:15,pastSupport:{ko:19.3,konfederacja:7.07,psl:9.1,pis:55.39,lewica:7.81}},{name:"Chełm",size:12,pastSupport:{ko:14.8,konfederacja:5.84,psl:11.86,pis:59.5,lewica:6.83}},{name:"Zielona Góra",size:12,pastSupport:{ko:31.27,konfederacja:7.19,psl:11.63,pis:34.3,lewica:15.61}},{name:"Łódź",size:10,pastSupport:{ko:35.82,konfederacja:6.65,psl:4.53,pis:32.9,lewica:20.1}},{name:"Piotrków Trybunalski",size:9,pastSupport:{ko:15.64,konfederacja:6.76,psl:10.44,pis:56.21,lewica:10.95}},{name:"Sieradz",size:12,pastSupport:{ko:20.48,konfederacja:5.88,psl:10.29,pis:49.81,lewica:11.98}},{name:"Chrzanów",size:8,pastSupport:{ko:23.04,konfederacja:7.06,psl:7.9,pis:53.48,lewica:8.51}},{name:"Kraków",size:14,pastSupport:{ko:30.48,konfederacja:7.99,psl:7.27,pis:39.56,lewica:13.01}},{name:"Nowy Sącz",size:10,pastSupport:{ko:13.83,konfederacja:6.95,psl:7.35,pis:65.8,lewica:6.07}},{name:"Tarnów",size:9,pastSupport:{ko:14,konfederacja:7.11,psl:13.35,pis:59.59,lewica:5.94}},{name:"Płock",size:10,pastSupport:{ko:16.85,konfederacja:5.24,psl:15.17,pis:52.45,lewica:8.76}},{name:"Radom",size:9,pastSupport:{ko:17.15,konfederacja:5.89,psl:10.2,pis:57.82,lewica:7.43}},{name:"Siedlce",size:12,pastSupport:{ko:13.94,konfederacja:6.49,psl:11.94,pis:59.76,lewica:6.45}},{name:"Warszawa I",size:20,pastSupport:{ko:42.05,konfederacja:7.51,psl:4.75,pis:27.49,lewica:18.19}},{name:"Warszawa II",size:12,pastSupport:{ko:28.61,konfederacja:6.63,psl:8.6,pis:40.89,lewica:13.09}},{name:"Opole",size:12,pastSupport:{ko:26.71,konfederacja:5.7,psl:10.31,pis:37.64,lewica:11.74}},{name:"Krosno",size:11,pastSupport:{ko:15.94,konfederacja:6.81,psl:7.85,pis:63.36,lewica:6.04}},{name:"Rzeszów",size:15,pastSupport:{ko:14.39,konfederacja:8.25,psl:7.79,pis:62.38,lewica:6.59}},{name:"Białystok",size:14,pastSupport:{ko:21.04,konfederacja:6.96,psl:9.33,pis:52.04,lewica:9.09}},{name:"Gdańsk",size:12,pastSupport:{ko:41.31,konfederacja:7.21,psl:5.9,pis:32.1,lewica:13.47}},{name:"Gdynia",size:14,pastSupport:{ko:35.85,konfederacja:7.3,psl:7.94,pis:36.43,lewica:12.47}},{name:"Bielsko-Biała",size:9,pastSupport:{ko:27.2,konfederacja:7.42,psl:7.13,pis:46.76,lewica:11.48}},{name:"Częstochowa",size:7,pastSupport:{ko:22.63,konfederacja:6.07,psl:8.68,pis:44.28,lewica:15.59}},{name:"Gliwice",size:9,pastSupport:{ko:32.61,konfederacja:7.67,psl:5.99,pis:37.75,lewica:13.38}},{name:"Rybnik",size:9,pastSupport:{ko:27.71,konfederacja:7.17,psl:5.64,pis:48.28,lewica:9.68}},{name:"Katowice",size:12,pastSupport:{ko:37.2,konfederacja:7.33,psl:4.37,pis:39.19,lewica:11.92}},{name:"Sosnowiec",size:9,pastSupport:{ko:29.66,konfederacja:6.45,psl:4.85,pis:37.13,lewica:21.9}},{name:"Kielce",size:16,pastSupport:{ko:16.65,konfederacja:5.95,psl:9.88,pis:55.18,lewica:9.95}},{name:"Elbląg",size:8,pastSupport:{ko:28.43,konfederacja:5.66,psl:10.89,pis:40.86,lewica:11.64}},{name:"Olsztyn",size:10,pastSupport:{ko:26.46,konfederacja:6.97,psl:13.19,pis:38.82,lewica:13.84}},{name:"Kalisz",size:12,pastSupport:{ko:24.72,konfederacja:6.57,psl:12.8,pis:42.48,lewica:13.43}},{name:"Konin",size:9,pastSupport:{ko:20.48,konfederacja:6.74,psl:9.81,pis:47.29,lewica:15.04}},{name:"Piła",size:9,pastSupport:{ko:30.6,konfederacja:6.62,psl:13.86,pis:35.64,lewica:13.28}},{name:"Poznań",size:10,pastSupport:{ko:45.38,konfederacja:6.61,psl:6.2,pis:25.33,lewica:16.49}},{name:"Koszalin",size:8,pastSupport:{ko:32.31,konfederacja:5.98,psl:9.43,pis:36.83,lewica:15.44}},{name:"Szczecin",size:12,pastSupport:{ko:35.71,konfederacja:6.53,psl:7.4,pis:35.11,lewica:15.25}}];var $=n(50),ee=n.n($),te=n(253),ne=n.n(te),ie=window.location,se=null,ae=null,re=function(){document.querySelectorAll("tr td:last-child").forEach((function(e){e.innerHTML=""})),se&&se.detach(),ae&&ae.detach();var e=document.getElementById("url");e&&(e.innerHTML=""),document.getElementById("support-bar-chart").innerHTML="",document.getElementById("division-pie-chart").innerHTML="";var t=document.getElementById("constituency-results");if(t&&(t.innerHTML=""),ie.search){var n=ie.href.split("?")[0];window.history.pushState("","",n)}},oe=function(){var e=document.querySelector("#support-form"),t=document.querySelectorAll("#support-form input"),n=Array.from(t).map((function(e){return parseFloat(e.value)})).map((function(e){return Number.isNaN(e)?0:e}));if(function(e,t,n){t.forEach((function(e){return e.setCustomValidity("")})),n.some((function(e,n){return e<0&&(t[n].setCustomValidity("Poparcie nie może byc mniejsze od 0%"),!0)}));var i=n.reduce((function(e,t){return e+t}),0);return i>100?t[0].setCustomValidity("Suma poparcia nie może przekraczać 100%"):i<=0&&t[0].setCustomValidity("Suma poparcia musi być wyższa niż 0%"),e.reportValidity()}(e,t,n)){var i,s=function(e){var t=J.map((function(e){return e.pastSupportEquivalence.map((function(e){return W[e[0]]*e[1]})).reduce((function(e,t){return e+t}),0)})),n=new Array(e.length+1).fill(0);return Z.forEach((function(i){var s=function(e,t,n){var i=n.pastSupport,s=J.map((function(e){return e.pastSupportEquivalence.map((function(e){return i[e[0]]*e[1]})).reduce((function(e,t){return e+t}),0)})),a=t.map((function(e,t){return s[t]/e})),r=e.map((function(e,t){return e*a[t]}));return"Opole"===n.name&&r.push(7.9),r}(e,t,i);i.support=s,i.mandates=new Array(s.length).fill(0);for(var a=s.map((function(t,n){return e[n]0&&(n[e.committeeIndex]+=1,i.mandates[e.committeeIndex]+=1)}))})),n}(n);!function(e){e.forEach((function(e,t){var n=J[t].id,i=document.querySelector("tr.".concat(n," td:last-child"));i&&(i.textContent=e.toString())}))}(s),function(e){if(document.getElementById("url")){var t=new URLSearchParams;e.forEach((function(e,n){e>0&&t.append(J[n].id,e.toString())}));var n=ie.href.split("?")[0],i="".concat(n,"?").concat(t);document.getElementById("url").innerHTML="Link do wyników: ".concat(i.link(i))}}(n),se=function(e){var t=J.map((function(t,n){return{label:t.shortName,support:{value:e[n],className:t.id}}})).filter((function(e){return e.support.value&&e.support.value>0})).sort((function(e,t){return t.support.value-e.support.value})),n={labels:t.map((function(e){return e.label})),series:t.map((function(e){return e.support}))},i=new K("#support-bar-chart",n,{distributeSeries:!0,axisY:{labelInterpolationFnc:function(e){return"".concat(e.toLocaleString("pl",{minimumFractionDigits:0,maximumFractionDigits:1}),"%")}}});return i.on("draw",(function(e){"bar"===e.type&&e.element.attr({style:"stroke-width: 30px"})})),i}(n),ae=function(e){var t=J.map((function(t,n){return{label:t.shortName,mandates:{value:e[n],className:t.id}}})).filter((function(e){return e.mandates.value&&e.mandates.value>0})).sort((function(e,t){return t.mandates.value-e.mandates.value})),n={series:t.map((function(e){return e.mandates}))};return new F("#division-pie-chart",n,{donut:!0,donutWidth:60,startAngle:270,total:920,labelInterpolationFnc:function(e,n){return e<15?"":"".concat(t[n].label," ").concat(e)}})}(s),(i=document.getElementById("constituency-results"))&&Z.forEach((function(e,t){var n=e.mandates&&e.support?e.mandates.map((function(t,n){return{committee:J[n].name,support:e.support[n],mandates:t}})):[];n.sort((function(e,t){return t.support-e.support})),i.insertAdjacentHTML("beforeend",ee()({number:t+1,name:e.name,size:e.size,data:n}))})),t.forEach((function(e){return e.addEventListener("input",(function(){re()}))}))}},le=function(){ie.search&&(new URLSearchParams(ie.search).forEach((function(e,t){var n=document.querySelector("tr.".concat(t," td:nth-child(2) input"));n&&(n.value=e)})),oe())},ce=n(587),ue=n.n(ce),he=function(e){e.preventDefault(),oe()};document.addEventListener("DOMContentLoaded",(function(){document.body.insertAdjacentHTML("afterbegin",ue()({embed:"#embed"===window.location.hash})),document.getElementById("support-form").insertAdjacentHTML("afterbegin",ne()({committees:J})),le(),document.querySelector("#calculate-button").addEventListener("click",he)})),window.addEventListener("popstate",(function(){window.location.search?le():(document.querySelectorAll("tr td:nth-child(2) input").forEach((function(e){e.value=""})),re())}))})()})(); \ No newline at end of file +(()=>{var e={50:e=>{function t(e){var t=""+e,i=n.exec(t);if(!i)return e;var s,a,r,o="";for(s=i.index,a=0;s]/;e.exports=function(e){var n,i="",s=e||{};return function(e,s,a,r){i=i+'

Okręg '+t(null==(n=a)?"":n)+" "+t(null==(n=s)?"":n)+"

Łącznie "+t(null==(n=r)?"":n)+" mandatów

",function(){var s=e;if("number"==typeof s.length)for(var a=0,r=s.length;a"}else for(var a in r=0,s)r++,o=s[a],i=i+""}.call(this),i+="
"+t(null==(n=o.committee)?"":n)+""+t(null==(n=o.mandates)?"":n)+"
"+t(null==(n=o.committee)?"":n)+""+t(null==(n=o.mandates)?"":n)+"
"}.call(this,"data"in s?s.data:"undefined"!=typeof data?data:void 0,"name"in s?s.name:"undefined"!=typeof name?name:void 0,"number"in s?s.number:"undefined"!=typeof number?number:void 0,"size"in s?s.size:"undefined"!=typeof size?size:void 0),i}},587:e=>{function t(e,s){return Array.isArray(e)?function(e,i){for(var s,a="",r="",o=Array.isArray(i),l=0;l]/;e.exports=function(e){var n="",i=e||{};return function(e){n=n+"",e||(n+='

Kalkulator mandatów w wyborach do Sejmu

Kalkulator zwraca szacowany rozkład mandatów w Sejmie na podstawie wyników sondażowych.\nObliczenia są dokonywane zgodnie z obowiązującą w Polsce ordynacją wyborczą, tj. stosując\nmetodę D’Hondta osobno w każdym z 41 okręgów wyborczych.

Dodatkowo poparcie dla poszczególnych komitetów w okręgach jest różnicowane na podstawie\nszczegółowych wyników ostatnich wyborów parlamentarnych. Ugrupowanie, które w danym okręgu miało\nwtedy poparcie wyższe/niższe niż w całym kraju, również w tej symulacji będzie miało w tym\nokręgu odpowiednio wyższe/niższe poparcie. Pozwala to na sporządzenie szczegółowej prognozy\npodziału mandatów na poziomie poszczególnych okręgów.

Aktualizacje:

  1. 2019-11-15: od teraz w prognozie brane są pod uwagę wyniki wyborów do Sejmu z 2019 roku.
  2. 2020-10-28: dodano partię polityczną Polska 2050; jej prognozowane poparcie w okręgach jest\nliczone na podstawie deklaracji wyborców Szymona Hołowni przedstawionych w artykule\nAnaliza przepływów wyborców z 29 czerwca 2020 roku.
  3. 2023-08-21: dodano koalicyjny komitet wyborczy Trzecia Droga (Polska 2050 + PSL – Koalicja Polska).\n\n
'),n+='
',e||(n+='
'),n+='
',e||(n+='
'),n+=""}.call(this,"embed"in i?i.embed:"undefined"!=typeof embed?embed:void 0),n}},253:e=>{function t(e,t,n,s){if(!1===t||null==t||!t&&("class"===e||"style"===e))return"";if(!0===t)return" "+(s?e:e+'="'+e+'"');var a=typeof t;return"object"!==a&&"function"!==a||"function"!=typeof t.toJSON||(t=t.toJSON()),"string"==typeof t||(t=JSON.stringify(t),n||-1===t.indexOf('"'))?(n&&(t=i(t))," "+e+'="'+t+'"'):" "+e+"='"+t.replace(/'/g,"'")+"'"}function n(e,t){return Array.isArray(e)?function(e,t){for(var s,a="",r="",o=Array.isArray(t),l=0;l]/;e.exports=function(e){var s,a="",r=e||{};return function(e){a+="",function(){var r=e;if("number"==typeof r.length)for(var o=0,l=r.length;o"}else for(var o in l=0,r)l++,c=r[o],a=a+""}.call(this),a+="
KomitetPoparcieMandaty
"+i(null==(s=c.name)?"":s)+"","mn"!==c.id&&(a=a+'%"),a+="
"+i(null==(s=c.name)?"":s)+"","mn"!==c.id&&(a=a+'%"),a+="
"}.call(this,"committees"in r?r.committees:"undefined"!=typeof committees?committees:void 0),a}}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},t=8,i={"&":"&","<":"<",">":">",'"':""","'":"'"};function s(e,t){return"number"==typeof e?e+t:e}function a(e){if("string"==typeof e){const t=/^(\d+)\s*(.*)$/g.exec(e);return{value:t?+t[1]:0,unit:(null==t?void 0:t[2])||void 0}}return{value:Number(e)}}function r(e){return String.fromCharCode(97+e%26)}const o=2221e-19;function l(e,t,n){return t/n.range*e}function c(e,n){const i=Math.pow(10,n||t);return Math.round(e*i)/i}function u(e,t,n,i){const s=(i-90)*Math.PI/180;return{x:e+n*Math.cos(s),y:t+n*Math.sin(s)}}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;ie;function p(e,t){return Array.from({length:e},t?(e,n)=>t(n):()=>{})}const m=(e,t)=>e+(t||0);function f(e,t){return null!==e&&"object"==typeof e&&Reflect.has(e,t)}function g(e){return null!==e&&isFinite(e)}function y(e){return!e&&0!==e}function v(e){return g(e)?Number(e):void 0}function w(e){return null==e||"number"==typeof e&&isNaN(e)}function x(e,t,n){const i={high:void 0===(t={...t,...n?"x"===n?t.axisX:t.axisY:{}}).high?-Number.MAX_VALUE:+t.high,low:void 0===t.low?Number.MAX_VALUE:+t.low},s=void 0===t.high,a=void 0===t.low;return(s||a)&&function e(t){if(!w(t))if(Array.isArray(t))for(let n=0;ni.high&&(i.high=e),a&&e0||(i.high=1),i.low=0)),i}function b(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;const a={labels:(e.labels||[]).slice(),series:E(e.series,i,s)},r=a.labels.length;return function(e){return!!Array.isArray(e)&&e.every(Array.isArray)}(a.series)?(t=Math.max(r,...a.series.map((e=>e.length))),a.series.forEach((e=>{e.push(...p(Math.max(0,t-e.length)))}))):t=a.series.length,a.labels.push(...p(Math.max(0,t-r),(()=>""))),n&&function(e){var t;null===(t=e.labels)||void 0===t||t.reverse(),e.series.reverse();for(const t of e.series)f(t,"data")?t.data.reverse():Array.isArray(t)&&t.reverse()}(a),a}function k(e,t){if(!w(e))return t?function(e,t){let n,i;if("object"!=typeof e){const s=v(e);"x"===t?n=s:i=s}else f(e,"x")&&(n=v(e.x)),f(e,"y")&&(i=v(e.y));if(void 0!==n||void 0!==i)return{x:n,y:i}}(e,t):v(e)}function z(e,t){return Array.isArray(e)?e.map((e=>f(e,"value")?k(e.value,t):k(e,t))):z(e.data,t)}function E(e,t,n){if(i=e,Array.isArray(i)&&i.every((e=>Array.isArray(e)||f(e,"data"))))return e.map((e=>z(e,t)));var i;const s=z(e,t);return n?s.map((e=>[e])):s}function S(e){let t="";return null==e?e:(t="number"==typeof e?""+e:"object"==typeof e?JSON.stringify({data:e}):String(e),Object.keys(i).reduce(((e,t)=>e.replaceAll(t,i[t])),t))}class j{call(e,t){return this.svgElements.forEach((n=>Reflect.apply(n[e],n,t))),this}attr(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0;const{easing:o,...l}=n,c={};let u,h;o&&(u=Array.isArray(o)?o:A[o]),l.begin=s(l.begin,"ms"),l.dur=s(l.dur,"ms"),u&&(l.calcMode="spline",l.keySplines=u.join(" "),l.keyTimes="0;1"),i&&(l.fill="freeze",c[t]=l.from,e.attr(c),h=a(l.begin||0).value,l.begin="indefinite");const d=e.elem("animate",{attributeName:t,...l});i&&setTimeout((()=>{try{d._node.beginElement()}catch(n){c[t]=l.to,e.attr(c),d.remove()}}),h);const p=d.getNode();r&&p.addEventListener("beginEvent",(()=>r.emit("animationBegin",{element:e,animate:p,params:n}))),p.addEventListener("endEvent",(()=>{r&&r.emit("animationEnd",{element:e,animate:p,params:n}),i&&(c[t]=l.to,e.attr(c),d.remove())}))}class O{attr(t,n){return"string"==typeof t?n?this._node.getAttributeNS(n,t):this._node.getAttribute(t):(Object.keys(t).forEach((n=>{if(void 0!==t[n])if(-1!==n.indexOf(":")){const i=n.split(":");this._node.setAttributeNS(e[i[0]],n,String(t[n]))}else this._node.setAttribute(n,String(t[n]))})),this)}elem(e,t,n){return new O(e,t,n,this,arguments.length>3&&void 0!==arguments[3]&&arguments[3])}parent(){return this._node.parentNode instanceof SVGElement?new O(this._node.parentNode):null}root(){let e=this._node;for(;"svg"!==e.nodeName&&e.parentElement;)e=e.parentElement;return new O(e)}querySelector(e){const t=this._node.querySelector(e);return t?new O(t):null}querySelectorAll(e){const t=this._node.querySelectorAll(e);return new j(t)}getNode(){return this._node}foreignObject(t,n,i){let s,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("string"==typeof t){const e=document.createElement("div");e.innerHTML=t,s=e.firstChild}else s=t;s instanceof Element&&s.setAttribute("xmlns",e.xmlns);const r=this.elem("foreignObject",n,i,a);return r._node.appendChild(s),r}text(e){return this._node.appendChild(document.createTextNode(e)),this}empty(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this}remove(){var e;return null===(e=this._node.parentNode)||void 0===e||e.removeChild(this._node),this.parent()}replace(e){var t;return null===(t=this._node.parentNode)||void 0===t||t.replaceChild(e._node,this._node),e}append(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&this._node.firstChild?this._node.insertBefore(e._node,this._node.firstChild):this._node.appendChild(e._node),this}classes(){const e=this._node.getAttribute("class");return e?e.trim().split(/\s+/):[]}addClass(e){return this._node.setAttribute("class",this.classes().concat(e.trim().split(/\s+/)).filter((function(e,t,n){return n.indexOf(e)===t})).join(" ")),this}removeClass(e){const t=e.trim().split(/\s+/);return this._node.setAttribute("class",this.classes().filter((e=>-1===t.indexOf(e))).join(" ")),this}removeAllClasses(){return this._node.setAttribute("class",""),this}height(){return this._node.getBoundingClientRect().height}width(){return this._node.getBoundingClientRect().width}animate(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;return Object.keys(e).forEach((i=>{const s=e[i];Array.isArray(s)?s.forEach((e=>M(this,i,e,!1,n))):M(this,i,s,t,n)})),this}constructor(t,n,i,s,a=!1){t instanceof Element?this._node=t:(this._node=document.createElementNS(e.svg,t),"svg"===t&&this.attr({"xmlns:ct":e.ct})),n&&this.attr(n),i&&this.addClass(i),s&&(a&&s._node.firstChild?s._node.insertBefore(this._node,s._node.firstChild):s._node.appendChild(this._node))}}function N(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"100%",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"100%",s=arguments.length>3?arguments[3]:void 0;Array.from(t.querySelectorAll("svg")).filter((t=>t.getAttributeNS(e.xmlns,"ct"))).forEach((e=>t.removeChild(e)));const a=new O("svg").attr({width:n,height:i}).attr({style:"width: ".concat(n,"; height: ").concat(i,";")});return s&&a.addClass(s),t.appendChild(a.getNode()),a}function L(e,t){var n,i,s,r;const o=Boolean(t.axisX||t.axisY),l=(null===(n=t.axisY)||void 0===n?void 0:n.offset)||0,c=(null===(i=t.axisX)||void 0===i?void 0:i.offset)||0,u=null===(s=t.axisY)||void 0===s?void 0:s.position,h=null===(r=t.axisX)||void 0===r?void 0:r.position;let d=e.width()||a(t.width).value||0,p=e.height()||a(t.height).value||0;const m="number"==typeof(f=t.chartPadding)?{top:f,right:f,bottom:f,left:f}:void 0===f?{top:0,right:0,bottom:0,left:0}:{top:"number"==typeof f.top?f.top:0,right:"number"==typeof f.right?f.right:0,bottom:"number"==typeof f.bottom?f.bottom:0,left:"number"==typeof f.left?f.left:0};var f;d=Math.max(d,l+m.left+m.right),p=Math.max(p,c+m.top+m.bottom);const g={x1:0,x2:0,y1:0,y2:0,padding:m,width(){return this.x2-this.x1},height(){return this.y1-this.y2}};return o?("start"===h?(g.y2=m.top+c,g.y1=Math.max(p-m.bottom,g.y2+1)):(g.y2=m.top,g.y1=Math.max(p-m.bottom-c,g.y2+1)),"start"===u?(g.x1=m.left+l,g.x2=Math.max(d-m.right,g.x1+1)):(g.x1=m.left,g.x2=Math.max(d-m.right-l,g.x1+1))):(g.x1=m.left,g.x2=Math.max(d-m.right,g.x1+1),g.y2=m.top,g.y1=Math.max(p-m.bottom,g.y2+1)),g}function C(e,t,n){let i;const s=[];function a(s){const a=i;i=h({},e),t&&t.forEach((e=>{window.matchMedia(e[0]).matches&&(i=h(i,e[1]))})),n&&s&&n.emit("optionsChanged",{previousOptions:a,currentOptions:i})}if(!window.matchMedia)throw new Error("window.matchMedia not found! Make sure you're using a polyfill.");return t&&t.forEach((e=>{const t=window.matchMedia(e[0]);t.addEventListener("change",a),s.push(t)})),a(),{removeMediaQueryListeners:function(){s.forEach((e=>e.removeEventListener("change",a)))},getCurrentOptions:()=>i}}O.Easing=A;const B={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},I={accuracy:3};function _(e,t,n,i,s,a){const r={command:s?e.toLowerCase():e.toUpperCase(),...t,...a?{data:a}:{}};n.splice(i,0,r)}function P(e,t){e.forEach(((n,i)=>{B[n.command.toLowerCase()].forEach(((s,a)=>{t(n,s,i,a,e)}))}))}class q{static join(e){const t=new q(arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2?arguments[2]:void 0);for(let n=0;n2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return _("M",{x:+e,y:+t},this.pathElements,this.pos++,n,i),this}line(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;return _("L",{x:+e,y:+t},this.pathElements,this.pos++,n,i),this}curve(e,t,n,i,s,a){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7?arguments[7]:void 0;return _("C",{x1:+e,y1:+t,x2:+n,y2:+i,x:+s,y:+a},this.pathElements,this.pos++,r,o),this}arc(e,t,n,i,s,a,r){let o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8?arguments[8]:void 0;return _("A",{rx:e,ry:t,xAr:n,lAf:i,sf:s,x:a,y:r},this.pathElements,this.pos++,o,l),this}parse(e){const t=e.replace(/([A-Za-z])(-?[0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(((e,t)=>(t.match(/[A-Za-z]/)&&e.push([]),e[e.length-1].push(t),e)),[]);"Z"===t[t.length-1][0].toUpperCase()&&t.pop();const n=t.map((e=>{const t=e.shift(),n=B[t.toLowerCase()];return{command:t,...n.reduce(((t,n,i)=>(t[n]=+e[i],t)),{})}}));return this.pathElements.splice(this.pos,0,...n),this.pos+=n.length,this}stringify(){const e=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(((t,n)=>{const i=B[n.command.toLowerCase()].map((t=>{const i=n[t];return this.options.accuracy?Math.round(i*e)/e:i}));return t+n.command+i.join(",")}),"")+(this.close?"Z":"")}scale(e,t){return P(this.pathElements,((n,i)=>{n[i]*="x"===i[0]?e:t})),this}translate(e,t){return P(this.pathElements,((n,i)=>{n[i]+="x"===i[0]?e:t})),this}transform(e){return P(this.pathElements,((t,n,i,s,a)=>{const r=e(t,n,i,s,a);(r||0===r)&&(t[n]=r)})),this}clone(){const e=new q(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.close);return e.pos=this.pos,e.pathElements=this.pathElements.slice().map((e=>({...e}))),e.options={...this.options},e}splitByCommand(e){const t=[new q];return this.pathElements.forEach((n=>{n.command===e.toUpperCase()&&0!==t[t.length-1].pathElements.length&&t.push(new q),t[t.length-1].pathElements.push(n)})),t}constructor(e=!1,t){this.close=e,this.pathElements=[],this.pos=0,this.options={...I,...t}}}class R{on(e,t){const{allListeners:n,listeners:i}=this;"*"===e?n.add(t):(i.has(e)||i.set(e,new Set),i.get(e).add(t))}off(e,t){const{allListeners:n,listeners:i}=this;if("*"===e)t?n.delete(t):n.clear();else if(i.has(e)){const n=i.get(e);t?n.delete(t):n.clear(),n.size||i.delete(e)}}emit(e,t){const{allListeners:n,listeners:i}=this;i.has(e)&&i.get(e).forEach((e=>e(t))),n.forEach((n=>n(e,t)))}constructor(){this.listeners=new Map,this.allListeners=new Set}}const T=new WeakMap;class V{update(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i;return e&&(this.data=e||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),t&&(this.options=h({},n?this.options:this.defaultOptions,t),this.initializeTimeoutId||(null===(i=this.optionsProvider)||void 0===i||i.removeMediaQueryListeners(),this.optionsProvider=C(this.options,this.responsiveOptions,this.eventEmitter))),!this.initializeTimeoutId&&this.optionsProvider&&this.createChart(this.optionsProvider.getCurrentOptions()),this}detach(){var e;return this.initializeTimeoutId?window.clearTimeout(this.initializeTimeoutId):(window.removeEventListener("resize",this.resizeListener),null===(e=this.optionsProvider)||void 0===e||e.removeMediaQueryListeners()),T.delete(this.container),this}on(e,t){return this.eventEmitter.on(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}initialize(){window.addEventListener("resize",this.resizeListener),this.optionsProvider=C(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.on("optionsChanged",(()=>this.update())),this.options.plugins&&this.options.plugins.forEach((e=>{Array.isArray(e)?e[0](this,e[1]):e(this)})),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=null}constructor(e,t,n,i,s){this.data=t,this.defaultOptions=n,this.options=i,this.responsiveOptions=s,this.eventEmitter=new R,this.resizeListener=()=>this.update(),this.initializeTimeoutId=setTimeout((()=>this.initialize()),0);const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Target element is not found");this.container=a;const r=T.get(a);r&&r.detach(),T.set(a,this)}}const U={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};class D{createGridAndLabels(e,t,n,i){const s="x"===this.units.pos?n.axisX:n.axisY,a=this.ticks.map(((e,t)=>this.projectValue(e,t))),r=this.ticks.map(s.labelInterpolationFnc);a.forEach(((o,l)=>{const c=r[l],u={x:0,y:0};let h;h=a[l+1]?a[l+1]-o:Math.max(this.axisLength-o,this.axisLength/this.ticks.length),""!==c&&y(c)||("x"===this.units.pos?(o=this.chartRect.x1+o,u.x=n.axisX.labelOffset.x,"start"===n.axisX.position?u.y=this.chartRect.padding.top+n.axisX.labelOffset.y+5:u.y=this.chartRect.y1+n.axisX.labelOffset.y+5):(o=this.chartRect.y1-o,u.y=n.axisY.labelOffset.y-h,"start"===n.axisY.position?u.x=this.chartRect.padding.left+n.axisY.labelOffset.x:u.x=this.chartRect.x2+n.axisY.labelOffset.x+10),s.showGrid&&function(e,t,n,i,s,a,r,o){const l={["".concat(n.units.pos,"1")]:e,["".concat(n.units.pos,"2")]:e,["".concat(n.counterUnits.pos,"1")]:i,["".concat(n.counterUnits.pos,"2")]:i+s},c=a.elem("line",l,r.join(" "));o.emit("draw",{type:"grid",axis:n,index:t,group:a,element:c,...l})}(o,l,this,this.gridOffset,this.chartRect[this.counterUnits.len](),e,[n.classNames.grid,n.classNames[this.units.dir]],i),s.showLabel&&function(e,t,n,i,s,a,r,o,l,c){const u={[s.units.pos]:e+r[s.units.pos],[s.counterUnits.pos]:r[s.counterUnits.pos],[s.units.len]:t,[s.counterUnits.len]:Math.max(0,a-10)},h=Math.round(u[s.units.len]),d=Math.round(u[s.counterUnits.len]),p=document.createElement("span");p.className=l.join(" "),p.style[s.units.len]=h+"px",p.style[s.counterUnits.len]=d+"px",p.textContent=String(i);const m=o.foreignObject(p,{style:"overflow: visible;",...u});c.emit("draw",{type:"label",axis:s,index:n,group:o,element:m,text:i,...u})}(o,h,l,c,this,s.offset,u,t,[n.classNames.label,n.classNames[this.units.dir],"start"===s.position?n.classNames[s.position]:n.classNames.end],i))}))}constructor(e,t,n){this.units=e,this.chartRect=t,this.ticks=n,this.counterUnits=e===U.x?U.y:U.x,this.axisLength=t[this.units.rectEnd]-t[this.units.rectStart],this.gridOffset=t[this.units.rectOffset]}}class X extends D{projectValue(e){const t=Number(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";return function(e){return"object"==typeof e&&null!==e&&(Reflect.has(e,"x")||Reflect.has(e,"y"))}(e)&&f(e,t)?v(e[t]):v(e)}(e,this.units.pos));return this.axisLength*(t-this.bounds.min)/this.bounds.range}constructor(e,t,n,i){const s=i.highLow||x(t,i,e.pos),a=function(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s={high:t.high,low:t.low,valueRange:0,oom:0,step:0,min:0,max:0,range:0,numberOfSteps:0,values:[]};var a;s.valueRange=s.high-s.low,s.oom=(a=s.valueRange,Math.floor(Math.log(Math.abs(a))/Math.LN10)),s.step=Math.pow(10,s.oom),s.min=Math.floor(s.low/s.step)*s.step,s.max=Math.ceil(s.high/s.step)*s.step,s.range=s.max-s.min,s.numberOfSteps=Math.round(s.range/s.step);const r=l(e,s.step,s)=n)s.step=1;else if(i&&u=n)s.step=u;else{let t=0;for(;;){if(r&&l(e,s.step,s)<=n)s.step*=2;else{if(r||!(l(e,s.step/2,s)>=n))break;if(s.step/=2,i&&s.step%1!=0){s.step*=2;break}}if(t++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}}function h(e,t){return e===(e+=t)&&(e*=1+(t>0?o:-o)),e}s.step=Math.max(s.step,o);let d=s.min,p=s.max;for(;d+s.step<=s.low;)d=h(d,s.step);for(;p-s.step>=s.high;)p=h(p,-s.step);s.min=d,s.max=p,s.range=s.max-s.min;const m=[];for(let e=s.min;e<=s.max;e=h(e,s.step)){const t=c(e);t!==m[m.length-1]&&m.push(t)}return s.values=m,s}(n[e.rectEnd]-n[e.rectStart],s,i.scaleMinSpace||20,i.onlyInteger),r={min:a.min,max:a.max};super(e,n,a.values),this.bounds=a,this.range=r}}class Y extends D{projectValue(e,t){return this.stepLength*t}constructor(e,t,n,i){const s=i.ticks||[];super(e,n,s);const a=Math.max(1,s.length-(i.stretch?1:0));this.stepLength=this.axisLength/a,this.stretch=Boolean(i.stretch)}}const G={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:d,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:d,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};class K extends V{createChart(e){const{data:t}=this,n=b(t,e.reverseData,e.horizontalBars?"x":"y",!0),i=N(this.container,e.width,e.height,e.classNames.chart+(e.horizontalBars?" "+e.classNames.horizontalBars:"")),s=e.stackBars&&!0!==e.stackMode&&n.series.length?x([(a=n.series,o=a,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n({x:e.x+(f(t,"x")?t.x:0),y:e.y+(f(t,"y")?t.y:0)})),{x:0,y:0})},p(Math.max(...o.map((e=>e.length))),(e=>l(...o.map((t=>t[e]))))))],e,e.horizontalBars?"x":"y"):x(n.series,e,e.horizontalBars?"x":"y");var a,o,l;this.svg=i;const c=i.elem("g").addClass(e.classNames.gridGroup),u=i.elem("g"),h=i.elem("g").addClass(e.classNames.labelGroup);"number"==typeof e.high&&(s.high=e.high),"number"==typeof e.low&&(s.low=e.low);const d=L(i,e);let m;const y=e.distributeSeries&&e.stackBars?n.labels.slice(0,1):n.labels;let v,w,k;e.horizontalBars?(m=w=void 0===e.axisX.type?new X(U.x,n.series,d,{...e.axisX,highLow:s,referenceValue:0}):new e.axisX.type(U.x,n.series,d,{...e.axisX,highLow:s,referenceValue:0}),v=k=void 0===e.axisY.type?new Y(U.y,n.series,d,{ticks:y}):new e.axisY.type(U.y,n.series,d,e.axisY)):(v=w=void 0===e.axisX.type?new Y(U.x,n.series,d,{ticks:y}):new e.axisX.type(U.x,n.series,d,e.axisX),m=k=void 0===e.axisY.type?new X(U.y,n.series,d,{...e.axisY,highLow:s,referenceValue:0}):new e.axisY.type(U.y,n.series,d,{...e.axisY,highLow:s,referenceValue:0}));const z=e.horizontalBars?d.x1+m.projectValue(0):d.y1-m.projectValue(0),E="accumulate"===e.stackMode,j="accumulate-relative"===e.stackMode,A=[],M=[];let O=A;v.createGridAndLabels(c,h,e,this.eventEmitter),m.createGridAndLabels(c,h,e,this.eventEmitter),e.showGridBackground&&function(e,t,n,i){const s=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},n,!0);i.emit("draw",{type:"gridBackground",group:e,element:s})}(c,d,e.classNames.gridBackground,this.eventEmitter),function(e,t){let n=0;e[arguments.length>2&&void 0!==arguments[2]&&arguments[2]?"reduceRight":"reduce"](((e,i,s)=>t(i,n++,s)),void 0)}(t.series,((i,s)=>{const a=s-(t.series.length-1)/2;let o;o=e.distributeSeries&&!e.stackBars?v.axisLength/n.series.length/2:e.distributeSeries&&e.stackBars?v.axisLength/2:v.axisLength/n.series[s].length/2;const l=u.elem("g"),c=f(i,"name")&&i.name,h=f(i,"className")&&i.className,p=f(i,"meta")?i.meta:void 0;c&&l.attr({"ct:series-name":c}),p&&l.attr({"ct:meta":S(p)}),l.addClass([e.classNames.series,h||"".concat(e.classNames.series,"-").concat(r(s))].join(" ")),n.series[s].forEach(((t,r)=>{const c=f(t,"x")&&t.x,u=f(t,"y")&&t.y;let h,p;h=e.distributeSeries&&!e.stackBars?s:e.distributeSeries&&e.stackBars?0:r,p=e.horizontalBars?{x:d.x1+m.projectValue(c||0,r,n.series[s]),y:d.y1-v.projectValue(u||0,h,n.series[s])}:{x:d.x1+v.projectValue(c||0,h,n.series[s]),y:d.y1-m.projectValue(u||0,r,n.series[s])},v instanceof Y&&(v.stretch||(p[v.units.pos]+=o*(e.horizontalBars?-1:1)),p[v.units.pos]+=e.stackBars||e.distributeSeries?0:a*e.seriesBarDistance*(e.horizontalBars?-1:1)),j&&(O=u>=0||c>=0?A:M);const y=O[r]||z;if(O[r]=y-(z-p[v.counterUnits.pos]),void 0===t)return;const x={["".concat(v.units.pos,"1")]:p[v.units.pos],["".concat(v.units.pos,"2")]:p[v.units.pos]};e.stackBars&&(E||j||!e.stackMode)?(x["".concat(v.counterUnits.pos,"1")]=y,x["".concat(v.counterUnits.pos,"2")]=O[r]):(x["".concat(v.counterUnits.pos,"1")]=z,x["".concat(v.counterUnits.pos,"2")]=p[v.counterUnits.pos]),x.x1=Math.min(Math.max(x.x1,d.x1),d.x2),x.x2=Math.min(Math.max(x.x2,d.x1),d.x2),x.y1=Math.min(Math.max(x.y1,d.y2),d.y1),x.y2=Math.min(Math.max(x.y2,d.y2),d.y1);const b=function(e,t){const n=Array.isArray(e)?e[t]:f(e,"data")?e.data[t]:null;return f(n,"meta")?n.meta:void 0}(i,r),N=l.elem("line",x,e.classNames.bar).attr({"ct:value":[c,u].filter(g).join(","),"ct:meta":S(b)});this.eventEmitter.emit("draw",{type:"bar",value:t,index:r,meta:b,series:i,seriesIndex:s,axisX:w,axisY:k,chartRect:d,group:l,element:N,...x})}))}),e.reverseData),this.eventEmitter.emit("created",{chartRect:d,axisX:w,axisY:k,svg:i,options:e})}constructor(e,t,n,i){super(e,t,G,h({},G,n),i),this.data=t}}const H={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:d,labelDirection:"neutral",ignoreEmptyValues:!1};function Q(e,t,n){const i=t.x>e.x;return i&&"explode"===n||!i&&"implode"===n?"start":i&&"implode"===n||!i&&"explode"===n?"end":"middle"}class F extends V{createChart(e){const{data:t}=this,n=b(t),i=[];let s,o,l=e.startAngle;const c=N(this.container,e.width,e.height,e.donut?e.classNames.chartDonut:e.classNames.chartPie);this.svg=c;const h=L(c,e);let d=Math.min(h.width()/2,h.height()/2);const p=e.total||n.series.reduce(m,0),g=a(e.donutWidth);"%"===g.unit&&(g.value*=d/100),d-=e.donut?g.value/2:0,o="outside"===e.labelPosition||e.donut?d:"center"===e.labelPosition?0:d/2,e.labelOffset&&(o+=e.labelOffset);const v={x:h.x1+h.width()/2,y:h.y2+h.height()/2},w=1===t.series.filter((e=>f(e,"value")?0!==e.value:0!==e)).length;t.series.forEach(((e,t)=>i[t]=c.elem("g"))),e.showLabel&&(s=c.elem("g")),t.series.forEach(((a,c)=>{var m,x;if(0===n.series[c]&&e.ignoreEmptyValues)return;const b=f(a,"name")&&a.name,k=f(a,"className")&&a.className,z=f(a,"meta")?a.meta:void 0;b&&i[c].attr({"ct:series-name":b}),i[c].addClass([null===(m=e.classNames)||void 0===m?void 0:m.series,k||"".concat(null===(x=e.classNames)||void 0===x?void 0:x.series,"-").concat(r(c))].join(" "));let E=p>0?l+n.series[c]/p*360:0;const j=Math.max(0,l-(0===c||w?0:.2));E-j>=359.99&&(E=j+359.99);const A=u(v.x,v.y,d,j),M=u(v.x,v.y,d,E),O=new q(!e.donut).move(M.x,M.y).arc(d,d,0,Number(E-l>180),0,A.x,A.y);e.donut||O.line(v.x,v.y);const N=i[c].elem("path",{d:O.stringify()},e.donut?e.classNames.sliceDonut:e.classNames.slicePie);if(N.attr({"ct:value":n.series[c],"ct:meta":S(z)}),e.donut&&N.attr({style:"stroke-width: "+g.value+"px"}),this.eventEmitter.emit("draw",{type:"slice",value:n.series[c],totalDataSum:p,index:c,meta:z,series:a,group:i[c],element:N,path:O.clone(),center:v,radius:d,startAngle:l,endAngle:E,chartRect:h}),e.showLabel){let i,r;i=1===t.series.length?{x:v.x,y:v.y}:u(v.x,v.y,o,l+(E-l)/2),r=n.labels&&!y(n.labels[c])?n.labels[c]:n.series[c];const d=e.labelInterpolationFnc(r,c);if(d||0===d){const t=s.elem("text",{dx:i.x,dy:i.y,"text-anchor":Q(v,i,e.labelDirection)},e.classNames.label).text(String(d));this.eventEmitter.emit("draw",{type:"label",index:c,group:s,element:t,text:""+d,chartRect:h,series:a,meta:z,...i})}}l=E})),this.eventEmitter.emit("created",{chartRect:h,svg:c,options:e})}constructor(e,t,n,i){super(e,t,H,h({},H,n),i),this.data=t}}var W={pis:43.59,ko:27.4,lewica:12.56,psl:8.55,konfederacja:6.81},J=[{id:"pis",name:"Prawo i Sprawiedliwość",shortName:"PiS",threshold:5,pastSupportEquivalence:[["pis",1]]},{id:"ko",name:"Koalicja Obywatelska",shortName:"KO",threshold:8,pastSupportEquivalence:[["ko",1]]},{id:"lewica",name:"Nowa Lewica",shortName:"NL",threshold:5,pastSupportEquivalence:[["lewica",1]]},{id:"td",name:"Trzecia Droga",shortName:"TD",threshold:8,pastSupportEquivalence:[["psl",.48],["lewica",.23],["konfederacja",.17],["ko",.15],["pis",.03]]},{id:"konfederacja",name:"Konfederacja",shortName:"Konf.",threshold:5,pastSupportEquivalence:[["konfederacja",1]]},{id:"mn",name:"Mniejszość Niemiecka",shortName:"MN",threshold:0,pastSupportEquivalence:[]}],Z=["lewica","ko","mn","td","pis","konfederacja"],$=[{name:"Legnica",size:12,pastSupport:{ko:25.02,konfederacja:5.85,psl:7.17,pis:42.4,lewica:16.43}},{name:"Wałbrzych",size:8,pastSupport:{ko:32.09,konfederacja:5.42,psl:7.25,pis:40.54,lewica:12.35}},{name:"Wrocław",size:14,pastSupport:{ko:32.8,konfederacja:7.45,psl:6.46,pis:34.67,lewica:15.41}},{name:"Bydgoszcz",size:12,pastSupport:{ko:31.05,konfederacja:7.05,psl:9.02,pis:36.43,lewica:15.17}},{name:"Toruń",size:13,pastSupport:{ko:26.42,konfederacja:6.33,psl:10.88,pis:40.38,lewica:14.83}},{name:"Lublin",size:15,pastSupport:{ko:19.3,konfederacja:7.07,psl:9.1,pis:55.39,lewica:7.81}},{name:"Chełm",size:12,pastSupport:{ko:14.8,konfederacja:5.84,psl:11.86,pis:59.5,lewica:6.83}},{name:"Zielona Góra",size:12,pastSupport:{ko:31.27,konfederacja:7.19,psl:11.63,pis:34.3,lewica:15.61}},{name:"Łódź",size:10,pastSupport:{ko:35.82,konfederacja:6.65,psl:4.53,pis:32.9,lewica:20.1}},{name:"Piotrków Trybunalski",size:9,pastSupport:{ko:15.64,konfederacja:6.76,psl:10.44,pis:56.21,lewica:10.95}},{name:"Sieradz",size:12,pastSupport:{ko:20.48,konfederacja:5.88,psl:10.29,pis:49.81,lewica:11.98}},{name:"Chrzanów",size:8,pastSupport:{ko:23.04,konfederacja:7.06,psl:7.9,pis:53.48,lewica:8.51}},{name:"Kraków",size:14,pastSupport:{ko:30.48,konfederacja:7.99,psl:7.27,pis:39.56,lewica:13.01}},{name:"Nowy Sącz",size:10,pastSupport:{ko:13.83,konfederacja:6.95,psl:7.35,pis:65.8,lewica:6.07}},{name:"Tarnów",size:9,pastSupport:{ko:14,konfederacja:7.11,psl:13.35,pis:59.59,lewica:5.94}},{name:"Płock",size:10,pastSupport:{ko:16.85,konfederacja:5.24,psl:15.17,pis:52.45,lewica:8.76}},{name:"Radom",size:9,pastSupport:{ko:17.15,konfederacja:5.89,psl:10.2,pis:57.82,lewica:7.43}},{name:"Siedlce",size:12,pastSupport:{ko:13.94,konfederacja:6.49,psl:11.94,pis:59.76,lewica:6.45}},{name:"Warszawa I",size:20,pastSupport:{ko:42.05,konfederacja:7.51,psl:4.75,pis:27.49,lewica:18.19}},{name:"Warszawa II",size:12,pastSupport:{ko:28.61,konfederacja:6.63,psl:8.6,pis:40.89,lewica:13.09}},{name:"Opole",size:12,pastSupport:{ko:26.71,konfederacja:5.7,psl:10.31,pis:37.64,lewica:11.74}},{name:"Krosno",size:11,pastSupport:{ko:15.94,konfederacja:6.81,psl:7.85,pis:63.36,lewica:6.04}},{name:"Rzeszów",size:15,pastSupport:{ko:14.39,konfederacja:8.25,psl:7.79,pis:62.38,lewica:6.59}},{name:"Białystok",size:14,pastSupport:{ko:21.04,konfederacja:6.96,psl:9.33,pis:52.04,lewica:9.09}},{name:"Gdańsk",size:12,pastSupport:{ko:41.31,konfederacja:7.21,psl:5.9,pis:32.1,lewica:13.47}},{name:"Gdynia",size:14,pastSupport:{ko:35.85,konfederacja:7.3,psl:7.94,pis:36.43,lewica:12.47}},{name:"Bielsko-Biała",size:9,pastSupport:{ko:27.2,konfederacja:7.42,psl:7.13,pis:46.76,lewica:11.48}},{name:"Częstochowa",size:7,pastSupport:{ko:22.63,konfederacja:6.07,psl:8.68,pis:44.28,lewica:15.59}},{name:"Gliwice",size:9,pastSupport:{ko:32.61,konfederacja:7.67,psl:5.99,pis:37.75,lewica:13.38}},{name:"Rybnik",size:9,pastSupport:{ko:27.71,konfederacja:7.17,psl:5.64,pis:48.28,lewica:9.68}},{name:"Katowice",size:12,pastSupport:{ko:37.2,konfederacja:7.33,psl:4.37,pis:39.19,lewica:11.92}},{name:"Sosnowiec",size:9,pastSupport:{ko:29.66,konfederacja:6.45,psl:4.85,pis:37.13,lewica:21.9}},{name:"Kielce",size:16,pastSupport:{ko:16.65,konfederacja:5.95,psl:9.88,pis:55.18,lewica:9.95}},{name:"Elbląg",size:8,pastSupport:{ko:28.43,konfederacja:5.66,psl:10.89,pis:40.86,lewica:11.64}},{name:"Olsztyn",size:10,pastSupport:{ko:26.46,konfederacja:6.97,psl:13.19,pis:38.82,lewica:13.84}},{name:"Kalisz",size:12,pastSupport:{ko:24.72,konfederacja:6.57,psl:12.8,pis:42.48,lewica:13.43}},{name:"Konin",size:9,pastSupport:{ko:20.48,konfederacja:6.74,psl:9.81,pis:47.29,lewica:15.04}},{name:"Piła",size:9,pastSupport:{ko:30.6,konfederacja:6.62,psl:13.86,pis:35.64,lewica:13.28}},{name:"Poznań",size:10,pastSupport:{ko:45.38,konfederacja:6.61,psl:6.2,pis:25.33,lewica:16.49}},{name:"Koszalin",size:8,pastSupport:{ko:32.31,konfederacja:5.98,psl:9.43,pis:36.83,lewica:15.44}},{name:"Szczecin",size:12,pastSupport:{ko:35.71,konfederacja:6.53,psl:7.4,pis:35.11,lewica:15.25}}];var ee=n(50),te=n.n(ee),ne=n(253),ie=n.n(ne),se=window.location,ae=null,re=null,oe=function(){document.querySelectorAll("tr td:last-child").forEach((function(e){e.innerHTML=""})),ae&&ae.detach(),re&&re.detach();var e=document.getElementById("url");e&&(e.innerHTML=""),document.getElementById("support-bar-chart").innerHTML="",document.getElementById("division-pie-chart").innerHTML="";var t=document.getElementById("constituency-results");if(t&&(t.innerHTML=""),se.search){var n=se.href.split("?")[0];window.history.pushState("","",n)}},le=function(){var e=document.querySelector("#support-form"),t=document.querySelectorAll("#support-form input"),n=Array.from(t).map((function(e){return parseFloat(e.value)})).map((function(e){return Number.isNaN(e)?0:e}));if(function(e,t,n){t.forEach((function(e){return e.setCustomValidity("")})),n.some((function(e,n){return e<0&&(t[n].setCustomValidity("Poparcie nie może byc mniejsze od 0%"),!0)}));var i=n.reduce((function(e,t){return e+t}),0);return i>100?t[0].setCustomValidity("Suma poparcia nie może przekraczać 100%"):i<=0&&t[0].setCustomValidity("Suma poparcia musi być wyższa niż 0%"),e.reportValidity()}(e,t,n)){var i,s=function(e){var t=J.map((function(e){return e.pastSupportEquivalence.map((function(e){return W[e[0]]*e[1]})).reduce((function(e,t){return e+t}),0)})),n=new Array(e.length+1).fill(0);return $.forEach((function(i){var s=function(e,t,n){var i=n.pastSupport,s=J.map((function(e){return e.pastSupportEquivalence.map((function(e){return i[e[0]]*e[1]})).reduce((function(e,t){return e+t}),0)})),a=t.map((function(e,t){return s[t]/e})),r=e.map((function(e,t){return e*a[t]}));return"Opole"===n.name&&r.push(7.9),r}(e,t,i);i.support=s,i.mandates=new Array(s.length).fill(0);for(var a=s.map((function(t,n){return e[n]0&&(n[e.committeeIndex]+=1,i.mandates[e.committeeIndex]+=1)}))})),n}(n);!function(e){e.forEach((function(e,t){var n=J[t].id,i=document.querySelector("tr.".concat(n," td:last-child"));i&&(i.textContent=e.toString())}))}(s),function(e){if(document.getElementById("url")){var t=new URLSearchParams;e.forEach((function(e,n){e>0&&t.append(J[n].id,e.toString())}));var n=se.href.split("?")[0],i="".concat(n,"?").concat(t);document.getElementById("url").innerHTML="Link do wyników: ".concat(i.link(i))}}(n),ae=function(e){var t=J.map((function(t,n){return{label:t.shortName,support:{value:e[n],className:t.id}}})).filter((function(e){return e.support.value&&e.support.value>0})).sort((function(e,t){return t.support.value-e.support.value})),n={labels:t.map((function(e){return e.label})),series:t.map((function(e){return e.support}))};document.getElementById("support-bar-chart").classList.add("ct-perfect-fourth");var i=new K("#support-bar-chart",n,{distributeSeries:!0,axisY:{labelInterpolationFnc:function(e){return"".concat(e.toLocaleString("pl",{minimumFractionDigits:0,maximumFractionDigits:1}),"%")}}});return i.on("draw",(function(e){"bar"===e.type&&e.element.attr({style:"stroke-width: 30px"})})),i}(n),re=function(e){var t=J.map((function(t,n){return{id:t.id,label:t.shortName,mandates:{value:e[n],className:t.id}}})).filter((function(e){return e.mandates.value&&e.mandates.value>0}));t.sort((function(e,t){return Z.indexOf(e.id)>Z.indexOf(t.id)?1:-1}));var n={series:t.map((function(e){return e.mandates}))},i={donut:!0,donutWidth:60,startAngle:270,total:920,labelInterpolationFnc:function(e,n){return e<15?"":"".concat(t[n].label," ").concat(e)}};return document.getElementById("division-pie-chart").classList.add("ct-perfect-fourth"),new F("#division-pie-chart",n,i)}(s),(i=document.getElementById("constituency-results"))&&$.forEach((function(e,t){var n=e.mandates&&e.support?e.mandates.map((function(t,n){return{committee:J[n].name,support:e.support[n],mandates:t}})):[];n.sort((function(e,t){return t.support-e.support})),i.insertAdjacentHTML("beforeend",te()({number:t+1,name:e.name,size:e.size,data:n}))})),t.forEach((function(e){return e.addEventListener("input",(function(){oe()}))}))}},ce=function(){document.getElementById("support-form").insertAdjacentHTML("afterbegin",ie()({committees:J}))},ue=function(){se.search&&(new URLSearchParams(se.search).forEach((function(e,t){var n=document.querySelector("tr.".concat(t," td:nth-child(2) input"));n&&(n.value=e)})),le())},he=n(587),de=n.n(he),pe=function(){document.body.innerHTML=de()({embed:"#embed"===window.location.hash})},me=function(e){e.preventDefault(),le()};document.addEventListener("DOMContentLoaded",(function(){pe(),ce(),ue(),document.querySelector("#calculate-button").addEventListener("click",me)})),window.addEventListener("popstate",(function(){window.location.search?ue():(document.querySelectorAll("tr td:nth-child(2) input").forEach((function(e){e.value=""})),oe())})),window.addEventListener("hashchange",(function(){pe(),ce(),ue()}))})()})(); \ No newline at end of file diff --git a/main.css b/main.css index 2520743..30b3e28 100644 --- a/main.css +++ b/main.css @@ -1 +1 @@ -/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}html{-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0}hr{color:inherit;height:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:-webkit-box;display:-ms-flexbox;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.ct-label.ct-horizontal.ct-end,.ct-label.ct-horizontal.ct-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:left}.ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ct-label.ct-vertical.ct-start{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:right}.ct-label.ct-vertical.ct-end,.ct-label.ct-vertical.ct-start{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.ct-label.ct-vertical.ct-end{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:left}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;-webkit-box-pack:center;-ms-flex-pack:center;align-items:flex-end;justify-content:center;text-align:center}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:center;-ms-flex-pack:center;align-items:flex-start;justify-content:center;text-align:center}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;-webkit-box-pack:start;-ms-flex-pack:start;align-items:flex-end;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:start;-ms-flex-pack:start;align-items:flex-start;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:end;-ms-flex-pack:end;align-items:center;justify-content:flex-end;text-align:right}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:start;-ms-flex-pack:start;align-items:center;justify-content:flex-start;text-align:left}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-grid-background{fill:none}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{fill:none;stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#e6805e}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#e6805e}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{content:"";display:block;float:left;height:0;padding-bottom:100%;width:0}.ct-square:after{clear:both;content:"";display:table}.ct-square>svg{display:block;left:0;position:absolute;top:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{content:"";display:block;float:left;height:0;padding-bottom:93.75%;width:0}.ct-minor-second:after{clear:both;content:"";display:table}.ct-minor-second>svg{display:block;left:0;position:absolute;top:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{content:"";display:block;float:left;height:0;padding-bottom:88.8888888889%;width:0}.ct-major-second:after{clear:both;content:"";display:table}.ct-major-second>svg{display:block;left:0;position:absolute;top:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{content:"";display:block;float:left;height:0;padding-bottom:83.3333333333%;width:0}.ct-minor-third:after{clear:both;content:"";display:table}.ct-minor-third>svg{display:block;left:0;position:absolute;top:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{content:"";display:block;float:left;height:0;padding-bottom:80%;width:0}.ct-major-third:after{clear:both;content:"";display:table}.ct-major-third>svg{display:block;left:0;position:absolute;top:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{content:"";display:block;float:left;height:0;padding-bottom:75%;width:0}.ct-perfect-fourth:after{clear:both;content:"";display:table}.ct-perfect-fourth>svg{display:block;left:0;position:absolute;top:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{content:"";display:block;float:left;height:0;padding-bottom:66.6666666667%;width:0}.ct-perfect-fifth:after{clear:both;content:"";display:table}.ct-perfect-fifth>svg{display:block;left:0;position:absolute;top:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{content:"";display:block;float:left;height:0;padding-bottom:62.5%;width:0}.ct-minor-sixth:after{clear:both;content:"";display:table}.ct-minor-sixth>svg{display:block;left:0;position:absolute;top:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{content:"";display:block;float:left;height:0;padding-bottom:61.804697157%;width:0}.ct-golden-section:after{clear:both;content:"";display:table}.ct-golden-section>svg{display:block;left:0;position:absolute;top:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{content:"";display:block;float:left;height:0;padding-bottom:60%;width:0}.ct-major-sixth:after{clear:both;content:"";display:table}.ct-major-sixth>svg{display:block;left:0;position:absolute;top:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{content:"";display:block;float:left;height:0;padding-bottom:56.25%;width:0}.ct-minor-seventh:after{clear:both;content:"";display:table}.ct-minor-seventh>svg{display:block;left:0;position:absolute;top:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{content:"";display:block;float:left;height:0;padding-bottom:53.3333333333%;width:0}.ct-major-seventh:after{clear:both;content:"";display:table}.ct-major-seventh>svg{display:block;left:0;position:absolute;top:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{content:"";display:block;float:left;height:0;padding-bottom:50%;width:0}.ct-octave:after{clear:both;content:"";display:table}.ct-octave>svg{display:block;left:0;position:absolute;top:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{content:"";display:block;float:left;height:0;padding-bottom:40%;width:0}.ct-major-tenth:after{clear:both;content:"";display:table}.ct-major-tenth>svg{display:block;left:0;position:absolute;top:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{content:"";display:block;float:left;height:0;padding-bottom:37.5%;width:0}.ct-major-eleventh:after{clear:both;content:"";display:table}.ct-major-eleventh>svg{display:block;left:0;position:absolute;top:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{content:"";display:block;float:left;height:0;padding-bottom:33.3333333333%;width:0}.ct-major-twelfth:after{clear:both;content:"";display:table}.ct-major-twelfth>svg{display:block;left:0;position:absolute;top:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{content:"";display:block;float:left;height:0;padding-bottom:25%;width:0}.ct-double-octave:after{clear:both;content:"";display:table}.ct-double-octave>svg{display:block;left:0;position:absolute;top:0}body{background-color:#fafad2;color:#333;font-size:15px}.container{background-color:#fff;border:1px solid #d3d3d3;margin:1rem auto;max-width:58rem;padding:.25rem 1.5rem 1rem;width:100%}.embed{margin:0 auto;padding:.25rem auto 1rem}.updates{list-style-type:none;margin-top:-10px}h1{font-size:1.75rem}li,p{line-height:1.4;text-align:justify}.updates li{margin:2px 0}.charts-row{display:-webkit-box;display:-ms-flexbox;display:flex;height:auto;margin-bottom:1rem}.ct-chart:empty{height:0}#division-pie-chart svg{-webkit-transform:translate(-6%,34%) scale(1.1);transform:translate(-6%,34%) scale(1.1);-webkit-transform-origin:(0,100%);transform-origin:(0,100%)}#division-pie-chart .ct-label{fill:#fff}@media (max-width:500px){.charts-row{-ms-flex-wrap:wrap;flex-wrap:wrap}}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}h2{font-size:1rem;line-height:1.3}#url{margin:8px 0 32px}#constituency-results{-ms-flex-pack:distribute;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-around}#constituency-results:after{-webkit-box-flex:1;border:1px solid #fff;content:"";-ms-flex:auto;flex:auto}#constituency-results:after,.constituency{margin:.5rem 0;max-width:26rem;padding:.5rem 1rem}.constituency{border:1px solid grey;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.constituency-data{width:11rem}.constituency table{margin-left:1rem}.constituency p,.constituency td{font-size:14px}.constituency td:last-child{padding-left:1rem;text-align:right;width:2rem}#support-form table{margin:1rem auto 0}#support-form button{display:block;font-weight:700;margin:1rem auto 2.5rem}#support-form input{margin:0 .25rem 0 .5rem;padding:.25rem;text-align:right;width:4rem}#support-form table td,#support-form table th{height:2rem}#support-form table td:nth-child(2){white-space:nowrap}#support-form table td:last-child{text-align:right}.pis{stroke:#263778}.ko{stroke:#fca43f}.lewica{stroke:#d44}.td{stroke:#8bd32e}.konfederacja{stroke:#655}.mn{stroke:#aaa}footer{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;margin:.5rem 1rem}address{font-style:normal}a.github{color:#333} +/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}html{-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji;line-height:1.15;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{margin:0}hr{color:inherit;height:0}abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}.ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:-webkit-box;display:-ms-flexbox;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.ct-label.ct-horizontal.ct-end,.ct-label.ct-horizontal.ct-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:left}.ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ct-label.ct-vertical.ct-start{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:right}.ct-label.ct-vertical.ct-end,.ct-label.ct-vertical.ct-start{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.ct-label.ct-vertical.ct-end{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:left}.ct-chart-bar .ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;-webkit-box-pack:center;-ms-flex-pack:center;align-items:flex-end;justify-content:center;text-align:center}.ct-chart-bar .ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:center;-ms-flex-pack:center;align-items:flex-start;justify-content:center;text-align:center}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{-webkit-box-align:end;-ms-flex-align:end;-webkit-box-pack:start;-ms-flex-pack:start;align-items:flex-end;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{-webkit-box-align:start;-ms-flex-align:start;-webkit-box-pack:start;-ms-flex-pack:start;align-items:flex-start;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:end;-ms-flex-pack:end;align-items:center;justify-content:flex-end;text-align:right}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:start;-ms-flex-pack:start;align-items:center;justify-content:flex-start;text-align:left}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-grid-background{fill:none}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{fill:none;stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#e6805e}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#e6805e}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{content:"";display:block;float:left;height:0;padding-bottom:100%;width:0}.ct-square:after{clear:both;content:"";display:table}.ct-square>svg{display:block;left:0;position:absolute;top:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{content:"";display:block;float:left;height:0;padding-bottom:93.75%;width:0}.ct-minor-second:after{clear:both;content:"";display:table}.ct-minor-second>svg{display:block;left:0;position:absolute;top:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{content:"";display:block;float:left;height:0;padding-bottom:88.8888888889%;width:0}.ct-major-second:after{clear:both;content:"";display:table}.ct-major-second>svg{display:block;left:0;position:absolute;top:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{content:"";display:block;float:left;height:0;padding-bottom:83.3333333333%;width:0}.ct-minor-third:after{clear:both;content:"";display:table}.ct-minor-third>svg{display:block;left:0;position:absolute;top:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{content:"";display:block;float:left;height:0;padding-bottom:80%;width:0}.ct-major-third:after{clear:both;content:"";display:table}.ct-major-third>svg{display:block;left:0;position:absolute;top:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{content:"";display:block;float:left;height:0;padding-bottom:75%;width:0}.ct-perfect-fourth:after{clear:both;content:"";display:table}.ct-perfect-fourth>svg{display:block;left:0;position:absolute;top:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{content:"";display:block;float:left;height:0;padding-bottom:66.6666666667%;width:0}.ct-perfect-fifth:after{clear:both;content:"";display:table}.ct-perfect-fifth>svg{display:block;left:0;position:absolute;top:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{content:"";display:block;float:left;height:0;padding-bottom:62.5%;width:0}.ct-minor-sixth:after{clear:both;content:"";display:table}.ct-minor-sixth>svg{display:block;left:0;position:absolute;top:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{content:"";display:block;float:left;height:0;padding-bottom:61.804697157%;width:0}.ct-golden-section:after{clear:both;content:"";display:table}.ct-golden-section>svg{display:block;left:0;position:absolute;top:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{content:"";display:block;float:left;height:0;padding-bottom:60%;width:0}.ct-major-sixth:after{clear:both;content:"";display:table}.ct-major-sixth>svg{display:block;left:0;position:absolute;top:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{content:"";display:block;float:left;height:0;padding-bottom:56.25%;width:0}.ct-minor-seventh:after{clear:both;content:"";display:table}.ct-minor-seventh>svg{display:block;left:0;position:absolute;top:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{content:"";display:block;float:left;height:0;padding-bottom:53.3333333333%;width:0}.ct-major-seventh:after{clear:both;content:"";display:table}.ct-major-seventh>svg{display:block;left:0;position:absolute;top:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{content:"";display:block;float:left;height:0;padding-bottom:50%;width:0}.ct-octave:after{clear:both;content:"";display:table}.ct-octave>svg{display:block;left:0;position:absolute;top:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{content:"";display:block;float:left;height:0;padding-bottom:40%;width:0}.ct-major-tenth:after{clear:both;content:"";display:table}.ct-major-tenth>svg{display:block;left:0;position:absolute;top:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{content:"";display:block;float:left;height:0;padding-bottom:37.5%;width:0}.ct-major-eleventh:after{clear:both;content:"";display:table}.ct-major-eleventh>svg{display:block;left:0;position:absolute;top:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{content:"";display:block;float:left;height:0;padding-bottom:33.3333333333%;width:0}.ct-major-twelfth:after{clear:both;content:"";display:table}.ct-major-twelfth>svg{display:block;left:0;position:absolute;top:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{content:"";display:block;float:left;height:0;padding-bottom:25%;width:0}.ct-double-octave:after{clear:both;content:"";display:table}.ct-double-octave>svg{display:block;left:0;position:absolute;top:0}body{background-color:#eee;color:#333;font-size:15px}.container{background-color:#fff;border:1px solid #d3d3d3;margin:1rem auto;max-width:58rem;padding:.25rem 1.5rem 1rem;width:100%}.embed{margin:0 auto;padding:.25rem auto 1rem}.updates{list-style-type:none;margin-top:-10px}h1{font-size:1.75rem}li,p{line-height:1.4;text-align:justify}.updates li{margin:2px 0}.charts-row{display:-webkit-box;display:-ms-flexbox;display:flex;height:auto;margin-bottom:1rem}.ct-chart:empty{height:0}#division-pie-chart svg{-webkit-transform:translate(-6%,34%) scale(1.1);transform:translate(-6%,34%) scale(1.1);-webkit-transform-origin:(0,100%);transform-origin:(0,100%)}#division-pie-chart .ct-label{fill:#fff}@media (max-width:500px){.charts-row{-ms-flex-wrap:wrap;flex-wrap:wrap}}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}h2{font-size:1rem;line-height:1.3}#url{margin:8px 0 32px}#constituency-results{-ms-flex-pack:distribute;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-around}#constituency-results:after{-webkit-box-flex:1;border:1px solid #fff;content:"";-ms-flex:auto;flex:auto}#constituency-results:after,.constituency{margin:.5rem 0;max-width:26rem;padding:.5rem 1rem}.constituency{border:1px solid grey;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.constituency-data{width:11rem}.constituency table{margin-left:1rem}.constituency p,.constituency td{font-size:14px}.constituency td:last-child{padding-left:1rem;text-align:right;width:2rem}#support-form table{margin:1rem auto 0}#support-form button{display:block;font-weight:700;margin:1rem auto 2.5rem}#support-form input{margin:0 .25rem 0 .5rem;padding:.25rem;text-align:right;width:4rem}#support-form table td,#support-form table th{height:2rem}#support-form table td:nth-child(2){white-space:nowrap}#support-form table td:last-child{text-align:right}.pis{stroke:#263778}.ko{stroke:#fca43f}.lewica{stroke:#d44}.td{stroke:#8bd32e}.konfederacja{stroke:#655}.mn{stroke:#aaa}footer{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:space-between;margin:.5rem 1rem}address{font-style:normal}a.github{color:#333}