@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(function(C,q){typeof exports=="object"&&typeof module<"u"?module.exports=q():typeof define=="function"&&define.amd?define(q):(C=typeof globalThis<"u"?globalThis:C||self,C.LiveSummary=q())})(this,(function(){"use strict";var Qs=Object.defineProperty;var ci=C=>{throw TypeError(C)};var $s=(C,q,B)=>q in C?Qs(C,q,{enumerable:!0,configurable:!0,writable:!0,value:B}):C[q]=B;var Ne=(C,q,B)=>$s(C,typeof q!="symbol"?q+"":q,B),Zn=(C,q,B)=>q.has(C)||ci("Cannot "+B);var u=(C,q,B)=>(Zn(C,q,"read from private field"),B?B.call(C):q.get(C)),x=(C,q,B)=>q.has(C)?ci("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(C):q.set(C,B),y=(C,q,B,Qt)=>(Zn(C,q,"write to private field"),Qt?Qt.call(C,B):q.set(C,B),B),G=(C,q,B)=>(Zn(C,q,"access private method"),B);var qt,Mt,lt,Nt,Wt,Kt,ft,Fe,jt,se,Gn,Xn,Jn,vi,Se,Dn,Pe,ut,ke,Ae,oe,qe,De,ct,Ge,Rt,Lt,Ot,Ie,un,Z,eo,to,Qn,vn,dn,$n,Ee,Me,le,vt,Yt,Zt,cn,ui;const C="__sevnElectionsState_v1__",q=globalThis;function B(e){return q[C]||(q[C]={config:e(),transport:{activeIndex:0,pinnedAt:0}}),q[C]}const Qt="https://failover-api.sevntech.com",di=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function er(){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 hi=er;function Ft(){return B(er)}function _i(e){return[`https://${e}-api1.sevnelections.com`,`https://${e}-api2.sevnelections.com`,Qt]}function hn(e){if(typeof e!="string"||!di.test(e))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(e)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const t=Ft();t.config.key=e,t.config.apiHosts=_i(e)}function tr(e){const{cache:t,request:n,key:r,...i}=e,a=Ft();a.config={...a.config,...i,cache:{...a.config.cache,...t},request:{...a.config.request,...n}},r&&(hn(r),i.apiHosts&&(a.config.apiHosts=i.apiHosts))}function _n(){return Ft().config}function pi(){return Ft().config.apiHosts.length>0}function gi(e){const{assetsBase:t,assetsVersion:n}=Ft().config,r=t.replace(/\/+$/,""),i=String(e).replace(/^\/+/,"");return`${r}/${n}/${i}`}const mi=':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}',pt=typeof window<"u"&&typeof document<"u",nr="data-sevn-tokens",rr="data-sevn-theme",ir={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 wi(){if(!pt||document.querySelector(`style[${nr}]`))return;const e=document.createElement("style");e.setAttribute(nr,""),e.textContent=mi,document.head.prepend(e);const t=_n().theme;t&&pn(t)}function pn(e){if(!pt)return;const t=Object.keys(ir).filter(r=>e[r]).map(r=>` ${ir[r]}: ${e[r]};`);if(t.length===0)return;let n=document.querySelector(`style[${rr}]`);n||(n=document.createElement("style"),n.setAttribute(rr,""),document.head.appendChild(n)),n.textContent=`:root {
|
|
2
|
+
${t.join(`
|
|
3
|
+
`)}
|
|
4
|
+
}`}function yi(){return B(hi).transport}function bi(){return _n().apiHosts[yi().activeIndex]??null}const xi={applyKey:hn,configure(e){tr(e),e.theme&&pn(e.theme)},getConfig:_n,isReady:pi,assetUrl:gi,setTheme(e){tr({theme:e}),pn(e)},activeHost:bi},gn=!1;var ar=Array.isArray,Si=Array.prototype.indexOf,gt=Array.prototype.includes,$t=Array.from,Ei=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,Ci=Object.getOwnPropertyDescriptors,zi=Object.prototype,Ti=Array.prototype,sr=Object.getPrototypeOf,or=Object.isExtensible;const ki=()=>{};function Ai(e){for(var t=0;t<e.length;t++)e[t]()}function lr(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const X=2,Pt=4,en=8,fr=1<<24,je=16,pe=32,Je=64,mn=128,ue=512,K=1024,J=2048,ge=4096,ie=8192,Re=16384,Qe=32768,wt=65536,ur=1<<17,cr=1<<18,yt=1<<19,qi=1<<20,Ve=1<<25,$e=65536,wn=1<<21,yn=1<<22,Be=1<<23,tn=Symbol("$state"),Mi=Symbol("legacy props"),Ni=Symbol(""),et=new class extends Error{constructor(){super(...arguments);Ne(this,"name","StaleReactionError");Ne(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ji(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ri(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Li(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Oi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Fi(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Pi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Di(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ii(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ui(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Vi(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Bi=1,Wi=2,Ki=16,Yi=1,Zi=4,Gi=8,Xi=16,Ji=1,Qi=2,Q=Symbol(),vr="http://www.w3.org/1999/xhtml";function $i(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function dr(e){return e===this.v}function ea(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function hr(e){return!ea(e,this.v)}let ta=!1,ce=null;function bt(e){ce=e}function bn(e,t=!1,n){ce={p:ce,i:!1,c:null,e:null,s:e,x:null,l:null}}function xn(e){var t=ce,n=t.e;if(n!==null){t.e=null;for(var r of n)Or(r)}return t.i=!0,ce=t.p,{}}function _r(){return!0}let xt=[];function na(){var e=xt;xt=[],Ai(e)}function tt(e){if(xt.length===0){var t=xt;queueMicrotask(()=>{t===xt&&na()})}xt.push(e)}function pr(e){var t=z;if(t===null)return b.f|=Be,e;if((t.f&Qe)===0&&(t.f&Pt)===0)throw e;St(e,t)}function St(e,t){for(;t!==null;){if((t.f&mn)!==0){if((t.f&Qe)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const ra=-7169;function U(e,t){e.f=e.f&ra|t}function Sn(e){(e.f&ue)!==0||e.deps===null?U(e,K):U(e,ge)}function gr(e){if(e!==null)for(const t of e)(t.f&X)===0||(t.f&$e)===0||(t.f^=$e,gr(t.deps))}function mr(e,t,n){(e.f&J)!==0?t.add(e):(e.f&ge)!==0&&n.add(e),gr(e.deps),U(e,K)}const nn=new Set;let L=null,me=null,ve=[],En=null,Cn=!1;const Pn=class Pn{constructor(){x(this,se);Ne(this,"committed",!1);Ne(this,"current",new Map);Ne(this,"previous",new Map);x(this,qt,new Set);x(this,Mt,new Set);x(this,lt,0);x(this,Nt,0);x(this,Wt,null);x(this,Kt,new Set);x(this,ft,new Set);x(this,Fe,new Map);Ne(this,"is_fork",!1);x(this,jt,!1)}skip_effect(t){u(this,Fe).has(t)||u(this,Fe).set(t,{d:[],m:[]})}unskip_effect(t){var n=u(this,Fe).get(t);if(n){u(this,Fe).delete(t);for(var r of n.d)U(r,J),we(r);for(r of n.m)U(r,ge),we(r)}}process(t){ve=[],this.apply();var n=[],r=[];for(const i of t)G(this,se,Xn).call(this,i,n,r);if(G(this,se,Gn).call(this)){G(this,se,Jn).call(this,r),G(this,se,Jn).call(this,n);for(const[i,a]of u(this,Fe))xr(i,a)}else{for(const i of u(this,qt))i();u(this,qt).clear(),u(this,lt)===0&&G(this,se,vi).call(this),L=null,wr(r),wr(n),u(this,Wt)?.resolve()}me=null}capture(t,n){n!==Q&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&Be)===0&&(this.current.set(t,t.v),me?.set(t,t.v))}activate(){L=this,this.apply()}deactivate(){L===this&&(L=null,me=null)}flush(){if(this.activate(),ve.length>0){if(ia(),L!==null&&L!==this)return}else u(this,lt)===0&&this.process([]);this.deactivate()}discard(){for(const t of u(this,Mt))t(this);u(this,Mt).clear()}increment(t){y(this,lt,u(this,lt)+1),t&&y(this,Nt,u(this,Nt)+1)}decrement(t){y(this,lt,u(this,lt)-1),t&&y(this,Nt,u(this,Nt)-1),!u(this,jt)&&(y(this,jt,!0),tt(()=>{y(this,jt,!1),G(this,se,Gn).call(this)?ve.length>0&&this.flush():this.revive()}))}revive(){for(const t of u(this,Kt))u(this,ft).delete(t),U(t,J),we(t);for(const t of u(this,ft))U(t,ge),we(t);this.flush()}oncommit(t){u(this,qt).add(t)}ondiscard(t){u(this,Mt).add(t)}settled(){return(u(this,Wt)??y(this,Wt,lr())).promise}static ensure(){if(L===null){const t=L=new Pn;nn.add(L),tt(()=>{L===t&&t.flush()})}return L}apply(){}};qt=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Nt=new WeakMap,Wt=new WeakMap,Kt=new WeakMap,ft=new WeakMap,Fe=new WeakMap,jt=new WeakMap,se=new WeakSet,Gn=function(){return this.is_fork||u(this,Nt)>0},Xn=function(t,n,r){t.f^=K;for(var i=t.first;i!==null;){var a=i.f,s=(a&(pe|Je))!==0,o=s&&(a&K)!==0,l=o||(a&ie)!==0||u(this,Fe).has(i);if(!l&&i.fn!==null){s?i.f^=K:(a&Pt)!==0?n.push(i):Ht(i)&&((a&je)!==0&&u(this,ft).add(i),Ct(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var d=i.next;if(d!==null){i=d;break}i=i.parent}}},Jn=function(t){for(var n=0;n<t.length;n+=1)mr(t[n],u(this,Kt),u(this,ft))},vi=function(){var i;if(nn.size>1){this.previous.clear();var t=me,n=!0;for(const a of nn){if(a===this){n=!1;continue}const s=[];for(const[l,f]of this.current){if(a.current.has(l))if(n&&f!==a.current.get(l))a.current.set(l,f);else continue;s.push(l)}if(s.length===0)continue;const o=[...a.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){var r=ve;ve=[];const l=new Set,f=new Map;for(const d of s)yr(d,o,l,f);if(ve.length>0){L=a,a.apply();for(const d of ve)G(i=a,se,Xn).call(i,d,[],[]);a.deactivate()}ve=r}}L=null,me=t}this.committed=!0,nn.delete(this)};let We=Pn;function ia(){Cn=!0;var e=null;try{for(var t=0;ve.length>0;){var n=We.ensure();if(t++>1e3){var r,i;aa()}n.process(ve),Ke.clear()}}finally{ve=[],Cn=!1,En=null}}function aa(){try{Pi()}catch(e){St(e,En)}}let Le=null;function wr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Re|ie))===0&&Ht(r)&&(Le=new Set,Ct(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Pr(r),Le?.size>0)){Ke.clear();for(const i of Le){if((i.f&(Re|ie))!==0)continue;const a=[i];let s=i.parent;for(;s!==null;)Le.has(s)&&(Le.delete(s),a.push(s)),s=s.parent;for(let o=a.length-1;o>=0;o--){const l=a[o];(l.f&(Re|ie))===0&&Ct(l)}}Le.clear()}}Le=null}}function yr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;(a&X)!==0?yr(i,t,n,r):(a&(yn|je))!==0&&(a&J)===0&&br(i,t,r)&&(U(i,J),we(i))}}function br(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(gt.call(t,i))return!0;if((i.f&X)!==0&&br(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function we(e){var t=En=e,n=t.b;if(n?.is_pending&&(e.f&(Pt|en|fr))!==0&&(e.f&Qe)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Cn&&t===z&&(r&je)!==0&&(r&cr)===0&&(r&Qe)!==0)return;if((r&(Je|pe))!==0){if((r&K)===0)return;t.f^=K}}ve.push(t)}function xr(e,t){if(!((e.f&pe)!==0&&(e.f&K)!==0)){(e.f&J)!==0?t.d.push(e):(e.f&ge)!==0&&t.m.push(e),U(e,K);for(var n=e.first;n!==null;)xr(n,t),n=n.next}}function sa(e){let t=0,n=nt(0),r;return()=>{qn()&&(p(n),Ta(()=>(t===0&&(r=Jr(()=>e(()=>Dt(n)))),t+=1,()=>{tt(()=>{t-=1,t===0&&(r?.(),r=void 0,Dt(n))})})))}}var oa=wt|yt;function la(e,t,n){new fa(e,t,n)}class fa{constructor(t,n,r){x(this,Z);Ne(this,"parent");Ne(this,"is_pending",!1);x(this,Se);x(this,Dn,null);x(this,Pe);x(this,ut);x(this,ke);x(this,Ae,null);x(this,oe,null);x(this,qe,null);x(this,De,null);x(this,ct,0);x(this,Ge,0);x(this,Rt,!1);x(this,Lt,new Set);x(this,Ot,new Set);x(this,Ie,null);x(this,un,sa(()=>(y(this,Ie,nt(u(this,ct))),()=>{y(this,Ie,null)})));y(this,Se,t),y(this,Pe,n),y(this,ut,i=>{var a=z;a.b=this,a.f|=mn,r(i)}),this.parent=z.b,y(this,ke,Mn(()=>{G(this,Z,Qn).call(this)},oa))}defer_effect(t){mr(t,u(this,Lt),u(this,Ot))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!u(this,Pe).pending}update_pending_count(t){G(this,Z,$n).call(this,t),y(this,ct,u(this,ct)+t),!(!u(this,Ie)||u(this,Rt))&&(y(this,Rt,!0),tt(()=>{y(this,Rt,!1),u(this,Ie)&&Et(u(this,Ie),u(this,ct))}))}get_effect_pending(){return u(this,un).call(this),p(u(this,Ie))}error(t){var n=u(this,Pe).onerror;let r=u(this,Pe).failed;if(!n&&!r)throw t;u(this,Ae)&&(ne(u(this,Ae)),y(this,Ae,null)),u(this,oe)&&(ne(u(this,oe)),y(this,oe,null)),u(this,qe)&&(ne(u(this,qe)),y(this,qe,null));var i=!1,a=!1;const s=()=>{if(i){$i();return}i=!0,a&&Vi(),u(this,qe)!==null&&at(u(this,qe),()=>{y(this,qe,null)}),G(this,Z,dn).call(this,()=>{We.ensure(),G(this,Z,Qn).call(this)})};tt(()=>{try{a=!0,n?.(t,s),a=!1}catch(o){St(o,u(this,ke)&&u(this,ke).parent)}r&&y(this,qe,G(this,Z,dn).call(this,()=>{We.ensure();try{return be(()=>{var o=z;o.b=this,o.f|=mn,r(u(this,Se),()=>t,()=>s)})}catch(o){return St(o,u(this,ke).parent),null}}))})}}Se=new WeakMap,Dn=new WeakMap,Pe=new WeakMap,ut=new WeakMap,ke=new WeakMap,Ae=new WeakMap,oe=new WeakMap,qe=new WeakMap,De=new WeakMap,ct=new WeakMap,Ge=new WeakMap,Rt=new WeakMap,Lt=new WeakMap,Ot=new WeakMap,Ie=new WeakMap,un=new WeakMap,Z=new WeakSet,eo=function(){try{y(this,Ae,be(()=>u(this,ut).call(this,u(this,Se))))}catch(t){this.error(t)}},to=function(){const t=u(this,Pe).pending;t&&(this.is_pending=!0,y(this,oe,be(()=>t(u(this,Se)))),tt(()=>{var n=y(this,De,document.createDocumentFragment()),r=it();n.append(r),y(this,Ae,G(this,Z,dn).call(this,()=>(We.ensure(),be(()=>u(this,ut).call(this,r))))),u(this,Ge)===0&&(u(this,Se).before(n),y(this,De,null),at(u(this,oe),()=>{y(this,oe,null)}),G(this,Z,vn).call(this))}))},Qn=function(){try{if(this.is_pending=this.has_pending_snippet(),y(this,Ge,0),y(this,ct,0),y(this,Ae,be(()=>{u(this,ut).call(this,u(this,Se))})),u(this,Ge)>0){var t=y(this,De,document.createDocumentFragment());Hr(u(this,Ae),t);const n=u(this,Pe).pending;y(this,oe,be(()=>n(u(this,Se))))}else G(this,Z,vn).call(this)}catch(n){this.error(n)}},vn=function(){this.is_pending=!1;for(const t of u(this,Lt))U(t,J),we(t);for(const t of u(this,Ot))U(t,ge),we(t);u(this,Lt).clear(),u(this,Ot).clear()},dn=function(t){var n=z,r=b,i=ce;Te(u(this,ke)),de(u(this,ke)),bt(u(this,ke).ctx);try{return t()}catch(a){return pr(a),null}finally{Te(n),de(r),bt(i)}},$n=function(t){var n;if(!this.has_pending_snippet()){this.parent&&G(n=this.parent,Z,$n).call(n,t);return}y(this,Ge,u(this,Ge)+t),u(this,Ge)===0&&(G(this,Z,vn).call(this),u(this,oe)&&at(u(this,oe),()=>{y(this,oe,null)}),u(this,De)&&(u(this,Se).before(u(this,De)),y(this,De,null)))};function ua(e,t,n,r){const i=rn;var a=e.filter(v=>!v.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var s=L,o=z,l=ca(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(v=>v.promise)):null;function d(v){l();try{r(v)}catch(_){(o.f&Re)===0&&St(_,o)}s?.deactivate(),zn()}if(n.length===0){f.then(()=>d(t.map(i)));return}function h(){l(),Promise.all(n.map(v=>da(v))).then(v=>d([...t.map(i),...v])).catch(v=>St(v,o))}f?f.then(h):h()}function ca(){var e=z,t=b,n=ce,r=L;return function(a=!0){Te(e),de(t),bt(n),a&&r?.activate()}}function zn(){Te(null),de(null),bt(null)}function va(){var e=z.b,t=L,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function rn(e){var t=X|J,n=b!==null&&(b.f&X)!==0?b:null;return z!==null&&(z.f|=yt),{ctx:ce,deps:null,effects:null,equals:dr,f:t,fn:e,reactions:null,rv:0,v:Q,wv:0,parent:n??z,ac:null}}function da(e,t,n){z===null&&ji();var i=void 0,a=nt(Q),s=!b,o=new Map;return za(()=>{var l=lr();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{f===L&&f.committed&&f.deactivate(),zn()})}catch(v){l.reject(v),zn()}var f=L;if(s){var d=va();o.get(f)?.reject(et),o.delete(f),o.set(f,l)}const h=(v,_=void 0)=>{if(f.activate(),_)_!==et&&(a.f|=Be,Et(a,_));else{(a.f&Be)!==0&&(a.f^=Be),Et(a,v);for(const[c,w]of o){if(o.delete(c),c===f)break;w.reject(et)}}d&&d()};l.promise.then(h,v=>h(null,v||"unknown"))}),Lr(()=>{for(const l of o.values())l.reject(et)}),new Promise(l=>{function f(d){function h(){d===i?l(a):f(i)}d.then(h,h)}f(i)})}function F(e){const t=rn(e);return Vr(t),t}function Sr(e){const t=rn(e);return t.equals=hr,t}function ha(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ne(t[n])}}function _a(e){for(var t=e.parent;t!==null;){if((t.f&X)===0)return(t.f&Re)===0?t:null;t=t.parent}return null}function Tn(e){var t,n=z;Te(_a(e));try{e.f&=~$e,ha(e),t=Zr(e)}finally{Te(n)}return t}function Er(e){var t=Tn(e);if(!e.equals(t)&&(e.wv=Kr(),(!L?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){U(e,K);return}Ye||(me!==null?(qn()||L?.is_fork)&&me.set(e,t):Sn(e))}function pa(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(et),t.teardown=ki,t.ac=null,Ut(t,0),Nn(t))}function Cr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ct(t)}let kn=new Set;const Ke=new Map;let zr=!1;function nt(e,t){var n={f:0,v:e,reactions:null,equals:dr,rv:0,wv:0};return n}function ze(e,t){const n=nt(e);return Vr(n),n}function ga(e,t=!1,n=!0){const r=nt(e);return t||(r.equals=hr),r}function ye(e,t,n=!1){b!==null&&(!xe||(b.f&ur)!==0)&&_r()&&(b.f&(X|je|yn|ur))!==0&&(he===null||!gt.call(he,e))&&Ui();let r=n?rt(t):t;return Et(e,r)}function Et(e,t){if(!e.equals(t)){var n=e.v;Ye?Ke.set(e,t):Ke.set(e,n),e.v=t;var r=We.ensure();if(r.capture(e,n),(e.f&X)!==0){const i=e;(e.f&J)!==0&&Tn(i),Sn(i)}e.wv=Kr(),Tr(e,J),z!==null&&(z.f&K)!==0&&(z.f&(pe|Je))===0&&(_e===null?qa([e]):_e.push(e)),!r.is_fork&&kn.size>0&&!zr&&ma()}return t}function ma(){zr=!1;for(const e of kn)(e.f&K)!==0&&U(e,ge),Ht(e)&&Ct(e);kn.clear()}function Dt(e){ye(e,e.v+1)}function Tr(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var a=n[i],s=a.f,o=(s&J)===0;if(o&&U(a,t),(s&X)!==0){var l=a;me?.delete(l),(s&$e)===0&&(s&ue&&(a.f|=$e),Tr(l,ge))}else o&&((s&je)!==0&&Le!==null&&Le.add(a),we(a))}}function rt(e){if(typeof e!="object"||e===null||tn in e)return e;const t=sr(e);if(t!==zi&&t!==Ti)return e;var n=new Map,r=ar(e),i=ze(0),a=ot,s=o=>{if(ot===a)return o();var l=b,f=ot;de(null),Wr(a);var d=o();return de(l),Wr(f),d};return r&&n.set("length",ze(e.length)),new Proxy(e,{defineProperty(o,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ii();var d=n.get(l);return d===void 0?s(()=>{var h=ze(f.value);return n.set(l,h),h}):ye(d,f.value,!0),!0},deleteProperty(o,l){var f=n.get(l);if(f===void 0){if(l in o){const d=s(()=>ze(Q));n.set(l,d),Dt(i)}}else ye(f,Q),Dt(i);return!0},get(o,l,f){if(l===tn)return e;var d=n.get(l),h=l in o;if(d===void 0&&(!h||mt(o,l)?.writable)&&(d=s(()=>{var _=rt(h?o[l]:Q),c=ze(_);return c}),n.set(l,d)),d!==void 0){var v=p(d);return v===Q?void 0:v}return Reflect.get(o,l,f)},getOwnPropertyDescriptor(o,l){var f=Reflect.getOwnPropertyDescriptor(o,l);if(f&&"value"in f){var d=n.get(l);d&&(f.value=p(d))}else if(f===void 0){var h=n.get(l),v=h?.v;if(h!==void 0&&v!==Q)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return f},has(o,l){if(l===tn)return!0;var f=n.get(l),d=f!==void 0&&f.v!==Q||Reflect.has(o,l);if(f!==void 0||z!==null&&(!d||mt(o,l)?.writable)){f===void 0&&(f=s(()=>{var v=d?rt(o[l]):Q,_=ze(v);return _}),n.set(l,f));var h=p(f);if(h===Q)return!1}return d},set(o,l,f,d){var h=n.get(l),v=l in o;if(r&&l==="length")for(var _=f;_<h.v;_+=1){var c=n.get(_+"");c!==void 0?ye(c,Q):_ in o&&(c=s(()=>ze(Q)),n.set(_+"",c))}if(h===void 0)(!v||mt(o,l)?.writable)&&(h=s(()=>ze(void 0)),ye(h,rt(f)),n.set(l,h));else{v=h.v!==Q;var w=s(()=>rt(f));ye(h,w)}var m=Reflect.getOwnPropertyDescriptor(o,l);if(m?.set&&m.set.call(d,f),!v){if(r&&typeof l=="string"){var j=n.get("length"),g=Number(l);Number.isInteger(g)&&g>=j.v&&ye(j,g+1)}Dt(i)}return!0},ownKeys(o){p(i);var l=Reflect.ownKeys(o).filter(h=>{var v=n.get(h);return v===void 0||v.v!==Q});for(var[f,d]of n)d.v!==Q&&!(f in o)&&l.push(f);return l},setPrototypeOf(){Hi()}})}var kr,Ar,qr,Mr;function wa(){if(kr===void 0){kr=window,Ar=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;qr=mt(t,"firstChild").get,Mr=mt(t,"nextSibling").get,or(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),or(n)&&(n.__t=void 0)}}function it(e=""){return document.createTextNode(e)}function an(e){return qr.call(e)}function It(e){return Mr.call(e)}function S(e,t){return an(e)}function Nr(e,t=!1){{var n=an(e);return n instanceof Comment&&n.data===""?It(n):n}}function P(e,t=1,n=!1){let r=e;for(;t--;)r=It(r);return r}function ya(e){e.textContent=""}function jr(){return!1}function Rr(e,t,n){return document.createElementNS(vr,e,void 0)}function An(e){var t=b,n=z;de(null),Te(null);try{return e()}finally{de(t),Te(n)}}function ba(e){z===null&&(b===null&&Fi(),Oi()),Ye&&Li()}function xa(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Oe(e,t,n){var r=z;r!==null&&(r.f&ie)!==0&&(e|=ie);var i={ctx:ce,deps:null,nodes:null,f:e|J|ue,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{Ct(i)}catch(o){throw ne(i),o}else t!==null&&we(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&yt)===0&&(a=a.first,(e&je)!==0&&(e&wt)!==0&&a!==null&&(a.f|=wt)),a!==null&&(a.parent=r,r!==null&&xa(a,r),b!==null&&(b.f&X)!==0&&(e&Je)===0)){var s=b;(s.effects??(s.effects=[])).push(a)}return i}function qn(){return b!==null&&!xe}function Lr(e){const t=Oe(en,null,!1);return U(t,K),t.teardown=e,t}function Sa(e){ba();var t=z.f,n=!b&&(t&pe)!==0&&(t&Qe)===0;if(n){var r=ce;(r.e??(r.e=[])).push(e)}else return Or(e)}function Or(e){return Oe(Pt|qi,e,!1)}function Ea(e){We.ensure();const t=Oe(Je|yt,e,!0);return(n={})=>new Promise(r=>{n.outro?at(t,()=>{ne(t),r(void 0)}):(ne(t),r(void 0))})}function Ca(e){return Oe(Pt,e,!1)}function za(e){return Oe(yn|yt,e,!0)}function Ta(e,t=0){return Oe(en|t,e,!0)}function H(e,t=[],n=[],r=[]){ua(r,t,n,i=>{Oe(en,()=>e(...i.map(p)),!0)})}function Mn(e,t=0){var n=Oe(je|t,e,!0);return n}function be(e){return Oe(pe|yt,e,!0)}function Fr(e){var t=e.teardown;if(t!==null){const n=Ye,r=b;Ur(!0),de(null);try{t.call(null)}finally{Ur(n),de(r)}}}function Nn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&An(()=>{i.abort(et)});var r=n.next;(n.f&Je)!==0?n.parent=null:ne(n,t),n=r}}function ka(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&pe)===0&&ne(t),t=n}}function ne(e,t=!0){var n=!1;(t||(e.f&cr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Aa(e.nodes.start,e.nodes.end),n=!0),Nn(e,t&&!n),Ut(e,0),U(e,Re);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Fr(e);var i=e.parent;i!==null&&i.first!==null&&Pr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Aa(e,t){for(;e!==null;){var n=e===t?null:It(e);e.remove(),e=n}}function Pr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function at(e,t,n=!0){var r=[];Dr(e,r,!0);var i=()=>{n&&ne(e),t&&t()},a=r.length;if(a>0){var s=()=>--a||i();for(var o of r)o.out(s)}else i()}function Dr(e,t,n){if((e.f&ie)===0){e.f^=ie;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var a=i.next,s=(i.f&wt)!==0||(i.f&pe)!==0&&(e.f&je)!==0;Dr(i,t,s?n:!1),i=a}}}function jn(e){Ir(e,!0)}function Ir(e,t){if((e.f&ie)!==0){e.f^=ie,(e.f&K)===0&&(U(e,J),we(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&wt)!==0||(n.f&pe)!==0;Ir(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const s of a)(s.is_global||t)&&s.in()}}function Hr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:It(n);t.append(n),n=i}}let sn=!1,Ye=!1;function Ur(e){Ye=e}let b=null,xe=!1;function de(e){b=e}let z=null;function Te(e){z=e}let he=null;function Vr(e){b!==null&&(he===null?he=[e]:he.push(e))}let re=null,ae=0,_e=null;function qa(e){_e=e}let Br=1,st=0,ot=st;function Wr(e){ot=e}function Kr(){return++Br}function Ht(e){var t=e.f;if((t&J)!==0)return!0;if(t&X&&(e.f&=~$e),(t&ge)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ht(a)&&Er(a),a.wv>e.wv)return!0}(t&ue)!==0&&me===null&&U(e,K)}return!1}function Yr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(he!==null&>.call(he,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&X)!==0?Yr(a,t,!1):t===a&&(n?U(a,J):(a.f&K)!==0&&U(a,ge),we(a))}}function Zr(e){var w;var t=re,n=ae,r=_e,i=b,a=he,s=ce,o=xe,l=ot,f=e.f;re=null,ae=0,_e=null,b=(f&(pe|Je))===0?e:null,he=null,bt(e.ctx),xe=!1,ot=++st,e.ac!==null&&(An(()=>{e.ac.abort(et)}),e.ac=null);try{e.f|=wn;var d=e.fn,h=d();e.f|=Qe;var v=e.deps,_=L?.is_fork;if(re!==null){var c;if(_||Ut(e,ae),v!==null&&ae>0)for(v.length=ae+re.length,c=0;c<re.length;c++)v[ae+c]=re[c];else e.deps=v=re;if(qn()&&(e.f&ue)!==0)for(c=ae;c<v.length;c++)((w=v[c]).reactions??(w.reactions=[])).push(e)}else!_&&v!==null&&ae<v.length&&(Ut(e,ae),v.length=ae);if(_r()&&_e!==null&&!xe&&v!==null&&(e.f&(X|ge|J))===0)for(c=0;c<_e.length;c++)Yr(_e[c],e);if(i!==null&&i!==e){if(st++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=st;if(t!==null)for(const m of t)m.rv=st;_e!==null&&(r===null?r=_e:r.push(..._e))}return(e.f&Be)!==0&&(e.f^=Be),h}catch(m){return pr(m)}finally{e.f^=wn,re=t,ae=n,_e=r,b=i,he=a,bt(s),xe=o,ot=l}}function Ma(e,t){let n=t.reactions;if(n!==null){var r=Si.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&X)!==0&&(re===null||!gt.call(re,t))){var a=t;(a.f&ue)!==0&&(a.f^=ue,a.f&=~$e),Sn(a),pa(a),Ut(a,0)}}function Ut(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Ma(e,n[r])}function Ct(e){var t=e.f;if((t&Re)===0){U(e,K);var n=z,r=sn;z=e,sn=!0;try{(t&(je|fr))!==0?ka(e):Nn(e),Fr(e);var i=Zr(e);e.teardown=typeof i=="function"?i:null,e.wv=Br;var a;gn&&ta&&(e.f&J)!==0&&e.deps}finally{sn=r,z=n}}}function p(e){var t=e.f,n=(t&X)!==0;if(b!==null&&!xe){var r=z!==null&&(z.f&Re)!==0;if(!r&&(he===null||!gt.call(he,e))){var i=b.deps;if((b.f&wn)!==0)e.rv<st&&(e.rv=st,re===null&&i!==null&&i[ae]===e?ae++:re===null?re=[e]:re.push(e));else{(b.deps??(b.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[b]:gt.call(a,b)||a.push(b)}}}if(Ye&&Ke.has(e))return Ke.get(e);if(n){var s=e;if(Ye){var o=s.v;return((s.f&K)===0&&s.reactions!==null||Xr(s))&&(o=Tn(s)),Ke.set(s,o),o}var l=(s.f&ue)===0&&!xe&&b!==null&&(sn||(b.f&ue)!==0),f=(s.f&Qe)===0;Ht(s)&&(l&&(s.f|=ue),Er(s)),l&&!f&&(Cr(s),Gr(s))}if(me?.has(e))return me.get(e);if((e.f&Be)!==0)throw e.v;return e.v}function Gr(e){if(e.f|=ue,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&X)!==0&&(t.f&ue)===0&&(Cr(t),Gr(t))}function Xr(e){if(e.v===Q)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ke.has(t)||(t.f&X)!==0&&Xr(t))return!0;return!1}function Jr(e){var t=xe;try{return xe=!0,e()}finally{xe=t}}const Na=["touchstart","touchmove"];function ja(e){return Na.includes(e)}const on=Symbol("events"),Ra=new Set,Qr=new Set;function La(e,t,n,r={}){function i(a){if(r.capture||Rn.call(t,a),!a.cancelBubble)return An(()=>n?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?tt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Oa(e,t,n,r,i){var a={capture:r,passive:i},s=La(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Lr(()=>{t.removeEventListener(e,s,a)})}let $r=null;function Rn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;$r=e;var s=0,o=$r===e&&e[on];if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e[on]=t;return}var f=i.indexOf(t);if(f===-1)return;l<=f&&(s=l)}if(a=i[s]||e.target,a!==t){Ei(e,"currentTarget",{configurable:!0,get(){return a||n}});var d=b,h=z;de(null),Te(null);try{for(var v,_=[];a!==null;){var c=a.assignedSlot||a.parentNode||a.host||null;try{var w=a[on]?.[r];w!=null&&(!a.disabled||e.target===a)&&w.call(a,e)}catch(m){v?_.push(m):v=m}if(e.cancelBubble||c===t||c===null)break;a=c}if(v){for(let m of _)queueMicrotask(()=>{throw m});throw v}}finally{e[on]=t,delete e.currentTarget,de(d),Te(h)}}}const Fa=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Pa(e){return Fa?.createHTML(e)??e}function Da(e,t=!1){var n=Rr("template");return e=e.replaceAll("<!>","<!---->"),n.innerHTML=t?Pa(e):e,n.content}function ei(e,t){var n=z;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function T(e,t){var n=(t&Ji)!==0,r=(t&Qi)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Da(a?e:"<!>"+e,!0),n||(i=an(i)));var s=r||Ar?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=an(s),l=s.lastChild;ei(o,l)}else ei(s,s);return s}}function k(e,t){e!==null&&e.before(t)}function Y(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}function Ia(e,t){return Ha(e,t)}const ln=new Map;function Ha(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:s=!0}){wa();var o=void 0,l=Ea(()=>{var f=n??t.appendChild(it());la(f,{pending:()=>{}},v=>{bn({});var _=ce;a&&(_.c=a),i&&(r.$$events=i),o=e(v,r)||{},xn()});var d=new Set,h=v=>{for(var _=0;_<v.length;_++){var c=v[_];if(!d.has(c)){d.add(c);var w=ja(c);for(const g of[t,document]){var m=ln.get(g);m===void 0&&(m=new Map,ln.set(g,m));var j=m.get(c);j===void 0?(g.addEventListener(c,Rn,{passive:w}),m.set(c,1)):m.set(c,j+1)}}}};return h($t(Ra)),Qr.add(h),()=>{for(var v of d)for(const w of[t,document]){var _=ln.get(w),c=_.get(v);--c==0?(w.removeEventListener(v,Rn),_.delete(v),_.size===0&&ln.delete(w)):_.set(v,c)}Qr.delete(h),f!==n&&f.parentNode?.removeChild(f)}});return Ln.set(o,l),o}let Ln=new WeakMap;function Ua(e,t){const n=Ln.get(e);return n?(Ln.delete(e),n(t)):Promise.resolve()}class Va{constructor(t,n=!0){Ne(this,"anchor");x(this,Ee,new Map);x(this,Me,new Map);x(this,le,new Map);x(this,vt,new Set);x(this,Yt,!0);x(this,Zt,()=>{var t=L;if(u(this,Ee).has(t)){var n=u(this,Ee).get(t),r=u(this,Me).get(n);if(r)jn(r),u(this,vt).delete(n);else{var i=u(this,le).get(n);i&&(u(this,Me).set(n,i.effect),u(this,le).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,s]of u(this,Ee)){if(u(this,Ee).delete(a),a===t)break;const o=u(this,le).get(s);o&&(ne(o.effect),u(this,le).delete(s))}for(const[a,s]of u(this,Me)){if(a===n||u(this,vt).has(a))continue;const o=()=>{if(Array.from(u(this,Ee).values()).includes(a)){var f=document.createDocumentFragment();Hr(s,f),f.append(it()),u(this,le).set(a,{effect:s,fragment:f})}else ne(s);u(this,vt).delete(a),u(this,Me).delete(a)};u(this,Yt)||!r?(u(this,vt).add(a),at(s,o,!1)):o()}}});x(this,cn,t=>{u(this,Ee).delete(t);const n=Array.from(u(this,Ee).values());for(const[r,i]of u(this,le))n.includes(r)||(ne(i.effect),u(this,le).delete(r))});this.anchor=t,y(this,Yt,n)}ensure(t,n){var r=L,i=jr();if(n&&!u(this,Me).has(t)&&!u(this,le).has(t))if(i){var a=document.createDocumentFragment(),s=it();a.append(s),u(this,le).set(t,{effect:be(()=>n(s)),fragment:a})}else u(this,Me).set(t,be(()=>n(this.anchor)));if(u(this,Ee).set(r,t),i){for(const[o,l]of u(this,Me))o===t?r.unskip_effect(l):r.skip_effect(l);for(const[o,l]of u(this,le))o===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(u(this,Zt)),r.ondiscard(u(this,cn))}else u(this,Zt).call(this)}}Ee=new WeakMap,Me=new WeakMap,le=new WeakMap,vt=new WeakMap,Yt=new WeakMap,Zt=new WeakMap,cn=new WeakMap;function O(e,t,n=!1){var r=new Va(e),i=n?wt:0;function a(s,o){r.ensure(s,o)}Mn(()=>{var s=!1;t((o,l=0)=>{s=!0,a(l,o)}),s||a(!1,null)},i)}function ti(e,t){return t}function Ba(e,t,n){for(var r=[],i=t.length,a,s=t.length,o=0;o<i;o++){let h=t[o];at(h,()=>{if(a){if(a.pending.delete(h),a.done.add(h),a.pending.size===0){var v=e.outrogroups;On($t(a.done)),v.delete(a),v.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var f=n,d=f.parentNode;ya(d),d.append(f),e.items.clear()}On(t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function On(e,t=!0){for(var n=0;n<e.length;n++)ne(e[n],t)}var ni;function ri(e,t,n,r,i,a=null){var s=e,o=new Map;{var l=e;s=l.appendChild(it())}var f=null,d=Sr(()=>{var m=n();return ar(m)?m:m==null?[]:$t(m)}),h,v=!0;function _(){w.fallback=f,Wa(w,h,s,t,r),f!==null&&(h.length===0?(f.f&Ve)===0?jn(f):(f.f^=Ve,Bt(f,null,s)):at(f,()=>{f=null}))}var c=Mn(()=>{h=p(d);for(var m=h.length,j=new Set,g=L,R=jr(),E=0;E<m;E+=1){var I=h[E],$=r(I,E),M=v?null:o.get($);M?(M.v&&Et(M.v,I),M.i&&Et(M.i,E),R&&g.unskip_effect(M.e)):(M=Ka(o,v?s:ni??(ni=it()),I,$,E,i,t,n),v||(M.e.f|=Ve),o.set($,M)),j.add($)}if(m===0&&a&&!f&&(v?f=be(()=>a(s)):(f=be(()=>a(ni??(ni=it()))),f.f|=Ve)),m>j.size&&Ri(),!v)if(R){for(const[A,V]of o)j.has(A)||g.skip_effect(V.e);g.oncommit(_),g.ondiscard(()=>{})}else _();p(d)}),w={effect:c,items:o,outrogroups:null,fallback:f};v=!1}function Vt(e){for(;e!==null&&(e.f&pe)===0;)e=e.next;return e}function Wa(e,t,n,r,i){var a=t.length,s=e.items,o=Vt(e.effect.first),l,f=null,d=[],h=[],v,_,c,w;for(w=0;w<a;w+=1){if(v=t[w],_=i(v,w),c=s.get(_).e,e.outrogroups!==null)for(const A of e.outrogroups)A.pending.delete(c),A.done.delete(c);if((c.f&Ve)!==0)if(c.f^=Ve,c===o)Bt(c,null,n);else{var m=f?f.next:o;c===e.effect.last&&(e.effect.last=c.prev),c.prev&&(c.prev.next=c.next),c.next&&(c.next.prev=c.prev),Ze(e,f,c),Ze(e,c,m),Bt(c,m,n),f=c,d=[],h=[],o=Vt(f.next);continue}if((c.f&ie)!==0&&jn(c),c!==o){if(l!==void 0&&l.has(c)){if(d.length<h.length){var j=h[0],g;f=j.prev;var R=d[0],E=d[d.length-1];for(g=0;g<d.length;g+=1)Bt(d[g],j,n);for(g=0;g<h.length;g+=1)l.delete(h[g]);Ze(e,R.prev,E.next),Ze(e,f,R),Ze(e,E,j),o=j,f=E,w-=1,d=[],h=[]}else l.delete(c),Bt(c,o,n),Ze(e,c.prev,c.next),Ze(e,c,f===null?e.effect.first:f.next),Ze(e,f,c),f=c;continue}for(d=[],h=[];o!==null&&o!==c;)(l??(l=new Set)).add(o),h.push(o),o=Vt(o.next);if(o===null)continue}(c.f&Ve)===0&&d.push(c),f=c,o=Vt(c.next)}if(e.outrogroups!==null){for(const A of e.outrogroups)A.pending.size===0&&(On($t(A.done)),e.outrogroups?.delete(A));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||l!==void 0){var I=[];if(l!==void 0)for(c of l)(c.f&ie)===0&&I.push(c);for(;o!==null;)(o.f&ie)===0&&o!==e.fallback&&I.push(o),o=Vt(o.next);var $=I.length;if($>0){var M=a===0?n:null;Ba(e,I,M)}}}function Ka(e,t,n,r,i,a,s,o){var l=(s&Bi)!==0?(s&Ki)===0?ga(n,!1,!1):nt(n):null,f=(s&Wi)!==0?nt(i):null;return{v:l,i:f,e:be(()=>(a(t,l??n,f??i,o),()=>{e.delete(r)}))}}function Bt(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&Ve)===0?t.nodes.start:n;r!==null;){var s=It(r);if(a.before(r),r===i)return;r=s}}function Ze(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function zt(e,t){Ca(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=Rr("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const ii=[...`
|
|
5
|
+
\r\f \v\uFEFF`];function Ya(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var a=i.length,s=0;(s=r.indexOf(i,s))>=0;){var o=s+a;(s===0||ii.includes(r[s-1]))&&(o===r.length||ii.includes(r[o]))?r=(s===0?"":r.substring(0,s))+r.substring(o+1):s=o}}return r===""?null:r}function Za(e,t){return e==null?null:String(e)}function Tt(e,t,n,r,i,a){var s=e.__className;if(s!==n||s===void 0){var o=Ya(n,r,a);o==null?e.removeAttribute("class"):e.className=o,e.__className=n}else if(a&&i!==a)for(var l in a){var f=!!a[l];(i==null||f!==!!i[l])&&e.classList.toggle(l,f)}return a}function kt(e,t,n,r){var i=e.__style;if(i!==t){var a=Za(t);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}return r}const Ga=Symbol("is custom element"),Xa=Symbol("is html");function ai(e,t,n,r){var i=Ja(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ni]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Qa(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ja(e){return e.__attributes??(e.__attributes={[Ga]:e.nodeName.includes("-"),[Xa]:e.namespaceURI===vr})}var si=new Map;function Qa(e){var t=e.getAttribute("is")||e.nodeName,n=si.get(t);if(n)return n;si.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=Ci(i);for(var s in r)r[s].set&&n.push(s);i=sr(i)}return n}let fn=!1;function $a(e){var t=fn;try{return fn=!1,[e(),fn]}finally{fn=t}}function D(e,t,n,r){var i=(n&Gi)!==0,a=(n&Xi)!==0,s=r,o=!0,l=()=>(o&&(o=!1,s=a?Jr(r):r),s),f;if(i){var d=tn in e||Mi in e;f=mt(e,t)?.set??(d&&t in e?g=>e[t]=g:void 0)}var h,v=!1;i?[h,v]=$a(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=l(),f&&(Di(),f(h)));var _;if(_=()=>{var g=e[t];return g===void 0?l():(o=!0,g)},(n&Zi)===0)return _;if(f){var c=e.$$legacy;return(function(g,R){return arguments.length>0?((!R||c||v)&&f(R?_():g),g):_()})}var w=!1,m=((n&Yi)!==0?rn:Sr)(()=>(w=!1,_()));i&&p(m);var j=z;return(function(g,R){if(arguments.length>0){const E=R?p(m):i?rt(g):g;return ye(m,E),w=!0,s!==void 0&&(s=E),g}return Ye&&w||(j.f&Re)!==0?m.v:p(m)})}function es(e,t){var n,r;return r=class{constructor(a){x(this,n,null);if(!pt)throw new Error(`[sevn] ${t} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:s,...o}=a??{},l=typeof s=="string"?document.querySelector(s):s;if(!l)throw new Error(`[sevn] ${t}: alvo não encontrado`+(typeof s=="string"?` para o seletor "${s}".`:"."));wi(),y(this,n,Ia(e,{target:l,props:o}))}destroy(){if(!u(this,n))return Promise.resolve();const a=u(this,n);return y(this,n,null),Ua(a)}},n=new WeakMap,r}function oi(e){try{return new URL(e,document.baseURI).searchParams.get("cid")}catch{return null}}function ts(){const e=document.currentScript;if(e?.src){const n=oi(e.src);if(n)return n}const t=document.querySelectorAll('script[src*="cid="]');for(const n of t){const r=oi(n.src);if(r)return r}return null}function ns(){if(!pt)return;const e=ts();if(e)try{hn(e)}catch(t){console.error("[sevn] Chave inválida na tag <script>:",t)}}const rs="5";typeof window<"u"&&((ui=window.__svelte??(window.__svelte={})).v??(ui.v=new Set)).add(rs);const is="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",as="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 ss=T('<span class="avatar-tag svelte-ga6vh2"> </span>'),os=T('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const ls={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 li(e,t){zt(e,ls);let n=D(t,"avatar",3,"man"),r=D(t,"size",3,"md"),i=D(t,"tagColor",3,"var(--sevn-color-green)"),a=ze(!1);const s=F(()=>n()==="woman"?as:is),o=F(()=>!!t.photoUrl&&!p(a)),l=F(()=>p(o)?t.photoUrl:p(s)),f={sm:"40px",md:"56px",lg:"72px"},d={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},h=F(()=>f[r()]??r()),v=F(()=>d[r()]??d.md);var _=os(),c=S(_),w=S(c);let m;var j=P(c,2);{var g=R=>{var E=ss(),I=S(E);H(()=>{kt(E,`background-color: ${i()??""}; font-size: ${p(v).fontSize??""}; padding: ${p(v).padding??""};`),Y(I,t.tag)}),k(R,E)};O(j,R=>{t.tag&&R(g)})}H(()=>{kt(c,`background-color: ${t.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${p(h)??""}; height: ${p(h)??""};`),m=Tt(w,1,"avatar-image svelte-ga6vh2",null,m,{"avatar-image--photo":p(o)}),ai(w,"src",p(l)),ai(w,"alt",t.name)}),Oa("error",w,()=>ye(a,!0)),k(e,_)}var fs=T("<span> </span>");const us={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 At(e,t){zt(e,us);let n=D(t,"color",3,"#1C1C1C"),r=D(t,"fontSize",3,"0.6875rem"),i=D(t,"class",3,"");var a=fs(),s=S(a);H(()=>{Tt(a,1,`tag ${i()??""}`,"svelte-pamnib"),kt(a,`background-color: ${n()??""}; font-size: ${r()??""}`),Y(s,t.label)}),k(e,a)}var cs=T('<p class="candidate-description svelte-q1jzvs"> </p>'),vs=T('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),ds=T('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),hs=T('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),_s=T('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),ps=T('<div class="candidate-wrapper svelte-q1jzvs"><!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div></div>'),gs=T('<p class="candidate-description svelte-q1jzvs"> </p>'),ms=T('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),ws=T('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),ys=T('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),bs=T('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),xs=T('<!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div>',1),Ss=T("<span> </span>"),Es=T('<div class="candidate svelte-q1jzvs"><!> <!></div>');const Cs={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;}
|
|
6
|
+
|
|
7
|
+
/* 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;}
|
|
8
|
+
|
|
9
|
+
/* ── 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;}
|
|
10
|
+
|
|
11
|
+
@media (min-width: 768px) {.candidate-stats.svelte-q1jzvs {flex-direction:row;gap:8px;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:none;}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (max-width: 640px) {.candidate.svelte-q1jzvs {flex:1;flex-wrap:wrap;align-items:center;}.candidate-info.svelte-q1jzvs {flex:1;}
|
|
15
|
+
|
|
16
|
+
/* 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;}
|
|
17
|
+
}`};function zs(e,t){zt(e,Cs);let n=D(t,"avatar",3,"man"),r=D(t,"elected",3,!1),i=D(t,"electedLabel",3,"ELEITO"),a=D(t,"electedColor",3,"var(--sevn-color-green)"),s=D(t,"descriptionSide",3,"inline"),o=D(t,"positionSide",3,"right"),l=D(t,"size",3,"md"),f=D(t,"nameWeight",3,700),d=D(t,"descWeight",3,400),h=D(t,"wrapper",3,!1);const v={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"}},_=F(()=>v[l()]??v.md);var c=Es(),w=S(c);{var m=E=>{var I=ps(),$=S(I);li($,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return n()},get avatarColor(){return t.avatarColor},get size(){return l()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var M=P($,2);let A;var V=S(M),ee=S(V),Xe=S(ee),dt=P(ee,2);{var Gt=N=>{{let W=F(()=>t.tagColor??"var(--sevn-color-secondary)"),fe=F(()=>t.tagSize??p(_).tagSize);At(N,{get label(){return t.tag},get color(){return p(W)},get fontSize(){return p(fe)}})}};O(dt,N=>{t.tag&&N(Gt)})}var He=P(dt,2);{var ht=N=>{{let W=F(()=>t.tagSize??p(_).tagSize);At(N,{get label(){return i()},get color(){return a()},get fontSize(){return p(W)}})}};O(He,N=>{r()&&N(ht)})}var Xt=P(V,2);{var In=N=>{var W=cs(),fe=S(W);H(()=>Y(fe,t.description)),k(N,W)},Hn=N=>{var W=_s(),fe=S(W);{var Un=te=>{var Ce=ds(),Ue=S(Ce),Wn=P(Ue);{var Kn=_t=>{var Jt=vs(),Yn=S(Jt);H(()=>Y(Yn,t.percentSuffix)),k(_t,Jt)};O(Wn,_t=>{t.percentSuffix&&_t(Kn)})}H(()=>Y(Ue,`${t.percent??""} `)),k(te,Ce)};O(fe,te=>{t.percent&&te(Un)})}var Vn=P(fe,2);{var Bn=te=>{var Ce=hs(),Ue=S(Ce);H(()=>Y(Ue,t.votes)),k(te,Ce)};O(Vn,te=>{t.votes&&te(Bn)})}k(N,W)};O(Xt,N=>{t.description?N(In):(t.percent||t.votes)&&N(Hn,1)})}H(()=>{A=Tt(M,1,"candidate-info svelte-q1jzvs",null,A,{right:s()==="right"&&!!t.description}),Y(Xe,t.name)}),k(E,I)},j=E=>{var I=xs(),$=Nr(I);li($,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return n()},get avatarColor(){return t.avatarColor},get size(){return l()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var M=P($,2);let A;var V=S(M),ee=S(V),Xe=S(ee),dt=P(ee,2);{var Gt=N=>{{let W=F(()=>t.tagColor??"var(--sevn-color-secondary)"),fe=F(()=>t.tagSize??p(_).tagSize);At(N,{get label(){return t.tag},get color(){return p(W)},get fontSize(){return p(fe)}})}};O(dt,N=>{t.tag&&N(Gt)})}var He=P(dt,2);{var ht=N=>{{let W=F(()=>t.tagSize??p(_).tagSize);At(N,{get label(){return i()},get color(){return a()},get fontSize(){return p(W)}})}};O(He,N=>{r()&&N(ht)})}var Xt=P(V,2);{var In=N=>{var W=gs(),fe=S(W);H(()=>Y(fe,t.description)),k(N,W)},Hn=N=>{var W=bs(),fe=S(W);{var Un=te=>{var Ce=ws(),Ue=S(Ce),Wn=P(Ue);{var Kn=_t=>{var Jt=ms(),Yn=S(Jt);H(()=>Y(Yn,t.percentSuffix)),k(_t,Jt)};O(Wn,_t=>{t.percentSuffix&&_t(Kn)})}H(()=>Y(Ue,`${t.percent??""} `)),k(te,Ce)};O(fe,te=>{t.percent&&te(Un)})}var Vn=P(fe,2);{var Bn=te=>{var Ce=ys(),Ue=S(Ce);H(()=>Y(Ue,t.votes)),k(te,Ce)};O(Vn,te=>{t.votes&&te(Bn)})}k(N,W)};O(Xt,N=>{t.description?N(In):(t.percent||t.votes)&&N(Hn,1)})}H(()=>{A=Tt(M,1,"candidate-info svelte-q1jzvs",null,A,{right:s()==="right"&&!!t.description}),Y(Xe,t.name)}),k(E,I)};O(w,E=>{h()?E(m):E(j,!1)})}var g=P(w,2);{var R=E=>{var I=Ss();let $;var M=S(I);H(()=>{$=Tt(I,1,"candidate-position svelte-q1jzvs",null,$,{left:o()==="left"}),Y(M,t.position)}),k(E,I)};O(g,E=>{t.position&&E(R)})}H(()=>kt(c,`
|
|
18
|
+
--font-name: ${t.fontSize??p(_).fontSize??""};
|
|
19
|
+
--font-desc: ${t.descSize??p(_).descSize??""};
|
|
20
|
+
--font-tag: ${t.tagSize??p(_).tagSize??""};
|
|
21
|
+
--font-position: ${t.positionSize??p(_).fontSize??""};
|
|
22
|
+
--weight-name: ${f()??""};
|
|
23
|
+
--weight-desc: ${d()??""};
|
|
24
|
+
gap: ${h()?"10px":"18px"};
|
|
25
|
+
`)),k(e,c)}var Ts=T("<span> </span>"),ks=T('<div class="vote-overview-stats svelte-1m9ufac"></div>'),As=T("<span> </span>"),qs=T('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Ms=T("<span> </span>"),Ns=T('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),js=T('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const Rs={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 Ls(e,t){bn(t,!0),zt(e,Rs);let n=D(t,"data",19,()=>[]),r=D(t,"borderTop",3,!1),i=D(t,"align",3,"start");var a=js(),s=S(a);{var o=d=>{var h=ks();ri(h,21,n,ti,(v,_)=>{var c=Ts(),w=S(c);H(()=>Y(w,`${p(_).text??""} ${p(_).value??""}`)),k(v,c)}),k(d,h)};O(s,d=>{n().length&&d(o)})}var l=P(s,2);{var f=d=>{var h=Ns(),v=S(h);{var _=g=>{var R=As(),E=S(R);H(()=>Y(E,`Atualizado em ${t.date??""}`)),k(g,R)};O(v,g=>{t.date&&g(_)})}var c=P(v,2);{var w=g=>{var R=qs();k(g,R)};O(c,g=>{t.date&&t.font&&g(w)})}var m=P(c,2);{var j=g=>{var R=Ms(),E=S(R);H(()=>Y(E,`Fonte ${t.font??""}`)),k(g,R)};O(m,g=>{t.font&&g(j)})}k(d,h)};O(l,d=>{(t.date||t.font)&&d(f)})}H(()=>kt(a,`justify-content:${i()==="end"?"flex-end":"flex-start"};${r()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),k(e,a),xn()}var Os=T('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),Fs=T('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Ps=T('<p class="header-description svelte-1xm1ks6"> </p>'),Ds=T('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Is={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);}
|
|
26
|
+
|
|
27
|
+
@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);}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
|
|
31
|
+
}`};function Hs(e,t){zt(e,Is);var n=Ds(),r=S(n);{var i=v=>{var _=Os(),c=S(_);At(c,{get label(){return t.tag},get color(){return t.tagColor}}),k(v,_)};O(r,v=>{t.tag&&v(i)})}var a=P(r,2),s=S(a),o=S(s),l=P(s,2);{var f=v=>{var _=Fs(),c=S(_);At(c,{get label(){return t.tag},get color(){return t.tagColor}}),k(v,_)};O(l,v=>{t.tag&&v(f)})}var d=P(a,2);{var h=v=>{var _=Ps(),c=S(_);H(()=>Y(c,t.description)),k(v,_)};O(d,v=>{t.description&&v(h)})}H(()=>{kt(n,`
|
|
32
|
+
--header-title-font-size: ${t.titleFontSize??"1.75rem"??""};
|
|
33
|
+
--header-title-font-weight: ${t.titleFontWeight??700??""};
|
|
34
|
+
--header-description-font-size: ${t.descriptionFontSize??"0.875rem"??""};
|
|
35
|
+
`),Y(o,t.title)}),k(e,n)}const Us=new Set(["da","de","do","das","dos","e"]);function Vs(e){return e.toLowerCase().split(" ").map((t,n)=>n>0&&Us.has(t)?t:t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Bs(e){if(typeof e=="string"){const n=e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(n)return new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]),Number(n[4]),Number(n[5]),Number(n[6]??0)))}const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Fn(e){if(e==null||e==="")return"";const t=Bs(e);if(!t)return"";const n=String(t.getUTCDate()).padStart(2,"0"),r=String(t.getUTCMonth()+1).padStart(2,"0"),i=t.getUTCFullYear(),a=String(t.getUTCHours()).padStart(2,"0"),s=String(t.getUTCMinutes()).padStart(2,"0");return`${n}/${r}/${i} às ${a}h${s}`}function Ws(e,t="TSE"){const n=Fn(e);return n?`Atualizado em ${n} | Fonte ${t}`:`Fonte ${t}`}const Ks=Fn("2022-10-31T00:18:00Z");Ws("2022-10-31T00:18:00Z");var Ys=T('<hr class="sevn_live_summary__divider svelte-1igr4ry"/>'),Zs=T("<!> <!>",1),Gs=T('<div><!> <div class="sevn_live_summary__candidates svelte-1igr4ry"></div> <!></div>');const Xs={hash:"svelte-1igr4ry",code:`.sevn_live_summary.svelte-1igr4ry {display:flex;flex-direction:column;gap:24px;}.sevn_live_summary--raw.svelte-1igr4ry,
|
|
36
|
+
.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 Js(e,t){bn(t,!0),zt(e,Xs);let n=D(t,"mock",3,!1),r=D(t,"rawStyle",3,!1),i=D(t,"data",3,null),a=D(t,"header",19,()=>({title:"Resumo em tempo real",tag:"PRESIDENTE",tagColor:"var(--sevn-color-tertiary, #1a1a2e)"}));const s=[{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"}],o=[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],l=F(()=>!n()&&i()?.snapshots&&Array.isArray(i().snapshots)?i().snapshots[i().snapshots.length-1]:null),f=F(()=>{if(n())return s;if(!p(l)?.results?.length||!i()?.candidates_meta||!Array.isArray(i().candidates_meta))return[];const A=[...p(l).results].sort((ee,Xe)=>Xe.valid_votes_pct-ee.valid_votes_pct)[0],V=i().candidates_meta.find(ee=>ee.candidate_id===A.candidate_id);return[{name:V?.name?Vs(V.name):"Unknown",photoUrl:V?.photo_url,tag:V?.party_abbr||"",tagColor:V?.party_color||"var(--sevn-color-primary)",avatar:"man",avatarColor:V?.party_color||"var(--sevn-color-primary)",description:`${A.valid_votes_pct}% dos votos válidos`,position:"1º Lugar"}]}),d=F(()=>{if(n())return o;if(!p(l)?.overview)return[];const{valid_votes:M,null_votes:A,blank_votes:V}=p(l).overview,ee=M+A+V;return[{text:"Nulos",value:`${(A/ee*100).toFixed(2)}%`},{text:"Brancos",value:`${(V/ee*100).toFixed(2)}%`},{text:"Válidos",value:`${M.toLocaleString("pt-BR")} votos`}]}),h=F(()=>p(l)?.ballots_counted_pct||0),v=F(()=>n()?"X% das urnas apuradas":p(h)?`${p(h)}% das urnas apuradas`:""),_=F(()=>a().description??p(v)),c=F(()=>n()?Ks:Fn(p(l)?.timestamp)),w=F(()=>p(c)),m="TSE";let j=ze(rt(pt?window.innerWidth<=480:!1));Sa(()=>{if(!pt)return;const M=window.matchMedia("(max-width: 480px)");ye(j,M.matches,!0);const A=V=>{ye(j,V.matches,!0)};return M.addEventListener("change",A),()=>M.removeEventListener("change",A)});var g=Gs();let R;var E=S(g);Hs(E,{get title(){return a().title},get description(){return p(_)},get tag(){return a().tag},get tagColor(){return a().tagColor}});var I=P(E,2);ri(I,21,()=>p(f),ti,(M,A,V)=>{var ee=Zs(),Xe=Nr(ee);{var dt=He=>{var ht=Ys();k(He,ht)};O(Xe,He=>{V>0&&He(dt)})}var Gt=P(Xe,2);{let He=F(()=>p(j)?"right":"left"),ht=F(()=>p(j)?"left":"right"),Xt=F(()=>p(j)?400:600);zs(Gt,{get name(){return p(A).name},get tag(){return p(A).tag},get tagColor(){return p(A).tagColor},get avatar(){return p(A).avatar},get avatarColor(){return p(A).avatarColor},get description(){return p(A).description},get position(){return p(A).position},get positionSide(){return p(He)},get descriptionSide(){return p(ht)},get descWeight(){return p(Xt)}})}k(M,ee)});var $=P(I,2);Ls($,{get data(){return p(d)},get date(){return p(w)},font:m,borderTop:!0}),H(()=>R=Tt(g,1,"sevn_live_summary svelte-1igr4ry",null,R,{"sevn_live_summary--raw":r()})),k(e,g),xn()}const fi=es(Js,"LiveSummary");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:xi,LiveSummary:fi}),ns()),fi}));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
(function(G,W){typeof exports=="object"&&typeof module<"u"?module.exports=W():typeof define=="function"&&define.amd?define(W):(G=typeof globalThis<"u"?globalThis:G||self,G.MunicipalityPerfomanceMap=W())})(this,(function(){"use strict";var vl=Object.defineProperty;var Za=G=>{throw TypeError(G)};var hl=(G,W,te)=>W in G?vl(G,W,{enumerable:!0,configurable:!0,writable:!0,value:te}):G[W]=te;var $e=(G,W,te)=>hl(G,typeof W!="symbol"?W+"":W,te),mr=(G,W,te)=>W.has(G)||Za("Cannot "+te);var v=(G,W,te)=>(mr(G,W,"read from private field"),te?te.call(G):W.get(G)),q=(G,W,te)=>W.has(G)?Za("Cannot add the same private member more than once"):W instanceof WeakSet?W.add(G):W.set(G,te),N=(G,W,te,qt)=>(mr(G,W,"write to private field"),qt?qt.call(G,te):W.set(G,te),te),oe=(G,W,te)=>(mr(G,W,"access private method"),te);var Xt,Qt,jt,$t,mn,wn,It,ct,en,ye,wr,br,yr,Ja,Be,_r,ft,Nt,Ge,We,xe,Ye,ut,Dt,yt,tn,nn,rn,dt,Ln,se,pl,gl,xr,On,Pn,Sr,Ue,Ze,Se,Ft,bn,yn,qn,Ga;class G 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 W extends Error{constructor(e,n){super(`Não foi possível contatar a API para ${e}.`),this.name="SevnNetworkError",this.cause=n}}const te="__sevnElectionsState_v1__",qt=globalThis;function Cr(t){return qt[te]||(qt[te]={config:t(),transport:{activeIndex:0,pinnedAt:0}}),qt[te]}const Xa="https://failover-api.sevntech.com",Qa=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function kr(){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 $a=kr;function Ot(){return Cr(kr)}function ei(t){return[`https://${t}-api1.sevnelections.com`,`https://${t}-api2.sevnelections.com`,Xa]}function Hn(t){if(typeof t!="string"||!Qa.test(t))throw new Error(`[sevn] Chave inválida: ${JSON.stringify(t)}. Use apenas letras, números e hífen (a chave vira subdomínio da API).`);const e=Ot();e.config.key=t,e.config.apiHosts=ei(t)}function Er(t){const{cache:e,request:n,key:r,...i}=t,a=Ot();a.config={...a.config,...i,cache:{...a.config.cache,...e},request:{...a.config.request,...n}},r&&(Hn(r),i.apiHosts&&(a.config.apiHosts=i.apiHosts))}function sn(){return Ot().config}function zr(){return Ot().config.apiHosts.length>0}function Ar(){if(!zr())throw new G;return Ot().config.apiHosts}function Sn(t){const{assetsBase:e,assetsVersion:n}=Ot().config,r=e.replace(/\/+$/,""),i=String(t).replace(/^\/+/,"");return`${r}/${n}/${i}`}const ti=':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}',on=typeof window<"u"&&typeof document<"u",Tr="data-sevn-tokens",Mr="data-sevn-theme",Rr={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 ni(){if(!on||document.querySelector(`style[${Tr}]`))return;const t=document.createElement("style");t.setAttribute(Tr,""),t.textContent=ti,document.head.prepend(t);const e=sn().theme;e&&Bn(e)}function Bn(t){if(!on)return;const e=Object.keys(Rr).filter(r=>t[r]).map(r=>` ${Rr[r]}: ${t[r]};`);if(e.length===0)return;let n=document.querySelector(`style[${Mr}]`);n||(n=document.createElement("style"),n.setAttribute(Mr,""),document.head.appendChild(n)),n.textContent=`:root {
|
|
2
|
+
${e.join(`
|
|
3
|
+
`)}
|
|
4
|
+
}`}function jr(){return Cr($a).transport}function Ir(t){return new Promise(e=>setTimeout(e,t))}function ri(t,e){const n=AbortSignal.timeout(t);return e&&typeof AbortSignal.any=="function"?AbortSignal.any([e,n]):n}function ai(t,e){const n=new URL(t),r=new URL(e);return n.protocol=r.protocol,n.host=r.host,n.toString()}function ii(t,e){return Array.from({length:e},(n,r)=>(t+r)%e)}const si=async(t,e)=>{const n=typeof t=="string"?t:t instanceof URL?t.toString():t.url,r=Ar(),{timeoutMs:i,retriesPerHost:a,retryDelayMs:o,stickyWindowMs:l}=sn().request,s=jr();s.activeIndex!==0&&Date.now()-s.pinnedAt>=l&&(s.activeIndex=0);let f=null;for(const u of ii(s.activeIndex,r.length)){const m=ai(n,r[u]);for(let d=0;d<a;d++)try{const g=await fetch(m,{...e,signal:ri(i,e?.signal)});if(g.status>=500){f=new Error(`HTTP ${g.status} em ${r[u]}`),d<a-1&&await Ir(o);continue}return s.activeIndex=u,s.pinnedAt=Date.now(),g}catch(g){f=g,d<a-1&&await Ir(o)}}throw new W(n,f)};function oi(){return sn().apiHosts[jr().activeIndex]??null}const li={applyKey:Hn,configure(t){Er(t),t.theme&&Bn(t.theme)},getConfig:sn,isReady:zr,assetUrl:Sn,setTheme(t){Er({theme:t}),Bn(t)},activeHost:oi},Un=!1;var Nr=Array.isArray,ci=Array.prototype.indexOf,Pt=Array.prototype.includes,Cn=Array.from,fi=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,ui=Object.getOwnPropertyDescriptors,di=Object.prototype,vi=Array.prototype,Dr=Object.getPrototypeOf,Fr=Object.isExtensible;const hi=()=>{};function pi(t){for(var e=0;e<t.length;e++)t[e]()}function Lr(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const le=2,ln=4,kn=8,qr=1<<24,et=16,Fe=32,xt=64,Vn=128,ze=512,ie=1024,ce=2048,Le=4096,we=8192,tt=16384,St=32768,Bt=65536,Or=1<<17,Pr=1<<18,Ut=1<<19,gi=1<<20,nt=1<<25,Ct=65536,Kn=1<<21,Gn=1<<22,ht=1<<23,cn=Symbol("$state"),_i=Symbol("legacy props"),mi=Symbol(""),kt=new class extends Error{constructor(){super(...arguments);$e(this,"name","StaleReactionError");$e(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function wi(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function bi(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function yi(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function xi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Si(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ci(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ki(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ei(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function zi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ai(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ti(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Mi=1,Ri=2,Hr=4,ji=8,Ii=16,Ni=1,Di=4,Fi=8,Li=16,qi=1,Oi=2,fe=Symbol(),Br="http://www.w3.org/1999/xhtml";function Pi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ur(t){return t===this.v}function Hi(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Vr(t){return!Hi(t,this.v)}let Bi=!1,Ae=null;function Vt(t){Ae=t}function fn(t,e=!1,n){Ae={p:Ae,i:!1,c:null,e:null,s:t,x:null,l:null}}function un(t){var e=Ae,n=e.e;if(n!==null){e.e=null;for(var r of n)ua(r)}return e.i=!0,Ae=e.p,{}}function Kr(){return!0}let Kt=[];function Ui(){var t=Kt;Kt=[],pi(t)}function rt(t){if(Kt.length===0){var e=Kt;queueMicrotask(()=>{e===Kt&&Ui()})}Kt.push(t)}function Gr(t){var e=U;if(e===null)return F.f|=ht,t;if((e.f&St)===0&&(e.f&ln)===0)throw t;Gt(t,e)}function Gt(t,e){for(;e!==null;){if((e.f&Vn)!==0){if((e.f&St)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}const Vi=-7169;function ne(t,e){t.f=t.f&Vi|e}function Wn(t){(t.f&ze)!==0||t.deps===null?ne(t,ie):ne(t,Le)}function Wr(t){if(t!==null)for(const e of t)(e.f&le)===0||(e.f&Ct)===0||(e.f^=Ct,Wr(e.deps))}function Yr(t,e,n){(t.f&ce)!==0?e.add(t):(t.f&Le)!==0&&n.add(t),Wr(t.deps),ne(t,ie)}const En=new Set;let $=null,qe=null,Te=[],Yn=null,Zn=!1;const gr=class gr{constructor(){q(this,ye);$e(this,"committed",!1);$e(this,"current",new Map);$e(this,"previous",new Map);q(this,Xt,new Set);q(this,Qt,new Set);q(this,jt,0);q(this,$t,0);q(this,mn,null);q(this,wn,new Set);q(this,It,new Set);q(this,ct,new Map);$e(this,"is_fork",!1);q(this,en,!1)}skip_effect(e){v(this,ct).has(e)||v(this,ct).set(e,{d:[],m:[]})}unskip_effect(e){var n=v(this,ct).get(e);if(n){v(this,ct).delete(e);for(var r of n.d)ne(r,ce),Oe(r);for(r of n.m)ne(r,Le),Oe(r)}}process(e){Te=[],this.apply();var n=[],r=[];for(const i of e)oe(this,ye,br).call(this,i,n,r);if(oe(this,ye,wr).call(this)){oe(this,ye,yr).call(this,r),oe(this,ye,yr).call(this,n);for(const[i,a]of v(this,ct))Qr(i,a)}else{for(const i of v(this,Xt))i();v(this,Xt).clear(),v(this,jt)===0&&oe(this,ye,Ja).call(this),$=null,Zr(r),Zr(n),v(this,mn)?.resolve()}qe=null}capture(e,n){n!==fe&&!this.previous.has(e)&&this.previous.set(e,n),(e.f&ht)===0&&(this.current.set(e,e.v),qe?.set(e,e.v))}activate(){$=this,this.apply()}deactivate(){$===this&&($=null,qe=null)}flush(){if(this.activate(),Te.length>0){if(Ki(),$!==null&&$!==this)return}else v(this,jt)===0&&this.process([]);this.deactivate()}discard(){for(const e of v(this,Qt))e(this);v(this,Qt).clear()}increment(e){N(this,jt,v(this,jt)+1),e&&N(this,$t,v(this,$t)+1)}decrement(e){N(this,jt,v(this,jt)-1),e&&N(this,$t,v(this,$t)-1),!v(this,en)&&(N(this,en,!0),rt(()=>{N(this,en,!1),oe(this,ye,wr).call(this)?Te.length>0&&this.flush():this.revive()}))}revive(){for(const e of v(this,wn))v(this,It).delete(e),ne(e,ce),Oe(e);for(const e of v(this,It))ne(e,Le),Oe(e);this.flush()}oncommit(e){v(this,Xt).add(e)}ondiscard(e){v(this,Qt).add(e)}settled(){return(v(this,mn)??N(this,mn,Lr())).promise}static ensure(){if($===null){const e=$=new gr;En.add($),rt(()=>{$===e&&e.flush()})}return $}apply(){}};Xt=new WeakMap,Qt=new WeakMap,jt=new WeakMap,$t=new WeakMap,mn=new WeakMap,wn=new WeakMap,It=new WeakMap,ct=new WeakMap,en=new WeakMap,ye=new WeakSet,wr=function(){return this.is_fork||v(this,$t)>0},br=function(e,n,r){e.f^=ie;for(var i=e.first;i!==null;){var a=i.f,o=(a&(Fe|xt))!==0,l=o&&(a&ie)!==0,s=l||(a&we)!==0||v(this,ct).has(i);if(!s&&i.fn!==null){o?i.f^=ie:(a&ln)!==0?n.push(i):hn(i)&&((a&et)!==0&&v(this,It).add(i),Zt(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}},yr=function(e){for(var n=0;n<e.length;n+=1)Yr(e[n],v(this,wn),v(this,It))},Ja=function(){var i;if(En.size>1){this.previous.clear();var e=qe,n=!0;for(const a of En){if(a===this){n=!1;continue}const o=[];for(const[s,f]of this.current){if(a.current.has(s))if(n&&f!==a.current.get(s))a.current.set(s,f);else continue;o.push(s)}if(o.length===0)continue;const l=[...a.current.keys()].filter(s=>!this.current.has(s));if(l.length>0){var r=Te;Te=[];const s=new Set,f=new Map;for(const u of o)Jr(u,l,s,f);if(Te.length>0){$=a,a.apply();for(const u of Te)oe(i=a,ye,br).call(i,u,[],[]);a.deactivate()}Te=r}}$=null,qe=e}this.committed=!0,En.delete(this)};let pt=gr;function Ki(){Zn=!0;var t=null;try{for(var e=0;Te.length>0;){var n=pt.ensure();if(e++>1e3){var r,i;Gi()}n.process(Te),gt.clear()}}finally{Te=[],Zn=!1,Yn=null}}function Gi(){try{Ci()}catch(t){Gt(t,Yn)}}let at=null;function Zr(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(tt|we))===0&&hn(r)&&(at=new Set,Zt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ga(r),at?.size>0)){gt.clear();for(const i of at){if((i.f&(tt|we))!==0)continue;const a=[i];let o=i.parent;for(;o!==null;)at.has(o)&&(at.delete(o),a.push(o)),o=o.parent;for(let l=a.length-1;l>=0;l--){const s=a[l];(s.f&(tt|we))===0&&Zt(s)}}at.clear()}}at=null}}function Jr(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const a=i.f;(a&le)!==0?Jr(i,e,n,r):(a&(Gn|et))!==0&&(a&ce)===0&&Xr(i,e,r)&&(ne(i,ce),Oe(i))}}function Xr(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(Pt.call(e,i))return!0;if((i.f&le)!==0&&Xr(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function Oe(t){var e=Yn=t,n=e.b;if(n?.is_pending&&(t.f&(ln|kn|qr))!==0&&(t.f&St)===0){n.defer_effect(t);return}for(;e.parent!==null;){e=e.parent;var r=e.f;if(Zn&&e===U&&(r&et)!==0&&(r&Pr)===0&&(r&St)!==0)return;if((r&(xt|Fe))!==0){if((r&ie)===0)return;e.f^=ie}}Te.push(e)}function Qr(t,e){if(!((t.f&Fe)!==0&&(t.f&ie)!==0)){(t.f&ce)!==0?e.d.push(t):(t.f&Le)!==0&&e.m.push(t),ne(t,ie);for(var n=t.first;n!==null;)Qr(n,e),n=n.next}}function Wi(t){let e=0,n=Et(0),r;return()=>{er()&&(c(n),va(()=>(e===0&&(r=ar(()=>t(()=>dn(n)))),e+=1,()=>{rt(()=>{e-=1,e===0&&(r?.(),r=void 0,dn(n))})})))}}var Yi=Bt|Ut;function Zi(t,e,n){new Ji(t,e,n)}class Ji{constructor(e,n,r){q(this,se);$e(this,"parent");$e(this,"is_pending",!1);q(this,Be);q(this,_r,null);q(this,ft);q(this,Nt);q(this,Ge);q(this,We,null);q(this,xe,null);q(this,Ye,null);q(this,ut,null);q(this,Dt,0);q(this,yt,0);q(this,tn,!1);q(this,nn,new Set);q(this,rn,new Set);q(this,dt,null);q(this,Ln,Wi(()=>(N(this,dt,Et(v(this,Dt))),()=>{N(this,dt,null)})));N(this,Be,e),N(this,ft,n),N(this,Nt,i=>{var a=U;a.b=this,a.f|=Vn,r(i)}),this.parent=U.b,N(this,Ge,tr(()=>{oe(this,se,xr).call(this)},Yi))}defer_effect(e){Yr(e,v(this,nn),v(this,rn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,ft).pending}update_pending_count(e){oe(this,se,Sr).call(this,e),N(this,Dt,v(this,Dt)+e),!(!v(this,dt)||v(this,tn))&&(N(this,tn,!0),rt(()=>{N(this,tn,!1),v(this,dt)&&Wt(v(this,dt),v(this,Dt))}))}get_effect_pending(){return v(this,Ln).call(this),c(v(this,dt))}error(e){var n=v(this,ft).onerror;let r=v(this,ft).failed;if(!n&&!r)throw e;v(this,We)&&(he(v(this,We)),N(this,We,null)),v(this,xe)&&(he(v(this,xe)),N(this,xe,null)),v(this,Ye)&&(he(v(this,Ye)),N(this,Ye,null));var i=!1,a=!1;const o=()=>{if(i){Pi();return}i=!0,a&&Ti(),v(this,Ye)!==null&&At(v(this,Ye),()=>{N(this,Ye,null)}),oe(this,se,Pn).call(this,()=>{pt.ensure(),oe(this,se,xr).call(this)})};rt(()=>{try{a=!0,n?.(e,o),a=!1}catch(l){Gt(l,v(this,Ge)&&v(this,Ge).parent)}r&&N(this,Ye,oe(this,se,Pn).call(this,()=>{pt.ensure();try{return Pe(()=>{var l=U;l.b=this,l.f|=Vn,r(v(this,Be),()=>e,()=>o)})}catch(l){return Gt(l,v(this,Ge).parent),null}}))})}}Be=new WeakMap,_r=new WeakMap,ft=new WeakMap,Nt=new WeakMap,Ge=new WeakMap,We=new WeakMap,xe=new WeakMap,Ye=new WeakMap,ut=new WeakMap,Dt=new WeakMap,yt=new WeakMap,tn=new WeakMap,nn=new WeakMap,rn=new WeakMap,dt=new WeakMap,Ln=new WeakMap,se=new WeakSet,pl=function(){try{N(this,We,Pe(()=>v(this,Nt).call(this,v(this,Be))))}catch(e){this.error(e)}},gl=function(){const e=v(this,ft).pending;e&&(this.is_pending=!0,N(this,xe,Pe(()=>e(v(this,Be)))),rt(()=>{var n=N(this,ut,document.createDocumentFragment()),r=_t();n.append(r),N(this,We,oe(this,se,Pn).call(this,()=>(pt.ensure(),Pe(()=>v(this,Nt).call(this,r))))),v(this,yt)===0&&(v(this,Be).before(n),N(this,ut,null),At(v(this,xe),()=>{N(this,xe,null)}),oe(this,se,On).call(this))}))},xr=function(){try{if(this.is_pending=this.has_pending_snippet(),N(this,yt,0),N(this,Dt,0),N(this,We,Pe(()=>{v(this,Nt).call(this,v(this,Be))})),v(this,yt)>0){var e=N(this,ut,document.createDocumentFragment());wa(v(this,We),e);const n=v(this,ft).pending;N(this,xe,Pe(()=>n(v(this,Be))))}else oe(this,se,On).call(this)}catch(n){this.error(n)}},On=function(){this.is_pending=!1;for(const e of v(this,nn))ne(e,ce),Oe(e);for(const e of v(this,rn))ne(e,Le),Oe(e);v(this,nn).clear(),v(this,rn).clear()},Pn=function(e){var n=U,r=F,i=Ae;Ke(v(this,Ge)),Me(v(this,Ge)),Vt(v(this,Ge).ctx);try{return e()}catch(a){return Gr(a),null}finally{Ke(n),Me(r),Vt(i)}},Sr=function(e){var n;if(!this.has_pending_snippet()){this.parent&&oe(n=this.parent,se,Sr).call(n,e);return}N(this,yt,v(this,yt)+e),v(this,yt)===0&&(oe(this,se,On).call(this),v(this,xe)&&At(v(this,xe),()=>{N(this,xe,null)}),v(this,ut)&&(v(this,Be).before(v(this,ut)),N(this,ut,null)))};function Xi(t,e,n,r){const i=zn;var a=t.filter(d=>!d.settled);if(n.length===0&&a.length===0){r(e.map(i));return}var o=$,l=U,s=Qi(),f=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(d=>d.promise)):null;function u(d){s();try{r(d)}catch(g){(l.f&tt)===0&&Gt(g,l)}o?.deactivate(),Jn()}if(n.length===0){f.then(()=>u(e.map(i)));return}function m(){s(),Promise.all(n.map(d=>es(d))).then(d=>u([...e.map(i),...d])).catch(d=>Gt(d,l))}f?f.then(m):m()}function Qi(){var t=U,e=F,n=Ae,r=$;return function(a=!0){Ke(t),Me(e),Vt(n),a&&r?.activate()}}function Jn(){Ke(null),Me(null),Vt(null)}function $i(){var t=U.b,e=$,n=t.is_rendered();return t.update_pending_count(1),e.increment(n),()=>{t.update_pending_count(-1),e.decrement(n)}}function zn(t){var e=le|ce,n=F!==null&&(F.f&le)!==0?F:null;return U!==null&&(U.f|=Ut),{ctx:Ae,deps:null,effects:null,equals:Ur,f:e,fn:t,reactions:null,rv:0,v:fe,wv:0,parent:n??U,ac:null}}function es(t,e,n){U===null&&wi();var i=void 0,a=Et(fe),o=!F,l=new Map;return us(()=>{var s=Lr();i=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{f===$&&f.committed&&f.deactivate(),Jn()})}catch(d){s.reject(d),Jn()}var f=$;if(o){var u=$i();l.get(f)?.reject(kt),l.delete(f),l.set(f,s)}const m=(d,g=void 0)=>{if(f.activate(),g)g!==kt&&(a.f|=ht,Wt(a,g));else{(a.f&ht)!==0&&(a.f^=ht),Wt(a,d);for(const[w,C]of l){if(l.delete(w),w===f)break;C.reject(kt)}}u&&u()};s.promise.then(m,d=>m(null,d||"unknown"))}),fa(()=>{for(const s of l.values())s.reject(kt)}),new Promise(s=>{function f(u){function m(){u===i?s(a):f(i)}u.then(m,m)}f(i)})}function O(t){const e=zn(t);return ya(e),e}function $r(t){const e=zn(t);return e.equals=Vr,e}function ts(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)he(e[n])}}function ns(t){for(var e=t.parent;e!==null;){if((e.f&le)===0)return(e.f&tt)===0?e:null;e=e.parent}return null}function Xn(t){var e,n=U;Ke(ns(t));try{t.f&=~Ct,ts(t),e=Ea(t)}finally{Ke(n)}return e}function ea(t){var e=Xn(t);if(!t.equals(e)&&(t.wv=Ca(),(!$?.is_fork||t.deps===null)&&(t.v=e,t.deps===null))){ne(t,ie);return}wt||(qe!==null?(er()||$?.is_fork)&&qe.set(t,e):Wn(t))}function rs(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(kt),e.teardown=hi,e.ac=null,pn(e,0),nr(e))}function ta(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&Zt(e)}let Qn=new Set;const gt=new Map;let na=!1;function Et(t,e){var n={f:0,v:t,reactions:null,equals:Ur,rv:0,wv:0};return n}function Z(t,e){const n=Et(t);return ya(n),n}function as(t,e=!1,n=!0){const r=Et(t);return e||(r.equals=Vr),r}function E(t,e,n=!1){F!==null&&(!He||(F.f&Or)!==0)&&Kr()&&(F.f&(le|et|Gn|Or))!==0&&(Re===null||!Pt.call(Re,t))&&Ai();let r=n?Yt(e):e;return Wt(t,r)}function Wt(t,e){if(!t.equals(e)){var n=t.v;wt?gt.set(t,e):gt.set(t,n),t.v=e;var r=pt.ensure();if(r.capture(t,n),(t.f&le)!==0){const i=t;(t.f&ce)!==0&&Xn(i),Wn(i)}t.wv=Ca(),ra(t,ce),U!==null&&(U.f&ie)!==0&&(U.f&(Fe|xt))===0&&(je===null?vs([t]):je.push(t)),!r.is_fork&&Qn.size>0&&!na&&is()}return e}function is(){na=!1;for(const t of Qn)(t.f&ie)!==0&&ne(t,Le),hn(t)&&Zt(t);Qn.clear()}function dn(t){E(t,t.v+1)}function ra(t,e){var n=t.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var a=n[i],o=a.f,l=(o&ce)===0;if(l&&ne(a,e),(o&le)!==0){var s=a;qe?.delete(s),(o&Ct)===0&&(o&ze&&(a.f|=Ct),ra(s,Le))}else l&&((o&et)!==0&&at!==null&&at.add(a),Oe(a))}}function Yt(t){if(typeof t!="object"||t===null||cn in t)return t;const e=Dr(t);if(e!==di&&e!==vi)return t;var n=new Map,r=Nr(t),i=Z(0),a=Mt,o=l=>{if(Mt===a)return l();var s=F,f=Mt;Me(null),Sa(a);var u=l();return Me(s),Sa(f),u};return r&&n.set("length",Z(t.length)),new Proxy(t,{defineProperty(l,s,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ei();var u=n.get(s);return u===void 0?o(()=>{var m=Z(f.value);return n.set(s,m),m}):E(u,f.value,!0),!0},deleteProperty(l,s){var f=n.get(s);if(f===void 0){if(s in l){const u=o(()=>Z(fe));n.set(s,u),dn(i)}}else E(f,fe),dn(i);return!0},get(l,s,f){if(s===cn)return t;var u=n.get(s),m=s in l;if(u===void 0&&(!m||Ht(l,s)?.writable)&&(u=o(()=>{var g=Yt(m?l[s]:fe),w=Z(g);return w}),n.set(s,u)),u!==void 0){var d=c(u);return d===fe?void 0:d}return Reflect.get(l,s,f)},getOwnPropertyDescriptor(l,s){var f=Reflect.getOwnPropertyDescriptor(l,s);if(f&&"value"in f){var u=n.get(s);u&&(f.value=c(u))}else if(f===void 0){var m=n.get(s),d=m?.v;if(m!==void 0&&d!==fe)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,s){if(s===cn)return!0;var f=n.get(s),u=f!==void 0&&f.v!==fe||Reflect.has(l,s);if(f!==void 0||U!==null&&(!u||Ht(l,s)?.writable)){f===void 0&&(f=o(()=>{var d=u?Yt(l[s]):fe,g=Z(d);return g}),n.set(s,f));var m=c(f);if(m===fe)return!1}return u},set(l,s,f,u){var m=n.get(s),d=s in l;if(r&&s==="length")for(var g=f;g<m.v;g+=1){var w=n.get(g+"");w!==void 0?E(w,fe):g in l&&(w=o(()=>Z(fe)),n.set(g+"",w))}if(m===void 0)(!d||Ht(l,s)?.writable)&&(m=o(()=>Z(void 0)),E(m,Yt(f)),n.set(s,m));else{d=m.v!==fe;var C=o(()=>Yt(f));E(m,C)}var p=Reflect.getOwnPropertyDescriptor(l,s);if(p?.set&&p.set.call(u,f),!d){if(r&&typeof s=="string"){var y=n.get("length"),x=Number(s);Number.isInteger(x)&&x>=y.v&&E(y,x+1)}dn(i)}return!0},ownKeys(l){c(i);var s=Reflect.ownKeys(l).filter(m=>{var d=n.get(m);return d===void 0||d.v!==fe});for(var[f,u]of n)u.v!==fe&&!(f in l)&&s.push(f);return s},setPrototypeOf(){zi()}})}var aa,ia,sa,oa;function ss(){if(aa===void 0){aa=window,ia=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;sa=Ht(e,"firstChild").get,oa=Ht(e,"nextSibling").get,Fr(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Fr(n)&&(n.__t=void 0)}}function _t(t=""){return document.createTextNode(t)}function mt(t){return sa.call(t)}function vn(t){return oa.call(t)}function b(t,e){return mt(t)}function An(t,e=!1){{var n=mt(t);return n instanceof Comment&&n.data===""?vn(n):n}}function M(t,e=1,n=!1){let r=t;for(;e--;)r=vn(r);return r}function os(t){t.textContent=""}function la(){return!1}function ca(t,e,n){return document.createElementNS(Br,t,void 0)}function $n(t){var e=F,n=U;Me(null),Ke(null);try{return t()}finally{Me(e),Ke(n)}}function ls(t){U===null&&(F===null&&Si(),xi()),wt&&yi()}function cs(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function it(t,e,n){var r=U;r!==null&&(r.f&we)!==0&&(t|=we);var i={ctx:Ae,deps:null,nodes:null,f:t|ce|ze,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{Zt(i)}catch(l){throw he(i),l}else e!==null&&Oe(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Ut)===0&&(a=a.first,(t&et)!==0&&(t&Bt)!==0&&a!==null&&(a.f|=Bt)),a!==null&&(a.parent=r,r!==null&&cs(a,r),F!==null&&(F.f&le)!==0&&(t&xt)===0)){var o=F;(o.effects??(o.effects=[])).push(a)}return i}function er(){return F!==null&&!He}function fa(t){const e=it(kn,null,!1);return ne(e,ie),e.teardown=t,e}function zt(t){ls();var e=U.f,n=!F&&(e&Fe)!==0&&(e&St)===0;if(n){var r=Ae;(r.e??(r.e=[])).push(t)}else return ua(t)}function ua(t){return it(ln|gi,t,!1)}function fs(t){pt.ensure();const e=it(xt|Ut,t,!0);return(n={})=>new Promise(r=>{n.outro?At(e,()=>{he(e),r(void 0)}):(he(e),r(void 0))})}function da(t){return it(ln,t,!1)}function us(t){return it(Gn|Ut,t,!0)}function va(t,e=0){return it(kn|e,t,!0)}function P(t,e=[],n=[],r=[]){Xi(r,e,n,i=>{it(kn,()=>t(...i.map(c)),!0)})}function tr(t,e=0){var n=it(et|e,t,!0);return n}function Pe(t){return it(Fe|Ut,t,!0)}function ha(t){var e=t.teardown;if(e!==null){const n=wt,r=F;ba(!0),Me(null);try{e.call(null)}finally{ba(n),Me(r)}}}function nr(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&$n(()=>{i.abort(kt)});var r=n.next;(n.f&xt)!==0?n.parent=null:he(n,e),n=r}}function ds(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&Fe)===0&&he(e),e=n}}function he(t,e=!0){var n=!1;(e||(t.f&Pr)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(pa(t.nodes.start,t.nodes.end),n=!0),nr(t,e&&!n),pn(t,0),ne(t,tt);var r=t.nodes&&t.nodes.t;if(r!==null)for(const a of r)a.stop();ha(t);var i=t.parent;i!==null&&i.first!==null&&ga(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=null}function pa(t,e){for(;t!==null;){var n=t===e?null:vn(t);t.remove(),t=n}}function ga(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function At(t,e,n=!0){var r=[];_a(t,r,!0);var i=()=>{n&&he(t),e&&e()},a=r.length;if(a>0){var o=()=>--a||i();for(var l of r)l.out(o)}else i()}function _a(t,e,n){if((t.f&we)===0){t.f^=we;var r=t.nodes&&t.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&e.push(l);for(var i=t.first;i!==null;){var a=i.next,o=(i.f&Bt)!==0||(i.f&Fe)!==0&&(t.f&et)!==0;_a(i,e,o?n:!1),i=a}}}function rr(t){ma(t,!0)}function ma(t,e){if((t.f&we)!==0){t.f^=we,(t.f&ie)===0&&(ne(t,ce),Oe(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&Bt)!==0||(n.f&Fe)!==0;ma(n,i?e:!1),n=r}var a=t.nodes&&t.nodes.t;if(a!==null)for(const o of a)(o.is_global||e)&&o.in()}}function wa(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:vn(n);e.append(n),n=i}}let Tn=!1,wt=!1;function ba(t){wt=t}let F=null,He=!1;function Me(t){F=t}let U=null;function Ke(t){U=t}let Re=null;function ya(t){F!==null&&(Re===null?Re=[t]:Re.push(t))}let pe=null,be=0,je=null;function vs(t){je=t}let xa=1,Tt=0,Mt=Tt;function Sa(t){Mt=t}function Ca(){return++xa}function hn(t){var e=t.f;if((e&ce)!==0)return!0;if(e&le&&(t.f&=~Ct),(e&Le)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(hn(a)&&ea(a),a.wv>t.wv)return!0}(e&ze)!==0&&qe===null&&ne(t,ie)}return!1}function ka(t,e,n=!0){var r=t.reactions;if(r!==null&&!(Re!==null&&Pt.call(Re,t)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&le)!==0?ka(a,e,!1):e===a&&(n?ne(a,ce):(a.f&ie)!==0&&ne(a,Le),Oe(a))}}function Ea(t){var C;var e=pe,n=be,r=je,i=F,a=Re,o=Ae,l=He,s=Mt,f=t.f;pe=null,be=0,je=null,F=(f&(Fe|xt))===0?t:null,Re=null,Vt(t.ctx),He=!1,Mt=++Tt,t.ac!==null&&($n(()=>{t.ac.abort(kt)}),t.ac=null);try{t.f|=Kn;var u=t.fn,m=u();t.f|=St;var d=t.deps,g=$?.is_fork;if(pe!==null){var w;if(g||pn(t,be),d!==null&&be>0)for(d.length=be+pe.length,w=0;w<pe.length;w++)d[be+w]=pe[w];else t.deps=d=pe;if(er()&&(t.f&ze)!==0)for(w=be;w<d.length;w++)((C=d[w]).reactions??(C.reactions=[])).push(t)}else!g&&d!==null&&be<d.length&&(pn(t,be),d.length=be);if(Kr()&&je!==null&&!He&&d!==null&&(t.f&(le|Le|ce))===0)for(w=0;w<je.length;w++)ka(je[w],t);if(i!==null&&i!==t){if(Tt++,i.deps!==null)for(let p=0;p<n;p+=1)i.deps[p].rv=Tt;if(e!==null)for(const p of e)p.rv=Tt;je!==null&&(r===null?r=je:r.push(...je))}return(t.f&ht)!==0&&(t.f^=ht),m}catch(p){return Gr(p)}finally{t.f^=Kn,pe=e,be=n,je=r,F=i,Re=a,Vt(o),He=l,Mt=s}}function hs(t,e){let n=e.reactions;if(n!==null){var r=ci.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&le)!==0&&(pe===null||!Pt.call(pe,e))){var a=e;(a.f&ze)!==0&&(a.f^=ze,a.f&=~Ct),Wn(a),rs(a),pn(a,0)}}function pn(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)hs(t,n[r])}function Zt(t){var e=t.f;if((e&tt)===0){ne(t,ie);var n=U,r=Tn;U=t,Tn=!0;try{(e&(et|qr))!==0?ds(t):nr(t),ha(t);var i=Ea(t);t.teardown=typeof i=="function"?i:null,t.wv=xa;var a;Un&&Bi&&(t.f&ce)!==0&&t.deps}finally{Tn=r,U=n}}}function c(t){var e=t.f,n=(e&le)!==0;if(F!==null&&!He){var r=U!==null&&(U.f&tt)!==0;if(!r&&(Re===null||!Pt.call(Re,t))){var i=F.deps;if((F.f&Kn)!==0)t.rv<Tt&&(t.rv=Tt,pe===null&&i!==null&&i[be]===t?be++:pe===null?pe=[t]:pe.push(t));else{(F.deps??(F.deps=[])).push(t);var a=t.reactions;a===null?t.reactions=[F]:Pt.call(a,F)||a.push(F)}}}if(wt&>.has(t))return gt.get(t);if(n){var o=t;if(wt){var l=o.v;return((o.f&ie)===0&&o.reactions!==null||Aa(o))&&(l=Xn(o)),gt.set(o,l),l}var s=(o.f&ze)===0&&!He&&F!==null&&(Tn||(F.f&ze)!==0),f=(o.f&St)===0;hn(o)&&(s&&(o.f|=ze),ea(o)),s&&!f&&(ta(o),za(o))}if(qe?.has(t))return qe.get(t);if((t.f&ht)!==0)throw t.v;return t.v}function za(t){if(t.f|=ze,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&le)!==0&&(e.f&ze)===0&&(ta(e),za(e))}function Aa(t){if(t.v===fe)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(gt.has(e)||(e.f&le)!==0&&Aa(e))return!0;return!1}function ar(t){var e=He;try{return He=!0,t()}finally{He=e}}const ps=["touchstart","touchmove"];function gs(t){return ps.includes(t)}const Rt=Symbol("events"),Ta=new Set,ir=new Set;function _s(t,e,n,r={}){function i(a){if(r.capture||or.call(e,a),!a.cancelBubble)return $n(()=>n?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?rt(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function sr(t,e,n,r,i){var a={capture:r,passive:i},o=_s(t,e,n,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&fa(()=>{e.removeEventListener(t,o,a)})}function Mn(t,e,n){(e[Rt]??(e[Rt]={}))[t]=n}function ms(t){for(var e=0;e<t.length;e++)Ta.add(t[e]);for(var n of ir)n(t)}let Ma=null;function or(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],a=i[0]||t.target;Ma=t;var o=0,l=Ma===t&&t[Rt];if(l){var s=i.indexOf(l);if(s!==-1&&(e===document||e===window)){t[Rt]=e;return}var f=i.indexOf(e);if(f===-1)return;s<=f&&(o=s)}if(a=i[o]||t.target,a!==e){fi(t,"currentTarget",{configurable:!0,get(){return a||n}});var u=F,m=U;Me(null),Ke(null);try{for(var d,g=[];a!==null;){var w=a.assignedSlot||a.parentNode||a.host||null;try{var C=a[Rt]?.[r];C!=null&&(!a.disabled||t.target===a)&&C.call(a,t)}catch(p){d?g.push(p):d=p}if(t.cancelBubble||w===e||w===null)break;a=w}if(d){for(let p of g)queueMicrotask(()=>{throw p});throw d}}finally{t[Rt]=e,delete t.currentTarget,Me(u),Ke(m)}}}const ws=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function bs(t){return ws?.createHTML(t)??t}function Ra(t,e=!1){var n=ca("template");return t=t.replaceAll("<!>","<!---->"),n.innerHTML=e?bs(t):t,n.content}function Rn(t,e){var n=U;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function z(t,e){var n=(e&qi)!==0,r=(e&Oi)!==0,i,a=!t.startsWith("<!>");return()=>{i===void 0&&(i=Ra(a?t:"<!>"+t,!0),n||(i=mt(i)));var o=r||ia?document.importNode(i,!0):i.cloneNode(!0);if(n){var l=mt(o),s=o.lastChild;Rn(l,s)}else Rn(o,o);return o}}function lr(){var t=document.createDocumentFragment(),e=document.createComment(""),n=_t();return t.append(e,n),Rn(e,n),t}function k(t,e){t!==null&&t.before(e)}function Y(t,e){var n=e==null?"":typeof e=="object"?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function ys(t,e){return xs(t,e)}const jn=new Map;function xs(t,{target:e,anchor:n,props:r={},events:i,context:a,intro:o=!0}){ss();var l=void 0,s=fs(()=>{var f=n??e.appendChild(_t());Zi(f,{pending:()=>{}},d=>{fn({});var g=Ae;a&&(g.c=a),i&&(r.$$events=i),l=t(d,r)||{},un()});var u=new Set,m=d=>{for(var g=0;g<d.length;g++){var w=d[g];if(!u.has(w)){u.add(w);var C=gs(w);for(const x of[e,document]){var p=jn.get(x);p===void 0&&(p=new Map,jn.set(x,p));var y=p.get(w);y===void 0?(x.addEventListener(w,or,{passive:C}),p.set(w,1)):p.set(w,y+1)}}}};return m(Cn(Ta)),ir.add(m),()=>{for(var d of u)for(const C of[e,document]){var g=jn.get(C),w=g.get(d);--w==0?(C.removeEventListener(d,or),g.delete(d),g.size===0&&jn.delete(C)):g.set(d,w)}ir.delete(m),f!==n&&f.parentNode?.removeChild(f)}});return cr.set(l,s),l}let cr=new WeakMap;function Ss(t,e){const n=cr.get(t);return n?(cr.delete(t),n(e)):Promise.resolve()}class Cs{constructor(e,n=!0){$e(this,"anchor");q(this,Ue,new Map);q(this,Ze,new Map);q(this,Se,new Map);q(this,Ft,new Set);q(this,bn,!0);q(this,yn,()=>{var e=$;if(v(this,Ue).has(e)){var n=v(this,Ue).get(e),r=v(this,Ze).get(n);if(r)rr(r),v(this,Ft).delete(n);else{var i=v(this,Se).get(n);i&&(v(this,Ze).set(n,i.effect),v(this,Se).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,o]of v(this,Ue)){if(v(this,Ue).delete(a),a===e)break;const l=v(this,Se).get(o);l&&(he(l.effect),v(this,Se).delete(o))}for(const[a,o]of v(this,Ze)){if(a===n||v(this,Ft).has(a))continue;const l=()=>{if(Array.from(v(this,Ue).values()).includes(a)){var f=document.createDocumentFragment();wa(o,f),f.append(_t()),v(this,Se).set(a,{effect:o,fragment:f})}else he(o);v(this,Ft).delete(a),v(this,Ze).delete(a)};v(this,bn)||!r?(v(this,Ft).add(a),At(o,l,!1)):l()}}});q(this,qn,e=>{v(this,Ue).delete(e);const n=Array.from(v(this,Ue).values());for(const[r,i]of v(this,Se))n.includes(r)||(he(i.effect),v(this,Se).delete(r))});this.anchor=e,N(this,bn,n)}ensure(e,n){var r=$,i=la();if(n&&!v(this,Ze).has(e)&&!v(this,Se).has(e))if(i){var a=document.createDocumentFragment(),o=_t();a.append(o),v(this,Se).set(e,{effect:Pe(()=>n(o)),fragment:a})}else v(this,Ze).set(e,Pe(()=>n(this.anchor)));if(v(this,Ue).set(r,e),i){for(const[l,s]of v(this,Ze))l===e?r.unskip_effect(s):r.skip_effect(s);for(const[l,s]of v(this,Se))l===e?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(v(this,yn)),r.ondiscard(v(this,qn))}else v(this,yn).call(this)}}Ue=new WeakMap,Ze=new WeakMap,Se=new WeakMap,Ft=new WeakMap,bn=new WeakMap,yn=new WeakMap,qn=new WeakMap;function L(t,e,n=!1){var r=new Cs(t),i=n?Bt:0;function a(o,l){r.ensure(o,l)}tr(()=>{var o=!1;e((l,s=0)=>{o=!0,a(s,l)}),o||a(!1,null)},i)}function In(t,e){return e}function ks(t,e,n){for(var r=[],i=e.length,a,o=e.length,l=0;l<i;l++){let m=e[l];At(m,()=>{if(a){if(a.pending.delete(m),a.done.add(m),a.pending.size===0){var d=t.outrogroups;fr(Cn(a.done)),d.delete(a),d.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var s=r.length===0&&n!==null;if(s){var f=n,u=f.parentNode;os(u),u.append(f),t.items.clear()}fr(e,!s)}else a={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(a)}function fr(t,e=!0){for(var n=0;n<t.length;n++)he(t[n],e)}var ja;function Nn(t,e,n,r,i,a=null){var o=t,l=new Map,s=(e&Hr)!==0;if(s){var f=t;o=f.appendChild(_t())}var u=null,m=$r(()=>{var y=n();return Nr(y)?y:y==null?[]:Cn(y)}),d,g=!0;function w(){p.fallback=u,Es(p,d,o,e,r),u!==null&&(d.length===0?(u.f&nt)===0?rr(u):(u.f^=nt,_n(u,null,o)):At(u,()=>{u=null}))}var C=tr(()=>{d=c(m);for(var y=d.length,x=new Set,R=$,S=la(),T=0;T<y;T+=1){var J=d[T],V=r(J,T),H=g?null:l.get(V);H?(H.v&&Wt(H.v,J),H.i&&Wt(H.i,T),S&&R.unskip_effect(H.e)):(H=zs(l,g?o:ja??(ja=_t()),J,V,T,i,e,n),g||(H.e.f|=nt),l.set(V,H)),x.add(V)}if(y===0&&a&&!u&&(g?u=Pe(()=>a(o)):(u=Pe(()=>a(ja??(ja=_t()))),u.f|=nt)),y>x.size&&bi(),!g)if(S){for(const[Q,B]of l)x.has(Q)||R.skip_effect(B.e);R.oncommit(w),R.ondiscard(()=>{})}else w();c(m)}),p={effect:C,items:l,outrogroups:null,fallback:u};g=!1}function gn(t){for(;t!==null&&(t.f&Fe)===0;)t=t.next;return t}function Es(t,e,n,r,i){var a=(r&ji)!==0,o=e.length,l=t.items,s=gn(t.effect.first),f,u=null,m,d=[],g=[],w,C,p,y;if(a)for(y=0;y<o;y+=1)w=e[y],C=i(w,y),p=l.get(C).e,(p.f&nt)===0&&(p.nodes?.a?.measure(),(m??(m=new Set)).add(p));for(y=0;y<o;y+=1){if(w=e[y],C=i(w,y),p=l.get(C).e,t.outrogroups!==null)for(const B of t.outrogroups)B.pending.delete(p),B.done.delete(p);if((p.f&nt)!==0)if(p.f^=nt,p===s)_n(p,null,n);else{var x=u?u.next:s;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),bt(t,u,p),bt(t,p,x),_n(p,x,n),u=p,d=[],g=[],s=gn(u.next);continue}if((p.f&we)!==0&&(rr(p),a&&(p.nodes?.a?.unfix(),(m??(m=new Set)).delete(p))),p!==s){if(f!==void 0&&f.has(p)){if(d.length<g.length){var R=g[0],S;u=R.prev;var T=d[0],J=d[d.length-1];for(S=0;S<d.length;S+=1)_n(d[S],R,n);for(S=0;S<g.length;S+=1)f.delete(g[S]);bt(t,T.prev,J.next),bt(t,u,T),bt(t,J,R),s=R,u=J,y-=1,d=[],g=[]}else f.delete(p),_n(p,s,n),bt(t,p.prev,p.next),bt(t,p,u===null?t.effect.first:u.next),bt(t,u,p),u=p;continue}for(d=[],g=[];s!==null&&s!==p;)(f??(f=new Set)).add(s),g.push(s),s=gn(s.next);if(s===null)continue}(p.f&nt)===0&&d.push(p),u=p,s=gn(p.next)}if(t.outrogroups!==null){for(const B of t.outrogroups)B.pending.size===0&&(fr(Cn(B.done)),t.outrogroups?.delete(B));t.outrogroups.size===0&&(t.outrogroups=null)}if(s!==null||f!==void 0){var V=[];if(f!==void 0)for(p of f)(p.f&we)===0&&V.push(p);for(;s!==null;)(s.f&we)===0&&s!==t.fallback&&V.push(s),s=gn(s.next);var H=V.length;if(H>0){var Q=(r&Hr)!==0&&o===0?n:null;if(a){for(y=0;y<H;y+=1)V[y].nodes?.a?.measure();for(y=0;y<H;y+=1)V[y].nodes?.a?.fix()}ks(t,V,Q)}}a&&rt(()=>{if(m!==void 0)for(p of m)p.nodes?.a?.apply()})}function zs(t,e,n,r,i,a,o,l){var s=(o&Mi)!==0?(o&Ii)===0?as(n,!1,!1):Et(n):null,f=(o&Ri)!==0?Et(i):null;return{v:s,i:f,e:Pe(()=>(a(e,s??n,f??i,l),()=>{t.delete(r)}))}}function _n(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,a=e&&(e.f&nt)===0?e.nodes.start:n;r!==null;){var o=vn(r);if(a.before(r),r===i)return;r=o}}function bt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Ia(t,e,n=!1,r=!1,i=!1){var a=t,o="";P(()=>{var l=U;if(o!==(o=e()??"")&&(l.nodes!==null&&(pa(l.nodes.start,l.nodes.end),l.nodes=null),o!=="")){var s=o+"";n?s=`<svg>${s}</svg>`:r&&(s=`<math>${s}</math>`);var f=Ra(s);if((n||r)&&(f=mt(f)),Rn(mt(f),f.lastChild),n||r)for(;mt(f);)a.before(mt(f));else a.before(f)}})}function st(t,e){da(()=>{var n=t.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+e.hash)){const i=ca("style");i.id=e.hash,i.textContent=e.code,r.appendChild(i)}})}const Na=[...`
|
|
5
|
+
\r\f \v\uFEFF`];function As(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var l=o+a;(o===0||Na.includes(r[o-1]))&&(l===r.length||Na.includes(r[l]))?r=(o===0?"":r.substring(0,o))+r.substring(l+1):o=l}}return r===""?null:r}function Ts(t,e){return t==null?null:String(t)}function ot(t,e,n,r,i,a){var o=t.__className;if(o!==n||o===void 0){var l=As(n,r,a);l==null?t.removeAttribute("class"):t.className=l,t.__className=n}else if(a&&i!==a)for(var s in a){var f=!!a[s];(i==null||f!==!!i[s])&&t.classList.toggle(s,f)}return a}function Ie(t,e,n,r){var i=t.__style;if(i!==e){var a=Ts(e);a==null?t.removeAttribute("style"):t.style.cssText=a,t.__style=e}return r}const Ms=Symbol("is custom element"),Rs=Symbol("is html");function Jt(t,e,n,r){var i=js(t);i[e]!==(i[e]=n)&&(e==="loading"&&(t[mi]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Is(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function js(t){return t.__attributes??(t.__attributes={[Ms]:t.nodeName.includes("-"),[Rs]:t.namespaceURI===Br})}var Da=new Map;function Is(t){var e=t.getAttribute("is")||t.nodeName,n=Da.get(e);if(n)return n;Da.set(e,n=[]);for(var r,i=t,a=Element.prototype;a!==i;){r=ui(i);for(var o in r)r[o].set&&n.push(o);i=Dr(i)}return n}function Fa(t,e){return t===e||t?.[cn]===e}function La(t={},e,n,r){return da(()=>{var i,a;return va(()=>{i=a,a=[],ar(()=>{t!==n(...a)&&(e(t,...a),i&&Fa(n(...i),t)&&e(null,...i))})}),()=>{rt(()=>{a&&Fa(n(...a),t)&&e(null,...a)})}}),t}let Dn=!1;function Ns(t){var e=Dn;try{return Dn=!1,[t(),Dn]}finally{Dn=e}}function A(t,e,n,r){var i=(n&Fi)!==0,a=(n&Li)!==0,o=r,l=!0,s=()=>(l&&(l=!1,o=a?ar(r):r),o),f;if(i){var u=cn in t||_i in t;f=Ht(t,e)?.set??(u&&e in t?x=>t[e]=x:void 0)}var m,d=!1;i?[m,d]=Ns(()=>t[e]):m=t[e],m===void 0&&r!==void 0&&(m=s(),f&&(ki(),f(m)));var g;if(g=()=>{var x=t[e];return x===void 0?s():(l=!0,x)},(n&Di)===0)return g;if(f){var w=t.$$legacy;return(function(x,R){return arguments.length>0?((!R||w||d)&&f(R?g():x),x):g()})}var C=!1,p=((n&Ni)!==0?zn:$r)(()=>(C=!1,g()));i&&c(p);var y=U;return(function(x,R){if(arguments.length>0){const S=R?c(p):i?Yt(x):x;return E(p,S),C=!0,o!==void 0&&(o=S),x}return wt&&C||(y.f&tt)!==0?p.v:c(p)})}function Ds(t,e){var n,r;return r=class{constructor(a){q(this,n,null);if(!on)throw new Error(`[sevn] ${e} só pode ser instanciado no navegador. Em SSR, monte o componente dentro de um efeito de cliente.`);const{target:o,...l}=a??{},s=typeof o=="string"?document.querySelector(o):o;if(!s)throw new Error(`[sevn] ${e}: alvo não encontrado`+(typeof o=="string"?` para o seletor "${o}".`:"."));ni(),N(this,n,ys(t,{target:s,props:l}))}destroy(){if(!v(this,n))return Promise.resolve();const a=v(this,n);return N(this,n,null),Ss(a)}},n=new WeakMap,r}function qa(t){try{return new URL(t,document.baseURI).searchParams.get("cid")}catch{return null}}function Fs(){const t=document.currentScript;if(t?.src){const n=qa(t.src);if(n)return n}const e=document.querySelectorAll('script[src*="cid="]');for(const n of e){const r=qa(n.src);if(r)return r}return null}function Ls(){if(!on)return;const t=Fs();if(t)try{Hn(t)}catch(e){console.error("[sevn] Chave inválida na tag <script>:",e)}}const qs="5";typeof window<"u"&&((Ga=window.__svelte??(window.__svelte={})).v??(Ga.v=new Set)).add(qs);const Os="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",Ps="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 Hs=z('<span class="avatar-tag svelte-ga6vh2"> </span>'),Bs=z('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const Us={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 Oa(t,e){st(t,Us);let n=A(e,"avatar",3,"man"),r=A(e,"size",3,"md"),i=A(e,"tagColor",3,"var(--sevn-color-green)"),a=Z(!1);const o=O(()=>n()==="woman"?Ps:Os),l=O(()=>!!e.photoUrl&&!c(a)),s=O(()=>c(l)?e.photoUrl:c(o)),f={sm:"40px",md:"56px",lg:"72px"},u={sm:{fontSize:"9px",padding:"1px 5px"},md:{fontSize:"12px",padding:"2px 8px"},lg:{fontSize:"14px",padding:"3px 10px"}},m=O(()=>f[r()]??r()),d=O(()=>u[r()]??u.md);var g=Bs(),w=b(g),C=b(w);let p;var y=M(w,2);{var x=R=>{var S=Hs(),T=b(S);P(()=>{Ie(S,`background-color: ${i()??""}; font-size: ${c(d).fontSize??""}; padding: ${c(d).padding??""};`),Y(T,e.tag)}),k(R,S)};L(y,R=>{e.tag&&R(x)})}P(()=>{Ie(w,`background-color: ${e.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${c(m)??""}; height: ${c(m)??""};`),p=ot(C,1,"avatar-image svelte-ga6vh2",null,p,{"avatar-image--photo":c(l)}),Jt(C,"src",c(s)),Jt(C,"alt",e.name)}),sr("error",C,()=>E(a,!0)),k(t,g)}var Vs=z("<span> </span>");const Ks={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 lt(t,e){st(t,Ks);let n=A(e,"color",3,"#1C1C1C"),r=A(e,"fontSize",3,"0.6875rem"),i=A(e,"class",3,"");var a=Vs(),o=b(a);P(()=>{ot(a,1,`tag ${i()??""}`,"svelte-pamnib"),Ie(a,`background-color: ${n()??""}; font-size: ${r()??""}`),Y(o,e.label)}),k(t,a)}var Gs=z('<p class="candidate-description svelte-q1jzvs"> </p>'),Ws=z('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),Ys=z('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),Zs=z('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),Js=z('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),Xs=z('<div class="candidate-wrapper svelte-q1jzvs"><!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div></div>'),Qs=z('<p class="candidate-description svelte-q1jzvs"> </p>'),$s=z('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),eo=z('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),to=z('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),no=z('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),ro=z('<!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div>',1),ao=z("<span> </span>"),io=z('<div class="candidate svelte-q1jzvs"><!> <!></div>');const so={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;}
|
|
6
|
+
|
|
7
|
+
/* 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;}
|
|
8
|
+
|
|
9
|
+
/* ── 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;}
|
|
10
|
+
|
|
11
|
+
@media (min-width: 768px) {.candidate-stats.svelte-q1jzvs {flex-direction:row;gap:8px;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:none;}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (max-width: 640px) {.candidate.svelte-q1jzvs {flex:1;flex-wrap:wrap;align-items:center;}.candidate-info.svelte-q1jzvs {flex:1;}
|
|
15
|
+
|
|
16
|
+
/* 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;}
|
|
17
|
+
}`};function oo(t,e){st(t,so);let n=A(e,"avatar",3,"man"),r=A(e,"elected",3,!1),i=A(e,"electedLabel",3,"ELEITO"),a=A(e,"electedColor",3,"var(--sevn-color-green)"),o=A(e,"descriptionSide",3,"inline"),l=A(e,"positionSide",3,"right"),s=A(e,"size",3,"md"),f=A(e,"nameWeight",3,700),u=A(e,"descWeight",3,400),m=A(e,"wrapper",3,!1);const d={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"}},g=O(()=>d[s()]??d.md);var w=io(),C=b(w);{var p=S=>{var T=Xs(),J=b(T);Oa(J,{get name(){return e.name},get photoUrl(){return e.photoUrl},get avatar(){return n()},get avatarColor(){return e.avatarColor},get size(){return s()},get tag(){return e.avatarTag},get tagColor(){return e.avatarTagColor}});var V=M(J,2);let H;var Q=b(V),B=b(Q),de=b(B),ge=M(B,2);{var Ce=I=>{{let X=O(()=>e.tagColor??"var(--sevn-color-secondary)"),re=O(()=>e.tagSize??c(g).tagSize);lt(I,{get label(){return e.tag},get color(){return c(X)},get fontSize(){return c(re)}})}};L(ge,I=>{e.tag&&I(Ce)})}var Ne=M(ge,2);{var Ve=I=>{{let X=O(()=>e.tagSize??c(g).tagSize);lt(I,{get label(){return i()},get color(){return a()},get fontSize(){return c(X)}})}};L(Ne,I=>{r()&&I(Ve)})}var vt=M(Q,2);{var Je=I=>{var X=Gs(),re=b(X);P(()=>Y(re,e.description)),k(I,X)},ue=I=>{var X=Js(),re=b(X);{var Xe=K=>{var ae=Ys(),ke=b(ae),Lt=M(ke);{var h=_=>{var j=Ws(),D=b(j);P(()=>Y(D,e.percentSuffix)),k(_,j)};L(Lt,_=>{e.percentSuffix&&_(h)})}P(()=>Y(ke,`${e.percent??""} `)),k(K,ae)};L(re,K=>{e.percent&&K(Xe)})}var De=M(re,2);{var Qe=K=>{var ae=Zs(),ke=b(ae);P(()=>Y(ke,e.votes)),k(K,ae)};L(De,K=>{e.votes&&K(Qe)})}k(I,X)};L(vt,I=>{e.description?I(Je):(e.percent||e.votes)&&I(ue,1)})}P(()=>{H=ot(V,1,"candidate-info svelte-q1jzvs",null,H,{right:o()==="right"&&!!e.description}),Y(de,e.name)}),k(S,T)},y=S=>{var T=ro(),J=An(T);Oa(J,{get name(){return e.name},get photoUrl(){return e.photoUrl},get avatar(){return n()},get avatarColor(){return e.avatarColor},get size(){return s()},get tag(){return e.avatarTag},get tagColor(){return e.avatarTagColor}});var V=M(J,2);let H;var Q=b(V),B=b(Q),de=b(B),ge=M(B,2);{var Ce=I=>{{let X=O(()=>e.tagColor??"var(--sevn-color-secondary)"),re=O(()=>e.tagSize??c(g).tagSize);lt(I,{get label(){return e.tag},get color(){return c(X)},get fontSize(){return c(re)}})}};L(ge,I=>{e.tag&&I(Ce)})}var Ne=M(ge,2);{var Ve=I=>{{let X=O(()=>e.tagSize??c(g).tagSize);lt(I,{get label(){return i()},get color(){return a()},get fontSize(){return c(X)}})}};L(Ne,I=>{r()&&I(Ve)})}var vt=M(Q,2);{var Je=I=>{var X=Qs(),re=b(X);P(()=>Y(re,e.description)),k(I,X)},ue=I=>{var X=no(),re=b(X);{var Xe=K=>{var ae=eo(),ke=b(ae),Lt=M(ke);{var h=_=>{var j=$s(),D=b(j);P(()=>Y(D,e.percentSuffix)),k(_,j)};L(Lt,_=>{e.percentSuffix&&_(h)})}P(()=>Y(ke,`${e.percent??""} `)),k(K,ae)};L(re,K=>{e.percent&&K(Xe)})}var De=M(re,2);{var Qe=K=>{var ae=to(),ke=b(ae);P(()=>Y(ke,e.votes)),k(K,ae)};L(De,K=>{e.votes&&K(Qe)})}k(I,X)};L(vt,I=>{e.description?I(Je):(e.percent||e.votes)&&I(ue,1)})}P(()=>{H=ot(V,1,"candidate-info svelte-q1jzvs",null,H,{right:o()==="right"&&!!e.description}),Y(de,e.name)}),k(S,T)};L(C,S=>{m()?S(p):S(y,!1)})}var x=M(C,2);{var R=S=>{var T=ao();let J;var V=b(T);P(()=>{J=ot(T,1,"candidate-position svelte-q1jzvs",null,J,{left:l()==="left"}),Y(V,e.position)}),k(S,T)};L(x,S=>{e.position&&S(R)})}P(()=>Ie(w,`
|
|
18
|
+
--font-name: ${e.fontSize??c(g).fontSize??""};
|
|
19
|
+
--font-desc: ${e.descSize??c(g).descSize??""};
|
|
20
|
+
--font-tag: ${e.tagSize??c(g).tagSize??""};
|
|
21
|
+
--font-position: ${e.positionSize??c(g).fontSize??""};
|
|
22
|
+
--weight-name: ${f()??""};
|
|
23
|
+
--weight-desc: ${u()??""};
|
|
24
|
+
gap: ${m()?"10px":"18px"};
|
|
25
|
+
`)),k(t,w)}var lo=z("<span> </span>"),co=z('<div class="vote-overview-stats svelte-1m9ufac"></div>'),fo=z("<span> </span>"),uo=z('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),vo=z("<span> </span>"),ho=z('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),po=z('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const go={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 _o(t,e){fn(e,!0),st(t,go);let n=A(e,"data",19,()=>[]),r=A(e,"borderTop",3,!1),i=A(e,"align",3,"start");var a=po(),o=b(a);{var l=u=>{var m=co();Nn(m,21,n,In,(d,g)=>{var w=lo(),C=b(w);P(()=>Y(C,`${c(g).text??""} ${c(g).value??""}`)),k(d,w)}),k(u,m)};L(o,u=>{n().length&&u(l)})}var s=M(o,2);{var f=u=>{var m=ho(),d=b(m);{var g=x=>{var R=fo(),S=b(R);P(()=>Y(S,`Atualizado em ${e.date??""}`)),k(x,R)};L(d,x=>{e.date&&x(g)})}var w=M(d,2);{var C=x=>{var R=uo();k(x,R)};L(w,x=>{e.date&&e.font&&x(C)})}var p=M(w,2);{var y=x=>{var R=vo(),S=b(R);P(()=>Y(S,`Fonte ${e.font??""}`)),k(x,R)};L(p,x=>{e.font&&x(y)})}k(u,m)};L(s,u=>{(e.date||e.font)&&u(f)})}P(()=>Ie(a,`justify-content:${i()==="end"?"flex-end":"flex-start"};${r()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),k(t,a),un()}var mo=z('<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>'),wo=z('<div class="candidates-votes-ranking svelte-icwugj"><div class="candidates-votes-ranking-header svelte-icwugj"><span> </span> <span> </span></div> <!> <!></div>');const bo={hash:"svelte-icwugj",code:`.candidates-votes-ranking.svelte-icwugj {display:flex;flex-direction:column;font-family:inherit;}
|
|
26
|
+
|
|
27
|
+
/* ── 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);}
|
|
28
|
+
|
|
29
|
+
/* ── 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;}
|
|
30
|
+
|
|
31
|
+
/* ── 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;}
|
|
32
|
+
|
|
33
|
+
/* ── 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;}
|
|
34
|
+
|
|
35
|
+
/* ── Responsive ── */
|
|
36
|
+
@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;}
|
|
37
|
+
}`};function yo(t,e){st(t,bo);let n=A(e,"candidates",19,()=>[]),r=A(e,"headerLeft",3,"Partido/ Candidato"),i=A(e,"headerRight",3,"Votos"),a=A(e,"dotSize",3,"12px"),o=A(e,"nameFontSize",3,"1rem"),l=A(e,"nameWeight",3,700),s=A(e,"votesFontSize",3,"0.875rem"),f=A(e,"votesWeight",3,600),u=A(e,"tagFontSize",3,"0.6875rem"),m=A(e,"electedColor",3,"var(--sevn-color-green)"),d=A(e,"electedLabel",3,"ELEITO");const g=O(()=>!!(e.totalVotes||e.date||e.font)),w=O(()=>e.totalVotes?[{text:"Total",value:`${e.totalVotes} votos`}]:[]);var C=wo(),p=b(C),y=b(p),x=b(y),R=M(y,2),S=b(R),T=M(p,2);Nn(T,17,n,In,(H,Q)=>{var B=mo();let de;var ge=b(B),Ce=b(ge),Ne=M(Ce,2),Ve=b(Ne),vt=b(Ve),Je=M(Ve,2);{var ue=K=>{{let ae=O(()=>c(Q).tagColor??"var(--sevn-color-secondary)");lt(K,{get label(){return c(Q).tag},get color(){return c(ae)},get fontSize(){return u()}})}};L(Je,K=>{c(Q).tag&&K(ue)})}var I=M(Je,2);{var X=K=>{lt(K,{get label(){return d()},get color(){return m()},get fontSize(){return u()}})};L(I,K=>{c(Q).elected&&K(X)})}var re=M(I,2);{var Xe=K=>{{let ae=O(()=>c(Q).statusColor??"var(--sevn-color-tertiary)");lt(K,{get label(){return c(Q).statusLabel},get color(){return c(ae)},get fontSize(){return u()}})}};L(re,K=>{c(Q).statusLabel&&K(Xe)})}var De=M(ge,2),Qe=b(De);P(()=>{de=ot(B,1,"candidates-votes-ranking-row svelte-icwugj",null,de,{elected:c(Q).elected}),Ie(Ce,`background-color: ${c(Q).dotColor??"var(--sevn-color-secondary)"??""}`),Y(vt,c(Q).name),Y(Qe,c(Q).votes)}),k(H,B)});var J=M(T,2);{var V=H=>{_o(H,{get data(){return c(w)},get date(){return e.date},get font(){return e.font},borderTop:!0})};L(J,H=>{c(g)&&H(V)})}P(()=>{Ie(C,`
|
|
38
|
+
--dot-size: ${a()??""};
|
|
39
|
+
--name-size: ${o()??""};
|
|
40
|
+
--name-weight: ${l()??""};
|
|
41
|
+
--votes-size: ${s()??""};
|
|
42
|
+
--votes-weight:${f()??""};
|
|
43
|
+
`),Y(x,r()),Y(S,i())}),k(t,C)}var xo=z('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),So=z('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),Co=z('<p class="header-description svelte-1xm1ks6"> </p>'),ko=z('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const Eo={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);}
|
|
44
|
+
|
|
45
|
+
@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);}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
|
|
49
|
+
}`};function zo(t,e){st(t,Eo);var n=ko(),r=b(n);{var i=d=>{var g=xo(),w=b(g);lt(w,{get label(){return e.tag},get color(){return e.tagColor}}),k(d,g)};L(r,d=>{e.tag&&d(i)})}var a=M(r,2),o=b(a),l=b(o),s=M(o,2);{var f=d=>{var g=So(),w=b(g);lt(w,{get label(){return e.tag},get color(){return e.tagColor}}),k(d,g)};L(s,d=>{e.tag&&d(f)})}var u=M(a,2);{var m=d=>{var g=Co(),w=b(g);P(()=>Y(w,e.description)),k(d,g)};L(u,d=>{e.description&&d(m)})}P(()=>{Ie(n,`
|
|
50
|
+
--header-title-font-size: ${e.titleFontSize??"1.75rem"??""};
|
|
51
|
+
--header-title-font-weight: ${e.titleFontWeight??700??""};
|
|
52
|
+
--header-description-font-size: ${e.descriptionFontSize??"0.875rem"??""};
|
|
53
|
+
`),Y(l,e.title)}),k(t,n)}const Pa=new Map,Fn=new Map;function Ao(t){const e=Pa.get(t);if(e!==void 0)return Promise.resolve(e);const n=Fn.get(t);if(n)return n;const r=Sn(`maps/${t}.svg`),i=fetch(r).then(a=>{if(!a.ok)throw new Error(`Mapa indisponível (HTTP ${a.status}): ${t}`);return a.text()}).then(a=>(Pa.set(t,a),Fn.delete(t),a)).catch(a=>{throw Fn.delete(t),a});return Fn.set(t,i),i}function To(){return Sn("data/cities-index.json")}let Mo=0;var Ro=z('<img alt="Mapa do Brasil" decoding="async" class="svelte-1956iuh"/>'),jo=z('<div class="map-placeholder svelte-1956iuh" aria-hidden="true"></div>'),Io=z('<div class="map-error svelte-1956iuh">Mapa não encontrado</div>'),No=z('<p class="map-modal-title svelte-1956iuh"> </p>'),Do=z('<div class="map-modal-item svelte-1956iuh"><!></div>'),Fo=z('<div class="map-modal-footer svelte-1956iuh"> </div>'),Lo=z('<div class="map-modal svelte-1956iuh" role="dialog" tabindex="-1"><div class="map-modal-card svelte-1956iuh"><!> <!> <!></div></div>'),qo=z("<div><!> <!> <!></div>");const Oo={hash:"svelte-1956iuh",code:`.map.svelte-1956iuh {display:block;width:100%;}.map.svelte-1956iuh img:where(.svelte-1956iuh),
|
|
54
|
+
.map.svelte-1956iuh svg {width:100%;height:100%;display:block;}
|
|
55
|
+
|
|
56
|
+
/* Default fill for uncolored paths */.map.svelte-1956iuh path {fill:var(--sevn-color-neutral);}
|
|
57
|
+
|
|
58
|
+
/* Pointer cursor and smooth hover on clickable regions */.map.interactive.svelte-1956iuh path[data-cid],
|
|
59
|
+
.map.interactive.svelte-1956iuh g[data-cid],
|
|
60
|
+
.map.interactive.svelte-1956iuh a[data-cid] {cursor:pointer;}.map.interactive.svelte-1956iuh path[data-cid],
|
|
61
|
+
.map.interactive.svelte-1956iuh a[data-cid] path {transition:filter 0.12s ease;}.map.interactive.svelte-1956iuh path[data-cid]:hover,
|
|
62
|
+
.map.interactive.svelte-1956iuh a[data-cid]:hover path {filter:brightness(1.15);}
|
|
63
|
+
|
|
64
|
+
/* State labels: font-size is set as SVG attr (0.8 user units) so it scales with the map.
|
|
65
|
+
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;}
|
|
66
|
+
|
|
67
|
+
/* Floating modal — positioned at the click point inside the map container.
|
|
68
|
+
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;
|
|
69
|
+
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;}
|
|
70
|
+
|
|
71
|
+
@keyframes svelte-1956iuh-pulse {
|
|
72
|
+
0%, 100% { opacity: 1; }
|
|
73
|
+
50% { opacity: 0.4; }
|
|
74
|
+
}`};function Po(t,e){fn(e,!0),st(t,Oo);let n=A(e,"aspectRatio",3,"4/3"),r=A(e,"class",3,""),i=A(e,"priority",3,!1),a=A(e,"selectionStrokeWidth",3,3),o=A(e,"toggleSelection",3,!1),l=A(e,"modalTrigger",3,"click");const s=O(()=>l()==="click"||l()==="both"),f=O(()=>l()==="hover"||l()==="both"),u=++Mo,m=Sn("maps/brazil-municipalities.svg");let d=O(()=>e.type==="brazil"?`map--brazil-${u}`:e.type==="state"?`map--state-${e.uf??""}-${u}`:`map--muni-${e.uf??""}-${e.municipio??""}-${u}`),g=O(()=>!!e.interactive||!!e.onRegionClick||!!e.onRegionHover||!!e.selectionStroke||!!e.modalData),w=O(()=>e.type==="brazil-states"||e.type!=="brazil"||!!e.colors?.length||!!e.labels||!!e.onRegionClick||!!e.onRegionHover||!!e.selectionStroke||!!e.modalData),C=O(()=>c(w)?e.type==="brazil-states"?"br":e.type==="brazil"&&e.labels?"brazil-municipalities-labeled":e.type==="brazil"?"brazil-municipalities":e.type==="state"&&e.uf?`states/${e.uf}`:e.uf&&e.municipio?`municipalities/${e.uf}/${e.municipio}`:null:null),p=Z(null);zt(()=>{e.selected!==void 0&&E(p,e.selected,!0)});let y=Z(null),x=Z(0),R=Z(0),S=Z(""),T=Z(!1),J=Z(!1),V=O(()=>e.type==="brazil"||e.type==="state"?`.${c(d)} path{stroke:#8a8a92;stroke-width:0.5px;vector-effect:non-scaling-stroke}`:""),H=O(()=>e.colors?.length?e.colors.map(({id:h,color:_,match:j})=>{const D=j==="endsWith"?`[data-cid$="::${h}"]`:`[data-cid="${h}"]`;return`.${c(d)} path${D},.${c(d)} ${D} path{fill:${_}!important}`}).join(""):""),Q=O(()=>c(p)&&e.selectionStroke?`.${c(d)} [data-cid="${c(p)}"] path{stroke:${e.selectionStroke}!important;stroke-width:${a()}px!important;vector-effect:non-scaling-stroke!important;paint-order:stroke fill!important}`:""),B=O(()=>on?c(V)+c(H)+c(Q):""),de,ge=0;zt(()=>{const h=c(C);if(!h){E(S,""),E(T,!1);return}const _=++ge;function j(){E(T,!0),E(J,!1),E(S,""),Ao(h).then(ee=>{_===ge&&(E(S,ee,!0),E(T,!1),queueMicrotask(()=>{const _e=de?.querySelector("svg");if(!_e)return;const me=_e.querySelector(".map-labels");if(me){_e.appendChild(me);return}_e.querySelectorAll("text").forEach(xn=>_e.appendChild(xn))}))}).catch(()=>{_===ge&&(E(J,!0),E(T,!1))})}if(i()){j();return}if(!de){j();return}const D=new IntersectionObserver(([ee])=>{ee.isIntersecting&&(D.disconnect(),j())},{rootMargin:"200px"});return D.observe(de),()=>D.disconnect()}),zt(()=>{if(!e.modalData)return;function h(_){_.key==="Escape"&&E(y,null)}return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)});let Ce=Z(null);function Ne(h,_){const j=_.getAttribute("data-cid")??"",D=j.split("::"),ee=D.length>1?D[1]||void 0:D[0]||void 0,_e=D.length>1&&D[0]||void 0;return{cid:j,uf:ee,municipio:_e,clientX:h.clientX,clientY:h.clientY,element:_}}function Ve(h){if(!c(g))return;const _=h.target.closest("[data-cid]");if(!_){l()==="click"&&E(y,null);return}const j=_.getAttribute("data-cid")??"";if(!j)return;E(p,o()&&c(p)===j?null:j,!0);const D=_.closest("svg"),ee=_.parentNode;if(D&&ee)if(ee===D){const me=D.querySelector(":scope > .map-labels")??Array.from(D.children).find(xn=>xn.nodeName==="text");me?D.insertBefore(_,me):D.appendChild(_)}else ee.appendChild(_);const _e=Ne(h,_);if(e.modalData&&c(s))if(c(y)?.cid===j)E(y,null);else{const me=h.currentTarget.getBoundingClientRect();E(x,h.clientX-me.left),E(R,h.clientY-me.top),E(y,_e,!0)}e.onRegionClick?.(_e)}function vt(h){if(!c(g)||!e.onRegionHover&&!c(f))return;const _=h.target.closest("[data-cid]");if(!_)return;const j=_.getAttribute("data-cid")??"";if(!j||j===c(Ce))return;E(Ce,j,!0);const D=Ne(h,_);if(e.modalData&&c(f)){const ee=h.currentTarget.getBoundingClientRect();E(x,h.clientX-ee.left),E(R,h.clientY-ee.top),E(y,D,!0)}e.onRegionHover?.(D)}function Je(){E(Ce,null),c(f)&&E(y,null)}var ue=qo();let I;var X=b(ue);{var re=h=>{var _=lr(),j=An(_);Ia(j,()=>`<style>${c(B)}</style>`),k(h,_)};L(X,h=>{c(B)&&h(re)})}var Xe=M(X,2);{var De=h=>{var _=Ro();P(()=>{Jt(_,"src",m),Jt(_,"fetchpriority",i()?"high":"auto"),Jt(_,"loading",i()?"eager":"lazy")}),k(h,_)},Qe=h=>{var _=jo();k(h,_)},K=h=>{var _=Io();k(h,_)},ae=h=>{var _=lr(),j=An(_);Ia(j,()=>c(S)),k(h,_)};L(Xe,h=>{e.type==="brazil"&&!c(S)&&!c(T)?h(De):c(T)?h(Qe,1):c(J)?h(K,2):c(S)&&h(ae,3)})}var ke=M(Xe,2);{var Lt=h=>{const _=O(()=>e.modalData[c(y).cid]);var j=lr(),D=An(j);{var ee=_e=>{var me=Lo(),xn=b(me),Wa=b(xn);{var cl=Ee=>{var ve=No(),an=b(ve);P(()=>Y(an,`${c(_).title??""}:`)),k(Ee,ve)};L(Wa,Ee=>{c(_).title&&Ee(cl)})}var Ya=M(Wa,2);Nn(Ya,17,()=>c(_).items,In,(Ee,ve)=>{var an=Do(),dl=b(an);oo(dl,{get name(){return c(ve).name},get tag(){return c(ve).tag},get tagColor(){return c(ve).tagColor},get photoUrl(){return c(ve).photoUrl},get avatar(){return c(ve).avatar},get avatarColor(){return c(ve).avatarColor},get description(){return c(ve).description},get descriptionSide(){return c(ve).descriptionSide},get position(){return c(ve).position},positionSide:"left",size:"sm",wrapper:!0}),k(Ee,an)});var fl=M(Ya,2);{var ul=Ee=>{var ve=Fo(),an=b(ve);P(()=>Y(an,c(_).footer)),k(Ee,ve)};L(fl,Ee=>{c(_).footer&&Ee(ul)})}P(()=>Ie(me,`left:${c(x)??""}px;top:${c(R)??""}px`)),Mn("click",me,Ee=>Ee.stopPropagation()),Mn("keydown",me,Ee=>Ee.stopPropagation()),k(_e,me)};L(D,_e=>{c(_)&&_e(ee)})}k(h,j)};L(ke,h=>{e.modalData&&c(y)&&h(Lt)})}La(ue,h=>de=h,()=>de),P(()=>{I=ot(ue,1,`map ${c(d)??""} ${r()??""}`,"svelte-1956iuh",I,{loading:c(T),error:c(J),interactive:c(g)}),Ie(ue,`aspect-ratio:${n()??""};contain:layout;position:relative`),Jt(ue,"role",c(g)?"group":void 0)}),Mn("click",ue,Ve),Mn("mousemove",ue,vt),sr("mouseleave",ue,Je),k(t,ue),un()}ms(["click","mousemove","keydown"]);var Ho=z('<div class="table-candidate-title svelte-tgla0e"> </div>'),Bo=z('<span class="table-candidate-badge svelte-tgla0e">ELEITO</span>'),Uo=z('<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>'),Vo=z('<div class="table-candidate-wrapper svelte-tgla0e"><!> <!></div>');const Ko={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;}
|
|
75
|
+
|
|
76
|
+
@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;}
|
|
77
|
+
}`};function Go(t,e){fn(e,!0),st(t,Ko);function n(s){return s.toLocaleString("pt-BR")+" votos"}function r(s){return s.toFixed(1).replace(".",",")+"%"}var i=Vo(),a=b(i);{var o=s=>{var f=Ho(),u=b(f);P(()=>Y(u,e.title)),k(s,f)};L(a,s=>{e.title&&s(o)})}var l=M(a,2);Nn(l,17,()=>e.candidates,In,(s,f)=>{var u=Uo();let m;var d=b(u),g=M(d,2),w=b(g),C=b(w),p=b(C),y=M(C,2);{var x=V=>{var H=Bo();k(V,H)};L(y,V=>{c(f).elected&&V(x)})}var R=M(w,2),S=b(R),T=M(R,2),J=b(T);P((V,H)=>{m=ot(u,1,"table-candidate-row svelte-tgla0e",null,m,{elected:c(f).elected}),Ie(d,`background-color: ${c(f).color??""}`),Y(p,`${c(f).name??""}, ${c(f).party??""}`),Y(S,V),Y(J,H)},[()=>r(c(f).percentage),()=>n(c(f).votes)]),k(s,u)}),k(t,i),un()}class Ha{constructor(e={}){var n,r,i;this.inflight=new Map,this.tick=0,this.storageKey=(n=e.storageKey)!==null&&n!==void 0?n:"reqcache",this.maxEntries=(r=e.maxEntries)!==null&&r!==void 0?r:100,this.storage=(i=e.storage)!==null&&i!==void 0?i:Yo()}async getFetch(e,n,r={}){const i=Date.now(),a=this.readAll(),o=a.find(f=>f.rota===e);if(o&&i<o.expiresAt)return o.lastAccess=this.nextAccess(),this.writeAll(a),o.data;const l=this.inflight.get(e);if(l)return l;const s=this.revalidate(e,n,r,o??null).finally(()=>this.inflight.delete(e));return this.inflight.set(e,s),s}invalidate(e){const n=this.readAll().filter(r=>r.rota!==e);this.writeAll(n)}cleanup(e=3600){const n=Date.now()-e*1e3,r=this.readAll(),i=r.filter(a=>a.expiresAt>n);return this.writeAll(i),r.length-i.length}clear(){if(this.storage)try{this.storage.removeItem(this.storageKey)}catch{}}nextAccess(){return this.tick=Math.max(Date.now(),this.tick+1),this.tick}async revalidate(e,n,r,i){var a,o;const l=(a=r.fetcher)!==null&&a!==void 0?a:fetch;let s;try{const u=await l(e,r.fetchOptions);if(!u.ok)throw new Error(`HTTP ${u.status} ao buscar ${e}`);s=await u.json()}catch(u){if(i&&(!((o=r.staleOnError)!==null&&o!==void 0)||o))return this.upsert({...i,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),i.data;throw u}if(i&&r.monotonicKey){const u=Ba(i.data,r.monotonicKey),m=Ba(s,r.monotonicKey);if(typeof u=="number"&&typeof m=="number"&&m<=u)return this.upsert({...i,expiresAt:Date.now()+n,lastAccess:this.nextAccess()}),i.data}const f=Date.now();return this.upsert({rota:e,data:s,createdAt:f,expiresAt:f+n,lastAccess:this.nextAccess()}),s}upsert(e){const n=this.readAll().filter(r=>r.rota!==e.rota);n.push(e),this.evictIfNeeded(n),this.writeAll(n)}evictIfNeeded(e){for(;e.length>this.maxEntries;){let n=0;for(let r=1;r<e.length;r++)e[r].lastAccess<e[n].lastAccess&&(n=r);e.splice(n,1)}}readAll(){if(!this.storage)return[];try{const e=this.storage.getItem(this.storageKey);if(!e)return[];const n=JSON.parse(e);return Array.isArray(n)?n:[]}catch{return[]}}writeAll(e){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(e))}catch(n){if(Wo(n)&&e.length>0){const r=[...e].sort((i,a)=>i.lastAccess-a.lastAccess);r.splice(0,Math.ceil(r.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(r))}catch{}}}}}function Ba(t,e){return e.split(".").reduce((n,r)=>{if(n&&typeof n=="object"&&r in n)return n[r]},t)}function Wo(t){return t instanceof Error&&(t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")}function Yo(){try{if(typeof localStorage<"u"){const t="__reqcache_probe__";return localStorage.setItem(t,"1"),localStorage.removeItem(t),localStorage}}catch{}return null}new Ha;const Zo=300,Jo=3600,ur=new Map;function dr(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const Xo={getItem(t){return dr()?localStorage.getItem(t):ur.get(t)??null},setItem(t,e){if(dr())try{localStorage.setItem(t,e)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else ur.set(t,e)},removeItem(t){dr()?localStorage.removeItem(t):ur.delete(t)}};let vr=null;function Ua(){if(!vr){const{storageKey:t,maxEntries:e}=sn().cache;vr=new Ha({storage:Xo,storageKey:t,maxEntries:e})}return vr}async function Va(t,e,n=Zo,r){const[i]=Ar(),a=t.replace(/^\/+/,""),o=new URL(a,`${i.replace(/\/+$/,"")}/`);let l;try{l=await Ua().getFetch(o.toString(),n*1e3,{monotonicKey:r,fetcher:si})}catch(s){throw s instanceof Error&&/^HTTP 404 /.test(s.message)?new Error("Dados ainda não publicados"):s}if(l&&typeof l=="object"&&l.published===!1)throw new Error(l.reason??"Dados ainda não publicados");return l}function Qo(){return Ua().getFetch(To(),Jo*1e3)}function $o(t,e,n){return Va(`v1/elections/${t}/r${n}/${e}/by-state.json`)}function el(t,e,n,r){return Va(`v1/elections/${t}/r${n}/${e}/uf/${r.toUpperCase()}/by-municipality.json`)}const tl=new Set(["da","de","do","das","dos","e"]);function hr(t){return t.toLowerCase().split(" ").map((e,n)=>n>0&&tl.has(e)?e:e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function nl(t){if(typeof t=="string"){const n=t.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(n)return new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]),Number(n[4]),Number(n[5]),Number(n[6]??0)))}const e=new Date(t);return Number.isNaN(e.getTime())?null:e}function pr(t){if(t==null||t==="")return"";const e=nl(t);if(!e)return"";const n=String(e.getUTCDate()).padStart(2,"0"),r=String(e.getUTCMonth()+1).padStart(2,"0"),i=e.getUTCFullYear(),a=String(e.getUTCHours()).padStart(2,"0"),o=String(e.getUTCMinutes()).padStart(2,"0");return`${n}/${r}/${i} às ${a}h${o}`}function rl(t,e="TSE"){const n=pr(t);return n?`Atualizado em ${n} | Fonte ${e}`:`Fonte ${e}`}const al=pr("2022-10-31T00:18:00Z");rl("2022-10-31T00:18:00Z");var il=z('<div class="sevn_municipality_map__table-overlay svelte-1do63k2"><!></div>'),sl=z('<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 ol={hash:"svelte-1do63k2",code:`.sevn_municipality_map.svelte-1do63k2 {display:flex;flex-direction:column;gap:24px;}.sevn_municipality_map--raw.svelte-1do63k2,
|
|
78
|
+
.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;}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@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;}
|
|
82
|
+
}`};function ll(t,e){fn(e,!0),st(t,ol);let n=A(e,"mock",3,!1),r=A(e,"rawStyle",3,!1),i=A(e,"data",3,null),a=A(e,"year",3,2026),o=A(e,"header",19,()=>({title:"Consulte o desempenho dos candidatos por município",description:"Resultados presidenciais por município, em tempo real"}));const l={ABC:"#d97706",DEF:"#1e4d6b",GHI:"#1e3461",JKL:"#0f172a",MNO:"#e11d48"},s={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"},f=[{name:"Candidato A",tag:"ABC",dotColor:l.ABC,tagColor:l.ABC,votes:"42,8%"},{name:"Candidato B",tag:"DEF",dotColor:l.DEF,tagColor:l.DEF,votes:"31,4%"},{name:"Candidato C",tag:"GHI",dotColor:l.GHI,tagColor:l.GHI,votes:"12,6%"},{name:"Candidato D",tag:"JKL",dotColor:l.JKL,tagColor:l.JKL,votes:"6,7%"},{name:"Candidato E",tag:"MNO",dotColor:l.MNO,tagColor:l.MNO,votes:"4,1%"}];let u=Z(null);zt(()=>{n()||$o(a(),"president",1).then(h=>{E(u,h,!0)}).catch(h=>{console.error("Failed to fetch state results:",h)})});const m=O(()=>n()?Object.entries(s).map(([h,_])=>({id:h,match:"endsWith",color:l[_]})):c(u)?.states?c(u).states.filter(h=>h.leader?.party_color).map(h=>({id:h.state.toLowerCase(),match:"endsWith",color:h.leader.party_color})):[]),d=O(()=>n()?f:i()?.candidates?i().candidates.map(h=>({name:hr(h.ballot_name),tag:h.party_abbr,dotColor:h.party_color,tagColor:h.party_color,votes:`${h.valid_votes_pct.toFixed(1)}%`,elected:h.elected})):[]),g=O(()=>n()?"118.552.353":i()?.summary?i().summary.total_valid_votes.toLocaleString("pt-BR"):null),w=O(()=>n()?al:pr(i()?.summary?.last_updated)),C=[{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 p(h){return C.find(_=>_.value===h)?.label??h.toUpperCase()}let y=Z(null),x=Z(0),R=Z(0),S=Z(null),T=Z(null),J=Z(0),V=Z(0);function H(h){return h.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1)).join(" ")}function Q(h){if(!h)return null;const[_,j]=h.split("::");return j?{uf:j,municipio:_}:{uf:_,municipio:void 0}}const B=O(()=>Q(c(T)??c(y))),de=O(()=>c(B)?.uf??null),ge=O(()=>c(B)?c(B).municipio?`Resultados: ${H(c(B).municipio)} - ${c(B).uf.toUpperCase()}`:`Resultados: ${p(c(B).uf)}`:"");let Ce=Z(null);zt(()=>{Qo().then(h=>{E(Ce,h,!0)}).catch(h=>{console.error("Failed to fetch cities index:",h)})});let Ne=Z(null),Ve=0;zt(()=>{if(n()||!c(de)){E(Ne,null);return}const h=c(de),_=setTimeout(()=>{const j=++Ve;el(a(),"president",1,h).then(D=>{j===Ve&&E(Ne,D,!0)}).catch(D=>{console.error("Failed to fetch municipality results:",D)})},200);return()=>clearTimeout(_)});const vt=O(()=>{if(n())return f.map(_=>({name:_.name,party:_.tag,percentage:parseFloat(String(_.votes).replace(",",".")),votes:0,color:_.dotColor}));if(!c(B))return[];if(c(B).municipio){const _=`${c(B).municipio}::${c(B).uf}`,j=c(Ce)?.[_]?.id,D=j?c(Ne)?.municipalities?.find(ee=>ee.municipality_id===j):void 0;return!D?.leader||!D?.runner_up?[]:[D.leader,D.runner_up].map(ee=>({name:hr(ee.name),party:ee.party_abbr,percentage:ee.valid_votes_pct,votes:ee.votes,color:ee.party_color,elected:ee.elected??!1}))}const h=c(u)?.states?.find(_=>_.state.toLowerCase()===c(B).uf);return!h?.leader||!h?.runner_up?[]:[h.leader,h.runner_up].map(_=>({name:hr(_.name),party:_.party_abbr,percentage:_.valid_votes_pct,votes:_.votes,color:_.party_color,elected:_.elected??!1}))});function Je(h){if(E(y,h.cid,!0),c(S)){const _=c(S).getBoundingClientRect();E(x,h.clientX-_.left),E(R,h.clientY-_.top)}}function ue(h){if(!c(S))return;const _=c(S).getBoundingClientRect();c(T)===h.cid?E(T,null):(E(T,h.cid,!0),E(J,h.clientX-_.left),E(V,h.clientY-_.top))}zt(()=>{if(!c(T))return;function h(_){c(S)&&!c(S).contains(_.target)&&E(T,null)}return document.addEventListener("click",h),()=>document.removeEventListener("click",h)});var I=sl();let X;var re=b(I);zo(re,{get title(){return o().title},get description(){return o().description},get tag(){return o().tag},get tagColor(){return o().tagColor}});var Xe=M(re,2),De=b(Xe),Qe=b(De);Po(Qe,{type:"brazil",get colors(){return c(m)},aspectRatio:"16:9",interactive:!0,onRegionHover:Je,onRegionClick:ue});var K=M(Qe,2);{var ae=h=>{var _=il(),j=b(_);Go(j,{get title(){return c(ge)},get candidates(){return c(vt)}}),P(()=>Ie(_,`left:${c(x)??""}px;top:${c(R)??""}px`)),k(h,_)};L(K,h=>{c(de)&&h(ae)})}La(De,h=>E(S,h),()=>c(S));var ke=M(De,2),Lt=b(ke);yo(Lt,{get candidates(){return c(d)},get totalVotes(){return c(g)},get date(){return c(w)},font:"TSE"}),P(()=>X=ot(I,1,"sevn_municipality_map svelte-1do63k2",null,X,{"sevn_municipality_map--raw":r()})),sr("mouseleave",De,()=>E(y,null)),k(t,I),un()}const Ka=Ds(ll,"MunicipalityPerfomanceMap");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:li,MunicipalityPerfomanceMap:Ka}),Ls()),Ka}));
|