@sevn/elections-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +297 -0
- package/dist/index.cjs +603 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +351 -0
- package/dist/index.d.ts +351 -0
- package/dist/index.js +15609 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +38 -0
- package/dist/umd/candidate-by-state.js +98 -0
- package/dist/umd/candidate-carrousel-state-results-viewer.js +108 -0
- package/dist/umd/candidate-counting-progress.js +77 -0
- package/dist/umd/candidate-duel-state-result-viewer.js +91 -0
- package/dist/umd/candidate-map-by-state.js +104 -0
- package/dist/umd/candidate-multi-ring-chart-performance-by-municipality.js +105 -0
- package/dist/umd/candidate-performance-by-municipality.js +105 -0
- package/dist/umd/candidate-ranking.js +59 -0
- package/dist/umd/candidate-results-by-municipality.js +103 -0
- package/dist/umd/counting-progress.js +125 -0
- package/dist/umd/current-leader.js +43 -0
- package/dist/umd/election-round-analysis.js +100 -0
- package/dist/umd/election-status.js +135 -0
- package/dist/umd/final-results.js +141 -0
- package/dist/umd/live-summary.js +36 -0
- package/dist/umd/municipality-perfomance-map.js +82 -0
- package/dist/umd/party-performance.js +99 -0
- package/dist/umd/results-by-office.js +94 -0
- package/dist/umd/round-results-analysis.js +99 -0
- package/dist/umd/state-leaders.js +118 -0
- package/dist/umd/state-winners.js +129 -0
- package/dist/umd/top-dispute.js +43 -0
- package/dist/umd/vote-comparison-by-round.js +76 -0
- package/dist/umd/vote-counting-progress.js +23 -0
- package/dist/umd/voting-map.js +112 -0
- package/package.json +96 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const En=require("@sevn/reqcache"),br=!1;var ho=Array.isArray,Rn=Array.prototype.indexOf,Ea=Array.prototype.includes,rr=Array.from,Pn=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,jn=Object.getOwnPropertyDescriptors,Ln=Object.prototype,Dn=Array.prototype,xo=Object.getPrototypeOf,Kr=Object.isExtensible;const Bn=()=>{};function qn(a){for(var t=0;t<a.length;t++)a[t]()}function wo(){var a,t,r=new Promise((l,n)=>{a=l,t=n});return{promise:r,resolve:a,reject:t}}const ct=2,Ha=4,or=8,yo=1<<24,ea=16,Nt=32,za=64,hr=128,Pt=512,lt=1024,ut=2048,Ut=4096,kt=8192,Zt=16384,ha=32768,xa=65536,Xr=1<<17,Co=1<<18,Ba=1<<19,Fn=1<<20,Xt=1<<25,wa=65536,xr=1<<21,Lr=1<<22,ra=1<<23,Ia=Symbol("$state"),Tn=Symbol("legacy props"),On=Symbol(""),_a=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Gn(a){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function In(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Un(a,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Nn(a){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Vn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Hn(a){throw new Error("https://svelte.dev/e/effect_orphan")}function Wn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Jn(a){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Yn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Zn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Qn=1,$n=2,ko=4,el=8,tl=16,al=1,rl=4,ol=8,nl=16,So=1,ll=2,vt=Symbol(),zo="http://www.w3.org/1999/xhtml";function sl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ao(a){return a===this.v}function il(a,t){return a!=a?t==t:a!==t||a!==null&&typeof a=="object"||typeof a=="function"}function Mo(a){return!il(a,this.v)}let dl=!1,zt=null;function Ra(a){zt=a}function je(a,t=!1,r){zt={p:zt,i:!1,c:null,e:null,s:a,x:null,l:null}}function Le(a){var t=zt,r=t.e;if(r!==null){t.e=null;for(var l of r)Xo(l)}return t.i=!0,zt=t.p,{}}function Eo(){return!0}let fa=[];function Ro(){var a=fa;fa=[],qn(a)}function Qt(a){if(fa.length===0&&!Ua){var t=fa;queueMicrotask(()=>{t===fa&&Ro()})}fa.push(a)}function vl(){for(;fa.length>0;)Ro()}function Po(a){var t=Ge;if(t===null)return Oe.f|=ra,a;if((t.f&ha)===0&&(t.f&Ha)===0)throw a;Pa(a,t)}function Pa(a,t){for(;t!==null;){if((t.f&hr)!==0){if((t.f&ha)===0)throw a;try{t.b.error(a);return}catch(r){a=r}}t=t.parent}throw a}const cl=-7169;function rt(a,t){a.f=a.f&cl|t}function Dr(a){(a.f&Pt)!==0||a.deps===null?rt(a,lt):rt(a,Ut)}function jo(a){if(a!==null)for(const t of a)(t.f&ct)===0||(t.f&wa)===0||(t.f^=wa,jo(t.deps))}function Lo(a,t,r){(a.f&ut)!==0?t.add(a):(a.f&Ut)!==0&&r.add(a),jo(a.deps),rt(a,lt)}const Qa=new Set;let Ue=null,wr=null,Tt=null,_t=[],nr=null,yr=!1,Ua=!1;class oa{committed=!1;current=new Map;previous=new Map;#e=new Set;#r=new Set;#t=0;#o=0;#l=null;#s=new Set;#a=new Set;#n=new Map;is_fork=!1;#i=!1;#v(){return this.is_fork||this.#o>0}skip_effect(t){this.#n.has(t)||this.#n.set(t,{d:[],m:[]})}unskip_effect(t){var r=this.#n.get(t);if(r){this.#n.delete(t);for(var l of r.d)rt(l,ut),Ot(l);for(l of r.m)rt(l,Ut),Ot(l)}}process(t){_t=[],this.apply();var r=[],l=[];for(const n of t)this.#d(n,r,l);if(this.#v()){this.#c(l),this.#c(r);for(const[n,i]of this.#n)Fo(n,i)}else{for(const n of this.#e)n();this.#e.clear(),this.#t===0&&this.#p(),wr=this,Ue=null,Yr(l),Yr(r),wr=null,this.#l?.resolve()}Tt=null}#d(t,r,l){t.f^=lt;for(var n=t.first;n!==null;){var i=n.f,v=(i&(Nt|za))!==0,_=v&&(i<)!==0,c=_||(i&kt)!==0||this.#n.has(n);if(!c&&n.fn!==null){v?n.f^=lt:(i&Ha)!==0?r.push(n):Ja(n)&&((i&ea)!==0&&this.#a.add(n),La(n));var m=n.first;if(m!==null){n=m;continue}}for(;n!==null;){var g=n.next;if(g!==null){n=g;break}n=n.parent}}}#c(t){for(var r=0;r<t.length;r+=1)Lo(t[r],this.#s,this.#a)}capture(t,r){r!==vt&&!this.previous.has(t)&&this.previous.set(t,r),(t.f&ra)===0&&(this.current.set(t,t.v),Tt?.set(t,t.v))}activate(){Ue=this,this.apply()}deactivate(){Ue===this&&(Ue=null,Tt=null)}flush(){if(this.activate(),_t.length>0){if(Do(),Ue!==null&&Ue!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#r)t(this);this.#r.clear()}#p(){if(Qa.size>1){this.previous.clear();var t=Tt,r=!0;for(const n of Qa){if(n===this){r=!1;continue}const i=[];for(const[_,c]of this.current){if(n.current.has(_))if(r&&c!==n.current.get(_))n.current.set(_,c);else continue;i.push(_)}if(i.length===0)continue;const v=[...n.current.keys()].filter(_=>!this.current.has(_));if(v.length>0){var l=_t;_t=[];const _=new Set,c=new Map;for(const m of i)Bo(m,v,_,c);if(_t.length>0){Ue=n,n.apply();for(const m of _t)n.#d(m,[],[]);n.deactivate()}_t=l}}Ue=null,Tt=t}this.committed=!0,Qa.delete(this)}increment(t){this.#t+=1,t&&(this.#o+=1)}decrement(t){this.#t-=1,t&&(this.#o-=1),!this.#i&&(this.#i=!0,Qt(()=>{this.#i=!1,this.#v()?_t.length>0&&this.flush():this.revive()}))}revive(){for(const t of this.#s)this.#a.delete(t),rt(t,ut),Ot(t);for(const t of this.#a)rt(t,Ut),Ot(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#l??=wo()).promise}static ensure(){if(Ue===null){const t=Ue=new oa;Qa.add(Ue),Ua||Qt(()=>{Ue===t&&t.flush()})}return Ue}apply(){}}function ul(a){var t=Ua;Ua=!0;try{for(var r;;){if(vl(),_t.length===0&&(Ue?.flush(),_t.length===0))return nr=null,r;Do()}}finally{Ua=t}}function Do(){yr=!0;var a=null;try{for(var t=0;_t.length>0;){var r=oa.ensure();if(t++>1e3){var l,n;pl()}r.process(_t),na.clear()}}finally{_t=[],yr=!1,nr=null}}function pl(){try{Wn()}catch(a){Pa(a,nr)}}let Kt=null;function Yr(a){var t=a.length;if(t!==0){for(var r=0;r<t;){var l=a[r++];if((l.f&(Zt|kt))===0&&Ja(l)&&(Kt=new Set,La(l),l.deps===null&&l.first===null&&l.nodes===null&&l.teardown===null&&l.ac===null&&Qo(l),Kt?.size>0)){na.clear();for(const n of Kt){if((n.f&(Zt|kt))!==0)continue;const i=[n];let v=n.parent;for(;v!==null;)Kt.has(v)&&(Kt.delete(v),i.push(v)),v=v.parent;for(let _=i.length-1;_>=0;_--){const c=i[_];(c.f&(Zt|kt))===0&&La(c)}}Kt.clear()}}Kt=null}}function Bo(a,t,r,l){if(!r.has(a)&&(r.add(a),a.reactions!==null))for(const n of a.reactions){const i=n.f;(i&ct)!==0?Bo(n,t,r,l):(i&(Lr|ea))!==0&&(i&ut)===0&&qo(n,t,l)&&(rt(n,ut),Ot(n))}}function qo(a,t,r){const l=r.get(a);if(l!==void 0)return l;if(a.deps!==null)for(const n of a.deps){if(Ea.call(t,n))return!0;if((n.f&ct)!==0&&qo(n,t,r))return r.set(n,!0),!0}return r.set(a,!1),!1}function Ot(a){var t=nr=a,r=t.b;if(r?.is_pending&&(a.f&(Ha|or|yo))!==0&&(a.f&ha)===0){r.defer_effect(a);return}for(;t.parent!==null;){t=t.parent;var l=t.f;if(yr&&t===Ge&&(l&ea)!==0&&(l&Co)===0&&(l&ha)!==0)return;if((l&(za|Nt))!==0){if((l<)===0)return;t.f^=lt}}_t.push(t)}function Fo(a,t){if(!((a.f&Nt)!==0&&(a.f<)!==0)){(a.f&ut)!==0?t.d.push(a):(a.f&Ut)!==0&&t.m.push(a),rt(a,lt);for(var r=a.first;r!==null;)Fo(r,t),r=r.next}}function _l(a){let t=0,r=ya(0),l;return()=>{qr()&&(e(r),Tr(()=>(t===0&&(l=At(()=>a(()=>Na(r)))),t+=1,()=>{Qt(()=>{t-=1,t===0&&(l?.(),l=void 0,Na(r))})})))}}var fl=xa|Ba;function ml(a,t,r){new gl(a,t,r)}class gl{parent;is_pending=!1;#e;#r=null;#t;#o;#l;#s=null;#a=null;#n=null;#i=null;#v=0;#d=0;#c=!1;#p=new Set;#_=new Set;#u=null;#h=_l(()=>(this.#u=ya(this.#v),()=>{this.#u=null}));constructor(t,r,l){this.#e=t,this.#t=r,this.#o=n=>{var i=Ge;i.b=this,i.f|=hr,l(n)},this.parent=Ge.b,this.#l=ir(()=>{this.#g()},fl)}#x(){try{this.#s=Ft(()=>this.#o(this.#e))}catch(t){this.error(t)}}#w(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#a=Ft(()=>t(this.#e)),Qt(()=>{var r=this.#i=document.createDocumentFragment(),l=$t();r.append(l),this.#s=this.#m(()=>(oa.ensure(),Ft(()=>this.#o(l)))),this.#d===0&&(this.#e.before(r),this.#i=null,ga(this.#a,()=>{this.#a=null}),this.#f())}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#d=0,this.#v=0,this.#s=Ft(()=>{this.#o(this.#e)}),this.#d>0){var t=this.#i=document.createDocumentFragment();tn(this.#s,t);const r=this.#t.pending;this.#a=Ft(()=>r(this.#e))}else this.#f()}catch(r){this.error(r)}}#f(){this.is_pending=!1;for(const t of this.#p)rt(t,ut),Ot(t);for(const t of this.#_)rt(t,Ut),Ot(t);this.#p.clear(),this.#_.clear()}defer_effect(t){Lo(t,this.#p,this.#_)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var r=Ge,l=Oe,n=zt;Wt(this.#l),Lt(this.#l),Ra(this.#l.ctx);try{return t()}catch(i){return Po(i),null}finally{Wt(r),Lt(l),Ra(n)}}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}this.#d+=t,this.#d===0&&(this.#f(),this.#a&&ga(this.#a,()=>{this.#a=null}),this.#i&&(this.#e.before(this.#i),this.#i=null))}update_pending_count(t){this.#b(t),this.#v+=t,!(!this.#u||this.#c)&&(this.#c=!0,Qt(()=>{this.#c=!1,this.#u&&ja(this.#u,this.#v)}))}get_effect_pending(){return this.#h(),e(this.#u)}error(t){var r=this.#t.onerror;let l=this.#t.failed;if(!r&&!l)throw t;this.#s&&(gt(this.#s),this.#s=null),this.#a&&(gt(this.#a),this.#a=null),this.#n&&(gt(this.#n),this.#n=null);var n=!1,i=!1;const v=()=>{if(n){sl();return}n=!0,i&&Zn(),this.#n!==null&&ga(this.#n,()=>{this.#n=null}),this.#m(()=>{oa.ensure(),this.#g()})};Qt(()=>{try{i=!0,r?.(t,v),i=!1}catch(_){Pa(_,this.#l&&this.#l.parent)}l&&(this.#n=this.#m(()=>{oa.ensure();try{return Ft(()=>{var _=Ge;_.b=this,_.f|=hr,l(this.#e,()=>t,()=>v)})}catch(_){return Pa(_,this.#l.parent),null}}))})}}function bl(a,t,r,l){const n=lr;var i=a.filter(u=>!u.settled);if(r.length===0&&i.length===0){l(t.map(n));return}var v=Ue,_=Ge,c=hl(),m=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(u=>u.promise)):null;function g(u){c();try{l(u)}catch(w){(_.f&Zt)===0&&Pa(w,_)}v?.deactivate(),Cr()}if(r.length===0){m.then(()=>g(t.map(n)));return}function y(){c(),Promise.all(r.map(u=>wl(u))).then(u=>g([...t.map(n),...u])).catch(u=>Pa(u,_))}m?m.then(y):y()}function hl(){var a=Ge,t=Oe,r=zt,l=Ue;return function(i=!0){Wt(a),Lt(t),Ra(r),i&&l?.activate()}}function Cr(){Wt(null),Lt(null),Ra(null)}function xl(){var a=Ge.b,t=Ue,r=a.is_rendered();return a.update_pending_count(1),t.increment(r),()=>{a.update_pending_count(-1),t.decrement(r)}}function lr(a){var t=ct|ut,r=Oe!==null&&(Oe.f&ct)!==0?Oe:null;return Ge!==null&&(Ge.f|=Ba),{ctx:zt,deps:null,effects:null,equals:Ao,f:t,fn:a,reactions:null,rv:0,v:vt,wv:0,parent:r??Ge,ac:null}}function wl(a,t,r){Ge===null&&In();var n=void 0,i=ya(vt),v=!Oe,_=new Map;return Dl(()=>{var c=wo();n=c.promise;try{Promise.resolve(a()).then(c.resolve,c.reject).then(()=>{m===Ue&&m.committed&&m.deactivate(),Cr()})}catch(u){c.reject(u),Cr()}var m=Ue;if(v){var g=xl();_.get(m)?.reject(_a),_.delete(m),_.set(m,c)}const y=(u,w=void 0)=>{if(m.activate(),w)w!==_a&&(i.f|=ra,ja(i,w));else{(i.f&ra)!==0&&(i.f^=ra),ja(i,u);for(const[z,x]of _){if(_.delete(z),z===m)break;x.reject(_a)}}g&&g()};c.promise.then(y,u=>y(null,u||"unknown"))}),Ko(()=>{for(const c of _.values())c.reject(_a)}),new Promise(c=>{function m(g){function y(){g===n?c(i):m(n)}g.then(y,y)}m(n)})}function p(a){const t=lr(a);return an(t),t}function To(a){const t=lr(a);return t.equals=Mo,t}function yl(a){var t=a.effects;if(t!==null){a.effects=null;for(var r=0;r<t.length;r+=1)gt(t[r])}}function Cl(a){for(var t=a.parent;t!==null;){if((t.f&ct)===0)return(t.f&Zt)===0?t:null;t=t.parent}return null}function Br(a){var t,r=Ge;Wt(Cl(a));try{a.f&=~wa,yl(a),t=ln(a)}finally{Wt(r)}return t}function Oo(a){var t=Br(a);if(!a.equals(t)&&(a.wv=on(),(!Ue?.is_fork||a.deps===null)&&(a.v=t,a.deps===null))){rt(a,lt);return}la||(Tt!==null?(qr()||Ue?.is_fork)&&Tt.set(a,t):Dr(a))}function kl(a){if(a.effects!==null)for(const t of a.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(_a),t.teardown=Bn,t.ac=null,Va(t,0),Or(t))}function Go(a){if(a.effects!==null)for(const t of a.effects)t.teardown&&La(t)}let kr=new Set;const na=new Map;let Io=!1;function ya(a,t){var r={f:0,v:a,reactions:null,equals:Ao,rv:0,wv:0};return r}function U(a,t){const r=ya(a);return an(r),r}function Sl(a,t=!1,r=!0){const l=ya(a);return t||(l.equals=Mo),l}function s(a,t,r=!1){Oe!==null&&(!Gt||(Oe.f&Xr)!==0)&&Eo()&&(Oe.f&(ct|ea|Lr|Xr))!==0&&(jt===null||!Ea.call(jt,a))&&Yn();let l=r?He(t):t;return ja(a,l)}function ja(a,t){if(!a.equals(t)){var r=a.v;la?na.set(a,t):na.set(a,r),a.v=t;var l=oa.ensure();if(l.capture(a,r),(a.f&ct)!==0){const n=a;(a.f&ut)!==0&&Br(n),Dr(n)}a.wv=on(),Uo(a,ut),Ge!==null&&(Ge.f<)!==0&&(Ge.f&(Nt|za))===0&&(Rt===null?ql([a]):Rt.push(a)),!l.is_fork&&kr.size>0&&!Io&&zl()}return t}function zl(){Io=!1;for(const a of kr)(a.f<)!==0&&rt(a,Ut),Ja(a)&&La(a);kr.clear()}function Na(a){s(a,a.v+1)}function Uo(a,t){var r=a.reactions;if(r!==null)for(var l=r.length,n=0;n<l;n++){var i=r[n],v=i.f,_=(v&ut)===0;if(_&&rt(i,t),(v&ct)!==0){var c=i;Tt?.delete(c),(v&wa)===0&&(v&Pt&&(i.f|=wa),Uo(c,Ut))}else _&&((v&ea)!==0&&Kt!==null&&Kt.add(i),Ot(i))}}function He(a){if(typeof a!="object"||a===null||Ia in a)return a;const t=xo(a);if(t!==Ln&&t!==Dn)return a;var r=new Map,l=ho(a),n=U(0),i=ba,v=_=>{if(ba===i)return _();var c=Oe,m=ba;Lt(null),eo(i);var g=_();return Lt(c),eo(m),g};return l&&r.set("length",U(a.length)),new Proxy(a,{defineProperty(_,c,m){(!("value"in m)||m.configurable===!1||m.enumerable===!1||m.writable===!1)&&Kn();var g=r.get(c);return g===void 0?v(()=>{var y=U(m.value);return r.set(c,y),y}):s(g,m.value,!0),!0},deleteProperty(_,c){var m=r.get(c);if(m===void 0){if(c in _){const g=v(()=>U(vt));r.set(c,g),Na(n)}}else s(m,vt),Na(n);return!0},get(_,c,m){if(c===Ia)return a;var g=r.get(c),y=c in _;if(g===void 0&&(!y||Ma(_,c)?.writable)&&(g=v(()=>{var w=He(y?_[c]:vt),z=U(w);return z}),r.set(c,g)),g!==void 0){var u=e(g);return u===vt?void 0:u}return Reflect.get(_,c,m)},getOwnPropertyDescriptor(_,c){var m=Reflect.getOwnPropertyDescriptor(_,c);if(m&&"value"in m){var g=r.get(c);g&&(m.value=e(g))}else if(m===void 0){var y=r.get(c),u=y?.v;if(y!==void 0&&u!==vt)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return m},has(_,c){if(c===Ia)return!0;var m=r.get(c),g=m!==void 0&&m.v!==vt||Reflect.has(_,c);if(m!==void 0||Ge!==null&&(!g||Ma(_,c)?.writable)){m===void 0&&(m=v(()=>{var u=g?He(_[c]):vt,w=U(u);return w}),r.set(c,m));var y=e(m);if(y===vt)return!1}return g},set(_,c,m,g){var y=r.get(c),u=c in _;if(l&&c==="length")for(var w=m;w<y.v;w+=1){var z=r.get(w+"");z!==void 0?s(z,vt):w in _&&(z=v(()=>U(vt)),r.set(w+"",z))}if(y===void 0)(!u||Ma(_,c)?.writable)&&(y=v(()=>U(void 0)),s(y,He(m)),r.set(c,y));else{u=y.v!==vt;var x=v(()=>He(m));s(y,x)}var b=Reflect.getOwnPropertyDescriptor(_,c);if(b?.set&&b.set.call(g,m),!u){if(l&&typeof c=="string"){var E=r.get("length"),M=Number(c);Number.isInteger(M)&&M>=E.v&&s(E,M+1)}Na(n)}return!0},ownKeys(_){e(n);var c=Reflect.ownKeys(_).filter(y=>{var u=r.get(y);return u===void 0||u.v!==vt});for(var[m,g]of r)g.v!==vt&&!(m in _)&&c.push(m);return c},setPrototypeOf(){Xn()}})}var Zr,No,Vo,Ho;function Al(){if(Zr===void 0){Zr=window,No=/Firefox/.test(navigator.userAgent);var a=Element.prototype,t=Node.prototype,r=Text.prototype;Vo=Ma(t,"firstChild").get,Ho=Ma(t,"nextSibling").get,Kr(a)&&(a.__click=void 0,a.__className=void 0,a.__attributes=null,a.__style=void 0,a.__e=void 0),Kr(r)&&(r.__t=void 0)}}function $t(a=""){return document.createTextNode(a)}function Ct(a){return Vo.call(a)}function Wa(a){return Ho.call(a)}function o(a,t){return Ct(a)}function ze(a,t=!1){{var r=Ct(a);return r instanceof Comment&&r.data===""?Wa(r):r}}function d(a,t=1,r=!1){let l=a;for(;t--;)l=Wa(l);return l}function Ml(a){a.textContent=""}function Wo(){return!1}function Jo(a,t,r){return document.createElementNS(zo,a,void 0)}let Qr=!1;function El(){Qr||(Qr=!0,document.addEventListener("reset",a=>{Promise.resolve().then(()=>{if(!a.defaultPrevented)for(const t of a.target.elements)t.__on_r?.()})},{capture:!0}))}function sr(a){var t=Oe,r=Ge;Lt(null),Wt(null);try{return a()}finally{Lt(t),Wt(r)}}function Rl(a,t,r,l=r){a.addEventListener(t,()=>sr(r));const n=a.__on_r;n?a.__on_r=()=>{n(),l(!0)}:a.__on_r=()=>l(!0),El()}function Pl(a){Ge===null&&(Oe===null&&Hn(),Vn()),la&&Nn()}function jl(a,t){var r=t.last;r===null?t.last=t.first=a:(r.next=a,a.prev=r,t.last=a)}function ta(a,t,r){var l=Ge;l!==null&&(l.f&kt)!==0&&(a|=kt);var n={ctx:zt,deps:null,nodes:null,f:a|ut|Pt,first:null,fn:t,last:null,next:null,parent:l,b:l&&l.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{La(n)}catch(_){throw gt(n),_}else t!==null&&Ot(n);var i=n;if(r&&i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ba)===0&&(i=i.first,(a&ea)!==0&&(a&xa)!==0&&i!==null&&(i.f|=xa)),i!==null&&(i.parent=l,l!==null&&jl(i,l),Oe!==null&&(Oe.f&ct)!==0&&(a&za)===0)){var v=Oe;(v.effects??=[]).push(i)}return n}function qr(){return Oe!==null&&!Gt}function Ko(a){const t=ta(or,null,!1);return rt(t,lt),t.teardown=a,t}function Ce(a){Pl();var t=Ge.f,r=!Oe&&(t&Nt)!==0&&(t&ha)===0;if(r){var l=zt;(l.e??=[]).push(a)}else return Xo(a)}function Xo(a){return ta(Ha|Fn,a,!1)}function Ll(a){oa.ensure();const t=ta(za|Ba,a,!0);return(r={})=>new Promise(l=>{r.outro?ga(t,()=>{gt(t),l(void 0)}):(gt(t),l(void 0))})}function Fr(a){return ta(Ha,a,!1)}function Dl(a){return ta(Lr|Ba,a,!0)}function Tr(a,t=0){return ta(or|t,a,!0)}function T(a,t=[],r=[],l=[]){bl(l,t,r,n=>{ta(or,()=>a(...n.map(e)),!0)})}function ir(a,t=0){var r=ta(ea|t,a,!0);return r}function Ft(a){return ta(Nt|Ba,a,!0)}function Yo(a){var t=a.teardown;if(t!==null){const r=la,l=Oe;$r(!0),Lt(null);try{t.call(null)}finally{$r(r),Lt(l)}}}function Or(a,t=!1){var r=a.first;for(a.first=a.last=null;r!==null;){const n=r.ac;n!==null&&sr(()=>{n.abort(_a)});var l=r.next;(r.f&za)!==0?r.parent=null:gt(r,t),r=l}}function Bl(a){for(var t=a.first;t!==null;){var r=t.next;(t.f&Nt)===0&>(t),t=r}}function gt(a,t=!0){var r=!1;(t||(a.f&Co)!==0)&&a.nodes!==null&&a.nodes.end!==null&&(Zo(a.nodes.start,a.nodes.end),r=!0),Or(a,t&&!r),Va(a,0),rt(a,Zt);var l=a.nodes&&a.nodes.t;if(l!==null)for(const i of l)i.stop();Yo(a);var n=a.parent;n!==null&&n.first!==null&&Qo(a),a.next=a.prev=a.teardown=a.ctx=a.deps=a.fn=a.nodes=a.ac=null}function Zo(a,t){for(;a!==null;){var r=a===t?null:Wa(a);a.remove(),a=r}}function Qo(a){var t=a.parent,r=a.prev,l=a.next;r!==null&&(r.next=l),l!==null&&(l.prev=r),t!==null&&(t.first===a&&(t.first=l),t.last===a&&(t.last=r))}function ga(a,t,r=!0){var l=[];$o(a,l,!0);var n=()=>{r&>(a),t&&t()},i=l.length;if(i>0){var v=()=>--i||n();for(var _ of l)_.out(v)}else n()}function $o(a,t,r){if((a.f&kt)===0){a.f^=kt;var l=a.nodes&&a.nodes.t;if(l!==null)for(const _ of l)(_.is_global||r)&&t.push(_);for(var n=a.first;n!==null;){var i=n.next,v=(n.f&xa)!==0||(n.f&Nt)!==0&&(a.f&ea)!==0;$o(n,t,v?r:!1),n=i}}}function Gr(a){en(a,!0)}function en(a,t){if((a.f&kt)!==0){a.f^=kt,(a.f<)===0&&(rt(a,ut),Ot(a));for(var r=a.first;r!==null;){var l=r.next,n=(r.f&xa)!==0||(r.f&Nt)!==0;en(r,n?t:!1),r=l}var i=a.nodes&&a.nodes.t;if(i!==null)for(const v of i)(v.is_global||t)&&v.in()}}function tn(a,t){if(a.nodes)for(var r=a.nodes.start,l=a.nodes.end;r!==null;){var n=r===l?null:Wa(r);t.append(r),r=n}}let ar=!1,la=!1;function $r(a){la=a}let Oe=null,Gt=!1;function Lt(a){Oe=a}let Ge=null;function Wt(a){Ge=a}let jt=null;function an(a){Oe!==null&&(jt===null?jt=[a]:jt.push(a))}let ft=null,yt=0,Rt=null;function ql(a){Rt=a}let rn=1,ma=0,ba=ma;function eo(a){ba=a}function on(){return++rn}function Ja(a){var t=a.f;if((t&ut)!==0)return!0;if(t&ct&&(a.f&=~wa),(t&Ut)!==0){for(var r=a.deps,l=r.length,n=0;n<l;n++){var i=r[n];if(Ja(i)&&Oo(i),i.wv>a.wv)return!0}(t&Pt)!==0&&Tt===null&&rt(a,lt)}return!1}function nn(a,t,r=!0){var l=a.reactions;if(l!==null&&!(jt!==null&&Ea.call(jt,a)))for(var n=0;n<l.length;n++){var i=l[n];(i.f&ct)!==0?nn(i,t,!1):t===i&&(r?rt(i,ut):(i.f<)!==0&&rt(i,Ut),Ot(i))}}function ln(a){var t=ft,r=yt,l=Rt,n=Oe,i=jt,v=zt,_=Gt,c=ba,m=a.f;ft=null,yt=0,Rt=null,Oe=(m&(Nt|za))===0?a:null,jt=null,Ra(a.ctx),Gt=!1,ba=++ma,a.ac!==null&&(sr(()=>{a.ac.abort(_a)}),a.ac=null);try{a.f|=xr;var g=a.fn,y=g();a.f|=ha;var u=a.deps,w=Ue?.is_fork;if(ft!==null){var z;if(w||Va(a,yt),u!==null&&yt>0)for(u.length=yt+ft.length,z=0;z<ft.length;z++)u[yt+z]=ft[z];else a.deps=u=ft;if(qr()&&(a.f&Pt)!==0)for(z=yt;z<u.length;z++)(u[z].reactions??=[]).push(a)}else!w&&u!==null&&yt<u.length&&(Va(a,yt),u.length=yt);if(Eo()&&Rt!==null&&!Gt&&u!==null&&(a.f&(ct|Ut|ut))===0)for(z=0;z<Rt.length;z++)nn(Rt[z],a);if(n!==null&&n!==a){if(ma++,n.deps!==null)for(let x=0;x<r;x+=1)n.deps[x].rv=ma;if(t!==null)for(const x of t)x.rv=ma;Rt!==null&&(l===null?l=Rt:l.push(...Rt))}return(a.f&ra)!==0&&(a.f^=ra),y}catch(x){return Po(x)}finally{a.f^=xr,ft=t,yt=r,Rt=l,Oe=n,jt=i,Ra(v),Gt=_,ba=c}}function Fl(a,t){let r=t.reactions;if(r!==null){var l=Rn.call(r,a);if(l!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[l]=r[n],r.pop())}}if(r===null&&(t.f&ct)!==0&&(ft===null||!Ea.call(ft,t))){var i=t;(i.f&Pt)!==0&&(i.f^=Pt,i.f&=~wa),Dr(i),kl(i),Va(i,0)}}function Va(a,t){var r=a.deps;if(r!==null)for(var l=t;l<r.length;l++)Fl(a,r[l])}function La(a){var t=a.f;if((t&Zt)===0){rt(a,lt);var r=Ge,l=ar;Ge=a,ar=!0;try{(t&(ea|yo))!==0?Bl(a):Or(a),Yo(a);var n=ln(a);a.teardown=typeof n=="function"?n:null,a.wv=rn;var i;br&&dl&&(a.f&ut)!==0&&a.deps}finally{ar=l,Ge=r}}}async function Tl(){await Promise.resolve(),ul()}function e(a){var t=a.f,r=(t&ct)!==0;if(Oe!==null&&!Gt){var l=Ge!==null&&(Ge.f&Zt)!==0;if(!l&&(jt===null||!Ea.call(jt,a))){var n=Oe.deps;if((Oe.f&xr)!==0)a.rv<ma&&(a.rv=ma,ft===null&&n!==null&&n[yt]===a?yt++:ft===null?ft=[a]:ft.push(a));else{(Oe.deps??=[]).push(a);var i=a.reactions;i===null?a.reactions=[Oe]:Ea.call(i,Oe)||i.push(Oe)}}}if(la&&na.has(a))return na.get(a);if(r){var v=a;if(la){var _=v.v;return((v.f<)===0&&v.reactions!==null||dn(v))&&(_=Br(v)),na.set(v,_),_}var c=(v.f&Pt)===0&&!Gt&&Oe!==null&&(ar||(Oe.f&Pt)!==0),m=(v.f&ha)===0;Ja(v)&&(c&&(v.f|=Pt),Oo(v)),c&&!m&&(Go(v),sn(v))}if(Tt?.has(a))return Tt.get(a);if((a.f&ra)!==0)throw a.v;return a.v}function sn(a){if(a.f|=Pt,a.deps!==null)for(const t of a.deps)(t.reactions??=[]).push(a),(t.f&ct)!==0&&(t.f&Pt)===0&&(Go(t),sn(t))}function dn(a){if(a.v===vt)return!0;if(a.deps===null)return!1;for(const t of a.deps)if(na.has(t)||(t.f&ct)!==0&&dn(t))return!0;return!1}function At(a){var t=Gt;try{return Gt=!0,a()}finally{Gt=t}}const Ol=["touchstart","touchmove"];function Gl(a){return Ol.includes(a)}const Oa=Symbol("events"),vn=new Set,Sr=new Set;function Il(a,t,r,l={}){function n(i){if(l.capture||zr.call(t,i),!i.cancelBubble)return sr(()=>r?.call(this,i))}return a.startsWith("pointer")||a.startsWith("touch")||a==="wheel"?Qt(()=>{t.addEventListener(a,n,l)}):t.addEventListener(a,n,l),n}function ht(a,t,r,l,n){var i={capture:l,passive:n},v=Il(a,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ko(()=>{t.removeEventListener(a,v,i)})}function Je(a,t,r){(t[Oa]??={})[a]=r}function ca(a){for(var t=0;t<a.length;t++)vn.add(a[t]);for(var r of Sr)r(a)}let to=null;function zr(a){var t=this,r=t.ownerDocument,l=a.type,n=a.composedPath?.()||[],i=n[0]||a.target;to=a;var v=0,_=to===a&&a[Oa];if(_){var c=n.indexOf(_);if(c!==-1&&(t===document||t===window)){a[Oa]=t;return}var m=n.indexOf(t);if(m===-1)return;c<=m&&(v=c)}if(i=n[v]||a.target,i!==t){Pn(a,"currentTarget",{configurable:!0,get(){return i||r}});var g=Oe,y=Ge;Lt(null),Wt(null);try{for(var u,w=[];i!==null;){var z=i.assignedSlot||i.parentNode||i.host||null;try{var x=i[Oa]?.[l];x!=null&&(!i.disabled||a.target===i)&&x.call(i,a)}catch(b){u?w.push(b):u=b}if(a.cancelBubble||z===t||z===null)break;i=z}if(u){for(let b of w)queueMicrotask(()=>{throw b});throw u}}finally{a[Oa]=t,delete a.currentTarget,Lt(g),Wt(y)}}}const Ul=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:a=>a});function Nl(a){return Ul?.createHTML(a)??a}function Ir(a,t=!1){var r=Jo("template");return a=a.replaceAll("<!>","<!---->"),r.innerHTML=t?Nl(a):a,r.content}function Ca(a,t){var r=Ge;r.nodes===null&&(r.nodes={start:a,end:t,a:null,t:null})}function h(a,t){var r=(t&So)!==0,l=(t&ll)!==0,n,i=!a.startsWith("<!>");return()=>{n===void 0&&(n=Ir(i?a:"<!>"+a,!0),r||(n=Ct(n)));var v=l||No?document.importNode(n,!0):n.cloneNode(!0);if(r){var _=Ct(v),c=v.lastChild;Ca(_,c)}else Ca(v,v);return v}}function Vl(a,t,r="svg"){var l=!a.startsWith("<!>"),n=(t&So)!==0,i=`<${r}>${l?a:"<!>"+a}</${r}>`,v;return()=>{if(!v){var _=Ir(i,!0),c=Ct(_);if(n)for(v=document.createDocumentFragment();Ct(c);)v.appendChild(Ct(c));else v=Ct(c)}var m=v.cloneNode(!0);if(n){var g=Ct(m),y=m.lastChild;Ca(g,y)}else Ca(m,m);return m}}function it(a,t){return Vl(a,t,"svg")}function Yt(a=""){{var t=$t(a+"");return Ca(t,t),t}}function st(){var a=document.createDocumentFragment(),t=document.createComment(""),r=$t();return a.append(t,r),Ca(t,r),a}function f(a,t){a!==null&&a.before(t)}function Q(a,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(a.__t??=a.nodeValue)&&(a.__t=r,a.nodeValue=r+"")}function Hl(a,t){return Wl(a,t)}const $a=new Map;function Wl(a,{target:t,anchor:r,props:l={},events:n,context:i,intro:v=!0}){Al();var _=void 0,c=Ll(()=>{var m=r??t.appendChild($t());ml(m,{pending:()=>{}},u=>{je({});var w=zt;i&&(w.c=i),n&&(l.$$events=n),_=a(u,l)||{},Le()});var g=new Set,y=u=>{for(var w=0;w<u.length;w++){var z=u[w];if(!g.has(z)){g.add(z);var x=Gl(z);for(const M of[t,document]){var b=$a.get(M);b===void 0&&(b=new Map,$a.set(M,b));var E=b.get(z);E===void 0?(M.addEventListener(z,zr,{passive:x}),b.set(z,1)):b.set(z,E+1)}}}};return y(rr(vn)),Sr.add(y),()=>{for(var u of g)for(const x of[t,document]){var w=$a.get(x),z=w.get(u);--z==0?(x.removeEventListener(u,zr),w.delete(u),w.size===0&&$a.delete(x)):w.set(u,z)}Sr.delete(y),m!==r&&m.parentNode?.removeChild(m)}});return Ar.set(_,c),_}let Ar=new WeakMap;function Jl(a,t){const r=Ar.get(a);return r?(Ar.delete(a),r(t)):Promise.resolve()}class cn{anchor;#e=new Map;#r=new Map;#t=new Map;#o=new Set;#l=!0;constructor(t,r=!0){this.anchor=t,this.#l=r}#s=()=>{var t=Ue;if(this.#e.has(t)){var r=this.#e.get(t),l=this.#r.get(r);if(l)Gr(l),this.#o.delete(r);else{var n=this.#t.get(r);n&&(this.#r.set(r,n.effect),this.#t.delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),l=n.effect)}for(const[i,v]of this.#e){if(this.#e.delete(i),i===t)break;const _=this.#t.get(v);_&&(gt(_.effect),this.#t.delete(v))}for(const[i,v]of this.#r){if(i===r||this.#o.has(i))continue;const _=()=>{if(Array.from(this.#e.values()).includes(i)){var m=document.createDocumentFragment();tn(v,m),m.append($t()),this.#t.set(i,{effect:v,fragment:m})}else gt(v);this.#o.delete(i),this.#r.delete(i)};this.#l||!l?(this.#o.add(i),ga(v,_,!1)):_()}}};#a=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[l,n]of this.#t)r.includes(l)||(gt(n.effect),this.#t.delete(l))};ensure(t,r){var l=Ue,n=Wo();if(r&&!this.#r.has(t)&&!this.#t.has(t))if(n){var i=document.createDocumentFragment(),v=$t();i.append(v),this.#t.set(t,{effect:Ft(()=>r(v)),fragment:i})}else this.#r.set(t,Ft(()=>r(this.anchor)));if(this.#e.set(l,t),n){for(const[_,c]of this.#r)_===t?l.unskip_effect(c):l.skip_effect(c);for(const[_,c]of this.#t)_===t?l.unskip_effect(c.effect):l.skip_effect(c.effect);l.oncommit(this.#s),l.ondiscard(this.#a)}else this.#s()}}function W(a,t,r=!1){var l=new cn(a),n=r?xa:0;function i(v,_){l.ensure(v,_)}ir(()=>{var v=!1;t((_,c=0)=>{v=!0,i(c,_)}),v||i(!1,null)},n)}function Pe(a,t){return t}function Kl(a,t,r){for(var l=[],n=t.length,i,v=t.length,_=0;_<n;_++){let y=t[_];ga(y,()=>{if(i){if(i.pending.delete(y),i.done.add(y),i.pending.size===0){var u=a.outrogroups;Mr(rr(i.done)),u.delete(i),u.size===0&&(a.outrogroups=null)}}else v-=1},!1)}if(v===0){var c=l.length===0&&r!==null;if(c){var m=r,g=m.parentNode;Ml(g),g.append(m),a.items.clear()}Mr(t,!c)}else i={pending:new Set(t),done:new Set},(a.outrogroups??=new Set).add(i)}function Mr(a,t=!0){for(var r=0;r<a.length;r++)gt(a[r],t)}var ao;function Ee(a,t,r,l,n,i=null){var v=a,_=new Map,c=(t&ko)!==0;if(c){var m=a;v=m.appendChild($t())}var g=null,y=To(()=>{var E=r();return ho(E)?E:E==null?[]:rr(E)}),u,w=!0;function z(){b.fallback=g,Xl(b,u,v,t,l),g!==null&&(u.length===0?(g.f&Xt)===0?Gr(g):(g.f^=Xt,Ga(g,null,v)):ga(g,()=>{g=null}))}var x=ir(()=>{u=e(y);for(var E=u.length,M=new Set,O=Ue,K=Wo(),J=0;J<E;J+=1){var B=u[J],Z=l(B,J),ae=w?null:_.get(Z);ae?(ae.v&&ja(ae.v,B),ae.i&&ja(ae.i,J),K&&O.unskip_effect(ae.e)):(ae=Yl(_,w?v:ao??=$t(),B,Z,J,n,t,r),w||(ae.e.f|=Xt),_.set(Z,ae)),M.add(Z)}if(E===0&&i&&!g&&(w?g=Ft(()=>i(v)):(g=Ft(()=>i(ao??=$t())),g.f|=Xt)),E>M.size&&Un(),!w)if(K){for(const[D,q]of _)M.has(D)||O.skip_effect(q.e);O.oncommit(z),O.ondiscard(()=>{})}else z();e(y)}),b={effect:x,items:_,outrogroups:null,fallback:g};w=!1}function Ta(a){for(;a!==null&&(a.f&Nt)===0;)a=a.next;return a}function Xl(a,t,r,l,n){var i=(l&el)!==0,v=t.length,_=a.items,c=Ta(a.effect.first),m,g=null,y,u=[],w=[],z,x,b,E;if(i)for(E=0;E<v;E+=1)z=t[E],x=n(z,E),b=_.get(x).e,(b.f&Xt)===0&&(b.nodes?.a?.measure(),(y??=new Set).add(b));for(E=0;E<v;E+=1){if(z=t[E],x=n(z,E),b=_.get(x).e,a.outrogroups!==null)for(const q of a.outrogroups)q.pending.delete(b),q.done.delete(b);if((b.f&Xt)!==0)if(b.f^=Xt,b===c)Ga(b,null,r);else{var M=g?g.next:c;b===a.effect.last&&(a.effect.last=b.prev),b.prev&&(b.prev.next=b.next),b.next&&(b.next.prev=b.prev),aa(a,g,b),aa(a,b,M),Ga(b,M,r),g=b,u=[],w=[],c=Ta(g.next);continue}if((b.f&kt)!==0&&(Gr(b),i&&(b.nodes?.a?.unfix(),(y??=new Set).delete(b))),b!==c){if(m!==void 0&&m.has(b)){if(u.length<w.length){var O=w[0],K;g=O.prev;var J=u[0],B=u[u.length-1];for(K=0;K<u.length;K+=1)Ga(u[K],O,r);for(K=0;K<w.length;K+=1)m.delete(w[K]);aa(a,J.prev,B.next),aa(a,g,J),aa(a,B,O),c=O,g=B,E-=1,u=[],w=[]}else m.delete(b),Ga(b,c,r),aa(a,b.prev,b.next),aa(a,b,g===null?a.effect.first:g.next),aa(a,g,b),g=b;continue}for(u=[],w=[];c!==null&&c!==b;)(m??=new Set).add(c),w.push(c),c=Ta(c.next);if(c===null)continue}(b.f&Xt)===0&&u.push(b),g=b,c=Ta(b.next)}if(a.outrogroups!==null){for(const q of a.outrogroups)q.pending.size===0&&(Mr(rr(q.done)),a.outrogroups?.delete(q));a.outrogroups.size===0&&(a.outrogroups=null)}if(c!==null||m!==void 0){var Z=[];if(m!==void 0)for(b of m)(b.f&kt)===0&&Z.push(b);for(;c!==null;)(c.f&kt)===0&&c!==a.fallback&&Z.push(c),c=Ta(c.next);var ae=Z.length;if(ae>0){var D=(l&ko)!==0&&v===0?r:null;if(i){for(E=0;E<ae;E+=1)Z[E].nodes?.a?.measure();for(E=0;E<ae;E+=1)Z[E].nodes?.a?.fix()}Kl(a,Z,D)}}i&&Qt(()=>{if(y!==void 0)for(b of y)b.nodes?.a?.apply()})}function Yl(a,t,r,l,n,i,v,_){var c=(v&Qn)!==0?(v&tl)===0?Sl(r,!1,!1):ya(r):null,m=(v&$n)!==0?ya(n):null;return{v:c,i:m,e:Ft(()=>(i(t,c??r,m??n,_),()=>{a.delete(l)}))}}function Ga(a,t,r){if(a.nodes)for(var l=a.nodes.start,n=a.nodes.end,i=t&&(t.f&Xt)===0?t.nodes.start:r;l!==null;){var v=Wa(l);if(i.before(l),l===n)return;l=v}}function aa(a,t,r){t===null?a.effect.first=r:t.next=r,r===null?a.effect.last=t:r.prev=t}function ro(a,t,r=!1,l=!1,n=!1){var i=a,v="";T(()=>{var _=Ge;if(v!==(v=t()??"")&&(_.nodes!==null&&(Zo(_.nodes.start,_.nodes.end),_.nodes=null),v!=="")){var c=v+"";r?c=`<svg>${c}</svg>`:l&&(c=`<math>${c}</math>`);var m=Ir(c);if((r||l)&&(m=Ct(m)),Ca(Ct(m),m.lastChild),r||l)for(;Ct(m);)i.before(Ct(m));else i.before(m)}})}function Zl(a,t,...r){var l=new cn(a);ir(()=>{const n=t()??null;l.ensure(n,n&&(i=>n(i,...r)))},xa)}function Me(a,t){Fr(()=>{var r=a.getRootNode(),l=r.host?r:r.head??r.ownerDocument.head;if(!l.querySelector("#"+t.hash)){const n=Jo("style");n.id=t.hash,n.textContent=t.code,l.appendChild(n)}})}const oo=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Ql(a,t,r){var l=a==null?"":""+a;if(t&&(l=l?l+" "+t:t),r){for(var n in r)if(r[n])l=l?l+" "+n:n;else if(l.length)for(var i=n.length,v=0;(v=l.indexOf(n,v))>=0;){var _=v+i;(v===0||oo.includes(l[v-1]))&&(_===l.length||oo.includes(l[_]))?l=(v===0?"":l.substring(0,v))+l.substring(_+1):v=_}}return l===""?null:l}function $l(a,t){return a==null?null:String(a)}function Ae(a,t,r,l,n,i){var v=a.__className;if(v!==r||v===void 0){var _=Ql(r,l,i);_==null?a.removeAttribute("class"):t?a.className=_:a.setAttribute("class",_),a.__className=r}else if(i&&n!==i)for(var c in i){var m=!!i[c];(n==null||m!==!!n[c])&&a.classList.toggle(c,m)}return i}function Se(a,t,r,l){var n=a.__style;if(n!==t){var i=$l(t);i==null?a.removeAttribute("style"):a.style.cssText=i,a.__style=t}return l}const es=Symbol("is custom element"),ts=Symbol("is html");function be(a,t,r,l){var n=as(a);n[t]!==(n[t]=r)&&(t==="loading"&&(a[On]=r),r==null?a.removeAttribute(t):typeof r!="string"&&rs(a).includes(t)?a[t]=r:a.setAttribute(t,r))}function as(a){return a.__attributes??={[es]:a.nodeName.includes("-"),[ts]:a.namespaceURI===zo}}var no=new Map;function rs(a){var t=a.getAttribute("is")||a.nodeName,r=no.get(t);if(r)return r;no.set(t,r=[]);for(var l,n=a,i=Element.prototype;i!==n;){l=jn(n);for(var v in l)l[v].set&&r.push(v);n=xo(n)}return r}function os(a,t,r=t){var l=new WeakSet;Rl(a,"input",async n=>{var i=n?a.defaultValue:a.value;if(i=cr(a)?ur(i):i,r(i),Ue!==null&&l.add(Ue),await Tl(),i!==(i=t())){var v=a.selectionStart,_=a.selectionEnd,c=a.value.length;if(a.value=i??"",_!==null){var m=a.value.length;v===_&&_===c&&m>c?(a.selectionStart=m,a.selectionEnd=m):(a.selectionStart=v,a.selectionEnd=Math.min(_,m))}}}),At(t)==null&&a.value&&(r(cr(a)?ur(a.value):a.value),Ue!==null&&l.add(Ue)),Tr(()=>{var n=t();if(a===document.activeElement){var i=wr??Ue;if(l.has(i))return}cr(a)&&n===ur(a.value)||a.type==="date"&&!n&&!a.value||n!==a.value&&(a.value=n??"")})}function cr(a){var t=a.type;return t==="number"||t==="range"}function ur(a){return a===""?null:+a}class Ur{#e=new WeakMap;#r;#t;static entries=new WeakMap;constructor(t){this.#t=t}observe(t,r){var l=this.#e.get(t)||new Set;return l.add(r),this.#e.set(t,l),this.#o().observe(t,this.#t),()=>{var n=this.#e.get(t);n.delete(r),n.size===0&&(this.#e.delete(t),this.#r.unobserve(t))}}#o(){return this.#r??(this.#r=new ResizeObserver(t=>{for(var r of t){Ur.entries.set(r.target,r);for(var l of this.#e.get(r.target)||[])l(r)}}))}}var ns=new Ur({box:"border-box"});function Nr(a,t,r){var l=ns.observe(a,()=>r(a[t]));Fr(()=>(At(()=>r(a[t])),l))}function lo(a,t){return a===t||a?.[Ia]===t}function tt(a={},t,r,l){return Fr(()=>{var n,i;return Tr(()=>{n=i,i=[],At(()=>{a!==r(...i)&&(t(a,...i),n&&lo(r(...n),a)&&t(null,...n))})}),()=>{Qt(()=>{i&&lo(r(...i),a)&&t(null,...i)})}}),a}let er=!1;function ls(a){var t=er;try{return er=!1,[a(),er]}finally{er=t}}function L(a,t,r,l){var n=(r&ol)!==0,i=(r&nl)!==0,v=l,_=!0,c=()=>(_&&(_=!1,v=i?At(l):l),v),m;if(n){var g=Ia in a||Tn in a;m=Ma(a,t)?.set??(g&&t in a?M=>a[t]=M:void 0)}var y,u=!1;n?[y,u]=ls(()=>a[t]):y=a[t],y===void 0&&l!==void 0&&(y=c(),m&&(Jn(),m(y)));var w;if(w=()=>{var M=a[t];return M===void 0?c():(_=!0,M)},(r&rl)===0)return w;if(m){var z=a.$$legacy;return(function(M,O){return arguments.length>0?((!O||z||u)&&m(O?w():M),M):w()})}var x=!1,b=((r&al)!==0?lr:To)(()=>(x=!1,w()));n&&e(b);var E=Ge;return(function(M,O){if(arguments.length>0){const K=O?e(b):n?He(M):M;return s(b,K),x=!0,v!==void 0&&(v=K),M}return la&&x||(E.f&Zt)!==0?b.v:e(b)})}function Ka(a){zt===null&&Gn(),Ce(()=>{const t=At(a);if(typeof t=="function")return t})}const Fe=typeof window<"u"&&typeof document<"u",ss=':root{--sevn-color-primary: #0a3e27;--sevn-color-secondary: #c38214;--sevn-color-tertiary: #1c1c1c;--sevn-color-red: #da0000;--sevn-color-yellow: #e4a615;--sevn-color-green: #1e6704;--sevn-color-blue: #0e2a41;--sevn-color-neutral: #f2f2f7;--sevn-color-text-secondary: #6b7280}[class^=sevn_],[class*=" sevn_"],[class^=sevn_] *,[class^=sevn_] *:before,[class^=sevn_] *:after,[class*=" sevn_"] *,[class*=" sevn_"] *:before,[class*=" sevn_"] *:after{box-sizing:border-box}[class^=sevn_] *,[class*=" sevn_"] *{margin:0;padding:0}';class un extends Error{constructor(){super('Chave de acesso não configurada. Chame Core.applyKey("sua-chave") antes de montar o componente, ou carregue o script com ?cid=sua-chave.'),this.name="SevnKeyMissingError"}}class pn extends Error{constructor(t,r){super(`Não foi possível contatar a API para ${t}.`),this.name="SevnNetworkError",this.cause=r}}const pr="__sevnElectionsState_v1__",_r=globalThis;function _n(a){return _r[pr]||(_r[pr]={config:a(),transport:{activeIndex:0,pinnedAt:0}}),_r[pr]}const is="https://failover-api.sevntech.com",ds=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function fn(){return{key:null,apiHosts:[],assetsBase:"https://cdn.sevnelections.com/static",assetsVersion:"v1",cache:{storageKey:"election_cache",maxEntries:200},request:{timeoutMs:8e3,retriesPerHost:3,retryDelayMs:300,stickyWindowMs:12e4},theme:null}}const vs=fn;function qa(){return _n(fn)}function cs(a){return[`https://${a}-api1.sevnelections.com`,`https://${a}-api2.sevnelections.com`,is]}function mn(a){if(typeof a!="string"||!ds.test(a))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(a)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const t=qa();t.config.key=a,t.config.apiHosts=cs(a)}function so(a){const{cache:t,request:r,key:l,...n}=a,i=qa();i.config={...i.config,...n,cache:{...i.config.cache,...t},request:{...i.config.request,...r}},l&&(mn(l),n.apiHosts&&(i.config.apiHosts=n.apiHosts))}function Xa(){return qa().config}function gn(){return qa().config.apiHosts.length>0}function bn(){if(!gn())throw new un;return qa().config.apiHosts}function dr(a){const{assetsBase:t,assetsVersion:r}=qa().config,l=t.replace(/\/+$/,""),n=String(a).replace(/^\/+/,"");return`${l}/${r}/${n}`}const io="data-sevn-tokens",vo="data-sevn-theme",co={primary:"--sevn-color-primary",secondary:"--sevn-color-secondary",tertiary:"--sevn-color-tertiary",neutral:"--sevn-color-neutral",red:"--sevn-color-red",green:"--sevn-color-green",blue:"--sevn-color-blue",yellow:"--sevn-color-yellow",textSecondary:"--sevn-color-text-secondary"};function us(){if(!Fe||document.querySelector(`style[${io}]`))return;const a=document.createElement("style");a.setAttribute(io,""),a.textContent=ss,document.head.prepend(a);const t=Xa().theme;t&&Er(t)}function Er(a){if(!Fe)return;const t=Object.keys(co).filter(l=>a[l]).map(l=>` ${co[l]}: ${a[l]};`);if(t.length===0)return;let r=document.querySelector(`style[${vo}]`);r||(r=document.createElement("style"),r.setAttribute(vo,""),document.head.appendChild(r)),r.textContent=`:root {
|
|
3
|
+
${t.join(`
|
|
4
|
+
`)}
|
|
5
|
+
}`}function Xe(a,t){return class{#e=null;constructor(l){if(!Fe)throw new Error(`[sevn] ${t} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:n,...i}=l??{},v=typeof n=="string"?document.querySelector(n):n;if(!v)throw new Error(`[sevn] ${t}: alvo não encontrado`+(typeof n=="string"?` para o seletor "${n}".`:"."));us(),this.#e=Hl(a,{target:v,props:i})}destroy(){if(!this.#e)return Promise.resolve();const l=this.#e;return this.#e=null,Jl(l)}}}const ps="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ps);var _s=h('<div class="ad-container svelte-21516y"><!></div>');const fs={hash:"svelte-21516y",code:`.ad-container.svelte-21516y {width:100%;
|
|
6
|
+
/* Prefixada: custom properties herdam, e sem o namespace um site cliente
|
|
7
|
+
que use --ad-height por acaso mudaria a altura do nosso bloco. */height:var(--sevn-ad-height, 120px);background-color:#f0f0f0;display:flex;align-items:center;justify-content:center;overflow:hidden;}`};function hn(a,t){Me(a,fs);var r=_s(),l=o(r);Zl(l,()=>t.children),f(a,r)}const ms="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1538%2031.8937%2034.1538%2036.5625V42.1875H2.84615V36.5625C2.84615%2031.8937%206.66%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.1969%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25ZM25.6154%2011.25C27.1808%2011.25%2028.4615%2012.5156%2028.4615%2014.0625C28.4615%2015.6094%2027.1808%2016.875%2025.6154%2016.875V11.25ZM11.3846%2016.875C9.81923%2016.875%208.53846%2015.6094%208.53846%2014.0625C8.53846%2012.5156%209.81923%2011.25%2011.3846%2011.25V16.875Z'%20fill='%231C1C1C'/%3e%3cpath%20d='M11.7262%2011.5875H10.3031C8.16847%209.84374%208.53847%207.17186%208.53847%204.92186C8.53847%202.67186%209.96154%204.19061%2011.3846%204.19061C12.8077%204.19061%2014.2308%205.59686%2014.2308%205.59686C11.7262%205.59686%2011.3846%202.78436%2011.3846%202.78436H19.9231C23.0539%202.78436%2025.6154%205.31561%2025.6154%208.40936H27.0385C27.0385%208.40936%2027.75%2010.5187%2026.6969%2011.925L11.7546%2011.5875H11.7262Z'%20fill='%231C1C1C'/%3e%3c/g%3e%3c/svg%3e",gs="data:image/svg+xml,%3csvg%20width='37'%20height='45'%20viewBox='0%200%2037%2045'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.5'%3e%3cpath%20d='M11.3846%2028.125H25.6154C30.34%2028.125%2034.1539%2031.8937%2034.1539%2036.5625V42.1875H2.84616V36.5625C2.84616%2031.8937%206.66001%2028.125%2011.3846%2028.125ZM11.3846%2011.25H25.6154V18.2812C25.6154%2020.1461%2024.8657%2021.9345%2023.5313%2023.2531C22.197%2024.5717%2020.3871%2025.3125%2018.5%2025.3125C16.6129%2025.3125%2014.8031%2024.5717%2013.4687%2023.2531C12.1343%2021.9345%2011.3846%2020.1461%2011.3846%2018.2812V11.25Z'%20fill='black'/%3e%3cpath%20d='M27.0385%2011.0531V9.84375C27.0385%206.75%2024.4769%204.21875%2021.3461%204.21875L19.9231%202.8125H15.6538C12.5231%202.8125%209.96153%205.34375%209.96153%208.4375V11.0531C9.96153%2014.7938%208.45307%2018.3656%205.80615%2021.0094L4.26923%2022.5281L6.37538%2023.5688C8.53846%2024.6375%2011.1285%2024.2156%2012.8077%2022.5281H24.1923C25.9%2024.2156%2028.49%2024.6375%2030.6246%2023.5688L32.7308%2022.5281L31.1938%2021.0094C29.8732%2019.701%2028.8264%2018.1483%2028.1134%2016.4399C27.4004%2014.7316%2027.0351%2012.9011%2027.0385%2011.0531Z'%20fill='black'/%3e%3cpath%20d='M19.9231%202.8125C19.9231%202.8125%2021.3462%202.8125%2021.3462%204.21875H19.9231V2.8125Z'%20fill='black'/%3e%3c/g%3e%3c/svg%3e";var bs=h('<span class="avatar-tag svelte-ga6vh2"> </span>'),hs=h('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const xs={hash:"svelte-ga6vh2",code:".avatar-container.svelte-ga6vh2 {position:relative;display:inline-flex;flex-direction:column;align-items:center;flex-shrink:0;}.avatar.svelte-ga6vh2 {border-radius:50%;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;}.avatar-image.svelte-ga6vh2 {width:75%;height:auto;display:block;margin-bottom:-6%;}.avatar-image--photo.svelte-ga6vh2 {width:100%;height:100%;margin-bottom:0;object-fit:cover;object-position:center top;}.avatar-tag.svelte-ga6vh2 {position:absolute;bottom:-5px;color:#fff;font-weight:700;letter-spacing:0.05em;border-radius:4px;border:1px solid #fff;white-space:nowrap;}"};function mt(a,t){Me(a,xs);let r=L(t,"avatar",3,"man"),l=L(t,"size",3,"md"),n=L(t,"tagColor",3,"var(--sevn-color-green)"),i=U(!1);const v=p(()=>r()==="woman"?gs:ms),_=p(()=>!!t.photoUrl&&!e(i)),c=p(()=>e(_)?t.photoUrl:e(v)),m={sm:"40px",md:"56px",lg:"72px"},g={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},y=p(()=>m[l()]??l()),u=p(()=>g[l()]??g.md);var w=hs(),z=o(w),x=o(z);let b;var E=d(z,2);{var M=O=>{var K=bs(),J=o(K);T(()=>{Se(K,`background-color: ${n()??""}; font-size: ${e(u).fontSize??""}; padding: ${e(u).padding??""};`),Q(J,t.tag)}),f(O,K)};W(E,O=>{t.tag&&O(M)})}T(()=>{Se(z,`background-color: ${t.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${e(y)??""}; height: ${e(y)??""};`),b=Ae(x,1,"avatar-image svelte-ga6vh2",null,b,{"avatar-image--photo":e(_)}),be(x,"src",e(c)),be(x,"alt",t.name)}),ht("error",x,()=>s(i,!0)),f(a,w)}const ws="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25.9798%2026.872L17.6305%2018.5227C16.9638%2019.0907%2016.1971%2019.5302%2015.3305%2019.8413C14.4638%2020.1524%2013.5927%2020.308%2012.7171%2020.308C10.582%2020.308%208.77493%2019.5689%207.29582%2018.0907C5.8167%2016.6124%205.07715%2014.8058%205.07715%2012.6707C5.07715%2010.5356%205.81581%208.728%207.29315%207.248C8.77048%205.768%2010.5767%205.02711%2012.7118%205.02533C14.8469%205.02356%2016.6549%205.76311%2018.1358%207.244C19.6167%208.72489%2020.3571%2010.5324%2020.3571%2012.6667C20.3571%2013.5929%2020.1931%2014.4893%2019.8651%2015.356C19.5371%2016.2227%2019.106%2016.964%2018.5718%2017.58L26.9211%2025.928L25.9798%2026.872ZM12.7185%2018.9733C14.4874%2018.9733%2015.9807%2018.3644%2017.1985%2017.1467C18.4163%2015.9289%2019.0251%2014.4351%2019.0251%2012.6653C19.0251%2010.8956%2018.4163%209.40222%2017.1985%208.18533C15.9807%206.96844%2014.4874%206.35956%2012.7185%206.35867C10.9496%206.35778%209.45581%206.96667%208.23715%208.18533C7.01848%209.404%206.40959%2010.8973%206.41048%2012.6653C6.41137%2014.4333%207.02026%2015.9267%208.23715%2017.1453C9.45404%2018.364%2010.9474%2018.9729%2012.7171%2018.972'%20fill='%231C1C1C'/%3e%3c/svg%3e",Ke="data:image/svg+xml,%3csvg%20width='13'%20height='8'%20viewBox='0%200%2013%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.91%20-0.00016065L12.97%201.06084L7.193%206.83984C7.10043%206.93299%206.99036%207.00692%206.86911%207.05737C6.74786%207.10782%206.61783%207.13379%206.4865%207.13379C6.35517%207.13379%206.22514%207.10782%206.10389%207.05737C5.98264%207.00692%205.87257%206.93299%205.78%206.83984L2.65457e-07%201.06084L1.06%200.000838803L6.485%205.42484L11.91%20-0.00016065Z'%20fill='black'/%3e%3c/svg%3e",Vr="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.5%201.5L1.5%2010.5M1.5%201.5L10.5%2010.5'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3c/svg%3e";var ys=h('<span class="mobile-label svelte-1dw55dz"> </span>'),Cs=h('<input class="search-input svelte-1dw55dz" type="text"/>'),ks=h('<span class="field-label-prefix svelte-1dw55dz"> </span>'),Ss=h('<span class="field-text svelte-1dw55dz"><!> </span>'),zs=h("<span> </span>"),As=h('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),Ms=h('<img alt="" aria-hidden="true"/>'),Es=h('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),Rs=h('<span class="meta svelte-1dw55dz"> </span>'),Ps=h('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),js=h('<button type="button" role="option"> </button>'),Ls=h('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),Ds=h('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),Bs=h('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const qs={hash:"svelte-1dw55dz",code:`.autocomplete.svelte-1dw55dz {position:relative;width:var(--field-width);font-family:inherit;}
|
|
8
|
+
|
|
9
|
+
/* ── Label (mobile only) ─────────────────────────────── */.mobile-label.svelte-1dw55dz {display:none;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:6px;}
|
|
10
|
+
|
|
11
|
+
@media (max-width: 768px) {.mobile-label.svelte-1dw55dz {display:block;}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* ── Campo principal ─────────────────────────────────── */.field.svelte-1dw55dz {display:flex;align-items:center;width:100%;height:var(--field-height);padding:0 14px;background:var(--sevn-color-neutral);border:1px solid transparent;border-radius:8px;cursor:pointer;gap:8px;transition:border-color 0.15s, box-shadow 0.15s;color:var(--sevn-color-tertiary);}.field.svelte-1dw55dz:hover {border-color:#d1d1d6;}.field.disabled.svelte-1dw55dz {cursor:not-allowed;opacity:0.55;}.field.disabled.svelte-1dw55dz:hover {border-color:transparent;}.field.open.svelte-1dw55dz {border-color:var(--sevn-color-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--sevn-color-primary) 15%, transparent);background:#fff;}
|
|
15
|
+
|
|
16
|
+
/* ── Texto do campo ──────────────────────────────────── */.field-text.svelte-1dw55dz {flex:1;text-align:left;font-size:0.9375rem;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.field-text.is-placeholder.svelte-1dw55dz {color:#9a9aaa;}.field-label-prefix.svelte-1dw55dz {font-weight:600;margin-right:4px;}
|
|
17
|
+
|
|
18
|
+
/* ── Input de busca ──────────────────────────────────── */.search-input.svelte-1dw55dz {flex:1;border:none;outline:none;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);background:transparent;min-width:0;}.search-input.svelte-1dw55dz::placeholder {color:#9a9aaa;}
|
|
19
|
+
|
|
20
|
+
/* ── Ícone de lupa ───────────────────────────────────── */.icon-search.svelte-1dw55dz {flex-shrink:0;}.field.open.svelte-1dw55dz .icon-search:where(.svelte-1dw55dz) {opacity:1;}
|
|
21
|
+
|
|
22
|
+
/* ── Botão de limpar ─────────────────────────────────── */.icon-clear.svelte-1dw55dz {display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.icon-clear.svelte-1dw55dz:hover,
|
|
23
|
+
.icon-clear.svelte-1dw55dz:focus-visible {background:rgba(0, 0, 0, 0.08);}
|
|
24
|
+
|
|
25
|
+
/* ── Ícone de chevron ────────────────────────────────── */.icon-chevron.svelte-1dw55dz {flex-shrink:0;transition:transform 0.2s ease;}.icon-chevron.open.svelte-1dw55dz {transform:rotate(180deg);}
|
|
26
|
+
|
|
27
|
+
/* ── "Você selecionou" (web only) ────────────────────── */.web-info.svelte-1dw55dz {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:20px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.selected-label.svelte-1dw55dz strong:where(.svelte-1dw55dz) {font-weight:600;}.meta.svelte-1dw55dz {font-size:0.7rem;opacity:50%;}
|
|
28
|
+
|
|
29
|
+
@media (max-width: 768px) {.web-info.svelte-1dw55dz {display:none;}.field-text.svelte-1dw55dz {font-weight:600;}.field-text.is-placeholder.svelte-1dw55dz:not(.force-placeholder) {display:none;}.search-input.svelte-1dw55dz::placeholder {color:transparent;}.show-placeholder-mobile.svelte-1dw55dz .search-input:where(.svelte-1dw55dz)::placeholder {color:#9a9aaa;}.icon-search.svelte-1dw55dz {margin-left:auto;}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ── Dropdown ────────────────────────────────────────── */.dropdown.svelte-1dw55dz {position:absolute;top:calc(var(--field-height) + 6px);left:0;right:0;background:#fff;border:1px solid #d1d1d6;border-radius:8px;max-height:240px;overflow-y:auto;z-index:200;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);scrollbar-width:thin;scrollbar-color:#d1d1d6 transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar {width:4px;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-track {background:transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-thumb {background-color:#d1d1d6;border-radius:4px;}
|
|
33
|
+
|
|
34
|
+
/* ── Opção ───────────────────────────────────────────── */.option.svelte-1dw55dz {display:block;width:100%;padding:11px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);transition:background 0.1s;line-height:1.4;}.option.svelte-1dw55dz:last-child {border-bottom:none;}.option.svelte-1dw55dz:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-1dw55dz {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}.no-results.svelte-1dw55dz {padding:14px;color:#9a9aaa;font-size:0.875rem;text-align:center;}`};function Re(a,t){je(t,!0),Me(a,qs);let r=L(t,"label",3,""),l=L(t,"showLabel",3,!0),n=L(t,"options",19,()=>[]),i=L(t,"value",15,null),v=L(t,"meta",3,""),_=L(t,"width",3,"100%"),c=L(t,"height",3,"48px"),m=L(t,"icon",3,ws),g=L(t,"iconSize",3,13),y=L(t,"showLabelInField",3,!1),u=L(t,"showDescriptionSelection",3,!0),w=L(t,"labelAsPlaceholder",3,!0),z=L(t,"showPlaceholderOnMobile",3,!1),x=L(t,"disabled",3,!1),b=L(t,"clearable",3,!0);const E=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let M=U(!1),O=U(""),K=U(null),J=U(null),B=p(()=>e(O).trim()?n().filter(H=>H.label.toLowerCase().includes(e(O).trim().toLowerCase())):n()),Z=p(()=>i()!=null?n().find(H=>H.value===i())??null:null);function ae(H){i(H.value),s(O,""),s(M,!1)}function D(){x()||(s(M,!e(M)),e(M)||s(O,""))}function q(H){H.stopPropagation(),i(null),s(O,""),s(M,!1)}function $(H){H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),D())}function X(H){e(K)&&!e(K).contains(H.target)&&(s(M,!1),s(O,""))}function R(H){H.key==="Escape"&&(s(M,!1),s(O,""))}Ce(()=>{e(M)&&e(J)&&e(J).focus()}),Ce(()=>{x()&&(s(M,!1),s(O,""))}),Ka(()=>(document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)));var F=Bs();let P;var ie=o(F);{var le=H=>{var G=ys(),C=o(G);T(()=>Q(C,r())),f(H,G)};W(ie,H=>{l()&&r()&&H(le)})}var I=d(ie,2);let ne;var _e=o(I);{var ge=H=>{var G=Cs();tt(G,C=>s(J,C),()=>e(J)),T(()=>be(G,"placeholder",r())),Je("keydown",G,R),Je("click",G,C=>C.stopPropagation()),os(G,()=>e(O),C=>s(O,C)),f(H,G)},fe=H=>{var G=Ss(),C=o(G);{var j=V=>{var ve=ks(),S=o(ve);T(()=>Q(S,r())),f(V,ve)};W(C,V=>{y()&&V(j)})}var te=d(C,1,!0);T(()=>Q(te,e(Z).label)),f(H,G)},he=H=>{var G=st(),C=ze(G);{var j=te=>{var V=zs();let ve;var S=o(V);T(()=>{ve=Ae(V,1,"field-text is-placeholder svelte-1dw55dz",null,ve,{"force-placeholder":z()}),Q(S,r())}),f(te,V)};W(C,te=>{w()&&te(j)})}f(H,G)};W(_e,H=>{e(M)?H(ge):e(Z)?H(fe,1):H(he,!1)})}var pe=d(_e,2);{var Y=H=>{var G=As(),C=o(G);T(()=>{be(C,"src",Vr),be(C,"width",g()?g():12),be(C,"height",g()?g():12)}),Je("click",G,q),f(H,G)},se=H=>{var G=Ms();let C;T(()=>{C=Ae(G,1,"icon-chevron svelte-1dw55dz",null,C,{open:e(M)}),be(G,"src",Ke),be(G,"width",g()?g():12),be(G,"height",g()?g():12)}),f(H,G)},me=H=>{var G=Es();T(()=>{be(G,"src",m()),be(G,"width",g()),be(G,"height",g())}),f(H,G)};W(pe,H=>{e(Z)&&b()&&!x()?H(Y):e(Z)?H(se,1):H(me,!1)})}var ce=d(I,2);{var A=H=>{var G=Ps(),C=o(G),j=d(o(C)),te=d(C,2);{var V=ve=>{var S=Rs(),oe=o(S);T(()=>Q(oe,v())),f(ve,S)};W(te,ve=>{v()&&ve(V)})}T(()=>Q(j,` ${e(Z).label??""}`)),f(H,G)};W(ce,H=>{e(Z)&&u()&&H(A)})}var k=d(ce,2);{var ee=H=>{var G=Ds();Ee(G,21,()=>e(B),C=>C.value,(C,j)=>{var te=js();let V;var ve=o(te);T(()=>{V=Ae(te,1,"option svelte-1dw55dz",null,V,{selected:e(j).value===i()}),be(te,"aria-selected",e(j).value===i()),Q(ve,e(j).label)}),Je("click",te,()=>ae(e(j))),f(C,te)},C=>{var j=Ls();f(C,j)}),T(()=>be(G,"id",E)),f(H,G)};W(k,H=>{e(M)&&H(ee)})}tt(F,H=>s(K,H),()=>e(K)),T(()=>{P=Ae(F,1,"autocomplete svelte-1dw55dz",null,P,{"show-placeholder-mobile":z()}),Se(F,`--field-width: ${_()??""}; --field-height: ${c()??""}`),ne=Ae(I,1,"field svelte-1dw55dz",null,ne,{open:e(M),"has-value":e(Z)&&!e(M),disabled:x()}),be(I,"tabindex",x()?-1:0),be(I,"aria-controls",E),be(I,"aria-expanded",e(M)),be(I,"aria-disabled",x())}),Je("click",I,D),Je("keydown",I,$),f(a,F),Le()}ca(["click","keydown"]);const sa="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.5%206.5L19%2012L13.5%2017.5M17.75%2012L4.75%2012'%20stroke='%231C1C1C'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/svg%3e",Da="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.6'%3e%3cpath%20d='M10.5%206.5L5%2012L10.5%2017.5M6.25%2012L19.25%2012'%20stroke='%231C1C1C'%20stroke-width='2'%20stroke-linecap='square'/%3e%3c/g%3e%3c/svg%3e";var Fs=h('<span class="bar-value svelte-7xr7wg"> </span>'),Ts=h('<div class="bar-col svelte-7xr7wg"><div class="bar-track svelte-7xr7wg"><!> <div class="bar-fill svelte-7xr7wg"></div></div> <div class="bar-label-area svelte-7xr7wg"><span class="bar-label svelte-7xr7wg"> <strong class="svelte-7xr7wg"> </strong></span></div></div>'),Os=h('<img alt="" class="flip svelte-7xr7wg"/>'),Gs=h('<img alt="" class="svelte-7xr7wg"/>'),Is=h('<img alt="" class="svelte-7xr7wg"/>'),Us=h('<img alt="" class="flip svelte-7xr7wg"/>'),Ns=h('<div class="bar-chart-footer svelte-7xr7wg"><button class="bar-chart-arrow svelte-7xr7wg" aria-label="Anterior"><!></button> <button class="bar-chart-arrow svelte-7xr7wg" aria-label="Próximo"><!></button></div>'),Vs=h('<div class="bar-chart svelte-7xr7wg"><div class="bar-chart-scroll svelte-7xr7wg" role="img" aria-label="Gráfico de barras"></div> <!></div>');const Hs={hash:"svelte-7xr7wg",code:`
|
|
35
|
+
/* ── Wrapper ──────────────────────────────── */.bar-chart.svelte-7xr7wg {display:flex;flex-direction:column;gap:4px;contain:layout;}
|
|
36
|
+
|
|
37
|
+
/* ── Scroll container ─────────────────────── */.bar-chart-scroll.svelte-7xr7wg {width:100%;display:flex;gap:16px;
|
|
38
|
+
/* padding-top gives room for bar-value above tallest bar.
|
|
39
|
+
overflow-x: auto forces overflow-y: auto (CSS spec), which would clip
|
|
40
|
+
the value label — padding prevents that. CLS = 0: total height is fixed. */padding-top:24px;height:calc(var(--track-h) + 24px);overflow-x:auto;scrollbar-width:none;border-bottom:3px solid #e5e5ea;}.bar-chart-scroll.svelte-7xr7wg::-webkit-scrollbar {display:none;}
|
|
41
|
+
|
|
42
|
+
/* ── Column ───────────────────────────────── */.bar-col.svelte-7xr7wg {flex:0 0 var(--col-w);display:flex;flex-direction:row;}
|
|
43
|
+
|
|
44
|
+
/* ── Bar track ────────────────────────────── */.bar-track.svelte-7xr7wg {flex:1;position:relative;align-self:stretch;border-bottom:1.5px solid #e5e5ea;}.bar-fill.svelte-7xr7wg {position:absolute;bottom:0;left:0;right:0;height:var(--bar-pct);background:var(--bar-color);border-radius:50px 50px 0 0;}
|
|
45
|
+
|
|
46
|
+
/* Value label — sits just above the bar top */.bar-value.svelte-7xr7wg {position:absolute;left:50%;bottom:calc(var(--bar-pct) + 6px);transform:translateX(-50%);font-size:0.8125rem;font-weight:500;color:var(--sevn-color-tertiary);white-space:nowrap;line-height:1;}
|
|
47
|
+
|
|
48
|
+
/* ── Label area — à direita da barra ─────── */.bar-label-area.svelte-7xr7wg {display:flex;align-items:flex-end;padding:0 0 6px 6px;}
|
|
49
|
+
|
|
50
|
+
/* writing-mode: vertical-rl + rotate(180deg)
|
|
51
|
+
→ characters read bottom-to-top, base on left */.bar-label.svelte-7xr7wg {writing-mode:vertical-rl;transform:rotate(180deg);font-size:0.75rem;font-weight:500;color:var(--sevn-color-tertiary);white-space:nowrap;line-height:1;}.bar-label.svelte-7xr7wg strong:where(.svelte-7xr7wg) {font-weight:700;}
|
|
52
|
+
|
|
53
|
+
/* ── Footer ───────────────────────────────── */.bar-chart-footer.svelte-7xr7wg {display:flex;justify-content:space-between;align-items:center;padding:0 2px;}.bar-chart-arrow.svelte-7xr7wg {display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;flex-shrink:0;}.bar-chart-arrow.svelte-7xr7wg:disabled {cursor:default;}.bar-chart-arrow.svelte-7xr7wg img:where(.svelte-7xr7wg) {width:24px;height:24px;display:block;}.bar-chart-arrow.svelte-7xr7wg .flip:where(.svelte-7xr7wg) {transform:scaleX(-1);}`};function xn(a,t){je(t,!0),Me(a,Hs);let r=L(t,"items",19,()=>[]),l=L(t,"unit",3,""),n=L(t,"showValues",3,!0),i=L(t,"trackHeight",3,200),v=L(t,"visibleCount",3,6),_=L(t,"colWidth",3,60);const c=p(()=>v()*_()+(v()-1)*16),m=p(()=>t.max??Math.max(...r().map(B=>B.value),1));function g(B){return`${B/e(m)*100}%`}function y(B){const Z=B.lastIndexOf(" ");return Z===-1?{prefix:"",bold:B}:{prefix:B.slice(0,Z+1),bold:B.slice(Z+1)}}let u=U(null),w=U(!1),z=U(!1);function x(){e(u)&&(s(w,e(u).scrollLeft>0),s(z,e(u).scrollLeft+e(u).clientWidth<e(u).scrollWidth-1))}Ce(()=>{if(!e(u))return;x(),e(u).addEventListener("scroll",x,{passive:!0});const B=new ResizeObserver(x);return B.observe(e(u)),()=>{e(u).removeEventListener("scroll",x),B.disconnect()}});function b(){e(u)?.scrollBy({left:-200,behavior:"smooth"})}function E(){e(u)?.scrollBy({left:200,behavior:"smooth"})}var M=Vs(),O=o(M);Ee(O,21,r,Pe,(B,Z)=>{const ae=p(()=>{const{prefix:I,bold:ne}=y(e(Z).label);return{prefix:I,bold:ne}});var D=Ts(),q=o(D),$=o(q);{var X=I=>{var ne=Fs(),_e=o(ne);T(()=>Q(_e,`${e(Z).value??""}${l()??""}`)),f(I,ne)};W($,I=>{n()&&I(X)})}var R=d(q,2),F=o(R),P=o(F),ie=d(P),le=o(ie);T(I=>{Se(D,`--bar-pct: ${I??""}; --bar-color: ${e(Z).color??""};`),Q(P,e(ae).prefix),Q(le,e(ae).bold)},[()=>g(e(Z).value)]),f(B,D)}),tt(O,B=>s(u,B),()=>e(u));var K=d(O,2);{var J=B=>{var Z=Ns(),ae=o(Z),D=o(ae);{var q=ie=>{var le=Os();T(()=>be(le,"src",sa)),f(ie,le)},$=ie=>{var le=Gs();T(()=>be(le,"src",Da)),f(ie,le)};W(D,ie=>{e(w)?ie(q):ie($,!1)})}var X=d(ae,2),R=o(X);{var F=ie=>{var le=Is();T(()=>be(le,"src",sa)),f(ie,le)},P=ie=>{var le=Us();T(()=>be(le,"src",Da)),f(ie,le)};W(R,ie=>{e(z)?ie(F):ie(P,!1)})}T(()=>{ae.disabled=!e(w),X.disabled=!e(z)}),Je("click",ae,b),Je("click",X,E),f(B,Z)};W(K,B=>{r().length>v()&&B(J)})}T(()=>Se(M,`--track-h: ${i()??""}px; --col-w: ${_()??""}px; width: ${e(c)??""}px;`)),f(a,M),Le()}ca(["click"]);var Ws=h("<span> </span>");const Js={hash:"svelte-pamnib",code:".tag.svelte-pamnib {display:inline-flex;align-items:center;padding:4px 8px;border-radius:5px;font-family:inherit;font-weight:700;color:#ffffff;white-space:nowrap;letter-spacing:0.03em;width:fit-content;}"};function nt(a,t){Me(a,Js);let r=L(t,"color",3,"#1C1C1C"),l=L(t,"fontSize",3,"0.6875rem"),n=L(t,"class",3,"");var i=Ws(),v=o(i);T(()=>{Ae(i,1,`tag ${n()??""}`,"svelte-pamnib"),Se(i,`background-color: ${r()??""}; font-size: ${l()??""}`),Q(v,t.label)}),f(a,i)}var Ks=h('<p class="candidate-description svelte-q1jzvs"> </p>'),Xs=h('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),Ys=h('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),Zs=h('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),Qs=h('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),$s=h('<div class="candidate-wrapper svelte-q1jzvs"><!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div></div>'),ei=h('<p class="candidate-description svelte-q1jzvs"> </p>'),ti=h('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),ai=h('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),ri=h('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),oi=h('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),ni=h('<!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div>',1),li=h("<span> </span>"),si=h('<div class="candidate svelte-q1jzvs"><!> <!></div>');const ii={hash:"svelte-q1jzvs",code:`.candidate.svelte-q1jzvs {display:flex;align-items:center;justify-content:space-between;}.candidate-wrapper.svelte-q1jzvs {display:flex;align-items:center;gap:15px;}.candidate-info.svelte-q1jzvs {display:flex;flex-direction:column;gap:2px;}
|
|
54
|
+
|
|
55
|
+
/* Desktop: description on the right inside the info block */.candidate-info.right.svelte-q1jzvs {flex:1;flex-direction:row;flex-wrap:wrap;align-items:center;}.candidate-info.right.svelte-q1jzvs .candidate-description:where(.svelte-q1jzvs) {margin-left:auto;flex-shrink:0;}.candidate-name-row.svelte-q1jzvs {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}.candidate-name.svelte-q1jzvs {font-size:var(--font-name);font-weight:var(--weight-name);color:var(--sevn-color-tertiary);line-height:1.2;}.candidate-description.svelte-q1jzvs {font-size:var(--font-desc);font-weight:var(--weight-desc);color:var(--sevn-color-tertiary);opacity:0.7;}.candidate-position.svelte-q1jzvs {font-size:var(--font-position);font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;flex-shrink:0;margin-left:auto;}.candidate-position.left.svelte-q1jzvs {order:-1;margin-left:0;}
|
|
56
|
+
|
|
57
|
+
/* ── Stats ─────────────────────────────── */.candidate-stats.svelte-q1jzvs {display:flex;flex-direction:column;gap:4px;align-items:baseline;flex-shrink:0;}.candidate-stats-percent.svelte-q1jzvs {font-size:1rem;font-weight:700;color:var(--sevn-color-tertiary);line-height:1.2;}.candidate-stats-votes.svelte-q1jzvs {font-size:var(--font-desc);font-weight:400;color:var(--sevn-color-tertiary);opacity:0.7;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:inline;margin-left:4px;}
|
|
58
|
+
|
|
59
|
+
@media (min-width: 768px) {.candidate-stats.svelte-q1jzvs {flex-direction:row;gap:8px;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:none;}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (max-width: 640px) {.candidate.svelte-q1jzvs {flex:1;flex-wrap:wrap;align-items:center;}.candidate-info.svelte-q1jzvs {flex:1;}
|
|
63
|
+
|
|
64
|
+
/* Mobile: description keeps right alignment */.candidate-info.right.svelte-q1jzvs {flex-direction:row;align-items:center;}.candidate-position.svelte-q1jzvs {order:3;margin-left:auto;}.candidate-position.left.svelte-q1jzvs {order:-1;margin-left:0;}
|
|
65
|
+
}`};function bt(a,t){Me(a,ii);let r=L(t,"avatar",3,"man"),l=L(t,"elected",3,!1),n=L(t,"electedLabel",3,"ELEITO"),i=L(t,"electedColor",3,"var(--sevn-color-green)"),v=L(t,"descriptionSide",3,"inline"),_=L(t,"positionSide",3,"right"),c=L(t,"size",3,"md"),m=L(t,"nameWeight",3,700),g=L(t,"descWeight",3,400),y=L(t,"wrapper",3,!1);const u={sm:{fontSize:"0.875rem",descSize:"0.75rem",tagSize:"0.625rem"},md:{fontSize:"1.125rem",descSize:"0.875rem",tagSize:"0.6875rem"},lg:{fontSize:"1.375rem",descSize:"1rem",tagSize:"0.75rem"}},w=p(()=>u[c()]??u.md);var z=si(),x=o(z);{var b=K=>{var J=$s(),B=o(J);mt(B,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return r()},get avatarColor(){return t.avatarColor},get size(){return c()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var Z=d(B,2);let ae;var D=o(Z),q=o(D),$=o(q),X=d(q,2);{var R=ne=>{{let _e=p(()=>t.tagColor??"var(--sevn-color-secondary)"),ge=p(()=>t.tagSize??e(w).tagSize);nt(ne,{get label(){return t.tag},get color(){return e(_e)},get fontSize(){return e(ge)}})}};W(X,ne=>{t.tag&&ne(R)})}var F=d(X,2);{var P=ne=>{{let _e=p(()=>t.tagSize??e(w).tagSize);nt(ne,{get label(){return n()},get color(){return i()},get fontSize(){return e(_e)}})}};W(F,ne=>{l()&&ne(P)})}var ie=d(D,2);{var le=ne=>{var _e=Ks(),ge=o(_e);T(()=>Q(ge,t.description)),f(ne,_e)},I=ne=>{var _e=Qs(),ge=o(_e);{var fe=Y=>{var se=Ys(),me=o(se),ce=d(me);{var A=k=>{var ee=Xs(),H=o(ee);T(()=>Q(H,t.percentSuffix)),f(k,ee)};W(ce,k=>{t.percentSuffix&&k(A)})}T(()=>Q(me,`${t.percent??""} `)),f(Y,se)};W(ge,Y=>{t.percent&&Y(fe)})}var he=d(ge,2);{var pe=Y=>{var se=Zs(),me=o(se);T(()=>Q(me,t.votes)),f(Y,se)};W(he,Y=>{t.votes&&Y(pe)})}f(ne,_e)};W(ie,ne=>{t.description?ne(le):(t.percent||t.votes)&&ne(I,1)})}T(()=>{ae=Ae(Z,1,"candidate-info svelte-q1jzvs",null,ae,{right:v()==="right"&&!!t.description}),Q($,t.name)}),f(K,J)},E=K=>{var J=ni(),B=ze(J);mt(B,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return r()},get avatarColor(){return t.avatarColor},get size(){return c()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var Z=d(B,2);let ae;var D=o(Z),q=o(D),$=o(q),X=d(q,2);{var R=ne=>{{let _e=p(()=>t.tagColor??"var(--sevn-color-secondary)"),ge=p(()=>t.tagSize??e(w).tagSize);nt(ne,{get label(){return t.tag},get color(){return e(_e)},get fontSize(){return e(ge)}})}};W(X,ne=>{t.tag&&ne(R)})}var F=d(X,2);{var P=ne=>{{let _e=p(()=>t.tagSize??e(w).tagSize);nt(ne,{get label(){return n()},get color(){return i()},get fontSize(){return e(_e)}})}};W(F,ne=>{l()&&ne(P)})}var ie=d(D,2);{var le=ne=>{var _e=ei(),ge=o(_e);T(()=>Q(ge,t.description)),f(ne,_e)},I=ne=>{var _e=oi(),ge=o(_e);{var fe=Y=>{var se=ai(),me=o(se),ce=d(me);{var A=k=>{var ee=ti(),H=o(ee);T(()=>Q(H,t.percentSuffix)),f(k,ee)};W(ce,k=>{t.percentSuffix&&k(A)})}T(()=>Q(me,`${t.percent??""} `)),f(Y,se)};W(ge,Y=>{t.percent&&Y(fe)})}var he=d(ge,2);{var pe=Y=>{var se=ri(),me=o(se);T(()=>Q(me,t.votes)),f(Y,se)};W(he,Y=>{t.votes&&Y(pe)})}f(ne,_e)};W(ie,ne=>{t.description?ne(le):(t.percent||t.votes)&&ne(I,1)})}T(()=>{ae=Ae(Z,1,"candidate-info svelte-q1jzvs",null,ae,{right:v()==="right"&&!!t.description}),Q($,t.name)}),f(K,J)};W(x,K=>{y()?K(b):K(E,!1)})}var M=d(x,2);{var O=K=>{var J=li();let B;var Z=o(J);T(()=>{B=Ae(J,1,"candidate-position svelte-q1jzvs",null,B,{left:_()==="left"}),Q(Z,t.position)}),f(K,J)};W(M,K=>{t.position&&K(O)})}T(()=>Se(z,`
|
|
66
|
+
--font-name: ${t.fontSize??e(w).fontSize??""};
|
|
67
|
+
--font-desc: ${t.descSize??e(w).descSize??""};
|
|
68
|
+
--font-tag: ${t.tagSize??e(w).tagSize??""};
|
|
69
|
+
--font-position: ${t.positionSize??e(w).fontSize??""};
|
|
70
|
+
--weight-name: ${m()??""};
|
|
71
|
+
--weight-desc: ${g()??""};
|
|
72
|
+
gap: ${y()?"10px":"18px"};
|
|
73
|
+
`)),f(a,z)}var di=h('<div class="candidate-count-percent-info-candidate svelte-1tb8av1"><div class="candidate-count-percent-row-top svelte-1tb8av1"><span class="candidate-count-percent-name svelte-1tb8av1"> <span class="candidate-count-percent-political-party svelte-1tb8av1"> </span></span> <span class="candidate-count-percent-percent svelte-1tb8av1"> </span></div> <div class="candidate-count-percent-votes svelte-1tb8av1"> </div> <div class="candidate-count-percent-bar-track svelte-1tb8av1"></div></div>'),vi=h('<div class="candidate-count-percent-card svelte-1tb8av1"></div>');const ci={hash:"svelte-1tb8av1",code:".candidate-count-percent-card.svelte-1tb8av1 {background-color:var(--sevn-color-neutral);border-radius:12px;padding:16px 20px;display:flex;flex-direction:column;gap:0;max-width:284px;box-shadow:0 2px 12px #00000020;}.candidate-count-percent-info-candidate.svelte-1tb8av1 {display:flex;flex-direction:column;gap:4px;margin:12px 0;}.candidate-count-percent-row-top.svelte-1tb8av1 {display:flex;justify-content:space-between;align-items:baseline;gap:8px;}.candidate-count-percent-name.svelte-1tb8av1 {font-size:0.95rem;font-weight:400;color:var(--sevn-color-tertiary);white-space:nowrap;}.candidate-count-percent-political-party.svelte-1tb8av1 {font-weight:400;color:#777;margin-left:4px;}.candidate-count-percent-percent.svelte-1tb8av1 {font-size:1rem;font-weight:400;color:#777;white-space:nowrap;}.candidate-count-percent-votes.svelte-1tb8av1 {font-size:0.8rem;font-weight:600;color:#777;text-align:right;}.candidate-count-percent-bar-track.svelte-1tb8av1 {width:100%;height:24px;border-radius:999px;overflow:hidden;margin-top:2px;}"};function ui(a,t){Me(a,ci);function r(i){return i.toLocaleString("pt-BR")}function l(i){return i.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%"}var n=vi();Ee(n,21,()=>t.candidates,Pe,(i,v)=>{var _=di(),c=o(_),m=o(c),g=o(m),y=d(g),u=o(y),w=d(m,2),z=o(w),x=d(c,2),b=o(x),E=d(x,2);T((M,O)=>{Q(g,`${e(v).name??""} `),Q(u,e(v).acronym),Q(z,M),Q(b,`${O??""} votos`),Se(E,`background-color: ${e(v).color??""};`)},[()=>l(e(v).percent),()=>r(e(v).votes)]),f(i,_)}),f(a,n)}var pi=h('<div class="candidate-list-item svelte-vjp3fo"><div class="candidate-list-row svelte-vjp3fo"><span class="candidate-list-position svelte-vjp3fo"> </span> <!> <span class="candidate-list-number svelte-vjp3fo"> </span> <span class="candidate-list-votes svelte-vjp3fo"> </span></div> <div class="candidate-list-card-mobile svelte-vjp3fo"><span class="candidate-list-number-label svelte-vjp3fo"> </span> <!></div></div>'),_i=h(' <span class="candidate-list-more-count svelte-vjp3fo"> </span>',1),fi=h('<button class="candidate-list-more svelte-vjp3fo" type="button"><!></button>'),mi=h('<div class="candidate-list svelte-vjp3fo"><!> <!></div>');const gi={hash:"svelte-vjp3fo",code:`.candidate-list.svelte-vjp3fo {display:flex;flex-direction:column;}.candidate-list-more.svelte-vjp3fo {align-self:stretch;margin-top:16px;padding:10px 20px;background:none;border:1px solid var(--sevn-color-neutral);border-radius:8px;cursor:pointer;font-family:inherit;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);transition:background 0.15s, border-color 0.15s;}.candidate-list-more.svelte-vjp3fo:hover,
|
|
74
|
+
.candidate-list-more.svelte-vjp3fo:focus-visible {background:var(--sevn-color-neutral);border-color:#d1d1d6;}.candidate-list-more-count.svelte-vjp3fo {font-weight:400;opacity:0.55;}
|
|
75
|
+
|
|
76
|
+
/* ── Mobile (default) ─────────────────── */.candidate-list-row.svelte-vjp3fo {display:none;}.candidate-list-card-mobile.svelte-vjp3fo {display:flex;flex-direction:column;gap:6px;padding:16px 0;}.candidate-list-item.svelte-vjp3fo:not(:last-child) .candidate-list-card-mobile:where(.svelte-vjp3fo) {border-bottom:1px solid var(--sevn-color-neutral);}.candidate-list-number-label.svelte-vjp3fo {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:10px;opacity:0.5;}
|
|
77
|
+
|
|
78
|
+
/* ── Desktop ──────────────────────────── */
|
|
79
|
+
@media (min-width: 768px) {.candidate-list-card-mobile.svelte-vjp3fo {display:none;}.candidate-list-row.svelte-vjp3fo {display:grid;grid-template-columns:100px 1fr auto auto;align-items:center;column-gap:24px;padding:20px 0;}.candidate-list-item.svelte-vjp3fo:not(:last-child) .candidate-list-row:where(.svelte-vjp3fo) {border-bottom:1px solid var(--sevn-color-neutral);}.candidate-list-position.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;}.candidate-list-number.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.55;white-space:nowrap;}.candidate-list-votes.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.55;white-space:nowrap;min-width:190px;text-align:right;}.candidate-list.svelte-vjp3fo .candidate {justify-content:flex-start;}
|
|
80
|
+
}`};function bi(a,t){je(t,!0),Me(a,gi);let r=L(t,"candidates",19,()=>[]),l=L(t,"itemsPerPage",3,10),n=L(t,"showMoreLabel",3,"Ver mais"),i=L(t,"showLessLabel",3,"Ver menos"),v=U(1);Ce(()=>{r(),l(),s(v,1)});const _=p(()=>l()>0&&r().length>l()),c=p(()=>e(_)?r().slice(0,e(v)*l()):r()),m=p(()=>r().length-e(c).length),g=p(()=>e(_)&&e(m)===0);var y=mi(),u=o(y);Ee(u,17,()=>e(c),Pe,(x,b)=>{var E=pi(),M=o(E),O=o(M),K=o(O),J=d(O,2);{let F=p(()=>e(b).avatar??"man");bt(J,{get name(){return e(b).name},get photoUrl(){return e(b).photoUrl},get avatar(){return e(F)},get avatarColor(){return e(b).avatarColor},get tag(){return e(b).tag},get tagColor(){return e(b).tagColor},get elected(){return e(b).elected},size:"md"})}var B=d(J,2),Z=o(B),ae=d(B,2),D=o(ae),q=d(M,2),$=o(q),X=o($),R=d($,2);{let F=p(()=>e(b).avatar??"man");bt(R,{get name(){return e(b).name},get photoUrl(){return e(b).photoUrl},get avatar(){return e(F)},get avatarColor(){return e(b).avatarColor},get tag(){return e(b).tag},get tagColor(){return e(b).tagColor},get elected(){return e(b).elected},get description(){return e(b).votes},get position(){return e(b).position},positionSide:"right",size:"sm"})}T(()=>{Q(K,e(b).position),Q(Z,`Nº ${e(b).number??""}`),Q(D,e(b).votes),Q(X,`Nº ${e(b).number??""}`)}),f(x,E)});var w=d(u,2);{var z=x=>{var b=fi(),E=o(b);{var M=K=>{var J=Yt();T(()=>Q(J,i())),f(K,J)},O=K=>{var J=_i(),B=ze(J),Z=d(B),ae=o(Z);T(()=>{Q(B,`${n()??""} `),Q(ae,`(${e(m)??""})`)}),f(K,J)};W(E,K=>{e(g)?K(M):K(O,!1)})}Je("click",b,()=>s(v,e(g)?1:e(v)+1,!0)),f(x,b)};W(w,x=>{e(_)&&x(z)})}f(a,y),Le()}ca(["click"]);var hi=h("<span> </span>"),xi=h('<div class="vote-overview-stats svelte-1m9ufac"></div>'),wi=h("<span> </span>"),yi=h('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Ci=h("<span> </span>"),ki=h('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),Si=h('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const zi={hash:"svelte-1m9ufac",code:".vote-overview.svelte-1m9ufac {display:flex;align-items:center;padding:0.5rem 1rem;font-size:0.8rem;color:#1c1c1c;gap:1rem;flex-wrap:wrap;opacity:50%;}.vote-overview-stats.svelte-1m9ufac {display:flex;align-items:center;gap:1.5rem;font-weight:600;}.vote-overview-meta.svelte-1m9ufac {display:flex;align-items:center;gap:0.4rem;font-weight:400;white-space:nowrap;}.vote-overview-sep.svelte-1m9ufac {opacity:0.4;}"};function ia(a,t){je(t,!0),Me(a,zi);let r=L(t,"data",19,()=>[]),l=L(t,"borderTop",3,!1),n=L(t,"align",3,"start");var i=Si(),v=o(i);{var _=g=>{var y=xi();Ee(y,21,r,Pe,(u,w)=>{var z=hi(),x=o(z);T(()=>Q(x,`${e(w).text??""} ${e(w).value??""}`)),f(u,z)}),f(g,y)};W(v,g=>{r().length&&g(_)})}var c=d(v,2);{var m=g=>{var y=ki(),u=o(y);{var w=M=>{var O=wi(),K=o(O);T(()=>Q(K,`Atualizado em ${t.date??""}`)),f(M,O)};W(u,M=>{t.date&&M(w)})}var z=d(u,2);{var x=M=>{var O=yi();f(M,O)};W(z,M=>{t.date&&t.font&&M(x)})}var b=d(z,2);{var E=M=>{var O=Ci(),K=o(O);T(()=>Q(K,`Fonte ${t.font??""}`)),f(M,O)};W(b,M=>{t.font&&M(E)})}f(g,y)};W(c,g=>{(t.date||t.font)&&g(m)})}T(()=>Se(i,`justify-content:${n()==="end"?"flex-end":"flex-start"};${l()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),f(a,i),Le()}function Hr(a,t){return`${typeof a=="number"&&Number.isFinite(a)&&a>0?a:t+1}º lugar`}var Ai=h('<div class="bar-seg svelte-10dw06o"></div>'),Mi=h('<div class="candidate-percentage-layout duel svelte-10dw06o"><div class="duel-candidates svelte-10dw06o"><!> <div class="duel-center svelte-10dw06o"><div class="duel-infos-row svelte-10dw06o"><div class="duel-info svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-info right svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-dual svelte-10dw06o"></div> <!></div> <!></div></div>'),Ei=h('<span class="divisor svelte-10dw06o" style="margin-left: 5px;">|</span>'),Ri=h('<span class="name svelte-10dw06o"><span class="acronym svelte-10dw06o"> </span> </span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span>',1),Pi=h('<span class="votes svelte-10dw06o"> </span> <span class="percent svelte-10dw06o"> </span> <span class="name svelte-10dw06o"><span class="divisor svelte-10dw06o" style="margin-right: 5px;">|</span> <span class="acronym svelte-10dw06o"> </span> </span>',1),ji=h('<div class="bar-seg svelte-10dw06o"></div>'),Li=h('<div class="bar-dual svelte-10dw06o"></div>'),Di=h('<div class="bar-seg svelte-10dw06o"></div>'),Bi=h('<div class="bar-dual svelte-10dw06o"></div>'),qi=h('<div class="candidate-percentage-layout duel-compact svelte-10dw06o"><div class="duel-compact-candidates svelte-10dw06o"><!> <div class="duel-compact-info-wrapper svelte-10dw06o"><div class="duel-compact-info-row svelte-10dw06o"><div class="duel-compact-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <!></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div> <div class="duel-compact-info right svelte-10dw06o"><!> <!></div></div> <!></div> <!></div> <!> <!></div>'),Fi=h('<p class="meta svelte-10dw06o"><!><!></p>'),Ti=h('<div class="stack-item svelte-10dw06o"><div class="stack-header svelte-10dw06o"><!> <div class="stack-info svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> <span class="percent-label svelte-10dw06o">dos votos válidos</span></span> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <span class="votes stack-votes svelte-10dw06o"> </span> <!></div></div></div>'),Oi=h('<div class="candidate-percentage-layout stack svelte-10dw06o"></div>'),Gi=h('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),Ii=h('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),Ui=h('<span class="compact-stat svelte-10dw06o"><span class="compact-stat-text svelte-10dw06o"> </span> <span class="compact-stat-text svelte-10dw06o"> </span></span>'),Ni=h('<div class="compact-bottom svelte-10dw06o"><div class="bar-track compact-bar svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <div class="compact-stats svelte-10dw06o"></div></div>'),Vi=h("<span> </span>"),Hi=h('<span class="compact-sep svelte-10dw06o">|</span>'),Wi=h("<span> </span>"),Ji=h('<div class="compact-meta svelte-10dw06o"><!> <!> <!></div>'),Ki=h('<div class="compact-row svelte-10dw06o"><!> <div class="compact-content svelte-10dw06o"><div class="compact-top svelte-10dw06o"><span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span> <span class="divisor svelte-10dw06o">|</span></span> <span class="percent compact-percent svelte-10dw06o"> </span> <span class="votes compact-votes svelte-10dw06o"> </span></div> <!></div></div> <!> <!>',1),Xi=h('<p class="meta svelte-10dw06o"><!><!></p>'),Yi=h('<div class="compact-row svelte-10dw06o"><div class="compact-left svelte-10dw06o"><!> <span class="name svelte-10dw06o"> <span class="acronym svelte-10dw06o"> </span></span> <span class="percent svelte-10dw06o"> </span> <span class="votes svelte-10dw06o"> </span></div></div> <div class="bar-track svelte-10dw06o"><div class="bar-fill svelte-10dw06o"></div></div> <!>',1),Zi=h('<div class="candidate-percentage-layout compact svelte-10dw06o"><!></div>');const Qi={hash:"svelte-10dw06o",code:`.candidate-percentage-layout.svelte-10dw06o {display:flex;flex-direction:column;gap:10px;}
|
|
81
|
+
|
|
82
|
+
/* ─── DUEL ──────────────────────────────── */.duel-candidates.svelte-10dw06o {display:flex;align-items:flex-start;gap:14px;}.duel-center.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:10px;min-width:0;}.duel-center.svelte-10dw06o .vote-overview {padding:10px 0;}.duel-infos-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:flex-start;gap:16px;}.duel-info.svelte-10dw06o {display:flex;flex-direction:column;gap:2px;}.duel-info.right.svelte-10dw06o {text-align:right;}
|
|
83
|
+
|
|
84
|
+
/* ─── STACK ─────────────────────────────── */.stack.svelte-10dw06o {gap:24px;}.stack-item.svelte-10dw06o {display:flex;flex-direction:column;gap:8px;}.stack-header.svelte-10dw06o {display:flex;align-items:center;gap:14px;padding-bottom:12px; /* espaço para a tag do avatar */}.stack-info.svelte-10dw06o {display:flex;flex-direction:column;align-items:flex-start;gap:2px;}.stack-info.svelte-10dw06o .position-tag {margin-bottom:6px;}.stack-votes.svelte-10dw06o {margin-top:5px;margin-bottom:5px;}.percent-label.svelte-10dw06o {font-size:0.75em;font-weight:400;opacity:0.65;}
|
|
85
|
+
|
|
86
|
+
/* ─── DUEL-COMPACT ─────────────────────── */.duel-compact-candidates.svelte-10dw06o {display:flex;align-items:center;gap:10px;}.duel-compact-info-wrapper.svelte-10dw06o {flex:1;display:flex;flex-direction:column;gap:8px;min-width:0;}.duel-compact-info-row.svelte-10dw06o {display:flex;justify-content:space-between;align-items:center;gap:8px;}.duel-compact-info.svelte-10dw06o {display:flex;min-width:0;}.duel-compact-info.right.svelte-10dw06o {text-align:right;}.duel-compact-info.svelte-10dw06o .position-tag {align-self:flex-start;margin-bottom:4px;}.duel-compact-info.right.svelte-10dw06o .position-tag {align-self:flex-end;}.duel-compact.svelte-10dw06o .vote-overview {padding:10px 0;}
|
|
87
|
+
|
|
88
|
+
/* ─── COMPACT WITH OVERVIEW ────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--sevn-color-neutral);padding-bottom:15px;}.compact-content.svelte-10dw06o {flex:1;display:flex;flex-direction:column;min-width:0;}.compact-top.svelte-10dw06o {display:flex;align-items:baseline;gap:8px;}.compact-bottom.svelte-10dw06o {display:flex;align-items:center;gap:12px;}.compact-bar.svelte-10dw06o {flex:1;min-width:60px;width:auto;}.compact-stats.svelte-10dw06o {display:flex;align-items:center;gap:14px;flex-shrink:0;}.compact-stat.svelte-10dw06o {display:flex;align-items:center;gap:4px;font-size:0.75rem;color:var(--sevn-color-tertiary);}.compact-stat-text.svelte-10dw06o {opacity:50%;font-weight:600;}.compact-meta.svelte-10dw06o {display:none;}
|
|
89
|
+
|
|
90
|
+
/* ─── COMPACT ───────────────────────────── */.compact-row.svelte-10dw06o {display:flex;align-items:center;justify-content:space-between;gap:8px;}.compact-left.svelte-10dw06o {display:flex;align-items:center;gap:8px;min-width:0;}
|
|
91
|
+
|
|
92
|
+
/* ─── BARRAS ────────────────────────────── */.bar-dual.svelte-10dw06o {position:relative;height:var(--bar-height);border-radius:999px;overflow:hidden;background-color:#e0e0e0;}.bar-seg.svelte-10dw06o {position:absolute;top:0;left:0;height:100%;border-radius:999px;}.bar-track.svelte-10dw06o {width:100%;height:var(--bar-height);background-color:#e0e0e0;border-radius:999px;overflow:hidden;margin-top:5px;}.bar-fill.svelte-10dw06o {height:100%;border-radius:999px;}
|
|
93
|
+
|
|
94
|
+
/* ─── TIPOGRAFIA ────────────────────────── */.name.svelte-10dw06o {font-size:var(--name-size);color:var(--sevn-color-tertiary);line-height:1.3;white-space:nowrap;}.acronym.svelte-10dw06o {font-size:var(--name-size);font-weight:400;opacity:0.55;margin-left:4px;}.divisor.svelte-10dw06o {opacity:0.2;}.percent.svelte-10dw06o {font-size:var(--percent-size);font-weight:700;color:var(--sevn-color-tertiary);line-height:1.1;white-space:nowrap;}.votes.svelte-10dw06o {font-size:var(--votes-size);color:var(--sevn-color-tertiary);font-weight:600;opacity:0.65;white-space:nowrap;opacity:50%;}
|
|
95
|
+
|
|
96
|
+
/* ─── META ──────────────────────────────── */.meta.svelte-10dw06o {font-size:0.72rem;color:var(--sevn-color-tertiary);opacity:0.55;}
|
|
97
|
+
|
|
98
|
+
/* ─── RESPONSIVO MOBILE ─────────────────── */
|
|
99
|
+
@media (max-width: 480px) {
|
|
100
|
+
/* ── duel ── */.duel-candidates.svelte-10dw06o {gap:8px;}.duel-info.svelte-10dw06o {min-width:0;}.name.svelte-10dw06o {white-space:normal;word-break:break-word;}.percent.svelte-10dw06o {font-size:calc(var(--percent-size) * 0.8);}.votes.svelte-10dw06o {white-space:normal;}
|
|
101
|
+
|
|
102
|
+
/* ── duel-compact ── */.duel-compact-candidates.svelte-10dw06o {gap:6px;}.duel-compact-info-wrapper.svelte-10dw06o {gap:6px;}.duel-compact-info.svelte-10dw06o .name:where(.svelte-10dw06o),
|
|
103
|
+
.duel-compact-info.svelte-10dw06o .percent:where(.svelte-10dw06o),
|
|
104
|
+
.duel-compact-info.svelte-10dw06o .votes:where(.svelte-10dw06o) {white-space:normal;word-break:break-word;}.duel-compact.svelte-10dw06o .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.duel-compact.svelte-10dw06o .vote-overview .vote-overview-stats {gap:8px;}
|
|
105
|
+
|
|
106
|
+
/* ── compact with overview ── */.compact-row.svelte-10dw06o {align-items:flex-start;}.compact-top.svelte-10dw06o {flex-direction:column;align-items:flex-start;gap:2px;}.compact-percent.svelte-10dw06o {font-size:1.15rem;font-weight:800 !important;color:var(--sevn-color-tertiary);line-height:1;}.compact-votes.svelte-10dw06o {font-size:0.675rem;margin-top:2px;}.compact-bottom.svelte-10dw06o {flex-direction:column;align-items:stretch;gap:6px;}.compact-bar.svelte-10dw06o {flex:none;width:100%;height:8px;}.compact-stats.svelte-10dw06o {flex-wrap:wrap;gap:6px 10px;}.compact-meta.svelte-10dw06o {display:flex;align-items:center;gap:0.4rem;font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;flex-wrap:wrap;opacity:50%;}.compact-sep.svelte-10dw06o {opacity:0.4;}
|
|
107
|
+
}`};function da(a,t){je(t,!0),Me(a,Qi);let r=L(t,"layout",3,"duel"),l=L(t,"duelCompactInfoDirection",3,"column"),n=L(t,"overviewAlign",3,"start"),i=L(t,"showPosition",3,!1);const v=(q,$)=>Hr(q.position,$),_=q=>t.positionTagColor??q.color,c={duel:{percentSize:"1.75rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},"duel-compact":{percentSize:"1rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"12px"},stack:{percentSize:"1.5rem",nameSize:"0.875rem",votesSize:"0.75rem",avatarSize:"lg",barHeight:"10px"},compact:{percentSize:"0.875rem",nameSize:"0.8rem",votesSize:"0.75rem",avatarSize:"sm",barHeight:"8px"}},m=p(()=>c[r()]??c.duel),g=p(()=>t.percentSize??e(m).percentSize),y=p(()=>t.nameSize??e(m).nameSize),u=p(()=>t.votesSize??e(m).votesSize),w=p(()=>t.avatarSize??e(m).avatarSize),z=p(()=>t.barHeight??e(m).barHeight),x=p(()=>!!t.overviewData?.length),b=p(()=>!!t.date||!!t.font);let E=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const q=window.matchMedia("(max-width: 480px)");s(E,q.matches,!0);const $=X=>{s(E,X.matches,!0)};return q.addEventListener("change",$),()=>q.removeEventListener("change",$)});function M(q){return q.toLocaleString("pt-BR")}function O(q){return q.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%"}var K=st(),J=ze(K);{var B=q=>{var $=Mi(),X=o($),R=o(X);{let ve=p(()=>t.candidates[0].avatar??"man");mt(R,{get name(){return t.candidates[0].name},get photoUrl(){return t.candidates[0].photoUrl},get avatar(){return e(ve)},get avatarColor(){return t.candidates[0].color},get size(){return e(w)},get tag(){return t.candidates[0].avatarTag},get tagColor(){return t.candidates[0].avatarTagColor}})}var F=d(R,2),P=o(F),ie=o(P),le=o(ie),I=o(le),ne=d(I),_e=o(ne),ge=d(le,2),fe=o(ge),he=d(ge,2),pe=o(he),Y=d(ie,2),se=o(Y),me=o(se),ce=d(me),A=o(ce),k=d(se,2),ee=o(k),H=d(k,2),G=o(H),C=d(P,2);Ee(C,21,()=>t.candidates,Pe,(ve,S,oe)=>{var N=Ai();T(()=>Se(N,`width:calc(${e(S).percent??""}% - 2px);${oe===0?"left:0;":"left:auto;right:0;"}background-color:${e(S).color??""};`)),f(ve,N)});var j=d(C,2);{var te=ve=>{ia(ve,{get data(){return t.overviewData},get date(){return t.date},get font(){return t.font},get align(){return n()}})};W(j,ve=>{(e(x)||e(b))&&ve(te)})}var V=d(F,2);{let ve=p(()=>t.candidates[1].avatar??"man");mt(V,{get name(){return t.candidates[1].name},get photoUrl(){return t.candidates[1].photoUrl},get avatar(){return e(ve)},get avatarColor(){return t.candidates[1].color},get size(){return e(w)},get tag(){return t.candidates[1].avatarTag},get tagColor(){return t.candidates[1].avatarTagColor}})}T((ve,S,oe,N)=>{Se($,`--percent-size:${e(g)??""};--name-size:${e(y)??""};--votes-size:${e(u)??""};--bar-height:${e(z)??""};`),Q(I,`${t.candidates[0].name??""} `),Q(_e,t.candidates[0].acronym),Q(fe,ve),Q(pe,`${S??""} votos`),Q(me,`${t.candidates[1].name??""} `),Q(A,t.candidates[1].acronym),Q(ee,oe),Q(G,`${N??""} votos`)},[()=>O(t.candidates[0].percent),()=>M(t.candidates[0].votes),()=>O(t.candidates[1].percent),()=>M(t.candidates[1].votes)]),f(q,$)},Z=q=>{var $=qi(),X=o($),R=o(X);{let re=p(()=>t.candidates[0].avatar??"man");mt(R,{get name(){return t.candidates[0].name},get photoUrl(){return t.candidates[0].photoUrl},get avatar(){return e(re)},get avatarColor(){return t.candidates[0].color},get size(){return e(w)},get tag(){return t.candidates[0].avatarTag},get tagColor(){return t.candidates[0].avatarTagColor}})}var F=d(R,2),P=o(F),ie=o(P),le=o(ie);{var I=re=>{{let ue=p(()=>v(t.candidates[0],0)),xe=p(()=>_(t.candidates[0]));nt(re,{get label(){return e(ue)},get color(){return e(xe)},class:"position-tag"})}};W(le,re=>{i()&&re(I)})}var ne=d(le,2),_e=o(ne),ge=d(_e),fe=o(ge),he=d(ge,2);{var pe=re=>{var ue=Ei();f(re,ue)};W(he,re=>{e(E)||re(pe)})}var Y=d(ne,2),se=o(Y),me=d(Y,2),ce=o(me),A=d(ie,2),k=o(A);{var ee=re=>{{let ue=p(()=>v(t.candidates[1],1)),xe=p(()=>_(t.candidates[1]));nt(re,{get label(){return e(ue)},get color(){return e(xe)},class:"position-tag"})}};W(k,re=>{i()&&re(ee)})}var H=d(k,2);{var G=re=>{var ue=Ri(),xe=ze(ue),we=o(xe),de=o(we),ye=d(we),ke=d(xe,2),De=o(ke),Ie=d(ke,2),$e=o(Ie);T((Ze,Te)=>{Q(de,t.candidates[1].acronym),Q(ye,` ${t.candidates[1].name??""}`),Q(De,Ze),Q($e,`${Te??""} votos`)},[()=>O(t.candidates[1].percent),()=>M(t.candidates[1].votes)]),f(re,ue)},C=re=>{var ue=Pi(),xe=ze(ue),we=o(xe),de=d(xe,2),ye=o(de),ke=d(de,2),De=d(o(ke),2),Ie=o(De),$e=d(De);T((Ze,Te)=>{Q(we,`${Ze??""} votos`),Q(ye,Te),Q(Ie,t.candidates[1].acronym),Q($e,` ${t.candidates[1].name??""}`)},[()=>M(t.candidates[1].votes),()=>O(t.candidates[1].percent)]),f(re,ue)};W(H,re=>{e(E)?re(G):re(C,!1)})}var j=d(P,2);{var te=re=>{var ue=Li();Ee(ue,21,()=>t.candidates,Pe,(xe,we,de)=>{var ye=ji();T(()=>Se(ye,`width:calc(${e(we).percent??""}% - 2px);${de===0?"left:0;":"left:auto;right:0;"}background-color:${e(we).color??""};`)),f(xe,ye)}),f(re,ue)};W(j,re=>{l()==="row"&&re(te)})}var V=d(F,2);{let re=p(()=>t.candidates[1].avatar??"man");mt(V,{get name(){return t.candidates[1].name},get photoUrl(){return t.candidates[1].photoUrl},get avatar(){return e(re)},get avatarColor(){return t.candidates[1].color},get size(){return e(w)},get tag(){return t.candidates[1].avatarTag},get tagColor(){return t.candidates[1].avatarTagColor}})}var ve=d(X,2);{var S=re=>{var ue=Bi();Ee(ue,21,()=>t.candidates,Pe,(xe,we,de)=>{var ye=Di();T(()=>Se(ye,`width:calc(${e(we).percent??""}% - 2px);${de===0?"left:0;":"left:auto;right:0;"}background-color:${e(we).color??""};`)),f(xe,ye)}),f(re,ue)};W(ve,re=>{l()==="column"&&re(S)})}var oe=d(ve,2);{var N=re=>{ia(re,{get data(){return t.overviewData},get date(){return t.date},get font(){return t.font},borderTop:!0,get align(){return n()}})};W(oe,re=>{(e(x)||e(b))&&re(N)})}T((re,ue)=>{Se($,`--percent-size:${e(g)??""};--name-size:${e(y)??""};--votes-size:${e(u)??""};--bar-height:${e(z)??""};`),Se(ie,`flex-direction:${l()??""}; gap: ${l()==="row"?"10px":"2px"}`),Q(_e,`${t.candidates[0].name??""} `),Q(fe,t.candidates[0].acronym),Q(se,re),Q(ce,`${ue??""} votos`),Se(A,`flex-direction:${l()??""}; gap: ${l()==="row"?"10px":"2px"}`)},[()=>O(t.candidates[0].percent),()=>M(t.candidates[0].votes)]),f(q,$)},ae=q=>{var $=Oi();Ee($,21,()=>t.candidates,Pe,(X,R,F)=>{var P=Ti(),ie=o(P),le=o(ie);{let G=p(()=>e(R).avatar??"man");mt(le,{get name(){return e(R).name},get photoUrl(){return e(R).photoUrl},get avatar(){return e(G)},get avatarColor(){return e(R).color},get size(){return e(w)},get tag(){return e(R).avatarTag},get tagColor(){return e(R).avatarTagColor}})}var I=d(le,2),ne=o(I);{var _e=G=>{{let C=p(()=>v(e(R),F)),j=p(()=>_(e(R)));nt(G,{get label(){return e(C)},get color(){return e(j)},class:"position-tag"})}};W(ne,G=>{i()&&G(_e)})}var ge=d(ne,2),fe=o(ge),he=d(fe),pe=o(he),Y=d(ge,2),se=o(Y),me=d(Y,2),ce=o(me),A=d(me,2),k=o(A),ee=d(A,2);{var H=G=>{var C=Fi(),j=o(C);{var te=S=>{var oe=Yt();T(()=>Q(oe,`Atualizado em ${t.date??""} `)),f(S,oe)};W(j,S=>{t.date&&S(te)})}var V=d(j);{var ve=S=>{var oe=Yt();T(()=>Q(oe,`| Fonte ${t.font??""}`)),f(S,oe)};W(V,S=>{t.font&&S(ve)})}f(G,C)};W(ee,G=>{F===t.candidates.length-1&&e(b)&&G(H)})}T((G,C)=>{Q(fe,`${e(R).name??""} `),Q(pe,e(R).acronym),Q(se,`${G??""} `),Se(ce,`width:${e(R).percent??""}%;background-color:${e(R).color??""};`),Q(k,`${C??""} votos`)},[()=>O(e(R).percent),()=>M(e(R).votes)]),f(X,P)}),T(()=>Se($,`--percent-size:${e(g)??""};--name-size:${e(y)??""};--votes-size:${e(u)??""};--bar-height:${e(z)??""};`)),f(q,$)},D=q=>{var $=Zi(),X=o($);{var R=P=>{var ie=Ki(),le=ze(ie),I=o(le);{let j=p(()=>t.candidates[0].avatar??"man");mt(I,{get name(){return t.candidates[0].name},get photoUrl(){return t.candidates[0].photoUrl},get avatar(){return e(j)},get avatarColor(){return t.candidates[0].color},get size(){return e(w)},get tag(){return t.candidates[0].avatarTag},get tagColor(){return t.candidates[0].avatarTagColor}})}var ne=d(I,2),_e=o(ne),ge=o(_e),fe=o(ge),he=d(fe),pe=o(he),Y=d(ge,2),se=o(Y),me=d(Y,2),ce=o(me),A=d(_e,2);{var k=j=>{var te=Ii(),V=o(te),ve=o(V),S=d(V,2);Ee(S,21,()=>t.overviewData,Pe,(oe,N)=>{var re=Gi(),ue=o(re),xe=o(ue),we=d(ue,2),de=o(we);T(()=>{Q(xe,e(N).text),Q(de,e(N).value)}),f(oe,re)}),T(()=>Se(ve,`width:${t.candidates[0].percent??""}%;background-color:${t.candidates[0].color??""};`)),f(j,te)};W(A,j=>{e(E)||j(k)})}var ee=d(le,2);{var H=j=>{var te=Ni(),V=o(te),ve=o(V),S=d(V,2);Ee(S,21,()=>t.overviewData,Pe,(oe,N)=>{var re=Ui(),ue=o(re),xe=o(ue),we=d(ue,2),de=o(we);T(()=>{Q(xe,e(N).text),Q(de,e(N).value)}),f(oe,re)}),T(()=>Se(ve,`width:${t.candidates[0].percent??""}%;background-color:${t.candidates[0].color??""};`)),f(j,te)};W(ee,j=>{e(E)&&j(H)})}var G=d(ee,2);{var C=j=>{var te=Ji(),V=o(te);{var ve=ue=>{var xe=Vi(),we=o(xe);T(()=>Q(we,`Atualizado em ${t.date??""}`)),f(ue,xe)};W(V,ue=>{t.date&&ue(ve)})}var S=d(V,2);{var oe=ue=>{var xe=Hi();f(ue,xe)};W(S,ue=>{t.date&&t.font&&ue(oe)})}var N=d(S,2);{var re=ue=>{var xe=Wi(),we=o(xe);T(()=>Q(we,`Fonte ${t.font??""}`)),f(ue,xe)};W(N,ue=>{t.font&&ue(re)})}f(j,te)};W(G,j=>{e(b)&&j(C)})}T((j,te)=>{Q(fe,`${t.candidates[0].name??""} `),Q(pe,t.candidates[0].acronym),Q(se,j),Q(ce,`${te??""} votos`)},[()=>O(t.candidates[0].percent),()=>M(t.candidates[0].votes)]),f(P,ie)},F=P=>{var ie=Yi(),le=ze(ie),I=o(le),ne=o(I);{let H=p(()=>t.candidates[0].avatar??"man");mt(ne,{get name(){return t.candidates[0].name},get photoUrl(){return t.candidates[0].photoUrl},get avatar(){return e(H)},get avatarColor(){return t.candidates[0].color},get size(){return e(w)},get tag(){return t.candidates[0].avatarTag},get tagColor(){return t.candidates[0].avatarTagColor}})}var _e=d(ne,2),ge=o(_e),fe=d(ge),he=o(fe),pe=d(_e,2),Y=o(pe),se=d(pe,2),me=o(se),ce=d(le,2),A=o(ce),k=d(ce,2);{var ee=H=>{var G=Xi(),C=o(G);{var j=ve=>{var S=Yt();T(()=>Q(S,`Atualizado em ${t.date??""}`)),f(ve,S)};W(C,ve=>{t.date&&ve(j)})}var te=d(C);{var V=ve=>{var S=Yt();T(()=>Q(S,`| Fonte ${t.font??""}`)),f(ve,S)};W(te,ve=>{t.font&&ve(V)})}f(H,G)};W(k,H=>{e(b)&&H(ee)})}T((H,G)=>{Q(ge,`${t.candidates[0].name??""} `),Q(he,t.candidates[0].acronym),Q(Y,H),Q(me,`${G??""} votos`),Se(A,`width:${t.candidates[0].percent??""}%;background-color:${t.candidates[0].color??""};`)},[()=>O(t.candidates[0].percent),()=>M(t.candidates[0].votes)]),f(P,ie)};W(X,P=>{e(x)?P(R):P(F,!1)})}T(()=>Se($,`--percent-size:${e(g)??""};--name-size:${e(y)??""};--votes-size:${e(u)??""};--bar-height:${e(z)??""};--bar-color:${t.candidates[0].color??""};`)),f(q,$)};W(J,q=>{r()==="duel"?q(B):r()==="duel-compact"?q(Z,1):r()==="stack"?q(ae,2):r()==="compact"&&q(D,3)})}f(a,K),Le()}var $i=h('<img alt="" class="svelte-1nweovp"/>'),ed=h('<img alt="" class="flip svelte-1nweovp"/>'),td=h('<div class="candidate-position-carrousel-item svelte-1nweovp"><!></div>'),ad=h('<img alt="" class="flip svelte-1nweovp"/>'),rd=h('<img alt="" class="svelte-1nweovp"/>'),od=h("<button></button>"),nd=h('<div class="candidate-position-carrousel-dots svelte-1nweovp"></div>'),ld=h('<div class="candidate-position-carrousel svelte-1nweovp"><div class="candidate-position-carrousel-inner svelte-1nweovp"><button class="candidate-position-carrousel-arrow svelte-1nweovp" aria-label="Anterior"><!></button> <div role="presentation"></div> <button class="candidate-position-carrousel-arrow svelte-1nweovp" aria-label="Próximo"><!></button></div> <!></div>');const sd={hash:"svelte-1nweovp",code:`.candidate-position-carrousel.svelte-1nweovp {display:flex;flex-direction:column;gap:12px;}.candidate-position-carrousel-inner.svelte-1nweovp {display:flex;align-items:center;}
|
|
108
|
+
|
|
109
|
+
/* ── Track ─────────────────────────────── */.candidate-position-carrousel-track.svelte-1nweovp {flex:1;display:flex;flex-direction:column;gap:14px;padding-bottom:15px;opacity:1;transform:translateX(0);transition:opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
|
|
110
|
+
transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);}
|
|
111
|
+
|
|
112
|
+
/* Estado "instantâneo" (sem transição) da página que está entrando — o
|
|
113
|
+
conteúdo já nasce deslocado/invisível pro lado de onde deve vir. */.candidate-position-carrousel-track.entering.svelte-1nweovp {transition:none;}.candidate-position-carrousel-track.entering.forward.svelte-1nweovp {opacity:0;transform:translateX(20px);}.candidate-position-carrousel-track.entering.backward.svelte-1nweovp {opacity:0;transform:translateX(-20px);}
|
|
114
|
+
|
|
115
|
+
@media (min-width: 768px) {.candidate-position-carrousel-track.entering.forward.svelte-1nweovp {transform:translateX(40px);}.candidate-position-carrousel-track.entering.backward.svelte-1nweovp {transform:translateX(-40px);}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ── Item ─────────────────────────────── */.candidate-position-carrousel-item.svelte-1nweovp {display:flex;align-items:center;gap:8px;}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/* ── Arrows ───────────────────────────── */.candidate-position-carrousel-arrow.svelte-1nweovp {display:none;}
|
|
122
|
+
|
|
123
|
+
/* ── Dots ─────────────────────────────── */.candidate-position-carrousel-dots.svelte-1nweovp {display:flex;justify-content:center;gap:6px;}.candidate-position-carrousel-dot.svelte-1nweovp {width:8px;height:8px;border-radius:50%;border:none;padding:0;cursor:pointer;background-color:var(--sevn-color-neutral);transition:width 0.2s, border-radius 0.2s, background-color 0.2s;}.candidate-position-carrousel-dot.active.svelte-1nweovp {width:16px;border-radius:40%;background-color:var(--sevn-color-tertiary);}
|
|
124
|
+
|
|
125
|
+
/* ── Desktop ──────────────────────────── */
|
|
126
|
+
@media (min-width: 768px) {.candidate-position-carrousel-track.svelte-1nweovp {flex-direction:row;gap:0;border-bottom:1px solid var(--sevn-color-neutral);}.candidate-position-carrousel-item.svelte-1nweovp {flex:1;flex-direction:row;align-items:center;gap:30px;padding:0 20px;}.candidate-position-carrousel-item.svelte-1nweovp:first-child {padding-left:12px;}.candidate-position-carrousel-arrow.svelte-1nweovp {display:flex;align-items:center;background:none;border:none;cursor:pointer;padding:4px 8px;flex-shrink:0;}.candidate-position-carrousel-arrow.svelte-1nweovp:disabled {cursor:default;}.candidate-position-carrousel-arrow.svelte-1nweovp img:where(.svelte-1nweovp) {width:24px;height:24px;}.candidate-position-carrousel-arrow.svelte-1nweovp .flip:where(.svelte-1nweovp) {transform:scaleX(-1);}.candidate-position-carrousel-dots.svelte-1nweovp {display:none;}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (max-width: 767px) {.candidate-position-carrousel-item.svelte-1nweovp {padding-bottom:15px;border-bottom:1px solid var(--sevn-color-neutral);}
|
|
130
|
+
}`};function wn(a,t){je(t,!0),Me(a,sd);let r=L(t,"candidates",19,()=>[]),l=L(t,"itemsPerPage",3,3),n=U(0),i=U(!1),v=U("forward");const _=p(()=>Math.ceil(r().length/l())),c=p(()=>r().slice(e(n)*l(),(e(n)+1)*l()));function m(F,P){s(v,P,!0),s(i,!0),s(n,F,!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(i,!1)})})}function g(){e(n)>0&&m(e(n)-1,"backward")}function y(){e(n)<e(_)-1&&m(e(n)+1,"forward")}let u=U(He(Fe?window.innerWidth<=480:!1)),w=0;function z(F){w=F.touches[0].clientX}function x(F){const P=w-F.changedTouches[0].clientX;Math.abs(P)<30||(P>0?y():g())}Ce(()=>{if(!Fe)return;const F=window.matchMedia("(max-width: 480px)");s(u,F.matches,!0);const P=ie=>{s(u,ie.matches,!0)};return F.addEventListener("change",P),()=>F.removeEventListener("change",P)});var b=ld(),E=o(b),M=o(E),O=o(M);{var K=F=>{var P=$i();T(()=>be(P,"src",Da)),f(F,P)},J=F=>{var P=ed();T(()=>be(P,"src",sa)),f(F,P)};W(O,F=>{e(n)===0?F(K):F(J,!1)})}var B=d(M,2);let Z;Ee(B,21,()=>e(c),Pe,(F,P)=>{var ie=td(),le=o(ie);{let I=p(()=>e(P).avatar??"man"),ne=p(()=>e(u)?"right":"left"),_e=p(()=>e(P).size??"sm"),ge=p(()=>e(P).nameWeight??800),fe=p(()=>e(P).descWeight??600);bt(le,{get name(){return e(P).name},get photoUrl(){return e(P).photoUrl},get avatar(){return e(I)},get avatarColor(){return e(P).avatarColor},get tag(){return e(P).tag},get tagColor(){return e(P).tagColor},get description(){return e(P).description},get position(){return e(P).position},get positionSide(){return e(ne)},get size(){return e(_e)},get nameWeight(){return e(ge)},get descWeight(){return e(fe)},get percent(){return e(P).percent},get percentSuffix(){return e(P).percentSuffix},get votes(){return e(P).votes}})}f(F,ie)});var ae=d(B,2),D=o(ae);{var q=F=>{var P=ad();T(()=>be(P,"src",Da)),f(F,P)},$=F=>{var P=rd();T(()=>be(P,"src",sa)),f(F,P)};W(D,F=>{e(n)===e(_)-1?F(q):F($,!1)})}var X=d(E,2);{var R=F=>{var P=nd();Ee(P,21,()=>({length:e(_)}),Pe,(ie,le,I)=>{var ne=od();let _e;be(ne,"aria-label",`Página ${I+1}`),T(()=>_e=Ae(ne,1,"candidate-position-carrousel-dot svelte-1nweovp",null,_e,{active:I===e(n)})),Je("click",ne,()=>m(I,I>e(n)?"forward":"backward")),f(ie,ne)}),f(F,P)};W(X,F=>{e(_)>1&&F(R)})}T(()=>{M.disabled=e(n)===0,Z=Ae(B,1,"candidate-position-carrousel-track svelte-1nweovp",null,Z,{entering:e(i),forward:e(v)==="forward",backward:e(v)==="backward"}),ae.disabled=e(n)===e(_)-1}),Je("click",M,g),Je("touchstart",B,z),Je("touchend",B,x),Je("click",ae,y),f(a,b),Le()}ca(["click","touchstart","touchend"]);var id=h('<div class="candidate-vote-comparison-header svelte-h4mycb"><div class="candidate-vote-comparison-header-cand svelte-h4mycb"><!> <div class="candidate-vote-comparison-header-info svelte-h4mycb"><span class="candidate-vote-comparison-header-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-header-tag svelte-h4mycb"> </span></div></div> <div class="candidate-vote-comparison-header-cand candidate-vote-comparison-header-cand-right svelte-h4mycb"><div class="candidate-vote-comparison-header-info candidate-vote-comparison-header-info-right svelte-h4mycb"><span class="candidate-vote-comparison-header-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-header-tag svelte-h4mycb"> </span></div> <!></div></div>'),dd=h('<div class="candidate-vote-comparison-round svelte-h4mycb"><div class="candidate-vote-comparison-mobile-top svelte-h4mycb"><span class="candidate-vote-comparison-label-mobile svelte-h4mycb"> </span> <div class="candidate-vote-comparison-mobile-cands svelte-h4mycb"><div class="candidate-vote-comparison-mini-cand svelte-h4mycb"><div class="candidate-vote-comparison-mini-row svelte-h4mycb"><div><!></div> <div><span class="candidate-vote-comparison-mini-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-tag svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-percent svelte-h4mycb"> </span></div></div></div> <div class="candidate-vote-comparison-mini-cand candidate-vote-comparison-mini-cand-right svelte-h4mycb"><div class="candidate-vote-comparison-mini-row candidate-vote-comparison-mini-row-right svelte-h4mycb"><div><span class="candidate-vote-comparison-mini-tag svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-name svelte-h4mycb"> </span> <span class="candidate-vote-comparison-mini-percent candidate-vote-comparison-mini-percent-right svelte-h4mycb"> </span></div> <div><!></div></div></div></div></div> <p class="candidate-vote-comparison-label-desktop svelte-h4mycb"> </p> <div class="candidate-vote-comparison-bar svelte-h4mycb"><div class="candidate-vote-comparison-bar-a svelte-h4mycb"></div> <div class="candidate-vote-comparison-bar-b svelte-h4mycb"></div></div> <div class="candidate-vote-comparison-desktop-percents svelte-h4mycb"><span class="candidate-vote-comparison-percent svelte-h4mycb"> </span> <span class="candidate-vote-comparison-percent svelte-h4mycb"> </span></div></div>'),vd=h('<p class="candidate-vote-comparison-footer svelte-h4mycb"> </p>'),cd=h('<div class="candidate-vote-comparison svelte-h4mycb"><!> <!> <!></div>');const ud={hash:"svelte-h4mycb",code:`.candidate-vote-comparison.svelte-h4mycb {display:flex;flex-direction:column;}
|
|
131
|
+
|
|
132
|
+
/* ── Desktop header ───────────────────── */.candidate-vote-comparison-header.svelte-h4mycb {display:none;}
|
|
133
|
+
|
|
134
|
+
/* ── Rounds ───────────────────────────── */.candidate-vote-comparison-round.svelte-h4mycb {display:flex;flex-direction:column;gap:15px;margin-bottom:20px;}
|
|
135
|
+
|
|
136
|
+
/* ── Mobile top ── */.candidate-vote-comparison-label-mobile.svelte-h4mycb {font-size:0.875rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-mobile-cands.svelte-h4mycb {display:flex;gap:12px;margin-top:15px;}.candidate-vote-comparison-mini-cand.svelte-h4mycb {flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}.candidate-vote-comparison-mini-row.svelte-h4mycb {display:flex;align-items:center;gap:6px;}.candidate-vote-comparison-mini-row-right.svelte-h4mycb {justify-content:flex-end;text-align:right;}.candidate-vote-comparison-mini-name.svelte-h4mycb {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex-shrink:1;}.candidate-vote-comparison-mini-tag.svelte-h4mycb {display:inline-block;flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);padding:2px 5px;border-radius:4px;letter-spacing:0.03em;opacity:50%;}.candidate-vote-comparison-mini-percent.svelte-h4mycb {font-size:1.25rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-mini-cand-right.svelte-h4mycb .candidate-vote-comparison-mini-percent:where(.svelte-h4mycb) {text-align:right;}
|
|
137
|
+
|
|
138
|
+
/* ── Desktop label + pcts (hidden on mobile) ── */.candidate-vote-comparison-label-desktop.svelte-h4mycb {display:none;}.candidate-vote-comparison-desktop-percents.svelte-h4mycb {display:none;}
|
|
139
|
+
|
|
140
|
+
/* ── Bar ─────────────────────────────── */.candidate-vote-comparison-bar.svelte-h4mycb {position:relative;height:12px;border-radius:50px;overflow:hidden;background-color:#f2f2f7;}.candidate-vote-comparison-bar-a.svelte-h4mycb,
|
|
141
|
+
.candidate-vote-comparison-bar-b.svelte-h4mycb {position:absolute;top:0;left:0;height:100%;border-radius:50px;}
|
|
142
|
+
|
|
143
|
+
/* ── Footer ──────────────────────────── */.candidate-vote-comparison-footer.svelte-h4mycb {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.5;margin-top:4px;}
|
|
144
|
+
|
|
145
|
+
/* ── Desktop ──────────────────────────── */
|
|
146
|
+
@media (min-width: 768px) {.candidate-vote-comparison-header.svelte-h4mycb {display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;}.candidate-vote-comparison-header-cand.svelte-h4mycb {display:flex;align-items:center;gap:12px;}.candidate-vote-comparison-header-info.svelte-h4mycb {display:flex;flex-direction:column;gap:2px;}.candidate-vote-comparison-header-info-right.svelte-h4mycb {text-align:right;}.candidate-vote-comparison-header-name.svelte-h4mycb {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-header-tag.svelte-h4mycb {font-size:0.875rem;color:var(--sevn-color-tertiary);opacity:0.55;}.candidate-vote-comparison-mobile-top.svelte-h4mycb {display:none;}.candidate-vote-comparison-label-desktop.svelte-h4mycb {display:block;text-align:center;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.candidate-vote-comparison-desktop-percents.svelte-h4mycb {display:flex;justify-content:space-between;}.candidate-vote-comparison-percent.svelte-h4mycb {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary);}.candidate-vote-comparison-round.svelte-h4mycb {gap:15px;margin-bottom:16px;}.candidate-vote-comparison-bar.svelte-h4mycb {height:36px;}.candidate-vote-comparison-bar-a.svelte-h4mycb,
|
|
147
|
+
.candidate-vote-comparison-bar-b.svelte-h4mycb {border-radius:50px;}
|
|
148
|
+
}`};function pd(a,t){je(t,!0),Me(a,ud);let r=L(t,"updatedAt",3,"");const l=p(()=>t.data.rounds??[]),n=y=>y.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})+"%";var i=cd(),v=o(i);{var _=y=>{var u=id(),w=o(u),z=o(w);{let $=p(()=>e(l)[0].candidatos[0].avatar??"man");mt(z,{get name(){return e(l)[0].candidatos[0].name},get photoUrl(){return e(l)[0].candidatos[0].photoUrl},get avatar(){return e($)},get avatarColor(){return e(l)[0].candidatos[0].avatarColor},size:"lg"})}var x=d(z,2),b=o(x),E=o(b),M=d(b,2),O=o(M),K=d(w,2),J=o(K),B=o(J),Z=o(B),ae=d(B,2),D=o(ae),q=d(J,2);{let $=p(()=>e(l)[0].candidatos[1].avatar??"man");mt(q,{get name(){return e(l)[0].candidatos[1].name},get photoUrl(){return e(l)[0].candidatos[1].photoUrl},get avatar(){return e($)},get avatarColor(){return e(l)[0].candidatos[1].avatarColor},size:"lg"})}T(()=>{Q(E,e(l)[0].candidatos[0].name),Q(O,e(l)[0].candidatos[0].tag),Q(Z,e(l)[0].candidatos[1].name),Q(D,e(l)[0].candidatos[1].tag)}),f(y,u)};W(v,y=>{e(l)[0]&&y(_)})}var c=d(v,2);Ee(c,17,()=>e(l),Pe,(y,u,w)=>{var z=dd(),x=o(z),b=o(x),E=o(b),M=d(b,2),O=o(M),K=o(O),J=o(K),B=o(J);{let j=p(()=>e(u).candidatos[0].avatar??"man");mt(B,{get name(){return e(u).candidatos[0].name},get photoUrl(){return e(u).candidatos[0].photoUrl},get avatar(){return e(j)},get avatarColor(){return e(u).candidatos[0].avatarColor},size:"sm"})}var Z=d(J,2),ae=o(Z),D=o(ae),q=d(ae,2),$=o(q),X=d(q,2),R=o(X),F=d(O,2),P=o(F),ie=o(P),le=o(ie),I=o(le),ne=d(le,2),_e=o(ne),ge=d(ne,2),fe=o(ge),he=d(ie,2),pe=o(he);{let j=p(()=>e(u).candidatos[1].avatar??"man");mt(pe,{get name(){return e(u).candidatos[1].name},get photoUrl(){return e(u).candidatos[1].photoUrl},get avatar(){return e(j)},get avatarColor(){return e(u).candidatos[1].avatarColor},size:"sm"})}var Y=d(x,2),se=o(Y),me=d(Y,2),ce=o(me),A=d(ce,2),k=d(me,2),ee=o(k),H=o(ee),G=d(ee,2),C=o(G);T((j,te,V,ve)=>{Q(E,e(u).label),Q(D,e(u).candidatos[0].name),Q($,e(u).candidatos[0].tag),Q(R,j),Q(I,e(u).candidatos[1].tag),Q(_e,e(u).candidatos[1].name),Q(fe,te),Q(se,e(u).label),Se(ce,`width: ${(w===0||e(u).candidatos[0].percent>e(u).candidatos[1].percent?e(u).candidatos[0].percent:100)??""}%; background: ${e(u).candidatos[0].color??""}; z-index: ${e(u).candidatos[0].percent>e(u).candidatos[1].percent?1:0};`),Se(A,`width: ${(w===0||e(u).candidatos[1].percent>e(u).candidatos[0].percent?e(u).candidatos[1].percent:100)??""}%; background: ${e(u).candidatos[1].color??""}; z-index: ${e(u).candidatos[1].percent>e(u).candidatos[0].percent?1:0}; ${w===0?"right: 0; left: auto;":""}`),Q(H,V),Q(C,ve)},[()=>n(e(u).candidatos[0].percent),()=>n(e(u).candidatos[1].percent),()=>n(e(u).candidatos[0].percent),()=>n(e(u).candidatos[1].percent)]),f(y,z)});var m=d(c,2);{var g=y=>{var u=vd(),w=o(u);T(()=>Q(w,r())),f(y,u)};W(m,y=>{r()&&y(g)})}f(a,i),Le()}var _d=h("<span> </span>"),fd=h('<div class="candidate-ranking-table-header svelte-1731s3u" aria-hidden="true"></div>'),md=it('<svg viewBox="0 0 120 36" aria-hidden="true" class="candidate-ranking-sparkline svelte-1731s3u"><path fill="none" stroke-width="2.2" stroke-linejoin="round" stroke-linecap="round"></path></svg>'),gd=h('<div class="candidate-ranking-table-row svelte-1731s3u" role="listitem"><span class="candidate-ranking-rank svelte-1731s3u"> </span> <div class="candidate-ranking-candidate-cell svelte-1731s3u"><!> <span class="candidate-ranking-candidate-name svelte-1731s3u"> </span></div> <div class="candidate-ranking-party-cell svelte-1731s3u"><!></div> <span class="candidate-ranking-votes svelte-1731s3u"><span class="candidate-ranking-votes-full svelte-1731s3u"> </span> <span class="candidate-ranking-votes-compact svelte-1731s3u"> </span></span> <span class="candidate-ranking-percent svelte-1731s3u"><span class="candidate-ranking-percent-full svelte-1731s3u"> </span> <span class="candidate-ranking-percent-compact svelte-1731s3u"> </span></span> <div class="candidate-ranking-evolution svelte-1731s3u"><!></div></div>'),bd=h('<div class="candidate-ranking-table svelte-1731s3u"><div class="candidate-ranking-table-body svelte-1731s3u"><!> <!></div></div>');const hd={hash:"svelte-1731s3u",code:`.candidate-ranking-table.svelte-1731s3u {width:100%;background:#fff;border-radius:12px;overflow:hidden;border:1px solid #DDDDDF;}
|
|
149
|
+
|
|
150
|
+
/* Grid columns: rank | candidate | party | votes | % | evolution */.candidate-ranking-table-header.svelte-1731s3u,
|
|
151
|
+
.candidate-ranking-table-row.svelte-1731s3u {display:grid;grid-template-columns:80px 1fr 100px 112px 80px 136px;align-items:center;gap:15px;padding:0 16px;}.candidate-ranking-table-header.svelte-1731s3u {position:sticky;top:0;z-index:1;background:#fff;padding-top:20px;padding-bottom:20px;font-size:0.75rem;font-weight:500;color:#1C1C1C;border-bottom:1px solid var(--sevn-color-neutral);}.candidate-ranking-table-row.svelte-1731s3u {gap:15px;}.candidate-ranking-table-body.svelte-1731s3u {overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#1C1C1C transparent;scrollbar-gutter:stable;}.candidate-ranking-table-body.svelte-1731s3u::-webkit-scrollbar {width:4px;}.candidate-ranking-table-body.svelte-1731s3u::-webkit-scrollbar-track {background:transparent;}.candidate-ranking-table-body.svelte-1731s3u::-webkit-scrollbar-thumb {background:#d1d1db;border-radius:4px;}.candidate-ranking-table-row.svelte-1731s3u {padding-top:14px;padding-bottom:14px;border-bottom:1px solid var(--sevn-color-neutral);transition:background 0.15s;}.candidate-ranking-table-row.svelte-1731s3u:last-child {border-bottom:none;}.candidate-ranking-table-row.svelte-1731s3u:hover {background:#fafafa;}.col-rank-header.svelte-1731s3u {text-align:center;}.col-party-header.svelte-1731s3u {text-align:center;}.candidate-ranking-rank.svelte-1731s3u {font-size:0.9375rem;font-weight:700;color:var(--sevn-color-tertiary);text-align:center;white-space:nowrap;}.candidate-ranking-candidate-cell.svelte-1731s3u {display:flex;align-items:center;gap:10px;min-width:0;}.candidate-ranking-candidate-cell.svelte-1731s3u .avatar-container {flex-shrink:0;}.candidate-ranking-candidate-name.svelte-1731s3u {font-size:0.875rem;font-weight:500;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}.candidate-ranking-party-cell.svelte-1731s3u {display:flex;justify-content:center;}.candidate-ranking-votes.svelte-1731s3u,
|
|
152
|
+
.candidate-ranking-percent.svelte-1731s3u {font-size:0.875rem;color:var(--sevn-color-tertiary);white-space:nowrap;}
|
|
153
|
+
|
|
154
|
+
/* Desktop: show full, hide compact */.candidate-ranking-votes-compact.svelte-1731s3u,
|
|
155
|
+
.candidate-ranking-percent-compact.svelte-1731s3u {display:none;}.candidate-ranking-evolution.svelte-1731s3u {display:flex;align-items:center;}.candidate-ranking-sparkline.svelte-1731s3u {display:block;width:100%;height:36px;overflow:visible;}
|
|
156
|
+
|
|
157
|
+
/* Mobile */
|
|
158
|
+
@media (max-width: 640px) {.candidate-ranking-table-header.svelte-1731s3u,
|
|
159
|
+
.candidate-ranking-table-row.svelte-1731s3u {grid-template-columns:36px 1fr 50px 38px 38px 60px;padding:0 12px;}.candidate-ranking-table-header.svelte-1731s3u {gap:16px;padding-top:14px;padding-bottom:14px;font-size:0.6875rem;}.candidate-ranking-table-row.svelte-1731s3u {gap:16px;padding-top:10px;padding-bottom:10px;}.candidate-ranking-rank.svelte-1731s3u {font-size:0.8125rem;}
|
|
160
|
+
|
|
161
|
+
/* Avatar override */.candidate-ranking-candidate-cell.svelte-1731s3u .avatar-container {flex-shrink:0;width:28px;}.candidate-ranking-candidate-cell.svelte-1731s3u .avatar {width:28px !important;height:28px !important;}.candidate-ranking-candidate-cell.svelte-1731s3u {gap:6px;}.candidate-ranking-candidate-name.svelte-1731s3u {font-size:0.75rem;}.candidate-ranking-votes-full.svelte-1731s3u,
|
|
162
|
+
.candidate-ranking-percent-full.svelte-1731s3u {display:none;}.candidate-ranking-votes-compact.svelte-1731s3u,
|
|
163
|
+
.candidate-ranking-percent-compact.svelte-1731s3u {display:inline;}.candidate-ranking-votes.svelte-1731s3u,
|
|
164
|
+
.candidate-ranking-percent.svelte-1731s3u {font-size:0.75rem;}.candidate-ranking-sparkline.svelte-1731s3u {height:28px;}
|
|
165
|
+
}`};function xd(a,t){je(t,!0),Me(a,hd);let r=L(t,"candidates",19,()=>[]),l=L(t,"maxHeight",3,"480px"),n=U(!1);Ce(()=>{const x=window.matchMedia("(max-width: 640px)");s(n,x.matches,!0);const b=E=>{s(n,E.matches,!0)};return x.addEventListener("change",b),()=>x.removeEventListener("change",b)});function i(x){return x.toLocaleString("pt-BR")}function v(x){return x>=1e6?`+${Math.floor(x/1e6)}M`:x>=1e3?`+${Math.floor(x/1e3)}K`:String(x)}function _(x){return x.toFixed(2).replace(".",",")+"%"}function c(x){return x.toFixed(1).replace(".",",")+"%"}function m(x,b=120,E=36){if(!x||x.length<2)return"";const M=Math.min(...x),K=Math.max(...x)-M||1,J=3,B=E-J*2,Z=b/(x.length-1);return x.map((ae,D)=>{const q=+(D*Z).toFixed(2),$=+(E-J-(ae-M)/K*B).toFixed(2);return`${D===0?"M":"L"}${q},${$}`}).join(" ")}var g=bd(),y=o(g),u=o(y);{var w=x=>{var b=fd();Ee(b,21,()=>t.headers,Pe,(E,M,O)=>{var K=_d();Ae(K,1,"svelte-1731s3u",null,{},{"col-rank-header":O===0,"col-party-header":O===2});var J=o(K);T(()=>Q(J,e(M))),f(E,K)}),f(x,b)};W(u,x=>{t.headers&&t.headers.length>0&&x(w)})}var z=d(u,2);Ee(z,17,r,x=>x.position,(x,b)=>{var E=gd(),M=o(E),O=o(M),K=d(M,2),J=o(K);{var B=pe=>{mt(pe,{get name(){return e(b).name},get photoUrl(){return e(b).photoUrl},get avatar(){return e(b).avatar},get avatarColor(){return e(b).avatarColor},size:"sm"})};W(J,pe=>{e(n)||pe(B)})}var Z=d(J,2),ae=o(Z),D=d(K,2),q=o(D);{let pe=p(()=>e(b).partyColor??"var(--sevn-color-primary)");nt(q,{get label(){return e(b).party},get color(){return e(pe)},fontSize:"0.625rem"})}var $=d(D,2),X=o($),R=o(X),F=d(X,2),P=o(F),ie=d($,2),le=o(ie),I=o(le),ne=d(le,2),_e=o(ne),ge=d(ie,2),fe=o(ge);{var he=pe=>{var Y=md(),se=o(Y);T(me=>{be(se,"d",me),be(se,"stroke",e(b).avatarColor??"var(--sevn-color-primary)")},[()=>m(e(b).evolution)]),f(pe,Y)};W(fe,pe=>{e(b).evolution&&e(b).evolution.length>=2&&pe(he)})}T((pe,Y,se,me)=>{Q(O,`${e(b).position??""}º`),Q(ae,e(b).name),Q(R,pe),Q(P,Y),Q(I,se),Q(_e,me)},[()=>i(e(b).votes),()=>v(e(b).votes),()=>_(e(b).percent),()=>c(e(b).percent)]),f(x,E)}),T(()=>Se(y,`max-height: ${l()??""};`)),f(a,g),Le()}var wd=h('<div><div class="candidates-votes-ranking-candidate svelte-icwugj"><span class="candidates-votes-ranking-dot svelte-icwugj"></span> <div class="candidates-votes-ranking-info svelte-icwugj"><span class="candidates-votes-ranking-name svelte-icwugj"> </span> <!> <!> <!></div></div> <span class="candidates-votes-ranking-votes svelte-icwugj"> </span></div>'),yd=h('<div class="candidates-votes-ranking svelte-icwugj"><div class="candidates-votes-ranking-header svelte-icwugj"><span> </span> <span> </span></div> <!> <!></div>');const Cd={hash:"svelte-icwugj",code:`.candidates-votes-ranking.svelte-icwugj {display:flex;flex-direction:column;font-family:inherit;}
|
|
166
|
+
|
|
167
|
+
/* ── Header ── */.candidates-votes-ranking-header.svelte-icwugj {display:flex;justify-content:space-between;align-items:center;padding:0 0 8px;font-size:0.85rem;font-weight:600;color:var(--sevn-color-tertiary);}
|
|
168
|
+
|
|
169
|
+
/* ── Row ── */.candidates-votes-ranking-row.svelte-icwugj {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--sevn-color-neutral);transition:background-color 0.15s ease;}.candidates-votes-ranking-row.svelte-icwugj:last-of-type {border-bottom:none;}.candidates-votes-ranking-row.elected.svelte-icwugj {background-color:#e8f5ee;margin:0 -12px;padding:14px 12px;border-radius:8px;}
|
|
170
|
+
|
|
171
|
+
/* ── Left side ── */.candidates-votes-ranking-candidate.svelte-icwugj {display:flex;align-items:center;gap:10px;min-width:0;flex:1;}.candidates-votes-ranking-dot.svelte-icwugj {width:var(--dot-size);height:var(--dot-size);border-radius:50%;flex-shrink:0;}.candidates-votes-ranking-info.svelte-icwugj {display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;}.candidates-votes-ranking-name.svelte-icwugj {font-size:var(--name-size);font-weight:var(--name-weight);color:var(--sevn-color-tertiary);white-space:nowrap;}
|
|
172
|
+
|
|
173
|
+
/* ── Right side ── */.candidates-votes-ranking-votes.svelte-icwugj {font-size:var(--votes-size);font-weight:var(--votes-weight);color:var(--sevn-color-tertiary);white-space:nowrap;flex-shrink:0;opacity:0.5;}
|
|
174
|
+
|
|
175
|
+
/* ── Responsive ── */
|
|
176
|
+
@media (max-width: 480px) {.candidates-votes-ranking-name.svelte-icwugj {font-size:calc(var(--name-size) * 0.9);}.candidates-votes-ranking-votes.svelte-icwugj {font-size:calc(var(--votes-size) * 0.9);}.candidates-votes-ranking-row.elected.svelte-icwugj {margin:0 -8px;padding:14px 8px;}
|
|
177
|
+
}`};function ka(a,t){Me(a,Cd);let r=L(t,"candidates",19,()=>[]),l=L(t,"headerLeft",3,"Partido/ Candidato"),n=L(t,"headerRight",3,"Votos"),i=L(t,"dotSize",3,"12px"),v=L(t,"nameFontSize",3,"1rem"),_=L(t,"nameWeight",3,700),c=L(t,"votesFontSize",3,"0.875rem"),m=L(t,"votesWeight",3,600),g=L(t,"tagFontSize",3,"0.6875rem"),y=L(t,"electedColor",3,"var(--sevn-color-green)"),u=L(t,"electedLabel",3,"ELEITO");const w=p(()=>!!(t.totalVotes||t.date||t.font)),z=p(()=>t.totalVotes?[{text:"Total",value:`${t.totalVotes} votos`}]:[]);var x=yd(),b=o(x),E=o(b),M=o(E),O=d(E,2),K=o(O),J=d(b,2);Ee(J,17,r,Pe,(ae,D)=>{var q=wd();let $;var X=o(q),R=o(X),F=d(R,2),P=o(F),ie=o(P),le=d(P,2);{var I=Y=>{{let se=p(()=>e(D).tagColor??"var(--sevn-color-secondary)");nt(Y,{get label(){return e(D).tag},get color(){return e(se)},get fontSize(){return g()}})}};W(le,Y=>{e(D).tag&&Y(I)})}var ne=d(le,2);{var _e=Y=>{nt(Y,{get label(){return u()},get color(){return y()},get fontSize(){return g()}})};W(ne,Y=>{e(D).elected&&Y(_e)})}var ge=d(ne,2);{var fe=Y=>{{let se=p(()=>e(D).statusColor??"var(--sevn-color-tertiary)");nt(Y,{get label(){return e(D).statusLabel},get color(){return e(se)},get fontSize(){return g()}})}};W(ge,Y=>{e(D).statusLabel&&Y(fe)})}var he=d(X,2),pe=o(he);T(()=>{$=Ae(q,1,"candidates-votes-ranking-row svelte-icwugj",null,$,{elected:e(D).elected}),Se(R,`background-color: ${e(D).dotColor??"var(--sevn-color-secondary)"??""}`),Q(ie,e(D).name),Q(pe,e(D).votes)}),f(ae,q)});var B=d(J,2);{var Z=ae=>{ia(ae,{get data(){return e(z)},get date(){return t.date},get font(){return t.font},borderTop:!0})};W(B,ae=>{e(w)&&ae(Z)})}T(()=>{Se(x,`
|
|
178
|
+
--dot-size: ${i()??""};
|
|
179
|
+
--name-size: ${v()??""};
|
|
180
|
+
--name-weight: ${_()??""};
|
|
181
|
+
--votes-size: ${c()??""};
|
|
182
|
+
--votes-weight:${m()??""};
|
|
183
|
+
`),Q(M,l()),Q(K,n())}),f(a,x)}function uo(a,t,r,l,n){return r===t?l:l+(a-t)/(r-t)*(n-l)}function Rr(a,t,r,l,n,i){const v=r-i,_=po(l),c=po(n),m=n-l>180?1:0,g=a+r*Math.cos(_),y=t+r*Math.sin(_),u=a+r*Math.cos(c),w=t+r*Math.sin(c),z=a+v*Math.cos(c),x=t+v*Math.sin(c),b=a+v*Math.cos(_),E=t+v*Math.sin(_);return[`M ${g} ${y}`,`A ${r} ${r} 0 ${m} 1 ${u} ${w}`,`L ${z} ${x}`,`A ${v} ${v} 0 ${m} 0 ${b} ${E}`,"Z"].join(" ")}function po(a){return a*Math.PI/180}var kd=it('<path style="cursor: pointer; transition: opacity 0.2s;" role="button" tabindex="0"><title> </title></path>'),Sd=it('<text text-anchor="middle" dominant-baseline="middle" class="donut-chart-center-label svelte-1q978zv"> </text>'),zd=it('<text text-anchor="middle" dominant-baseline="middle" class="donut-chart-center-sub svelte-1q978zv"> </text>'),Ad=h('<div class="donut-tooltip svelte-1q978zv"><div class="donut-tooltip-content svelte-1q978zv"><div class="donut-tooltip-header svelte-1q978zv"></div> <div class="donut-tooltip-body svelte-1q978zv"><div class="donut-tooltip-label svelte-1q978zv"> </div> <div class="donut-tooltip-value svelte-1q978zv"> </div></div></div> <div class="donut-tooltip-arrow svelte-1q978zv"></div></div>'),Md=h('<div class="donut-chart svelte-1q978zv"><svg viewBox="0 0 200 200" role="img" aria-label="Gráfico de donut" class="svelte-1q978zv"><!><!><!></svg> <!></div>');const Ed={hash:"svelte-1q978zv",code:`.donut-chart.svelte-1q978zv {display:inline-block;}svg.svelte-1q978zv {width:100%;height:100%;display:block;}.donut-chart-center-label.svelte-1q978zv {font-family:inherit;font-weight:700;fill:var(--sevn-color-tertiary);}.donut-chart-center-sub.svelte-1q978zv {font-family:inherit;font-weight:500;fill:#9a9aaa;}
|
|
184
|
+
|
|
185
|
+
/* ── Hover effect ─────────────────────── */svg.svelte-1q978zv path.hovered:where(.svelte-1q978zv) {opacity:0.8;filter:brightness(1.1);}
|
|
186
|
+
|
|
187
|
+
/* ── Foco: sem outline ao clicar (mouse), mantém pra navegação por teclado ── */svg.svelte-1q978zv path:where(.svelte-1q978zv):focus {outline:none;}svg.svelte-1q978zv path:where(.svelte-1q978zv):focus-visible {outline:2px solid var(--sevn-color-tertiary, #1c1c1c);outline-offset:2px;}
|
|
188
|
+
|
|
189
|
+
/* ── Tooltip ──────────────────────────── */.donut-tooltip.svelte-1q978zv {position:fixed;left:var(--tooltip-x);top:var(--tooltip-y);transform:translate(-50%, -100%);z-index:1000;pointer-events:none;
|
|
190
|
+
animation: svelte-1q978zv-slideUp 0.2s ease-out;}
|
|
191
|
+
|
|
192
|
+
@keyframes svelte-1q978zv-slideUp {
|
|
193
|
+
from {
|
|
194
|
+
opacity: 0;
|
|
195
|
+
transform: translate(-50%, -90%);
|
|
196
|
+
}
|
|
197
|
+
to {
|
|
198
|
+
opacity: 1;
|
|
199
|
+
transform: translate(-50%, -100%);
|
|
200
|
+
}
|
|
201
|
+
}.donut-tooltip-content.svelte-1q978zv {background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;min-width:140px;}.donut-tooltip-header.svelte-1q978zv {height:4px;width:100%;}.donut-tooltip-body.svelte-1q978zv {padding:12px 16px;display:flex;flex-direction:column;gap:4px;}.donut-tooltip-label.svelte-1q978zv {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary, #1c1c1c);text-transform:uppercase;letter-spacing:0.05em;}.donut-tooltip-value.svelte-1q978zv {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary, #1c1c1c);}.donut-tooltip-arrow.svelte-1q978zv {position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;filter:drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));}`};function Pr(a,t){je(t,!0),Me(a,Ed);let r=L(t,"segments",19,()=>[]),l=L(t,"size",3,"200px"),n=L(t,"radius",3,80),i=L(t,"thickness",3,32),v=L(t,"gap",3,2),_=L(t,"centerLabelSize",3,22),c=L(t,"centerSubSize",3,10);const m=100,g=100;let y=U(null),u=U(He({x:0,y:0}));function w(X,R){s(y,R,!0);const F=X.currentTarget.getBoundingClientRect();s(u,{x:F.left+F.width/2,y:F.top-10},!0)}function z(){s(y,null)}const x=p(()=>r().reduce((X,R)=>X+R.value,0)),b=p(()=>Math.min(n(),100)),E=p(()=>Math.min(i(),50)),M=p(()=>{if(e(x)===0)return[];const X=v();let R=-90;return r().map(F=>{const P=F.value/e(x)*360-X,ie=R+X/2,le=ie+P;return R+=F.value/e(x)*360,{path:Rr(m,g,e(b),ie,le,e(E)),color:F.color,label:F.label}})});var O=Md(),K=o(O),J=o(K);Ee(J,17,()=>e(M),Pe,(X,R,F)=>{var P=kd();let ie;var le=o(P),I=o(le);T(()=>{be(P,"d",e(R).path),be(P,"fill",e(R).color),ie=Ae(P,0,"svelte-1q978zv",null,ie,{hovered:e(y)===F}),Q(I,e(R).label)}),ht("mouseenter",P,ne=>w(ne,F)),ht("mouseleave",P,z),f(X,P)});var B=d(J);{var Z=X=>{var R=Sd();be(R,"x",m);var F=o(R);T(()=>{be(R,"y",t.centerSub?g-6:g),Se(R,`font-size: ${_()??""}px`),Q(F,t.centerLabel)}),f(X,R)};W(B,X=>{t.centerLabel&&X(Z)})}var ae=d(B);{var D=X=>{var R=zd();be(R,"x",m),be(R,"y",g+18);var F=o(R);T(()=>{Se(R,`font-size: ${c()??""}px`),Q(F,t.centerSub)}),f(X,R)};W(ae,X=>{t.centerSub&&X(D)})}var q=d(K,2);{var $=X=>{const R=p(()=>r()[e(y)]);var F=Ad(),P=o(F),ie=o(P),le=d(ie,2),I=o(le),ne=o(I),_e=d(I,2),ge=o(_e);T(fe=>{Se(F,`--tooltip-x: ${e(u).x??""}px; --tooltip-y: ${e(u).y??""}px;`),Se(ie,`background-color: ${e(R).color??""};`),Q(ne,e(R).label),Q(ge,`${fe??""}%`)},[()=>e(R).value.toFixed(1)]),f(X,F)};W(q,X=>{e(y)!==null&&r()[e(y)]&&X($)})}T(()=>Se(O,`width: ${l()??""}; height: ${l()??""};`)),f(a,O),Le()}var Rd=h('<span class="trigger-label svelte-hkzjiw"> </span>'),Pd=h('<img alt="" aria-hidden="true" width="10" height="10"/>'),jd=h('<button class="clear svelte-hkzjiw" type="button"><img alt="" aria-hidden="true" width="8" height="8"/></button>'),Ld=h('<button type="button" role="option"> </button>'),Dd=h('<div class="dropdown svelte-hkzjiw" role="listbox"></div>'),Bd=h('<div class="filter-dropdown svelte-hkzjiw"><button type="button" aria-haspopup="listbox"><!> <span class="trigger-value svelte-hkzjiw"> </span> <!></button> <!> <!></div>');const qd={hash:"svelte-hkzjiw",code:`.filter-dropdown.svelte-hkzjiw {position:relative;display:inline-flex;align-items:center;}
|
|
202
|
+
|
|
203
|
+
/* ── Trigger ─────────────────────────────── */.trigger.svelte-hkzjiw {display:inline-flex;align-items:center;gap:4px;padding:0;background:none;border:none;cursor:pointer;font-family:inherit;font-size:0.875rem;color:var(--sevn-color-tertiary);white-space:nowrap;}.trigger-label.svelte-hkzjiw {font-weight:700;}.trigger-value.svelte-hkzjiw {font-weight:400;}.trigger-chevron.svelte-hkzjiw {flex-shrink:0;transition:transform 0.2s ease;margin-left:2px;}.trigger-chevron.rotated.svelte-hkzjiw {transform:rotate(180deg);}
|
|
204
|
+
|
|
205
|
+
/* ── Botão de limpar ─────────────────────── */.clear.svelte-hkzjiw {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-left:4px;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.clear.svelte-hkzjiw:hover,
|
|
206
|
+
.clear.svelte-hkzjiw:focus-visible {background:rgba(0, 0, 0, 0.08);}
|
|
207
|
+
|
|
208
|
+
/* ── Dropdown ────────────────────────────── */.dropdown.svelte-hkzjiw {position:absolute;top:calc(100% + 6px);left:0;min-width:100%;background:#fff;border:1px solid #d1d1d6;border-radius:8px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);z-index:200;overflow:hidden;}
|
|
209
|
+
|
|
210
|
+
/* ── Options ─────────────────────────────── */.option.svelte-hkzjiw {display:block;width:100%;padding:10px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.875rem;font-family:inherit;color:var(--sevn-color-tertiary);white-space:nowrap;transition:background 0.1s;}.option.svelte-hkzjiw:last-child {border-bottom:none;}.option.svelte-hkzjiw:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-hkzjiw {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}`};function Jt(a,t){je(t,!0),Me(a,qd);let r=L(t,"label",3,""),l=L(t,"options",19,()=>[]),n=L(t,"value",15,null),i=L(t,"clearable",3,!0),v=U(!1),_=U(null);const c=p(()=>n()!=null?l().find(D=>D.value===n())??null:null);function m(D){n(D.value),s(v,!1)}function g(){n(null),s(v,!1)}function y(D){e(_)&&!e(_).contains(D.target)&&s(v,!1)}Ka(()=>(document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)));var u=Bd(),w=o(u);let z;var x=o(w);{var b=D=>{var q=Rd(),$=o(q);T(()=>Q($,`${r()??""}:`)),f(D,q)};W(x,D=>{r()&&D(b)})}var E=d(x,2),M=o(E),O=d(E,2);{var K=D=>{var q=Pd();let $;T(()=>{$=Ae(q,1,"trigger-chevron svelte-hkzjiw",null,$,{rotated:e(v)}),be(q,"src",Ke)}),f(D,q)};W(O,D=>{e(c)&&i()||D(K)})}var J=d(w,2);{var B=D=>{var q=jd(),$=o(q);T(()=>{be(q,"aria-label",`Limpar ${(r()||"filtro")??""}`),be($,"src",Vr)}),Je("click",q,g),f(D,q)};W(J,D=>{e(c)&&i()&&D(B)})}var Z=d(J,2);{var ae=D=>{var q=Dd();Ee(q,21,l,$=>$.value,($,X)=>{var R=Ld();let F;var P=o(R);T(()=>{F=Ae(R,1,"option svelte-hkzjiw",null,F,{selected:e(X).value===n()}),be(R,"aria-selected",e(X).value===n()),Q(P,e(X).label)}),Je("click",R,()=>m(e(X))),f($,R)}),f(D,q)};W(Z,D=>{e(v)&&D(ae)})}tt(u,D=>s(_,D),()=>e(_)),T(()=>{z=Ae(w,1,"trigger svelte-hkzjiw",null,z,{open:e(v)}),be(w,"aria-expanded",e(v)),Q(M,e(c)?e(c).label:"")}),Je("click",w,()=>s(v,!e(v))),f(a,u),Le()}ca(["click"]);var Fd=h('<img alt="" class="flip svelte-18tlobi"/>'),Td=h('<img alt="" class="svelte-18tlobi"/>'),Od=h("<button> </button>"),Gd=h('<img alt="" class="svelte-18tlobi"/>'),Id=h('<img alt="" class="flip svelte-18tlobi"/>'),Ud=h('<button class="filter-state-clear svelte-18tlobi" type="button" aria-label="Limpar estado selecionado"><img alt="" aria-hidden="true" width="9" height="9"/></button>'),Nd=h('<span class="filter-state-selected svelte-18tlobi"><strong class="svelte-18tlobi">Você selecionou:</strong> <!></span>'),Vd=h('<span class="filter-state-meta svelte-18tlobi"> </span>'),Hd=h('<div class="filter-state-info svelte-18tlobi"><!> <!></div>'),Wd=h('<div class="filter-state svelte-18tlobi"><div class="filter-state-bar svelte-18tlobi"><button class="filter-state-arrow svelte-18tlobi" aria-label="Anterior"><!></button> <div class="filter-state-track svelte-18tlobi"></div> <button class="filter-state-arrow svelte-18tlobi" aria-label="Próximo"><!></button></div> <!></div>');const Jd={hash:"svelte-18tlobi",code:`.filter-state.svelte-18tlobi {display:flex;flex-direction:column;gap:20px;}
|
|
211
|
+
|
|
212
|
+
/* ── Bar ──────────────────────────────── */.filter-state-bar.svelte-18tlobi {display:flex;align-items:center;gap:4px;}
|
|
213
|
+
|
|
214
|
+
/* ── Arrows ───────────────────────────── */.filter-state-arrow.svelte-18tlobi {display:flex;align-items:center;justify-content:center;flex-shrink:0;background:none;border:none;cursor:pointer;padding:4px;border-radius:4px;}.filter-state-arrow.svelte-18tlobi:disabled {cursor:default;}.filter-state-arrow.svelte-18tlobi img:where(.svelte-18tlobi) {width:24px;height:24px;display:block;}.filter-state-arrow.svelte-18tlobi .flip:where(.svelte-18tlobi) {transform:scaleX(-1);}
|
|
215
|
+
|
|
216
|
+
/* ── Track ────────────────────────────── */.filter-state-track.svelte-18tlobi {flex:1;display:flex;gap:6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;}.filter-state-track.svelte-18tlobi::-webkit-scrollbar {display:none;}
|
|
217
|
+
|
|
218
|
+
/* ── Pills ────────────────────────────── */.filter-state-pill.svelte-18tlobi {flex-shrink:0;scroll-snap-align:start;padding:6px 12px;border-radius:8px;border:none;cursor:pointer;font-family:inherit;font-size:var(--pill-font-size);font-weight:600;background-color:var(--sevn-color-neutral);color:var(--sevn-color-tertiary);transition:background-color 0.15s, color 0.15s;white-space:nowrap;line-height:1;}.filter-state-pill.svelte-18tlobi:hover:not(.active) {background-color:#e2e2ea;}.filter-state-pill.active.svelte-18tlobi {background-color:var(--pill-active-bg);color:var(--pill-active-color);}
|
|
219
|
+
|
|
220
|
+
/* ── Info row ─────────────────────────── */.filter-state-info.svelte-18tlobi {display:flex;align-items:baseline;gap:12px;font-size:0.875rem;color:var(--sevn-color-tertiary);}.filter-state-selected.svelte-18tlobi strong:where(.svelte-18tlobi) {font-weight:700;}.filter-state-clear.svelte-18tlobi {display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:2px;padding:0;vertical-align:middle;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.filter-state-clear.svelte-18tlobi:hover,
|
|
221
|
+
.filter-state-clear.svelte-18tlobi:focus-visible {background:rgba(0, 0, 0, 0.08);}.filter-state-meta.svelte-18tlobi {font-size:0.75rem;color:#9a9aaa;}`};function Ya(a,t){je(t,!0),Me(a,Jd);let r=L(t,"states",19,()=>[]),l=L(t,"value",15,null),n=L(t,"activeBackground",3,"var(--sevn-color-tertiary)"),i=L(t,"activeColor",3,"#fff"),v=L(t,"fontSize",3,"0.8125rem"),_=L(t,"showDescriptionSelection",3,!0),c=L(t,"clearable",3,!0),m=U(null),g=U(!1),y=U(!1);function u(){e(m)&&(s(g,e(m).scrollLeft>0),s(y,e(m).scrollLeft+e(m).clientWidth<e(m).scrollWidth-1))}Ce(()=>{if(!e(m))return;u(),e(m).addEventListener("scroll",u);const R=new ResizeObserver(u);return R.observe(e(m)),()=>{e(m).removeEventListener("scroll",u),R.disconnect()}});function w(){e(m)?.scrollBy({left:-160,behavior:"smooth"})}function z(){e(m)?.scrollBy({left:160,behavior:"smooth"})}const x=p(()=>r().find(R=>R.value===l())?.label??null);var b=Wd(),E=o(b),M=o(E),O=o(M);{var K=R=>{var F=Fd();T(()=>be(F,"src",sa)),f(R,F)},J=R=>{var F=Td();T(()=>be(F,"src",Da)),f(R,F)};W(O,R=>{e(g)?R(K):R(J,!1)})}var B=d(M,2);Ee(B,21,r,Pe,(R,F)=>{var P=Od();let ie;var le=o(P);T(I=>{ie=Ae(P,1,"filter-state-pill svelte-18tlobi",null,ie,{active:l()===e(F).value}),Q(le,I)},[()=>e(F).value.toUpperCase()]),Je("click",P,()=>l(l()===e(F).value?null:e(F).value)),f(R,P)}),tt(B,R=>s(m,R),()=>e(m));var Z=d(B,2),ae=o(Z);{var D=R=>{var F=Gd();T(()=>be(F,"src",sa)),f(R,F)},q=R=>{var F=Id();T(()=>be(F,"src",Da)),f(R,F)};W(ae,R=>{e(y)?R(D):R(q,!1)})}var $=d(E,2);{var X=R=>{var F=Hd(),P=o(F);{var ie=ne=>{var _e=Nd(),ge=d(o(_e)),fe=d(ge);{var he=pe=>{var Y=Ud(),se=o(Y);T(()=>be(se,"src",Vr)),Je("click",Y,()=>l(null)),f(pe,Y)};W(fe,pe=>{c()&&pe(he)})}T(()=>Q(ge,` ${e(x)??""} `)),f(ne,_e)};W(P,ne=>{e(x)&&ne(ie)})}var le=d(P,2);{var I=ne=>{var _e=Vd(),ge=o(_e);T(()=>Q(ge,t.meta)),f(ne,_e)};W(le,ne=>{t.meta&&ne(I)})}f(R,F)};W($,R=>{_()&&(e(x)||t.meta)&&R(X)})}T(()=>{Se(E,`--pill-active-bg: ${n()??""}; --pill-active-color: ${i()??""}; --pill-font-size: ${v()??""};`),M.disabled=!e(g),Z.disabled=!e(y)}),Je("click",M,w),Je("click",Z,z),f(a,b),Le()}ca(["click"]);var Kd=h('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),Xd=h('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Yd=h('<p class="header-description svelte-1xm1ks6"> </p>'),Zd=h('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Qd={hash:"svelte-1xm1ks6",code:`.header.svelte-1xm1ks6 {display:flex;flex-direction:column;gap:4px;}.header-tag-inline.svelte-1xm1ks6 {display:none;}.header-title-row.svelte-1xm1ks6 {display:flex;align-items:center;gap:10px;}.header-title.svelte-1xm1ks6 {font-size:var(--header-title-font-size);font-weight:var(--header-title-font-weight);color:var(--sevn-color-tertiary);line-height:1.15;}.header-description.svelte-1xm1ks6 {font-size:var(--header-description-font-size);color:var(--sevn-color-tertiary);}
|
|
222
|
+
|
|
223
|
+
@media (max-width: 767px) {.header-title.svelte-1xm1ks6 {font-size:calc(var(--header-title-font-size) * 0.75);max-width:60%;}.header-description.svelte-1xm1ks6 {font-size:calc(var(--header-description-font-size) * 0.9);}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
|
|
227
|
+
}`};function Ye(a,t){Me(a,Qd);var r=Zd(),l=o(r);{var n=u=>{var w=Kd(),z=o(w);nt(z,{get label(){return t.tag},get color(){return t.tagColor}}),f(u,w)};W(l,u=>{t.tag&&u(n)})}var i=d(l,2),v=o(i),_=o(v),c=d(v,2);{var m=u=>{var w=Xd(),z=o(w);nt(z,{get label(){return t.tag},get color(){return t.tagColor}}),f(u,w)};W(c,u=>{t.tag&&u(m)})}var g=d(i,2);{var y=u=>{var w=Yd(),z=o(w);T(()=>Q(z,t.description)),f(u,w)};W(g,u=>{t.description&&u(y)})}T(()=>{Se(r,`
|
|
228
|
+
--header-title-font-size: ${t.titleFontSize??"1.75rem"??""};
|
|
229
|
+
--header-title-font-weight: ${t.titleFontWeight??700??""};
|
|
230
|
+
--header-description-font-size: ${t.descriptionFontSize??"0.875rem"??""};
|
|
231
|
+
`),Q(_,t.title)}),f(a,r)}var $d=h('<div class="leadership-moment-leader svelte-100kaho"><!></div> <hr class="leadership-moment-divider svelte-100kaho"/>',1),ev=h('<span class="leadership-moment-runner-position svelte-100kaho"> </span>'),tv=h('<div class="leadership-moment-runner svelte-100kaho"><!> <!></div>'),av=h('<div class="leadership-moment-runners svelte-100kaho"></div>'),rv=h('<hr class="leadership-moment-divider svelte-100kaho"/>'),ov=h('<div class="leadership-moment-mobile-row svelte-100kaho"><!></div> <!>',1),nv=h('<p class="leadership-moment-footer svelte-100kaho"><!><!><!></p>'),lv=h('<div class="leadership-moment svelte-100kaho"><h2 class="leadership-moment-title svelte-100kaho">Liderança do momento:</h2> <div class="leadership-moment-layout-desktop svelte-100kaho"><!> <!></div> <div class="leadership-moment-layout-mobile svelte-100kaho"></div> <!></div>');const sv={hash:"svelte-100kaho",code:`.leadership-moment.svelte-100kaho {display:flex;flex-direction:column;gap:16px;}.leadership-moment-title.svelte-100kaho {font-size:1.375rem;font-weight:700;color:var(--sevn-color-tertiary);margin:0;}
|
|
232
|
+
|
|
233
|
+
/* ── Desktop ── */.leadership-moment-layout-desktop.svelte-100kaho {display:flex;flex-direction:column;gap:16px;}.leadership-moment-layout-mobile.svelte-100kaho {display:none;}.leadership-moment-leader.svelte-100kaho {padding-bottom:4px;}.leadership-moment-divider.svelte-100kaho {border:none;border-top:1px solid #e0e0e0;margin:0;}.leadership-moment-runners.svelte-100kaho {display:grid;grid-template-columns:1fr 1fr;gap:24px;}.leadership-moment-runner.svelte-100kaho {display:flex;flex-direction:column;gap:8px;}.leadership-moment-runner-position.svelte-100kaho {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.7;}
|
|
234
|
+
|
|
235
|
+
/* ── Mobile ── */
|
|
236
|
+
@media (max-width: 600px) {.leadership-moment-layout-desktop.svelte-100kaho {display:none;}.leadership-moment-title.svelte-100kaho {display:none;}.leadership-moment-layout-mobile.svelte-100kaho {display:flex;flex-direction:column;gap:16px;margin-top:10px;}.leadership-moment-mobile-row.svelte-100kaho {padding:4px 0;}
|
|
237
|
+
}.leadership-moment-footer.svelte-100kaho {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;margin:0;}`};function _o(a,t){je(t,!0),Me(a,sv);let r=L(t,"candidates",19,()=>[]);const l=p(()=>r()[0]),n=p(()=>r().slice(1,3));var i=lv(),v=d(o(i),2),_=o(v);{var c=z=>{var x=$d(),b=ze(x),E=o(b);bt(E,{get name(){return e(l).name},get photoUrl(){return e(l).photoUrl},get avatar(){return e(l).avatar},get avatarColor(){return e(l).avatarColor},get tag(){return e(l).tag},get tagColor(){return e(l).tagColor},get description(){return e(l).description},descSize:"0.875rem",size:"lg",wrapper:!0}),f(z,x)};W(_,z=>{e(l)&&z(c)})}var m=d(_,2);{var g=z=>{var x=av();Ee(x,21,()=>e(n),Pe,(b,E)=>{var M=tv(),O=o(M);{var K=B=>{var Z=ev(),ae=o(Z);T(()=>Q(ae,e(E).position)),f(B,Z)};W(O,B=>{e(E).position&&B(K)})}var J=d(O,2);bt(J,{get name(){return e(E).name},get photoUrl(){return e(E).photoUrl},get avatar(){return e(E).avatar},get avatarColor(){return e(E).avatarColor},get tag(){return e(E).tag},get tagColor(){return e(E).tagColor},get description(){return e(E).description},size:"sm",wrapper:!0}),f(b,M)}),f(z,x)};W(m,z=>{e(n).length&&z(g)})}var y=d(v,2);Ee(y,21,()=>r().slice(0,3),Pe,(z,x,b)=>{var E=ov(),M=ze(E),O=o(M);bt(O,{get name(){return e(x).name},get photoUrl(){return e(x).photoUrl},get avatar(){return e(x).avatar},get avatarColor(){return e(x).avatarColor},get tag(){return e(x).tag},get tagColor(){return e(x).tagColor},get description(){return e(x).description},get position(){return e(x).position},positionSide:"right",positionSize:"0.8rem",size:"sm"});var K=d(M,2);{var J=Z=>{var ae=rv();f(Z,ae)},B=p(()=>b<r().slice(0,3).length-1);W(K,Z=>{e(B)&&Z(J)})}f(z,E)});var u=d(y,2);{var w=z=>{var x=nv(),b=o(x);{var E=B=>{var Z=Yt();T(()=>Q(Z,`Atualizado em ${t.date??""}`)),f(B,Z)};W(b,B=>{t.date&&B(E)})}var M=d(b);{var O=B=>{var Z=Yt();Z.nodeValue=" | ",f(B,Z)};W(M,B=>{t.date&&t.font&&B(O)})}var K=d(M);{var J=B=>{var Z=Yt();T(()=>Q(Z,`Fonte ${t.font??""}`)),f(B,Z)};W(K,B=>{t.font&&B(J)})}f(z,x)};W(u,z=>{(t.date||t.font)&&z(w)})}f(a,i),Le()}const fo=new Map,tr=new Map;function iv(a){const t=fo.get(a);if(t!==void 0)return Promise.resolve(t);const r=tr.get(a);if(r)return r;const l=dr(`maps/${a}.svg`),n=fetch(l).then(i=>{if(!i.ok)throw new Error(`Mapa indisponível (HTTP ${i.status}): ${a}`);return i.text()}).then(i=>(fo.set(a,i),tr.delete(a),i)).catch(i=>{throw tr.delete(a),i});return tr.set(a,n),n}function dv(){return dr("data/cities-index.json")}let vv=0;var cv=h('<img alt="Mapa do Brasil" decoding="async" class="svelte-1956iuh"/>'),uv=h('<div class="map-placeholder svelte-1956iuh" aria-hidden="true"></div>'),pv=h('<div class="map-error svelte-1956iuh">Mapa não encontrado</div>'),_v=h('<p class="map-modal-title svelte-1956iuh"> </p>'),fv=h('<div class="map-modal-item svelte-1956iuh"><!></div>'),mv=h('<div class="map-modal-footer svelte-1956iuh"> </div>'),gv=h('<div class="map-modal svelte-1956iuh" role="dialog" tabindex="-1"><div class="map-modal-card svelte-1956iuh"><!> <!> <!></div></div>'),bv=h("<div><!> <!> <!></div>");const hv={hash:"svelte-1956iuh",code:`.map.svelte-1956iuh {display:block;width:100%;}.map.svelte-1956iuh img:where(.svelte-1956iuh),
|
|
238
|
+
.map.svelte-1956iuh svg {width:100%;height:100%;display:block;}
|
|
239
|
+
|
|
240
|
+
/* Default fill for uncolored paths */.map.svelte-1956iuh path {fill:var(--sevn-color-neutral);}
|
|
241
|
+
|
|
242
|
+
/* Pointer cursor and smooth hover on clickable regions */.map.interactive.svelte-1956iuh path[data-cid],
|
|
243
|
+
.map.interactive.svelte-1956iuh g[data-cid],
|
|
244
|
+
.map.interactive.svelte-1956iuh a[data-cid] {cursor:pointer;}.map.interactive.svelte-1956iuh path[data-cid],
|
|
245
|
+
.map.interactive.svelte-1956iuh a[data-cid] path {transition:filter 0.12s ease;}.map.interactive.svelte-1956iuh path[data-cid]:hover,
|
|
246
|
+
.map.interactive.svelte-1956iuh a[data-cid]:hover path {filter:brightness(1.15);}
|
|
247
|
+
|
|
248
|
+
/* State labels: font-size is set as SVG attr (0.8 user units) so it scales with the map.
|
|
249
|
+
stroke-width in em stays proportional to font-size. */.map.svelte-1956iuh .map-labels text {font-family:inherit;font-weight:600;fill:white;stroke:rgba(0, 0, 0, 0.35);stroke-width:0.06em;paint-order:stroke fill;letter-spacing:0.04em;}
|
|
250
|
+
|
|
251
|
+
/* Floating modal — positioned at the click point inside the map container.
|
|
252
|
+
transform centers it horizontally and places it above the cursor. */.map-modal.svelte-1956iuh {position:absolute;z-index:10;transform:translate(-50%, calc(-100% - 12px));pointer-events:auto;}.map-modal-card.svelte-1956iuh {background:white;border-radius:10px;box-shadow:0 4px 20px rgba(0, 0, 0, 0.15);padding:14px 16px;min-width:210px;font-family:inherit;}.map-modal-title.svelte-1956iuh {font-size:0.8125rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0 0 10px;}.map-modal-item.svelte-1956iuh {margin-bottom:10px;}.map-modal-footer.svelte-1956iuh {border-top:1px solid #f0f0f5;margin-top:10px;padding-top:8px;font-size:0.75rem;color:#9a9aaa;}.map-placeholder.svelte-1956iuh {position:absolute;inset:0;background:var(--sevn-color-neutral);border-radius:4px;
|
|
253
|
+
animation: svelte-1956iuh-pulse 1.4s ease-in-out infinite;}.map-error.svelte-1956iuh {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--sevn-color-red);font-size:0.85rem;}.map-modal-card.svelte-1956iuh .candidate {justify-content:flex-start;}
|
|
254
|
+
|
|
255
|
+
@keyframes svelte-1956iuh-pulse {
|
|
256
|
+
0%, 100% { opacity: 1; }
|
|
257
|
+
50% { opacity: 0.4; }
|
|
258
|
+
}`};function pt(a,t){je(t,!0),Me(a,hv);let r=L(t,"aspectRatio",3,"4/3"),l=L(t,"class",3,""),n=L(t,"priority",3,!1),i=L(t,"selectionStrokeWidth",3,3),v=L(t,"toggleSelection",3,!1),_=L(t,"modalTrigger",3,"click");const c=p(()=>_()==="click"||_()==="both"),m=p(()=>_()==="hover"||_()==="both"),g=++vv,y=dr("maps/brazil-municipalities.svg");let u=p(()=>t.type==="brazil"?`map--brazil-${g}`:t.type==="state"?`map--state-${t.uf??""}-${g}`:`map--muni-${t.uf??""}-${t.municipio??""}-${g}`),w=p(()=>!!t.interactive||!!t.onRegionClick||!!t.onRegionHover||!!t.selectionStroke||!!t.modalData),z=p(()=>t.type==="brazil-states"||t.type!=="brazil"||!!t.colors?.length||!!t.labels||!!t.onRegionClick||!!t.onRegionHover||!!t.selectionStroke||!!t.modalData),x=p(()=>e(z)?t.type==="brazil-states"?"br":t.type==="brazil"&&t.labels?"brazil-municipalities-labeled":t.type==="brazil"?"brazil-municipalities":t.type==="state"&&t.uf?`states/${t.uf}`:t.uf&&t.municipio?`municipalities/${t.uf}/${t.municipio}`:null:null),b=U(null);Ce(()=>{t.selected!==void 0&&s(b,t.selected,!0)});let E=U(null),M=U(0),O=U(0),K=U(""),J=U(!1),B=U(!1),Z=p(()=>t.type==="brazil"||t.type==="state"?`.${e(u)} path{stroke:#8a8a92;stroke-width:0.5px;vector-effect:non-scaling-stroke}`:""),ae=p(()=>t.colors?.length?t.colors.map(({id:A,color:k,match:ee})=>{const H=ee==="endsWith"?`[data-cid$="::${A}"]`:`[data-cid="${A}"]`;return`.${e(u)} path${H},.${e(u)} ${H} path{fill:${k}!important}`}).join(""):""),D=p(()=>e(b)&&t.selectionStroke?`.${e(u)} [data-cid="${e(b)}"] path{stroke:${t.selectionStroke}!important;stroke-width:${i()}px!important;vector-effect:non-scaling-stroke!important;paint-order:stroke fill!important}`:""),q=p(()=>Fe?e(Z)+e(ae)+e(D):""),$,X=0;Ce(()=>{const A=e(x);if(!A){s(K,""),s(J,!1);return}const k=++X;function ee(){s(J,!0),s(B,!1),s(K,""),iv(A).then(G=>{k===X&&(s(K,G,!0),s(J,!1),queueMicrotask(()=>{const C=$?.querySelector("svg");if(!C)return;const j=C.querySelector(".map-labels");if(j){C.appendChild(j);return}C.querySelectorAll("text").forEach(te=>C.appendChild(te))}))}).catch(()=>{k===X&&(s(B,!0),s(J,!1))})}if(n()){ee();return}if(!$){ee();return}const H=new IntersectionObserver(([G])=>{G.isIntersecting&&(H.disconnect(),ee())},{rootMargin:"200px"});return H.observe($),()=>H.disconnect()}),Ce(()=>{if(!t.modalData)return;function A(k){k.key==="Escape"&&s(E,null)}return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)});let R=U(null);function F(A,k){const ee=k.getAttribute("data-cid")??"",H=ee.split("::"),G=H.length>1?H[1]||void 0:H[0]||void 0,C=H.length>1&&H[0]||void 0;return{cid:ee,uf:G,municipio:C,clientX:A.clientX,clientY:A.clientY,element:k}}function P(A){if(!e(w))return;const k=A.target.closest("[data-cid]");if(!k){_()==="click"&&s(E,null);return}const ee=k.getAttribute("data-cid")??"";if(!ee)return;s(b,v()&&e(b)===ee?null:ee,!0);const H=k.closest("svg"),G=k.parentNode;if(H&&G)if(G===H){const j=H.querySelector(":scope > .map-labels")??Array.from(H.children).find(te=>te.nodeName==="text");j?H.insertBefore(k,j):H.appendChild(k)}else G.appendChild(k);const C=F(A,k);if(t.modalData&&e(c))if(e(E)?.cid===ee)s(E,null);else{const j=A.currentTarget.getBoundingClientRect();s(M,A.clientX-j.left),s(O,A.clientY-j.top),s(E,C,!0)}t.onRegionClick?.(C)}function ie(A){if(!e(w)||!t.onRegionHover&&!e(m))return;const k=A.target.closest("[data-cid]");if(!k)return;const ee=k.getAttribute("data-cid")??"";if(!ee||ee===e(R))return;s(R,ee,!0);const H=F(A,k);if(t.modalData&&e(m)){const G=A.currentTarget.getBoundingClientRect();s(M,A.clientX-G.left),s(O,A.clientY-G.top),s(E,H,!0)}t.onRegionHover?.(H)}function le(){s(R,null),e(m)&&s(E,null)}var I=bv();let ne;var _e=o(I);{var ge=A=>{var k=st(),ee=ze(k);ro(ee,()=>`<style>${e(q)}</style>`),f(A,k)};W(_e,A=>{e(q)&&A(ge)})}var fe=d(_e,2);{var he=A=>{var k=cv();T(()=>{be(k,"src",y),be(k,"fetchpriority",n()?"high":"auto"),be(k,"loading",n()?"eager":"lazy")}),f(A,k)},pe=A=>{var k=uv();f(A,k)},Y=A=>{var k=pv();f(A,k)},se=A=>{var k=st(),ee=ze(k);ro(ee,()=>e(K)),f(A,k)};W(fe,A=>{t.type==="brazil"&&!e(K)&&!e(J)?A(he):e(J)?A(pe,1):e(B)?A(Y,2):e(K)&&A(se,3)})}var me=d(fe,2);{var ce=A=>{const k=p(()=>t.modalData[e(E).cid]);var ee=st(),H=ze(ee);{var G=C=>{var j=gv(),te=o(j),V=o(te);{var ve=re=>{var ue=_v(),xe=o(ue);T(()=>Q(xe,`${e(k).title??""}:`)),f(re,ue)};W(V,re=>{e(k).title&&re(ve)})}var S=d(V,2);Ee(S,17,()=>e(k).items,Pe,(re,ue)=>{var xe=fv(),we=o(xe);bt(we,{get name(){return e(ue).name},get tag(){return e(ue).tag},get tagColor(){return e(ue).tagColor},get photoUrl(){return e(ue).photoUrl},get avatar(){return e(ue).avatar},get avatarColor(){return e(ue).avatarColor},get description(){return e(ue).description},get descriptionSide(){return e(ue).descriptionSide},get position(){return e(ue).position},positionSide:"left",size:"sm",wrapper:!0}),f(re,xe)});var oe=d(S,2);{var N=re=>{var ue=mv(),xe=o(ue);T(()=>Q(xe,e(k).footer)),f(re,ue)};W(oe,re=>{e(k).footer&&re(N)})}T(()=>Se(j,`left:${e(M)??""}px;top:${e(O)??""}px`)),Je("click",j,re=>re.stopPropagation()),Je("keydown",j,re=>re.stopPropagation()),f(C,j)};W(H,C=>{e(k)&&C(G)})}f(A,ee)};W(me,A=>{t.modalData&&e(E)&&A(ce)})}tt(I,A=>$=A,()=>$),T(()=>{ne=Ae(I,1,`map ${e(u)??""} ${l()??""}`,"svelte-1956iuh",ne,{loading:e(J),error:e(B),interactive:e(w)}),Se(I,`aspect-ratio:${r()??""};contain:layout;position:relative`),be(I,"role",e(w)?"group":void 0)}),Je("click",I,P),Je("mousemove",I,ie),ht("mouseleave",I,le),f(a,I),Le()}ca(["click","mousemove","keydown"]);var xv=it("<circle></circle>"),wv=it("<circle></circle><!>",1),yv=it('<path style="cursor: pointer; transition: opacity 0.2s;" role="button" tabindex="0"></path><!>',1),Cv=it("<path></path><!>",1),kv=it('<text text-anchor="middle" dominant-baseline="middle" class="multi-ring-center-label svelte-potaj2"> </text>'),Sv=it('<text text-anchor="middle" dominant-baseline="middle" class="multi-ring-center-sub svelte-potaj2"> </text>'),zv=h('<div class="multi-ring-tooltip-label svelte-potaj2"> </div>'),Av=h('<div class="multi-ring-tooltip svelte-potaj2"><div class="multi-ring-tooltip-content svelte-potaj2"><div class="multi-ring-tooltip-header svelte-potaj2"></div> <div class="multi-ring-tooltip-body svelte-potaj2"><!> <div class="multi-ring-tooltip-value svelte-potaj2"> </div></div></div> <div class="multi-ring-tooltip-arrow svelte-potaj2"></div></div>'),Mv=h('<div class="multi-ring-chart svelte-potaj2"><svg viewBox="0 0 200 200" role="img" aria-label="Gráfico de anéis" class="svelte-potaj2"><!><!><!></svg> <!></div>');const Ev={hash:"svelte-potaj2",code:`.multi-ring-chart.svelte-potaj2 {display:inline-block;}svg.svelte-potaj2 {width:100%;height:100%;display:block;}.multi-ring-center-label.svelte-potaj2 {font-family:inherit;font-weight:700;fill:var(--sevn-color-tertiary);}.multi-ring-center-sub.svelte-potaj2 {font-family:inherit;font-weight:500;fill:#9a9aaa;}
|
|
259
|
+
|
|
260
|
+
/* ── Hover effect ─────────────────────── */svg.svelte-potaj2 path.hovered:where(.svelte-potaj2) {opacity:0.8;filter:brightness(1.1);}
|
|
261
|
+
|
|
262
|
+
/* ── Tooltip ──────────────────────────── */.multi-ring-tooltip.svelte-potaj2 {position:fixed;left:var(--tooltip-x);top:var(--tooltip-y);transform:translate(-50%, -100%);z-index:1000;pointer-events:none;
|
|
263
|
+
animation: svelte-potaj2-slideUp 0.2s ease-out;}
|
|
264
|
+
|
|
265
|
+
@keyframes svelte-potaj2-slideUp {
|
|
266
|
+
from {
|
|
267
|
+
opacity: 0;
|
|
268
|
+
transform: translate(-50%, -90%);
|
|
269
|
+
}
|
|
270
|
+
to {
|
|
271
|
+
opacity: 1;
|
|
272
|
+
transform: translate(-50%, -100%);
|
|
273
|
+
}
|
|
274
|
+
}.multi-ring-tooltip-content.svelte-potaj2 {background:white;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;min-width:140px;}.multi-ring-tooltip-header.svelte-potaj2 {height:4px;width:100%;}.multi-ring-tooltip-body.svelte-potaj2 {padding:12px 16px;display:flex;flex-direction:column;gap:4px;}.multi-ring-tooltip-label.svelte-potaj2 {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary, #1c1c1c);text-transform:uppercase;letter-spacing:0.05em;}.multi-ring-tooltip-value.svelte-potaj2 {font-size:1.125rem;font-weight:700;color:var(--sevn-color-tertiary, #1c1c1c);}.multi-ring-tooltip-arrow.svelte-potaj2 {position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;filter:drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));}`};function jr(a,t){je(t,!0),Me(a,Ev);let r=L(t,"rings",19,()=>[]),l=L(t,"size",3,"200px"),n=L(t,"outerRadius",3,85),i=L(t,"thickness",3,10),v=L(t,"ringGap",3,4),_=L(t,"trackColor",3,"#e5e5ea"),c=L(t,"centerLabelSize",3,22),m=L(t,"centerSubSize",3,10),g=L(t,"roundCaps",3,!0);const y=100,u=100;let w=U(null),z=U(He({x:0,y:0}));function x(le,I){s(w,I,!0);const ne=le.currentTarget.getBoundingClientRect();s(z,{x:ne.left+ne.width/2,y:ne.top-10},!0)}function b(){s(w,null)}const E=p(()=>Math.min(n(),100)),M=p(()=>Math.min(i(),10)),O=p(()=>Math.min(v(),5)),K=p(()=>{const le=e(M)+e(O);if(r().length<=1)return le;const ne=Math.max(e(E)-4,e(M))/r().length;return Math.min(le,ne)}),J=p(()=>{const le=e(M)+e(O);return e(K)>=le?e(M):Math.max(1,e(K)*(e(M)/le))});function B(le){return le*Math.PI/180}const Z=p(()=>r().map((le,I)=>{const ne=e(E)-I*e(K),_e=ne-e(J)/2,ge=-90+Math.min(le.value,100)/100*360;return{track:Rr(y,u,ne,-90,269.9999,e(J)),arc:Rr(y,u,ne,-90,ge,e(J)),color:le.color,capR:e(J)/2,startX:y+_e*Math.cos(B(-90)),startY:u+_e*Math.sin(B(-90)),endX:y+_e*Math.cos(B(ge)),endY:u+_e*Math.sin(B(ge)),value:Math.min(le.value,100)}}));var ae=Mv(),D=o(ae),q=o(D);Ee(q,17,()=>e(Z),Pe,(le,I,ne)=>{var _e=Cv(),ge=ze(_e),fe=d(ge);{var he=pe=>{var Y=yv(),se=ze(Y);let me;var ce=d(se);{var A=k=>{var ee=wv(),H=ze(ee),G=d(H);{var C=j=>{var te=xv();T(()=>{be(te,"cx",e(I).endX),be(te,"cy",e(I).endY),be(te,"r",e(I).capR),be(te,"fill",e(I).color)}),f(j,te)};W(G,j=>{e(I).value<100&&j(C)})}T(()=>{be(H,"cx",e(I).startX),be(H,"cy",e(I).startY),be(H,"r",e(I).capR),be(H,"fill",e(I).color)}),f(k,ee)};W(ce,k=>{g()&&k(A)})}T(()=>{be(se,"d",e(I).arc),be(se,"fill",e(I).color),me=Ae(se,0,"svelte-potaj2",null,me,{hovered:e(w)===ne})}),ht("mouseenter",se,k=>x(k,ne)),ht("mouseleave",se,b),f(pe,Y)};W(fe,pe=>{e(I).color&&e(I).value>0&&pe(he)})}T(()=>{be(ge,"d",e(I).track),be(ge,"fill",_())}),f(le,_e)});var $=d(q);{var X=le=>{var I=kv();be(I,"x",y);var ne=o(I);T(()=>{be(I,"y",t.centerSub?u-6:u),Se(I,`font-size: ${c()??""}px`),Q(ne,t.centerLabel)}),f(le,I)};W($,le=>{t.centerLabel&&le(X)})}var R=d($);{var F=le=>{var I=Sv();be(I,"x",y),be(I,"y",u+18);var ne=o(I);T(()=>{Se(I,`font-size: ${m()??""}px`),Q(ne,t.centerSub)}),f(le,I)};W(R,le=>{t.centerSub&&le(F)})}var P=d(D,2);{var ie=le=>{const I=p(()=>r()[e(w)]);var ne=Av(),_e=o(ne),ge=o(_e),fe=d(ge,2),he=o(fe);{var pe=me=>{var ce=zv(),A=o(ce);T(()=>Q(A,e(I).label)),f(me,ce)};W(he,me=>{e(I).label&&me(pe)})}var Y=d(he,2),se=o(Y);T(me=>{Se(ne,`--tooltip-x: ${e(z).x??""}px; --tooltip-y: ${e(z).y??""}px;`),Se(ge,`background-color: ${e(I).color??""};`),Q(se,`${me??""}%`)},[()=>e(I).value.toFixed(1)]),f(le,ne)};W(P,le=>{e(w)!==null&&r()[e(w)]&&le(ie)})}T(()=>Se(ae,`width: ${l()??""}; height: ${l()??""};`)),f(a,ae),Le()}var Rv=h('<p class="map-legend-title svelte-p7lxz6"> </p>'),Pv=h("<div></div>"),jv=h('<span class="map-legend-label svelte-p7lxz6"> </span>'),Lv=h('<div class="map-legend-labels svelte-p7lxz6"></div>'),Dv=h('<span class="map-legend-extreme-label svelte-p7lxz6"><img alt="arrow-start" class="map-legend-arrow map-legend-arrow--start svelte-p7lxz6"/> </span>'),Bv=h("<span></span>"),qv=h('<span class="map-legend-extreme-label svelte-p7lxz6"> <img alt="arrow-end" class="map-legend-arrow map-legend-arrow--end svelte-p7lxz6"/></span>'),Fv=h('<div class="map-legend-extremes svelte-p7lxz6"><!> <!></div>'),Tv=h('<div><!> <div class="map-legend-bar svelte-p7lxz6"></div> <!></div>');const Ov={hash:"svelte-p7lxz6",code:`.map-legend.svelte-p7lxz6 {width:100%;display:flex;flex-direction:column;gap:4px;font-family:inherit;box-sizing:border-box;}.map-legend-title.svelte-p7lxz6 {margin:0 0 4px;font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.map-legend-bar.svelte-p7lxz6 {display:flex;height:14px;border-radius:3px;min-width:0;}.map-legend-segment.svelte-p7lxz6 {flex:1;min-width:0;}.map-legend-segment.svelte-p7lxz6:first-child {border-radius:3px 0 0 3px;}.map-legend-segment.svelte-p7lxz6:last-child {border-radius:0 3px 3px 0;}.map-legend-segment.svelte-p7lxz6:only-child {border-radius:3px;}.map-legend-segment--hoverable.svelte-p7lxz6 {position:relative;cursor:default;}.map-legend-segment--hoverable.svelte-p7lxz6:hover::after {content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);z-index:2;padding:4px 8px;border-radius:4px;background:var(--sevn-color-tertiary, #1a1a2e);color:#fff;font-size:0.7rem;font-weight:500;line-height:1.2;white-space:nowrap;pointer-events:none;}.map-legend-segment--hoverable.svelte-p7lxz6:hover::before {content:'';position:absolute;bottom:calc(100% + 2px);left:50%;transform:translateX(-50%);z-index:2;border:4px solid transparent;border-top-color:var(--sevn-color-tertiary, #1a1a2e);pointer-events:none;}.map-legend-labels.svelte-p7lxz6 {display:flex;min-width:0;}.map-legend-label.svelte-p7lxz6 {flex:1;font-size:0.65rem;color:var(--sevn-color-tertiary);text-align:left;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.map-legend-extremes.svelte-p7lxz6 {display:flex;justify-content:space-between;min-width:0;gap:4px;margin-top:10px;}.map-legend-extreme-label.svelte-p7lxz6 {display:inline-flex;align-items:center;gap:3px;font-size:0.70rem;color:var(--sevn-color-tertiary);white-space:nowrap;min-width:0;overflow:hidden;}.map-legend-arrow.svelte-p7lxz6 {width:12px;height:12px;flex-shrink:0;}.map-legend-arrow--start.svelte-p7lxz6 {transform:scaleX(-1);}
|
|
275
|
+
|
|
276
|
+
@media (max-width: 480px) {.map-legend-title.svelte-p7lxz6 {font-size:0.7rem;}.map-legend-bar.svelte-p7lxz6 {height:10px;}.map-legend-label.svelte-p7lxz6,
|
|
277
|
+
.map-legend-extreme-label.svelte-p7lxz6 {font-size:0.6rem;}.map-legend-arrow.svelte-p7lxz6 {width:10px;height:10px;}
|
|
278
|
+
}`};function va(a,t){je(t,!0),Me(a,Ov);let r=L(t,"sortSegments",3,!1),l=L(t,"class",3,"");const n=x=>x.label??x.tooltip??"";let i=p(()=>r()?[...t.segments].sort((x,b)=>n(x).localeCompare(n(b),"pt-BR")):t.segments),v=p(()=>e(i).some(x=>x.label)),_=p(()=>!!(t.startLabel||t.endLabel));var c=Tv(),m=o(c);{var g=x=>{var b=Rv(),E=o(b);T(()=>Q(E,t.title)),f(x,b)};W(m,x=>{t.title&&x(g)})}var y=d(m,2);Ee(y,21,()=>e(i),Pe,(x,b)=>{var E=Pv();let M;T(()=>{M=Ae(E,1,"map-legend-segment svelte-p7lxz6",null,M,{"map-legend-segment--hoverable":e(b).tooltip}),Se(E,`background:${e(b).color??""}`),be(E,"data-tooltip",e(b).tooltip),be(E,"role",e(b).tooltip?"img":void 0),be(E,"aria-label",e(b).tooltip)}),f(x,E)});var u=d(y,2);{var w=x=>{var b=Lv();Ee(b,21,()=>e(i),Pe,(E,M)=>{var O=jv(),K=o(O);T(()=>Q(K,e(M).label??"")),f(E,O)}),f(x,b)},z=x=>{var b=Fv(),E=o(b);{var M=B=>{var Z=Dv(),ae=o(Z),D=d(ae);T(()=>{be(ae,"src",sa),Q(D,` ${t.startLabel??""}`)}),f(B,Z)},O=B=>{var Z=Bv();f(B,Z)};W(E,B=>{t.startLabel?B(M):B(O,!1)})}var K=d(E,2);{var J=B=>{var Z=qv(),ae=o(Z),D=d(ae);T(()=>{Q(ae,`${t.endLabel??""} `),be(D,"src",sa)}),f(B,Z)};W(K,B=>{t.endLabel&&B(J)})}f(x,b)};W(u,x=>{e(v)?x(w):e(_)&&x(z,1)})}T(()=>Ae(c,1,`map-legend ${l()??""}`,"svelte-p7lxz6")),f(a,c),Le()}var Gv=h('<div class="ranking-tag-row svelte-x90jc1"><span class="ranking-tag-position svelte-x90jc1"> </span> <!> <span class="ranking-tag-votes svelte-x90jc1"> </span></div>'),Iv=h('<div class="ranking-tag svelte-x90jc1"></div>');const Uv={hash:"svelte-x90jc1",code:`.ranking-tag.svelte-x90jc1 {display:flex;flex-direction:column;width:100%;}.ranking-tag-row.svelte-x90jc1 {display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--sevn-color-neutral, #EBEBEF);}.ranking-tag-row.svelte-x90jc1:last-child {border-bottom:none;}.ranking-tag-position.svelte-x90jc1 {font-size:0.9375rem;font-weight:700;color:var(--sevn-color-tertiary, #1C1C1C);min-width:28px;text-align:right;flex-shrink:0;}.ranking-tag-votes.svelte-x90jc1 {font-size:0.9375rem;font-weight:400;color:var(--sevn-color-tertiary, #1C1C1C);white-space:nowrap;}
|
|
279
|
+
|
|
280
|
+
/* Mobile */
|
|
281
|
+
@media (max-width: 640px) {.ranking-tag-row.svelte-x90jc1 {gap:10px;padding:12px 0;}.ranking-tag-position.svelte-x90jc1 {font-size:0.8125rem;min-width:24px;}.ranking-tag-votes.svelte-x90jc1 {font-size:0.8125rem;}
|
|
282
|
+
}`};function Nv(a,t){Me(a,Uv);let r=L(t,"items",19,()=>[]),l=L(t,"voteLabel",3,"Votos");function n(v){return v.toLocaleString("pt-BR")}var i=Iv();Ee(i,21,r,v=>v.position,(v,_)=>{var c=Gv(),m=o(c),g=o(m),y=d(m,2);{let z=p(()=>e(_).tagColor??"#1C1C1C");nt(y,{get label(){return e(_).tag},get color(){return e(z)}})}var u=d(y,2),w=o(u);T(z=>{Q(g,`${e(_).position??""}°`),Q(w,`${z??""} ${l()??""}`)},[()=>n(e(_).votes)]),f(v,c)}),f(a,i)}var Vv=h('<div class="table-candidate-title svelte-tgla0e"> </div>'),Hv=h('<span class="table-candidate-badge svelte-tgla0e">ELEITO</span>'),Wv=h('<div><div class="table-candidate-color-bar svelte-tgla0e"></div> <div class="table-candidate-content svelte-tgla0e"><div class="table-candidate-name-group svelte-tgla0e"><span class="table-candidate-name svelte-tgla0e"> </span> <!></div> <span class="table-candidate-percent svelte-tgla0e"> </span> <span class="table-candidate-votes svelte-tgla0e"> </span></div></div>'),Jv=h('<div class="table-candidate-wrapper svelte-tgla0e"><!> <!></div>');const Kv={hash:"svelte-tgla0e",code:`.table-candidate-wrapper.svelte-tgla0e {background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0, 0, 0, 0.08);font-family:inherit;}.table-candidate-title.svelte-tgla0e {display:none;}.table-candidate-row.svelte-tgla0e {display:flex;align-items:stretch;border-bottom:1px solid #f0f0f0;}.table-candidate-row.svelte-tgla0e:last-child {border-bottom:none;}.table-candidate-row.elected.svelte-tgla0e {background-color:#e8f5ee;}.table-candidate-color-bar.svelte-tgla0e {width:3px;flex-shrink:0;}.table-candidate-content.svelte-tgla0e {flex:1;display:flex;flex-wrap:wrap;align-items:center;padding:12px 16px 10px 12px;gap:0 8px;min-width:0;}.table-candidate-name-group.svelte-tgla0e {flex:1;display:flex;align-items:center;gap:8px;min-width:0;}.table-candidate-name.svelte-tgla0e {font-weight:700;font-size:0.85rem;color:var(--sevn-color-tertiary);}.table-candidate-badge.svelte-tgla0e {background-color:var(--sevn-color-green);color:#fff;font-size:0.58rem;font-weight:600;padding:2px 4px;border-radius:4px;letter-spacing:0.5px;white-space:nowrap;flex-shrink:0;}.table-candidate-percent.svelte-tgla0e {font-size:0.85rem;font-weight:400;color:var(--sevn-color-tertiary);white-space:nowrap;flex-shrink:0;}.table-candidate-votes.svelte-tgla0e {flex-basis:100%;font-size:0.80rem;font-weight:400;color:var(--sevn-color-tertiary);margin-top:2px;}
|
|
283
|
+
|
|
284
|
+
@media (min-width: 600px) {.table-candidate-title.svelte-tgla0e {display:block;padding:16px 20px 12px;font-weight:700;font-size:1rem;color:var(--sevn-color-tertiary);border-bottom:1px solid #e8e8e8;}.table-candidate-color-bar.svelte-tgla0e {width:6px;}.table-candidate-content.svelte-tgla0e {display:grid;grid-template-columns:1fr 120px 230px;align-items:center;gap:0;}.table-candidate-name.svelte-tgla0e {font-weight:700;font-size:0.95rem;color:var(--sevn-color-tertiary);}.table-candidate-badge.svelte-tgla0e {font-size:0.68rem;padding:3px 8px;}.table-candidate-percent.svelte-tgla0e {text-align:right;font-size:0.95rem;}.table-candidate-votes.svelte-tgla0e {flex-basis:auto;font-size:0.95rem;margin-top:0;text-align:right;}
|
|
285
|
+
}`};function Sa(a,t){je(t,!0),Me(a,Kv);function r(c){return c.toLocaleString("pt-BR")+" votos"}function l(c){return c.toFixed(1).replace(".",",")+"%"}var n=Jv(),i=o(n);{var v=c=>{var m=Vv(),g=o(m);T(()=>Q(g,t.title)),f(c,m)};W(i,c=>{t.title&&c(v)})}var _=d(i,2);Ee(_,17,()=>t.candidates,Pe,(c,m)=>{var g=Wv();let y;var u=o(g),w=d(u,2),z=o(w),x=o(z),b=o(x),E=d(x,2);{var M=Z=>{var ae=Hv();f(Z,ae)};W(E,Z=>{e(m).elected&&Z(M)})}var O=d(z,2),K=o(O),J=d(O,2),B=o(J);T((Z,ae)=>{y=Ae(g,1,"table-candidate-row svelte-tgla0e",null,y,{elected:e(m).elected}),Se(u,`background-color: ${e(m).color??""}`),Q(b,`${e(m).name??""}, ${e(m).party??""}`),Q(K,Z),Q(B,ae)},[()=>l(e(m).percentage),()=>r(e(m).votes)]),f(c,g)}),f(a,n),Le()}var Xv=it('<line stroke="#676C75" stroke-width="1" stroke-dasharray="4 4"></line><text text-anchor="end" dominant-baseline="middle" class="election-line-axis-text-y svelte-18mvbma"> </text>',1),Yv=it('<text text-anchor="middle" dominant-baseline="middle" class="election-line-axis-text svelte-18mvbma"> </text>'),Zv=it('<polyline fill="none" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round"></polyline>'),Qv=it('<circle r="6" stroke="#fff" stroke-width="2.5"></circle>'),$v=it('<g><rect rx="4" fill="var(--sevn-color-green, #1e6704)"></rect><text text-anchor="middle" dominant-baseline="middle" class="election-line-badge-text svelte-18mvbma" style="font-size: 12px">ELEITO</text></g>'),ec=it('<circle r="5" stroke="#fff" stroke-width="2" pointer-events="none"></circle>'),tc=it('<text text-anchor="start" dominant-baseline="middle" class="election-line-tooltip-label svelte-18mvbma"> </text><text text-anchor="end" dominant-baseline="middle" class="election-line-tooltip-value svelte-18mvbma"> </text>',1),ac=it('<line stroke="rgba(0, 0, 0, 0.1)" stroke-width="2" stroke-dasharray="4 4" pointer-events="none"></line><!><g pointer-events="none"><rect rx="6" fill="#1c1c1c" opacity="0.95"></rect><text text-anchor="middle" dominant-baseline="middle" class="election-line-tooltip-hour svelte-18mvbma"> </text><!></g>',1),rc=h('<div class="election-line-chart-area svelte-18mvbma"><svg role="img" aria-label="Gráfico de evolução eleitoral" preserveAspectRatio="xMidYMid meet" class="svelte-18mvbma"><!><!><!><!><rect rx="4" fill="var(--sevn-color-tertiary, #1c1c1c)"></rect><text text-anchor="middle" dominant-baseline="middle" class="election-line-badge-text svelte-18mvbma" style="font-size: 13px"> </text><!><!></svg></div>'),oc=h('<span class="election-line-legend-item svelte-18mvbma"><span class="election-line-legend-tag svelte-18mvbma"> </span> </span>'),nc=h('<div class="election-line-legend svelte-18mvbma"></div>'),lc=h('<p class="election-line-footer svelte-18mvbma"> </p>'),sc=h('<div class="election-line-chart svelte-18mvbma"><!> <!> <!></div>');const ic={hash:"svelte-18mvbma",code:`.election-line-chart.svelte-18mvbma {width:100%;display:flex;flex-direction:column;background:var(--sevn-color-neutral, #f2f2f7);border-radius:8px;overflow:hidden;}.election-line-chart-area.svelte-18mvbma {width:100%;padding:15px;}svg.svelte-18mvbma {width:100%;height:auto;display:block;}.election-line-axis-text-y.svelte-18mvbma {fill:var(--sevn-color-tertiary);font-weight:600;}.election-line-axis-text.svelte-18mvbma {font-family:inherit;font-size:14px;fill:#9a9aaa;}.election-line-badge-text.svelte-18mvbma {font-family:inherit;font-size:14px;font-weight:700;fill:#fff;letter-spacing:0.04em;}.election-line-tooltip-hour.svelte-18mvbma {font-family:inherit;font-size:13px;font-weight:700;fill:#fff;letter-spacing:0.02em;}.election-line-tooltip-label.svelte-18mvbma {font-family:inherit;font-size:12px;font-weight:500;fill:#e0e0e0;}.election-line-tooltip-value.svelte-18mvbma {font-family:inherit;font-size:12px;font-weight:700;}
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
/* ─── Legend ─────────────────────────────────────────────── */.election-line-legend.svelte-18mvbma {display:flex;flex-wrap:wrap;gap:20px;padding:20px 16px;border:1px solid #d1d1d6;border-bottom-left-radius:6px;border-bottom-right-radius:6px;background:#fff;}.election-line-legend-item.svelte-18mvbma {display:flex;align-items:center;gap:8px;font-size:0.8125rem;font-weight:500;color:var(--sevn-color-tertiary, #1c1c1c);}.election-line-legend-tag.svelte-18mvbma {display:inline-flex;align-items:center;justify-content:center;padding:2px 6px;border-radius:4px;font-size:11px;font-weight:700;color:#fff;letter-spacing:0.03em;}
|
|
289
|
+
|
|
290
|
+
/* ─── Footer ─────────────────────────────────────────────── */.election-line-footer.svelte-18mvbma {font-size:0.75rem;color:#9a9aaa;padding:20px 16px 10px;margin:0;background:#fff;}`};function dc(a,t){je(t,!0),Me(a,ic);let r=L(t,"candidates",19,()=>[]),l=L(t,"timestamps",19,()=>[]),n=U(0),i=U(null);const v=p(()=>Math.min(Math.round((e(n)||800)*1.1),1e3)),_=290,c={top:20,right:38,bottom:44,left:50},m=p(()=>e(v)-c.left-c.right),g=_-c.top-c.bottom;function y(fe){const he=new Date(fe*1e3),pe=he.getUTCHours(),Y=he.getUTCMinutes();return Y===0?`${pe}h`:`${pe}h${String(Y).padStart(2,"0")}`}function u(fe,he=18){return fe.length>he?`${fe.slice(0,he-1).trimEnd()}…`:fe}function w(fe){const he=fe.currentTarget,pe=he.getBoundingClientRect(),Y=fe.clientX-pe.left,se=he.viewBox.baseVal.width/pe.width,me=Y*se;let ce=0,A=1/0;for(let k=0;k<l().length;k++){const ee=M(l()[k]),H=Math.abs(ee-me);H<A&&(A=H,ce=k)}A<40?s(i,ce,!0):s(i,null)}function z(){s(i,null)}const x=p(()=>{if(r().length===0||l().length===0)return{effYMin:0,effYMax:100,yTicks:[0,25,50,75,100]};const fe=r().flatMap(ee=>ee.data),he=Math.min(...fe),pe=Math.max(...fe),Y=Math.max(5,Math.round((pe-he)*.5)),se=t.yMin??Math.max(0,Math.floor((he-Y)/5)*5),me=t.yMax??Math.min(100,Math.ceil((pe+Y)/5)*5),ce=me-se,A=ce<=20?5:ce<=50?10:25,k=[];for(let ee=Math.ceil(se/A)*A;ee<=me+.001;ee+=A)k.push(Math.round(ee));return{effYMin:se,effYMax:me,yTicks:k}}),b=p(()=>l()[0]??0),E=p(()=>l()[l().length-1]??1);function M(fe){return c.left+uo(fe,e(b),e(E),0,e(m))}const O=p(()=>e(n)>0&&e(n)<560),K=p(()=>e(O)?60:80),J=p(()=>{const fe=l().length;if(fe<=2)return new Set([0]);const he=fe-2;if(he===0)return new Set([0]);const pe=new Set;let Y=-1/0;for(let se=0;se<=he;se++){const me=M(l()[se]);me-Y>=e(K)&&(pe.add(se),Y=me)}return pe});function B(fe){return c.top+uo(fe,e(x).effYMin,e(x).effYMax,g,0)}const Z=p(()=>r().map(fe=>fe.data.map((he,pe)=>`${M(l()[pe])},${B(he)}`).join(" "))),ae=p(()=>r().map((fe,he)=>({cx:M(e(E)),cy:B(fe.data[fe.data.length-1]),color:fe.color,elected:he===t.electedIndex}))),D=64,q=22,$=74,X=24,R=p(()=>M(e(E))-D/2),F=p(()=>c.top+g+8);var P=sc(),ie=o(P);{var le=fe=>{var he=rc(),pe=o(he),Y=o(pe);Ee(Y,17,()=>e(x).yTicks,Pe,(te,V)=>{const ve=p(()=>B(e(V)));var S=Xv(),oe=ze(S),N=d(oe),re=o(N);T(()=>{be(oe,"x1",c.left),be(oe,"y1",e(ve)),be(oe,"x2",c.left+e(m)),be(oe,"y2",e(ve)),be(N,"x",c.left-10),be(N,"y",e(ve)),Q(re,`${e(V)??""}%`)}),f(te,S)});var se=d(Y);Ee(se,17,l,Pe,(te,V,ve)=>{const S=p(()=>M(e(V)));var oe=st(),N=ze(oe);{var re=xe=>{var we=Yv(),de=o(we);T(ye=>{be(we,"x",ve===0?e(S)+20:e(S)),be(we,"y",c.top+g+19),Q(de,ye)},[()=>y(e(V))]),f(xe,we)},ue=p(()=>ve<l().length-1&&e(J).has(ve));W(N,xe=>{e(ue)&&xe(re)})}f(te,oe)});var me=d(se);Ee(me,17,r,Pe,(te,V,ve)=>{var S=Zv();T(()=>{be(S,"points",e(Z)[ve]),be(S,"stroke",e(V).color)}),f(te,S)});var ce=d(me);Ee(ce,17,()=>e(ae),Pe,(te,V)=>{var ve=Qv();T(()=>{be(ve,"cx",e(V).cx),be(ve,"cy",e(V).cy),be(ve,"fill",e(V).color)}),f(te,ve)});var A=d(ce);be(A,"width",D),be(A,"height",q);var k=d(A),ee=o(k),H=d(k);{var G=te=>{const V=p(()=>e(ae)[t.electedIndex]),ve=p(()=>e(V).cx-$/1.7),S=p(()=>e(V).cy-X-10);var oe=$v(),N=o(oe);be(N,"width",$),be(N,"height",X);var re=d(N);T(()=>{be(N,"x",e(ve)),be(N,"y",e(S)),be(re,"x",e(ve)+$/2),be(re,"y",e(S)+X/2)}),f(te,oe)};W(H,te=>{t.electedIndex!==void 0&&e(ae)[t.electedIndex]&&te(G)})}var C=d(H);{var j=te=>{const V=p(()=>M(l()[e(i)])),ve=p(()=>200),S=p(()=>16+r().length*22+8),oe=p(()=>Math.max(c.left+4,Math.min(e(V)-e(ve)/2,e(v)-c.right-e(ve)-4))),N=p(()=>Math.max(c.top+4,c.top-e(S)-12));var re=ac(),ue=ze(re),xe=d(ue);Ee(xe,17,r,Pe,(Ie,$e)=>{var Ze=ec();T(Te=>{be(Ze,"cx",e(V)),be(Ze,"cy",Te),be(Ze,"fill",e($e).color)},[()=>B(e($e).data[e(i)])]),f(Ie,Ze)});var we=d(xe),de=o(we);be(de,"width",e(ve));var ye=d(de),ke=o(ye),De=d(ye);Ee(De,17,r,Pe,(Ie,$e,Ze)=>{var Te=tc(),We=ze(Te),Bt=o(We),Mt=d(We),Ne=o(Mt);T((dt,Vt)=>{be(We,"x",e(oe)+12),be(We,"y",e(N)+36+Ze*22),Q(Bt,dt),be(Mt,"x",e(oe)+188),be(Mt,"y",e(N)+36+Ze*22),Se(Mt,`fill: ${e($e).color??""}`),Q(Ne,`${Vt??""}%`)},[()=>u(e($e).label),()=>e($e).data[e(i)].toFixed(1)]),f(Ie,Te)}),T(Ie=>{be(ue,"x1",e(V)),be(ue,"y1",c.top),be(ue,"x2",e(V)),be(ue,"y2",c.top+g),be(de,"x",e(oe)),be(de,"y",e(N)),be(de,"height",e(S)),be(ye,"x",e(oe)+e(ve)/2),be(ye,"y",e(N)+14),Q(ke,Ie)},[()=>y(l()[e(i)])]),f(te,re)};W(C,te=>{e(i)!==null&&te(j)})}T(te=>{be(pe,"viewBox",`0 0 ${e(v)??""} 290`),be(A,"x",e(R)),be(A,"y",e(F)),be(k,"x",e(R)+D/2),be(k,"y",e(F)+q/2),Q(ee,te)},[()=>y(e(E)).toUpperCase()]),Je("mousemove",pe,w),ht("mouseleave",pe,z),Nr(he,"clientWidth",te=>s(n,te)),f(fe,he)};W(ie,fe=>{r().length>0&&l().length>0&&fe(le)})}var I=d(ie,2);{var ne=fe=>{var he=nc();Ee(he,21,r,Pe,(pe,Y)=>{var se=oc(),me=o(se),ce=o(me),A=d(me);T(()=>{Se(me,`background:${e(Y).tagColor??""};`),Q(ce,e(Y).tag),Q(A,` ${e(Y).label??""}`)}),f(pe,se)}),f(fe,he)};W(I,fe=>{r().length>0&&fe(ne)})}var _e=d(I,2);{var ge=fe=>{var he=lc(),pe=o(he);T(()=>Q(pe,`Atualizado em ${t.updatedAt??""}${t.source?` | Fonte ${t.source}`:""}`)),f(fe,he)};W(_e,fe=>{t.updatedAt&&fe(ge)})}f(a,P),Le()}ca(["mousemove"]);const vc=new Set(["da","de","do","das","dos","e"]);function Be(a){return a.toLowerCase().split(" ").map((t,r)=>r>0&&vc.has(t)?t:t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function yn(a){if(typeof a=="string"){const r=a.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(r)return new Date(Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3]),Number(r[4]),Number(r[5]),Number(r[6]??0)))}const t=new Date(a);return Number.isNaN(t.getTime())?null:t}function cc(a){if(a==null||a==="")return null;const t=yn(a);return t?Math.floor(t.getTime()/1e3):null}function ot(a){if(a==null||a==="")return"";const t=yn(a);if(!t)return"";const r=String(t.getUTCDate()).padStart(2,"0"),l=String(t.getUTCMonth()+1).padStart(2,"0"),n=t.getUTCFullYear(),i=String(t.getUTCHours()).padStart(2,"0"),v=String(t.getUTCMinutes()).padStart(2,"0");return`${r}/${l}/${n} às ${i}h${v}`}function St(a,t="TSE"){const r=ot(a);return r?`Atualizado em ${r} | Fonte ${t}`:`Fonte ${t}`}const Qe=ot("2022-10-31T00:18:00Z"),It=St("2022-10-31T00:18:00Z");var uc=h('<div class="sevn_final_results__candidate-web svelte-d8k5q2"><!></div> <div class="sevn_final_results__candidate-mobile svelte-d8k5q2"><!></div>',1),pc=h('<p class="sevn_final_results__empty-label svelte-d8k5q2">Resultado ainda não publicado.</p>'),_c=h('<span class="sevn_final_results__ad-label svelte-d8k5q2">anúncio</span>'),fc=h('<div class="sevn_final_results__ad svelte-d8k5q2"><!></div>'),mc=h('<p class="sevn_final_results__empty-label svelte-d8k5q2"> </p>'),gc=h('<div class="sevn_final_results__table-overlay svelte-d8k5q2"><!></div>'),bc=h('<span class="sevn_final_results__overview-dot-item svelte-d8k5q2"><span class="sevn_final_results__overview-dot svelte-d8k5q2"></span> </span>'),hc=h('<p class="sevn_final_results__empty-label svelte-d8k5q2"> </p>'),xc=h('<div><!> <!> <!> <div class="sevn_final_results__map-web svelte-d8k5q2" role="presentation"><!> <div class="sevn_final_results__count-overlay svelte-d8k5q2"><!></div> <!></div> <div class="sevn_final_results__mobile-section svelte-d8k5q2"><div class="sevn_final_results__overview svelte-d8k5q2"><span class="sevn_final_results__overview-label svelte-d8k5q2">Visão geral:</span> <div class="sevn_final_results__overview-dots svelte-d8k5q2"></div></div> <div class="sevn_final_results__map-mobile svelte-d8k5q2"><!></div> <div class="sevn_final_results__search svelte-d8k5q2"><!></div> <!></div></div>');const wc={hash:"svelte-d8k5q2",code:`.sevn_final_results.svelte-d8k5q2 {display:flex;flex-direction:column;gap:30px;}
|
|
291
|
+
|
|
292
|
+
/* ── CandidatePercentage ──────────────────────────────── */.sevn_final_results__candidate-mobile.svelte-d8k5q2 {display:flex;flex-direction:column;}.sevn_final_results__candidate-web.svelte-d8k5q2 {display:none;}
|
|
293
|
+
|
|
294
|
+
/* ── Ad ───────────────────────────────────────────────── */.sevn_final_results__ad.svelte-d8k5q2 {display:none;}.sevn_final_results__ad-label.svelte-d8k5q2 {font-size:0.875rem;color:#aaa;}
|
|
295
|
+
|
|
296
|
+
/* ── Mapa web ─────────────────────────────────────────── */.sevn_final_results__map-web.svelte-d8k5q2 {display:none;position:relative;}
|
|
297
|
+
|
|
298
|
+
/* ── Overlay TableCandidate (web) ─────────────────────── */.sevn_final_results__table-overlay.svelte-d8k5q2 {position:absolute;z-index:10;width:500px;transform:translate(-50%, 12px);filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));pointer-events:none;}.sevn_final_results__table-overlay.svelte-d8k5q2 .table-candidate-content {display:grid;grid-template-columns:1fr 80px 160px;align-items:center;gap:0;}.sevn_final_results__table-overlay.svelte-d8k5q2 .table-candidate-percent {text-align:right;}.sevn_final_results__table-overlay.svelte-d8k5q2 .table-candidate-votes {flex-basis:auto;margin-top:0;text-align:right;}.sevn_final_results__empty-label.svelte-d8k5q2 {margin:0;padding:14px 18px;background:#fff;border-radius:8px;box-shadow:0 4px 16px rgba(0, 0, 0, 0.18);font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);text-align:center;}
|
|
299
|
+
|
|
300
|
+
/* ── Seção mobile ─────────────────────────────────────── */.sevn_final_results__mobile-section.svelte-d8k5q2 {display:flex;flex-direction:column;gap:20px;}
|
|
301
|
+
|
|
302
|
+
/* ── Visão geral ──────────────────────────────────────── */.sevn_final_results__overview.svelte-d8k5q2 {display:flex;flex-direction:column;gap:6px;}.sevn_final_results__overview-label.svelte-d8k5q2 {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);}.sevn_final_results__overview-dots.svelte-d8k5q2 {display:flex;flex-wrap:wrap;gap:12px;}.sevn_final_results__overview-dot-item.svelte-d8k5q2 {display:inline-flex;align-items:center;gap:6px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.sevn_final_results__overview-dot.svelte-d8k5q2 {width:10px;height:10px;border-radius:50%;flex-shrink:0;}
|
|
303
|
+
|
|
304
|
+
/* ── Mapa mobile + overlay CandidatesCountPercent ──────── */.sevn_final_results__map-mobile.svelte-d8k5q2 {position:relative;width:100%;}.sevn_final_results__count-overlay.svelte-d8k5q2 {position:absolute;bottom:0;left:0;z-index:5;width:400px;}
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
/* ── Desktop ──────────────────────────────────────────── */
|
|
309
|
+
@media (min-width: 768px) {.sevn_final_results__candidate-mobile.svelte-d8k5q2 {display:none;}.sevn_final_results__candidate-web.svelte-d8k5q2 {display:flex;flex-direction:column;}.sevn_final_results__ad.svelte-d8k5q2 {display:block;}.sevn_final_results__map-web.svelte-d8k5q2 {display:block;}.sevn_final_results__mobile-section.svelte-d8k5q2 {display:none;}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@media (max-width: 767px) {.sevn_final_results__search.svelte-d8k5q2 .dropdown {position:static;margin-top:10px;}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* ── Raw ──────────────────────────────────────────────── */.sevn_final_results--raw.svelte-d8k5q2,
|
|
316
|
+
.sevn_final_results--raw.svelte-d8k5q2 :where(.svelte-d8k5q2) {all:revert;}`};function yc(a,t){je(t,!0),Me(a,wc);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"showAd",3,!0),i=L(t,"data",3,null),v=L(t,"stateResults",3,null),_=L(t,"header",19,()=>({title:"Presidente",description:"100% das urnas apuradas",tag:"1º TURNO",tagColor:"var(--sevn-color-blue, #3b82f6)"}));const c="var(--sevn-color-primary)",m="var(--sevn-color-secondary)",g=[{name:"Candidato A",acronym:"ABC",percent:51.9,votes:60345999,color:c,avatar:"man",avatarTag:"ELEITO",avatarTagColor:"var(--sevn-color-green)"},{name:"Candidato B",acronym:"DEF",percent:48.1,votes:58206354,color:m,avatar:"man"}],y=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],u=p(()=>r()?g:i()?.candidates?i().candidates.slice(0,2).map(N=>({name:Be(N.ballot_name),acronym:N.party_abbr,percent:N.valid_votes_pct,votes:N.votes,color:N.party_color,photoUrl:N.photo_url,avatar:"man",avatarTag:N.elected?"ELEITO":void 0,avatarTagColor:N.elected?"var(--sevn-color-green)":void 0})):[]),w=p(()=>{if(r())return y;if(!i()?.summary)return[];const N=i().summary.total_valid_votes+i().summary.null_votes+i().summary.blank_votes;return[{text:"Nulos",value:`${(i().summary.null_votes/N*100).toFixed(2)}%`},{text:"Brancos",value:`${(i().summary.blank_votes/N*100).toFixed(2)}%`},{text:"Válidos",value:`${i().summary.total_valid_votes.toLocaleString("pt-BR")} votos`}]}),z=new Set(["al","am","ap","ba","ce","ma","mg","pa","pb","pe","pi","rn","se","sp"]),x=["ac","al","am","ap","ba","ce","df","es","go","ma","mg","ms","mt","pa","pb","pe","pi","pr","rj","rn","ro","rr","rs","sc","se","sp","to"],b=p(()=>r()?x.map(N=>({id:N,color:z.has(N)?c:m})):(v()?.states??[]).filter(N=>N.leader?.party_color).map(N=>({id:N.state.toLowerCase(),color:N.leader.party_color}))),E=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}].sort((N,re)=>N.label.localeCompare(re.label)),M={sp:[{name:"Candidato A",party:"ABC",percentage:54.1,votes:1728159,color:c,elected:!0},{name:"Candidato B",party:"DEF",percentage:43.1,votes:1377441,color:m},{name:"Candidato C",party:"GHI",percentage:1.1,votes:35623,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:.7,votes:21439,color:"#22c55e"},{name:"Candidato E",party:"MNO",percentage:.5,votes:17344,color:"#eab308"},{name:"Candidato F",party:"PQR",percentage:.2,votes:5149,color:"#e74c3c"}],rj:[{name:"Candidato B",party:"DEF",percentage:50.8,votes:1200450,color:m,elected:!0},{name:"Candidato A",party:"ABC",percentage:46.3,votes:1094523,color:c},{name:"Candidato C",party:"GHI",percentage:1.8,votes:42568,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:1.1,votes:26123,color:"#22c55e"}],mg:[{name:"Candidato A",party:"ABC",percentage:53.4,votes:2341200,color:c,elected:!0},{name:"Candidato B",party:"DEF",percentage:43.7,votes:1916300,color:m},{name:"Candidato C",party:"GHI",percentage:1.5,votes:65820,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:.9,votes:39492,color:"#22c55e"},{name:"Candidato E",party:"MNO",percentage:.5,votes:21940,color:"#eab308"}],rs:[{name:"Candidato B",party:"DEF",percentage:53.6,votes:1580120,color:m,elected:!0},{name:"Candidato A",party:"ABC",percentage:43.8,votes:1291440,color:c},{name:"Candidato C",party:"GHI",percentage:1.4,votes:41280,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:.8,votes:23616,color:"#22c55e"},{name:"Candidato E",party:"MNO",percentage:.4,votes:11808,color:"#eab308"}],ba:[{name:"Candidato A",party:"ABC",percentage:68.2,votes:3012450,color:c,elected:!0},{name:"Candidato B",party:"DEF",percentage:29.4,votes:1298970,color:m},{name:"Candidato C",party:"GHI",percentage:1.5,votes:66273,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:.9,votes:39764,color:"#22c55e"}],pr:[{name:"Candidato B",party:"DEF",percentage:57.4,votes:1423680,color:m,elected:!0},{name:"Candidato A",party:"ABC",percentage:39.8,votes:987360,color:c},{name:"Candidato C",party:"GHI",percentage:1.6,votes:39712,color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:.8,votes:19856,color:"#22c55e"},{name:"Candidato E",party:"MNO",percentage:.4,votes:9928,color:"#eab308"}]};function O(N){if(M[N])return M[N];const re=N.charCodeAt(0)*7+N.charCodeAt(1)*3,ue=z.has(N),xe=ue?52+re%16:33+re%12,we=ue?38+re%8:52+re%14,de=100-xe-we,ye=Math.max(1,Math.round(de*.55)),ke=Math.max(1,Math.round(de*.28)),De=Math.max(1,de-ye-ke),Ie=4e5+re*8e3;return[{name:"Candidato A",party:"ABC",percentage:xe,votes:Math.round(Ie*xe/100),color:c,elected:ue},{name:"Candidato B",party:"DEF",percentage:we,votes:Math.round(Ie*we/100),color:m,elected:!ue},{name:"Candidato C",party:"GHI",percentage:ye,votes:Math.round(Ie*ye/100),color:"#3b82f6"},{name:"Candidato D",party:"JKL",percentage:ke,votes:Math.round(Ie*ke/100),color:"#22c55e"},{name:"Candidato E",party:"MNO",percentage:De,votes:Math.round(Ie*De/100),color:"#eab308"}]}function K(N){return E.find(re=>re.value===N)?.label?.replace(/\s+[A-Z]{2}$/,"")??N.toUpperCase()}const J=p(()=>r()?Qe:ot(i()?.summary?.last_updated));let B=U(null),Z=U(0),ae=U(0),D=U(null),q=U(null),$=U(0),X=U(0);const R=p(()=>e(q)??e(B)),F=p(()=>{if(!e(R))return[];if(r())return O(e(R));const N=v()?.states?.find(re=>re.state.toLowerCase()===e(R));return!N?.leader||!N?.runner_up?null:[{name:Be(N.leader.name),party:N.leader.party_abbr,percentage:N.leader.valid_votes_pct,votes:N.leader.votes,color:N.leader.party_color,elected:N.leader.elected},{name:Be(N.runner_up.name),party:N.runner_up.party_abbr,percentage:N.runner_up.valid_votes_pct,votes:N.runner_up.votes,color:N.runner_up.party_color,elected:N.runner_up.elected}]}),P=p(()=>e(R)?`Presidente: ${K(e(R))}`:"");function ie(N){if(s(B,N.cid,!0),e(D)){const re=e(D).getBoundingClientRect();s(Z,N.clientX-re.left),s(ae,N.clientY-re.top)}}function le(N){if(!e(D))return;const re=e(D).getBoundingClientRect();e(q)===N.cid?s(q,null):(s(q,N.cid,!0),s($,N.clientX-re.left),s(X,N.clientY-re.top))}Ce(()=>{if(!e(q))return;function N(re){e(D)&&!e(D).contains(re.target)&&s(q,null)}return document.addEventListener("click",N),()=>document.removeEventListener("click",N)});var I=xc();let ne;var _e=o(I);Ye(_e,{get title(){return _().title},get description(){return _().description},get tag(){return _().tag},get tagColor(){return _().tagColor}});var ge=d(_e,2);{var fe=N=>{var re=uc(),ue=ze(re),xe=o(ue);da(xe,{layout:"duel",get candidates(){return e(u)},get overviewData(){return e(w)},avatarSize:"120px",barHeight:"24px",get date(){return e(J)},font:"TSE"});var we=d(ue,2),de=o(we);da(de,{layout:"duel-compact",get candidates(){return e(u)},get overviewData(){return e(w)},get date(){return e(J)},font:"TSE"}),f(N,re)},he=N=>{var re=pc();f(N,re)};W(ge,N=>{r()||e(u).length>=2?N(fe):N(he,!1)})}var pe=d(ge,2);{var Y=N=>{var re=fc(),ue=o(re);hn(ue,{children:(xe,we)=>{var de=_c();f(xe,de)}}),f(N,re)};W(pe,N=>{n()&&N(Y)})}var se=d(pe,2),me=o(se);pt(me,{type:"brazil-states",get colors(){return e(b)},interactive:!0,onRegionHover:ie,onRegionClick:le});var ce=d(me,2),A=o(ce);ui(A,{get candidates(){return e(u)}});var k=d(ce,2);{var ee=N=>{var re=gc(),ue=o(re);{var xe=de=>{Sa(de,{get title(){return e(P)},get candidates(){return e(F)}})},we=de=>{var ye=mc(),ke=o(ye);T(De=>Q(ke,`Resultado ainda não publicado para ${De??""}.`),[()=>K(e(R))]),f(de,ye)};W(ue,de=>{e(F)?de(xe):de(we,!1)})}T(()=>Se(re,`left:${e(Z)??""}px;top:${e(ae)??""}px`)),f(N,re)};W(k,N=>{e(B)&&N(ee)})}tt(se,N=>s(D,N),()=>e(D));var H=d(se,2),G=o(H),C=d(o(G),2);Ee(C,21,()=>e(u),Pe,(N,re)=>{var ue=bc(),xe=o(ue),we=d(xe);T(()=>{Se(xe,`background:${e(re).color??""}`),Q(we,` ${e(re).name??""} | ${e(re).acronym??""}`)}),f(N,ue)});var j=d(G,2),te=o(j);pt(te,{type:"brazil-states",get colors(){return e(b)}});var V=d(j,2),ve=o(V);{let N=p(()=>e(B)?"Você selecionou:":"Selecione um estado:");Re(ve,{get label(){return e(N)},get options(){return E},get value(){return e(B)},set value(re){s(B,re,!0)}})}var S=d(V,2);{var oe=N=>{var re=st(),ue=ze(re);{var xe=de=>{Sa(de,{get title(){return e(P)},get candidates(){return e(F)}})},we=de=>{var ye=hc(),ke=o(ye);T(De=>Q(ke,`Resultado ainda não publicado para ${De??""}.`),[()=>K(e(R))]),f(de,ye)};W(ue,de=>{e(F)?de(xe):de(we,!1)})}f(N,re)};W(S,N=>{e(B)&&N(oe)})}T(()=>ne=Ae(I,1,"sevn_final_results svelte-d8k5q2",null,ne,{"sevn_final_results--raw":l()})),ht("mouseleave",se,()=>s(B,null)),f(a,I),Le()}var Cc=h('<p class="sevn_state_winners__empty-label svelte-15kfon5"> </p>'),kc=h('<span class="sevn_state_winners__overview__dot_item svelte-15kfon5"><span class="sevn_state_winners__overview__dot svelte-15kfon5"></span> </span>'),Sc=h('<!> <div class="sevn_state_winners__overview svelte-15kfon5"><span class="sevn_state_winners__overview__label svelte-15kfon5">Visão geral:</span> <div class="sevn_state_winners__overview__dots svelte-15kfon5"></div></div>',1),zc=h('<p class="sevn_state_winners__empty-label svelte-15kfon5"> </p>'),Ac=h('<div class="sevn_state_winners__grid svelte-15kfon5"><div class="sevn_state_winners__candidates svelte-15kfon5"><!></div> <div class="sevn_state_winners__map svelte-15kfon5"><!></div></div> <div class="sevn_state_winners__mobile svelte-15kfon5"><!> <div class="sevn_state_winners__map svelte-15kfon5"><!></div></div> <!>',1),Mc=h('<div><!> <div class="sevn_state_winners__search svelte-15kfon5"><!></div> <!></div>');const Ec={hash:"svelte-15kfon5",code:`.sevn_state_winners.svelte-15kfon5 {display:flex;flex-direction:column;gap:32px;}
|
|
317
|
+
|
|
318
|
+
/* ── Search ──────────────────────────────── */.sevn_state_winners__search.svelte-15kfon5 {width:100%;}
|
|
319
|
+
|
|
320
|
+
/* ── Grid web ────────────────────────────── */.sevn_state_winners__grid.svelte-15kfon5 {display:grid;grid-template-columns:2fr 3fr;gap:40px;align-items:center;}.sevn_state_winners__candidates.svelte-15kfon5 {display:flex;flex-direction:column;}.sevn_state_winners__empty-label.svelte-15kfon5 {margin:0;font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_state_winners__map.svelte-15kfon5 {width:100%;}
|
|
321
|
+
|
|
322
|
+
/* ── Mobile layout ───────────────────────── */.sevn_state_winners__mobile.svelte-15kfon5 {display:none;flex-direction:column;gap:24px;}.sevn_state_winners__overview.svelte-15kfon5 {display:flex;flex-direction:column;gap:6px;}.sevn_state_winners__overview__label.svelte-15kfon5 {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);}.sevn_state_winners__overview__dots.svelte-15kfon5 {display:flex;flex-wrap:wrap;gap:12px;}.sevn_state_winners__overview__dot_item.svelte-15kfon5 {display:inline-flex;align-items:center;gap:6px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.sevn_state_winners__overview__dot.svelte-15kfon5 {width:10px;height:10px;border-radius:50%;flex-shrink:0;}
|
|
323
|
+
|
|
324
|
+
/* ── Responsivo ──────────────────────────── */
|
|
325
|
+
@media (max-width: 767px) {.sevn_state_winners__grid.svelte-15kfon5 {display:none;}.sevn_state_winners__mobile.svelte-15kfon5 {display:flex;}
|
|
326
|
+
|
|
327
|
+
/* Dropdown flui no documento em vez de sobrepor */.sevn_state_winners__search.svelte-15kfon5 .dropdown {position:static;margin-top:10px;}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* ── Raw (sem estilos) ───────────────────── */.sevn_state_winners--raw.svelte-15kfon5,
|
|
331
|
+
.sevn_state_winners--raw.svelte-15kfon5 :where(.svelte-15kfon5) {all:revert;}`};function Rc(a,t){je(t,!0),Me(a,Ec);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"header",19,()=>({title:"Quem ganhou em cada estado",description:"Veja o resultado por estado"}));const v=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],_={nome:"Candidato A",partido:"ABC",cor:"var(--sevn-color-primary)"},c={nome:"Candidato B",partido:"DEF",cor:"var(--sevn-color-secondary)"},m={ac:{estado:"Acre",candidato:c,percent:54.1},al:{estado:"Alagoas",candidato:_,percent:61.3},am:{estado:"Amazonas",candidato:_,percent:52.7},ap:{estado:"Amapá",candidato:_,percent:57.8},ba:{estado:"Bahia",candidato:_,percent:68.2},ce:{estado:"Ceará",candidato:_,percent:66.4},df:{estado:"Distrito Federal",candidato:c,percent:55.9},es:{estado:"Espírito Santo",candidato:c,percent:51.2},go:{estado:"Goiás",candidato:c,percent:58.6},ma:{estado:"Maranhão",candidato:_,percent:63.5},mg:{estado:"Minas Gerais",candidato:_,percent:53.4},ms:{estado:"Mato Grosso do Sul",candidato:c,percent:56.3},mt:{estado:"Mato Grosso",candidato:c,percent:60.1},pa:{estado:"Pará",candidato:_,percent:59.7},pb:{estado:"Paraíba",candidato:_,percent:62},pe:{estado:"Pernambuco",candidato:_,percent:64.8},pi:{estado:"Piauí",candidato:_,percent:65.3},pr:{estado:"Paraná",candidato:c,percent:57.4},rj:{estado:"Rio de Janeiro",candidato:c,percent:50.8},rn:{estado:"Rio Grande do Norte",candidato:_,percent:60.2},ro:{estado:"Rondônia",candidato:c,percent:62.5},rr:{estado:"Roraima",candidato:c,percent:58},rs:{estado:"Rio Grande do Sul",candidato:c,percent:53.6},sc:{estado:"Santa Catarina",candidato:c,percent:67.1},se:{estado:"Sergipe",candidato:_,percent:58.9},sp:{estado:"São Paulo",candidato:_,percent:54.1},to:{estado:"Tocantins",candidato:c,percent:51.7}},g=p(()=>r()?m:!n()?.states||!Array.isArray(n().states)?{}:Object.fromEntries(n().states.filter(I=>I.leader?.party_color).map(I=>[I.state.toLowerCase(),{estado:I.state_name,candidato:{nome:Be(I.leader.name),partido:I.leader.party_abbr,cor:I.leader.party_color},percent:I.leader.valid_votes_pct}]))),y=p(()=>Object.entries(e(g)).map(([I,ne])=>({id:I,color:ne.candidato.cor}))),u=p(()=>Object.entries(e(g)).map(([I,ne])=>({value:I,label:`${ne.estado} ${I.toUpperCase()}`})).sort((I,ne)=>I.label.localeCompare(ne.label))),w=p(()=>r()?e(u):v),z=[{name:"Candidato A",acronym:"ABC",percent:50.9,votes:60345999,color:"var(--sevn-color-primary)",avatar:"man",avatarTag:"ELEITO",avatarTagColor:"var(--sevn-color-green)"},{name:"Candidato B",acronym:"DEF",percent:49.1,votes:58206354,color:"var(--sevn-color-secondary)",avatar:"man"}],x=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}];let b=U(null),E=U(void 0),M=U(!1);Ce(()=>{const I=()=>{s(M,window.innerWidth<768)};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)}),Ce(()=>{e(b)&&e(E)&&e(M)&&e(E).scrollIntoView({behavior:"smooth",block:"start"})});const O=p(()=>e(b)&&n()?.states&&Array.isArray(n().states)?n().states.find(I=>I.state.toLowerCase()===e(b)):null),K=p(()=>e(b)?r()?z:!e(O)?.leader||!e(O)?.runner_up?[]:[{name:Be(e(O).leader.name),acronym:e(O).leader.party_abbr,percent:e(O).leader.valid_votes_pct,votes:e(O).leader.votes,color:e(O).leader.party_color,photoUrl:e(O).leader.photo_url,avatar:"man",avatarTag:e(O).leader.elected?"ELEITO":void 0,avatarTagColor:e(O).leader.elected?"var(--sevn-color-green)":void 0},{name:Be(e(O).runner_up.name),acronym:e(O).runner_up.party_abbr,percent:e(O).runner_up.valid_votes_pct,votes:e(O).runner_up.votes,color:e(O).runner_up.party_color,photoUrl:e(O).runner_up.photo_url,avatar:"man",avatarTag:e(O).runner_up.elected?"ELEITO":void 0,avatarTagColor:e(O).runner_up.elected?"var(--sevn-color-green)":void 0}]:[]),J=p(()=>e(K).length>0),B=p(()=>r()?Qe:ot(n()?.last_updated)),Z=p(()=>e(b)?r()?x:e(O)?[{text:"Status",value:e(O).status},{text:"Urnas contadas",value:`${e(O).ballots_counted_pct}%`}]:[]:[]),ae=[{color:"#4a0e0e",tooltip:"ABC"},{color:"#8b1a1a",tooltip:"DEF"},{color:"#c0392b",tooltip:"GHI"},{color:"#e74c3c",tooltip:"JKL"},{color:"#f1948a",tooltip:"MNO"},{color:"#fadbd8",tooltip:"PQR"},{color:"#d6e4f0",tooltip:"STU"},{color:"#a9cce3",tooltip:"VWX"},{color:"#5dade2",tooltip:"YZA"},{color:"#2e86c1",tooltip:"BCD"},{color:"#1a5276",tooltip:"EFG"},{color:"#0d2137",tooltip:"HIJ"},{color:"#b7950b",tooltip:"KLM"},{color:"#9a7d0a",tooltip:"NOP"},{color:"#7d6608",tooltip:"QRS"}],D=p(()=>r()?ae:!n()?.states||!Array.isArray(n().states)?[]:Array.from(new globalThis.Map(n().states.flatMap(I=>[I.leader,I.runner_up]).filter(I=>I?.party_abbr&&I?.party_color).map(I=>[I.party_abbr,{color:I.party_color,tooltip:I.party_abbr}])).values()));function q(I){const ne=I.cid;s(b,e(b)===ne?null:ne,!0)}var $=Mc();let X;var R=o($);Ye(R,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var F=d(R,2),P=o(F);Re(P,{label:"Busque por estado",get options(){return e(w)},get icon(){return Ke},iconSize:13,get value(){return e(b)},set value(I){s(b,I,!0)}});var ie=d(F,2);{var le=I=>{var ne=Ac(),_e=ze(ne),ge=o(_e),fe=o(ge);{var he=C=>{da(C,{layout:"stack",get candidates(){return e(K)},get overviewData(){return e(Z)},avatarSize:"133px",barHeight:"24px",get date(){return e(B)},font:"TSE"})},pe=C=>{var j=Cc(),te=o(j);T(V=>Q(te,`Resultado ainda não publicado para ${V??""}.`),[()=>v.find(V=>V.value===e(b))?.label??e(b)?.toUpperCase()]),f(C,j)};W(fe,C=>{e(J)?C(he):C(pe,!1)})}var Y=d(ge,2),se=o(Y);pt(se,{type:"brazil-states",get colors(){return e(y)},interactive:!0,onRegionClick:q}),tt(Y,C=>s(E,C),()=>e(E));var me=d(_e,2),ce=o(me);{var A=C=>{var j=Sc(),te=ze(j);da(te,{layout:"duel-compact",get candidates(){return e(K)},get overviewData(){return e(Z)},get date(){return e(B)},font:"TSE"});var V=d(te,2),ve=d(o(V),2);Ee(ve,21,()=>e(K),Pe,(S,oe)=>{var N=kc(),re=o(N),ue=d(re);T(()=>{Se(re,`background:${e(oe).color??""}`),Q(ue,` ${e(oe).name??""} | ${e(oe).acronym??""}`)}),f(S,N)}),f(C,j)},k=C=>{var j=zc(),te=o(j);T(V=>Q(te,`Resultado ainda não publicado para ${V??""}.`),[()=>v.find(V=>V.value===e(b))?.label??e(b)?.toUpperCase()]),f(C,j)};W(ce,C=>{e(J)?C(A):C(k,!1)})}var ee=d(ce,2),H=o(ee);pt(H,{type:"brazil-states",get colors(){return e(y)}}),tt(ee,C=>s(E,C),()=>e(E));var G=d(me,2);va(G,{title:"Partidos",get segments(){return e(D)},sortSegments:!0}),f(I,ne)};W(ie,I=>{e(b)&&I(le)})}T(()=>X=Ae($,1,"sevn_state_winners svelte-15kfon5",null,X,{"sevn_state_winners--raw":l()})),f(a,$),Le()}var Pc=h('<p class="sevn_vote_counting_progress__status svelte-1v760q">Dados indisponíveis no momento.</p>'),jc=h("<div><!> <!></div>");const Lc={hash:"svelte-1v760q",code:`.sevn_vote_counting_progress.svelte-1v760q {display:flex;flex-direction:column;gap:32px;}.sevn_vote_counting_progress__status.svelte-1v760q {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}
|
|
332
|
+
|
|
333
|
+
/* ── Raw (sem estilos) ───────────────────── */.sevn_vote_counting_progress--raw.svelte-1v760q,
|
|
334
|
+
.sevn_vote_counting_progress--raw.svelte-1v760q :where(.svelte-1v760q) {all:revert;}`};function Dc(a,t){je(t,!0),Me(a,Lc);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"header",19,()=>({title:"Evolução da apuração",description:"Acompanhe em tempo real",tag:"1º turno",tagColor:"#0E2A41"}));const v=[{label:"Candidato A",tag:"ABC",tagColor:"#0A3E27",color:"#1E6704",data:[49,50,51,51,52,52]},{label:"Candidato B",tag:"DEF",tagColor:"#C38214",color:"#C38214",data:[47,47,47,48,48,48]}],_=[1667247480,1667248800,166725e4,1667251140,1667252940,1667253480],c=p(()=>!r()&&!!n()?.points?.length&&!!n()?.candidate_a&&!!n()?.candidate_b),m=p(()=>r()?v:e(c)?[{label:Be(n().candidate_a.name),tag:n().candidate_a.party_abbr,tagColor:n().candidate_a.party_color,color:n().candidate_a.party_color,data:n().points.map(J=>J.candidate_a_pct)},{label:Be(n().candidate_b.name),tag:n().candidate_b.party_abbr,tagColor:n().candidate_b.party_color,color:n().candidate_b.party_color,data:n().points.map(J=>J.candidate_b_pct)}]:[]),g=p(()=>r()?_:e(c)?n().points.map(J=>cc(J.timestamp)??0):[]),y=p(()=>{if(r())return 0;if(e(c)){if(n().candidate_a?.elected)return 0;if(n().candidate_b?.elected)return 1}}),u=p(()=>{if(r()||!e(c))return 0;const J=n().points.flatMap(B=>[B.candidate_a_pct,B.candidate_b_pct]);return Math.max(0,Math.floor(Math.min(...J)-5))}),w=p(()=>{if(r()||!e(c))return 75;const J=n().points.flatMap(B=>[B.candidate_a_pct,B.candidate_b_pct]);return Math.min(100,Math.ceil(Math.max(...J)+5))}),z=p(()=>r()?Qe:e(c)?ot(n().points[n().points.length-1].timestamp):"");var x=jc();let b;var E=o(x);Ye(E,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var M=d(E,2);{var O=J=>{var B=Pc();f(J,B)},K=J=>{dc(J,{get candidates(){return e(m)},get timestamps(){return e(g)},get electedIndex(){return e(y)},get yMin(){return e(u)},get yMax(){return e(w)},get updatedAt(){return e(z)},source:"TSE"})};W(M,J=>{!r()&&!e(c)?J(O):J(K,!1)})}T(()=>b=Ae(x,1,"sevn_vote_counting_progress svelte-1v760q",null,b,{"sevn_vote_counting_progress--raw":l()})),f(a,x),Le()}function Cn(){return _n(vs).transport}function mo(a){return new Promise(t=>setTimeout(t,a))}function Bc(a,t){const r=AbortSignal.timeout(a);return t&&typeof AbortSignal.any=="function"?AbortSignal.any([t,r]):r}function qc(a,t){const r=new URL(a),l=new URL(t);return r.protocol=l.protocol,r.host=l.host,r.toString()}function Fc(a,t){return Array.from({length:t},(r,l)=>(a+l)%t)}const Tc=async(a,t)=>{const r=typeof a=="string"?a:a instanceof URL?a.toString():a.url,l=bn(),{timeoutMs:n,retriesPerHost:i,retryDelayMs:v,stickyWindowMs:_}=Xa().request,c=Cn();c.activeIndex!==0&&Date.now()-c.pinnedAt>=_&&(c.activeIndex=0);let m=null;for(const g of Fc(c.activeIndex,l.length)){const y=qc(r,l[g]);for(let u=0;u<i;u++)try{const w=await fetch(y,{...t,signal:Bc(n,t?.signal)});if(w.status>=500){m=new Error(`HTTP ${w.status} em ${l[g]}`),u<i-1&&await mo(v);continue}return c.activeIndex=g,c.pinnedAt=Date.now(),w}catch(w){m=w,u<i-1&&await mo(v)}}throw new pn(r,m)};function Oc(){return Xa().apiHosts[Cn().activeIndex]??null}const Wr=300,kn=3600,fr=new Map;function mr(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const Gc={getItem(a){return mr()?localStorage.getItem(a):fr.get(a)??null},setItem(a,t){if(mr())try{localStorage.setItem(a,t)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else fr.set(a,t)},removeItem(a){mr()?localStorage.removeItem(a):fr.delete(a)}};let gr=null;function Sn(){if(!gr){const{storageKey:a,maxEntries:t}=Xa().cache;gr=new En.RequestCache({storage:Gc,storageKey:a,maxEntries:t})}return gr}async function ua(a,t,r=Wr,l){const[n]=bn(),i=a.replace(/^\/+/,""),v=new URL(i,`${n.replace(/\/+$/,"")}/`);let _;try{_=await Sn().getFetch(v.toString(),r*1e3,{monotonicKey:l,fetcher:Tc})}catch(c){throw c instanceof Error&&/^HTTP 404 /.test(c.message)?new Error("Dados ainda não publicados"):c}if(_&&typeof _=="object"&&_.published===!1)throw new Error(_.reason??"Dados ainda não publicados");return _}function Fa(a){return ua(`v1/reference/municipalities/${a.toUpperCase()}.json`,void 0,kn)}function zn(){return Sn().getFetch(dv(),kn*1e3)}function Dt(a,t){const r=t?.round??1,l=t?.office??"president";let n="br";return t?.municipalityId?n=`mun/${t.municipalityId}`:t?.state&&(n=`uf/${t.state.toUpperCase()}`),ua(`v1/elections/${a}/r${r}/${l}/${n}/results.json`,void 0,Wr,"summary.ballots_counted")}function Jr(a,t,r){return ua(`v1/elections/${a}/r${r}/${t}/by-state.json`)}function Za(a,t,r,l){return ua(`v1/elections/${a}/r${r}/${t}/uf/${l.toUpperCase()}/by-municipality.json`)}function Ic(a,t,r){const l=r?.state?`uf/${r.state.toUpperCase()}`:"br";return ua(`v1/elections/${a}/${t}/${l}/comparison.json`)}function vr(a,t,r,l){const n=l?`uf/${l.toUpperCase()}`:"br";return ua(`v1/elections/${a}/r${r}/${t}/${n}/timeline.json`)}function An(a,t,r){const l=r?`uf/${r.toUpperCase()}`:"br";return ua(`v1/elections/${a}/r${t}/counting-progress/${l}.json`,void 0,Wr,"totals.ballots_counted")}function Uc(a,t,r,l){return ua(`v1/elections/${a}/r${r}/${t}/uf/${l.toUpperCase()}/by-party.json`)}var Nc=h('<div class="sevn_vote_comparison_by_round__filter-web svelte-gcb4wg"><!></div> <div class="sevn_vote_comparison_by_round__filter-mobile svelte-gcb4wg"><!></div>',1),Vc=h('<p class="sevn_vote_comparison_by_round__status svelte-gcb4wg">2º turno ainda não apurado para este estado.</p>'),Hc=h("<!> <!>",1),Wc=h('<p class="sevn_vote_comparison_by_round__status svelte-gcb4wg">Resultado ainda não publicado para este estado.</p>'),Jc=h('<div class="sevn_vote_comparison_by_round__vote_comparison svelte-gcb4wg"><!></div>'),Kc=h('<div class="sevn_vote_comparison_by_round__search svelte-gcb4wg"><!></div> <!>',1),Xc=h("<div><!> <!> <!></div>");const Yc={hash:"svelte-gcb4wg",code:`.sevn_vote_comparison_by_round.svelte-gcb4wg {display:flex;flex-direction:column;gap:24px;}.sevn_vote_comparison_by_round__filter-web.svelte-gcb4wg {display:none;}.sevn_vote_comparison_by_round__filter-mobile.svelte-gcb4wg {display:block;width:220px;}.sevn_vote_comparison_by_round__search.svelte-gcb4wg {width:100%;}
|
|
335
|
+
|
|
336
|
+
@media (min-width: 768px) {.sevn_vote_comparison_by_round__filter-web.svelte-gcb4wg {display:block;}.sevn_vote_comparison_by_round__filter-mobile.svelte-gcb4wg {display:none;}
|
|
337
|
+
}.sevn_vote_comparison_by_round__vote_comparison.svelte-gcb4wg {margin-top:10px;}.sevn_vote_comparison_by_round__status.svelte-gcb4wg {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);margin:0;}
|
|
338
|
+
|
|
339
|
+
@media (max-width: 767px) {.sevn_vote_comparison_by_round__search.svelte-gcb4wg .dropdown {position:static;margin-top:10px;}
|
|
340
|
+
}.sevn_vote_comparison_by_round--raw.svelte-gcb4wg,
|
|
341
|
+
.sevn_vote_comparison_by_round--raw.svelte-gcb4wg :where(.svelte-gcb4wg) {all:revert;}`};function Zc(a,t){je(t,!0),Me(a,Yc);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"defaultOffice",3,"president"),i=L(t,"header",19,()=>({title:"Comparação de votos entre 1º e 2º turno",description:"Veja o resultado por estado",tag:"2º TURNO",tagColor:"var(--sevn-color-blue, #3b82f6)"}));const v=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],_={presidente:"president",governador:"governor"},c={president:"presidente",governor:"governador"};let m=U(He(At(()=>c[n()]??"presidente"))),g=U(null);const y=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}].sort((D,q)=>D.label.localeCompare(q.label));let u=U(null);const w={rounds:[{label:"1º Turno",candidatos:[{name:"Candidato A",tag:"ABC",avatar:"man",avatarColor:"var(--sevn-color-primary)",percent:26.54,color:"#8faa96"},{name:"Candidato B",tag:"DEF",avatar:"man",avatarColor:"var(--sevn-color-secondary)",percent:34.38,color:"#c8b97a"}]},{label:"2º Turno",candidatos:[{name:"Candidato A",tag:"ABC",avatar:"man",avatarColor:"var(--sevn-color-primary)",percent:53.73,color:"var(--sevn-color-primary)"},{name:"Candidato B",tag:"DEF",avatar:"man",avatarColor:"var(--sevn-color-secondary)",percent:46.27,color:"var(--sevn-color-secondary)"}]}]},z=p(()=>!!e(g)?.candidates&&e(g).candidates.some(D=>D.round_2?.votes>0)),x=p(()=>{if(r())return w;if(!e(u)||!e(g)?.candidates||!Array.isArray(e(g).candidates))return null;const D=$=>e(g).candidates.map(X=>({name:Be(X.name),photoUrl:X.photo_url,tag:X.party_abbr,avatar:"man",avatarColor:X.party_color,percent:X[$]?.valid_votes_pct||0,color:X.party_color})),q=[{label:"1º Turno",candidatos:D("round_1")}];return e(z)&&q.push({label:"2º Turno",candidatos:D("round_2")}),{rounds:q}}),b=p(()=>r()?It:St(e(g)?.last_updated));Ce(()=>{e(u)&&e(m)&&!r()?E(e(u),_[e(m)]||"governor"):e(u)||s(g,null)});async function E(D,q){try{const $=await Ic(2026,q,{state:D});s(g,$,!0)}catch($){console.error("Erro ao buscar dados de comparação:",$)}}var M=Xc();let O;var K=o(M);Ye(K,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var J=d(K,2);{var B=D=>{var q=Nc(),$=ze(q),X=o($);Jt(X,{label:"Cargo",get options(){return v},get value(){return e(m)},set value(P){s(m,P,!0)}});var R=d($,2),F=o(R);Re(F,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return v},get value(){return e(m)},set value(P){s(m,P,!0)}}),f(D,q)};W(J,D=>{r()||D(B)})}var Z=d(J,2);{var ae=D=>{var q=Kc(),$=ze(q),X=o($);{let P=p(()=>e(u)?"Você selecionou:":"Busque por estado");Re(X,{get label(){return e(P)},get options(){return y},get value(){return e(u)},set value(ie){s(u,ie,!0)}})}var R=d($,2);{var F=P=>{var ie=Jc(),le=o(ie);{var I=_e=>{var ge=Hc(),fe=ze(ge);pd(fe,{get data(){return e(x)},get updatedAt(){return e(b)}});var he=d(fe,2);{var pe=Y=>{var se=Vc();f(Y,se)};W(he,Y=>{!r()&&!e(z)&&Y(pe)})}f(_e,ge)},ne=_e=>{var ge=Wc();f(_e,ge)};W(le,_e=>{e(x)?_e(I):_e(ne,!1)})}f(P,ie)};W(R,P=>{e(u)&&P(F)})}f(D,q)};W(Z,D=>{(r()||e(m))&&D(ae)})}T(()=>O=Ae(M,1,"sevn_vote_comparison_by_round svelte-gcb4wg",null,O,{"sevn_vote_comparison_by_round--raw":l()})),f(a,M),Le()}var Qc=h('<p class="sevn_counting_progress__empty-label svelte-1ht2osm">Carregando...</p>'),$c=h('<p class="sevn_counting_progress__empty-label sevn_counting_progress__empty-label--error svelte-1ht2osm"> </p>'),eu=h('<p class="sevn_counting_progress__empty-label svelte-1ht2osm"> </p>'),tu=h('<p class="sevn_counting_progress__selected-label svelte-1ht2osm">Você selecionou: <strong class="svelte-1ht2osm"> </strong></p> <!>',1),au=h('<p class="sevn_counting_progress__empty-label svelte-1ht2osm">Clique em um estado no mapa para ver a liderança</p>'),ru=h('<p class="sevn_counting_progress__empty-label svelte-1ht2osm"> </p>'),ou=h('<div class="sevn_counting_progress__search-web svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__body-web svelte-1ht2osm"><div class="sevn_counting_progress__map-col svelte-1ht2osm" role="presentation"><!> <div class="sevn_counting_progress__legend svelte-1ht2osm"><!></div></div> <div class="sevn_counting_progress__info-col svelte-1ht2osm"><!></div></div> <div class="sevn_counting_progress__mobile-section svelte-1ht2osm"><p class="sevn_counting_progress__overview-label svelte-1ht2osm">Visão geral:</p> <div class="sevn_counting_progress__map-mobile svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__legend svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__search-mobile svelte-1ht2osm"><!></div> <!></div>',1),nu=h('<div><!> <div class="sevn_counting_progress__office-web svelte-1ht2osm"><!></div> <div class="sevn_counting_progress__office-mobile svelte-1ht2osm"><!></div> <!></div>');const lu={hash:"svelte-1ht2osm",code:`.sevn_counting_progress.svelte-1ht2osm {display:flex;flex-direction:column;gap:24px;}
|
|
342
|
+
|
|
343
|
+
/* ── Search ─────────────────────────────────────────── */.sevn_counting_progress__search-web.svelte-1ht2osm {display:none;}.sevn_counting_progress__search-mobile.svelte-1ht2osm {width:100%;margin-top:10px;}
|
|
344
|
+
|
|
345
|
+
/* ── Mobile section ─────────────────────────────────── */.sevn_counting_progress__mobile-section.svelte-1ht2osm {display:flex;flex-direction:column;gap:20px;}.sevn_counting_progress__overview-label.svelte-1ht2osm {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_counting_progress__empty-label.svelte-1ht2osm {font-size:0.875rem;color:var(--sevn-color-tertiary);margin:0;opacity:0.5;}.sevn_counting_progress__empty-label--error.svelte-1ht2osm {color:#e11d48;opacity:1;}.sevn_counting_progress__office-web.svelte-1ht2osm {display:none;}.sevn_counting_progress__office-mobile.svelte-1ht2osm {display:block;width:220px;}
|
|
346
|
+
|
|
347
|
+
@media (min-width: 768px) {.sevn_counting_progress__office-web.svelte-1ht2osm {display:block;}.sevn_counting_progress__office-mobile.svelte-1ht2osm {display:none;}
|
|
348
|
+
}.sevn_counting_progress__map-mobile.svelte-1ht2osm {width:100%;}
|
|
349
|
+
|
|
350
|
+
/* ── Web body ───────────────────────────────────────── */.sevn_counting_progress__body-web.svelte-1ht2osm {display:none;}
|
|
351
|
+
|
|
352
|
+
/* ── Legend ─────────────────────────────────────────── */.sevn_counting_progress__legend.svelte-1ht2osm {margin-top:12px;}
|
|
353
|
+
|
|
354
|
+
/* ── Search mobile dropdown ─────────────────────────── */
|
|
355
|
+
@media (max-width: 767px) {.sevn_counting_progress__search-mobile.svelte-1ht2osm .dropdown,
|
|
356
|
+
.sevn_counting_progress__office-mobile.svelte-1ht2osm .dropdown {position:static;margin-top:10px;}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* ── Desktop ────────────────────────────────────────── */
|
|
360
|
+
@media (min-width: 768px) {.sevn_counting_progress__search-web.svelte-1ht2osm {display:block;}.sevn_counting_progress__mobile-section.svelte-1ht2osm {display:none;}.sevn_counting_progress__body-web.svelte-1ht2osm {display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start;}.sevn_counting_progress__map-col.svelte-1ht2osm {display:flex;flex-direction:column;}.sevn_counting_progress__info-col.svelte-1ht2osm {display:flex;flex-direction:column;gap:16px;padding-top:8px;}.sevn_counting_progress__selected-label.svelte-1ht2osm {font-size:0.875rem;color:var(--sevn-color-tertiary);margin:0;opacity:0.7;}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ── Raw ────────────────────────────────────────────── */.sevn_counting_progress--raw.svelte-1ht2osm,
|
|
364
|
+
.sevn_counting_progress--raw.svelte-1ht2osm :where(.svelte-1ht2osm) {all:revert;}`};function su(a,t){je(t,!0),Me(a,lu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"president"),v=L(t,"header",19,()=>({title:"Progresso da Apuração",description:"Explore o mapa e analise o status de contagem por região",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const _=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},m={president:"presidente",governor:"governador"};let g=U(He(At(()=>m[i()]??"presidente"))),y=U(null),u=U(!1),w=U(null);Ce(()=>{if(!Fe||r())return;if(!e(g)){s(y,null),countingProgress=null;return}const A=c[e(g)]||"president";s(u,!0),s(w,null),s(y,null),Jr(n(),A,1).then(k=>{s(y,k,!0),s(u,!1)}).catch(k=>{console.error("Failed to fetch results:",k),s(w,k instanceof Error?k.message:"Não foi possível carregar os resultados.",!0),s(u,!1)})});const z={full:"#1a1a2e",high:"#4a5568",mid:"#718096",low:"#cbd5e0"},x=[{label:"0 - 25%",color:z.low},{label:"26 - 60%",color:z.mid},{label:"61 - 99%",color:z.high},{label:"100%",color:z.full}],b={ac:"low",al:"low",am:"mid",ap:"low",ba:"high",ce:"high",df:"low",es:"high",go:"high",ma:"mid",mg:"full",ms:"high",mt:"mid",pa:"mid",pb:"mid",pe:"high",pi:"low",pr:"full",rj:"full",rn:"mid",ro:"low",rr:"low",rs:"full",sc:"full",se:"low",sp:"full",to:"low"};function E(A){return A===100?"full":A>=61?"high":A>=26?"mid":"low"}const M=p(()=>r()?b:Object.fromEntries((e(y)?.states??[]).map(A=>[A.state.toLowerCase(),E(A.ballots_counted_pct)]))),O=p(()=>Object.entries(e(M)).map(([A,k])=>({id:A,color:z[k]}))),K=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}].sort((A,k)=>A.label.localeCompare(k.label));function J(A){return K.find(k=>k.value===A)?.label?.replace(/\s+[A-Z]{2}$/,"")??A.toUpperCase()}const B={mg:[{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"41,8% dos votos válidos",position:"1º Lugar"},{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"36,4% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"21,8% dos votos válidos",position:"3º Lugar"}],sp:[{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"54,1% dos votos válidos",position:"1º Lugar"},{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"43,1% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,1% dos votos válidos",position:"3º Lugar"}],rj:[{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"50,8% dos votos válidos",position:"1º Lugar"},{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"46,3% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,8% dos votos válidos",position:"3º Lugar"}],rs:[{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"53,6% dos votos válidos",position:"1º Lugar"},{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"43,8% dos votos válidos",position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:"1,4% dos votos válidos",position:"3º Lugar"}]};function Z(A){if(B[A])return B[A];const k=A.charCodeAt(0)*7+A.charCodeAt(1)*3,ee=k%2===0,H=ee?(42+k%14).toFixed(1):(33+k%10).toFixed(1),G=ee?(35+k%8).toFixed(1):(44+k%12).toFixed(1),C=(100-parseFloat(H)-parseFloat(G)).toFixed(1),j=ee?{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatarColor:"var(--sevn-color-primary)",pct:H}:{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatarColor:"var(--sevn-color-secondary)",pct:G},te=ee?{name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatarColor:"var(--sevn-color-secondary)",pct:G}:{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatarColor:"var(--sevn-color-primary)",pct:H};return[{...j,avatar:"man",description:`${j.pct}% dos votos válidos`,position:"1º Lugar"},{...te,avatar:"man",description:`${te.pct}% dos votos válidos`,position:"2º Lugar"},{name:"Candidato C",tag:"GHI",tagColor:"#3b82f6",avatar:"man",avatarColor:"#3b82f6",description:`${C}% dos votos válidos`,position:"3º Lugar"}]}let ae=U(null),D=U(null),q=U(null),$=U(null),X=U(null);const R=p(()=>e(q)??e(ae)),F=p(()=>e(R)&&e(y)?.states&&Array.isArray(e(y).states)?e(y).states.find(A=>A.state.toLowerCase()===e(R)):null),P=p(()=>e(R)?J(e(R)):null),ie=p(()=>e(R)?r()?Z(e(R)):e(F)?.leader&&e(F)?.runner_up?[{name:Be(e(F).leader.name),photoUrl:e(F).leader.photo_url,tag:e(F).leader.party_abbr,tagColor:e(F).leader.party_color,avatar:"man",avatarColor:e(F).leader.party_color,description:`${e(F).leader.valid_votes_pct}% dos votos válidos`,position:"1º Lugar"},{name:Be(e(F).runner_up.name),photoUrl:e(F).runner_up.photo_url,tag:e(F).runner_up.party_abbr,tagColor:e(F).runner_up.party_color,avatar:"man",avatarColor:e(F).runner_up.party_color,description:`${e(F).runner_up.valid_votes_pct}% dos votos válidos`,position:"2º Lugar"}]:[]:[]),le=p(()=>r()?Qe:ot(e(y)?.last_updated));function I(A){s(ae,A.cid,!0)}function ne(A){s(q,e(q)===A.cid?null:A.cid,!0)}Ce(()=>{if(!e(q))return;function A(ee){const H=ee.target,G=e(D)?.contains(H),C=e($)?.contains(H)||e(X)?.contains(H);!G&&!C&&s(q,null)}const k=setTimeout(()=>{document.addEventListener("click",A)},0);return()=>{clearTimeout(k),document.removeEventListener("click",A)}});var _e=nu();let ge;var fe=o(_e);Ye(fe,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var he=d(fe,2),pe=o(he);Jt(pe,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(A){s(g,A,!0)}});var Y=d(he,2),se=o(Y);Re(se,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(A){s(g,A,!0)}});var me=d(Y,2);{var ce=A=>{var k=st(),ee=ze(k);{var H=j=>{var te=Qc();f(j,te)},G=j=>{var te=$c(),V=o(te);T(()=>Q(V,e(w))),f(j,te)},C=j=>{var te=ou(),V=ze(te),ve=o(V);Re(ve,{label:"Busque por estado ou interaja com o mapa",get options(){return K},get value(){return e(q)},set value(Ne){s(q,Ne,!0)}}),tt(V,Ne=>s($,Ne),()=>e($));var S=d(V,2),oe=o(S),N=o(oe);pt(N,{type:"brazil-states",get colors(){return e(O)},get selected(){return e(R)},selectionStroke:"#da00008c",selectionStrokeWidth:7,toggleSelection:!0,interactive:!0,onRegionHover:I,onRegionClick:ne});var re=d(N,2),ue=o(re);va(ue,{title:"Porcentagem das urnas apuradas:",get segments(){return x}}),tt(oe,Ne=>s(D,Ne),()=>e(D));var xe=d(oe,2),we=o(xe);{var de=Ne=>{var dt=tu(),Vt=ze(dt),Ve=d(o(Vt)),qe=o(Ve),at=d(Vt,2);{var Et=et=>{_o(et,{get candidates(){return e(ie)},get date(){return e(le)},font:"TSE"})},qt=et=>{var Ht=eu(),pa=o(Ht);T(()=>Q(pa,`Resultado ainda não publicado para ${e(P)??""}.`)),f(et,Ht)};W(at,et=>{e(ie).length>0?et(Et):et(qt,!1)})}T(()=>Q(qe,e(P))),f(Ne,dt)},ye=Ne=>{var dt=au();f(Ne,dt)};W(we,Ne=>{e(R)&&e(P)?Ne(de):Ne(ye,!1)})}var ke=d(S,2),De=d(o(ke),2),Ie=o(De);pt(Ie,{type:"brazil-states",get colors(){return e(O)}});var $e=d(De,2),Ze=o($e);va(Ze,{title:"Porcentagem das urnas apuradas:",get segments(){return x}});var Te=d($e,2),We=o(Te);{let Ne=p(()=>e(q)?"Você selecionou:":"Busque por estado e veja a liderança atual:");Re(We,{get label(){return e(Ne)},get options(){return K},get value(){return e(q)},set value(dt){s(q,dt,!0)}})}tt(Te,Ne=>s(X,Ne),()=>e(X));var Bt=d(Te,2);{var Mt=Ne=>{var dt=st(),Vt=ze(dt);{var Ve=at=>{_o(at,{get candidates(){return e(ie)},get date(){return e(le)},font:"TSE"})},qe=at=>{var Et=ru(),qt=o(Et);T(()=>Q(qt,`Resultado ainda não publicado para ${e(P)??""}.`)),f(at,Et)};W(Vt,at=>{e(ie).length>0?at(Ve):at(qe,!1)})}f(Ne,dt)};W(Bt,Ne=>{e(q)&&Ne(Mt)})}ht("mouseleave",oe,()=>s(ae,null)),f(j,te)};W(ee,j=>{e(u)?j(H):e(w)?j(G,1):j(C,!1)})}f(A,k)};W(me,A=>{(r()||e(g))&&A(ce)})}T(()=>ge=Ae(_e,1,"sevn_counting_progress svelte-1ht2osm",null,ge,{"sevn_counting_progress--raw":l()})),f(a,_e),Le()}var iu=h('<div class="sevn_state_leaders__filter-web svelte-10aer1n"><!></div> <div class="sevn_state_leaders__filter-mobile svelte-10aer1n"><!></div>',1),du=h('<p class="sevn_state_leaders__empty-label svelte-10aer1n">Carregando resultados...</p>'),vu=h('<p class="sevn_state_leaders__empty-label sevn_state_leaders__empty-label--error svelte-10aer1n"> </p>'),cu=h('<p class="sevn_state_leaders__empty-label svelte-10aer1n"> </p>'),uu=h('<div class="sevn_state_leaders__table-overlay svelte-10aer1n"><!></div>'),pu=h('<p class="sevn_state_leaders__empty-label svelte-10aer1n"> </p>'),_u=h('<div class="sevn_state_leaders__overview-web svelte-10aer1n"><!></div>'),fu=h('<div class="sevn_state_leaders__overview-mobile svelte-10aer1n"><span class="sevn_state_leaders__overview-label svelte-10aer1n">Visão geral:</span> <div class="sevn_state_leaders__tags-row svelte-10aer1n"></div></div> <div class="sevn_state_leaders__map-web svelte-10aer1n" role="presentation"><!> <div class="sevn_state_leaders__legend-overlay svelte-10aer1n"></div> <!></div> <div class="sevn_state_leaders__mobile-section svelte-10aer1n"><div class="sevn_state_leaders__map-mobile svelte-10aer1n"><!></div> <div class="sevn_state_leaders__search-mobile svelte-10aer1n"><!></div> <!> <!></div> <!>',1),mu=h("<div><!> <!> <!></div>");const gu={hash:"svelte-10aer1n",code:`.sevn_state_leaders.svelte-10aer1n {display:flex;flex-direction:column;gap:24px;}.sevn_state_leaders__filter-web.svelte-10aer1n {display:none;}.sevn_state_leaders__filter-mobile.svelte-10aer1n {display:block;width:220px;}
|
|
365
|
+
|
|
366
|
+
@media (min-width: 768px) {.sevn_state_leaders__filter-web.svelte-10aer1n {display:block;}.sevn_state_leaders__filter-mobile.svelte-10aer1n {display:none;}
|
|
367
|
+
}.sevn_state_leaders__empty-label--error.svelte-10aer1n {color:#e11d48;opacity:1;}
|
|
368
|
+
|
|
369
|
+
/* ── Visão geral mobile ──────────────────────────────── */.sevn_state_leaders__overview-mobile.svelte-10aer1n {display:flex;flex-direction:column;gap:8px;}.sevn_state_leaders__overview-label.svelte-10aer1n {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);}.sevn_state_leaders__tags-row.svelte-10aer1n {display:flex;flex-wrap:wrap;gap:8px;}
|
|
370
|
+
|
|
371
|
+
/* ── Mapa web ────────────────────────────────────────── */.sevn_state_leaders__map-web.svelte-10aer1n {display:none;position:relative;}
|
|
372
|
+
|
|
373
|
+
/* ── Legenda overlay (web) ───────────────────────────── */.sevn_state_leaders__legend-overlay.svelte-10aer1n {position:absolute;bottom:0;left:0;display:flex;flex-direction:column;gap:6px;z-index:5;}
|
|
374
|
+
|
|
375
|
+
/* ── TableCandidate overlay (web) ────────────────────── */.sevn_state_leaders__table-overlay.svelte-10aer1n {position:absolute;z-index:10;width:500px;transform:translate(-50%, 12px);filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));pointer-events:none;}.sevn_state_leaders__empty-label.svelte-10aer1n {margin:0;padding:14px 18px;background:#fff;border-radius:8px;box-shadow:0 4px 16px rgba(0, 0, 0, 0.18);font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);text-align:center;}.sevn_state_leaders__table-overlay.svelte-10aer1n .table-candidate-content {display:grid;grid-template-columns:1fr 55px 120px;align-items:center;gap:0;}.sevn_state_leaders__table-overlay.svelte-10aer1n .table-candidate-percent {text-align:right;}.sevn_state_leaders__table-overlay.svelte-10aer1n .table-candidate-votes {flex-basis:auto;margin-top:0;text-align:right;}
|
|
376
|
+
|
|
377
|
+
/* ── Seção mobile ────────────────────────────────────── */.sevn_state_leaders__mobile-section.svelte-10aer1n {display:flex;flex-direction:column;gap:20px;}.sevn_state_leaders__map-mobile.svelte-10aer1n {width:100%;}.sevn_state_leaders.svelte-10aer1n .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}
|
|
378
|
+
|
|
379
|
+
@media (max-width: 767px) {.sevn_state_leaders__search-mobile.svelte-10aer1n .dropdown {position:static;margin-top:10px;}.sevn_state_leaders.svelte-10aer1n .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.sevn_state_leaders.svelte-10aer1n .vote-overview .vote-overview-stats {gap:8px;}
|
|
380
|
+
}.sevn_state_leaders__overview-web.svelte-10aer1n {display:none;}
|
|
381
|
+
|
|
382
|
+
/* ── Desktop ─────────────────────────────────────────── */
|
|
383
|
+
@media (min-width: 768px) {.sevn_state_leaders__overview-mobile.svelte-10aer1n {display:none;}.sevn_state_leaders__map-web.svelte-10aer1n {display:block;}.sevn_state_leaders__mobile-section.svelte-10aer1n {display:none;}.sevn_state_leaders__overview-web.svelte-10aer1n {display:block;}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* ── Raw ─────────────────────────────────────────────── */.sevn_state_leaders--raw.svelte-10aer1n,
|
|
387
|
+
.sevn_state_leaders--raw.svelte-10aer1n :where(.svelte-10aer1n) {all:revert;}`};function bu(a,t){je(t,!0),Me(a,gu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"president"),v=L(t,"header",19,()=>({title:"Veja quem lidera em cada estado",description:"As cores no mapa representam o partido que está em primeiro lugar no momento",tag:"VISÃO NACIONAL",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const _=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},m={president:"presidente",governor:"governador"};let g=U(He(At(()=>m[i()]??"presidente"))),y=U(null),u=U(!1),w=U(null);Ce(()=>{if(!Fe||r())return;if(!e(g)){s(y,null);return}const C=c[e(g)]||"president";s(u,!0),s(w,null),s(y,null),Jr(n(),C,1).then(j=>{s(y,j,!0),s(u,!1)}).catch(j=>{console.error("Failed to fetch state results:",j),s(w,j instanceof Error?j.message:"Não foi possível carregar os resultados.",!0),s(u,!1)})});const z=[{party:"ABC",color:"var(--sevn-color-primary)"},{party:"DEF",color:"var(--sevn-color-secondary)"},{party:"GHI",color:"#1e4d6b"},{party:"JKL",color:"#0f172a"},{party:"MNO",color:"#16a34a"},{party:"PQR",color:"#e11d48"}],x=Object.fromEntries(z.map(C=>[C.party,C.color])),b=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}];let E=U(null);const M=p(()=>r()||c[e(g)]==="president");Ce(()=>{if(!Fe||r()||!e(g))return;const C=c[e(g)]||"president";if(C!=="president"){s(E,null);return}Dt(n(),{office:C,round:1}).then(j=>{s(E,j?.summary??null,!0)}).catch(j=>{console.error("Failed to fetch national summary:",j)})});const O=p(()=>{if(r())return b;if(!e(E))return[];const{total_valid_votes:C,null_votes:j,blank_votes:te}=e(E),V=C+j+te;return V?[{text:"Nulos",value:`${(j/V*100).toFixed(2)}%`},{text:"Brancos",value:`${(te/V*100).toFixed(2)}%`},{text:"Válidos",value:`${C.toLocaleString("pt-BR")} votos`}]:[]}),K=p(()=>r()?Qe:ot(e(E)?.last_updated)),J={ac:"PQR",al:"ABC",am:"ABC",ap:"GHI",ba:"ABC",ce:"GHI",df:"JKL",es:"GHI",go:"DEF",ma:"DEF",mg:"GHI",ms:"DEF",mt:"DEF",pa:"GHI",pb:"JKL",pe:"GHI",pi:"ABC",pr:"DEF",rj:"ABC",rn:"MNO",ro:"DEF",rr:"PQR",rs:"JKL",sc:"JKL",se:"ABC",sp:"ABC",to:"DEF"},B=p(()=>r()?Object.entries(J).map(([C,j])=>({id:C,color:x[j]})):(e(y)?.states??[]).filter(C=>C.leader?.party_color).map(C=>({id:C.state.toLowerCase(),color:C.leader.party_color}))),Z=p(()=>{if(!r()&&e(y)?.states){const C=new Set,j=[];for(const te of e(y).states){const V=te.leader?.party_abbr;V&&!C.has(V)&&(C.add(V),j.push({party:V,color:te.leader.party_color}))}return j.sort((te,V)=>te.party.localeCompare(V.party,"pt-BR"))}return z}),ae=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}].sort((C,j)=>C.label.localeCompare(j.label));function D(C){return ae.find(j=>j.value===C)?.label?.replace(/\s+[A-Z]{2}$/,"")??C.toUpperCase()}const q="var(--sevn-color-primary)",$="var(--sevn-color-secondary)",X={sp:[{name:"Candidato A",party:"ABC",percentage:54.1,votes:1728159,color:q,elected:!0},{name:"Candidato B",party:"DEF",percentage:43.1,votes:1377441,color:$},{name:"Candidato C",party:"GHI",percentage:1.1,votes:35623,color:"#1e4d6b"},{name:"Candidato D",party:"JKL",percentage:.7,votes:21439,color:"#0f172a"},{name:"Candidato E",party:"MNO",percentage:.5,votes:17344,color:"#16a34a"},{name:"Candidato F",party:"PQR",percentage:.2,votes:5149,color:"#e11d48"}],mg:[{name:"Candidato C",party:"GHI",percentage:41.8,votes:1832400,color:"#1e4d6b",elected:!0},{name:"Candidato A",party:"ABC",percentage:36.4,votes:1595680,color:q},{name:"Candidato B",party:"DEF",percentage:14.2,votes:622480,color:$},{name:"Candidato D",party:"JKL",percentage:4.6,votes:201640,color:"#0f172a"},{name:"Candidato E",party:"MNO",percentage:3,votes:131490,color:"#16a34a"}],rj:[{name:"Candidato A",party:"ABC",percentage:50.8,votes:1200450,color:q,elected:!0},{name:"Candidato B",party:"DEF",percentage:33.4,votes:789230,color:$},{name:"Candidato C",party:"GHI",percentage:9.6,votes:226840,color:"#1e4d6b"},{name:"Candidato F",party:"PQR",percentage:4.2,votes:99246,color:"#e11d48"},{name:"Candidato E",party:"MNO",percentage:2,votes:47245,color:"#16a34a"}],rs:[{name:"Candidato D",party:"JKL",percentage:53.6,votes:1580120,color:"#0f172a",elected:!0},{name:"Candidato A",party:"ABC",percentage:28.4,votes:837580,color:q},{name:"Candidato B",party:"DEF",percentage:12.8,votes:377560,color:$},{name:"Candidato C",party:"GHI",percentage:5.2,votes:153340,color:"#1e4d6b"}]};function R(C){if(X[C])return X[C];const j=C.charCodeAt(0)*7+C.charCodeAt(1)*3,te=J[C],V=x[te],ve=38+j%18,S=24+j%10,oe=Math.max(5,100-ve-S-15),N=100-ve-S-oe,re=3e5+j*6e3,ue=z.filter(De=>De.party!==te),[xe,we,de,ye,ke]=ue;return[{name:`Candidato ${te}`,party:te,percentage:ve,votes:Math.round(re*ve/100),color:V,elected:!0},{name:`Candidato ${xe.party}`,party:xe.party,percentage:S,votes:Math.round(re*S/100),color:xe.color},{name:`Candidato ${we.party}`,party:we.party,percentage:oe,votes:Math.round(re*oe/100),color:we.color},{name:`Candidato ${de.party}`,party:de.party,percentage:Math.round(N*.5),votes:Math.round(re*N*.5/100),color:de.color},{name:`Candidato ${ye.party}`,party:ye.party,percentage:Math.round(N*.3),votes:Math.round(re*N*.3/100),color:ye.color},{name:`Candidato ${ke.party}`,party:ke.party,percentage:Math.round(N*.2),votes:Math.round(re*N*.2/100),color:ke.color}]}let F=U(null),P=U(0),ie=U(0),le=U(null),I=U(null),ne=U(0),_e=U(0);const ge=p(()=>e(I)??e(F)),fe=p(()=>{if(!e(ge))return[];if(r())return R(e(ge));const C=e(y)?.states?.find(te=>te.state.toLowerCase()===e(ge).toLowerCase());if(!C)return null;const j=[];return C.leader&&j.push({name:Be(C.leader.name),party:C.leader.party_abbr,percentage:C.leader.valid_votes_pct,votes:C.leader.votes,color:C.leader.party_color,elected:C.leader.elected??!1}),C.runner_up&&j.push({name:Be(C.runner_up.name),party:C.runner_up.party_abbr,percentage:C.runner_up.valid_votes_pct,votes:C.runner_up.votes,color:C.runner_up.party_color,elected:!1}),j.length>0?j:null}),he=p(()=>_.find(C=>C.value===e(g))?.label??"Presidente"),pe=p(()=>e(ge)?`${e(he)}: ${D(e(ge))}`:"");function Y(C){if(s(F,C.cid,!0),e(le)){const j=e(le).getBoundingClientRect();s(P,C.clientX-j.left),s(ie,C.clientY-j.top)}}function se(C){if(!e(le))return;const j=e(le).getBoundingClientRect();e(I)===C.cid?s(I,null):(s(I,C.cid,!0),s(ne,C.clientX-j.left),s(_e,C.clientY-j.top))}Ce(()=>{if(!e(I))return;function C(j){e(le)&&!e(le).contains(j.target)&&s(I,null)}return document.addEventListener("click",C),()=>document.removeEventListener("click",C)});var me=mu();let ce;var A=o(me);Ye(A,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var k=d(A,2);{var ee=C=>{var j=iu(),te=ze(j),V=o(te);Jt(V,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(oe){s(g,oe,!0)}});var ve=d(te,2),S=o(ve);Re(S,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(oe){s(g,oe,!0)}}),f(C,j)};W(k,C=>{r()||C(ee)})}var H=d(k,2);{var G=C=>{var j=st(),te=ze(j);{var V=oe=>{var N=du();f(oe,N)},ve=oe=>{var N=vu(),re=o(N);T(()=>Q(re,e(w))),f(oe,N)},S=oe=>{var N=fu(),re=ze(N),ue=d(o(re),2);Ee(ue,21,()=>e(Z),Pe,(Ve,qe)=>{nt(Ve,{get label(){return e(qe).party},get color(){return e(qe).color}})});var xe=d(re,2),we=o(xe);pt(we,{type:"brazil-states",get colors(){return e(B)},interactive:!0,onRegionHover:Y,onRegionClick:se});var de=d(we,2);Ee(de,21,()=>e(Z),Pe,(Ve,qe)=>{nt(Ve,{get label(){return e(qe).party},get color(){return e(qe).color}})});var ye=d(de,2);{var ke=Ve=>{var qe=uu(),at=o(qe);{var Et=et=>{Sa(et,{get title(){return e(pe)},get candidates(){return e(fe)}})},qt=et=>{var Ht=cu(),pa=o(Ht);T(xt=>Q(pa,`Resultado ainda não publicado para ${xt??""}.`),[()=>D(e(ge))]),f(et,Ht)};W(at,et=>{e(fe)?et(Et):et(qt,!1)})}T(()=>Se(qe,`left:${e(P)??""}px;top:${e(ie)??""}px`)),f(Ve,qe)};W(ye,Ve=>{e(ge)&&Ve(ke)})}tt(xe,Ve=>s(le,Ve),()=>e(le));var De=d(xe,2),Ie=o(De),$e=o(Ie);pt($e,{type:"brazil-states",get colors(){return e(B)}});var Ze=d(Ie,2),Te=o(Ze);{let Ve=p(()=>e(F)?"Você selecionou":"Busque por estado:");Re(Te,{get label(){return e(Ve)},get options(){return ae},get value(){return e(F)},set value(qe){s(F,qe,!0)}})}var We=d(Ze,2);{var Bt=Ve=>{var qe=st(),at=ze(qe);{var Et=et=>{Sa(et,{get title(){return e(pe)},get candidates(){return e(fe)}})},qt=et=>{var Ht=pu(),pa=o(Ht);T(xt=>Q(pa,`Resultado ainda não publicado para ${xt??""}.`),[()=>D(e(F))]),f(et,Ht)};W(at,et=>{e(fe)?et(Et):et(qt,!1)})}f(Ve,qe)};W(We,Ve=>{e(F)&&Ve(Bt)})}var Mt=d(We,2);{var Ne=Ve=>{ia(Ve,{get data(){return e(O)},get date(){return e(K)},font:"TSE"})};W(Mt,Ve=>{e(M)&&Ve(Ne)})}var dt=d(De,2);{var Vt=Ve=>{var qe=_u(),at=o(qe);ia(at,{get data(){return e(O)},get date(){return e(K)},font:"TSE"}),f(Ve,qe)};W(dt,Ve=>{e(M)&&Ve(Vt)})}ht("mouseleave",xe,()=>s(F,null)),f(oe,N)};W(te,oe=>{e(u)?oe(V):e(w)?oe(ve,1):oe(S,!1)})}f(C,j)};W(H,C=>{(r()||e(g))&&C(G)})}T(()=>ce=Ae(me,1,"sevn_state_leaders svelte-10aer1n",null,ce,{"sevn_state_leaders--raw":l()})),f(a,me),Le()}var hu=h('<p class="sevn_current_leader__empty-label svelte-9ghnw">Resultado ainda não publicado.</p>'),xu=h("<div><!> <!></div>");const wu={hash:"svelte-9ghnw",code:`.sevn_current_leader.svelte-9ghnw {display:flex;flex-direction:column;gap:24px;}.sevn_current_leader--raw.svelte-9ghnw,
|
|
388
|
+
.sevn_current_leader--raw.svelte-9ghnw :where(.svelte-9ghnw) {all:revert;}.sevn_current_leader__empty-label.svelte-9ghnw {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);margin:0;}`};function yu(a,t){je(t,!0),Me(a,wu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"header",19,()=>({title:"Liderança Atual",tag:"PRESIDENTE",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const v=[{name:"Candidato A",acronym:"ABC",percent:50.9,votes:59276176,color:"var(--sevn-color-primary)",avatar:"man"}],_=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],c=p(()=>!r()&&n()?.snapshots&&Array.isArray(n().snapshots)?n().snapshots[n().snapshots.length-1]:null),m=p(()=>{if(r())return v;if(!e(c)?.results?.length||!n()?.candidates_meta||!Array.isArray(n().candidates_meta))return[];const B=e(c).results.reduce((ae,D)=>D.valid_votes_pct>ae.valid_votes_pct?D:ae),Z=n().candidates_meta.find(ae=>ae.candidate_id===B.candidate_id);return[{name:Z?.name?Be(Z.name):"Unknown",acronym:Z?.party_abbr||"",percent:B.valid_votes_pct,votes:B.votes,color:Z?.party_color||"var(--sevn-color-primary)",photoUrl:Z?.photo_url,avatar:"man"}]}),g=p(()=>e(c)?.ballots_counted_pct||0),y=p(()=>r()?"X% das urnas apuradas":e(g)?`${e(g)}% das urnas apuradas`:""),u=p(()=>i().description??e(y)),w=p(()=>{if(r())return _;if(!e(c)?.overview)return[];const{valid_votes:J,null_votes:B,blank_votes:Z}=e(c).overview,ae=J+B+Z;return[{text:"Nulos",value:`${(B/ae*100).toFixed(2)}%`},{text:"Brancos",value:`${(Z/ae*100).toFixed(2)}%`},{text:"Válidos",value:`${J.toLocaleString("pt-BR")} votos`}]}),z=p(()=>r()?Qe:ot(e(c)?.timestamp));var x=xu();let b;var E=o(x);Ye(E,{get title(){return i().title},get description(){return e(u)},get tag(){return i().tag},get tagColor(){return i().tagColor}});var M=d(E,2);{var O=J=>{da(J,{layout:"compact",get candidates(){return e(m)},get overviewData(){return e(w)},get date(){return e(z)},font:"TSE"})},K=J=>{var B=hu();f(J,B)};W(M,J=>{r()||e(m).length>=1?J(O):J(K,!1)})}T(()=>b=Ae(x,1,"sevn_current_leader svelte-9ghnw",null,b,{"sevn_current_leader--raw":l()})),f(a,x),Le()}var Cu=h('<p class="sevn_top_dispute__status svelte-1bdyfkj">Carregando...</p>'),ku=h('<p class="sevn_top_dispute__status sevn_top_dispute__status--error svelte-1bdyfkj"> </p>'),Su=h('<p class="sevn_top_dispute__status svelte-1bdyfkj">Resultado ainda não publicado para este recorte.</p>'),zu=h("<div><!> <!></div>");const Au={hash:"svelte-1bdyfkj",code:`.sevn_top_dispute.svelte-1bdyfkj {display:flex;flex-direction:column;gap:24px;}.sevn_top_dispute--raw.svelte-1bdyfkj,
|
|
389
|
+
.sevn_top_dispute--raw.svelte-1bdyfkj :where(.svelte-1bdyfkj) {all:revert;}.sevn_top_dispute__status.svelte-1bdyfkj {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_top_dispute__status--error.svelte-1bdyfkj {color:#e11d48;}`};function Mu(a,t){je(t,!0),Me(a,Au);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Disputa no topo",tag:"PRESIDENTE",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"})),v=U(null),_=U(!1),c=U(null);Ce(()=>{!Fe||r()||(s(_,!0),s(c,null),s(v,null),vr(n(),"president",1).then($=>{s(v,$,!0),s(_,!1)}).catch($=>{console.error("Failed to fetch timeline:",$),s(c,$ instanceof Error?$.message:"Não foi possível carregar os resultados.",!0),s(_,!1)}))});const m=[{name:"Candidato A",acronym:"ABC",percent:50.9,votes:59276176,color:"var(--sevn-color-primary)",avatar:"man"},{name:"Candidato B",acronym:"DEF",percent:49.1,votes:59276176,color:"var(--sevn-color-secondary)",avatar:"man"}],g=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],y=p(()=>!r()&&e(v)?.snapshots&&Array.isArray(e(v).snapshots)?e(v).snapshots[e(v).snapshots.length-1]:null),u=p(()=>r()?m:!e(y)?.results?.length||!e(v)?.candidates_meta||!Array.isArray(e(v).candidates_meta)?[]:[...e(y).results].sort((X,R)=>R.valid_votes_pct-X.valid_votes_pct).slice(0,2).map(X=>{const R=e(v).candidates_meta.find(F=>F.candidate_id===X.candidate_id);return{name:R?.name?Be(R.name):"Unknown",acronym:R?.party_abbr||"",percent:X.valid_votes_pct,votes:X.votes,color:R?.party_color||"var(--sevn-color-primary)",photoUrl:R?.photo_url,avatar:"man"}})),w=p(()=>e(y)?.ballots_counted_pct||0),z=p(()=>r()?"X% das urnas apuradas":e(w)?`${e(w)}% das urnas apuradas`:""),x=p(()=>i().description??e(z)),b=p(()=>{if(r())return g;if(!e(y)?.overview)return[];const{valid_votes:$,null_votes:X,blank_votes:R}=e(y).overview,F=$+X+R;return[{text:"Nulos",value:`${(X/F*100).toFixed(2)}%`},{text:"Brancos",value:`${(R/F*100).toFixed(2)}%`},{text:"Válidos",value:`${$.toLocaleString("pt-BR")} votos`}]}),E=p(()=>r()?Qe:ot(e(y)?.timestamp));let M=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const $=window.matchMedia("(max-width: 480px)");s(M,$.matches,!0);const X=R=>{s(M,R.matches,!0)};return $.addEventListener("change",X),()=>$.removeEventListener("change",X)});var O=zu();let K;var J=o(O);Ye(J,{get title(){return i().title},get description(){return e(x)},get tag(){return i().tag},get tagColor(){return i().tagColor}});var B=d(J,2);{var Z=$=>{var X=Cu();f($,X)},ae=$=>{var X=ku(),R=o(X);T(()=>Q(R,e(c))),f($,X)},D=$=>{var X=Su();f($,X)},q=$=>{{let X=p(()=>e(M)?"column":"row"),R=p(()=>e(M)?"start":"end");da($,{layout:"duel-compact",get duelCompactInfoDirection(){return e(X)},get overviewAlign(){return e(R)},get candidates(){return e(u)},get overviewData(){return e(b)},get date(){return e(E)},font:"TSE"})}};W(B,$=>{e(_)?$(Z):e(c)?$(ae,1):!r()&&e(u).length<2?$(D,2):$(q,!1)})}T(()=>K=Ae(O,1,"sevn_top_dispute svelte-1bdyfkj",null,K,{"sevn_top_dispute--raw":l()})),f(a,O),Le()}var Eu=h('<p class="sevn_candidate_ranking__status svelte-1jldgqf">Carregando...</p>'),Ru=h('<p class="sevn_candidate_ranking__status sevn_candidate_ranking__status--error svelte-1jldgqf"> </p>'),Pu=h("<div><!> <!></div>");const ju={hash:"svelte-1jldgqf",code:`.sevn_candidate_ranking.svelte-1jldgqf {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_ranking--raw.svelte-1jldgqf,
|
|
390
|
+
.sevn_candidate_ranking--raw.svelte-1jldgqf :where(.svelte-1jldgqf) {all:revert;}.sevn_candidate_ranking__status.svelte-1jldgqf {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_candidate_ranking__status--error.svelte-1jldgqf {color:#e11d48;}`};function Lu(a,t){je(t,!0),Me(a,ju);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Posições de liderança",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"})),v=U(null),_=U(!1),c=U(null);Ce(()=>{!Fe||r()||(s(_,!0),s(c,null),s(v,null),vr(n(),"president",1).then(B=>{s(v,B,!0),s(_,!1)}).catch(B=>{console.error("Failed to fetch timeline:",B),s(c,B instanceof Error?B.message:"Não foi possível carregar os resultados.",!0),s(_,!1)}))});const m=[{position:"1º lugar",name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"41,8% dos votos válidos"},{position:"2º lugar",name:"Candidato B",tag:"DEF",tagColor:"var(--sevn-color-secondary)",avatar:"man",avatarColor:"var(--sevn-color-secondary)",description:"36,4% dos votos válidos"},{position:"3º lugar",name:"Candidato C",tag:"GHI",tagColor:"#1e4d6b",avatar:"man",avatarColor:"#1e4d6b",description:"21,8% dos votos válidos"},{position:"4º lugar",name:"Candidato D",tag:"JKL",tagColor:"#0f172a",avatar:"man",avatarColor:"#0f172a",description:"8,4% dos votos válidos"},{position:"5º lugar",name:"Candidato E",tag:"MNO",tagColor:"#16a34a",avatar:"man",avatarColor:"#16a34a",description:"3,2% dos votos válidos"},{position:"6º lugar",name:"Candidato F",tag:"PQR",tagColor:"#e11d48",avatar:"man",avatarColor:"#e11d48",description:"1,7% dos votos válidos"}],g=p(()=>!r()&&e(v)?.snapshots&&Array.isArray(e(v).snapshots)?e(v).snapshots[e(v).snapshots.length-1]:null),y=p(()=>r()?m:!e(g)?.results?.length||!e(v)?.candidates_meta||!Array.isArray(e(v).candidates_meta)?[]:[...e(g).results].sort((Z,ae)=>ae.valid_votes_pct-Z.valid_votes_pct).map((Z,ae)=>{const D=e(v).candidates_meta.find(q=>q.candidate_id===Z.candidate_id);return{position:Hr(Z.position,ae),name:D?.name?Be(D.name):"Unknown",photoUrl:D?.photo_url,tag:D?.party_abbr||"",tagColor:D?.party_color||"var(--sevn-color-primary)",avatar:"man",avatarColor:D?.party_color||"var(--sevn-color-primary)",description:`${Z.valid_votes_pct}% dos votos válidos`}})),u=p(()=>e(g)?.ballots_counted_pct||0),w=p(()=>r()?"X% das urnas apuradas":e(u)?`${e(u)}% das urnas apuradas`:""),z=p(()=>i().description??e(w));var x=Pu();let b;var E=o(x);Ye(E,{get title(){return i().title},get description(){return e(z)},get tag(){return i().tag},get tagColor(){return i().tagColor}});var M=d(E,2);{var O=B=>{var Z=Eu();f(B,Z)},K=B=>{var Z=Ru(),ae=o(Z);T(()=>Q(ae,e(c))),f(B,Z)},J=B=>{wn(B,{get candidates(){return e(y)},itemsPerPage:3})};W(M,B=>{e(_)?B(O):e(c)?B(K,1):B(J,!1)})}T(()=>b=Ae(x,1,"sevn_candidate_ranking svelte-1jldgqf",null,b,{"sevn_candidate_ranking--raw":l()})),f(a,x),Le()}var Du=h('<hr class="sevn_live_summary__divider svelte-1igr4ry"/>'),Bu=h("<!> <!>",1),qu=h('<div><!> <div class="sevn_live_summary__candidates svelte-1igr4ry"></div> <!></div>');const Fu={hash:"svelte-1igr4ry",code:`.sevn_live_summary.svelte-1igr4ry {display:flex;flex-direction:column;gap:24px;}.sevn_live_summary--raw.svelte-1igr4ry,
|
|
391
|
+
.sevn_live_summary--raw.svelte-1igr4ry :where(.svelte-1igr4ry) {all:revert;}.sevn_live_summary__candidates.svelte-1igr4ry {display:flex;flex-direction:column;gap:16px;}.sevn_live_summary__divider.svelte-1igr4ry {border:none;border-top:1px solid rgba(0, 0, 0, 0.1);margin:0;}.sevn_live_summary.svelte-1igr4ry .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_live_summary.svelte-1igr4ry .vote-overview .vote-overview-stats {gap:8px;}`};function Tu(a,t){je(t,!0),Me(a,Fu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"header",19,()=>({title:"Resumo em tempo real",tag:"PRESIDENTE",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const v=[{name:"Candidato A",tag:"ABC",tagColor:"var(--sevn-color-primary)",avatar:"man",avatarColor:"var(--sevn-color-primary)",description:"42,8% dos votos válidos",position:"1º Lugar"}],_=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],c=p(()=>!r()&&n()?.snapshots&&Array.isArray(n().snapshots)?n().snapshots[n().snapshots.length-1]:null),m=p(()=>{if(r())return v;if(!e(c)?.results?.length||!n()?.candidates_meta||!Array.isArray(n().candidates_meta))return[];const ae=[...e(c).results].sort((q,$)=>$.valid_votes_pct-q.valid_votes_pct)[0],D=n().candidates_meta.find(q=>q.candidate_id===ae.candidate_id);return[{name:D?.name?Be(D.name):"Unknown",photoUrl:D?.photo_url,tag:D?.party_abbr||"",tagColor:D?.party_color||"var(--sevn-color-primary)",avatar:"man",avatarColor:D?.party_color||"var(--sevn-color-primary)",description:`${ae.valid_votes_pct}% dos votos válidos`,position:"1º Lugar"}]}),g=p(()=>{if(r())return _;if(!e(c)?.overview)return[];const{valid_votes:Z,null_votes:ae,blank_votes:D}=e(c).overview,q=Z+ae+D;return[{text:"Nulos",value:`${(ae/q*100).toFixed(2)}%`},{text:"Brancos",value:`${(D/q*100).toFixed(2)}%`},{text:"Válidos",value:`${Z.toLocaleString("pt-BR")} votos`}]}),y=p(()=>e(c)?.ballots_counted_pct||0),u=p(()=>r()?"X% das urnas apuradas":e(y)?`${e(y)}% das urnas apuradas`:""),w=p(()=>i().description??e(u)),z=p(()=>r()?Qe:ot(e(c)?.timestamp)),x=p(()=>e(z)),b="TSE";let E=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const Z=window.matchMedia("(max-width: 480px)");s(E,Z.matches,!0);const ae=D=>{s(E,D.matches,!0)};return Z.addEventListener("change",ae),()=>Z.removeEventListener("change",ae)});var M=qu();let O;var K=o(M);Ye(K,{get title(){return i().title},get description(){return e(w)},get tag(){return i().tag},get tagColor(){return i().tagColor}});var J=d(K,2);Ee(J,21,()=>e(m),Pe,(Z,ae,D)=>{var q=Bu(),$=ze(q);{var X=F=>{var P=Du();f(F,P)};W($,F=>{D>0&&F(X)})}var R=d($,2);{let F=p(()=>e(E)?"right":"left"),P=p(()=>e(E)?"left":"right"),ie=p(()=>e(E)?400:600);bt(R,{get name(){return e(ae).name},get tag(){return e(ae).tag},get tagColor(){return e(ae).tagColor},get avatar(){return e(ae).avatar},get avatarColor(){return e(ae).avatarColor},get description(){return e(ae).description},get position(){return e(ae).position},get positionSide(){return e(F)},get descriptionSide(){return e(P)},get descWeight(){return e(ie)}})}f(Z,q)});var B=d(J,2);ia(B,{get data(){return e(g)},get date(){return e(x)},font:b,borderTop:!0}),T(()=>O=Ae(M,1,"sevn_live_summary svelte-1igr4ry",null,O,{"sevn_live_summary--raw":l()})),f(a,M),Le()}var Ou=h('<p class="sevn_candidate_performance__status svelte-xuxslg"> </p>'),Gu=h('<p class="sevn_candidate_performance__status sevn_candidate_performance__status--error svelte-xuxslg"> </p>'),Iu=h('<p class="sevn_candidate_performance__status svelte-xuxslg">Resultado ainda não publicado para este recorte.</p>'),Uu=h('<div class="sevn_candidate_performance__content svelte-xuxslg"><div class="sevn_candidate_performance__chart svelte-xuxslg"><!></div> <div class="sevn_candidate_performance__ranking svelte-xuxslg"><!></div></div>'),Nu=h('<div><!> <div class="sevn_candidate_performance__office-web svelte-xuxslg"><!></div> <div class="sevn_candidate_performance__office-mobile svelte-xuxslg"><!></div> <div class="sevn_candidate_performance__filters svelte-xuxslg"><div class="sevn_candidate_performance__uf svelte-xuxslg"><!></div> <div class="sevn_candidate_performance__municipality svelte-xuxslg"><!></div> <div class="sevn_candidate_performance__filter svelte-xuxslg"><!></div></div> <!></div>');const Vu={hash:"svelte-xuxslg",code:`.sevn_candidate_performance.svelte-xuxslg {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_performance--raw.svelte-xuxslg,
|
|
392
|
+
.sevn_candidate_performance--raw.svelte-xuxslg :where(.svelte-xuxslg) {all:revert;}.sevn_candidate_performance__status.svelte-xuxslg {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_candidate_performance__status--error.svelte-xuxslg {color:#e11d48;}
|
|
393
|
+
|
|
394
|
+
/* Filters row */.sevn_candidate_performance__filters.svelte-xuxslg {display:flex;gap:16px;align-items:flex-start;}.sevn_candidate_performance__uf.svelte-xuxslg,
|
|
395
|
+
.sevn_candidate_performance__municipality.svelte-xuxslg {flex:1;min-width:0;}.sevn_candidate_performance__filter.svelte-xuxslg {width:200px;flex-shrink:0;}.sevn_candidate_performance__office-web.svelte-xuxslg {display:none;}.sevn_candidate_performance__office-mobile.svelte-xuxslg {display:block;width:220px;}
|
|
396
|
+
|
|
397
|
+
@media (min-width: 769px) {.sevn_candidate_performance__office-web.svelte-xuxslg {display:block;}.sevn_candidate_performance__office-mobile.svelte-xuxslg {display:none;}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* Content: chart + ranking side by side on web */.sevn_candidate_performance__content.svelte-xuxslg {display:flex;gap:40px;align-items:center;}.sevn_candidate_performance__chart.svelte-xuxslg {flex-shrink:0;}.sevn_candidate_performance__ranking.svelte-xuxslg {flex:1;min-width:0;}.sevn_candidate_performance.svelte-xuxslg .vote-overview {gap:8px;padding:0.5rem 0;align-items:flex-end;}
|
|
401
|
+
|
|
402
|
+
/* Mobile */
|
|
403
|
+
@media (max-width: 768px) {.sevn_candidate_performance__filters.svelte-xuxslg {flex-direction:column;gap:12px;}.sevn_candidate_performance__office-mobile.svelte-xuxslg,
|
|
404
|
+
.sevn_candidate_performance__uf.svelte-xuxslg,
|
|
405
|
+
.sevn_candidate_performance__municipality.svelte-xuxslg,
|
|
406
|
+
.sevn_candidate_performance__filter.svelte-xuxslg {width:100%;}.sevn_candidate_performance__uf.svelte-xuxslg .dropdown,
|
|
407
|
+
.sevn_candidate_performance__municipality.svelte-xuxslg .dropdown,
|
|
408
|
+
.sevn_candidate_performance__filter.svelte-xuxslg .dropdown {position:static;margin-top:10px;}.sevn_candidate_performance__content.svelte-xuxslg {flex-direction:column;align-items:stretch;gap:24px;}.sevn_candidate_performance__chart.svelte-xuxslg {display:flex;justify-content:center;}.sevn_candidate_performance.svelte-xuxslg .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.sevn_candidate_performance.svelte-xuxslg .vote-overview .vote-overview-stats {gap:8px;}
|
|
409
|
+
}`};function Hu(a,t){je(t,!0),Me(a,Vu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"president"),v=L(t,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados presidenciais por município, em tempo real"}));const _=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},m={president:"presidente",governor:"governador"};let g=U(He(At(()=>m[i()]??"presidente")));const y=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mt",label:"Mato Grosso MT"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mg",label:"Minas Gerais MG"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pr",label:"Paraná PR"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"sc",label:"Santa Catarina SC"},{value:"sp",label:"São Paulo SP"},{value:"se",label:"Sergipe SE"},{value:"to",label:"Tocantins TO"}],u=[{value:"1turno",label:"1º Turno"},{value:"2turno",label:"2º Turno"}],w=[{value:"3507001",label:"Boituva"},{value:"3509502",label:"Campinas"},{value:"3518800",label:"Guarulhos"},{value:"3543402",label:"Ribeirão Preto"},{value:"3548500",label:"Santos"},{value:"3549805",label:"São João da Boa Vista"},{value:"3550308",label:"São Paulo"},{value:"3552205",label:"Sorocaba"}];let z=U(""),x=U(null),b=U(""),E=U(null),M=U(!1),O=U(null),K=U(!1),J=U(null);Ce(()=>{!Fe||!e(z)||(s(x,null),!r()&&(s(E,null),s(M,!0),Fa(e(z)).then(C=>{s(E,C,!0),s(M,!1)}).catch(C=>{console.error("Failed to fetch municipalities:",C),s(M,!1)})))});const B=p(()=>!r()&&e(E)?.municipalities?e(E).municipalities.map(C=>({value:String(C.municipality_id),label:C.name})):r()?w:[]),Z=p(()=>e(B).find(C=>C.value===e(x))?.label??null),ae=p(()=>e(z)?e(M)?"Carregando municípios...":e(x)?"Você selecionou:":"Busque pelo município (opcional)":"Selecione a UF primeiro");let D=U(null);Ce(()=>{if(!Fe||r()||!e(z)||!e(g))return;const C=`${e(z)}|${e(g)}|${e(x)??""}`;if(e(D)===C)return;const j=c[e(g)]||"president",te=e(x)?Number(e(x)):void 0;let V=!1;return Dt(n(),{office:j,round:2,state:e(z),municipalityId:te}).then(ve=>{if(V)return;const S=!!ve?.candidates?.some(oe=>oe.votes>0);s(b,S?"2turno":"1turno",!0),s(D,C)}).catch(()=>{V||(s(b,"1turno"),s(D,C))}),()=>{V=!0}}),Ce(()=>{if(!Fe||r())return;if(!e(z)||!e(b)||!e(g)){s(O,null);return}const C=e(b)==="2turno"?2:1,j=c[e(g)]||"president";s(K,!0),s(J,null),s(O,null),Dt(n(),{office:j,round:C,state:e(z),municipalityId:e(x)?Number(e(x)):void 0}).then(te=>{s(O,te,!0),s(K,!1)}).catch(te=>{console.error("Failed to fetch municipality results:",te),s(J,te instanceof Error?te.message:"Não foi possível carregar os resultados.",!0),s(K,!1)})});const q=[{name:"Candidato A",tag:"ABC",dotColor:"var(--sevn-color-primary)",tagColor:"var(--sevn-color-primary)",votes:"42,8%"},{name:"Candidato B",tag:"EFG",dotColor:"#16a34a",tagColor:"#16a34a",votes:"31,4%"},{name:"Candidato C",tag:"HIJ",dotColor:"#1e4d6b",tagColor:"#1e4d6b",votes:"12,6%"},{name:"Candidato D",tag:"KLM",dotColor:"#0f172a",tagColor:"#0f172a",votes:"6,7%"},{name:"Candidato E",tag:"MNO",dotColor:"#e11d48",tagColor:"#e11d48",votes:"4,1%"}],$=[{label:"ABC",value:42.8,color:"var(--sevn-color-primary)"},{label:"EFG",value:31.4,color:"#16a34a"},{label:"HIJ",value:12.6,color:"#1e4d6b"},{label:"KLM",value:6.7,color:"#0f172a"},{label:"MNO",value:4.1,color:"#e11d48"}],X=p(()=>{if(r())return{candidates:q,segments:$,totalVotes:"118.552.353"};if(!e(O)?.candidates||!Array.isArray(e(O).candidates))return{candidates:[],segments:[],totalVotes:null};const C=[...e(O).candidates].sort((V,ve)=>ve.valid_votes_pct-V.valid_votes_pct),j=C.map(V=>({name:Be(V.ballot_name),tag:V.party_abbr,dotColor:V.party_color||"var(--sevn-color-primary)",tagColor:V.party_color||"var(--sevn-color-primary)",votes:`${V.valid_votes_pct.toFixed(1).replace(".",",")}%`})),te=C.map(V=>({label:V.party_abbr,value:V.valid_votes_pct,color:V.party_color||"var(--sevn-color-primary)"}));return{candidates:j,segments:te,totalVotes:e(O).summary?.total_valid_votes.toLocaleString("pt-BR")??null}}),R=p(()=>e(X).candidates),F=p(()=>e(X).segments),P=p(()=>e(X).totalVotes),ie=p(()=>r()?Qe:ot(e(O)?.summary?.last_updated));let le=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const C=window.matchMedia("(max-width: 480px)");s(le,C.matches,!0);const j=te=>{s(le,te.matches,!0)};return C.addEventListener("change",j),()=>C.removeEventListener("change",j)});var I=Nu();let ne;var _e=o(I);Ye(_e,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var ge=d(_e,2),fe=o(ge);Jt(fe,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(C){s(g,C,!0)}});var he=d(ge,2),pe=o(he);Re(pe,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(C){s(g,C,!0)}});var Y=d(he,2),se=o(Y),me=o(se);{let C=p(()=>e(z)?"Você selecionou:":"Busque por UF");Re(me,{get label(){return e(C)},get icon(){return Ke},iconSize:13,get options(){return y},get value(){return e(z)},set value(j){s(z,j,!0)}})}var ce=d(se,2),A=o(ce);{let C=p(()=>!e(z)||e(M));Re(A,{get label(){return e(ae)},get icon(){return Ke},iconSize:13,get options(){return e(B)},get disabled(){return e(C)},get value(){return e(x)},set value(j){s(x,j,!0)}})}var k=d(ce,2),ee=o(k);Re(ee,{label:"Filtrar por",get icon(){return Ke},iconSize:13,get options(){return u},get value(){return e(b)},set value(C){s(b,C,!0)}});var H=d(Y,2);{var G=C=>{var j=st(),te=ze(j);{var V=N=>{var re=Ou(),ue=o(re);T(()=>Q(ue,`Carregando resultados${e(Z)?` de ${e(Z)}`:""}...`)),f(N,re)},ve=N=>{var re=Gu(),ue=o(re);T(()=>Q(ue,e(J))),f(N,re)},S=N=>{var re=Iu();f(N,re)},oe=N=>{var re=Uu(),ue=o(re),xe=o(ue);{let ye=p(()=>u.find(De=>De.value===e(b))?.label??""),ke=p(()=>e(le)?"250px":"388px");Pr(xe,{get segments(){return e(F)},get centerLabel(){return e(ye)},get size(){return e(ke)},centerLabelSize:15,centerSubSize:10,radius:85,thickness:18,gap:1})}var we=d(ue,2),de=o(we);ka(de,{get candidates(){return e(R)},get totalVotes(){return e(P)},get date(){return e(ie)},font:"TSE"}),f(N,re)};W(te,N=>{e(K)?N(V):e(J)?N(ve,1):!r()&&e(R).length===0?N(S,2):N(oe,!1)})}f(C,j)};W(H,C=>{e(z)&&e(b)&&e(g)&&C(G)})}T(()=>ne=Ae(I,1,"sevn_candidate_performance svelte-xuxslg",null,ne,{"sevn_candidate_performance--raw":l()})),f(a,I),Le()}var Wu=h('<p class="sevn_round_results__status svelte-xuzras"> </p>'),Ju=h('<p class="sevn_round_results__status sevn_round_results__status--error svelte-xuzras"> </p>'),Ku=h('<p class="sevn_round_results__status svelte-xuzras">2º turno ainda não publicado para este município.</p>'),Xu=h('<div class="sevn_round_results__chart svelte-xuzras"><!></div> <!>',1),Yu=h('<div class="sevn_round_results__grid svelte-xuzras"><div class="sevn_round_results__round svelte-xuzras"><div class="sevn_round_results__chart svelte-xuzras"><!></div> <!></div> <div class="sevn_round_results__round svelte-xuzras"><!></div></div>'),Zu=h('<div><!> <div class="sevn_round_results__office-web svelte-xuzras"><!></div> <div class="sevn_round_results__office-mobile svelte-xuzras"><!></div> <div class="sevn_round_results__filters svelte-xuzras"><div class="sevn_round_results__filter svelte-xuzras"><!></div> <div class="sevn_round_results__filter svelte-xuzras"><!></div></div> <!></div>');const Qu={hash:"svelte-xuzras",code:`.sevn_round_results.svelte-xuzras {display:flex;flex-direction:column;gap:24px;}.sevn_round_results--raw.svelte-xuzras,
|
|
410
|
+
.sevn_round_results--raw.svelte-xuzras :where(.svelte-xuzras) {all:revert;}.sevn_round_results__status.svelte-xuzras {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_round_results__status--error.svelte-xuzras {color:#e11d48;}
|
|
411
|
+
|
|
412
|
+
/* Filters row */.sevn_round_results__filters.svelte-xuzras {display:flex;gap:16px;align-items:flex-start;}.sevn_round_results__filter.svelte-xuzras {flex:1;min-width:0;}.sevn_round_results__office-web.svelte-xuzras {display:none;}.sevn_round_results__office-mobile.svelte-xuzras {display:block;width:220px;}
|
|
413
|
+
|
|
414
|
+
@media (min-width: 769px) {.sevn_round_results__office-web.svelte-xuzras {display:block;}.sevn_round_results__office-mobile.svelte-xuzras {display:none;}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* Grid: two rounds side by side on web */.sevn_round_results__grid.svelte-xuzras {display:grid;grid-template-columns:1fr 1fr;gap:40px;}.sevn_round_results__round.svelte-xuzras {display:flex;flex-direction:column;gap:24px;}.sevn_round_results__chart.svelte-xuzras {display:flex;justify-content:center;}.sevn_round_results.svelte-xuzras .vote-overview {gap:8px;padding:0.5rem 0;align-items:flex-end;}
|
|
418
|
+
|
|
419
|
+
/* Mobile */
|
|
420
|
+
@media (max-width: 768px) {.sevn_round_results__grid.svelte-xuzras {grid-template-columns:1fr;gap:40px;}.sevn_round_results__filters.svelte-xuzras {flex-direction:column;gap:12px;}.sevn_round_results__filter.svelte-xuzras {width:100%;}.sevn_round_results__filter.svelte-xuzras .dropdown {position:static;margin-top:10px;}.sevn_round_results.svelte-xuzras .vote-overview {padding:3px;font-size:0.7rem;gap:8px;}.sevn_round_results.svelte-xuzras .vote-overview .vote-overview-stats {gap:8px;}
|
|
421
|
+
}`};function $u(a,t){je(t,!0),Me(a,Qu);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"president"),v=L(t,"header",19,()=>({title:"Análise de resultados por turno",description:"Resultados presidenciais por município, em tempo real"}));const _=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},m={president:"presidente",governor:"governador"};let g=U(He(At(()=>m[i()]??"presidente")));const y=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mt",label:"Mato Grosso MT"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mg",label:"Minas Gerais MG"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pr",label:"Paraná PR"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"sc",label:"Santa Catarina SC"},{value:"sp",label:"São Paulo SP"},{value:"se",label:"Sergipe SE"},{value:"to",label:"Tocantins TO"}],u=[{value:"3507001",label:"Boituva"},{value:"3509502",label:"Campinas"},{value:"3518800",label:"Guarulhos"},{value:"3543402",label:"Ribeirão Preto"},{value:"3548500",label:"Santos"},{value:"3549805",label:"São João da Boa Vista"},{value:"3550308",label:"São Paulo"},{value:"3552205",label:"Sorocaba"}];let w=U(""),z=U(null),x=U(null),b=U(!1);Ce(()=>{!Fe||!e(w)||(s(z,null),!r()&&(s(x,null),s(b,!0),Fa(e(w)).then(V=>{s(x,V,!0),s(b,!1)}).catch(V=>{console.error("Failed to fetch municipalities:",V),s(b,!1)})))});const E=p(()=>!r()&&e(x)?.municipalities?e(x).municipalities.map(V=>({value:String(V.municipality_id),label:V.name})):r()?u:[]),M=p(()=>e(E).find(V=>V.value===e(z))?.label??null),O=p(()=>e(w)?e(b)?"Carregando municípios...":e(z)?"Você selecionou:":"Busque pelo município (opcional)":"Selecione a UF primeiro"),K=[{name:"Candidato A",tag:"ABC",dotColor:"var(--sevn-color-primary)",tagColor:"var(--sevn-color-primary)",votes:"42,8%"},{name:"Candidato B",tag:"DEF",dotColor:"#16a34a",tagColor:"#16a34a",votes:"31,4%"},{name:"Candidato C",tag:"GHI",dotColor:"#1e4d6b",tagColor:"#1e4d6b",votes:"12,6%"},{name:"Candidato D",tag:"JKL",dotColor:"#0f172a",tagColor:"#0f172a",votes:"9,7%"},{name:"Candidato E",tag:"MNO",dotColor:"#e11d48",tagColor:"#e11d48",votes:"4,1%"}],J=[{label:"ABC",value:42.8,color:"var(--sevn-color-primary)"},{label:"DEF",value:31.4,color:"#16a34a"},{label:"GHI",value:12.6,color:"#1e4d6b"},{label:"JKL",value:9.7,color:"#0f172a"},{label:"MNO",value:4.1,color:"#e11d48"}],B=[{name:"Candidato A",tag:"ABC",dotColor:"var(--sevn-color-primary)",tagColor:"var(--sevn-color-primary)",votes:"54,2%",elected:!0},{name:"Candidato B",tag:"DEF",dotColor:"#16a34a",tagColor:"#16a34a",votes:"45,8%"}],Z=[{label:"ABC",value:54.2,color:"var(--sevn-color-primary)"},{label:"DEF",value:45.8,color:"#16a34a"}];let ae=U(null),D=U(null),q=U(!1),$=U(null),X=U(!1);Ce(()=>{if(!Fe||r())return;if(!e(w)||!e(g)){s(ae,null),s(D,null),s(X,!1);return}s(ae,null),s(D,null),s(X,!1),s(q,!0),s($,null);const V=e(w),ve=e(z)?Number(e(z)):void 0,S=c[e(g)]||"president";Dt(n(),{round:1,state:V,municipalityId:ve,office:S}).then(oe=>{s(ae,oe,!0)}).catch(oe=>{console.error("Failed to fetch round 1 results:",oe),s($,"Failed to load data")}).finally(()=>{s(q,!1)}),Dt(n(),{round:2,state:V,municipalityId:ve,office:S}).then(oe=>{s(D,oe,!0)}).catch(oe=>{console.error(`No round 2 results for ${e(z)}:`,oe),s(D,null),s(X,!0)})});const R=p(()=>r()?K:e(ae)?.candidates?e(ae).candidates.map(V=>({name:Be(V.ballot_name),tag:V.party_abbr,dotColor:V.party_color,tagColor:V.party_color,votes:`${V.valid_votes_pct.toFixed(1).replace(".",",")}%`,elected:V.elected})):[]),F=p(()=>r()?J:e(ae)?.candidates?e(ae).candidates.map(V=>({label:V.party_abbr,value:V.valid_votes_pct,color:V.party_color})):[]),P=p(()=>r()?B:e(D)?.candidates?e(D).candidates.map(V=>({name:Be(V.ballot_name),tag:V.party_abbr,dotColor:V.party_color,tagColor:V.party_color,votes:`${V.valid_votes_pct.toFixed(1).replace(".",",")}%`,elected:V.elected})):[]),ie=p(()=>r()?Z:e(D)?.candidates?e(D).candidates.map(V=>({label:V.party_abbr,value:V.valid_votes_pct,color:V.party_color})):[]),le=p(()=>r()?"118.552.353":e(ae)?.summary?e(ae).summary.total_valid_votes.toLocaleString("pt-BR"):null),I=p(()=>r()?"118.552.353":e(D)?.summary?e(D).summary.total_valid_votes.toLocaleString("pt-BR"):null),ne=p(()=>r()?Qe:ot(e(ae)?.summary?.last_updated)),_e=p(()=>r()?Qe:ot(e(D)?.summary?.last_updated)),ge=p(()=>r()?It:St(e(D)?.summary?.last_updated??e(ae)?.summary?.last_updated));let fe=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const V=window.matchMedia("(max-width: 480px)");s(fe,V.matches,!0);const ve=S=>{s(fe,S.matches,!0)};return V.addEventListener("change",ve),()=>V.removeEventListener("change",ve)});var he=Zu();let pe;var Y=o(he);Ye(Y,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var se=d(Y,2),me=o(se);Jt(me,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(V){s(g,V,!0)}});var ce=d(se,2),A=o(ce);Re(A,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(V){s(g,V,!0)}});var k=d(ce,2),ee=o(k),H=o(ee);{let V=p(()=>e(w)?"Você selecionou":"Busque por UF");Re(H,{get label(){return e(V)},get icon(){return Ke},iconSize:13,get options(){return y},get meta(){return e(ge)},get value(){return e(w)},set value(ve){s(w,ve,!0)}})}var G=d(ee,2),C=o(G);{let V=p(()=>!e(w)||e(b));Re(C,{get label(){return e(O)},get icon(){return Ke},iconSize:13,get options(){return e(E)},get disabled(){return e(V)},get value(){return e(z)},set value(ve){s(z,ve,!0)}})}var j=d(k,2);{var te=V=>{var ve=st(),S=ze(ve);{var oe=ue=>{var xe=Wu(),we=o(xe);T(()=>Q(we,`Carregando resultados${e(M)?` de ${e(M)}`:""}...`)),f(ue,xe)},N=ue=>{var xe=Ju(),we=o(xe);T(()=>Q(we,e($))),f(ue,xe)},re=ue=>{var xe=Yu(),we=o(xe),de=o(we),ye=o(de);{let Te=p(()=>e(fe)?"250px":"300px");Pr(ye,{get segments(){return e(F)},centerLabel:"1ºTurno",get size(){return e(Te)},radius:85,thickness:18,centerLabelSize:15,gap:1})}var ke=d(de,2);ka(ke,{get candidates(){return e(R)},get totalVotes(){return e(le)},get date(){return e(ne)},font:"TSE"});var De=d(we,2),Ie=o(De);{var $e=Te=>{var We=Ku();f(Te,We)},Ze=Te=>{var We=Xu(),Bt=ze(We),Mt=o(Bt);{let dt=p(()=>e(fe)?"250px":"300px");Pr(Mt,{get segments(){return e(ie)},centerLabel:"2ºTurno",get size(){return e(dt)},radius:85,thickness:18,centerLabelSize:15,gap:1})}var Ne=d(Bt,2);ka(Ne,{get candidates(){return e(P)},get totalVotes(){return e(I)},get date(){return e(_e)},font:"TSE"}),f(Te,We)};W(Ie,Te=>{!r()&&e(X)?Te($e):Te(Ze,!1)})}f(ue,xe)};W(S,ue=>{e(q)?ue(oe):e($)?ue(N,1):ue(re,!1)})}f(V,ve)};W(j,V=>{e(w)&&e(g)&&V(te)})}T(()=>pe=Ae(he,1,"sevn_round_results svelte-xuzras",null,pe,{"sevn_round_results--raw":l()})),f(a,he),Le()}var ep=h('<div class="sevn_election_status__filter svelte-1q4hqtb"><!></div>'),tp=h('<div class="sevn_election_status__filter svelte-1q4hqtb"><!></div>'),ap=h('<div class="sevn_election_status__body svelte-1q4hqtb"><div class="sevn_election_status__left svelte-1q4hqtb"><p class="sevn_election_status__desc svelte-1q4hqtb"> </p> <div class="sevn_election_status__map svelte-1q4hqtb"><!></div> <div class="sevn_election_status__legend svelte-1q4hqtb"><!></div> <div class="sevn_election_status__tags svelte-1q4hqtb"></div> <p class="sevn_election_status__source svelte-1q4hqtb"> </p></div> <div class="sevn_election_status__right svelte-1q4hqtb"><!></div></div>'),rp=h('<div><!> <div class="sevn_election_status__office-web svelte-1q4hqtb"><!></div> <div class="sevn_election_status__office-mobile svelte-1q4hqtb"><!></div> <!> <!> <!></div>');const op={hash:"svelte-1q4hqtb",code:`.sevn_election_status.svelte-1q4hqtb {display:flex;flex-direction:column;gap:24px;}.sevn_election_status--raw.svelte-1q4hqtb,
|
|
422
|
+
.sevn_election_status--raw.svelte-1q4hqtb :where(.svelte-1q4hqtb) {all:revert;}
|
|
423
|
+
|
|
424
|
+
/* Body: two columns on web */.sevn_election_status__body.svelte-1q4hqtb {display:flex;gap:40px;align-items:stretch;}.sevn_election_status__left.svelte-1q4hqtb {display:flex;flex-direction:column;gap:16px;flex:0 0 38%;}.sevn_election_status__right.svelte-1q4hqtb {flex:1;min-width:0;display:flex;align-items:flex-end;}
|
|
425
|
+
|
|
426
|
+
/* Description text */.sevn_election_status__desc.svelte-1q4hqtb {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);line-height:1.5;margin:0;}
|
|
427
|
+
|
|
428
|
+
/* Source / footer */.sevn_election_status__source.svelte-1q4hqtb {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.55;margin:0;line-height:1.4;}
|
|
429
|
+
|
|
430
|
+
/* Tags row */.sevn_election_status__tags.svelte-1q4hqtb {display:flex;flex-wrap:wrap;gap:6px;}.sevn_election_status__office-web.svelte-1q4hqtb {display:none;}.sevn_election_status__office-mobile.svelte-1q4hqtb {display:block;width:220px;}
|
|
431
|
+
|
|
432
|
+
@media (min-width: 769px) {.sevn_election_status__office-web.svelte-1q4hqtb {display:block;}.sevn_election_status__office-mobile.svelte-1q4hqtb {display:none;}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Mobile */
|
|
436
|
+
@media (max-width: 768px) {.sevn_election_status__filter.svelte-1q4hqtb .dropdown,
|
|
437
|
+
.sevn_election_status__office-mobile.svelte-1q4hqtb .dropdown {position:static;margin-top:10px;}.sevn_election_status__body.svelte-1q4hqtb {flex-direction:column;gap:16px;}.sevn_election_status__left.svelte-1q4hqtb {flex:unset;width:100%;}
|
|
438
|
+
|
|
439
|
+
/* Hide map (e legenda associada) on mobile */.sevn_election_status__map.svelte-1q4hqtb,
|
|
440
|
+
.sevn_election_status__legend.svelte-1q4hqtb {display:none;}.sevn_election_status__right.svelte-1q4hqtb {overflow-x:auto;}
|
|
441
|
+
}`};function np(a,t){je(t,!0),Me(a,op);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"president"),v=L(t,"header",19,()=>({title:"Situação eleitoral",description:"2.045 eleitores",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const _=[{value:"presidente",label:"Presidente"},{value:"governador",label:"Governador"}],c={presidente:"president",governador:"governor"},m={president:"presidente",governor:"governador"};let g=U(He(At(()=>m[i()]??"presidente")));const y=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mt",label:"Mato Grosso MT"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mg",label:"Minas Gerais MG"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pr",label:"Paraná PR"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"sc",label:"Santa Catarina SC"},{value:"sp",label:"São Paulo SP"},{value:"se",label:"Sergipe SE"},{value:"to",label:"Tocantins TO"}];let u=U(""),w=U(null),z=U(null),x=U(null),b=U(null),E=U(!1),M=U(null);const O=p(()=>y.find(S=>S.value===e(u))?.label?.replace(/\s+[A-Z]{2}$/,"")??e(u)),K={ac:"do",al:"de",ap:"do",am:"do",ba:"da",ce:"do",df:"do",es:"do",go:"de",ma:"do",mt:"do",ms:"do",mg:"de",pa:"do",pb:"da",pr:"do",pe:"de",pi:"do",rj:"do",rn:"do",rs:"do",ro:"de",rr:"de",sc:"de",sp:"de",se:"de",to:"do"},J=p(()=>`${K[e(u)]??"de"} ${e(O)}`),B=p(()=>_.find(S=>S.value===e(g))?.label??"Governador");let Z=U(!1),ae=p(()=>e(Z)?4:6),D=p(()=>e(Z)?80:82),q=U(0),$=p(()=>Math.max(e(q)-64,150));Ka(()=>{const S=window.matchMedia("(max-width: 768px)");s(Z,S.matches,!0);const oe=N=>{s(Z,N.matches,!0)};return S.addEventListener("change",oe),()=>S.removeEventListener("change",oe)}),Ce(()=>{if(!Fe||!e(u)||!e(g)||r()){s(z,null);return}s(E,!0),s(M,null);const S=c[e(g)]||"governor";Za(n(),S,1,e(u)).then(oe=>{s(z,oe,!0)}).catch(oe=>{s(M,oe?.message||"Erro ao carregar dados",!0),s(z,null)}).finally(()=>{s(E,!1)})}),Ce(()=>{if(!Fe||r()||!e(u)){s(x,null);return}s(w,null),Fa(e(u)).then(S=>{s(x,S,!0)}).catch(S=>{console.error("Failed to fetch municipalities:",S),s(x,null)})}),Ce(()=>{if(!Fe||r()||!e(u)){s(b,null);return}An(n(),1,e(u)).then(S=>{s(b,S,!0)}).catch(S=>{console.error("Failed to fetch counting progress:",S),s(b,null)})});const X=[{tag:"ABC",color:"#16a34a"},{tag:"DEF",color:"var(--sevn-color-primary)"},{tag:"GHI",color:"#1e4d6b"},{tag:"JKL",color:"#0f172a"}],R=p(()=>e(z)?.municipalities?e(w)?e(z).municipalities.filter(S=>String(S.municipality_id)===e(w)):e(z).municipalities:[]),F=p(()=>{if(r())return X;if(!e(R).length)return[];const S={};for(const oe of e(R))S[oe.leader.party_abbr]||(S[oe.leader.party_abbr]=oe.leader.party_color);return Object.entries(S).map(([oe,N])=>({tag:oe,color:N}))}),P=p(()=>{const S={};for(const oe of e(R))oe.leader&&!S[oe.leader.party_abbr]&&(S[oe.leader.party_abbr]=Be(oe.leader.name));return S}),le=["adamantina","adolfo","aguai","aguas-da-prata","aguas-de-lindoia","aguas-de-santa-barbara","aguas-de-sao-pedro","agudos","alambari","alfredo-marcondes","altair","altinopolis","alto-alegre","aluminio","alvares-florence","alvares-machado","alvaro-de-carvalho","alvinlandia","americana","americo-brasiliense","americo-de-campos","amparo","analandia","andradina","angatuba","anhembi","anhumas","aparecida","aparecida-doeste","apiai","aracariguama","aracatuba","aracoiaba-da-serra","aramina","arandu","arapei","araraquara","araras","arcoiris","arealva","areias","areiopolis","ariranha","artur-nogueira","aruja","aspasia","assis","atibaia","auriflama","avai","avanhandava","avare","bady-bassitt","balbinos","balsamo","bananal","barao-de-antonina","barbosa","bariri","barra-bonita","barra-do-chapeu","barra-do-turvo","barretos","barrinha","barueri","bastos","batatais","bauru","bebedouro","bento-de-abreu","bernardino-de-campos","bertioga","bilac","birigui","biritiba-mirim","boa-esperanca-do-sul","bocaina","bofete","boituva","bom-jesus-dos-perdoes","bom-sucesso-de-itarare","bora","boraceia","borborema","borebi","botucatu","braganca-paulista","brauna","brejo-alegre","brodowski","brotas","buri","buritama","buritizal","cabralia-paulista","cabreuva","cacapava","cachoeira-paulista","caconde","cafelandia","caiabu","caieiras","caiua","cajamar","cajati","cajobi","cajuru","campina-do-monte-alegre","campinas","campo-limpo-paulista","campos-do-jordao","campos-novos-paulista","cananeia","canas","candido-mota","candido-rodrigues","canitar","capao-bonito","capela-do-alto","capivari","caraguatatuba","carapicuiba","cardoso","casa-branca","cassia-dos-coqueiros","castilho","catanduva","catigua","cedral","cerqueira-cesar","cerquilho","cesario-lange","charqueada","chavantes","clementina","colina","colombia","conchal","conchas","cordeiropolis","coroados","coronel-macedo","corumbatai","cosmopolis","cosmorama","cotia","cravinhos","cristais-paulista","cruzalia","cruzeiro","cubatao","cunha","descalvado","diadema","dirce-reis","divinolandia","dobrada","dois-corregos","dolcinopolis","dourado","dracena","duartina","dumont","echapora","eldorado","elias-fausto","elisiario","embauba","embu-das-artes","embuguacu","emilianopolis","engenheiro-coelho","espirito-santo-do-pinhal","espirito-santo-do-turvo","estiva-gerbi","estrela-do-norte","estrela-doeste","euclides-da-cunha-paulista","fartura","fernando-prestes","fernandopolis","fernao","ferraz-de-vasconcelos","flora-rica","floreal","florida-paulista","florinea","franca","francisco-morato","franco-da-rocha","gabriel-monteiro","galia","garca","gastao-vidigal","gaviao-peixoto","general-salgado","getulina","glicerio","guaicara","guaimbe","guaira","guapiacu","guapiara","guara","guaracai","guaraci","guarani-doeste","guaranta","guararapes","guararema","guaratingueta","guarei","guariba","guaruja","guarulhos","guatapara","guzolandia","herculandia","holambra","hortolandia","iacanga","iacri","iaras","ibate","ibira","ibirarema","ibitinga","ibiuna","icem","iepe","igaracu-do-tiete","igarapava","igarata","iguape","ilha-comprida","ilha-solteira","ilhabela","indaiatuba","indiana","indiapora","inubia-paulista","ipaussu","ipero","ipeuna","ipigua","iporanga","ipua","iracemapolis","irapua","irapuru","itabera","itai","itajobi","itaju","itanhaem","itaoca","itapecerica-da-serra","itapetininga","itapeva","itapevi","itapira","itapirapua-paulista","itapolis","itaporanga","itapui","itapura","itaquaquecetuba","itarare","itariri","itatiba","itatinga","itirapina","itirapua","itobi","itu","itupeva","ituverava","jaborandi","jaboticabal","jacarei","jaci","jacupiranga","jaguariuna","jales","jambeiro","jandira","jardinopolis","jarinu","jau","jeriquara","joanopolis","joao-ramalho","jose-bonifacio","julio-mesquita","jumirim","jundiai","junqueiropolis","juquia","juquitiba","lagoinha","laranjal-paulista","lavinia","lavrinhas","leme","lencois-paulista","limeira","lindoia","lins","lorena","lourdes","louveira","lucelia","lucianopolis","luis-antonio","luiziania","lupercio","lutecia","macatuba","macaubal","macedonia","magda","mairinque","mairipora","manduri","maraba-paulista","maracai","marapoama","mariapolis","marilia","marinopolis","martinopolis","matao","maua","mendonca","meridiano","mesopolis","miguelopolis","mineiros-do-tiete","mira-estrela","miracatu","mirandopolis","mirante-do-paranapanema","mirassol","mirassolandia","mococa","mogi-das-cruzes","mogi-guacu","mogi-mirim","mombuca","moncoes","mongagua","monte-alegre-do-sul","monte-alto","monte-aprazivel","monte-azul-paulista","monte-castelo","monte-mor","monteiro-lobato","morro-agudo","morungaba","motuca","murutinga-do-sul","nantes","narandiba","natividade-da-serra","nazare-paulista","neves-paulista","nhandeara","nipoa","nova-alianca","nova-campina","nova-canaa-paulista","nova-castilho","nova-europa","nova-granada","nova-guataporanga","nova-independencia","nova-luzitania","nova-odessa","novais","novo-horizonte","nuporanga","ocaucu","oleo","olimpia","onda-verde","oriente","orindiuva","orlandia","osasco","oscar-bressane","osvaldo-cruz","ourinhos","ouro-verde","ouroeste","pacaembu","palestina","palmares-paulista","palmeira-doeste","palmital","panorama","paraguacu-paulista","paraibuna","paraiso","paranapanema","paranapua","parapua","pardinho","pariqueraacu","parisi","patrocinio-paulista","pauliceia","paulinia","paulistania","paulo-de-faria","pederneiras","pedra-bela","pedranopolis","pedregulho","pedreira","pedrinhas-paulista","pedro-de-toledo","penapolis","pereira-barreto","pereiras","peruibe","piacatu","piedade","pilar-do-sul","pindamonhangaba","pindorama","pinhalzinho","piquerobi","piquete","piracaia","piracicaba","piraju","pirajui","pirangi","pirapora-do-bom-jesus","pirapozinho","pirassununga","piratininga","pitangueiras","planalto","platina","poa","poloni","pompeia","pongai","pontal","pontalinda","pontes-gestal","populina","porangaba","porto-feliz","porto-ferreira","potim","potirendaba","pracinha","pradopolis","praia-grande","pratania","presidente-alves","presidente-bernardes","presidente-epitacio","presidente-prudente","presidente-venceslau","promissao","quadra","quata","queiroz","queluz","quintana","rafard","rancharia","redencao-da-serra","regente-feijo","reginopolis","registro","restinga","ribeira","ribeirao-bonito","ribeirao-branco","ribeirao-corrente","ribeirao-do-sul","ribeirao-dos-indios","ribeirao-grande","ribeirao-pires","ribeirao-preto","rifaina","rincao","rinopolis","rio-claro","rio-das-pedras","rio-grande-da-serra","riolandia","riversul","rosana","roseira","rubiacea","rubineia","sabino","sagres","sales","sales-oliveira","salesopolis","salmourao","saltinho","salto","salto-de-pirapora","salto-grande","sandovalina","santa-adelia","santa-albertina","santa-barbara-doeste","santa-branca","santa-clara-doeste","santa-cruz-da-conceicao","santa-cruz-da-esperanca","santa-cruz-das-palmeiras","santa-cruz-do-rio-pardo","santa-ernestina","santa-fe-do-sul","santa-gertrudes","santa-isabel","santa-lucia","santa-maria-da-serra","santa-mercedes","santa-rita-do-passa-quatro","santa-rita-doeste","santa-rosa-de-viterbo","santa-salete","santana-da-ponte-pensa","santana-de-parnaiba","santo-anastacio","santo-andre","santo-antonio-da-alegria","santo-antonio-de-posse","santo-antonio-do-aracangua","santo-antonio-do-jardim","santo-antonio-do-pinhal","santo-expedito","santopolis-do-aguapei","santos","sao-bento-do-sapucai","sao-bernardo-do-campo","sao-caetano-do-sul","sao-carlos","sao-francisco","sao-joao-da-boa-vista","sao-joao-das-duas-pontes","sao-joao-de-iracema","sao-joao-do-pau-dalho","sao-joaquim-da-barra","sao-jose-da-bela-vista","sao-jose-do-barreiro","sao-jose-do-rio-pardo","sao-jose-do-rio-preto","sao-jose-dos-campos","sao-lourenco-da-serra","sao-luiz-do-paraitinga","sao-manuel","sao-miguel-arcanjo","sao-paulo","sao-pedro","sao-pedro-do-turvo","sao-roque","sao-sebastiao","sao-sebastiao-da-grama","sao-simao","sao-vicente","sarapui","sarutaia","sebastianopolis-do-sul","serra-azul","serra-negra","serrana","sertaozinho","sete-barras","severinia","silveiras","socorro","sorocaba","sud-mennucci","sumare","suzanapolis","suzano","tabapua","tabatinga","taboao-da-serra","taciba","taguai","taiacu","taiuva","tambau","tanabi","tapirai","tapiratiba","taquaral","taquaritinga","taquarituba","taquarivai","tarabai","taruma","tatui","taubate","tejupa","teodoro-sampaio","terra-roxa","tiete","timburi","torre-de-pedra","torrinha","trabiju","tremembe","tres-fronteiras","tuiuti","tupa","tupi-paulista","turiuba","turmalina","ubarana","ubatuba","ubirajara","uchoa","uniao-paulista","urania","uru","urupes","valentim-gentil","valinhos","valparaiso","vargem","vargem-grande-do-sul","vargem-grande-paulista","varzea-paulista","vera-cruz","vinhedo","viradouro","vista-alegre-do-alto","vitoria-brasil","votorantim","votuporanga","zacarias"].map((S,oe)=>({id:`${S}::sp`,color:X[oe%X.length].color})),I=p(()=>!r()&&e(x)?.municipalities?e(x).municipalities.map(S=>({value:String(S.municipality_id),label:S.name})):[]);function ne(S){return S.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}const _e={"0_25":"#D9D9D9","26_60":"#A0A0A0","61_99":"#5A5A5A",100:"#1C1C1C"},ge=[{color:"#D9D9D9",label:"0 - 25%"},{color:"#A0A0A0",label:"26 - 60%"},{color:"#5A5A5A",label:"61 - 99%"},{color:"#1C1C1C",label:"100%"}];function fe(S){const oe=S.cid??"",[N]=oe.split("::");if(!N)return;const re=e(I).find(ue=>ne(ue.label)===N);re&&s(w,e(w)===re.value?null:re.value,!0)}const he=p(()=>{if(r())return e(u)==="sp"?le:[];if(e(b)?.regions?.length){const S=e(u)||"sp";return e(b).regions.map(oe=>({id:`${ne(oe.municipality_name??"")}::${S}`,color:_e[oe.bucket]??"#D9D9D9"}))}return e(z)?.municipalities?e(z).municipalities.map(S=>({id:`${S.municipality_name}::${e(u)}`,color:S.leader.party_color})):[]}),pe=p(()=>r()?It:St(e(b)?.last_updated)),Y=p(()=>{if(r())return[{label:"Candidato A (ABC)",value:32,color:"#16a34a"},{label:"Candidato B (DEF)",value:24,color:"var(--sevn-color-primary)"},{label:"Candidato C (GHI)",value:11,color:"#1e4d6b"},{label:"Candidato D (JKL)",value:8,color:"#0f172a"},{label:"Nenhum/ Nulo",value:20,color:"#c7c7d0"},{label:"Não sabe/ Não opinou",value:5,color:"#e5e5ea"}];if(e(w)&&e(R).length===1){const S=e(R)[0];return[S.leader,S.runner_up].filter(Boolean).sort((oe,N)=>N.valid_votes_pct-oe.valid_votes_pct).map(oe=>({label:`${Be(oe.name)} (${oe.party_abbr})`,value:oe.valid_votes_pct,color:oe.party_color}))}if(e(R).length){const S={};return e(R).forEach(N=>{const re=N.leader.party_abbr;S[re]||(S[re]={count:0,color:N.leader.party_color,abbr:re}),S[re].count++}),Object.values(S).sort((N,re)=>re.count-N.count).slice(0,4).map(N=>({label:`${e(P)[N.abbr]??""} (${N.abbr})`,value:N.count,color:N.color}))}return[]});var se=rp();let me;var ce=o(se);Ye(ce,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var A=d(ce,2),k=o(A);Jt(k,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(S){s(g,S,!0)}});var ee=d(A,2),H=o(ee);Re(H,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(S){s(g,S,!0)}});var G=d(ee,2);{var C=S=>{var oe=ep(),N=o(oe);{let re=p(()=>e(u)?"Você selecionou":"Busque por estado");Re(N,{get label(){return e(re)},get options(){return y},get value(){return e(u)},set value(ue){s(u,ue,!0)}})}f(S,oe)};W(G,S=>{e(g)&&S(C)})}var j=d(G,2);{var te=S=>{var oe=tp(),N=o(oe);{let re=p(()=>e(w)?"Você selecionou":"Busque por município");Re(N,{get label(){return e(re)},get options(){return e(I)},get value(){return e(w)},set value(ue){s(w,ue,!0)}})}f(S,oe)};W(j,S=>{e(g)&&e(u)&&S(te)})}var V=d(j,2);{var ve=S=>{var oe=ap(),N=o(oe),re=o(N),ue=o(re),xe=d(re,2),we=o(xe);{let Te=p(()=>e(u)??"sp");pt(we,{type:"state",get uf(){return e(Te)},get colors(){return e(he)},onRegionClick:fe,selectionStroke:"#00000033"})}var de=d(xe,2),ye=o(de);va(ye,{title:"Porcentagem das urnas apuradas:",get segments(){return ge}});var ke=d(de,2);Ee(ke,21,()=>e(F),Pe,(Te,We)=>{nt(Te,{get label(){return e(We).tag},get color(){return e(We).color}})});var De=d(ke,2),Ie=o(De),$e=d(N,2),Ze=o($e);xn(Ze,{get items(){return e(Y)},unit:"%",get visibleCount(){return e(ae)},get colWidth(){return e(D)},get trackHeight(){return e($)}}),T(Te=>{Q(ue,`Confira quais partidos lideram a apuração para ${Te??""} nas diferentes regiões do Estado ${e(J)??""}.`),Q(Ie,e(pe))},[()=>e(B).toLowerCase()]),Nr(N,"clientHeight",Te=>s(q,Te)),f(S,oe)};W(V,S=>{e(g)&&e(u)&&S(ve)})}T(()=>me=Ae(se,1,"sevn_election_status svelte-1q4hqtb",null,me,{"sevn_election_status--raw":l()})),f(a,se),Le()}var lp=h('<div class="sevn_candidate_results__modal svelte-1ml2p9c"><!></div>'),sp=h('<!> <p class="sevn_candidate_results__source svelte-1ml2p9c"> </p>',1),ip=h('<div><!> <div class="sevn_candidate_results__filter-web svelte-1ml2p9c"><!></div> <div class="sevn_candidate_results__map-web svelte-1ml2p9c" role="presentation"><!> <!></div> <div class="sevn_candidate_results__mobile svelte-1ml2p9c"><p class="sevn_candidate_results__overview-label svelte-1ml2p9c">Visão geral:</p> <div class="sevn_candidate_results__map-mobile svelte-1ml2p9c"><!></div> <div class="sevn_candidate_results__filter-mobile svelte-1ml2p9c"><!></div> <!></div></div>');const dp={hash:"svelte-1ml2p9c",code:`.sevn_candidate_results.svelte-1ml2p9c {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_results--raw.svelte-1ml2p9c,
|
|
442
|
+
.sevn_candidate_results--raw.svelte-1ml2p9c :where(.svelte-1ml2p9c) {all:revert;}
|
|
443
|
+
|
|
444
|
+
/* ── Web elements: hidden on mobile ─────────────────── */.sevn_candidate_results__filter-web.svelte-1ml2p9c {display:none;}.sevn_candidate_results__map-web.svelte-1ml2p9c {display:none;}
|
|
445
|
+
|
|
446
|
+
/* ── Mobile section ──────────────────────────────────── */.sevn_candidate_results__mobile.svelte-1ml2p9c {display:flex;flex-direction:column;gap:20px;}.sevn_candidate_results__overview-label.svelte-1ml2p9c {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_candidate_results__map-mobile.svelte-1ml2p9c {width:100%;}.sevn_candidate_results__filter-mobile.svelte-1ml2p9c {width:100%;}.sevn_candidate_results__filter-mobile.svelte-1ml2p9c .dropdown {position:static;margin-top:10px;}.sevn_candidate_results__source.svelte-1ml2p9c {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.55;margin:0;line-height:1.4;}
|
|
447
|
+
|
|
448
|
+
/* ── Desktop ─────────────────────────────────────────── */
|
|
449
|
+
@media (min-width: 768px) {.sevn_candidate_results__filter-web.svelte-1ml2p9c {display:block;}.sevn_candidate_results__map-web.svelte-1ml2p9c {display:block;position:relative;}.sevn_candidate_results__mobile.svelte-1ml2p9c {display:none;}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* ── Floating modal ──────────────────────────────────── */.sevn_candidate_results__modal.svelte-1ml2p9c {position:absolute;z-index:10;transform:translate(-50%, 12px);pointer-events:auto;filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));width:500px;max-height:240px;overflow-y:auto;border-radius:12px;scrollbar-width:thin;scrollbar-color:#d1d1d6 transparent;}
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
/* ── Raw ─────────────────────────────────────────────── */.sevn_candidate_results--raw.svelte-1ml2p9c,
|
|
458
|
+
.sevn_candidate_results--raw.svelte-1ml2p9c :where(.svelte-1ml2p9c) {all:revert;}`};function vp(a,t){je(t,!0),Me(a,dp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados presidenciais por município, em tempo real"})),v=U(null),_=U(0),c=U(0),m=U(null),g=U(null),y=U(null),u=U(null),w=U(null);const z=p(()=>e(w)??e(u));let x=U(null);Ce(()=>{zn().then(G=>{s(x,G,!0)}).catch(G=>{console.error("Failed to fetch cities index:",G)})});const b=p(()=>{const G=e(x);return G?Object.values(G).map(C=>({value:C.cid,label:`${C.name} - ${C.uf}`})).sort((C,j)=>C.label.localeCompare(j.label)):[]}),E=p(()=>e(z)?e(x)?.[e(z)]?.name??"":"");let M=0;Ce(()=>{if(r())return;const G=e(z),C=G?e(x)?.[G]:null,j=setTimeout(()=>{const te=++M;if(!C){te===M&&s(v,null);return}Dt(n(),{office:"president",round:1,state:C.uf,municipalityId:C.id}).then(V=>{te===M&&s(v,V,!0)}).catch(V=>{console.error("Failed to fetch election results:",V)})},200);return()=>clearTimeout(j)});let O=!1;Ce(()=>{if(e(w)){if(O){O=!1;return}if(e(m)){const G=e(m).getBoundingClientRect();s(_,G.width/2),s(c,G.height/2)}}});let K=U(null);Ce(()=>{e(K)&&s(w,e(K),!0)});const J={ABC:"var(--sevn-color-primary)",DEF:"#d97706",GHI:"#1e4d6b",JKL:"#0f172a",MNO:"#16a34a",PQR:"#e11d48"},B={sp:"ABC",rj:"ABC",sc:"ABC",pr:"ABC",rs:"ABC",es:"ABC",df:"ABC",go:"ABC",am:"DEF",rr:"DEF",ro:"DEF",ac:"DEF",ap:"DEF",pa:"DEF",ma:"DEF",to:"DEF",pi:"DEF",ce:"DEF",pb:"DEF",rn:"DEF",ba:"DEF",mg:"GHI",pe:"GHI",al:"GHI",se:"GHI",ms:"JKL",mt:"JKL"},Z=[{name:"Candidato A",party:"ABC",percentage:54.1,votes:1728159,color:J.ABC,elected:!0},{name:"Candidato B",party:"DEF",percentage:43.1,votes:1377441,color:J.DEF},{name:"Candidato C",party:"GHI",percentage:1.1,votes:35623,color:J.GHI},{name:"Candidato D",party:"JKL",percentage:.7,votes:21439,color:J.JKL},{name:"Candidato E",party:"MNO",percentage:.5,votes:17344,color:J.MNO},{name:"Candidato F",party:"PQR",percentage:.2,votes:5149,color:J.PQR}],ae=["ac","al","am","ap","ba","ce","df","es","go","ma","mg","ms","mt","pa","pb","pe","pi","pr","rj","rn","ro","rr","rs","sc","se","sp","to"];let D=U(He({}));Ce(()=>{r()||Promise.allSettled(ae.map(G=>Za(n(),"president",1,G).then(C=>[G,C]))).then(G=>{const C={};for(const j of G)if(j.status==="fulfilled"){const[te,V]=j.value;C[te]=V}else console.error("Failed to fetch municipality results:",j.reason);s(D,C,!0)})});const q=p(()=>{const G={};if(e(x))for(const C of Object.values(e(x)))G[C.id]=C.cid;return G}),$=p(()=>{if(r())return Object.entries(B).map(([C,j])=>({id:C,match:"endsWith",color:J[j]}));const G=[];for(const C of Object.values(e(D)))for(const j of C.municipalities){const te=e(q)[j.municipality_id];te&&j.leader?.party_color&&G.push({id:te,color:j.leader.party_color})}return G});function X(G){const C=new Set(["da","de","do","das","dos","e"]);return G.toLowerCase().split(" ").map((j,te)=>te>0&&C.has(j)?j:j.charAt(0).toUpperCase()+j.slice(1)).join(" ")}const R=p(()=>!r()&&e(v)?.candidates?e(v).candidates.map(G=>({name:X(G.ballot_name),party:G.party_abbr,percentage:G.valid_votes_pct,votes:G.votes,color:G.party_color,elected:G.elected??!1})):r()?Z:[]),F=p(()=>r()?It:St(e(v)?.summary?.last_updated));function P(G){if(s(u,G.cid??null,!0),e(m)){const C=e(m).getBoundingClientRect();s(_,G.clientX-C.left),s(c,G.clientY-C.top)}}function ie(G){if(!e(m))return;const C=e(m).getBoundingClientRect();e(w)===G.cid?(s(w,null),s(K,null)):(O=!0,s(w,G.cid,!0),s(K,null),s(_,G.clientX-C.left),s(c,G.clientY-C.top))}Ce(()=>{if(!e(w))return;function G(j){const te=j.target,V=e(m)?.contains(te),ve=e(g)?.contains(te)||e(y)?.contains(te);!V&&!ve&&(s(w,null),s(K,null))}const C=setTimeout(()=>{document.addEventListener("click",G)},0);return()=>{clearTimeout(C),document.removeEventListener("click",G)}});var le=ip();let I;var ne=o(le);Ye(ne,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var _e=d(ne,2),ge=o(_e);Re(ge,{label:"Busque por município",get options(){return e(b)},get value(){return e(K)},set value(G){s(K,G,!0)}}),tt(_e,G=>s(g,G),()=>e(g));var fe=d(_e,2),he=o(fe);pt(he,{type:"brazil",get colors(){return e($)},interactive:!0,onRegionHover:P,onRegionClick:ie});var pe=d(he,2);{var Y=G=>{var C=lp(),j=o(C);Sa(j,{get title(){return`Candidatos: ${e(E)??""}`},get candidates(){return e(R)}}),T(()=>Se(C,`left:${e(_)??""}px;top:${e(c)??""}px`)),f(G,C)};W(pe,G=>{e(z)&&G(Y)})}tt(fe,G=>s(m,G),()=>e(m));var se=d(fe,2),me=d(o(se),2),ce=o(me);pt(ce,{type:"brazil",get colors(){return e($)}});var A=d(me,2),k=o(A);{let G=p(()=>e(K)?"Você selecionou:":"Busque por município:");Re(k,{get label(){return e(G)},get options(){return e(b)},get value(){return e(K)},set value(C){s(K,C,!0)}})}tt(A,G=>s(y,G),()=>e(y));var ee=d(A,2);{var H=G=>{var C=sp(),j=ze(C);{let ve=p(()=>e(x)?.[e(w)]?.name??"");Sa(j,{get title(){return`Candidatos: ${e(ve)??""}`},get candidates(){return e(R)}})}var te=d(j,2),V=o(te);T(()=>Q(V,e(F))),f(G,C)};W(ee,G=>{e(w)&&G(H)})}T(()=>I=Ae(le,1,"sevn_candidate_results svelte-1ml2p9c",null,I,{"sevn_candidate_results--raw":l()})),ht("mouseleave",fe,()=>s(u,null)),f(a,le),Le()}var cp=h('<div class="sevn_municipality_map__table-overlay svelte-1do63k2"><!></div>'),up=h('<div><!> <div class="sevn_municipality_map__body svelte-1do63k2"><div class="sevn_municipality_map__map svelte-1do63k2" role="presentation"><!> <!></div> <div class="sevn_municipality_map__ranking svelte-1do63k2"><!></div></div></div>');const pp={hash:"svelte-1do63k2",code:`.sevn_municipality_map.svelte-1do63k2 {display:flex;flex-direction:column;gap:24px;}.sevn_municipality_map--raw.svelte-1do63k2,
|
|
459
|
+
.sevn_municipality_map--raw.svelte-1do63k2 :where(.svelte-1do63k2) {all:revert;}.sevn_municipality_map__body.svelte-1do63k2 {display:flex;flex-direction:column;gap:32px;}.sevn_municipality_map__map.svelte-1do63k2 {width:100%;position:relative;}.sevn_municipality_map__table-overlay.svelte-1do63k2 {position:absolute;z-index:10;width:500px;transform:translate(-50%, 12px);filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));pointer-events:none;}.sevn_municipality_map__table-overlay.svelte-1do63k2 .table-candidate-content {display:grid;grid-template-columns:1fr 80px 160px;align-items:center;gap:0;}.sevn_municipality_map__table-overlay.svelte-1do63k2 .table-candidate-percent {text-align:right;}.sevn_municipality_map__table-overlay.svelte-1do63k2 .table-candidate-votes {flex-basis:auto;margin-top:0;text-align:right;}.sevn_municipality_map__ranking.svelte-1do63k2 {width:100%;}.sevn_municipality_map.svelte-1do63k2 .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_municipality_map.svelte-1do63k2 .vote-overview .vote-overview-stats {gap:8px;}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@media (min-width: 768px) {.sevn_municipality_map__body.svelte-1do63k2 {flex-direction:row;align-items:center;gap:48px;}.sevn_municipality_map__map.svelte-1do63k2 {flex:0 0 45%;}.sevn_municipality_map__ranking.svelte-1do63k2 {flex:1;}.sevn_municipality_map.svelte-1do63k2 .vote-overview {gap:8px;padding:0.5rem 0;align-items:flex-end;}
|
|
463
|
+
}`};function _p(a,t){je(t,!0),Me(a,pp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"year",3,2026),v=L(t,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados presidenciais por município, em tempo real"}));const _={ABC:"#d97706",DEF:"#1e4d6b",GHI:"#1e3461",JKL:"#0f172a",MNO:"#e11d48"},c={am:"ABC",rr:"ABC",ro:"ABC",ac:"ABC",ap:"ABC",pa:"ABC",to:"ABC",ma:"ABC",pi:"ABC",ce:"ABC",mt:"ABC",go:"ABC",sp:"DEF",pr:"DEF",sc:"DEF",rs:"DEF",mg:"DEF",rj:"DEF",es:"DEF",ba:"DEF",pe:"GHI",pb:"GHI",rn:"GHI",al:"GHI",ms:"JKL",df:"JKL",se:"MNO"},m=[{name:"Candidato A",tag:"ABC",dotColor:_.ABC,tagColor:_.ABC,votes:"42,8%"},{name:"Candidato B",tag:"DEF",dotColor:_.DEF,tagColor:_.DEF,votes:"31,4%"},{name:"Candidato C",tag:"GHI",dotColor:_.GHI,tagColor:_.GHI,votes:"12,6%"},{name:"Candidato D",tag:"JKL",dotColor:_.JKL,tagColor:_.JKL,votes:"6,7%"},{name:"Candidato E",tag:"MNO",dotColor:_.MNO,tagColor:_.MNO,votes:"4,1%"}];let g=U(null);Ce(()=>{r()||Jr(i(),"president",1).then(A=>{s(g,A,!0)}).catch(A=>{console.error("Failed to fetch state results:",A)})});const y=p(()=>r()?Object.entries(c).map(([A,k])=>({id:A,match:"endsWith",color:_[k]})):e(g)?.states?e(g).states.filter(A=>A.leader?.party_color).map(A=>({id:A.state.toLowerCase(),match:"endsWith",color:A.leader.party_color})):[]),u=p(()=>r()?m:n()?.candidates?n().candidates.map(A=>({name:Be(A.ballot_name),tag:A.party_abbr,dotColor:A.party_color,tagColor:A.party_color,votes:`${A.valid_votes_pct.toFixed(1)}%`,elected:A.elected})):[]),w=p(()=>r()?"118.552.353":n()?.summary?n().summary.total_valid_votes.toLocaleString("pt-BR"):null),z=p(()=>r()?Qe:ot(n()?.summary?.last_updated)),x=[{value:"ac",label:"Acre"},{value:"al",label:"Alagoas"},{value:"am",label:"Amazonas"},{value:"ap",label:"Amapá"},{value:"ba",label:"Bahia"},{value:"ce",label:"Ceará"},{value:"df",label:"Distrito Federal"},{value:"es",label:"Espírito Santo"},{value:"go",label:"Goiás"},{value:"ma",label:"Maranhão"},{value:"mg",label:"Minas Gerais"},{value:"ms",label:"Mato Grosso do Sul"},{value:"mt",label:"Mato Grosso"},{value:"pa",label:"Pará"},{value:"pb",label:"Paraíba"},{value:"pe",label:"Pernambuco"},{value:"pi",label:"Piauí"},{value:"pr",label:"Paraná"},{value:"rj",label:"Rio de Janeiro"},{value:"rn",label:"Rio Grande do Norte"},{value:"ro",label:"Rondônia"},{value:"rr",label:"Roraima"},{value:"rs",label:"Rio Grande do Sul"},{value:"sc",label:"Santa Catarina"},{value:"se",label:"Sergipe"},{value:"sp",label:"São Paulo"},{value:"to",label:"Tocantins"}];function b(A){return x.find(k=>k.value===A)?.label??A.toUpperCase()}let E=U(null),M=U(0),O=U(0),K=U(null),J=U(null),B=U(0),Z=U(0);function ae(A){return A.split("-").map(k=>k.charAt(0).toUpperCase()+k.slice(1)).join(" ")}function D(A){if(!A)return null;const[k,ee]=A.split("::");return ee?{uf:ee,municipio:k}:{uf:k,municipio:void 0}}const q=p(()=>D(e(J)??e(E))),$=p(()=>e(q)?.uf??null),X=p(()=>e(q)?e(q).municipio?`Resultados: ${ae(e(q).municipio)} - ${e(q).uf.toUpperCase()}`:`Resultados: ${b(e(q).uf)}`:"");let R=U(null);Ce(()=>{zn().then(A=>{s(R,A,!0)}).catch(A=>{console.error("Failed to fetch cities index:",A)})});let F=U(null),P=0;Ce(()=>{if(r()||!e($)){s(F,null);return}const A=e($),k=setTimeout(()=>{const ee=++P;Za(i(),"president",1,A).then(H=>{ee===P&&s(F,H,!0)}).catch(H=>{console.error("Failed to fetch municipality results:",H)})},200);return()=>clearTimeout(k)});const ie=p(()=>{if(r())return m.map(k=>({name:k.name,party:k.tag,percentage:parseFloat(String(k.votes).replace(",",".")),votes:0,color:k.dotColor}));if(!e(q))return[];if(e(q).municipio){const k=`${e(q).municipio}::${e(q).uf}`,ee=e(R)?.[k]?.id,H=ee?e(F)?.municipalities?.find(G=>G.municipality_id===ee):void 0;return!H?.leader||!H?.runner_up?[]:[H.leader,H.runner_up].map(G=>({name:Be(G.name),party:G.party_abbr,percentage:G.valid_votes_pct,votes:G.votes,color:G.party_color,elected:G.elected??!1}))}const A=e(g)?.states?.find(k=>k.state.toLowerCase()===e(q).uf);return!A?.leader||!A?.runner_up?[]:[A.leader,A.runner_up].map(k=>({name:Be(k.name),party:k.party_abbr,percentage:k.valid_votes_pct,votes:k.votes,color:k.party_color,elected:k.elected??!1}))});function le(A){if(s(E,A.cid,!0),e(K)){const k=e(K).getBoundingClientRect();s(M,A.clientX-k.left),s(O,A.clientY-k.top)}}function I(A){if(!e(K))return;const k=e(K).getBoundingClientRect();e(J)===A.cid?s(J,null):(s(J,A.cid,!0),s(B,A.clientX-k.left),s(Z,A.clientY-k.top))}Ce(()=>{if(!e(J))return;function A(k){e(K)&&!e(K).contains(k.target)&&s(J,null)}return document.addEventListener("click",A),()=>document.removeEventListener("click",A)});var ne=up();let _e;var ge=o(ne);Ye(ge,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var fe=d(ge,2),he=o(fe),pe=o(he);pt(pe,{type:"brazil",get colors(){return e(y)},aspectRatio:"16:9",interactive:!0,onRegionHover:le,onRegionClick:I});var Y=d(pe,2);{var se=A=>{var k=cp(),ee=o(k);Sa(ee,{get title(){return e(X)},get candidates(){return e(ie)}}),T(()=>Se(k,`left:${e(M)??""}px;top:${e(O)??""}px`)),f(A,k)};W(Y,A=>{e($)&&A(se)})}tt(he,A=>s(K,A),()=>e(K));var me=d(he,2),ce=o(me);ka(ce,{get candidates(){return e(u)},get totalVotes(){return e(w)},get date(){return e(z)},font:"TSE"}),T(()=>_e=Ae(ne,1,"sevn_municipality_map svelte-1do63k2",null,_e,{"sevn_municipality_map--raw":l()})),ht("mouseleave",he,()=>s(E,null)),f(a,ne),Le()}var fp=h('<p class="sevn_governor__overlay-title svelte-zn5avn"> </p>'),mp=h('<p class="sevn_governor__overlay-footer svelte-zn5avn"> </p>'),gp=h('<div class="sevn_governor__overlay svelte-zn5avn"><div class="sevn_governor__overlay-card svelte-zn5avn"><!> <!> <!></div></div>'),bp=h('<div class="sevn_governor__result svelte-zn5avn"><!></div> <p class="sevn_governor__result-date svelte-zn5avn"> </p>',1),hp=h('<div><!> <div class="sevn_governor__web svelte-zn5avn"><div class="sevn_governor__map-web svelte-zn5avn" role="presentation"><!> <!></div> <div class="sevn_governor__footer svelte-zn5avn"><div class="sevn_governor__tags-col svelte-zn5avn"></div> <p class="sevn_governor__date svelte-zn5avn"> </p></div></div> <div class="sevn_governor__mobile svelte-zn5avn"><p class="sevn_governor__overview-label svelte-zn5avn">Visão geral:</p> <div class="sevn_governor__tags-row svelte-zn5avn"></div> <div class="sevn_governor__map-mobile svelte-zn5avn"><!></div> <div class="sevn_governor__filter svelte-zn5avn"><!></div> <!></div></div>');const xp={hash:"svelte-zn5avn",code:`.sevn_governor.svelte-zn5avn {display:flex;flex-direction:column;gap:24px;}.sevn_governor--raw.svelte-zn5avn,
|
|
464
|
+
.sevn_governor--raw.svelte-zn5avn :where(.svelte-zn5avn) {all:revert;}
|
|
465
|
+
|
|
466
|
+
/* ── Web (hidden on mobile) ─────────────────────────── */.sevn_governor__web.svelte-zn5avn {display:none;}.sevn_governor__footer.svelte-zn5avn {display:flex;flex-direction:column;gap:12px;}.sevn_governor__tags-col.svelte-zn5avn {display:flex;flex-direction:column;gap:8px;align-items:flex-start;}.sevn_governor__date.svelte-zn5avn {font-size:0.75rem;color:#9a9aaa;margin:0;}
|
|
467
|
+
|
|
468
|
+
/* ── Mobile (shown by default) ──────────────────────── */.sevn_governor__mobile.svelte-zn5avn {display:flex;flex-direction:column;gap:16px;}.sevn_governor__overview-label.svelte-zn5avn {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_governor__tags-row.svelte-zn5avn {display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;}.sevn_governor__map-mobile.svelte-zn5avn {width:100%;}
|
|
469
|
+
|
|
470
|
+
/* Inline dropdown on mobile */.sevn_governor__filter.svelte-zn5avn .dropdown {position:static;margin-top:10px;}.sevn_governor__result.svelte-zn5avn {display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid #DFE1E7;border-radius:12px;box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);}.sevn_governor__result-date.svelte-zn5avn {font-size:0.75rem;color:#9a9aaa;margin:0;}
|
|
471
|
+
|
|
472
|
+
/* ── Map web container ──────────────────────────────── */.sevn_governor__map-web.svelte-zn5avn {position:relative;}
|
|
473
|
+
|
|
474
|
+
/* ── Overlay (web hover/pin) ────────────────────────── */.sevn_governor__overlay.svelte-zn5avn {position:absolute;z-index:10;transform:translate(-50%, 12px);filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));pointer-events:none;}.sevn_governor__overlay-card.svelte-zn5avn {background:white;border-radius:10px;padding:14px 16px;min-width:210px;width:270px;font-family:inherit;}.sevn_governor__overlay-title.svelte-zn5avn {font-size:0.8125rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0 0 10px;}.sevn_governor__overlay-footer.svelte-zn5avn {border-top:1px solid #f0f0f5;margin-top:10px;padding-top:8px;font-size:0.75rem;color:#9a9aaa;margin-bottom:0;}.sevn_governor__overlay-card.svelte-zn5avn .candidate {justify-content:flex-start;}
|
|
475
|
+
|
|
476
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
477
|
+
@media (min-width: 768px) {.sevn_governor__web.svelte-zn5avn {display:flex;flex-direction:column;gap:24px;}.sevn_governor.svelte-zn5avn .map-modal-card .candidate {justify-content:flex-start;}.sevn_governor__mobile.svelte-zn5avn {display:none;}
|
|
478
|
+
}`};function wp(a,t){je(t,!0),Me(a,xp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null);L(t,"year",3,2026);let i=L(t,"header",19,()=>({title:"Governador por Estado",description:"Você pode interagir com o mapa para ver o resultado por estado"}));const v=[{id:"ABC",color:"#1e3461"},{id:"DEF",color:"#1e4d6b"},{id:"GHI",color:"#d97706"},{id:"JKL",color:"#0f172a"},{id:"MNO",color:"#16a34a"},{id:"PQR",color:"#e11d48"}],_=Object.fromEntries(v.map(k=>[k.id,k.color])),c=p(()=>{if(r())return v;const k=new Set,ee=[];for(const H of n()?.states??[]){const G=H.leader?.party_abbr;G&&!k.has(G)&&(k.add(G),ee.push({id:G,color:H.leader.party_color}))}return ee.sort((H,G)=>H.id.localeCompare(G.id,"pt-BR"))}),m={sp:"ABC",ac:"ABC",ro:"ABC",to:"ABC",pb:"ABC",pi:"ABC",am:"DEF",pa:"DEF",ap:"DEF",ba:"DEF",ma:"DEF",mg:"DEF",rj:"DEF",mt:"GHI",go:"GHI",ms:"GHI",es:"GHI",pr:"GHI",sc:"GHI",rs:"JKL",df:"JKL",al:"JKL",se:"JKL",rn:"MNO",ce:"MNO",rr:"PQR",pe:"PQR"},g={ac:"Acre",al:"Alagoas",am:"Amazonas",ap:"Amapá",ba:"Bahia",ce:"Ceará",df:"Distrito Federal",es:"Espírito Santo",go:"Goiás",ma:"Maranhão",mg:"Minas Gerais",ms:"Mato Grosso do Sul",mt:"Mato Grosso",pa:"Pará",pb:"Paraíba",pe:"Pernambuco",pi:"Piauí",pr:"Paraná",rj:"Rio de Janeiro",rn:"Rio Grande do Norte",ro:"Rondônia",rr:"Roraima",rs:"Rio Grande do Sul",sc:"Santa Catarina",se:"Sergipe",sp:"São Paulo",to:"Tocantins"},y={ABC:{name:"Candidato A",description:"41,8% dos votos válidos"},DEF:{name:"Candidato B",description:"38,2% dos votos válidos"},GHI:{name:"Candidato C",description:"52,4% dos votos válidos"},JKL:{name:"Candidato D",description:"34,7% dos votos válidos"},MNO:{name:"Candidato E",description:"41,2% dos votos válidos"},PQR:{name:"Candidato F",description:"29,5% dos votos válidos"}},u=p(()=>r()?Object.entries(m).map(([k,ee])=>({id:k,color:_[ee]})):(n()?.states??[]).map(k=>({id:k.state.toLowerCase(),color:k.leader.party_color}))),w=p(()=>{if(r())return Object.fromEntries(Object.entries(m).map(([ee,H])=>{const G=y[H];return[ee,{title:g[ee],footer:`Última atualização: ${Qe}`,items:[{name:G.name,tag:H,tagColor:_[H],avatarColor:_[H],description:G.description}]}]}));const k={};for(const ee of n()?.states??[]){const H=ee.state.toLowerCase();k[H]={title:g[H],footer:`Última atualização: ${ot(n().last_updated)}`,items:[{name:Be(ee.leader.name),photoUrl:ee.leader.photo_url,tag:ee.leader.party_abbr,tagColor:ee.leader.party_color,avatarColor:ee.leader.party_color,description:`${ee.leader.valid_votes_pct.toFixed(1)}% dos votos válidos`}]}}return k}),z=[{label:"Acre AC",value:"ac"},{label:"Alagoas AL",value:"al"},{label:"Amapá AP",value:"ap"},{label:"Amazonas AM",value:"am"},{label:"Bahia BA",value:"ba"},{label:"Ceará CE",value:"ce"},{label:"Distrito Federal DF",value:"df"},{label:"Espírito Santo ES",value:"es"},{label:"Goiás GO",value:"go"},{label:"Maranhão MA",value:"ma"},{label:"Minas Gerais MG",value:"mg"},{label:"Mato Grosso do Sul MS",value:"ms"},{label:"Mato Grosso MT",value:"mt"},{label:"Pará PA",value:"pa"},{label:"Paraíba PB",value:"pb"},{label:"Pernambuco PE",value:"pe"},{label:"Piauí PI",value:"pi"},{label:"Paraná PR",value:"pr"},{label:"Rio de Janeiro RJ",value:"rj"},{label:"Rio Grande do Norte RN",value:"rn"},{label:"Rondônia RO",value:"ro"},{label:"Roraima RR",value:"rr"},{label:"Rio Grande do Sul RS",value:"rs"},{label:"Santa Catarina SC",value:"sc"},{label:"Sergipe SE",value:"se"},{label:"São Paulo SP",value:"sp"},{label:"Tocantins TO",value:"to"}];let x=U(null),b=U(0),E=U(0),M=U(null),O=U(null),K=U(0),J=U(0);const B=p(()=>e(O)??e(x)),Z=p(()=>e(B)?e(w)[e(B)]:null);function ae(k){if(s(x,k.cid,!0),e(M)){const ee=e(M).getBoundingClientRect();s(b,k.clientX-ee.left),s(E,k.clientY-ee.top)}}function D(k){if(!e(M))return;const ee=e(M).getBoundingClientRect();e(O)===k.cid?s(O,null):(s(O,k.cid,!0),s(K,k.clientX-ee.left),s(J,k.clientY-ee.top))}Ce(()=>{if(!e(O))return;function k(ee){e(M)&&!e(M).contains(ee.target)&&s(O,null)}return document.addEventListener("click",k),()=>document.removeEventListener("click",k)});var q=hp();let $;var X=o(q);Ye(X,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var R=d(X,2),F=o(R),P=o(F);pt(P,{type:"brazil-states",get colors(){return e(u)},interactive:!0,onRegionHover:ae,onRegionClick:D});var ie=d(P,2);{var le=k=>{var ee=gp(),H=o(ee),G=o(H);{var C=ve=>{var S=fp(),oe=o(S);T(()=>Q(oe,e(Z).title)),f(ve,S)};W(G,ve=>{e(Z).title&&ve(C)})}var j=d(G,2);Ee(j,17,()=>e(Z).items,Pe,(ve,S)=>{bt(ve,{get name(){return e(S).name},get photoUrl(){return e(S).photoUrl},get tag(){return e(S).tag},get tagColor(){return e(S).tagColor},get avatarColor(){return e(S).avatarColor},get description(){return e(S).description},size:"sm",wrapper:!0})});var te=d(j,2);{var V=ve=>{var S=mp(),oe=o(S);T(()=>Q(oe,e(Z).footer)),f(ve,S)};W(te,ve=>{e(Z).footer&&ve(V)})}T(()=>Se(ee,`left:${e(b)??""}px;top:${e(E)??""}px`)),f(k,ee)};W(ie,k=>{e(B)&&e(Z)&&k(le)})}tt(F,k=>s(M,k),()=>e(M));var I=d(F,2),ne=o(I);Ee(ne,21,()=>e(c),Pe,(k,ee)=>{nt(k,{get label(){return e(ee).id},get color(){return e(ee).color}})});var _e=d(ne,2),ge=o(_e),fe=d(R,2),he=d(o(fe),2);Ee(he,21,()=>e(c),Pe,(k,ee)=>{nt(k,{get label(){return e(ee).id},get color(){return e(ee).color}})});var pe=d(he,2),Y=o(pe);pt(Y,{type:"brazil-states",get colors(){return e(u)}});var se=d(pe,2),me=o(se);Re(me,{label:"Busque por estado",get options(){return z},get value(){return e(x)},set value(k){s(x,k,!0)}});var ce=d(se,2);{var A=k=>{const ee=p(()=>e(w)[e(x)]);var H=st(),G=ze(H);{var C=j=>{const te=p(()=>e(ee).items[0]);var V=bp(),ve=ze(V),S=o(ve);bt(S,{get name(){return e(te).name},get photoUrl(){return e(te).photoUrl},get tag(){return e(te).tag},get tagColor(){return e(te).tagColor},get avatarColor(){return e(te).avatarColor},get description(){return e(te).description},size:"sm"});var oe=d(ve,2),N=o(oe);T(()=>Q(N,e(ee).footer)),f(j,V)};W(G,j=>{e(ee)&&j(C)})}f(k,H)};W(ce,k=>{e(x)&&k(A)})}T(k=>{$=Ae(q,1,"sevn_governor svelte-zn5avn",null,$,{"sevn_governor--raw":l()}),Q(ge,k)},[()=>St(n()?.last_updated)]),ht("mouseleave",F,()=>s(x,null)),f(a,q),Le()}var yp=h('<div class="sevn_candidate_carrousel_state_results_viewer__error svelte-ryev2s"> </div>'),Cp=h('<div class="sevn_candidate_carrousel_state_results_viewer__loading svelte-ryev2s">Carregando...</div>'),kp=h('<div class="sevn_candidate_carrousel_state_results_viewer__error svelte-ryev2s">Resultado ainda não publicado para este estado.</div>'),Sp=h('<div><!> <div class="sevn_candidate_carrousel_state_results_viewer__filter-web svelte-ryev2s"><!></div> <div class="sevn_candidate_carrousel_state_results_viewer__filter-mobile svelte-ryev2s"><div class="sevn_candidate_carrousel_state_results_viewer__autocomplete svelte-ryev2s"><!></div></div> <!></div>');const zp={hash:"svelte-ryev2s",code:`.sevn_candidate_carrousel_state_results_viewer.svelte-ryev2s {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_carrousel_state_results_viewer--raw.svelte-ryev2s,
|
|
479
|
+
.sevn_candidate_carrousel_state_results_viewer--raw.svelte-ryev2s :where(.svelte-ryev2s) {all:revert;}
|
|
480
|
+
|
|
481
|
+
/* ── Web filter (hidden on mobile) ─────────────── */.sevn_candidate_carrousel_state_results_viewer__filter-web.svelte-ryev2s {display:none;margin-bottom:30px;}
|
|
482
|
+
|
|
483
|
+
/* ── Mobile filter (shown by default) ──────────── */.sevn_candidate_carrousel_state_results_viewer__filter-mobile.svelte-ryev2s {display:flex;flex-direction:column;gap:8px;}.sevn_candidate_carrousel_state_results_viewer__loading.svelte-ryev2s,
|
|
484
|
+
.sevn_candidate_carrousel_state_results_viewer__error.svelte-ryev2s {padding:24px;text-align:center;font-size:0.875rem;}.sevn_candidate_carrousel_state_results_viewer__error.svelte-ryev2s {color:#dc2626;}
|
|
485
|
+
|
|
486
|
+
/* Inline dropdown on mobile */.sevn_candidate_carrousel_state_results_viewer__autocomplete.svelte-ryev2s .dropdown {position:static;margin-top:10px;}
|
|
487
|
+
|
|
488
|
+
/* ── Desktop overrides ──────────────────────────── */
|
|
489
|
+
@media (min-width: 768px) {.sevn_candidate_carrousel_state_results_viewer__filter-web.svelte-ryev2s {display:block;}.sevn_candidate_carrousel_state_results_viewer__filter-mobile.svelte-ryev2s {display:none;}
|
|
490
|
+
}`};function Ap(a,t){je(t,!0),Me(a,zp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"office",3,"governor"),v=L(t,"header",19,()=>({title:"Governador",description:"Selecione o estado e veja a apuração em tempo real",tag:"APURAÇÃO EM ANDAMENTO",tagColor:"#0E2A41"})),_=U(null),c=U(!1),m=U(null);const g=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"am",label:"Amazonas AM"},{value:"ap",label:"Amapá AP"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],y=[{position:"1º lugar",name:"Candidato A",tag:"ABC",tagColor:"#1e4d6b",avatarColor:"#1e4d6b",percent:"42,8%",percentSuffix:"dos votos válidos",votes:"59.276.176 votos",nameWeight:400},{position:"2º lugar",name:"Candidato B",tag:"DEF",tagColor:"#d97706",avatarColor:"#d97706",percent:"31,4%",percentSuffix:"dos votos válidos",votes:"59.276.176 votos",nameWeight:400},{position:"3º lugar",name:"Candidato C",tag:"GHI",tagColor:"#1e3461",avatarColor:"#1e3461",percent:"15,6%",percentSuffix:"dos votos válidos",votes:"59.276.176 votos",nameWeight:400},{position:"4º lugar",name:"Candidato D",tag:"JKL",tagColor:"#0f172a",avatarColor:"#0f172a",percent:"6,7%",percentSuffix:"dos votos válidos",votes:"59.276.176 votos",nameWeight:400}];let u=U("");Ce(()=>{!r()&&e(u)?(async()=>{s(c,!0),s(m,null);try{const R=await vr(n(),i(),1,e(u));s(_,R,!0)}catch(R){console.error(`Failed to fetch timeline for ${e(u)}:`,R),s(m,"Falha ao carregar dados"),s(_,null)}finally{s(c,!1)}})():e(u)||s(_,null)});const w=p(()=>{if(r())return It;const X=e(_)?.snapshots;return St(X?.length?X[X.length-1].timestamp:null)}),z=p(()=>{if(r())return y;const X=e(_)?.snapshots?.[e(_).snapshots.length-1];return X?[...X.results].sort((R,F)=>F.valid_votes_pct-R.valid_votes_pct).map((R,F)=>{const P=e(_)?.candidates_meta.find(ie=>ie.candidate_id===R.candidate_id);return{position:Hr(R.position,F),name:P?.name?Be(P.name):"Desconhecido",photoUrl:P?.photo_url,tag:P?.party_abbr||"",tagColor:P?.party_color||"#ccc",avatarColor:P?.party_color||"#ccc",percent:`${R.valid_votes_pct.toFixed(1)}%`,percentSuffix:"dos votos válidos",votes:R.votes.toLocaleString("pt-BR")+" votos",nameWeight:400}}):[]});var x=Sp();let b;var E=o(x);Ye(E,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var M=d(E,2),O=o(M);Ya(O,{get states(){return g},get meta(){return e(w)},get value(){return e(u)},set value(X){s(u,X,!0)}});var K=d(M,2),J=o(K),B=o(J);{let X=p(()=>e(u)?"Você selecionou":"Busque por estado");Re(B,{get label(){return e(X)},get options(){return g},get value(){return e(u)},set value(R){s(u,R,!0)}})}var Z=d(K,2);{var ae=X=>{var R=yp(),F=o(R);T(()=>Q(F,e(m))),f(X,R)},D=X=>{var R=Cp();f(X,R)},q=X=>{var R=kp();f(X,R)},$=X=>{wn(X,{get candidates(){return e(z)},itemsPerPage:3})};W(Z,X=>{e(m)?X(ae):e(c)?X(D,1):e(u)&&!r()&&e(z).length===0?X(q,2):e(u)&&X($,3)})}T(()=>b=Ae(x,1,"sevn_candidate_carrousel_state_results_viewer svelte-ryev2s",null,b,{"sevn_candidate_carrousel_state_results_viewer--raw":l()})),f(a,x),Le()}var Mp=h("<div><!></div>"),Ep=h('<div class="sevn_duel_state__candidates-web svelte-zzeoe9"></div>'),Rp=h("<div><!> <!></div>"),Pp=h('<div><!> <div class="sevn_duel_state__filter-web svelte-zzeoe9"><!></div> <!> <div class="sevn_duel_state__filter-mobile svelte-zzeoe9"><div class="sevn_duel_state__autocomplete svelte-zzeoe9"><!></div></div> <!></div>');const jp={hash:"svelte-zzeoe9",code:`.sevn_duel_state.svelte-zzeoe9 {display:flex;flex-direction:column;gap:24px;}.sevn_duel_state--raw.svelte-zzeoe9,
|
|
491
|
+
.sevn_duel_state--raw.svelte-zzeoe9 :where(.svelte-zzeoe9) {all:revert;}
|
|
492
|
+
|
|
493
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_duel_state__filter-web.svelte-zzeoe9 {display:none;}.sevn_duel_state__candidates-web.svelte-zzeoe9 {display:none;}
|
|
494
|
+
|
|
495
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_duel_state__filter-mobile.svelte-zzeoe9 {display:flex;flex-direction:column;gap:8px;}
|
|
496
|
+
|
|
497
|
+
/* Dropdown inline no mobile */.sevn_duel_state__autocomplete.svelte-zzeoe9 .dropdown {position:static;margin-top:10px;}.sevn_duel_state__candidates-mobile.svelte-zzeoe9 {display:flex;flex-direction:column;gap:8px;}.sevn_duel_state__candidates-mobile.winner-left.svelte-zzeoe9 .duel-side.reverse {opacity:0.35;}.sevn_duel_state__candidates-mobile.winner-right.svelte-zzeoe9 .duel-side:not(.reverse) {opacity:0.35;}.sevn_duel_state.svelte-zzeoe9 .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_duel_state.svelte-zzeoe9 .vote-overview .vote-overview-stats {gap:8px;}
|
|
498
|
+
|
|
499
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
500
|
+
@media (min-width: 768px) {.sevn_duel_state__filter-web.svelte-zzeoe9 {display:block;}.sevn_duel_state__candidates-web.svelte-zzeoe9 {display:flex;flex-direction:row;gap:40px;}.sevn_duel_state__col.svelte-zzeoe9 {flex:1;transition:opacity 0.2s ease;}.sevn_duel_state__col--dimmed.svelte-zzeoe9 {opacity:0.35;}.sevn_duel_state__filter-mobile.svelte-zzeoe9 {display:none;}.sevn_duel_state__candidates-mobile.svelte-zzeoe9 {display:none;}
|
|
501
|
+
}`};function Lp(a,t){je(t,!0),Me(a,jp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"year",3,2026),v=L(t,"header",19,()=>({title:"Governador",description:"Selecione o estado e veja a apuração em tempo real",tag:"APURAÇÃO EM ANDAMENTO",tagColor:"#0E2A41"})),_=L(t,"showPosition",3,!1),c=L(t,"positionTagColor",3,void 0);const m=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}];let g=U("");const y=[{position:1,name:"Candidato A",acronym:"ABC",percent:50.9,votes:60345999,color:"#1e3461",elected:!1},{position:2,name:"Candidato B",acronym:"DEF",percent:49.1,votes:58206354,color:"#d97706",elected:!1}],u=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],w=p(()=>!r()&&n()?.states&&Array.isArray(n().states)&&n().states.length>0&&e(g)?(()=>{const P=n().states.find(ie=>ie.state.toLowerCase()===e(g));return P?.leader&&P?.runner_up?[{position:P.leader.position??1,name:Be(P.leader.name),photoUrl:P.leader.photo_url,acronym:P.leader.party_abbr,percent:P.leader.valid_votes_pct,votes:P.leader.votes,color:P.leader.party_color,elected:P.leader.elected??!1},{position:P.runner_up.position??2,name:Be(P.runner_up.name),photoUrl:P.runner_up.photo_url,acronym:P.runner_up.party_abbr,percent:P.runner_up.valid_votes_pct,votes:P.runner_up.votes,color:P.runner_up.party_color,elected:P.runner_up.elected??!1}]:[]})():r()?y:[]);let z=U(null);Ce(()=>{if(r()||!e(g)){s(z,null);return}s(z,null),Dt(i(),{office:"governor",round:1,state:e(g)}).then(P=>{s(z,P?.summary??null,!0)}).catch(P=>{console.error("Failed to fetch state summary:",P)})});const x=p(()=>{if(r())return u;if(!e(z))return[];const{total_valid_votes:P,null_votes:ie,blank_votes:le}=e(z),I=P+ie+le;return[{text:"Nulos",value:`${(ie/I*100).toFixed(2)}%`},{text:"Brancos",value:`${(le/I*100).toFixed(2)}%`},{text:"Válidos",value:`${P.toLocaleString("pt-BR")} votos`}]}),b=p(()=>r()?Qe:ot(n()?.last_updated)),E=p(()=>r()?It:St(n()?.last_updated)),M=p(()=>e(w).findIndex(P=>P.elected));var O=Pp();let K;var J=o(O);Ye(J,{get title(){return v().title},get description(){return v().description},get tag(){return v().tag},get tagColor(){return v().tagColor}});var B=d(J,2),Z=o(B);Ya(Z,{get states(){return m},get meta(){return e(E)},get value(){return e(g)},set value(P){s(g,P,!0)}});var ae=d(B,2);{var D=P=>{var ie=Ep();Ee(ie,21,()=>e(w),Pe,(le,I)=>{var ne=Mp();let _e;var ge=o(ne);{let fe=p(()=>[e(I)]);da(ge,{layout:"stack",get candidates(){return e(fe)},avatarSize:"130px",barHeight:"24px",get showPosition(){return _()},get positionTagColor(){return c()}})}T(()=>_e=Ae(ne,1,"sevn_duel_state__col svelte-zzeoe9",null,_e,{"sevn_duel_state__col--dimmed":e(M)!==-1&&!e(I).elected})),f(le,ne)}),f(P,ie)};W(ae,P=>{e(g)&&P(D)})}var q=d(ae,2),$=o(q),X=o($);{let P=p(()=>e(g)?"Você selecionou:":"Busque por estado:");Re(X,{get label(){return e(P)},get options(){return m},get value(){return e(g)},set value(ie){s(g,ie,!0)}})}var R=d(q,2);{var F=P=>{var ie=Rp();let le;var I=o(ie);da(I,{layout:"duel-compact",get candidates(){return e(w)},avatarSize:"sm",get showPosition(){return _()},get positionTagColor(){return c()}});var ne=d(I,2);ia(ne,{get data(){return e(x)},get date(){return e(b)},font:"TSE"}),T(()=>le=Ae(ie,1,"sevn_duel_state__candidates-mobile svelte-zzeoe9",null,le,{"winner-left":e(M)===0,"winner-right":e(M)===1})),f(P,ie)};W(R,P=>{e(g)&&P(F)})}T(()=>K=Ae(O,1,"sevn_duel_state svelte-zzeoe9",null,K,{"sevn_duel_state--raw":l()})),f(a,O),Le()}var Dp=h('<p class="sevn_candidate_map__status svelte-faw3il">Dados indisponíveis no momento.</p>'),Bp=h('<p class="sevn_candidate_map__overlay-title svelte-faw3il"> </p>'),qp=h('<p class="sevn_candidate_map__overlay-footer svelte-faw3il"> </p>'),Fp=h('<div class="sevn_candidate_map__overlay svelte-faw3il"><div class="sevn_candidate_map__overlay-card svelte-faw3il"><!> <!> <!></div></div>'),Tp=h('<p class="sevn_candidate_map__result-footer svelte-faw3il"> </p>'),Op=h('<div class="sevn_candidate_map__result svelte-faw3il"></div> <!>',1),Gp=h('<div><!> <!> <div class="sevn_candidate_map__web svelte-faw3il"><div class="sevn_candidate_map__map-web svelte-faw3il" role="presentation"><!> <!></div> <!></div> <div class="sevn_candidate_map__mobile svelte-faw3il"><p class="sevn_candidate_map__overview-label svelte-faw3il">Visão geral:</p> <!> <div class="sevn_candidate_map__map-mobile svelte-faw3il"><!></div> <div class="sevn_candidate_map__filter svelte-faw3il"><div class="sevn_candidate_map__autocomplete svelte-faw3il"><!></div></div> <!></div></div>');const Ip={hash:"svelte-faw3il",code:`.sevn_candidate_map.svelte-faw3il {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_map--raw.svelte-faw3il,
|
|
502
|
+
.sevn_candidate_map--raw.svelte-faw3il :where(.svelte-faw3il) {all:revert;}.sevn_candidate_map__status.svelte-faw3il {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}
|
|
503
|
+
|
|
504
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_candidate_map__web.svelte-faw3il {display:none;flex-direction:column;gap:12px;}
|
|
505
|
+
|
|
506
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_candidate_map__mobile.svelte-faw3il {display:flex;flex-direction:column;gap:16px;}.sevn_candidate_map__overview-label.svelte-faw3il {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_candidate_map__map-mobile.svelte-faw3il {width:100%;}.sevn_candidate_map__filter.svelte-faw3il {display:flex;flex-direction:column;gap:8px;}
|
|
507
|
+
|
|
508
|
+
/* Dropdown inline no mobile */.sevn_candidate_map__autocomplete.svelte-faw3il .dropdown {position:static;margin-top:10px;}
|
|
509
|
+
|
|
510
|
+
/* Resultado mobile */.sevn_candidate_map__result.svelte-faw3il {display:flex;flex-direction:column;gap:10px;background:#fff;border-radius:12px;box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);padding:16px;}.sevn_candidate_map__result-footer.svelte-faw3il {font-size:0.7rem;color:var(--sevn-color-tertiary);opacity:0.5;margin:0;}
|
|
511
|
+
|
|
512
|
+
/* ── Map web container ──────────────────────────────── */.sevn_candidate_map__map-web.svelte-faw3il {position:relative;}
|
|
513
|
+
|
|
514
|
+
/* ── Overlay (web hover/pin) ────────────────────────── */.sevn_candidate_map__overlay.svelte-faw3il {position:absolute;z-index:10;transform:translate(-50%, 12px);filter:drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));pointer-events:none;}.sevn_candidate_map__overlay-card.svelte-faw3il {background:white;border-radius:10px;padding:14px 16px;width:300px;font-family:inherit;display:flex;flex-direction:column;gap:10px;}.sevn_candidate_map__overlay-title.svelte-faw3il {font-size:0.8125rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0;}.sevn_candidate_map__overlay-footer.svelte-faw3il {border-top:1px solid #f0f0f5;padding-top:8px;font-size:0.75rem;color:#9a9aaa;margin:0;}.sevn_candidate_map__overlay-card.svelte-faw3il .candidate {justify-content:flex-start;}.sevn_candidate_map.svelte-faw3il .candidate-info.right .candidate-description {margin-left:0;}
|
|
515
|
+
|
|
516
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
517
|
+
@media (min-width: 768px) {.sevn_candidate_map__web.svelte-faw3il {display:flex;}.sevn_candidate_map__mobile.svelte-faw3il {display:none;}
|
|
518
|
+
}`};function Up(a,t){je(t,!0),Me(a,Ip);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"data",3,null),i=L(t,"header",19,()=>({title:"Governador por Estado",description:"Você pode interagir com o mapa e ver quais estados já elegeram governador e onde a disputa seguirá para o segundo turno",tag:"1° E 2° TURNO",tagColor:"#1e3461"}));const v="#d1d5db",_="#d97706",c="#1e3461",m={rr:"elected",am:"elected",ap:"elected",al:"elected",se:"elected",ce:"elected",ba:"elected",df:"elected",sp:"elected",pr:"elected",sc:"elected",rs:"elected",pb:"elected",pi:"elected",rj:"elected",go:"elected",mt:"second",ms:"second",mg:"second",ma:"second",pa:"second",ro:"second",es:"second",rn:"second",pe:"second",ac:"counting",to:"counting"},g={ac:"Acre",al:"Alagoas",am:"Amazonas",ap:"Amapá",ba:"Bahia",ce:"Ceará",df:"Distrito Federal",es:"Espírito Santo",go:"Goiás",ma:"Maranhão",mg:"Minas Gerais",ms:"Mato Grosso do Sul",mt:"Mato Grosso",pa:"Pará",pb:"Paraíba",pe:"Pernambuco",pi:"Piauí",pr:"Paraná",rj:"Rio de Janeiro",rn:"Rio Grande do Norte",ro:"Rondônia",rr:"Roraima",rs:"Rio Grande do Sul",sc:"Santa Catarina",se:"Sergipe",sp:"São Paulo",to:"Tocantins"},y={elected_round_1:"Eleito no 1° turno",elected_round_2:"Eleito no 2° turno",counting:"Em apuração",runoff:"2° turno",elected:"Eleito",second:"2° turno"},u={elected_round_1:c,elected_round_2:c,counting:v,runoff:_},w={elected:{percents:["51,8% dos votos válidos","48,2% dos votos válidos"]},second:{percents:["51,8% dos votos válidos","49,2% dos votos válidos"]},counting:{percents:["41,8% dos votos válidos","41,8% dos votos válidos"]}},z=[{pos:"1°",name:"Candidato A",photoUrl:void 0,acronym:"ABC",color:"#475569",elected:void 0},{pos:"2°",name:"Candidato B",photoUrl:void 0,acronym:"EFG",color:c,elected:void 0}];function x(S){const oe=m[S]??"counting",N=w[oe].percents;return{name:g[S]??S.toUpperCase(),statusLabel:y[oe],candidates:z.map((re,ue)=>({...re,percent:N[ue]}))}}const b=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],E=p(()=>!r()&&!!n()?.states?.length),M=p(()=>r()?Qe:ot(n()?.last_updated)),O=p(()=>r()?Object.entries(m).map(([S,oe])=>({id:S,color:oe==="elected"?c:oe==="second"?_:v})):e(E)?n().states.map(S=>({id:S.state.toLowerCase(),color:u[S.status]??v})):[]),K=[{label:"Em apuração",color:v},{label:"2° turno",color:_},{label:"Eleito no 1° turno",color:c}],J=p(()=>r()?Object.fromEntries(Object.keys(m).map(S=>{const oe=x(S);return[S,{title:`${oe.name}: ${oe.statusLabel}`,footer:`Última atualização: ${Qe}`,items:oe.candidates.map(N=>({position:N.pos,name:N.name,tag:N.acronym,tagColor:N.color,avatarColor:N.color,description:N.percent}))}]})):e(E)?Object.fromEntries(n().states.map(S=>[S.state.toLowerCase(),{title:`${S.state_name}: ${y[S.status]??S.status}`,footer:e(M)?`Última atualização: ${e(M)}`:"",items:[...S.leader?[{position:"1°",name:Be(S.leader.name),photoUrl:S.leader.photo_url,tag:S.leader.party_abbr,tagColor:S.leader.party_color,avatarColor:S.leader.party_color,avatarTag:S.leader.elected?"ELEITO":void 0,description:`${S.leader.valid_votes_pct.toFixed(1)}% dos votos válidos`}]:[],...S.runner_up?[{position:"2°",name:Be(S.runner_up.name),photoUrl:S.runner_up.photo_url,tag:S.runner_up.party_abbr,tagColor:S.runner_up.party_color,avatarColor:S.runner_up.party_color,avatarTag:S.runner_up.elected?"ELEITO":void 0,description:`${S.runner_up.valid_votes_pct.toFixed(1)}% dos votos válidos`}]:[]]}])):{});let B=U(null),Z=U(0),ae=U(0),D=U(null),q=U(null),$=U(0),X=U(0);const R=p(()=>e(q)??e(B)),F=p(()=>e(R)?e(J)[e(R)]:null);function P(S){if(s(B,S.cid,!0),e(D)){const oe=e(D).getBoundingClientRect();s(Z,S.clientX-oe.left),s(ae,S.clientY-oe.top)}}function ie(S){if(!e(D))return;const oe=e(D).getBoundingClientRect();e(q)===S.cid?s(q,null):(s(q,S.cid,!0),s($,S.clientX-oe.left),s(X,S.clientY-oe.top))}Ce(()=>{if(!e(q))return;function S(oe){e(D)&&!e(D).contains(oe.target)&&s(q,null)}return document.addEventListener("click",S),()=>document.removeEventListener("click",S)});let le=U(null);const I=p(()=>{if(!e(le))return null;if(r())return x(e(le));if(!e(E))return null;const S=n().states.find(oe=>oe.state.toLowerCase()===e(le));return S?{candidates:[...S.leader?[{pos:"1°",name:Be(S.leader.name),photoUrl:S.leader.photo_url,acronym:S.leader.party_abbr,color:S.leader.party_color,elected:S.leader.elected,percent:`${S.leader.valid_votes_pct.toFixed(1)}% dos votos válidos`}]:[],...S.runner_up?[{pos:"2°",name:Be(S.runner_up.name),photoUrl:S.runner_up.photo_url,acronym:S.runner_up.party_abbr,color:S.runner_up.party_color,elected:S.runner_up.elected,percent:`${S.runner_up.valid_votes_pct.toFixed(1)}% dos votos válidos`}]:[]]}:null});var ne=Gp();let _e;var ge=o(ne);Ye(ge,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var fe=d(ge,2);{var he=S=>{var oe=Dp();f(S,oe)};W(fe,S=>{!r()&&!e(E)&&S(he)})}var pe=d(fe,2),Y=o(pe),se=o(Y);pt(se,{type:"brazil-states",get colors(){return e(O)},interactive:!0,onRegionHover:P,onRegionClick:ie});var me=d(se,2);{var ce=S=>{var oe=Fp(),N=o(oe),re=o(N);{var ue=ye=>{var ke=Bp(),De=o(ke);T(()=>Q(De,e(F).title)),f(ye,ke)};W(re,ye=>{e(F).title&&ye(ue)})}var xe=d(re,2);Ee(xe,17,()=>e(F).items,Pe,(ye,ke)=>{bt(ye,{get name(){return e(ke).name},get photoUrl(){return e(ke).photoUrl},get tag(){return e(ke).tag},get tagColor(){return e(ke).tagColor},get avatarColor(){return e(ke).avatarColor},get avatarTag(){return e(ke).avatarTag},get position(){return e(ke).position},positionSide:"left",get description(){return e(ke).description},descriptionSide:"right",size:"sm",wrapper:!0})});var we=d(xe,2);{var de=ye=>{var ke=qp(),De=o(ke);T(()=>Q(De,e(F).footer)),f(ye,ke)};W(we,ye=>{e(F).footer&&ye(de)})}T(()=>Se(oe,`left:${e(Z)??""}px;top:${e(ae)??""}px`)),f(S,oe)};W(me,S=>{e(R)&&e(F)&&S(ce)})}tt(Y,S=>s(D,S),()=>e(D));var A=d(Y,2);va(A,{get segments(){return K}});var k=d(pe,2),ee=d(o(k),2);va(ee,{get segments(){return K}});var H=d(ee,2),G=o(H);pt(G,{type:"brazil-states",get colors(){return e(O)}});var C=d(H,2),j=o(C),te=o(j);{let S=p(()=>e(le)?"Você selecionou:":"Busque por estado:");Re(te,{get label(){return e(S)},get options(){return b},get value(){return e(le)},set value(oe){s(le,oe,!0)}})}var V=d(C,2);{var ve=S=>{var oe=Op(),N=ze(oe);Ee(N,21,()=>e(I).candidates,Pe,(xe,we)=>{{let de=p(()=>e(we).elected?"ELEITO":void 0);bt(xe,{get name(){return e(we).name},get photoUrl(){return e(we).photoUrl},get avatarColor(){return e(we).color},get position(){return e(we).pos},positionSide:"left",avatarSize:"46px",get tag(){return e(we).acronym},get tagColor(){return e(we).color},get avatarTag(){return e(de)},get description(){return e(we).percent},descriptionSide:"right",size:"sm"})}});var re=d(N,2);{var ue=xe=>{var we=Tp(),de=o(we);T(()=>Q(de,`Última atualização: ${e(M)??""}`)),f(xe,we)};W(re,xe=>{e(M)&&xe(ue)})}f(S,oe)};W(V,S=>{e(I)&&S(ve)})}T(()=>_e=Ae(ne,1,"sevn_candidate_map svelte-faw3il",null,_e,{"sevn_candidate_map--raw":l()})),ht("mouseleave",Y,()=>s(B,null)),f(a,ne),Le()}var Np=h('<div class="sevn_election_round__filter-secondary-mobile svelte-acpu5v"><!></div>'),Vp=h('<p class="sevn_election_round__status svelte-acpu5v">2º turno ainda não publicado para este recorte.</p>'),Hp=h('<div class="sevn_election_round__chart svelte-acpu5v"><!></div> <!>',1),Wp=h('<div class="sevn_election_round__grid svelte-acpu5v"><div class="sevn_election_round__col svelte-acpu5v"><div class="sevn_election_round__chart svelte-acpu5v"><!></div> <!></div> <div class="sevn_election_round__col svelte-acpu5v"><!></div></div>'),Jp=h('<div><!> <div class="sevn_election_round__office-web svelte-acpu5v"><!></div> <div class="sevn_election_round__filters-web svelte-acpu5v"><div class="sevn_election_round__filter-uf svelte-acpu5v"><!></div></div> <div class="sevn_election_round__filter-mobile svelte-acpu5v"><!></div> <!> <!></div>');const Kp={hash:"svelte-acpu5v",code:`.sevn_election_round.svelte-acpu5v {display:flex;flex-direction:column;gap:24px;}.sevn_election_round--raw.svelte-acpu5v,
|
|
519
|
+
.sevn_election_round--raw.svelte-acpu5v :where(.svelte-acpu5v) {all:revert;}
|
|
520
|
+
|
|
521
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_election_round__office-web.svelte-acpu5v,
|
|
522
|
+
.sevn_election_round__filters-web.svelte-acpu5v {display:none;}
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_election_round__filter-mobile.svelte-acpu5v {display:block;}.sevn_election_round__grid.svelte-acpu5v {display:flex;flex-direction:column;gap:32px;}.sevn_election_round__status.svelte-acpu5v {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_election_round__col.svelte-acpu5v {display:flex;flex-direction:column;gap:16px;}.sevn_election_round__chart.svelte-acpu5v {width:200px;margin:0 auto;}.sevn_election_round.svelte-acpu5v .dropdown {position:static;margin-top:10px;}
|
|
526
|
+
|
|
527
|
+
/* A regra acima é para os Autocomplete, que abrem empurrando o conteúdo. O
|
|
528
|
+
FilterDropdown do cargo se posiciona sozinho (absolute, abaixo do gatilho)
|
|
529
|
+
— sem esta exceção ele vira um item do flex e abre ao lado, não abaixo. */.sevn_election_round.svelte-acpu5v .sevn_election_round__office-web:where(.svelte-acpu5v) .dropdown {position:absolute;margin-top:0;}.sevn_election_round.svelte-acpu5v .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_election_round.svelte-acpu5v .vote-overview .vote-overview-stats {gap:8px;}
|
|
530
|
+
|
|
531
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
532
|
+
@media (min-width: 768px) {.sevn_election_round__office-web.svelte-acpu5v {display:block;}.sevn_election_round__filters-web.svelte-acpu5v {display:flex;gap:16px;align-items:flex-start;}.sevn_election_round__filter-uf.svelte-acpu5v {flex:3;}.sevn_election_round__filter-mobile.svelte-acpu5v {display:none;}.sevn_election_round__grid.svelte-acpu5v {flex-direction:row;gap:40px;}.sevn_election_round__col.svelte-acpu5v {flex:1;}.sevn_election_round__chart.svelte-acpu5v {width:260px;}.sevn_election_round.svelte-acpu5v .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}.sevn_election_round__filter-secondary-mobile.svelte-acpu5v {display:none;}
|
|
533
|
+
}`};function Xp(a,t){je(t,!0),Me(a,Kp);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Análise de resultados por turno",description:"Resultados governamentais por município, em tempo real"}));const v=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],_=[{value:"governador",label:"Governador"},{value:"presidente",label:"Presidente"}],c={governador:"governor",presidente:"president"};let m=U(""),g=U(He(_[0].value));const y=[{name:"Candidato A",tag:"ABC",tagColor:"#d97706",dotColor:"#d97706",votes:"42,8%"},{name:"Candidato B",tag:"DEF",tagColor:"#166534",dotColor:"#166534",votes:"31,4%"},{name:"Candidato C",tag:"GHI",tagColor:"#1e3461",dotColor:"#1e3461",votes:"12,6%"},{name:"Candidato D",tag:"JKL",tagColor:"#e11d48",dotColor:"#e11d48",votes:"10,8%"}],u=[{name:"Candidato A",tag:"ABC",tagColor:"#d97706",dotColor:"#d97706",votes:"54,2%",elected:!0},{name:"Candidato B",tag:"DEF",tagColor:"#166534",dotColor:"#166534",votes:"45,8%"}],w=[{value:42.8,color:"#d97706",label:"ABC"},{value:31.4,color:"#166534",label:"DEF"},{value:12.6,color:"#1e3461",label:"GHI"},{value:10.8,color:"#e11d48",label:"JKL"}],z=[{value:54.2,color:"#d97706",label:"ABC"},{value:45.8,color:"#166534",label:"DEF"}];let x=U(null),b=U(null);Ce(()=>{if(r()||!e(m)||!e(g))return;s(x,null),s(b,null);const Y=e(m),se=c[e(g)]??"president";Dt(n(),{round:1,state:Y,office:se}).then(me=>{s(x,me,!0)}).catch(me=>{console.error("Failed to fetch round 1 election results:",me)}),Dt(n(),{round:2,state:Y,office:se}).then(me=>{s(b,me,!0)}).catch(me=>{console.error("Failed to fetch round 2 election results:",me)})});const E=p(()=>r()?y:e(x)?.candidates?e(x).candidates.map(Y=>({name:Be(Y.ballot_name),tag:Y.party_abbr,tagColor:Y.party_color,dotColor:Y.party_color,votes:`${Y.valid_votes_pct.toFixed(1)}%`,elected:Y.elected})):[]),M=p(()=>r()?w:e(x)?.candidates?e(x).candidates.map(Y=>({value:Y.valid_votes_pct,color:Y.party_color,label:Y.party_abbr})):[]),O=p(()=>r()?u:e(b)?.candidates?e(b).candidates.map(Y=>({name:Be(Y.ballot_name),tag:Y.party_abbr,tagColor:Y.party_color,dotColor:Y.party_color,votes:`${Y.valid_votes_pct.toFixed(1)}%`,elected:Y.elected})):[]),K=p(()=>r()?z:e(b)?.candidates?e(b).candidates.map(Y=>({value:Y.valid_votes_pct,color:Y.party_color,label:Y.party_abbr})):[]),J=p(()=>r()?"118.552.353 votos":e(x)?.summary?`${e(x).summary.total_valid_votes.toLocaleString("pt-BR")} votos`:null),B=p(()=>r()?"118.552.353 votos":e(b)?.summary?`${e(b).summary.total_valid_votes.toLocaleString("pt-BR")} votos`:null),Z=p(()=>r()?Qe:ot(e(x)?.summary?.last_updated)),ae=p(()=>r()?Qe:ot(e(b)?.summary?.last_updated)),D=p(()=>!r()&&e(m)!==""&&!!e(g)&&!e(b));let q=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const Y=window.matchMedia("(max-width: 480px)");s(q,Y.matches,!0);const se=me=>{s(q,me.matches,!0)};return Y.addEventListener("change",se),()=>Y.removeEventListener("change",se)});var $=Jp();let X;var R=o($);Ye(R,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var F=d(R,2),P=o(F);Jt(P,{label:"Cargo",get options(){return _},get value(){return e(g)},set value(Y){s(g,Y,!0)}});var ie=d(F,2),le=o(ie),I=o(le);Re(I,{label:"Busque por UF",get options(){return v},get icon(){return Ke},iconSize:13,get value(){return e(m)},set value(Y){s(m,Y,!0)}});var ne=d(ie,2),_e=o(ne);{let Y=p(()=>e(m)?"Você selecionou:":"Busque por estado:");Re(_e,{get label(){return e(Y)},get options(){return v},get icon(){return Ke},iconSize:13,get value(){return e(m)},set value(se){s(m,se,!0)}})}var ge=d(ne,2);{var fe=Y=>{var se=Np(),me=o(se);Re(me,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return _},get value(){return e(g)},set value(ce){s(g,ce,!0)}}),f(Y,se)};W(ge,Y=>{e(m)&&Y(fe)})}var he=d(ge,2);{var pe=Y=>{var se=Wp(),me=o(se),ce=o(me),A=o(ce);{let j=p(()=>e(q)?"220px":"280px");jr(A,{get rings(){return e(M)},centerLabel:"1°Turno",centerLabelSize:14,get size(){return e(j)},outerRadius:100,thickness:10,ringGap:5})}var k=d(ce,2);ka(k,{get candidates(){return e(E)},get totalVotes(){return e(J)},get date(){return e(Z)},font:"TSE"});var ee=d(me,2),H=o(ee);{var G=j=>{var te=Vp();f(j,te)},C=j=>{var te=Hp(),V=ze(te),ve=o(V);{let oe=p(()=>e(q)?"220px":"280px");jr(ve,{get rings(){return e(K)},centerLabel:"2°Turno",centerLabelSize:14,get size(){return e(oe)},outerRadius:100,thickness:10,ringGap:5})}var S=d(V,2);ka(S,{get candidates(){return e(O)},get totalVotes(){return e(B)},get date(){return e(ae)},font:"TSE"}),f(j,te)};W(H,j=>{e(D)?j(G):j(C,!1)})}f(Y,se)};W(he,Y=>{e(m)&&e(g)&&Y(pe)})}T(()=>X=Ae($,1,"sevn_election_round svelte-acpu5v",null,X,{"sevn_election_round--raw":l()})),f(a,$),Le()}const Yp={elected_round_1:"Eleito no 1° turno",elected_round_2:"Eleito no 2° turno",counting:"Em apuração",runoff:"2° turno",elected:"Eleito",second:"2° turno"},Zp={elected_round_1:"#1e3461",elected_round_2:"#1e3461",counting:"#d1d5db",runoff:"#d97706",second:"#d97706"},Qp=new Set(["elected_round_1","elected_round_2","runoff","second"]);function go(a){return!a||!Qp.has(a)?null:Yp[a]??null}function bo(a){return a&&Zp[a]||"#d1d5db"}var $p=h('<div class="sevn_perf_muni__filter-secondary-mobile svelte-158q6c1"><!></div>'),e_=h('<div class="sevn_perf_muni__filter-secondary-mobile svelte-158q6c1"><!></div>'),t_=h('<p class="sevn_perf_muni__status svelte-158q6c1">Carregando...</p>'),a_=h('<p class="sevn_perf_muni__status sevn_perf_muni__status--error svelte-158q6c1"> </p>'),r_=h('<p class="sevn_perf_muni__status svelte-158q6c1"> </p>'),o_=h('<div class="sevn_perf_muni__content svelte-158q6c1"><div class="sevn_perf_muni__chart svelte-158q6c1"><!></div> <div class="sevn_perf_muni__ranking svelte-158q6c1"><!></div></div>'),n_=h('<div><!> <div class="sevn_perf_muni__office-web svelte-158q6c1"><!></div> <div class="sevn_perf_muni__filters-web svelte-158q6c1"><div class="sevn_perf_muni__filter-uf svelte-158q6c1"><!></div> <div class="sevn_perf_muni__filter-municipio svelte-158q6c1"><!></div></div> <div class="sevn_perf_muni__filter-mobile svelte-158q6c1"><!></div> <!> <!> <!></div>');const l_={hash:"svelte-158q6c1",code:`.sevn_perf_muni.svelte-158q6c1 {display:flex;flex-direction:column;gap:24px;}.sevn_perf_muni--raw.svelte-158q6c1,
|
|
534
|
+
.sevn_perf_muni--raw.svelte-158q6c1 :where(.svelte-158q6c1) {all:revert;}.sevn_perf_muni__status.svelte-158q6c1 {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_perf_muni__status--error.svelte-158q6c1 {color:#e11d48;}
|
|
535
|
+
|
|
536
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_perf_muni__office-web.svelte-158q6c1,
|
|
537
|
+
.sevn_perf_muni__filters-web.svelte-158q6c1 {display:none;}
|
|
538
|
+
|
|
539
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_perf_muni__filter-mobile.svelte-158q6c1 {display:block;}.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 {display:flex;flex-direction:column;gap:8px;}
|
|
540
|
+
|
|
541
|
+
/* Dropdown inline no mobile */.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 .dropdown {position:static;margin-top:10px;}
|
|
542
|
+
|
|
543
|
+
/* Mobile: chart centralizado, ranking abaixo */.sevn_perf_muni__content.svelte-158q6c1 {display:flex;flex-direction:column;gap:24px;}.sevn_perf_muni__chart.svelte-158q6c1 {width:220px;margin:0 auto;}.sevn_perf_muni.svelte-158q6c1 .dropdown {position:static;margin-top:10px;}
|
|
544
|
+
|
|
545
|
+
/* A regra acima é para os Autocomplete, que abrem empurrando o conteúdo. O
|
|
546
|
+
FilterDropdown do cargo se posiciona sozinho (absolute, abaixo do gatilho)
|
|
547
|
+
— sem esta exceção ele vira um item do flex e abre ao lado, não abaixo. */.sevn_perf_muni.svelte-158q6c1 .sevn_perf_muni__office-web:where(.svelte-158q6c1) .dropdown {position:absolute;margin-top:0;}.sevn_perf_muni.svelte-158q6c1 .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_perf_muni.svelte-158q6c1 .vote-overview .vote-overview-stats {gap:8px;}
|
|
548
|
+
|
|
549
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
550
|
+
@media (min-width: 768px) {.sevn_perf_muni__office-web.svelte-158q6c1 {display:block;}.sevn_perf_muni__filters-web.svelte-158q6c1 {display:flex;gap:16px;align-items:flex-start;}.sevn_perf_muni__filter-uf.svelte-158q6c1 {flex:2;}.sevn_perf_muni__filter-municipio.svelte-158q6c1 {flex:2;}.sevn_perf_muni__filter-mobile.svelte-158q6c1 {display:none;}.sevn_perf_muni__filter-secondary-mobile.svelte-158q6c1 {display:none;}
|
|
551
|
+
|
|
552
|
+
/* Web: chart à esquerda, ranking à direita */.sevn_perf_muni__content.svelte-158q6c1 {flex-direction:row;align-items:center;gap:48px;}.sevn_perf_muni__chart.svelte-158q6c1 {width:370px;flex-shrink:0;margin:0;}.sevn_perf_muni__ranking.svelte-158q6c1 {flex:1;}.sevn_perf_muni.svelte-158q6c1 .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}
|
|
553
|
+
}`};function s_(a,t){je(t,!0),Me(a,l_);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados eleitorais por município, em tempo real"})),v=U(null),_=U(He([])),c=U(!1),m=U(null);const g=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],y=[{value:"governador",label:"Governador"},{value:"presidente",label:"Presidente"},{value:"senador",label:"Senador"}];let u=U(null),w=U(null),z=U(He(y[0].value));const x={governador:"governor",presidente:"president",senador:"senator"};Ce(()=>{if(!Fe||r()||!e(u)){s(_,[],!0);return}s(w,null),Fa(e(u)).then(ce=>{s(_,ce.municipalities.map(A=>({value:String(A.municipality_id),label:A.name})),!0)}).catch(ce=>{console.error("Failed to fetch municipalities:",ce),s(_,[],!0)})}),Ce(()=>{if(!Fe||r())return;if(!e(u)||!e(z)){s(v,null);return}const ce=x[e(z)]||"governor",A=1;s(c,!0),s(m,null),s(v,null),Za(n(),ce,A,e(u)).then(k=>{s(v,k,!0),s(c,!1)}).catch(k=>{console.error("Failed to fetch municipality results:",k),s(m,"Failed to load data"),s(c,!1)})});let b=U(null);Ce(()=>{if(!Fe||r())return;if(!e(u)||!e(z)){s(b,null);return}const ce=x[e(z)]||"governor";s(c,!0),s(m,null),s(b,null),Dt(n(),{office:ce,round:1,state:e(u)}).then(A=>{s(b,A,!0),s(c,!1)}).catch(A=>{console.error("Failed to fetch state results:",A),s(m,"Failed to load data"),s(c,!1)})});const E=[{name:"Candidato A",tag:"ABC",tagColor:"#d97706",dotColor:"#d97706",votes:"42,8%"},{name:"Candidato B",tag:"EFG",tagColor:"#166534",dotColor:"#166534",votes:"31,4%"},{name:"Candidato C",tag:"HIJ",tagColor:"#1e3461",dotColor:"#1e3461",votes:"12,6%"},{name:"Candidato D",tag:"KLM",tagColor:"#374151",dotColor:"#374151",votes:"6,7%"}],M=[{value:42.8,color:"#d97706",label:"ABC"},{value:31.4,color:"#166534",label:"EFG"},{value:12.6,color:"#1e3461",label:"HIJ"},{value:6.7,color:"#374151",label:"KLM"}],O=p(()=>!r()&&e(w)&&e(v)?.municipalities&&Array.isArray(e(v).municipalities)?e(v).municipalities.find(ce=>String(ce.municipality_id)===e(w))??null:null),K=p(()=>{if(r())return{candidates:E,rings:M,totalVotes:"118.552.353"};if(!e(w)){if(!e(b)?.candidates?.length)return{candidates:[],rings:[],totalVotes:null};const ee=[...e(b).candidates].sort((H,G)=>G.valid_votes_pct-H.valid_votes_pct);return{candidates:ee.map(H=>({name:Be(H.ballot_name),tag:H.party_abbr,dotColor:H.party_color||"var(--sevn-color-primary)",tagColor:H.party_color||"var(--sevn-color-primary)",votes:`${H.valid_votes_pct.toFixed(1)}%`,elected:H.elected??!1,statusLabel:go(H.status),statusColor:bo(H.status)})),rings:ee.map(H=>({value:H.valid_votes_pct,color:H.party_color||"var(--sevn-color-primary)",label:H.party_abbr})),totalVotes:e(b).summary?.total_valid_votes.toLocaleString("pt-BR")??null}}if(!e(O))return{candidates:[],rings:[],totalVotes:null};const ce=[e(O).leader,e(O).runner_up].filter(Boolean).sort((ee,H)=>H.valid_votes_pct-ee.valid_votes_pct),A=ce.map(ee=>({name:ee.name?Be(ee.name):"Unknown",tag:ee.party_abbr||"",dotColor:ee.party_color||"var(--sevn-color-primary)",tagColor:ee.party_color||"var(--sevn-color-primary)",votes:`${ee.valid_votes_pct.toFixed(1)}%`,elected:ee.elected??!1,statusLabel:go(ee.status),statusColor:bo(ee.status)})),k=ce.map(ee=>({value:ee.valid_votes_pct,color:ee.party_color||"var(--sevn-color-primary)",label:ee.party_abbr||""}));return{candidates:A,rings:k,totalVotes:null}}),J=p(()=>e(K).candidates),B=p(()=>e(K).rings),Z=p(()=>e(K).totalVotes),ae=p(()=>r()?Qe:ot(e(w)?e(v)?.last_updated:e(b)?.summary?.last_updated));let D=U(He(Fe?window.innerWidth<=480:!1));Ce(()=>{if(!Fe)return;const ce=window.matchMedia("(max-width: 480px)");s(D,ce.matches,!0);const A=k=>{s(D,k.matches,!0)};return ce.addEventListener("change",A),()=>ce.removeEventListener("change",A)});var q=n_();let $;var X=o(q);Ye(X,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var R=d(X,2),F=o(R);Jt(F,{label:"Cargo",get options(){return y},get value(){return e(z)},set value(ce){s(z,ce,!0)}});var P=d(R,2),ie=o(P),le=o(ie);Re(le,{label:"Busque por UF",get options(){return g},get icon(){return Ke},iconSize:13,get value(){return e(u)},set value(ce){s(u,ce,!0)}});var I=d(ie,2),ne=o(I);Re(ne,{label:"Busque por município (opcional)",get options(){return e(_)},get icon(){return Ke},iconSize:13,get value(){return e(w)},set value(ce){s(w,ce,!0)}});var _e=d(P,2),ge=o(_e);{let ce=p(()=>e(u)?"Você selecionou:":"Busque por estado");Re(ge,{get label(){return e(ce)},get options(){return g},get icon(){return Ke},iconSize:13,get value(){return e(u)},set value(A){s(u,A,!0)}})}var fe=d(_e,2);{var he=ce=>{var A=$p(),k=o(A);Re(k,{label:"Busque por município (opcional):",get options(){return e(_)},get icon(){return Ke},iconSize:13,get value(){return e(w)},set value(ee){s(w,ee,!0)}}),f(ce,A)};W(fe,ce=>{e(u)&&ce(he)})}var pe=d(fe,2);{var Y=ce=>{var A=e_(),k=o(A);Re(k,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return y},get value(){return e(z)},set value(ee){s(z,ee,!0)}}),f(ce,A)};W(pe,ce=>{e(u)&&ce(Y)})}var se=d(pe,2);{var me=ce=>{var A=st(),k=ze(A);{var ee=j=>{var te=t_();f(j,te)},H=j=>{var te=a_(),V=o(te);T(()=>Q(V,e(m))),f(j,te)},G=j=>{var te=r_(),V=o(te);T(()=>Q(V,`Resultado ainda não publicado para ${e(w)?"este município":"este estado"}.`)),f(j,te)},C=j=>{var te=o_(),V=o(te),ve=o(V);{let N=p(()=>y.find(ue=>ue.value===e(z))?.label??""),re=p(()=>e(D)?"230px":"350px");jr(ve,{get rings(){return e(B)},get centerLabel(){return e(N)},centerLabelSize:14,get size(){return e(re)},outerRadius:100,thickness:10,ringGap:5})}var S=d(V,2),oe=o(S);ka(oe,{get candidates(){return e(J)},get totalVotes(){return e(Z)},get date(){return e(ae)},font:"TSE"}),f(j,te)};W(k,j=>{e(c)?j(ee):e(m)?j(H,1):!r()&&e(J).length===0?j(G,2):j(C,!1)})}f(ce,A)};W(se,ce=>{e(u)&&e(z)&&ce(me)})}T(()=>$=Ae(q,1,"sevn_perf_muni svelte-158q6c1",null,$,{"sevn_perf_muni--raw":l()})),f(a,q),Le()}var i_=h('<p class="sevn_results_office__status svelte-mc3jf"> </p>'),d_=h('<p class="sevn_results_office__status sevn_results_office__status--error svelte-mc3jf"> </p>'),v_=h("<!> <!>",1),c_=h('<div class="sevn_results_office__filters-web svelte-mc3jf"><div class="sevn_results_office__filter-uf svelte-mc3jf"><!></div> <div class="sevn_results_office__filter-by svelte-mc3jf"><!></div></div> <div class="sevn_results_office__filters-mobile svelte-mc3jf"><!> <!></div> <!>',1),u_=h('<div><!> <div class="sevn_results_office__office-web svelte-mc3jf"><!></div> <div class="sevn_results_office__office-mobile svelte-mc3jf"><!></div> <!></div>');const p_={hash:"svelte-mc3jf",code:`.sevn_results_office.svelte-mc3jf {display:flex;flex-direction:column;gap:24px;}.sevn_results_office--raw.svelte-mc3jf,
|
|
554
|
+
.sevn_results_office--raw.svelte-mc3jf :where(.svelte-mc3jf) {all:revert;}.sevn_results_office__status.svelte-mc3jf {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_results_office__status--error.svelte-mc3jf {color:#e11d48;}.sevn_results_office__office-web.svelte-mc3jf {display:none;}.sevn_results_office__office-mobile.svelte-mc3jf {display:block;width:100%;}
|
|
555
|
+
|
|
556
|
+
@media (min-width: 768px) {.sevn_results_office__office-web.svelte-mc3jf {display:block;}.sevn_results_office__office-mobile.svelte-mc3jf {display:none;}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_results_office__filters-web.svelte-mc3jf {display:none;}
|
|
560
|
+
|
|
561
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_results_office__filters-mobile.svelte-mc3jf {display:flex;flex-direction:column;gap:25px;}.sevn_results_office.svelte-mc3jf .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_results_office.svelte-mc3jf .vote-overview .vote-overview-stats {gap:8px;}
|
|
562
|
+
|
|
563
|
+
@media (max-width: 767px) {.sevn_results_office.svelte-mc3jf .dropdown {position:static;margin-top:10px;}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
567
|
+
@media (min-width: 768px) {.sevn_results_office__filters-web.svelte-mc3jf {display:flex;gap:16px;align-items:flex-start;}.sevn_results_office__filter-uf.svelte-mc3jf,
|
|
568
|
+
.sevn_results_office__filter-by.svelte-mc3jf {flex:1;min-width:0;}.sevn_results_office__filters-mobile.svelte-mc3jf {display:none;}.sevn_results_office.svelte-mc3jf .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}
|
|
569
|
+
}`};function __(a,t){je(t,!0),Me(a,p_);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"defaultOffice",3,"senator"),v=L(t,"itemsPerPage",3,10),_=L(t,"header",19,()=>({title:"Resultados por cargo",description:"Filtre por cargo, estado ou município e confira os votos, percentuais e dados de cada candidato."}));const c=[{value:"senador",label:"Senador"},{value:"deputado-federal",label:"Deputado Federal"},{value:"deputado-estadual",label:"Deputado Estadual"}],m={senador:"senator","deputado-federal":"federal_deputy","deputado-estadual":"state_deputy"},g={senator:"senador",federal_deputy:"deputado-federal",state_deputy:"deputado-estadual"};let y=U(He(At(()=>g[i()]??"senador"))),u=U(null),w=U(!1),z=U(null);const x=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],b=[{value:"3507001",label:"Boituva"},{value:"3509502",label:"Campinas"},{value:"3518800",label:"Guarulhos"},{value:"3543402",label:"Ribeirão Preto"},{value:"3548500",label:"Santos"},{value:"3549805",label:"São João da Boa Vista"},{value:"3550308",label:"São Paulo"},{value:"3552205",label:"Sorocaba"}];let E=U(null),M=U(null),O=U(null),K=U(!1);Ce(()=>{!Fe||!e(E)||(s(M,null),!r()&&(s(O,null),s(K,!0),Fa(e(E)).then(pe=>{s(O,pe,!0),s(K,!1)}).catch(pe=>{console.error("Failed to fetch municipalities:",pe),s(K,!1)})))});const J=p(()=>!r()&&e(O)?.municipalities?e(O).municipalities.map(pe=>({value:String(pe.municipality_id),label:pe.name})):r()?b:[]),B=p(()=>e(J).find(pe=>pe.value===e(M))?.label??null),Z=p(()=>e(E)?e(K)?"Carregando municípios...":e(M)?"Você selecionou:":"Busque pelo município":"Selecione a UF primeiro"),ae=1;Ce(()=>{if(!(!Fe||r())){if(!e(E)||!e(y)){s(u,null);return}s(w,!0),s(z,null),s(u,null),Dt(n(),{office:m[e(y)]||"senator",round:ae,state:e(E),municipalityId:e(M)?Number(e(M)):void 0}).then(pe=>{s(u,pe,!0),s(w,!1)}).catch(pe=>{console.error("Failed to fetch municipality results:",pe),s(z,"Failed to load data"),s(w,!1)})}});const D=[{position:"1° Lugar",name:"Candidato A",tag:"ABC",tagColor:"#166534",avatarColor:"#166534",number:"123",votes:"42,8% dos votos válidos",elected:!0},{position:"2° Lugar",name:"Candidato B",tag:"DEF",tagColor:"#d97706",avatarColor:"#d97706",number:"456",votes:"31,4% dos votos válidos",elected:!0},{position:"3° Lugar",name:"Candidato C",tag:"GHI",tagColor:"#1e3461",avatarColor:"#1e3461",number:"789",votes:"15,6% dos votos válidos"},{position:"4° Lugar",name:"Candidato D",tag:"JKL",tagColor:"#374151",avatarColor:"#374151",number:"321",votes:"6,7% dos votos válidos"},{position:"5° Lugar",name:"Candidato E",tag:"MNO",tagColor:"#e11d48",avatarColor:"#e11d48",number:"654",votes:"3,5% dos votos válidos"}],q=p(()=>{if(!r()&&e(u)?.candidates&&Array.isArray(e(u).candidates)){const Y=[...e(u).candidates].sort((k,ee)=>ee.valid_votes_pct-k.valid_votes_pct).map((k,ee)=>({position:`${ee+1}° Lugar`,name:Be(k.ballot_name),photoUrl:k.photo_url,tag:k.party_abbr,tagColor:k.party_color||"var(--sevn-color-primary)",avatarColor:k.party_color||"var(--sevn-color-primary)",number:k.number??"",votes:`${k.valid_votes_pct.toFixed(1).replace(".",",")}% dos votos válidos`,elected:k.elected??!1})),{total_valid_votes:se,null_votes:me,blank_votes:ce}=e(u).summary,A=se+me+ce;return{candidates:Y,overview:[{text:"Nulos",value:`${(me/A*100).toFixed(2)}%`},{text:"Brancos",value:`${(ce/A*100).toFixed(2)}%`},{text:"Válidos",value:`${se.toLocaleString("pt-BR")} votos`}],lastUpdate:ot(e(u).summary.last_updated)}}return r()?{candidates:D,overview:[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],lastUpdate:Qe}:{candidates:[],overview:[],lastUpdate:""}}),$=p(()=>e(q).candidates),X=p(()=>e(q).overview),R=p(()=>e(q).lastUpdate),F=p(()=>e(R)?`Atualizado em ${e(R)} | Fonte TSE`:"Fonte TSE");var P=u_();let ie;var le=o(P);Ye(le,{get title(){return _().title},get description(){return _().description},get tag(){return _().tag},get tagColor(){return _().tagColor}});var I=d(le,2),ne=o(I);Jt(ne,{label:"Cargo",get options(){return c},get value(){return e(y)},set value(pe){s(y,pe,!0)}});var _e=d(I,2),ge=o(_e);Re(ge,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return c},get value(){return e(y)},set value(pe){s(y,pe,!0)}});var fe=d(_e,2);{var he=pe=>{var Y=c_(),se=ze(Y),me=o(se),ce=o(me);Re(ce,{label:"Busque por UF",get options(){return x},get icon(){return Ke},iconSize:13,get meta(){return e(F)},get value(){return e(E)},set value(te){s(E,te,!0)}});var A=d(me,2),k=o(A);{let te=p(()=>!e(E)||e(K));Re(k,{get label(){return e(Z)},get options(){return e(J)},get icon(){return Ke},iconSize:13,get disabled(){return e(te)},get value(){return e(M)},set value(V){s(M,V,!0)}})}var ee=d(se,2),H=o(ee);{let te=p(()=>e(E)?"Você selecionou:":"Busque por estado:");Re(H,{get label(){return e(te)},get options(){return x},get icon(){return Ke},iconSize:13,get value(){return e(E)},set value(V){s(E,V,!0)}})}var G=d(H,2);{let te=p(()=>!e(E)||e(K));Re(G,{get label(){return e(Z)},get options(){return e(J)},get icon(){return Ke},iconSize:13,get disabled(){return e(te)},get value(){return e(M)},set value(V){s(M,V,!0)}})}var C=d(ee,2);{var j=te=>{var V=st(),ve=ze(V);{var S=re=>{var ue=i_(),xe=o(ue);T(()=>Q(xe,`Carregando resultados${e(B)?` de ${e(B)}`:""}...`)),f(re,ue)},oe=re=>{var ue=d_(),xe=o(ue);T(()=>Q(xe,e(z))),f(re,ue)},N=re=>{var ue=v_(),xe=ze(ue);bi(xe,{get candidates(){return e($)},get itemsPerPage(){return v()}});var we=d(xe,2);ia(we,{get data(){return e(X)},get date(){return e(R)},font:"TSE",borderTop:!0}),f(re,ue)};W(ve,re=>{e(w)?re(S):e(z)?re(oe,1):re(N,!1)})}f(te,V)};W(C,te=>{e(E)&&te(j)})}f(pe,Y)};W(fe,pe=>{e(y)&&pe(he)})}T(()=>ie=Ae(P,1,"sevn_results_office svelte-mc3jf",null,ie,{"sevn_results_office--raw":l()})),f(a,P),Le()}var f_=h('<p class="sevn_voting_map__modal-title svelte-uybwj3"> </p>'),m_=h('<div class="sevn_voting_map__modal-item svelte-uybwj3"><!></div>'),g_=h('<div class="sevn_voting_map__modal-footer svelte-uybwj3"> </div>'),b_=h('<div class="sevn_voting_map__modal-card svelte-uybwj3"><!> <!> <!></div>'),h_=h('<div class="sevn_voting_map__map-col svelte-uybwj3"><div class="sevn_voting_map__map-wrapper svelte-uybwj3" role="presentation"><!></div> <div class="sevn_voting_map__legend-web svelte-uybwj3"><!></div></div> <div class="sevn_voting_map__side-web svelte-uybwj3"><!> <div class="sevn_voting_map__office-field svelte-uybwj3"><!></div> <!> <!></div>',1),x_=h('<p class="sevn_voting_map__muni-card-title svelte-uybwj3"> </p> <div class="sevn_voting_map__muni-card svelte-uybwj3"></div> <p class="sevn_voting_map__muni-card-footer svelte-uybwj3"> </p>',1),w_=h('<div><!> <div class="sevn_voting_map__filter-web svelte-uybwj3"><!></div> <div class="sevn_voting_map__filter-mobile svelte-uybwj3"><!></div> <div class="sevn_voting_map__legend-mobile svelte-uybwj3"><!></div> <div class="sevn_voting_map__body svelte-uybwj3"><!></div> <div class="sevn_voting_map__muni-mobile svelte-uybwj3"><!> <div class="sevn_voting_map__office-field svelte-uybwj3"><!></div> <!></div></div>');const y_={hash:"svelte-uybwj3",code:`.sevn_voting_map.svelte-uybwj3 {display:flex;flex-direction:column;gap:24px;}.sevn_voting_map--raw.svelte-uybwj3,
|
|
570
|
+
.sevn_voting_map--raw.svelte-uybwj3 :where(.svelte-uybwj3) {all:revert;}
|
|
571
|
+
|
|
572
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_voting_map__filter-web.svelte-uybwj3 {display:none;}.sevn_voting_map__legend-web.svelte-uybwj3 {display:none;}.sevn_voting_map__side-web.svelte-uybwj3 {display:none;}
|
|
573
|
+
|
|
574
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_voting_map__body.svelte-uybwj3 {display:flex;flex-direction:column;gap:24px;}.sevn_voting_map__map-col.svelte-uybwj3 {display:flex;flex-direction:column;gap:16px;}.sevn_voting_map__map-wrapper.svelte-uybwj3 {position:relative;}.sevn_voting_map__modal-card.svelte-uybwj3 {background:white;border-radius:10px;box-shadow:0 4px 20px rgba(0, 0, 0, 0.15);padding:14px 16px;min-width:210px;font-family:inherit;}.sevn_voting_map__modal-title.svelte-uybwj3 {font-size:0.8125rem;font-weight:600;color:var(--sevn-color-tertiary);margin:0 0 10px;}.sevn_voting_map__modal-item.svelte-uybwj3 {margin-bottom:10px;}.sevn_voting_map__modal-item.svelte-uybwj3:last-child {margin-bottom:0;}.sevn_voting_map__modal-footer.svelte-uybwj3 {border-top:1px solid #f0f0f5;margin-top:10px;padding-top:8px;font-size:0.75rem;color:#9a9aaa;}.sevn_voting_map__muni-mobile.svelte-uybwj3 {display:flex;flex-direction:column;gap:16px;}.sevn_voting_map__muni-card.svelte-uybwj3 {display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:12px;box-shadow:0 2px 12px rgba(0, 0, 0, 0.12);background:#fff;}.sevn_voting_map__muni-card-title.svelte-uybwj3 {font-size:0.875rem;font-weight:700;color:var(--sevn-color-tertiary);margin:0;}.sevn_voting_map__muni-card-footer.svelte-uybwj3 {font-size:0.75rem;color:var(--sevn-color-tertiary);opacity:0.6;margin:0;}.sevn_voting_map.svelte-uybwj3 .dropdown {position:static;margin-top:10px;}
|
|
575
|
+
|
|
576
|
+
/* Filtro de cargo: dropdown flutua por cima do conteúdo em vez de
|
|
577
|
+
empurrar o card de resultado/anúncio para baixo ao abrir. */.sevn_voting_map.svelte-uybwj3 .sevn_voting_map__office-field:where(.svelte-uybwj3) .dropdown {position:absolute;margin-top:0;}
|
|
578
|
+
|
|
579
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
580
|
+
@media (min-width: 768px) {.sevn_voting_map__filter-web.svelte-uybwj3 {display:block;}.sevn_voting_map__filter-mobile.svelte-uybwj3 {display:none;}.sevn_voting_map__legend-mobile.svelte-uybwj3 {display:none;}.sevn_voting_map__muni-mobile.svelte-uybwj3 {display:none;}.sevn_voting_map__body.svelte-uybwj3 {flex-direction:row;align-items:flex-start;gap:32px;}.sevn_voting_map__map-col.svelte-uybwj3 {flex:3;}.sevn_voting_map__legend-web.svelte-uybwj3 {display:block;}.sevn_voting_map__side-web.svelte-uybwj3 {display:flex;flex-direction:column;gap:16px;flex:1;min-width:0;}.sevn_voting_map__side-web.svelte-uybwj3 .ad-container {flex:1;}
|
|
581
|
+
}`};function C_(a,t){je(t,!0),Me(a,y_);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"showAd",3,!1),i=L(t,"year",3,2026),v=L(t,"round",3,1),_=L(t,"header",19,()=>({title:"Mapa de Votação",description:"Selecione o estado e veja a apuração em tempo real"}));const c=[{value:"ac",label:"Acre"},{value:"al",label:"Alagoas"},{value:"ap",label:"Amapá"},{value:"am",label:"Amazonas"},{value:"ba",label:"Bahia"},{value:"ce",label:"Ceará"},{value:"df",label:"Distrito Federal"},{value:"es",label:"Espírito Santo"},{value:"go",label:"Goiás"},{value:"ma",label:"Maranhão"},{value:"mg",label:"Minas Gerais"},{value:"ms",label:"Mato Grosso do Sul"},{value:"mt",label:"Mato Grosso"},{value:"pa",label:"Pará"},{value:"pb",label:"Paraíba"},{value:"pe",label:"Pernambuco"},{value:"pi",label:"Piauí"},{value:"pr",label:"Paraná"},{value:"rj",label:"Rio de Janeiro"},{value:"rn",label:"Rio Grande do Norte"},{value:"ro",label:"Rondônia"},{value:"rr",label:"Roraima"},{value:"rs",label:"Rio Grande do Sul"},{value:"sc",label:"Santa Catarina"},{value:"se",label:"Sergipe"},{value:"sp",label:"São Paulo"},{value:"to",label:"Tocantins"}],m=[{value:"president",label:"Presidente"},{value:"governor",label:"Governador"},{value:"senator",label:"Senador"}],g=[{value:"sao-joao-da-boa-vista",label:"São João da Boa Vista"},{value:"campinas",label:"Campinas"},{value:"sao-paulo",label:"São Paulo"},{value:"sorocaba",label:"Sorocaba"},{value:"santos",label:"Santos"},{value:"guarulhos",label:"Guarulhos"},{value:"ribeirao-preto",label:"Ribeirão Preto"}];let y=U(""),u=U("president"),w=U(null),z=U(null),x=U(!1),b=U(null),E=U(!1),M=U(null),O=U(!1),K=U(null),J=U(void 0),B=U(void 0),Z=U(void 0);Ce(()=>{!r()&&e(y)?(s(w,null),s(z,null),s(x,!0),Fa(e(y)).then(de=>{s(z,de,!0),s(x,!1)}).catch(de=>{console.error("Failed to fetch municipalities:",de),s(x,!1)})):e(y)||(s(w,null),s(z,null))}),Ce(()=>{!r()&&e(y)?(s(b,null),s(E,!0),An(i(),v(),e(y)).then(de=>{s(b,de,!0),s(E,!1)}).catch(de=>{console.error("Failed to fetch counting progress:",de),s(E,!1)})):e(y)||s(b,null)}),Ce(()=>{!r()&&e(y)&&e(u)?(s(M,null),s(O,!0),Za(i(),e(u),v(),e(y)).then(de=>{s(M,de,!0),s(O,!1)}).catch(de=>{console.error("Failed to fetch municipality results:",de),s(O,!1)})):e(y)||s(M,null)});let ae=U(null);Ce(()=>{!r()&&e(y)&&e(u)?(s(ae,null),Dt(i(),{office:e(u),round:v(),state:e(y)}).then(de=>{s(ae,de,!0)}).catch(de=>{console.error("Failed to fetch state results:",de)})):e(y)||s(ae,null)});const D=p(()=>!r()&&e(z)?.municipalities?e(z).municipalities.map(de=>({value:String(de.municipality_id),label:de.name})):r()?g:[]),q=p(()=>c.find(de=>de.value===e(y))?.label??null),$=[{color:"#D9D9D9",label:"0 - 25%"},{color:"#A0A0A0",label:"26 - 60%"},{color:"#5A5A5A",label:"61 - 99%"},{color:"#1C1C1C",label:"100%"}];function X(de){return de.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}const R={"0_25":"#D9D9D9","26_60":"#A0A0A0","61_99":"#5A5A5A",100:"#1C1C1C"},F=[{id:"sao-paulo::sp",color:"#D9D9D9"},{id:"campinas::sp",color:"#A0A0A0"},{id:"santos::sp",color:"#A0A0A0"},{id:"sorocaba::sp",color:"#5A5A5A"},{id:"ribeirao-preto::sp",color:"#1C1C1C"},{id:"sao-jose-dos-campos::sp",color:"#5A5A5A"},{id:"sao-bernardo-do-campo::sp",color:"#A0A0A0"},{id:"guarulhos::sp",color:"#A0A0A0"},{id:"osasco::sp",color:"#5A5A5A"},{id:"sao-joao-da-boa-vista::sp",color:"#1C1C1C"},{id:"maua::sp",color:"#5A5A5A"},{id:"franca::sp",color:"#1C1C1C"}],P=p(()=>{if(!r()&&e(b)?.regions?.length){const de=e(y)||"sp";return e(b).regions.map(ye=>({id:`${X(ye.municipality_name)}::${de}`,color:R[ye.bucket]??"#D9D9D9"}))}return r()?F:[]}),ie={"sao-joao-da-boa-vista::sp":{title:"São Paulo: São João da Boa Vista",footer:`Última atualização: ${Qe}`,items:[{position:"1°",name:"Candidato A",tag:"ABC",tagColor:"#1e3461",avatarColor:"#1e3461",description:"51,8% dos votos válidos"},{position:"2°",name:"Candidato B",tag:"EFG",tagColor:"#166534",avatarColor:"#166534",description:"49,2% dos votos válidos"}]},"campinas::sp":{title:"São Paulo: Campinas",footer:`Última atualização: ${Qe}`,items:[{position:"1°",name:"Candidato A",tag:"ABC",tagColor:"#1e3461",avatarColor:"#1e3461",description:"55,3% dos votos válidos"},{position:"2°",name:"Candidato B",tag:"EFG",tagColor:"#166534",avatarColor:"#166534",description:"44,7% dos votos válidos"}]}},le={"sao-joao-da-boa-vista":{title:"São João da Boa Vista",footer:`Última atualização: ${Qe}`,candidates:[{position:"1°",name:"Candidato A",tag:"ABC",tagColor:"#1e3461",avatarColor:"#1e3461",description:"41,8% dos votos válidos"},{position:"2°",name:"Candidato B",tag:"EFG",tagColor:"#166534",avatarColor:"#166534",description:"41,8% dos votos válidos"}]},campinas:{title:"Campinas",footer:`Última atualização: ${Qe}`,candidates:[{position:"1°",name:"Candidato A",tag:"ABC",tagColor:"#1e3461",avatarColor:"#1e3461",description:"55,3% dos votos válidos"},{position:"2°",name:"Candidato B",tag:"EFG",tagColor:"#166534",avatarColor:"#166534",description:"44,7% dos votos válidos"}]}},I=p(()=>!r()&&e(w)&&e(M)?.municipalities?e(M).municipalities.find(de=>String(de.municipality_id)===e(w))??null:null),ne=p(()=>e(I)?[e(I).leader,e(I).runner_up].filter(Boolean).sort((de,ye)=>ye.valid_votes_pct-de.valid_votes_pct).map((de,ye)=>({position:`${ye+1}°`,name:Be(de.name),photoUrl:de.photo_url,tag:de.party_abbr,tagColor:de.party_color,avatarColor:de.party_color,description:`${de.valid_votes_pct.toFixed(1)}% dos votos válidos`})):[]),_e=p(()=>r()?It:St(e(M)?.last_updated)),ge=p(()=>e(ae)?.candidates?.length?[...e(ae).candidates].sort((de,ye)=>ye.valid_votes_pct-de.valid_votes_pct).slice(0,2).map((de,ye)=>({position:`${ye+1}°`,name:Be(de.ballot_name),photoUrl:de.photo_url,tag:de.party_abbr,tagColor:de.party_color,avatarColor:de.party_color,description:`${de.valid_votes_pct.toFixed(1)}% dos votos válidos`})):[]),fe=p(()=>r()?It:St(e(ae)?.summary?.last_updated)),he=p(()=>r()?e(w)?le[e(w)]??null:null:e(w)?e(I)?{title:e(I).municipality_name,footer:e(_e),candidates:e(ne)}:null:e(ge).length?{title:"",footer:e(fe),candidates:e(ge)}:null),pe=p(()=>r()?It:St(e(b)?.last_updated)),Y=p(()=>e(K)),se=p(()=>r()?e(Y)?ie[e(Y)]??null:null:e(w)?e(I)?{title:`${e(q)}: ${e(I).municipality_name}`,footer:e(_e),items:e(ne)}:null:e(ge).length?{title:`${e(q)}`,footer:e(fe),items:e(ge)}:null);Ce(()=>{if(!e(y)||!e(w)){s(K,null);return}const de=e(D).find(ke=>ke.value===e(w)),ye=de?X(de.label):e(w);s(K,`${ye}::${e(y)}`)});function me(de){const ye=de.cid??"",[ke]=ye.split("::");if(!ke)return;const De=e(D).find(Ie=>X(Ie.label)===ke);De&&s(w,e(w)===De.value?null:De.value,!0)}Ka(()=>{function de(ye){if(!e(w))return;const ke=ye.target;e(J)?.contains(ke)||e(B)?.contains(ke)||e(Z)?.contains(ke)||s(w,null)}return document.addEventListener("mousedown",de),()=>document.removeEventListener("mousedown",de)});var ce=w_();let A;var k=o(ce);Ye(k,{get title(){return _().title},get description(){return _().description},get tag(){return _().tag},get tagColor(){return _().tagColor}});var ee=d(k,2),H=o(ee);Ya(H,{get states(){return c},get meta(){return e(pe)},get value(){return e(y)},set value(de){s(y,de,!0)}});var G=d(ee,2),C=o(G);Re(C,{label:"Busque por estado:",get options(){return c},get icon(){return Ke},iconSize:13,get value(){return e(y)},set value(de){s(y,de,!0)}});var j=d(G,2),te=o(j);va(te,{title:"Porcentagem das urnas apuradas:",get segments(){return $}});var V=d(j,2),ve=o(V);{var S=de=>{var ye=h_(),ke=ze(ye),De=o(ke),Ie=o(De);{let qe=p(()=>e(y)||"sp");pt(Ie,{type:"state",get uf(){return e(qe)},get colors(){return e(P)},onRegionClick:me,selectionStroke:"#00000033"})}tt(De,qe=>s(J,qe),()=>e(J));var $e=d(De,2),Ze=o($e);va(Ze,{title:"Porcentagem das urnas apuradas:",get segments(){return $}});var Te=d(ke,2),We=o(Te);{let qe=p(()=>e(w)?"Você selecionou:":"Busque por Município (opcional)");Re(We,{get label(){return e(qe)},get options(){return e(D)},get icon(){return Ke},iconSize:13,get value(){return e(w)},set value(at){s(w,at,!0)}})}var Bt=d(We,2),Mt=o(Bt);Re(Mt,{label:"Filtrar por",get options(){return m},get icon(){return Ke},iconSize:13,get value(){return e(u)},set value(qe){s(u,qe,!0)}});var Ne=d(Bt,2);{var dt=qe=>{var at=b_(),Et=o(at);{var qt=xt=>{var wt=f_(),Aa=o(wt);T(()=>Q(Aa,`${e(se).title??""}:`)),f(xt,wt)};W(Et,xt=>{e(se).title&&xt(qt)})}var et=d(Et,2);Ee(et,17,()=>e(se).items,Pe,(xt,wt)=>{var Aa=m_(),Mn=o(Aa);bt(Mn,{get name(){return e(wt).name},get photoUrl(){return e(wt).photoUrl},get tag(){return e(wt).tag},get tagColor(){return e(wt).tagColor},get avatarColor(){return e(wt).avatarColor},get description(){return e(wt).description},get position(){return e(wt).position},positionSide:"left",size:"sm",wrapper:!0}),f(xt,Aa)});var Ht=d(et,2);{var pa=xt=>{var wt=g_(),Aa=o(wt);T(()=>Q(Aa,e(se).footer)),f(xt,wt)};W(Ht,xt=>{e(se).footer&&xt(pa)})}f(qe,at)};W(Ne,qe=>{e(se)&&qe(dt)})}var Vt=d(Ne,2);{var Ve=qe=>{hn(qe,{children:(at,Et)=>{var qt=Yt("anuncio");f(at,qt)}})};W(Vt,qe=>{n()&&qe(Ve)})}tt(Te,qe=>s(B,qe),()=>e(B)),f(de,ye)};W(ve,de=>{e(y)&&de(S)})}var oe=d(V,2),N=o(oe);{let de=p(()=>e(w)?"Você selecionou:":"Busque por município (opcional):");Re(N,{get label(){return e(de)},get options(){return e(D)},get icon(){return Ke},iconSize:13,get value(){return e(w)},set value(ye){s(w,ye,!0)}})}var re=d(N,2),ue=o(re);Re(ue,{label:"Filtrar por:",get options(){return m},get icon(){return Ke},iconSize:13,get value(){return e(u)},set value(de){s(u,de,!0)}});var xe=d(re,2);{var we=de=>{var ye=x_(),ke=ze(ye),De=o(ke),Ie=d(ke,2);Ee(Ie,21,()=>e(he).candidates,Pe,(Te,We)=>{bt(Te,{get name(){return e(We).name},get tag(){return e(We).tag},get tagColor(){return e(We).tagColor},get avatarColor(){return e(We).avatarColor},get description(){return e(We).description},get position(){return e(We).position},positionSide:"left",size:"sm"})});var $e=d(Ie,2),Ze=o($e);T(()=>{Q(De,`${e(q)??""}${e(he).title?`: ${e(he).title}`:""}`),Q(Ze,e(he).footer)}),f(de,ye)};W(xe,de=>{e(he)&&de(we)})}tt(oe,de=>s(Z,de),()=>e(Z)),T(()=>A=Ae(ce,1,"sevn_voting_map svelte-uybwj3",null,A,{"sevn_voting_map--raw":l()})),f(a,ce),Le()}var k_=h('<p class="sevn_candidate_counting__status svelte-y9aq23">Carregando...</p>'),S_=h('<p class="sevn_candidate_counting__status sevn_candidate_counting__status--error svelte-y9aq23"> </p>'),z_=h('<div><!> <div class="sevn_candidate_counting__filter-web svelte-y9aq23"><!></div> <div class="sevn_candidate_counting__filter-mobile svelte-y9aq23"><!></div> <!></div>');const A_={hash:"svelte-y9aq23",code:`.sevn_candidate_counting.svelte-y9aq23 {display:flex;flex-direction:column;gap:24px;}.sevn_candidate_counting--raw.svelte-y9aq23,
|
|
582
|
+
.sevn_candidate_counting--raw.svelte-y9aq23 :where(.svelte-y9aq23) {all:revert;}.sevn_candidate_counting__status.svelte-y9aq23 {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_candidate_counting__status--error.svelte-y9aq23 {color:#e11d48;}
|
|
583
|
+
|
|
584
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_candidate_counting__filter-web.svelte-y9aq23 {display:none;}.sevn_candidate_counting.svelte-y9aq23 .dropdown {position:static;margin-top:10px;}
|
|
585
|
+
|
|
586
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
587
|
+
@media (min-width: 768px) {.sevn_candidate_counting__filter-web.svelte-y9aq23 {display:block;}.sevn_candidate_counting__filter-mobile.svelte-y9aq23 {display:none;}
|
|
588
|
+
}`};function M_(a,t){je(t,!0),Me(a,A_);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Evolução da Apuração para Governador",description:"Selecione o estado e veja a apuração em tempo real"})),v=U(null),_=U(!1),c=U(null);const m=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}];let g=U("");Ce(()=>{if(!r()&&e(g)){const D="governor",$=e(g);s(_,!0),s(c,null),s(v,null),vr(n(),D,1,$).then(X=>{$===e(g)&&(s(v,X,!0),s(_,!1))}).catch(X=>{$===e(g)&&(console.error("Failed to fetch timeline data:",X),s(c,"Failed to load data"),s(_,!1))})}else e(g)||s(v,null)});const y=[{position:1,name:"Candidato A",avatarColor:"#d97706",party:"ABC",partyColor:"#d97706",votes:1245890,percent:4.82,evolution:[2,3,4,3.5,4.2,4.8,4.82]},{position:2,name:"Candidato B",avatarColor:"#166534",party:"DEF",partyColor:"#166534",votes:1245890,percent:4.82,evolution:[3,3,4,3.8,3.5,4.5,4.82]},{position:3,name:"Candidato C",avatarColor:"#374151",party:"GHI",partyColor:"#374151",votes:1245890,percent:4.82,evolution:[4,3.5,3,3.2,3.8,4.2,4.82]},{position:4,name:"Candidato D",avatarColor:"#1e3461",party:"JKL",partyColor:"#1e3461",votes:1245890,percent:4.82,evolution:[2,2.5,3.5,4,3.8,4.5,4.82]},{position:5,name:"Candidato E",avatarColor:"#e11d48",party:"MNO",partyColor:"#e11d48",votes:1245890,percent:4.82,evolution:[3,2.8,3.2,3.5,4,4.5,4.82]},{position:6,name:"Candidato F",avatarColor:"#7c2d12",party:"PQR",partyColor:"#7c2d12",votes:1245890,percent:4.82,evolution:[4,3.8,3.2,3,3.5,4.2,4.82]}],u=p(()=>{if(r())return It;const D=e(v)?.snapshots;return St(D?.length?D[D.length-1].timestamp:null)}),w=["Ranking","Candidato","Partido","Votos","%","Evolução"],z=p(()=>{if(!r()&&e(v)?.snapshots&&Array.isArray(e(v).snapshots)&&e(v).snapshots.length>0){const D=e(v).snapshots,q=D[D.length-1];return!q||!e(v).candidates_meta?{candidates:[]}:{candidates:[...q.results].sort((R,F)=>F.valid_votes_pct-R.valid_votes_pct).map((R,F)=>{const P=e(v).candidates_meta.find(le=>le.candidate_id===R.candidate_id),ie=P?.series?.map(le=>parseFloat(le.valid_votes_pct.toFixed(2)))??[];return{position:F+1,name:P?.name?Be(P.name):"Unknown",photoUrl:P?.photo_url,avatarColor:P?.party_color||"var(--sevn-color-primary)",party:P?.party_abbr||"",partyColor:P?.party_color||"var(--sevn-color-primary)",votes:R.votes,percent:parseFloat(R.valid_votes_pct.toFixed(2)),evolution:ie}})}}return r()?{candidates:y}:{candidates:[]}}),x=p(()=>e(z).candidates);var b=z_();let E;var M=o(b);Ye(M,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var O=d(M,2),K=o(O);Ya(K,{get states(){return m},get meta(){return e(u)},get value(){return e(g)},set value(D){s(g,D,!0)}});var J=d(O,2),B=o(J);{let D=p(()=>e(g)?"Você selecionou:":"Selecione o estado:");Re(B,{get label(){return e(D)},get options(){return m},get icon(){return Ke},iconSize:13,get value(){return e(g)},set value(q){s(g,q,!0)}})}var Z=d(J,2);{var ae=D=>{var q=st(),$=ze(q);{var X=P=>{var ie=k_();f(P,ie)},R=P=>{var ie=S_(),le=o(ie);T(()=>Q(le,e(c))),f(P,ie)},F=P=>{xd(P,{get candidates(){return e(x)},get headers(){return w}})};W($,P=>{e(_)?P(X):e(c)?P(R,1):P(F,!1)})}f(D,q)};W(Z,D=>{e(g)&&D(ae)})}T(()=>E=Ae(b,1,"sevn_candidate_counting svelte-y9aq23",null,E,{"sevn_candidate_counting--raw":l()})),f(a,b),Le()}var E_=h('<div class="sevn_party_perf__selection-info svelte-176mhm6"><span class="svelte-176mhm6"><strong class="svelte-176mhm6">Você selecionou:</strong> </span> <span class="sevn_party_perf__selection-meta svelte-176mhm6"> </span></div>'),R_=h('<p class="sevn_party_perf__status svelte-176mhm6">Carregando...</p>'),P_=h('<p class="sevn_party_perf__status sevn_party_perf__status--error svelte-176mhm6"> </p>'),j_=h('<div class="sevn_party_perf__body svelte-176mhm6"><div class="sevn_party_perf__chart-col svelte-176mhm6"><!></div> <div class="sevn_party_perf__ranking-col svelte-176mhm6"><!></div></div>'),L_=h('<div><!> <div class="sevn_party_perf__filters-row-web svelte-176mhm6"><!></div> <div class="sevn_party_perf__filter-web svelte-176mhm6"><!></div> <!> <div class="sevn_party_perf__filters-mobile svelte-176mhm6"><!> <p class="sevn_party_perf__filter-section-label svelte-176mhm6">Filtrar por:</p> <!></div> <!></div>');const D_={hash:"svelte-176mhm6",code:`.sevn_party_perf.svelte-176mhm6 {display:flex;flex-direction:column;gap:24px;}.sevn_party_perf--raw.svelte-176mhm6,
|
|
589
|
+
.sevn_party_perf--raw.svelte-176mhm6 :where(.svelte-176mhm6) {all:revert;}.sevn_party_perf__status.svelte-176mhm6 {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_party_perf__status--error.svelte-176mhm6 {color:#e11d48;}
|
|
590
|
+
|
|
591
|
+
/* ── Web (oculto no mobile) ─────────────────────────── */.sevn_party_perf__filter-web.svelte-176mhm6 {display:none;}.sevn_party_perf__filters-row-web.svelte-176mhm6 {display:none;}
|
|
592
|
+
|
|
593
|
+
/* ── Mobile (visível por padrão) ────────────────────── */.sevn_party_perf__filters-mobile.svelte-176mhm6 {display:flex;flex-direction:column;gap:8px;}.sevn_party_perf__filter-section-label.svelte-176mhm6 {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin:8px 0 0;}.sevn_party_perf__body.svelte-176mhm6 {display:flex;flex-direction:column;gap:24px;}
|
|
594
|
+
|
|
595
|
+
@media (max-width: 767px) {.sevn_party_perf.svelte-176mhm6 .dropdown {position:static;margin-top:10px;}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* ── Info seleção (web only) ────────────────────────── */.sevn_party_perf__selection-info.svelte-176mhm6 {display:none;}
|
|
599
|
+
|
|
600
|
+
/* ── Desktop overrides ──────────────────────────────── */
|
|
601
|
+
@media (min-width: 768px) {.sevn_party_perf__filter-web.svelte-176mhm6 {display:block;}.sevn_party_perf__filters-row-web.svelte-176mhm6 {display:flex;gap:40px;align-items:flex-start;}.sevn_party_perf__filters-mobile.svelte-176mhm6 {display:none;}.sevn_party_perf__selection-info.svelte-176mhm6 {display:flex;align-items:center;gap:16px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.sevn_party_perf__selection-meta.svelte-176mhm6 {font-size:0.75rem;opacity:0.5;}.sevn_party_perf__body.svelte-176mhm6 {flex-direction:row;align-items:flex-start;gap:40px;}.sevn_party_perf__chart-col.svelte-176mhm6 {flex:3;min-width:0;align-self:flex-end;}.sevn_party_perf__ranking-col.svelte-176mhm6 {flex:2;min-width:0;}
|
|
602
|
+
}`};function B_(a,t){je(t,!0),Me(a,D_);let r=L(t,"mock",3,!1),l=L(t,"rawStyle",3,!1),n=L(t,"year",3,2026),i=L(t,"header",19,()=>({title:"Desempenho por Partido (senador/deputado)",description:"Acompanhe a distribuição de votos por partido, comparando desempenho eleitoral, força regional e evolução da apuração em tempo real."})),v=U(null),_=U(!1),c=U(null);const m=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],g=[{value:"federal_deputy",label:"Deputado Federal"},{value:"state_deputy",label:"Deputado Estadual"},{value:"senator",label:"Senador"}];let y=U(null),u=U(He(g[0].value));const w={federal_deputy:"federal_deputy",state_deputy:"state_deputy",senator:"senator"};Ce(()=>{if(!r()&&e(y)&&e(u).trim()){const Y=w[e(u)]||"federal_deputy";s(_,!0),s(c,null),s(v,null),Uc(n(),Y,1,e(y)).then(se=>{s(v,se,!0),s(_,!1)}).catch(se=>{console.error("Failed to fetch party results:",se),s(c,"Failed to load data"),s(_,!1)})}});let z=p(()=>m.find(Y=>Y.value===e(y))?.label??null);const x=[{label:"Partido ABC",value:32,color:"#166534"},{label:"Partido DEF",value:24,color:"#d97706"},{label:"Partido GHI",value:11,color:"#1e3461"},{label:"Partido JKL",value:8,color:"#1C1C1C"},{label:"Partido MNO",value:20,color:"#e11d48"},{label:"Partido PQR",value:5,color:"#15803d"},{label:"Partido STU",value:3,color:"#dc2626"},{label:"Partido VWX",value:2,color:"#7c2d12"}],b=[{position:1,tag:"ABC",tagColor:"#166534",votes:20526},{position:2,tag:"DEF",tagColor:"#d97706",votes:18022},{position:3,tag:"GHI",tagColor:"#1e3461",votes:13302},{position:4,tag:"JKL",tagColor:"#1C1C1C",votes:13257},{position:5,tag:"MNO",tagColor:"#e11d48",votes:11789},{position:6,tag:"PQR",tagColor:"#15803d",votes:11647},{position:7,tag:"STU",tagColor:"#dc2626",votes:9526},{position:8,tag:"VWX",tagColor:"#7c2d12",votes:7478}],E=p(()=>{if(!r()&&e(v)?.parties&&Array.isArray(e(v).parties)){const Y=[...e(v).parties].sort((ce,A)=>A.votes-ce.votes),se=Y.map(ce=>({label:`Partido ${ce.party_abbr||""}`,value:ce.pct_with_blank_null??0,color:ce.party_color||"#ccc"})),me=Y.map((ce,A)=>({position:A+1,tag:ce.party_abbr||"",tagColor:ce.party_color||"#ccc",votes:ce.votes??0}));return{barItems:se,rankingItems:me}}return r()?{barItems:x,rankingItems:b}:{barItems:[],rankingItems:[]}}),M=p(()=>r()?It:St(e(v)?.last_updated)),O=p(()=>e(E).barItems),K=p(()=>e(E).rankingItems);let J=U(!1),B=p(()=>e(J)?4:6),Z=p(()=>e(J)?80:86),ae=U(0),D=p(()=>Math.max(e(ae)-64,150));Ka(()=>{const Y=window.matchMedia("(max-width: 480px)");s(J,Y.matches,!0);const se=me=>{s(J,me.matches,!0)};return Y.addEventListener("change",se),()=>Y.removeEventListener("change",se)});var q=L_();let $;var X=o(q);Ye(X,{get title(){return i().title},get description(){return i().description},get tag(){return i().tag},get tagColor(){return i().tagColor}});var R=d(X,2),F=o(R);Jt(F,{label:"Cargo",get options(){return g},get value(){return e(u)},set value(Y){s(u,Y,!0)}});var P=d(R,2),ie=o(P);Ya(ie,{get states(){return m},showDescriptionSelection:!1,get meta(){return e(M)},get value(){return e(y)},set value(Y){s(y,Y,!0)}});var le=d(P,2);{var I=Y=>{var se=E_(),me=o(se),ce=d(o(me)),A=d(me,2),k=o(A);T(()=>{Q(ce,` ${e(z)??""}`),Q(k,e(M))}),f(Y,se)};W(le,Y=>{e(z)&&Y(I)})}var ne=d(le,2),_e=o(ne);{let Y=p(()=>e(y)?"Você selecionou:":"Selecione o estado:");Re(_e,{get label(){return e(Y)},get options(){return m},get icon(){return Ke},iconSize:13,get value(){return e(y)},set value(se){s(y,se,!0)}})}var ge=d(_e,4);Re(ge,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return g},get value(){return e(u)},set value(Y){s(u,Y,!0)}});var fe=d(ne,2);{var he=Y=>{var se=st(),me=ze(se);{var ce=ee=>{var H=R_();f(ee,H)},A=ee=>{var H=P_(),G=o(H);T(()=>Q(G,e(c))),f(ee,H)},k=ee=>{var H=j_(),G=o(H),C=o(G);xn(C,{get items(){return e(O)},unit:"%",get trackHeight(){return e(D)},get visibleCount(){return e(B)},get colWidth(){return e(Z)}});var j=d(G,2),te=o(j);Nv(te,{get items(){return e(K)}}),Nr(j,"clientHeight",V=>s(ae,V)),f(ee,H)};W(me,ee=>{e(_)?ee(ce):e(c)?ee(A,1):ee(k,!1)})}f(Y,se)},pe=p(()=>e(y)&&e(u).trim());W(fe,Y=>{e(pe)&&Y(he)})}T(()=>$=Ae(q,1,"sevn_party_perf svelte-176mhm6",null,$,{"sevn_party_perf--raw":l()})),f(a,q),Le()}const q_={applyKey:mn,configure(a){so(a),a.theme&&Er(a.theme)},getConfig:Xa,isReady:gn,assetUrl:dr,setTheme(a){so({theme:a}),Er(a)},activeHost:Oc},F_=Xe(yc,"FinalResults"),T_=Xe(Rc,"StateWinners"),O_=Xe(Dc,"VoteCountingProgress"),G_=Xe(Zc,"VoteComparisonByRound"),I_=Xe(su,"CountingProgress"),U_=Xe(bu,"StateLeaders"),N_=Xe(yu,"CurrentLeader"),V_=Xe(Mu,"TopDispute"),H_=Xe(Lu,"CandidateRanking"),W_=Xe(Tu,"LiveSummary"),J_=Xe(Hu,"CandidatePerformanceByMunicipality"),K_=Xe($u,"RoundResultsAnalysis"),X_=Xe(np,"ElectionStatus"),Y_=Xe(vp,"CandidateResultsByMunicipality"),Z_=Xe(_p,"MunicipalityPerfomanceMap"),Q_=Xe(wp,"CandidateByState"),$_=Xe(Ap,"CandidateCarrouselStateResultsViewer"),ef=Xe(Lp,"CandidateDuelStateResultViewer"),tf=Xe(Up,"CandidateMapByState"),af=Xe(Xp,"ElectionRoundAnalysis"),rf=Xe(s_,"CandidateMultiRingChartPerformanceByMunicipality"),of=Xe(__,"ResultsByOffice"),nf=Xe(C_,"VotingMap"),lf=Xe(M_,"CandidateCountingProgress"),sf=Xe(B_,"PartyPerformance");exports.CandidateByState=Q_;exports.CandidateCarrouselStateResultsViewer=$_;exports.CandidateCountingProgress=lf;exports.CandidateDuelStateResultViewer=ef;exports.CandidateMapByState=tf;exports.CandidateMultiRingChartPerformanceByMunicipality=rf;exports.CandidatePerformanceByMunicipality=J_;exports.CandidateRanking=H_;exports.CandidateResultsByMunicipality=Y_;exports.Core=q_;exports.CountingProgress=I_;exports.CurrentLeader=N_;exports.ElectionRoundAnalysis=af;exports.ElectionStatus=X_;exports.FinalResults=F_;exports.LiveSummary=W_;exports.MunicipalityPerfomanceMap=Z_;exports.PartyPerformance=sf;exports.ResultsByOffice=of;exports.RoundResultsAnalysis=K_;exports.SevnKeyMissingError=un;exports.SevnNetworkError=pn;exports.StateLeaders=U_;exports.StateWinners=T_;exports.TopDispute=V_;exports.VoteComparisonByRound=G_;exports.VoteCountingProgress=O_;exports.VotingMap=nf;
|
|
603
|
+
//# sourceMappingURL=index.cjs.map
|