@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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +297 -0
  3. package/dist/index.cjs +603 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +351 -0
  6. package/dist/index.d.ts +351 -0
  7. package/dist/index.js +15609 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/styles.css +38 -0
  10. package/dist/umd/candidate-by-state.js +98 -0
  11. package/dist/umd/candidate-carrousel-state-results-viewer.js +108 -0
  12. package/dist/umd/candidate-counting-progress.js +77 -0
  13. package/dist/umd/candidate-duel-state-result-viewer.js +91 -0
  14. package/dist/umd/candidate-map-by-state.js +104 -0
  15. package/dist/umd/candidate-multi-ring-chart-performance-by-municipality.js +105 -0
  16. package/dist/umd/candidate-performance-by-municipality.js +105 -0
  17. package/dist/umd/candidate-ranking.js +59 -0
  18. package/dist/umd/candidate-results-by-municipality.js +103 -0
  19. package/dist/umd/counting-progress.js +125 -0
  20. package/dist/umd/current-leader.js +43 -0
  21. package/dist/umd/election-round-analysis.js +100 -0
  22. package/dist/umd/election-status.js +135 -0
  23. package/dist/umd/final-results.js +141 -0
  24. package/dist/umd/live-summary.js +36 -0
  25. package/dist/umd/municipality-perfomance-map.js +82 -0
  26. package/dist/umd/party-performance.js +99 -0
  27. package/dist/umd/results-by-office.js +94 -0
  28. package/dist/umd/round-results-analysis.js +99 -0
  29. package/dist/umd/state-leaders.js +118 -0
  30. package/dist/umd/state-winners.js +129 -0
  31. package/dist/umd/top-dispute.js +43 -0
  32. package/dist/umd/vote-comparison-by-round.js +76 -0
  33. package/dist/umd/vote-counting-progress.js +23 -0
  34. package/dist/umd/voting-map.js +112 -0
  35. package/package.json +96 -0
@@ -0,0 +1,94 @@
1
+ (function(G,Y){typeof exports=="object"&&typeof module<"u"?module.exports=Y():typeof define=="function"&&define.amd?define(Y):(G=typeof globalThis<"u"?globalThis:G||self,G.ResultsByOffice=Y())})(this,(function(){"use strict";var Nl=Object.defineProperty;var ri=G=>{throw TypeError(G)};var Il=(G,Y,ne)=>Y in G?Nl(G,Y,{enumerable:!0,configurable:!0,writable:!0,value:ne}):G[Y]=ne;var et=(G,Y,ne)=>Il(G,typeof Y!="symbol"?Y+"":Y,ne),Cn=(G,Y,ne)=>Y.has(G)||ri("Cannot "+ne);var v=(G,Y,ne)=>(Cn(G,Y,"read from private field"),ne?ne.call(G):Y.get(G)),F=(G,Y,ne)=>Y.has(G)?ri("Cannot add the same private member more than once"):Y instanceof WeakSet?Y.add(G):Y.set(G,ne),R=(G,Y,ne,Bt)=>(Cn(G,Y,"write to private field"),Bt?Bt.call(G,ne):Y.set(G,ne),ne),ue=(G,Y,ne)=>(Cn(G,Y,"access private method"),ne);var or,lr,Nt,cr,Er,kr,It,ct,fr,Ae,En,kn,jn,ni,Ve,zn,ft,Dt,Ye,Je,Te,Qe,ut,qt,bt,ur,dr,vr,dt,Hr,ce,Dl,ql,An,Vr,Kr,Tn,Ke,Xe,Me,Ft,jr,Ar,Br,ti;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 Y extends Error{constructor(t,r){super(`Não foi possível contatar a API para ${t}.`),this.name="SevnNetworkError",this.cause=r}}const ne="__sevnElectionsState_v1__",Bt=globalThis;function Mn(e){return Bt[ne]||(Bt[ne]={config:e(),transport:{activeIndex:0,pinnedAt:0}}),Bt[ne]}const ai="https://failover-api.sevntech.com",ii=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Ln(){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 si=Ln;function Vt(){return Mn(Ln)}function oi(e){return[`https://${e}-api1.sevnelections.com`,`https://${e}-api2.sevnelections.com`,ai]}function Gr(e){if(typeof e!="string"||!ii.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=Vt();t.config.key=e,t.config.apiHosts=oi(e)}function Pn(e){const{cache:t,request:r,key:n,...a}=e,i=Vt();i.config={...i.config,...a,cache:{...i.config.cache,...t},request:{...i.config.request,...r}},n&&(Gr(n),a.apiHosts&&(i.config.apiHosts=a.apiHosts))}function pr(){return Vt().config}function On(){return Vt().config.apiHosts.length>0}function Rn(){if(!On())throw new G;return Vt().config.apiHosts}function li(e){const{assetsBase:t,assetsVersion:r}=Vt().config,n=t.replace(/\/+$/,""),a=String(e).replace(/^\/+/,"");return`${n}/${r}/${a}`}const ci=':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}',Kt=typeof window<"u"&&typeof document<"u",Nn="data-sevn-tokens",In="data-sevn-theme",Dn={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 fi(){if(!Kt||document.querySelector(`style[${Nn}]`))return;const e=document.createElement("style");e.setAttribute(Nn,""),e.textContent=ci,document.head.prepend(e);const t=pr().theme;t&&Wr(t)}function Wr(e){if(!Kt)return;const t=Object.keys(Dn).filter(n=>e[n]).map(n=>` ${Dn[n]}: ${e[n]};`);if(t.length===0)return;let r=document.querySelector(`style[${In}]`);r||(r=document.createElement("style"),r.setAttribute(In,""),document.head.appendChild(r)),r.textContent=`:root {
2
+ ${t.join(`
3
+ `)}
4
+ }`}function qn(){return Mn(si).transport}function Fn(e){return new Promise(t=>setTimeout(t,e))}function ui(e,t){const r=AbortSignal.timeout(e);return t&&typeof AbortSignal.any=="function"?AbortSignal.any([t,r]):r}function di(e,t){const r=new URL(e),n=new URL(t);return r.protocol=n.protocol,r.host=n.host,r.toString()}function vi(e,t){return Array.from({length:t},(r,n)=>(e+n)%t)}const hi=async(e,t)=>{const r=typeof e=="string"?e:e instanceof URL?e.toString():e.url,n=Rn(),{timeoutMs:a,retriesPerHost:i,retryDelayMs:s,stickyWindowMs:c}=pr().request,o=qn();o.activeIndex!==0&&Date.now()-o.pinnedAt>=c&&(o.activeIndex=0);let f=null;for(const d of vi(o.activeIndex,n.length)){const _=di(r,n[d]);for(let u=0;u<i;u++)try{const p=await fetch(_,{...t,signal:ui(a,t?.signal)});if(p.status>=500){f=new Error(`HTTP ${p.status} em ${n[d]}`),u<i-1&&await Fn(s);continue}return o.activeIndex=d,o.pinnedAt=Date.now(),p}catch(p){f=p,u<i-1&&await Fn(s)}}throw new Y(r,f)};function pi(){return pr().apiHosts[qn().activeIndex]??null}const _i={applyKey:Gr,configure(e){Pn(e),e.theme&&Wr(e.theme)},getConfig:pr,isReady:On,assetUrl:li,setTheme(e){Pn({theme:e}),Wr(e)},activeHost:pi},Zr=!1;var Un=Array.isArray,gi=Array.prototype.indexOf,Gt=Array.prototype.includes,Tr=Array.from,mi=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,wi=Object.getOwnPropertyDescriptors,bi=Object.prototype,yi=Array.prototype,Hn=Object.getPrototypeOf,Bn=Object.isExtensible;const xi=()=>{};function zi(e){for(var t=0;t<e.length;t++)e[t]()}function Vn(){var e,t,r=new Promise((n,a)=>{e=n,t=a});return{promise:r,resolve:e,reject:t}}const de=2,_r=4,Mr=8,Kn=1<<24,tt=16,De=32,St=64,Yr=128,Pe=512,le=1024,ve=2048,qe=4096,Ee=8192,rt=16384,Ct=32768,Zt=65536,Gn=1<<17,Wn=1<<18,Yt=1<<19,Si=1<<20,nt=1<<25,Et=65536,Jr=1<<21,Qr=1<<22,pt=1<<23,gr=Symbol("$state"),Ci=Symbol("legacy props"),Ei=Symbol(""),kt=new class extends Error{constructor(){super(...arguments);et(this,"name","StaleReactionError");et(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ki(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ji(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ai(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ti(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Mi(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Li(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Pi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Oi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ri(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ni(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ii(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Di(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const qi=1,Fi=2,Zn=4,Ui=8,Hi=16,Bi=1,Vi=4,Ki=8,Gi=16,Wi=1,Zi=2,he=Symbol(),Yn="http://www.w3.org/1999/xhtml";function Yi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Jn(e){return e===this.v}function Ji(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Qn(e){return!Ji(e,this.v)}let Qi=!1,ke=null;function Jt(e){ke=e}function Qt(e,t=!1,r){ke={p:ke,i:!1,c:null,e:null,s:e,x:null,l:null}}function Xt(e){var t=ke,r=t.e;if(r!==null){t.e=null;for(var n of r)ya(n)}return t.i=!0,ke=t.p,{}}function Xn(){return!0}let jt=[];function $n(){var e=jt;jt=[],zi(e)}function at(e){if(jt.length===0&&!mr){var t=jt;queueMicrotask(()=>{t===jt&&$n()})}jt.push(e)}function Xi(){for(;jt.length>0;)$n()}function ea(e){var t=B;if(t===null)return D.f|=pt,e;if((t.f&Ct)===0&&(t.f&_r)===0)throw e;$t(e,t)}function $t(e,t){for(;t!==null;){if((t.f&Yr)!==0){if((t.f&Ct)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const $i=-7169;function ae(e,t){e.f=e.f&$i|t}function Xr(e){(e.f&Pe)!==0||e.deps===null?ae(e,le):ae(e,qe)}function ta(e){if(e!==null)for(const t of e)(t.f&de)===0||(t.f&Et)===0||(t.f^=Et,ta(t.deps))}function ra(e,t,r){(e.f&ve)!==0?t.add(e):(e.f&qe)!==0&&r.add(e),ta(e.deps),ae(e,le)}const Lr=new Set;let V=null,$r=null,Fe=null,be=[],Pr=null,en=!1,mr=!1;const xn=class xn{constructor(){F(this,Ae);et(this,"committed",!1);et(this,"current",new Map);et(this,"previous",new Map);F(this,or,new Set);F(this,lr,new Set);F(this,Nt,0);F(this,cr,0);F(this,Er,null);F(this,kr,new Set);F(this,It,new Set);F(this,ct,new Map);et(this,"is_fork",!1);F(this,fr,!1)}skip_effect(t){v(this,ct).has(t)||v(this,ct).set(t,{d:[],m:[]})}unskip_effect(t){var r=v(this,ct).get(t);if(r){v(this,ct).delete(t);for(var n of r.d)ae(n,ve),Ue(n);for(n of r.m)ae(n,qe),Ue(n)}}process(t){be=[],this.apply();var r=[],n=[];for(const a of t)ue(this,Ae,kn).call(this,a,r,n);if(ue(this,Ae,En).call(this)){ue(this,Ae,jn).call(this,n),ue(this,Ae,jn).call(this,r);for(const[a,i]of v(this,ct))oa(a,i)}else{for(const a of v(this,or))a();v(this,or).clear(),v(this,Nt)===0&&ue(this,Ae,ni).call(this),$r=this,V=null,aa(n),aa(r),$r=null,v(this,Er)?.resolve()}Fe=null}capture(t,r){r!==he&&!this.previous.has(t)&&this.previous.set(t,r),(t.f&pt)===0&&(this.current.set(t,t.v),Fe?.set(t,t.v))}activate(){V=this,this.apply()}deactivate(){V===this&&(V=null,Fe=null)}flush(){if(this.activate(),be.length>0){if(na(),V!==null&&V!==this)return}else v(this,Nt)===0&&this.process([]);this.deactivate()}discard(){for(const t of v(this,lr))t(this);v(this,lr).clear()}increment(t){R(this,Nt,v(this,Nt)+1),t&&R(this,cr,v(this,cr)+1)}decrement(t){R(this,Nt,v(this,Nt)-1),t&&R(this,cr,v(this,cr)-1),!v(this,fr)&&(R(this,fr,!0),at(()=>{R(this,fr,!1),ue(this,Ae,En).call(this)?be.length>0&&this.flush():this.revive()}))}revive(){for(const t of v(this,kr))v(this,It).delete(t),ae(t,ve),Ue(t);for(const t of v(this,It))ae(t,qe),Ue(t);this.flush()}oncommit(t){v(this,or).add(t)}ondiscard(t){v(this,lr).add(t)}settled(){return(v(this,Er)??R(this,Er,Vn())).promise}static ensure(){if(V===null){const t=V=new xn;Lr.add(V),mr||at(()=>{V===t&&t.flush()})}return V}apply(){}};or=new WeakMap,lr=new WeakMap,Nt=new WeakMap,cr=new WeakMap,Er=new WeakMap,kr=new WeakMap,It=new WeakMap,ct=new WeakMap,fr=new WeakMap,Ae=new WeakSet,En=function(){return this.is_fork||v(this,cr)>0},kn=function(t,r,n){t.f^=le;for(var a=t.first;a!==null;){var i=a.f,s=(i&(De|St))!==0,c=s&&(i&le)!==0,o=c||(i&Ee)!==0||v(this,ct).has(a);if(!o&&a.fn!==null){s?a.f^=le:(i&_r)!==0?r.push(a):yr(a)&&((i&tt)!==0&&v(this,It).add(a),nr(a));var f=a.first;if(f!==null){a=f;continue}}for(;a!==null;){var d=a.next;if(d!==null){a=d;break}a=a.parent}}},jn=function(t){for(var r=0;r<t.length;r+=1)ra(t[r],v(this,kr),v(this,It))},ni=function(){var a;if(Lr.size>1){this.previous.clear();var t=Fe,r=!0;for(const i of Lr){if(i===this){r=!1;continue}const s=[];for(const[o,f]of this.current){if(i.current.has(o))if(r&&f!==i.current.get(o))i.current.set(o,f);else continue;s.push(o)}if(s.length===0)continue;const c=[...i.current.keys()].filter(o=>!this.current.has(o));if(c.length>0){var n=be;be=[];const o=new Set,f=new Map;for(const d of s)ia(d,c,o,f);if(be.length>0){V=i,i.apply();for(const d of be)ue(a=i,Ae,kn).call(a,d,[],[]);i.deactivate()}be=n}}V=null,Fe=t}this.committed=!0,Lr.delete(this)};let _t=xn;function es(e){var t=mr;mr=!0;try{for(var r;;){if(Xi(),be.length===0&&(V?.flush(),be.length===0))return Pr=null,r;na()}}finally{mr=t}}function na(){en=!0;var e=null;try{for(var t=0;be.length>0;){var r=_t.ensure();if(t++>1e3){var n,a;ts()}r.process(be),gt.clear()}}finally{be=[],en=!1,Pr=null}}function ts(){try{Pi()}catch(e){$t(e,Pr)}}let it=null;function aa(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(rt|Ee))===0&&yr(n)&&(it=new Set,nr(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Sa(n),it?.size>0)){gt.clear();for(const a of it){if((a.f&(rt|Ee))!==0)continue;const i=[a];let s=a.parent;for(;s!==null;)it.has(s)&&(it.delete(s),i.push(s)),s=s.parent;for(let c=i.length-1;c>=0;c--){const o=i[c];(o.f&(rt|Ee))===0&&nr(o)}}it.clear()}}it=null}}function ia(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;(i&de)!==0?ia(a,t,r,n):(i&(Qr|tt))!==0&&(i&ve)===0&&sa(a,t,n)&&(ae(a,ve),Ue(a))}}function sa(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const a of e.deps){if(Gt.call(t,a))return!0;if((a.f&de)!==0&&sa(a,t,r))return r.set(a,!0),!0}return r.set(e,!1),!1}function Ue(e){var t=Pr=e,r=t.b;if(r?.is_pending&&(e.f&(_r|Mr|Kn))!==0&&(e.f&Ct)===0){r.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var n=t.f;if(en&&t===B&&(n&tt)!==0&&(n&Wn)===0&&(n&Ct)!==0)return;if((n&(St|De))!==0){if((n&le)===0)return;t.f^=le}}be.push(t)}function oa(e,t){if(!((e.f&De)!==0&&(e.f&le)!==0)){(e.f&ve)!==0?t.d.push(e):(e.f&qe)!==0&&t.m.push(e),ae(e,le);for(var r=e.first;r!==null;)oa(r,t),r=r.next}}function rs(e){let t=0,r=At(0),n;return()=>{an()&&(l(r),sn(()=>(t===0&&(n=ar(()=>e(()=>wr(r)))),t+=1,()=>{at(()=>{t-=1,t===0&&(n?.(),n=void 0,wr(r))})})))}}var ns=Zt|Yt;function as(e,t,r){new is(e,t,r)}class is{constructor(t,r,n){F(this,ce);et(this,"parent");et(this,"is_pending",!1);F(this,Ve);F(this,zn,null);F(this,ft);F(this,Dt);F(this,Ye);F(this,Je,null);F(this,Te,null);F(this,Qe,null);F(this,ut,null);F(this,qt,0);F(this,bt,0);F(this,ur,!1);F(this,dr,new Set);F(this,vr,new Set);F(this,dt,null);F(this,Hr,rs(()=>(R(this,dt,At(v(this,qt))),()=>{R(this,dt,null)})));R(this,Ve,t),R(this,ft,r),R(this,Dt,a=>{var i=B;i.b=this,i.f|=Yr,n(a)}),this.parent=B.b,R(this,Ye,on(()=>{ue(this,ce,An).call(this)},ns))}defer_effect(t){ra(t,v(this,dr),v(this,vr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,ft).pending}update_pending_count(t){ue(this,ce,Tn).call(this,t),R(this,qt,v(this,qt)+t),!(!v(this,dt)||v(this,ur))&&(R(this,ur,!0),at(()=>{R(this,ur,!1),v(this,dt)&&er(v(this,dt),v(this,qt))}))}get_effect_pending(){return v(this,Hr).call(this),l(v(this,dt))}error(t){var r=v(this,ft).onerror;let n=v(this,ft).failed;if(!r&&!n)throw t;v(this,Je)&&(ye(v(this,Je)),R(this,Je,null)),v(this,Te)&&(ye(v(this,Te)),R(this,Te,null)),v(this,Qe)&&(ye(v(this,Qe)),R(this,Qe,null));var a=!1,i=!1;const s=()=>{if(a){Yi();return}a=!0,i&&Di(),v(this,Qe)!==null&&Mt(v(this,Qe),()=>{R(this,Qe,null)}),ue(this,ce,Kr).call(this,()=>{_t.ensure(),ue(this,ce,An).call(this)})};at(()=>{try{i=!0,r?.(t,s),i=!1}catch(c){$t(c,v(this,Ye)&&v(this,Ye).parent)}n&&R(this,Qe,ue(this,ce,Kr).call(this,()=>{_t.ensure();try{return He(()=>{var c=B;c.b=this,c.f|=Yr,n(v(this,Ve),()=>t,()=>s)})}catch(c){return $t(c,v(this,Ye).parent),null}}))})}}Ve=new WeakMap,zn=new WeakMap,ft=new WeakMap,Dt=new WeakMap,Ye=new WeakMap,Je=new WeakMap,Te=new WeakMap,Qe=new WeakMap,ut=new WeakMap,qt=new WeakMap,bt=new WeakMap,ur=new WeakMap,dr=new WeakMap,vr=new WeakMap,dt=new WeakMap,Hr=new WeakMap,ce=new WeakSet,Dl=function(){try{R(this,Je,He(()=>v(this,Dt).call(this,v(this,Ve))))}catch(t){this.error(t)}},ql=function(){const t=v(this,ft).pending;t&&(this.is_pending=!0,R(this,Te,He(()=>t(v(this,Ve)))),at(()=>{var r=R(this,ut,document.createDocumentFragment()),n=st();r.append(n),R(this,Je,ue(this,ce,Kr).call(this,()=>(_t.ensure(),He(()=>v(this,Dt).call(this,n))))),v(this,bt)===0&&(v(this,Ve).before(r),R(this,ut,null),Mt(v(this,Te),()=>{R(this,Te,null)}),ue(this,ce,Vr).call(this))}))},An=function(){try{if(this.is_pending=this.has_pending_snippet(),R(this,bt,0),R(this,qt,0),R(this,Je,He(()=>{v(this,Dt).call(this,v(this,Ve))})),v(this,bt)>0){var t=R(this,ut,document.createDocumentFragment());ka(v(this,Je),t);const r=v(this,ft).pending;R(this,Te,He(()=>r(v(this,Ve))))}else ue(this,ce,Vr).call(this)}catch(r){this.error(r)}},Vr=function(){this.is_pending=!1;for(const t of v(this,dr))ae(t,ve),Ue(t);for(const t of v(this,vr))ae(t,qe),Ue(t);v(this,dr).clear(),v(this,vr).clear()},Kr=function(t){var r=B,n=D,a=ke;We(v(this,Ye)),Oe(v(this,Ye)),Jt(v(this,Ye).ctx);try{return t()}catch(i){return ea(i),null}finally{We(r),Oe(n),Jt(a)}},Tn=function(t){var r;if(!this.has_pending_snippet()){this.parent&&ue(r=this.parent,ce,Tn).call(r,t);return}R(this,bt,v(this,bt)+t),v(this,bt)===0&&(ue(this,ce,Vr).call(this),v(this,Te)&&Mt(v(this,Te),()=>{R(this,Te,null)}),v(this,ut)&&(v(this,Ve).before(v(this,ut)),R(this,ut,null)))};function ss(e,t,r,n){const a=Or;var i=e.filter(u=>!u.settled);if(r.length===0&&i.length===0){n(t.map(a));return}var s=V,c=B,o=os(),f=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(u=>u.promise)):null;function d(u){o();try{n(u)}catch(p){(c.f&rt)===0&&$t(p,c)}s?.deactivate(),tn()}if(r.length===0){f.then(()=>d(t.map(a)));return}function _(){o(),Promise.all(r.map(u=>cs(u))).then(u=>d([...t.map(a),...u])).catch(u=>$t(u,c))}f?f.then(_):_()}function os(){var e=B,t=D,r=ke,n=V;return function(i=!0){We(e),Oe(t),Jt(r),i&&n?.activate()}}function tn(){We(null),Oe(null),Jt(null)}function ls(){var e=B.b,t=V,r=e.is_rendered();return e.update_pending_count(1),t.increment(r),()=>{e.update_pending_count(-1),t.decrement(r)}}function Or(e){var t=de|ve,r=D!==null&&(D.f&de)!==0?D:null;return B!==null&&(B.f|=Yt),{ctx:ke,deps:null,effects:null,equals:Jn,f:t,fn:e,reactions:null,rv:0,v:he,wv:0,parent:r??B,ac:null}}function cs(e,t,r){B===null&&ji();var a=void 0,i=At(he),s=!D,c=new Map;return xs(()=>{var o=Vn();a=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{f===V&&f.committed&&f.deactivate(),tn()})}catch(u){o.reject(u),tn()}var f=V;if(s){var d=ls();c.get(f)?.reject(kt),c.delete(f),c.set(f,o)}const _=(u,p=void 0)=>{if(f.activate(),p)p!==kt&&(i.f|=pt,er(i,p));else{(i.f&pt)!==0&&(i.f^=pt),er(i,u);for(const[g,S]of c){if(c.delete(g),g===f)break;S.reject(kt)}}d&&d()};o.promise.then(_,u=>_(null,u||"unknown"))}),ba(()=>{for(const o of c.values())o.reject(kt)}),new Promise(o=>{function f(d){function _(){d===a?o(i):f(a)}d.then(_,_)}f(a)})}function H(e){const t=Or(e);return Aa(t),t}function la(e){const t=Or(e);return t.equals=Qn,t}function fs(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ye(t[r])}}function us(e){for(var t=e.parent;t!==null;){if((t.f&de)===0)return(t.f&rt)===0?t:null;t=t.parent}return null}function rn(e){var t,r=B;We(us(e));try{e.f&=~Et,fs(e),t=Oa(e)}finally{We(r)}return t}function ca(e){var t=rn(e);if(!e.equals(t)&&(e.wv=La(),(!V?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){ae(e,le);return}mt||(Fe!==null?(an()||V?.is_fork)&&Fe.set(e,t):Xr(e))}function ds(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(kt),t.teardown=xi,t.ac=null,xr(t,0),ln(t))}function fa(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&nr(t)}let nn=new Set;const gt=new Map;let ua=!1;function At(e,t){var r={f:0,v:e,reactions:null,equals:Jn,rv:0,wv:0};return r}function $(e,t){const r=At(e);return Aa(r),r}function vs(e,t=!1,r=!0){const n=At(e);return t||(n.equals=Qn),n}function E(e,t,r=!1){D!==null&&(!Be||(D.f&Gn)!==0)&&Xn()&&(D.f&(de|tt|Qr|Gn))!==0&&(Re===null||!Gt.call(Re,e))&&Ii();let n=r?Tt(t):t;return er(e,n)}function er(e,t){if(!e.equals(t)){var r=e.v;mt?gt.set(e,t):gt.set(e,r),e.v=t;var n=_t.ensure();if(n.capture(e,r),(e.f&de)!==0){const a=e;(e.f&ve)!==0&&rn(a),Xr(a)}e.wv=La(),da(e,ve),B!==null&&(B.f&le)!==0&&(B.f&(De|St))===0&&(Ne===null?Cs([e]):Ne.push(e)),!n.is_fork&&nn.size>0&&!ua&&hs()}return t}function hs(){ua=!1;for(const e of nn)(e.f&le)!==0&&ae(e,qe),yr(e)&&nr(e);nn.clear()}function wr(e){E(e,e.v+1)}function da(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,a=0;a<n;a++){var i=r[a],s=i.f,c=(s&ve)===0;if(c&&ae(i,t),(s&de)!==0){var o=i;Fe?.delete(o),(s&Et)===0&&(s&Pe&&(i.f|=Et),da(o,qe))}else c&&((s&tt)!==0&&it!==null&&it.add(i),Ue(i))}}function Tt(e){if(typeof e!="object"||e===null||gr in e)return e;const t=Hn(e);if(t!==bi&&t!==yi)return e;var r=new Map,n=Un(e),a=$(0),i=Pt,s=c=>{if(Pt===i)return c();var o=D,f=Pt;Oe(null),Ma(i);var d=c();return Oe(o),Ma(f),d};return n&&r.set("length",$(e.length)),new Proxy(e,{defineProperty(c,o,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Ri();var d=r.get(o);return d===void 0?s(()=>{var _=$(f.value);return r.set(o,_),_}):E(d,f.value,!0),!0},deleteProperty(c,o){var f=r.get(o);if(f===void 0){if(o in c){const d=s(()=>$(he));r.set(o,d),wr(a)}}else E(f,he),wr(a);return!0},get(c,o,f){if(o===gr)return e;var d=r.get(o),_=o in c;if(d===void 0&&(!_||Wt(c,o)?.writable)&&(d=s(()=>{var p=Tt(_?c[o]:he),g=$(p);return g}),r.set(o,d)),d!==void 0){var u=l(d);return u===he?void 0:u}return Reflect.get(c,o,f)},getOwnPropertyDescriptor(c,o){var f=Reflect.getOwnPropertyDescriptor(c,o);if(f&&"value"in f){var d=r.get(o);d&&(f.value=l(d))}else if(f===void 0){var _=r.get(o),u=_?.v;if(_!==void 0&&u!==he)return{enumerable:!0,configurable:!0,value:u,writable:!0}}return f},has(c,o){if(o===gr)return!0;var f=r.get(o),d=f!==void 0&&f.v!==he||Reflect.has(c,o);if(f!==void 0||B!==null&&(!d||Wt(c,o)?.writable)){f===void 0&&(f=s(()=>{var u=d?Tt(c[o]):he,p=$(u);return p}),r.set(o,f));var _=l(f);if(_===he)return!1}return d},set(c,o,f,d){var _=r.get(o),u=o in c;if(n&&o==="length")for(var p=f;p<_.v;p+=1){var g=r.get(p+"");g!==void 0?E(g,he):p in c&&(g=s(()=>$(he)),r.set(p+"",g))}if(_===void 0)(!u||Wt(c,o)?.writable)&&(_=s(()=>$(void 0)),E(_,Tt(f)),r.set(o,_));else{u=_.v!==he;var S=s(()=>Tt(f));E(_,S)}var h=Reflect.getOwnPropertyDescriptor(c,o);if(h?.set&&h.set.call(d,f),!u){if(n&&typeof o=="string"){var b=r.get("length"),m=Number(o);Number.isInteger(m)&&m>=b.v&&E(b,m+1)}wr(a)}return!0},ownKeys(c){l(a);var o=Reflect.ownKeys(c).filter(_=>{var u=r.get(_);return u===void 0||u.v!==he});for(var[f,d]of r)d.v!==he&&!(f in c)&&o.push(f);return o},setPrototypeOf(){Ni()}})}var va,ha,pa,_a;function ps(){if(va===void 0){va=window,ha=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;pa=Wt(t,"firstChild").get,_a=Wt(t,"nextSibling").get,Bn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Bn(r)&&(r.__t=void 0)}}function st(e=""){return document.createTextNode(e)}function Rr(e){return pa.call(e)}function br(e){return _a.call(e)}function w(e,t){return Rr(e)}function tr(e,t=!1){{var r=Rr(e);return r instanceof Comment&&r.data===""?br(r):r}}function A(e,t=1,r=!1){let n=e;for(;t--;)n=br(n);return n}function _s(e){e.textContent=""}function ga(){return!1}function ma(e,t,r){return document.createElementNS(Yn,e,void 0)}let wa=!1;function gs(){wa||(wa=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Nr(e){var t=D,r=B;Oe(null),We(null);try{return e()}finally{Oe(t),We(r)}}function ms(e,t,r,n=r){e.addEventListener(t,()=>Nr(r));const a=e.__on_r;a?e.__on_r=()=>{a(),n(!0)}:e.__on_r=()=>n(!0),gs()}function ws(e){B===null&&(D===null&&Li(),Mi()),mt&&Ti()}function bs(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ot(e,t,r){var n=B;n!==null&&(n.f&Ee)!==0&&(e|=Ee);var a={ctx:ke,deps:null,nodes:null,f:e|ve|Pe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{nr(a)}catch(c){throw ye(a),c}else t!==null&&Ue(a);var i=a;if(r&&i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Yt)===0&&(i=i.first,(e&tt)!==0&&(e&Zt)!==0&&i!==null&&(i.f|=Zt)),i!==null&&(i.parent=n,n!==null&&bs(i,n),D!==null&&(D.f&de)!==0&&(e&St)===0)){var s=D;(s.effects??(s.effects=[])).push(i)}return a}function an(){return D!==null&&!Be}function ba(e){const t=ot(Mr,null,!1);return ae(t,le),t.teardown=e,t}function rr(e){ws();var t=B.f,r=!D&&(t&De)!==0&&(t&Ct)===0;if(r){var n=ke;(n.e??(n.e=[])).push(e)}else return ya(e)}function ya(e){return ot(_r|Si,e,!1)}function ys(e){_t.ensure();const t=ot(St|Yt,e,!0);return(r={})=>new Promise(n=>{r.outro?Mt(t,()=>{ye(t),n(void 0)}):(ye(t),n(void 0))})}function xa(e){return ot(_r,e,!1)}function xs(e){return ot(Qr|Yt,e,!0)}function sn(e,t=0){return ot(Mr|t,e,!0)}function T(e,t=[],r=[],n=[]){ss(n,t,r,a=>{ot(Mr,()=>e(...a.map(l)),!0)})}function on(e,t=0){var r=ot(tt|t,e,!0);return r}function He(e){return ot(De|Yt,e,!0)}function za(e){var t=e.teardown;if(t!==null){const r=mt,n=D;ja(!0),Oe(null);try{t.call(null)}finally{ja(r),Oe(n)}}}function ln(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const a=r.ac;a!==null&&Nr(()=>{a.abort(kt)});var n=r.next;(r.f&St)!==0?r.parent=null:ye(r,t),r=n}}function zs(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&De)===0&&ye(t),t=r}}function ye(e,t=!0){var r=!1;(t||(e.f&Wn)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ss(e.nodes.start,e.nodes.end),r=!0),ln(e,t&&!r),xr(e,0),ae(e,rt);var n=e.nodes&&e.nodes.t;if(n!==null)for(const i of n)i.stop();za(e);var a=e.parent;a!==null&&a.first!==null&&Sa(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ss(e,t){for(;e!==null;){var r=e===t?null:br(e);e.remove(),e=r}}function Sa(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Mt(e,t,r=!0){var n=[];Ca(e,n,!0);var a=()=>{r&&ye(e),t&&t()},i=n.length;if(i>0){var s=()=>--i||a();for(var c of n)c.out(s)}else a()}function Ca(e,t,r){if((e.f&Ee)===0){e.f^=Ee;var n=e.nodes&&e.nodes.t;if(n!==null)for(const c of n)(c.is_global||r)&&t.push(c);for(var a=e.first;a!==null;){var i=a.next,s=(a.f&Zt)!==0||(a.f&De)!==0&&(e.f&tt)!==0;Ca(a,t,s?r:!1),a=i}}}function cn(e){Ea(e,!0)}function Ea(e,t){if((e.f&Ee)!==0){e.f^=Ee,(e.f&le)===0&&(ae(e,ve),Ue(e));for(var r=e.first;r!==null;){var n=r.next,a=(r.f&Zt)!==0||(r.f&De)!==0;Ea(r,a?t:!1),r=n}var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)(s.is_global||t)&&s.in()}}function ka(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var a=r===n?null:br(r);t.append(r),r=a}}let Ir=!1,mt=!1;function ja(e){mt=e}let D=null,Be=!1;function Oe(e){D=e}let B=null;function We(e){B=e}let Re=null;function Aa(e){D!==null&&(Re===null?Re=[e]:Re.push(e))}let xe=null,je=0,Ne=null;function Cs(e){Ne=e}let Ta=1,Lt=0,Pt=Lt;function Ma(e){Pt=e}function La(){return++Ta}function yr(e){var t=e.f;if((t&ve)!==0)return!0;if(t&de&&(e.f&=~Et),(t&qe)!==0){for(var r=e.deps,n=r.length,a=0;a<n;a++){var i=r[a];if(yr(i)&&ca(i),i.wv>e.wv)return!0}(t&Pe)!==0&&Fe===null&&ae(e,le)}return!1}function Pa(e,t,r=!0){var n=e.reactions;if(n!==null&&!(Re!==null&&Gt.call(Re,e)))for(var a=0;a<n.length;a++){var i=n[a];(i.f&de)!==0?Pa(i,t,!1):t===i&&(r?ae(i,ve):(i.f&le)!==0&&ae(i,qe),Ue(i))}}function Oa(e){var S;var t=xe,r=je,n=Ne,a=D,i=Re,s=ke,c=Be,o=Pt,f=e.f;xe=null,je=0,Ne=null,D=(f&(De|St))===0?e:null,Re=null,Jt(e.ctx),Be=!1,Pt=++Lt,e.ac!==null&&(Nr(()=>{e.ac.abort(kt)}),e.ac=null);try{e.f|=Jr;var d=e.fn,_=d();e.f|=Ct;var u=e.deps,p=V?.is_fork;if(xe!==null){var g;if(p||xr(e,je),u!==null&&je>0)for(u.length=je+xe.length,g=0;g<xe.length;g++)u[je+g]=xe[g];else e.deps=u=xe;if(an()&&(e.f&Pe)!==0)for(g=je;g<u.length;g++)((S=u[g]).reactions??(S.reactions=[])).push(e)}else!p&&u!==null&&je<u.length&&(xr(e,je),u.length=je);if(Xn()&&Ne!==null&&!Be&&u!==null&&(e.f&(de|qe|ve))===0)for(g=0;g<Ne.length;g++)Pa(Ne[g],e);if(a!==null&&a!==e){if(Lt++,a.deps!==null)for(let h=0;h<r;h+=1)a.deps[h].rv=Lt;if(t!==null)for(const h of t)h.rv=Lt;Ne!==null&&(n===null?n=Ne:n.push(...Ne))}return(e.f&pt)!==0&&(e.f^=pt),_}catch(h){return ea(h)}finally{e.f^=Jr,xe=t,je=r,Ne=n,D=a,Re=i,Jt(s),Be=c,Pt=o}}function Es(e,t){let r=t.reactions;if(r!==null){var n=gi.call(r,e);if(n!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[n]=r[a],r.pop())}}if(r===null&&(t.f&de)!==0&&(xe===null||!Gt.call(xe,t))){var i=t;(i.f&Pe)!==0&&(i.f^=Pe,i.f&=~Et),Xr(i),ds(i),xr(i,0)}}function xr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Es(e,r[n])}function nr(e){var t=e.f;if((t&rt)===0){ae(e,le);var r=B,n=Ir;B=e,Ir=!0;try{(t&(tt|Kn))!==0?zs(e):ln(e),za(e);var a=Oa(e);e.teardown=typeof a=="function"?a:null,e.wv=Ta;var i;Zr&&Qi&&(e.f&ve)!==0&&e.deps}finally{Ir=n,B=r}}}async function ks(){await Promise.resolve(),es()}function l(e){var t=e.f,r=(t&de)!==0;if(D!==null&&!Be){var n=B!==null&&(B.f&rt)!==0;if(!n&&(Re===null||!Gt.call(Re,e))){var a=D.deps;if((D.f&Jr)!==0)e.rv<Lt&&(e.rv=Lt,xe===null&&a!==null&&a[je]===e?je++:xe===null?xe=[e]:xe.push(e));else{(D.deps??(D.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[D]:Gt.call(i,D)||i.push(D)}}}if(mt&&gt.has(e))return gt.get(e);if(r){var s=e;if(mt){var c=s.v;return((s.f&le)===0&&s.reactions!==null||Na(s))&&(c=rn(s)),gt.set(s,c),c}var o=(s.f&Pe)===0&&!Be&&D!==null&&(Ir||(D.f&Pe)!==0),f=(s.f&Ct)===0;yr(s)&&(o&&(s.f|=Pe),ca(s)),o&&!f&&(fa(s),Ra(s))}if(Fe?.has(e))return Fe.get(e);if((e.f&pt)!==0)throw e.v;return e.v}function Ra(e){if(e.f|=Pe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&de)!==0&&(t.f&Pe)===0&&(fa(t),Ra(t))}function Na(e){if(e.v===he)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(gt.has(t)||(t.f&de)!==0&&Na(t))return!0;return!1}function ar(e){var t=Be;try{return Be=!0,e()}finally{Be=t}}const js=["touchstart","touchmove"];function As(e){return js.includes(e)}const Ot=Symbol("events"),Ia=new Set,fn=new Set;function Ts(e,t,r,n={}){function a(i){if(n.capture||dn.call(t,i),!i.cancelBubble)return Nr(()=>r?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?at(()=>{t.addEventListener(e,a,n)}):t.addEventListener(e,a,n),a}function Ms(e,t,r,n,a){var i={capture:n,passive:a},s=Ts(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ba(()=>{t.removeEventListener(e,s,i)})}function Ze(e,t,r){(t[Ot]??(t[Ot]={}))[e]=r}function un(e){for(var t=0;t<e.length;t++)Ia.add(e[t]);for(var r of fn)r(e)}let Da=null;function dn(e){var t=this,r=t.ownerDocument,n=e.type,a=e.composedPath?.()||[],i=a[0]||e.target;Da=e;var s=0,c=Da===e&&e[Ot];if(c){var o=a.indexOf(c);if(o!==-1&&(t===document||t===window)){e[Ot]=t;return}var f=a.indexOf(t);if(f===-1)return;o<=f&&(s=o)}if(i=a[s]||e.target,i!==t){mi(e,"currentTarget",{configurable:!0,get(){return i||r}});var d=D,_=B;Oe(null),We(null);try{for(var u,p=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var S=i[Ot]?.[n];S!=null&&(!i.disabled||e.target===i)&&S.call(i,e)}catch(h){u?p.push(h):u=h}if(e.cancelBubble||g===t||g===null)break;i=g}if(u){for(let h of p)queueMicrotask(()=>{throw h});throw u}}finally{e[Ot]=t,delete e.currentTarget,Oe(d),We(_)}}}const Ls=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ps(e){return Ls?.createHTML(e)??e}function Os(e,t=!1){var r=ma("template");return e=e.replaceAll("<!>","<!---->"),r.innerHTML=t?Ps(e):e,r.content}function Dr(e,t){var r=B;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function z(e,t){var r=(t&Wi)!==0,n=(t&Zi)!==0,a,i=!e.startsWith("<!>");return()=>{a===void 0&&(a=Os(i?e:"<!>"+e,!0),r||(a=Rr(a)));var s=n||ha?document.importNode(a,!0):a.cloneNode(!0);if(r){var c=Rr(s),o=s.lastChild;Dr(c,o)}else Dr(s,s);return s}}function Rs(e=""){{var t=st(e+"");return Dr(t,t),t}}function qa(){var e=document.createDocumentFragment(),t=document.createComment(""),r=st();return e.append(t,r),Dr(t,r),e}function y(e,t){e!==null&&e.before(t)}function N(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Ns(e,t){return Is(e,t)}const qr=new Map;function Is(e,{target:t,anchor:r,props:n={},events:a,context:i,intro:s=!0}){ps();var c=void 0,o=ys(()=>{var f=r??t.appendChild(st());as(f,{pending:()=>{}},u=>{Qt({});var p=ke;i&&(p.c=i),a&&(n.$$events=a),c=e(u,n)||{},Xt()});var d=new Set,_=u=>{for(var p=0;p<u.length;p++){var g=u[p];if(!d.has(g)){d.add(g);var S=As(g);for(const m of[t,document]){var h=qr.get(m);h===void 0&&(h=new Map,qr.set(m,h));var b=h.get(g);b===void 0?(m.addEventListener(g,dn,{passive:S}),h.set(g,1)):h.set(g,b+1)}}}};return _(Tr(Ia)),fn.add(_),()=>{for(var u of d)for(const S of[t,document]){var p=qr.get(S),g=p.get(u);--g==0?(S.removeEventListener(u,dn),p.delete(u),p.size===0&&qr.delete(S)):p.set(u,g)}fn.delete(_),f!==r&&f.parentNode?.removeChild(f)}});return vn.set(c,o),c}let vn=new WeakMap;function Ds(e,t){const r=vn.get(e);return r?(vn.delete(e),r(t)):Promise.resolve()}class qs{constructor(t,r=!0){et(this,"anchor");F(this,Ke,new Map);F(this,Xe,new Map);F(this,Me,new Map);F(this,Ft,new Set);F(this,jr,!0);F(this,Ar,()=>{var t=V;if(v(this,Ke).has(t)){var r=v(this,Ke).get(t),n=v(this,Xe).get(r);if(n)cn(n),v(this,Ft).delete(r);else{var a=v(this,Me).get(r);a&&(v(this,Xe).set(r,a.effect),v(this,Me).delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),n=a.effect)}for(const[i,s]of v(this,Ke)){if(v(this,Ke).delete(i),i===t)break;const c=v(this,Me).get(s);c&&(ye(c.effect),v(this,Me).delete(s))}for(const[i,s]of v(this,Xe)){if(i===r||v(this,Ft).has(i))continue;const c=()=>{if(Array.from(v(this,Ke).values()).includes(i)){var f=document.createDocumentFragment();ka(s,f),f.append(st()),v(this,Me).set(i,{effect:s,fragment:f})}else ye(s);v(this,Ft).delete(i),v(this,Xe).delete(i)};v(this,jr)||!n?(v(this,Ft).add(i),Mt(s,c,!1)):c()}}});F(this,Br,t=>{v(this,Ke).delete(t);const r=Array.from(v(this,Ke).values());for(const[n,a]of v(this,Me))r.includes(n)||(ye(a.effect),v(this,Me).delete(n))});this.anchor=t,R(this,jr,r)}ensure(t,r){var n=V,a=ga();if(r&&!v(this,Xe).has(t)&&!v(this,Me).has(t))if(a){var i=document.createDocumentFragment(),s=st();i.append(s),v(this,Me).set(t,{effect:He(()=>r(s)),fragment:i})}else v(this,Xe).set(t,He(()=>r(this.anchor)));if(v(this,Ke).set(n,t),a){for(const[c,o]of v(this,Xe))c===t?n.unskip_effect(o):n.skip_effect(o);for(const[c,o]of v(this,Me))c===t?n.unskip_effect(o.effect):n.skip_effect(o.effect);n.oncommit(v(this,Ar)),n.ondiscard(v(this,Br))}else v(this,Ar).call(this)}}Ke=new WeakMap,Xe=new WeakMap,Me=new WeakMap,Ft=new WeakMap,jr=new WeakMap,Ar=new WeakMap,Br=new WeakMap;function L(e,t,r=!1){var n=new qs(e),a=r?Zt:0;function i(s,c){n.ensure(s,c)}on(()=>{var s=!1;t((c,o=0)=>{s=!0,i(o,c)}),s||i(!1,null)},a)}function Fa(e,t){return t}function Fs(e,t,r){for(var n=[],a=t.length,i,s=t.length,c=0;c<a;c++){let _=t[c];Mt(_,()=>{if(i){if(i.pending.delete(_),i.done.add(_),i.pending.size===0){var u=e.outrogroups;hn(Tr(i.done)),u.delete(i),u.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var o=n.length===0&&r!==null;if(o){var f=r,d=f.parentNode;_s(d),d.append(f),e.items.clear()}hn(t,!o)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function hn(e,t=!0){for(var r=0;r<e.length;r++)ye(e[r],t)}var Ua;function Fr(e,t,r,n,a,i=null){var s=e,c=new Map,o=(t&Zn)!==0;if(o){var f=e;s=f.appendChild(st())}var d=null,_=la(()=>{var b=r();return Un(b)?b:b==null?[]:Tr(b)}),u,p=!0;function g(){h.fallback=d,Us(h,u,s,t,n),d!==null&&(u.length===0?(d.f&nt)===0?cn(d):(d.f^=nt,Sr(d,null,s)):Mt(d,()=>{d=null}))}var S=on(()=>{u=l(_);for(var b=u.length,m=new Set,k=V,C=ga(),M=0;M<b;M+=1){var W=u[M],q=n(W,M),Z=p?null:c.get(q);Z?(Z.v&&er(Z.v,W),Z.i&&er(Z.i,M),C&&k.unskip_effect(Z.e)):(Z=Hs(c,p?s:Ua??(Ua=st()),W,q,M,a,t,r),p||(Z.e.f|=nt),c.set(q,Z)),m.add(q)}if(b===0&&i&&!d&&(p?d=He(()=>i(s)):(d=He(()=>i(Ua??(Ua=st()))),d.f|=nt)),b>m.size&&Ai(),!p)if(C){for(const[P,I]of c)m.has(P)||k.skip_effect(I.e);k.oncommit(g),k.ondiscard(()=>{})}else g();l(_)}),h={effect:S,items:c,outrogroups:null,fallback:d};p=!1}function zr(e){for(;e!==null&&(e.f&De)===0;)e=e.next;return e}function Us(e,t,r,n,a){var i=(n&Ui)!==0,s=t.length,c=e.items,o=zr(e.effect.first),f,d=null,_,u=[],p=[],g,S,h,b;if(i)for(b=0;b<s;b+=1)g=t[b],S=a(g,b),h=c.get(S).e,(h.f&nt)===0&&(h.nodes?.a?.measure(),(_??(_=new Set)).add(h));for(b=0;b<s;b+=1){if(g=t[b],S=a(g,b),h=c.get(S).e,e.outrogroups!==null)for(const I of e.outrogroups)I.pending.delete(h),I.done.delete(h);if((h.f&nt)!==0)if(h.f^=nt,h===o)Sr(h,null,r);else{var m=d?d.next:o;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),wt(e,d,h),wt(e,h,m),Sr(h,m,r),d=h,u=[],p=[],o=zr(d.next);continue}if((h.f&Ee)!==0&&(cn(h),i&&(h.nodes?.a?.unfix(),(_??(_=new Set)).delete(h))),h!==o){if(f!==void 0&&f.has(h)){if(u.length<p.length){var k=p[0],C;d=k.prev;var M=u[0],W=u[u.length-1];for(C=0;C<u.length;C+=1)Sr(u[C],k,r);for(C=0;C<p.length;C+=1)f.delete(p[C]);wt(e,M.prev,W.next),wt(e,d,M),wt(e,W,k),o=k,d=W,b-=1,u=[],p=[]}else f.delete(h),Sr(h,o,r),wt(e,h.prev,h.next),wt(e,h,d===null?e.effect.first:d.next),wt(e,d,h),d=h;continue}for(u=[],p=[];o!==null&&o!==h;)(f??(f=new Set)).add(o),p.push(o),o=zr(o.next);if(o===null)continue}(h.f&nt)===0&&u.push(h),d=h,o=zr(h.next)}if(e.outrogroups!==null){for(const I of e.outrogroups)I.pending.size===0&&(hn(Tr(I.done)),e.outrogroups?.delete(I));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||f!==void 0){var q=[];if(f!==void 0)for(h of f)(h.f&Ee)===0&&q.push(h);for(;o!==null;)(o.f&Ee)===0&&o!==e.fallback&&q.push(o),o=zr(o.next);var Z=q.length;if(Z>0){var P=(n&Zn)!==0&&s===0?r:null;if(i){for(b=0;b<Z;b+=1)q[b].nodes?.a?.measure();for(b=0;b<Z;b+=1)q[b].nodes?.a?.fix()}Fs(e,q,P)}}i&&at(()=>{if(_!==void 0)for(h of _)h.nodes?.a?.apply()})}function Hs(e,t,r,n,a,i,s,c){var o=(s&qi)!==0?(s&Hi)===0?vs(r,!1,!1):At(r):null,f=(s&Fi)!==0?At(a):null;return{v:o,i:f,e:He(()=>(i(t,o??r,f??a,c),()=>{e.delete(n)}))}}function Sr(e,t,r){if(e.nodes)for(var n=e.nodes.start,a=e.nodes.end,i=t&&(t.f&nt)===0?t.nodes.start:r;n!==null;){var s=br(n);if(i.before(n),n===a)return;n=s}}function wt(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function lt(e,t){xa(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const a=ma("style");a.id=t.hash,a.textContent=t.code,n.appendChild(a)}})}const Ha=[...`
5
+ \r\f \v\uFEFF`];function Bs(e,t,r){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),r){for(var a in r)if(r[a])n=n?n+" "+a:a;else if(n.length)for(var i=a.length,s=0;(s=n.indexOf(a,s))>=0;){var c=s+i;(s===0||Ha.includes(n[s-1]))&&(c===n.length||Ha.includes(n[c]))?n=(s===0?"":n.substring(0,s))+n.substring(c+1):s=c}}return n===""?null:n}function Vs(e,t){return e==null?null:String(e)}function ze(e,t,r,n,a,i){var s=e.__className;if(s!==r||s===void 0){var c=Bs(r,n,i);c==null?e.removeAttribute("class"):e.className=c,e.__className=r}else if(i&&a!==i)for(var o in i){var f=!!i[o];(a==null||f!==!!a[o])&&e.classList.toggle(o,f)}return i}function Rt(e,t,r,n){var a=e.__style;if(a!==t){var i=Vs(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return n}const Ks=Symbol("is custom element"),Gs=Symbol("is html");function ee(e,t,r,n){var a=Ws(e);a[t]!==(a[t]=r)&&(t==="loading"&&(e[Ei]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Zs(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Ws(e){return e.__attributes??(e.__attributes={[Ks]:e.nodeName.includes("-"),[Gs]:e.namespaceURI===Yn})}var Ba=new Map;function Zs(e){var t=e.getAttribute("is")||e.nodeName,r=Ba.get(t);if(r)return r;Ba.set(t,r=[]);for(var n,a=e,i=Element.prototype;i!==a;){n=wi(a);for(var s in n)n[s].set&&r.push(s);a=Hn(a)}return r}function Ys(e,t,r=t){var n=new WeakSet;ms(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=pn(e)?_n(i):i,r(i),V!==null&&n.add(V),await ks(),i!==(i=t())){var s=e.selectionStart,c=e.selectionEnd,o=e.value.length;if(e.value=i??"",c!==null){var f=e.value.length;s===c&&c===o&&f>o?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=s,e.selectionEnd=Math.min(c,f))}}}),ar(t)==null&&e.value&&(r(pn(e)?_n(e.value):e.value),V!==null&&n.add(V)),sn(()=>{var a=t();if(e===document.activeElement){var i=$r??V;if(n.has(i))return}pn(e)&&a===_n(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function pn(e){var t=e.type;return t==="number"||t==="range"}function _n(e){return e===""?null:+e}function Va(e,t){return e===t||e?.[gr]===t}function gn(e={},t,r,n){return xa(()=>{var a,i;return sn(()=>{a=i,i=[],ar(()=>{e!==r(...i)&&(t(e,...i),a&&Va(r(...a),e)&&t(null,...a))})}),()=>{at(()=>{i&&Va(r(...i),e)&&t(null,...i)})}}),e}let Ur=!1;function Js(e){var t=Ur;try{return Ur=!1,[e(),Ur]}finally{Ur=t}}function j(e,t,r,n){var a=(r&Ki)!==0,i=(r&Gi)!==0,s=n,c=!0,o=()=>(c&&(c=!1,s=i?ar(n):n),s),f;if(a){var d=gr in e||Ci in e;f=Wt(e,t)?.set??(d&&t in e?m=>e[t]=m:void 0)}var _,u=!1;a?[_,u]=Js(()=>e[t]):_=e[t],_===void 0&&n!==void 0&&(_=o(),f&&(Oi(),f(_)));var p;if(p=()=>{var m=e[t];return m===void 0?o():(c=!0,m)},(r&Vi)===0)return p;if(f){var g=e.$$legacy;return(function(m,k){return arguments.length>0?((!k||g||u)&&f(k?p():m),m):p()})}var S=!1,h=((r&Bi)!==0?Or:la)(()=>(S=!1,p()));a&&l(h);var b=B;return(function(m,k){if(arguments.length>0){const C=k?l(h):a?Tt(m):m;return E(h,C),S=!0,s!==void 0&&(s=C),m}return mt&&S||(b.f&rt)!==0?h.v:l(h)})}function Ka(e){ke===null&&ki(),rr(()=>{const t=ar(e);if(typeof t=="function")return t})}function Qs(e,t){var r,n;return n=class{constructor(i){F(this,r,null);if(!Kt)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,...c}=i??{},o=typeof s=="string"?document.querySelector(s):s;if(!o)throw new Error(`[sevn] ${t}: alvo não encontrado`+(typeof s=="string"?` para o seletor "${s}".`:"."));fi(),R(this,r,Ns(e,{target:o,props:c}))}destroy(){if(!v(this,r))return Promise.resolve();const i=v(this,r);return R(this,r,null),Ds(i)}},r=new WeakMap,n}function Ga(e){try{return new URL(e,document.baseURI).searchParams.get("cid")}catch{return null}}function Xs(){const e=document.currentScript;if(e?.src){const r=Ga(e.src);if(r)return r}const t=document.querySelectorAll('script[src*="cid="]');for(const r of t){const n=Ga(r.src);if(n)return n}return null}function $s(){if(!Kt)return;const e=Xs();if(e)try{Gr(e)}catch(t){console.error("[sevn] Chave inválida na tag <script>:",t)}}const eo="5";typeof window<"u"&&((ti=window.__svelte??(window.__svelte={})).v??(ti.v=new Set)).add(eo);const to="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",ro="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 no=z('<span class="avatar-tag svelte-ga6vh2"> </span>'),ao=z('<div class="avatar-container svelte-ga6vh2"><div class="avatar svelte-ga6vh2"><img width="1" height="1"/></div> <!></div>');const io={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 Wa(e,t){lt(e,io);let r=j(t,"avatar",3,"man"),n=j(t,"size",3,"md"),a=j(t,"tagColor",3,"var(--sevn-color-green)"),i=$(!1);const s=H(()=>r()==="woman"?ro:to),c=H(()=>!!t.photoUrl&&!l(i)),o=H(()=>l(c)?t.photoUrl:l(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[n()]??n()),u=H(()=>d[n()]??d.md);var p=ao(),g=w(p),S=w(g);let h;var b=A(g,2);{var m=k=>{var C=no(),M=w(C);T(()=>{Rt(C,`background-color: ${a()??""}; font-size: ${l(u).fontSize??""}; padding: ${l(u).padding??""};`),N(M,t.tag)}),y(k,C)};L(b,k=>{t.tag&&k(m)})}T(()=>{Rt(g,`background-color: ${t.avatarColor??"var(--sevn-color-secondary)"??""}; width: ${l(_)??""}; height: ${l(_)??""};`),h=ze(S,1,"avatar-image svelte-ga6vh2",null,h,{"avatar-image--photo":l(c)}),ee(S,"src",l(o)),ee(S,"alt",t.name)}),Ms("error",S,()=>E(i,!0)),y(e,p)}const so="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M25.9798%2026.872L17.6305%2018.5227C16.9638%2019.0907%2016.1971%2019.5302%2015.3305%2019.8413C14.4638%2020.1524%2013.5927%2020.308%2012.7171%2020.308C10.582%2020.308%208.77493%2019.5689%207.29582%2018.0907C5.8167%2016.6124%205.07715%2014.8058%205.07715%2012.6707C5.07715%2010.5356%205.81581%208.728%207.29315%207.248C8.77048%205.768%2010.5767%205.02711%2012.7118%205.02533C14.8469%205.02356%2016.6549%205.76311%2018.1358%207.244C19.6167%208.72489%2020.3571%2010.5324%2020.3571%2012.6667C20.3571%2013.5929%2020.1931%2014.4893%2019.8651%2015.356C19.5371%2016.2227%2019.106%2016.964%2018.5718%2017.58L26.9211%2025.928L25.9798%2026.872ZM12.7185%2018.9733C14.4874%2018.9733%2015.9807%2018.3644%2017.1985%2017.1467C18.4163%2015.9289%2019.0251%2014.4351%2019.0251%2012.6653C19.0251%2010.8956%2018.4163%209.40222%2017.1985%208.18533C15.9807%206.96844%2014.4874%206.35956%2012.7185%206.35867C10.9496%206.35778%209.45581%206.96667%208.23715%208.18533C7.01848%209.404%206.40959%2010.8973%206.41048%2012.6653C6.41137%2014.4333%207.02026%2015.9267%208.23715%2017.1453C9.45404%2018.364%2010.9474%2018.9729%2012.7171%2018.972'%20fill='%231C1C1C'/%3e%3c/svg%3e",ir="data:image/svg+xml,%3csvg%20width='13'%20height='8'%20viewBox='0%200%2013%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.91%20-0.00016065L12.97%201.06084L7.193%206.83984C7.10043%206.93299%206.99036%207.00692%206.86911%207.05737C6.74786%207.10782%206.61783%207.13379%206.4865%207.13379C6.35517%207.13379%206.22514%207.10782%206.10389%207.05737C5.98264%207.00692%205.87257%206.93299%205.78%206.83984L2.65457e-07%201.06084L1.06%200.000838803L6.485%205.42484L11.91%20-0.00016065Z'%20fill='black'/%3e%3c/svg%3e",Za="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.5%201.5L1.5%2010.5M1.5%201.5L10.5%2010.5'%20stroke='black'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3c/svg%3e";var oo=z('<span class="mobile-label svelte-1dw55dz"> </span>'),lo=z('<input class="search-input svelte-1dw55dz" type="text"/>'),co=z('<span class="field-label-prefix svelte-1dw55dz"> </span>'),fo=z('<span class="field-text svelte-1dw55dz"><!> </span>'),uo=z("<span> </span>"),vo=z('<button class="icon-clear svelte-1dw55dz" type="button" aria-label="Limpar seleção"><img alt="" aria-hidden="true"/></button>'),ho=z('<img alt="" aria-hidden="true"/>'),po=z('<img class="icon-search svelte-1dw55dz" alt="" aria-hidden="true"/>'),_o=z('<span class="meta svelte-1dw55dz"> </span>'),go=z('<div class="web-info svelte-1dw55dz"><span class="selected-label svelte-1dw55dz"><strong class="svelte-1dw55dz">Você selecionou:</strong> </span> <!></div>'),mo=z('<button type="button" role="option"> </button>'),wo=z('<div class="no-results svelte-1dw55dz">Nenhum resultado encontrado</div>'),bo=z('<div class="dropdown svelte-1dw55dz" role="listbox"></div>'),yo=z('<div><!> <div role="combobox" aria-haspopup="listbox"><!> <!></div> <!> <!></div>');const xo={hash:"svelte-1dw55dz",code:`.autocomplete.svelte-1dw55dz {position:relative;width:var(--field-width);font-family:inherit;}
6
+
7
+ /* ── Label (mobile only) ─────────────────────────────── */.mobile-label.svelte-1dw55dz {display:none;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:6px;}
8
+
9
+ @media (max-width: 768px) {.mobile-label.svelte-1dw55dz {display:block;}
10
+ }
11
+
12
+ /* ── Campo principal ─────────────────────────────────── */.field.svelte-1dw55dz {display:flex;align-items:center;width:100%;height:var(--field-height);padding:0 14px;background:var(--sevn-color-neutral);border:1px solid transparent;border-radius:8px;cursor:pointer;gap:8px;transition:border-color 0.15s, box-shadow 0.15s;color:var(--sevn-color-tertiary);}.field.svelte-1dw55dz:hover {border-color:#d1d1d6;}.field.disabled.svelte-1dw55dz {cursor:not-allowed;opacity:0.55;}.field.disabled.svelte-1dw55dz:hover {border-color:transparent;}.field.open.svelte-1dw55dz {border-color:var(--sevn-color-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--sevn-color-primary) 15%, transparent);background:#fff;}
13
+
14
+ /* ── Texto do campo ──────────────────────────────────── */.field-text.svelte-1dw55dz {flex:1;text-align:left;font-size:0.9375rem;color:var(--sevn-color-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.field-text.is-placeholder.svelte-1dw55dz {color:#9a9aaa;}.field-label-prefix.svelte-1dw55dz {font-weight:600;margin-right:4px;}
15
+
16
+ /* ── Input de busca ──────────────────────────────────── */.search-input.svelte-1dw55dz {flex:1;border:none;outline:none;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);background:transparent;min-width:0;}.search-input.svelte-1dw55dz::placeholder {color:#9a9aaa;}
17
+
18
+ /* ── Ícone de lupa ───────────────────────────────────── */.icon-search.svelte-1dw55dz {flex-shrink:0;}.field.open.svelte-1dw55dz .icon-search:where(.svelte-1dw55dz) {opacity:1;}
19
+
20
+ /* ── Botão de limpar ─────────────────────────────────── */.icon-clear.svelte-1dw55dz {display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.icon-clear.svelte-1dw55dz:hover,
21
+ .icon-clear.svelte-1dw55dz:focus-visible {background:rgba(0, 0, 0, 0.08);}
22
+
23
+ /* ── Ícone de chevron ────────────────────────────────── */.icon-chevron.svelte-1dw55dz {flex-shrink:0;transition:transform 0.2s ease;}.icon-chevron.open.svelte-1dw55dz {transform:rotate(180deg);}
24
+
25
+ /* ── "Você selecionou" (web only) ────────────────────── */.web-info.svelte-1dw55dz {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:20px;font-size:0.8125rem;color:var(--sevn-color-tertiary);}.selected-label.svelte-1dw55dz strong:where(.svelte-1dw55dz) {font-weight:600;}.meta.svelte-1dw55dz {font-size:0.7rem;opacity:50%;}
26
+
27
+ @media (max-width: 768px) {.web-info.svelte-1dw55dz {display:none;}.field-text.svelte-1dw55dz {font-weight:600;}.field-text.is-placeholder.svelte-1dw55dz:not(.force-placeholder) {display:none;}.search-input.svelte-1dw55dz::placeholder {color:transparent;}.show-placeholder-mobile.svelte-1dw55dz .search-input:where(.svelte-1dw55dz)::placeholder {color:#9a9aaa;}.icon-search.svelte-1dw55dz {margin-left:auto;}
28
+ }
29
+
30
+ /* ── Dropdown ────────────────────────────────────────── */.dropdown.svelte-1dw55dz {position:absolute;top:calc(var(--field-height) + 6px);left:0;right:0;background:#fff;border:1px solid #d1d1d6;border-radius:8px;max-height:240px;overflow-y:auto;z-index:200;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);scrollbar-width:thin;scrollbar-color:#d1d1d6 transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar {width:4px;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-track {background:transparent;}.dropdown.svelte-1dw55dz::-webkit-scrollbar-thumb {background-color:#d1d1d6;border-radius:4px;}
31
+
32
+ /* ── Opção ───────────────────────────────────────────── */.option.svelte-1dw55dz {display:block;width:100%;padding:11px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.9375rem;font-family:inherit;color:var(--sevn-color-tertiary);transition:background 0.1s;line-height:1.4;}.option.svelte-1dw55dz:last-child {border-bottom:none;}.option.svelte-1dw55dz:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-1dw55dz {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}.no-results.svelte-1dw55dz {padding:14px;color:#9a9aaa;font-size:0.875rem;text-align:center;}`};function Cr(e,t){Qt(t,!0),lt(e,xo);let r=j(t,"label",3,""),n=j(t,"showLabel",3,!0),a=j(t,"options",19,()=>[]),i=j(t,"value",15,null),s=j(t,"meta",3,""),c=j(t,"width",3,"100%"),o=j(t,"height",3,"48px"),f=j(t,"icon",3,so),d=j(t,"iconSize",3,13),_=j(t,"showLabelInField",3,!1),u=j(t,"showDescriptionSelection",3,!0),p=j(t,"labelAsPlaceholder",3,!0),g=j(t,"showPlaceholderOnMobile",3,!1),S=j(t,"disabled",3,!1),h=j(t,"clearable",3,!0);const b=`autocomplete-listbox-${Math.random().toString(36).slice(2,9)}`;let m=$(!1),k=$(""),C=$(null),M=$(null),W=H(()=>l(k).trim()?a().filter(x=>x.label.toLowerCase().includes(l(k).trim().toLowerCase())):a()),q=H(()=>i()!=null?a().find(x=>x.value===i())??null:null);function Z(x){i(x.value),E(k,""),E(m,!1)}function P(){S()||(E(m,!l(m)),l(m)||E(k,""))}function I(x){x.stopPropagation(),i(null),E(k,""),E(m,!1)}function ie(x){x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),P())}function pe(x){l(C)&&!l(C).contains(x.target)&&(E(m,!1),E(k,""))}function _e(x){x.key==="Escape"&&(E(m,!1),E(k,""))}rr(()=>{l(m)&&l(M)&&l(M).focus()}),rr(()=>{S()&&(E(m,!1),E(k,""))}),Ka(()=>(document.addEventListener("mousedown",pe),()=>document.removeEventListener("mousedown",pe)));var fe=yo();let Ie;var vt=w(fe);{var yt=x=>{var O=oo(),K=w(O);T(()=>N(K,r())),y(x,O)};L(vt,x=>{n()&&r()&&x(yt)})}var we=A(vt,2);let U;var Q=w(we);{var ge=x=>{var O=lo();gn(O,K=>E(M,K),()=>l(M)),T(()=>ee(O,"placeholder",r())),Ze("keydown",O,_e),Ze("click",O,K=>K.stopPropagation()),Ys(O,()=>l(k),K=>E(k,K)),y(x,O)},Ut=x=>{var O=fo(),K=w(O);{var Ce=se=>{var Le=co(),xt=w(Le);T(()=>N(xt,r())),y(se,Le)};L(K,se=>{_()&&se(Ce)})}var X=A(K,1,!0);T(()=>N(X,l(q).label)),y(x,O)},Ht=x=>{var O=qa(),K=tr(O);{var Ce=X=>{var se=uo();let Le;var xt=w(se);T(()=>{Le=ze(se,1,"field-text is-placeholder svelte-1dw55dz",null,Le,{"force-placeholder":g()}),N(xt,r())}),y(X,se)};L(K,X=>{p()&&X(Ce)})}y(x,O)};L(Q,x=>{l(m)?x(ge):l(q)?x(Ut,1):x(Ht,!1)})}var J=A(Q,2);{var te=x=>{var O=vo(),K=w(O);T(()=>{ee(K,"src",Za),ee(K,"width",d()?d():12),ee(K,"height",d()?d():12)}),Ze("click",O,I),y(x,O)},oe=x=>{var O=ho();let K;T(()=>{K=ze(O,1,"icon-chevron svelte-1dw55dz",null,K,{open:l(m)}),ee(O,"src",ir),ee(O,"width",d()?d():12),ee(O,"height",d()?d():12)}),y(x,O)},me=x=>{var O=po();T(()=>{ee(O,"src",f()),ee(O,"width",d()),ee(O,"height",d())}),y(x,O)};L(J,x=>{l(q)&&h()&&!S()?x(te):l(q)?x(oe,1):x(me,!1)})}var Ge=A(we,2);{var $e=x=>{var O=go(),K=w(O),Ce=A(w(K)),X=A(K,2);{var se=Le=>{var xt=_o(),Sn=w(xt);T(()=>N(Sn,s())),y(Le,xt)};L(X,Le=>{s()&&Le(se)})}T(()=>N(Ce,` ${l(q).label??""}`)),y(x,O)};L(Ge,x=>{l(q)&&u()&&x($e)})}var re=A(Ge,2);{var Se=x=>{var O=bo();Fr(O,21,()=>l(W),K=>K.value,(K,Ce)=>{var X=mo();let se;var Le=w(X);T(()=>{se=ze(X,1,"option svelte-1dw55dz",null,se,{selected:l(Ce).value===i()}),ee(X,"aria-selected",l(Ce).value===i()),N(Le,l(Ce).label)}),Ze("click",X,()=>Z(l(Ce))),y(K,X)},K=>{var Ce=wo();y(K,Ce)}),T(()=>ee(O,"id",b)),y(x,O)};L(re,x=>{l(m)&&x(Se)})}gn(fe,x=>E(C,x),()=>l(C)),T(()=>{Ie=ze(fe,1,"autocomplete svelte-1dw55dz",null,Ie,{"show-placeholder-mobile":g()}),Rt(fe,`--field-width: ${c()??""}; --field-height: ${o()??""}`),U=ze(we,1,"field svelte-1dw55dz",null,U,{open:l(m),"has-value":l(q)&&!l(m),disabled:S()}),ee(we,"tabindex",S()?-1:0),ee(we,"aria-controls",b),ee(we,"aria-expanded",l(m)),ee(we,"aria-disabled",S())}),Ze("click",we,P),Ze("keydown",we,ie),y(e,fe),Xt()}un(["click","keydown"]);var zo=z("<span> </span>");const So={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 sr(e,t){lt(e,So);let r=j(t,"color",3,"#1C1C1C"),n=j(t,"fontSize",3,"0.6875rem"),a=j(t,"class",3,"");var i=zo(),s=w(i);T(()=>{ze(i,1,`tag ${a()??""}`,"svelte-pamnib"),Rt(i,`background-color: ${r()??""}; font-size: ${n()??""}`),N(s,t.label)}),y(e,i)}var Co=z('<p class="candidate-description svelte-q1jzvs"> </p>'),Eo=z('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),ko=z('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),jo=z('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),Ao=z('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),To=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>'),Mo=z('<p class="candidate-description svelte-q1jzvs"> </p>'),Lo=z('<span class="candidate-stats-percent-suffix svelte-q1jzvs"> </span>'),Po=z('<span class="candidate-stats-percent svelte-q1jzvs"> <!></span>'),Oo=z('<span class="candidate-stats-votes svelte-q1jzvs"> </span>'),Ro=z('<div class="candidate-stats svelte-q1jzvs"><!> <!></div>'),No=z('<!> <div><div class="candidate-name-row svelte-q1jzvs"><span class="candidate-name svelte-q1jzvs"> </span> <!> <!></div> <!></div>',1),Io=z("<span> </span>"),Do=z('<div class="candidate svelte-q1jzvs"><!> <!></div>');const qo={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;}
33
+
34
+ /* 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;}
35
+
36
+ /* ── 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;}
37
+
38
+ @media (min-width: 768px) {.candidate-stats.svelte-q1jzvs {flex-direction:row;gap:8px;}.candidate-stats-percent-suffix.svelte-q1jzvs {display:none;}
39
+ }
40
+
41
+ @media (max-width: 640px) {.candidate.svelte-q1jzvs {flex:1;flex-wrap:wrap;align-items:center;}.candidate-info.svelte-q1jzvs {flex:1;}
42
+
43
+ /* 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;}
44
+ }`};function Ya(e,t){lt(e,qo);let r=j(t,"avatar",3,"man"),n=j(t,"elected",3,!1),a=j(t,"electedLabel",3,"ELEITO"),i=j(t,"electedColor",3,"var(--sevn-color-green)"),s=j(t,"descriptionSide",3,"inline"),c=j(t,"positionSide",3,"right"),o=j(t,"size",3,"md"),f=j(t,"nameWeight",3,700),d=j(t,"descWeight",3,400),_=j(t,"wrapper",3,!1);const u={sm:{fontSize:"0.875rem",descSize:"0.75rem",tagSize:"0.625rem"},md:{fontSize:"1.125rem",descSize:"0.875rem",tagSize:"0.6875rem"},lg:{fontSize:"1.375rem",descSize:"1rem",tagSize:"0.75rem"}},p=H(()=>u[o()]??u.md);var g=Do(),S=w(g);{var h=C=>{var M=To(),W=w(M);Wa(W,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return r()},get avatarColor(){return t.avatarColor},get size(){return o()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var q=A(W,2);let Z;var P=w(q),I=w(P),ie=w(I),pe=A(I,2);{var _e=U=>{{let Q=H(()=>t.tagColor??"var(--sevn-color-secondary)"),ge=H(()=>t.tagSize??l(p).tagSize);sr(U,{get label(){return t.tag},get color(){return l(Q)},get fontSize(){return l(ge)}})}};L(pe,U=>{t.tag&&U(_e)})}var fe=A(pe,2);{var Ie=U=>{{let Q=H(()=>t.tagSize??l(p).tagSize);sr(U,{get label(){return a()},get color(){return i()},get fontSize(){return l(Q)}})}};L(fe,U=>{n()&&U(Ie)})}var vt=A(P,2);{var yt=U=>{var Q=Co(),ge=w(Q);T(()=>N(ge,t.description)),y(U,Q)},we=U=>{var Q=Ao(),ge=w(Q);{var Ut=te=>{var oe=ko(),me=w(oe),Ge=A(me);{var $e=re=>{var Se=Eo(),x=w(Se);T(()=>N(x,t.percentSuffix)),y(re,Se)};L(Ge,re=>{t.percentSuffix&&re($e)})}T(()=>N(me,`${t.percent??""} `)),y(te,oe)};L(ge,te=>{t.percent&&te(Ut)})}var Ht=A(ge,2);{var J=te=>{var oe=jo(),me=w(oe);T(()=>N(me,t.votes)),y(te,oe)};L(Ht,te=>{t.votes&&te(J)})}y(U,Q)};L(vt,U=>{t.description?U(yt):(t.percent||t.votes)&&U(we,1)})}T(()=>{Z=ze(q,1,"candidate-info svelte-q1jzvs",null,Z,{right:s()==="right"&&!!t.description}),N(ie,t.name)}),y(C,M)},b=C=>{var M=No(),W=tr(M);Wa(W,{get name(){return t.name},get photoUrl(){return t.photoUrl},get avatar(){return r()},get avatarColor(){return t.avatarColor},get size(){return o()},get tag(){return t.avatarTag},get tagColor(){return t.avatarTagColor}});var q=A(W,2);let Z;var P=w(q),I=w(P),ie=w(I),pe=A(I,2);{var _e=U=>{{let Q=H(()=>t.tagColor??"var(--sevn-color-secondary)"),ge=H(()=>t.tagSize??l(p).tagSize);sr(U,{get label(){return t.tag},get color(){return l(Q)},get fontSize(){return l(ge)}})}};L(pe,U=>{t.tag&&U(_e)})}var fe=A(pe,2);{var Ie=U=>{{let Q=H(()=>t.tagSize??l(p).tagSize);sr(U,{get label(){return a()},get color(){return i()},get fontSize(){return l(Q)}})}};L(fe,U=>{n()&&U(Ie)})}var vt=A(P,2);{var yt=U=>{var Q=Mo(),ge=w(Q);T(()=>N(ge,t.description)),y(U,Q)},we=U=>{var Q=Ro(),ge=w(Q);{var Ut=te=>{var oe=Po(),me=w(oe),Ge=A(me);{var $e=re=>{var Se=Lo(),x=w(Se);T(()=>N(x,t.percentSuffix)),y(re,Se)};L(Ge,re=>{t.percentSuffix&&re($e)})}T(()=>N(me,`${t.percent??""} `)),y(te,oe)};L(ge,te=>{t.percent&&te(Ut)})}var Ht=A(ge,2);{var J=te=>{var oe=Oo(),me=w(oe);T(()=>N(me,t.votes)),y(te,oe)};L(Ht,te=>{t.votes&&te(J)})}y(U,Q)};L(vt,U=>{t.description?U(yt):(t.percent||t.votes)&&U(we,1)})}T(()=>{Z=ze(q,1,"candidate-info svelte-q1jzvs",null,Z,{right:s()==="right"&&!!t.description}),N(ie,t.name)}),y(C,M)};L(S,C=>{_()?C(h):C(b,!1)})}var m=A(S,2);{var k=C=>{var M=Io();let W;var q=w(M);T(()=>{W=ze(M,1,"candidate-position svelte-q1jzvs",null,W,{left:c()==="left"}),N(q,t.position)}),y(C,M)};L(m,C=>{t.position&&C(k)})}T(()=>Rt(g,`
45
+ --font-name: ${t.fontSize??l(p).fontSize??""};
46
+ --font-desc: ${t.descSize??l(p).descSize??""};
47
+ --font-tag: ${t.tagSize??l(p).tagSize??""};
48
+ --font-position: ${t.positionSize??l(p).fontSize??""};
49
+ --weight-name: ${f()??""};
50
+ --weight-desc: ${d()??""};
51
+ gap: ${_()?"10px":"18px"};
52
+ `)),y(e,g)}var Fo=z('<div class="candidate-list-item svelte-vjp3fo"><div class="candidate-list-row svelte-vjp3fo"><span class="candidate-list-position svelte-vjp3fo"> </span> <!> <span class="candidate-list-number svelte-vjp3fo"> </span> <span class="candidate-list-votes svelte-vjp3fo"> </span></div> <div class="candidate-list-card-mobile svelte-vjp3fo"><span class="candidate-list-number-label svelte-vjp3fo"> </span> <!></div></div>'),Uo=z(' <span class="candidate-list-more-count svelte-vjp3fo"> </span>',1),Ho=z('<button class="candidate-list-more svelte-vjp3fo" type="button"><!></button>'),Bo=z('<div class="candidate-list svelte-vjp3fo"><!> <!></div>');const Vo={hash:"svelte-vjp3fo",code:`.candidate-list.svelte-vjp3fo {display:flex;flex-direction:column;}.candidate-list-more.svelte-vjp3fo {align-self:stretch;margin-top:16px;padding:10px 20px;background:none;border:1px solid var(--sevn-color-neutral);border-radius:8px;cursor:pointer;font-family:inherit;font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);transition:background 0.15s, border-color 0.15s;}.candidate-list-more.svelte-vjp3fo:hover,
53
+ .candidate-list-more.svelte-vjp3fo:focus-visible {background:var(--sevn-color-neutral);border-color:#d1d1d6;}.candidate-list-more-count.svelte-vjp3fo {font-weight:400;opacity:0.55;}
54
+
55
+ /* ── Mobile (default) ─────────────────── */.candidate-list-row.svelte-vjp3fo {display:none;}.candidate-list-card-mobile.svelte-vjp3fo {display:flex;flex-direction:column;gap:6px;padding:16px 0;}.candidate-list-item.svelte-vjp3fo:not(:last-child) .candidate-list-card-mobile:where(.svelte-vjp3fo) {border-bottom:1px solid var(--sevn-color-neutral);}.candidate-list-number-label.svelte-vjp3fo {font-size:0.75rem;font-weight:600;color:var(--sevn-color-tertiary);margin-bottom:10px;opacity:0.5;}
56
+
57
+ /* ── Desktop ──────────────────────────── */
58
+ @media (min-width: 768px) {.candidate-list-card-mobile.svelte-vjp3fo {display:none;}.candidate-list-row.svelte-vjp3fo {display:grid;grid-template-columns:100px 1fr auto auto;align-items:center;column-gap:24px;padding:20px 0;}.candidate-list-item.svelte-vjp3fo:not(:last-child) .candidate-list-row:where(.svelte-vjp3fo) {border-bottom:1px solid var(--sevn-color-neutral);}.candidate-list-position.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);white-space:nowrap;}.candidate-list-number.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.55;white-space:nowrap;}.candidate-list-votes.svelte-vjp3fo {font-size:0.875rem;font-weight:600;color:var(--sevn-color-tertiary);opacity:0.55;white-space:nowrap;min-width:190px;text-align:right;}.candidate-list.svelte-vjp3fo .candidate {justify-content:flex-start;}
59
+ }`};function Ko(e,t){Qt(t,!0),lt(e,Vo);let r=j(t,"candidates",19,()=>[]),n=j(t,"itemsPerPage",3,10),a=j(t,"showMoreLabel",3,"Ver mais"),i=j(t,"showLessLabel",3,"Ver menos"),s=$(1);rr(()=>{r(),n(),E(s,1)});const c=H(()=>n()>0&&r().length>n()),o=H(()=>l(c)?r().slice(0,l(s)*n()):r()),f=H(()=>r().length-l(o).length),d=H(()=>l(c)&&l(f)===0);var _=Bo(),u=w(_);Fr(u,17,()=>l(o),Fa,(S,h)=>{var b=Fo(),m=w(b),k=w(m),C=w(k),M=A(k,2);{let fe=H(()=>l(h).avatar??"man");Ya(M,{get name(){return l(h).name},get photoUrl(){return l(h).photoUrl},get avatar(){return l(fe)},get avatarColor(){return l(h).avatarColor},get tag(){return l(h).tag},get tagColor(){return l(h).tagColor},get elected(){return l(h).elected},size:"md"})}var W=A(M,2),q=w(W),Z=A(W,2),P=w(Z),I=A(m,2),ie=w(I),pe=w(ie),_e=A(ie,2);{let fe=H(()=>l(h).avatar??"man");Ya(_e,{get name(){return l(h).name},get photoUrl(){return l(h).photoUrl},get avatar(){return l(fe)},get avatarColor(){return l(h).avatarColor},get tag(){return l(h).tag},get tagColor(){return l(h).tagColor},get elected(){return l(h).elected},get description(){return l(h).votes},get position(){return l(h).position},positionSide:"right",size:"sm"})}T(()=>{N(C,l(h).position),N(q,`Nº ${l(h).number??""}`),N(P,l(h).votes),N(pe,`Nº ${l(h).number??""}`)}),y(S,b)});var p=A(u,2);{var g=S=>{var h=Ho(),b=w(h);{var m=C=>{var M=Rs();T(()=>N(M,i())),y(C,M)},k=C=>{var M=Uo(),W=tr(M),q=A(W),Z=w(q);T(()=>{N(W,`${a()??""} `),N(Z,`(${l(f)??""})`)}),y(C,M)};L(b,C=>{l(d)?C(m):C(k,!1)})}Ze("click",h,()=>E(s,l(d)?1:l(s)+1,!0)),y(S,h)};L(p,S=>{l(c)&&S(g)})}y(e,_),Xt()}un(["click"]);var Go=z("<span> </span>"),Wo=z('<div class="vote-overview-stats svelte-1m9ufac"></div>'),Zo=z("<span> </span>"),Yo=z('<span class="vote-overview-sep svelte-1m9ufac">|</span>'),Jo=z("<span> </span>"),Qo=z('<div class="vote-overview-meta svelte-1m9ufac"><!> <!> <!></div>'),Xo=z('<div class="vote-overview svelte-1m9ufac"><!> <!></div>');const $o={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 el(e,t){Qt(t,!0),lt(e,$o);let r=j(t,"data",19,()=>[]),n=j(t,"borderTop",3,!1),a=j(t,"align",3,"start");var i=Xo(),s=w(i);{var c=d=>{var _=Wo();Fr(_,21,r,Fa,(u,p)=>{var g=Go(),S=w(g);T(()=>N(S,`${l(p).text??""} ${l(p).value??""}`)),y(u,g)}),y(d,_)};L(s,d=>{r().length&&d(c)})}var o=A(s,2);{var f=d=>{var _=Qo(),u=w(_);{var p=m=>{var k=Zo(),C=w(k);T(()=>N(C,`Atualizado em ${t.date??""}`)),y(m,k)};L(u,m=>{t.date&&m(p)})}var g=A(u,2);{var S=m=>{var k=Yo();y(m,k)};L(g,m=>{t.date&&t.font&&m(S)})}var h=A(g,2);{var b=m=>{var k=Jo(),C=w(k);T(()=>N(C,`Fonte ${t.font??""}`)),y(m,k)};L(h,m=>{t.font&&m(b)})}y(d,_)};L(o,d=>{(t.date||t.font)&&d(f)})}T(()=>Rt(i,`justify-content:${a()==="end"?"flex-end":"flex-start"};${n()?"border-top:1px solid var(--sevn-color-neutral)":""}`)),y(e,i),Xt()}var tl=z('<span class="trigger-label svelte-hkzjiw"> </span>'),rl=z('<img alt="" aria-hidden="true" width="10" height="10"/>'),nl=z('<button class="clear svelte-hkzjiw" type="button"><img alt="" aria-hidden="true" width="8" height="8"/></button>'),al=z('<button type="button" role="option"> </button>'),il=z('<div class="dropdown svelte-hkzjiw" role="listbox"></div>'),sl=z('<div class="filter-dropdown svelte-hkzjiw"><button type="button" aria-haspopup="listbox"><!> <span class="trigger-value svelte-hkzjiw"> </span> <!></button> <!> <!></div>');const ol={hash:"svelte-hkzjiw",code:`.filter-dropdown.svelte-hkzjiw {position:relative;display:inline-flex;align-items:center;}
60
+
61
+ /* ── Trigger ─────────────────────────────── */.trigger.svelte-hkzjiw {display:inline-flex;align-items:center;gap:4px;padding:0;background:none;border:none;cursor:pointer;font-family:inherit;font-size:0.875rem;color:var(--sevn-color-tertiary);white-space:nowrap;}.trigger-label.svelte-hkzjiw {font-weight:700;}.trigger-value.svelte-hkzjiw {font-weight:400;}.trigger-chevron.svelte-hkzjiw {flex-shrink:0;transition:transform 0.2s ease;margin-left:2px;}.trigger-chevron.rotated.svelte-hkzjiw {transform:rotate(180deg);}
62
+
63
+ /* ── Botão de limpar ─────────────────────── */.clear.svelte-hkzjiw {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;margin-left:4px;padding:0;background:none;border:none;border-radius:50%;cursor:pointer;transition:background 0.15s;}.clear.svelte-hkzjiw:hover,
64
+ .clear.svelte-hkzjiw:focus-visible {background:rgba(0, 0, 0, 0.08);}
65
+
66
+ /* ── Dropdown ────────────────────────────── */.dropdown.svelte-hkzjiw {position:absolute;top:calc(100% + 6px);left:0;min-width:100%;background:#fff;border:1px solid #d1d1d6;border-radius:8px;box-shadow:0 6px 16px rgba(0, 0, 0, 0.1);z-index:200;overflow:hidden;}
67
+
68
+ /* ── Options ─────────────────────────────── */.option.svelte-hkzjiw {display:block;width:100%;padding:10px 14px;text-align:left;background:none;border:none;border-bottom:1px solid #f0f0f5;cursor:pointer;font-size:0.875rem;font-family:inherit;color:var(--sevn-color-tertiary);white-space:nowrap;transition:background 0.1s;}.option.svelte-hkzjiw:last-child {border-bottom:none;}.option.svelte-hkzjiw:hover {background:var(--sevn-color-neutral);}.option.selected.svelte-hkzjiw {background:color-mix(in srgb, var(--sevn-color-primary) 8%, transparent);color:var(--sevn-color-primary);font-weight:600;}`};function ll(e,t){Qt(t,!0),lt(e,ol);let r=j(t,"label",3,""),n=j(t,"options",19,()=>[]),a=j(t,"value",15,null),i=j(t,"clearable",3,!0),s=$(!1),c=$(null);const o=H(()=>a()!=null?n().find(P=>P.value===a())??null:null);function f(P){a(P.value),E(s,!1)}function d(){a(null),E(s,!1)}function _(P){l(c)&&!l(c).contains(P.target)&&E(s,!1)}Ka(()=>(document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)));var u=sl(),p=w(u);let g;var S=w(p);{var h=P=>{var I=tl(),ie=w(I);T(()=>N(ie,`${r()??""}:`)),y(P,I)};L(S,P=>{r()&&P(h)})}var b=A(S,2),m=w(b),k=A(b,2);{var C=P=>{var I=rl();let ie;T(()=>{ie=ze(I,1,"trigger-chevron svelte-hkzjiw",null,ie,{rotated:l(s)}),ee(I,"src",ir)}),y(P,I)};L(k,P=>{l(o)&&i()||P(C)})}var M=A(p,2);{var W=P=>{var I=nl(),ie=w(I);T(()=>{ee(I,"aria-label",`Limpar ${(r()||"filtro")??""}`),ee(ie,"src",Za)}),Ze("click",I,d),y(P,I)};L(M,P=>{l(o)&&i()&&P(W)})}var q=A(M,2);{var Z=P=>{var I=il();Fr(I,21,n,ie=>ie.value,(ie,pe)=>{var _e=al();let fe;var Ie=w(_e);T(()=>{fe=ze(_e,1,"option svelte-hkzjiw",null,fe,{selected:l(pe).value===a()}),ee(_e,"aria-selected",l(pe).value===a()),N(Ie,l(pe).label)}),Ze("click",_e,()=>f(l(pe))),y(ie,_e)}),y(P,I)};L(q,P=>{l(s)&&P(Z)})}gn(u,P=>E(c,P),()=>l(c)),T(()=>{g=ze(p,1,"trigger svelte-hkzjiw",null,g,{open:l(s)}),ee(p,"aria-expanded",l(s)),N(m,l(o)?l(o).label:"")}),Ze("click",p,()=>E(s,!l(s))),y(e,u),Xt()}un(["click"]);var cl=z('<span class="header-tag-above svelte-1xm1ks6"><!></span>'),fl=z('<span class="header-tag-inline svelte-1xm1ks6"><!></span>'),ul=z('<p class="header-description svelte-1xm1ks6"> </p>'),dl=z('<header class="header svelte-1xm1ks6"><!> <div class="header-title-row svelte-1xm1ks6"><h1 class="header-title svelte-1xm1ks6"> </h1> <!></div> <!></header>');const vl={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);}
69
+
70
+ @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);}
71
+ }
72
+
73
+ @media (min-width: 768px) {.header-tag-above.svelte-1xm1ks6 {display:none;}.header-tag-inline.svelte-1xm1ks6 {display:inline-flex;}
74
+ }`};function hl(e,t){lt(e,vl);var r=dl(),n=w(r);{var a=u=>{var p=cl(),g=w(p);sr(g,{get label(){return t.tag},get color(){return t.tagColor}}),y(u,p)};L(n,u=>{t.tag&&u(a)})}var i=A(n,2),s=w(i),c=w(s),o=A(s,2);{var f=u=>{var p=fl(),g=w(p);sr(g,{get label(){return t.tag},get color(){return t.tagColor}}),y(u,p)};L(o,u=>{t.tag&&u(f)})}var d=A(i,2);{var _=u=>{var p=ul(),g=w(p);T(()=>N(g,t.description)),y(u,p)};L(d,u=>{t.description&&u(_)})}T(()=>{Rt(r,`
75
+ --header-title-font-size: ${t.titleFontSize??"1.75rem"??""};
76
+ --header-title-font-weight: ${t.titleFontWeight??700??""};
77
+ --header-description-font-size: ${t.descriptionFontSize??"0.875rem"??""};
78
+ `),N(c,t.title)}),y(e,r)}class Ja{constructor(t={}){var r,n,a;this.inflight=new Map,this.tick=0,this.storageKey=(r=t.storageKey)!==null&&r!==void 0?r:"reqcache",this.maxEntries=(n=t.maxEntries)!==null&&n!==void 0?n:100,this.storage=(a=t.storage)!==null&&a!==void 0?a:_l()}async getFetch(t,r,n={}){const a=Date.now(),i=this.readAll(),s=i.find(f=>f.rota===t);if(s&&a<s.expiresAt)return s.lastAccess=this.nextAccess(),this.writeAll(i),s.data;const c=this.inflight.get(t);if(c)return c;const o=this.revalidate(t,r,n,s??null).finally(()=>this.inflight.delete(t));return this.inflight.set(t,o),o}invalidate(t){const r=this.readAll().filter(n=>n.rota!==t);this.writeAll(r)}cleanup(t=3600){const r=Date.now()-t*1e3,n=this.readAll(),a=n.filter(i=>i.expiresAt>r);return this.writeAll(a),n.length-a.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(t,r,n,a){var i,s;const c=(i=n.fetcher)!==null&&i!==void 0?i:fetch;let o;try{const d=await c(t,n.fetchOptions);if(!d.ok)throw new Error(`HTTP ${d.status} ao buscar ${t}`);o=await d.json()}catch(d){if(a&&(!((s=n.staleOnError)!==null&&s!==void 0)||s))return this.upsert({...a,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),a.data;throw d}if(a&&n.monotonicKey){const d=Qa(a.data,n.monotonicKey),_=Qa(o,n.monotonicKey);if(typeof d=="number"&&typeof _=="number"&&_<=d)return this.upsert({...a,expiresAt:Date.now()+r,lastAccess:this.nextAccess()}),a.data}const f=Date.now();return this.upsert({rota:t,data:o,createdAt:f,expiresAt:f+r,lastAccess:this.nextAccess()}),o}upsert(t){const r=this.readAll().filter(n=>n.rota!==t.rota);r.push(t),this.evictIfNeeded(r),this.writeAll(r)}evictIfNeeded(t){for(;t.length>this.maxEntries;){let r=0;for(let n=1;n<t.length;n++)t[n].lastAccess<t[r].lastAccess&&(r=n);t.splice(r,1)}}readAll(){if(!this.storage)return[];try{const t=this.storage.getItem(this.storageKey);if(!t)return[];const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}}writeAll(t){if(this.storage)try{this.storage.setItem(this.storageKey,JSON.stringify(t))}catch(r){if(pl(r)&&t.length>0){const n=[...t].sort((a,i)=>a.lastAccess-i.lastAccess);n.splice(0,Math.ceil(n.length/2));try{this.storage.setItem(this.storageKey,JSON.stringify(n))}catch{}}}}}function Qa(e,t){return t.split(".").reduce((r,n)=>{if(r&&typeof r=="object"&&n in r)return r[n]},e)}function pl(e){return e instanceof Error&&(e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}function _l(){try{if(typeof localStorage<"u"){const e="__reqcache_probe__";return localStorage.setItem(e,"1"),localStorage.removeItem(e),localStorage}}catch{}return null}new Ja;const Xa=300,gl=3600,mn=new Map;function wn(){try{return typeof window<"u"&&typeof localStorage<"u"}catch{return!1}}const ml={getItem(e){return wn()?localStorage.getItem(e):mn.get(e)??null},setItem(e,t){if(wn())try{localStorage.setItem(e,t)}catch{console.warn("[api] Cota do localStorage excedida, ignorando escrita")}else mn.set(e,t)},removeItem(e){wn()?localStorage.removeItem(e):mn.delete(e)}};let bn=null;function wl(){if(!bn){const{storageKey:e,maxEntries:t}=pr().cache;bn=new Ja({storage:ml,storageKey:e,maxEntries:t})}return bn}async function $a(e,t,r=Xa,n){const[a]=Rn(),i=e.replace(/^\/+/,""),s=new URL(i,`${a.replace(/\/+$/,"")}/`);let c;try{c=await wl().getFetch(s.toString(),r*1e3,{monotonicKey:n,fetcher:hi})}catch(o){throw o instanceof Error&&/^HTTP 404 /.test(o.message)?new Error("Dados ainda não publicados"):o}if(c&&typeof c=="object"&&c.published===!1)throw new Error(c.reason??"Dados ainda não publicados");return c}function bl(e){return $a(`v1/reference/municipalities/${e.toUpperCase()}.json`,void 0,gl)}function yl(e,t){const r=t?.round,n=t?.office??"president";let a="br";return t?.municipalityId?a=`mun/${t.municipalityId}`:t?.state&&(a=`uf/${t.state.toUpperCase()}`),$a(`v1/elections/${e}/r${r}/${n}/${a}/results.json`,void 0,Xa,"summary.ballots_counted")}const xl=new Set(["da","de","do","das","dos","e"]);function zl(e){return e.toLowerCase().split(" ").map((t,r)=>r>0&&xl.has(t)?t:t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Sl(e){if(typeof e=="string"){const r=e.match(/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?/);if(r)return new Date(Date.UTC(Number(r[1]),Number(r[2])-1,Number(r[3]),Number(r[4]),Number(r[5]),Number(r[6]??0)))}const t=new Date(e);return Number.isNaN(t.getTime())?null:t}function yn(e){if(e==null||e==="")return"";const t=Sl(e);if(!t)return"";const r=String(t.getUTCDate()).padStart(2,"0"),n=String(t.getUTCMonth()+1).padStart(2,"0"),a=t.getUTCFullYear(),i=String(t.getUTCHours()).padStart(2,"0"),s=String(t.getUTCMinutes()).padStart(2,"0");return`${r}/${n}/${a} às ${i}h${s}`}function Cl(e,t="TSE"){const r=yn(e);return r?`Atualizado em ${r} | Fonte ${t}`:`Fonte ${t}`}const El=yn("2022-10-31T00:18:00Z");Cl("2022-10-31T00:18:00Z");var kl=z('<p class="sevn_results_office__status svelte-mc3jf"> </p>'),jl=z('<p class="sevn_results_office__status sevn_results_office__status--error svelte-mc3jf"> </p>'),Al=z("<!> <!>",1),Tl=z('<div class="sevn_results_office__filters-web svelte-mc3jf"><div class="sevn_results_office__filter-uf svelte-mc3jf"><!></div> <div class="sevn_results_office__filter-by svelte-mc3jf"><!></div></div> <div class="sevn_results_office__filters-mobile svelte-mc3jf"><!> <!></div> <!>',1),Ml=z('<div><!> <div class="sevn_results_office__office-web svelte-mc3jf"><!></div> <div class="sevn_results_office__office-mobile svelte-mc3jf"><!></div> <!></div>');const Ll={hash:"svelte-mc3jf",code:`.sevn_results_office.svelte-mc3jf {display:flex;flex-direction:column;gap:24px;}.sevn_results_office--raw.svelte-mc3jf,
79
+ .sevn_results_office--raw.svelte-mc3jf :where(.svelte-mc3jf) {all:revert;}.sevn_results_office__status.svelte-mc3jf {font-size:0.875rem;color:var(--sevn-color-text-secondary, #6b7280);}.sevn_results_office__status--error.svelte-mc3jf {color:#e11d48;}.sevn_results_office__office-web.svelte-mc3jf {display:none;}.sevn_results_office__office-mobile.svelte-mc3jf {display:block;width:100%;}
80
+
81
+ @media (min-width: 768px) {.sevn_results_office__office-web.svelte-mc3jf {display:block;}.sevn_results_office__office-mobile.svelte-mc3jf {display:none;}
82
+ }
83
+
84
+ /* ── Web (oculto no mobile) ─────────────────────────── */.sevn_results_office__filters-web.svelte-mc3jf {display:none;}
85
+
86
+ /* ── Mobile (visível por padrão) ────────────────────── */.sevn_results_office__filters-mobile.svelte-mc3jf {display:flex;flex-direction:column;gap:25px;}.sevn_results_office.svelte-mc3jf .vote-overview {padding:10px 0;font-size:0.7rem;gap:8px;}.sevn_results_office.svelte-mc3jf .vote-overview .vote-overview-stats {gap:8px;}
87
+
88
+ @media (max-width: 767px) {.sevn_results_office.svelte-mc3jf .dropdown {position:static;margin-top:10px;}
89
+ }
90
+
91
+ /* ── Desktop overrides ──────────────────────────────── */
92
+ @media (min-width: 768px) {.sevn_results_office__filters-web.svelte-mc3jf {display:flex;gap:16px;align-items:flex-start;}.sevn_results_office__filter-uf.svelte-mc3jf,
93
+ .sevn_results_office__filter-by.svelte-mc3jf {flex:1;min-width:0;}.sevn_results_office__filters-mobile.svelte-mc3jf {display:none;}.sevn_results_office.svelte-mc3jf .vote-overview {padding:8px 0;gap:8px;align-items:flex-end;}
94
+ }`};function Pl(e,t){Qt(t,!0),lt(e,Ll);let r=j(t,"mock",3,!1),n=j(t,"rawStyle",3,!1),a=j(t,"year",3,2026),i=j(t,"defaultOffice",3,"senator"),s=j(t,"itemsPerPage",3,10),c=j(t,"header",19,()=>({title:"Resultados por cargo",description:"Filtre por cargo, estado ou município e confira os votos, percentuais e dados de cada candidato."}));const o=[{value:"senador",label:"Senador"},{value:"deputado-federal",label:"Deputado Federal"},{value:"deputado-estadual",label:"Deputado Estadual"}],f={senador:"senator","deputado-federal":"federal_deputy","deputado-estadual":"state_deputy"},d={senator:"senador",federal_deputy:"deputado-federal",state_deputy:"deputado-estadual"};let _=$(Tt(ar(()=>d[i()]??"senador"))),u=$(null),p=$(!1),g=$(null);const S=[{value:"ac",label:"Acre AC"},{value:"al",label:"Alagoas AL"},{value:"ap",label:"Amapá AP"},{value:"am",label:"Amazonas AM"},{value:"ba",label:"Bahia BA"},{value:"ce",label:"Ceará CE"},{value:"df",label:"Distrito Federal DF"},{value:"es",label:"Espírito Santo ES"},{value:"go",label:"Goiás GO"},{value:"ma",label:"Maranhão MA"},{value:"mg",label:"Minas Gerais MG"},{value:"ms",label:"Mato Grosso do Sul MS"},{value:"mt",label:"Mato Grosso MT"},{value:"pa",label:"Pará PA"},{value:"pb",label:"Paraíba PB"},{value:"pe",label:"Pernambuco PE"},{value:"pi",label:"Piauí PI"},{value:"pr",label:"Paraná PR"},{value:"rj",label:"Rio de Janeiro RJ"},{value:"rn",label:"Rio Grande do Norte RN"},{value:"ro",label:"Rondônia RO"},{value:"rr",label:"Roraima RR"},{value:"rs",label:"Rio Grande do Sul RS"},{value:"sc",label:"Santa Catarina SC"},{value:"se",label:"Sergipe SE"},{value:"sp",label:"São Paulo SP"},{value:"to",label:"Tocantins TO"}],h=[{value:"3507001",label:"Boituva"},{value:"3509502",label:"Campinas"},{value:"3518800",label:"Guarulhos"},{value:"3543402",label:"Ribeirão Preto"},{value:"3548500",label:"Santos"},{value:"3549805",label:"São João da Boa Vista"},{value:"3550308",label:"São Paulo"},{value:"3552205",label:"Sorocaba"}];let b=$(null),m=$(null),k=$(null),C=$(!1);rr(()=>{!Kt||!l(b)||(E(m,null),!r()&&(E(k,null),E(C,!0),bl(l(b)).then(J=>{E(k,J,!0),E(C,!1)}).catch(J=>{console.error("Failed to fetch municipalities:",J),E(C,!1)})))});const M=H(()=>!r()&&l(k)?.municipalities?l(k).municipalities.map(J=>({value:String(J.municipality_id),label:J.name})):r()?h:[]),W=H(()=>l(M).find(J=>J.value===l(m))?.label??null),q=H(()=>l(b)?l(C)?"Carregando municípios...":l(m)?"Você selecionou:":"Busque pelo município":"Selecione a UF primeiro"),Z=1;rr(()=>{if(!(!Kt||r())){if(!l(b)||!l(_)){E(u,null);return}E(p,!0),E(g,null),E(u,null),yl(a(),{office:f[l(_)]||"senator",round:Z,state:l(b),municipalityId:l(m)?Number(l(m)):void 0}).then(J=>{E(u,J,!0),E(p,!1)}).catch(J=>{console.error("Failed to fetch municipality results:",J),E(g,"Failed to load data"),E(p,!1)})}});const P=[{position:"1° Lugar",name:"Candidato A",tag:"ABC",tagColor:"#166534",avatarColor:"#166534",number:"123",votes:"42,8% dos votos válidos",elected:!0},{position:"2° Lugar",name:"Candidato B",tag:"DEF",tagColor:"#d97706",avatarColor:"#d97706",number:"456",votes:"31,4% dos votos válidos",elected:!0},{position:"3° Lugar",name:"Candidato C",tag:"GHI",tagColor:"#1e3461",avatarColor:"#1e3461",number:"789",votes:"15,6% dos votos válidos"},{position:"4° Lugar",name:"Candidato D",tag:"JKL",tagColor:"#374151",avatarColor:"#374151",number:"321",votes:"6,7% dos votos válidos"},{position:"5° Lugar",name:"Candidato E",tag:"MNO",tagColor:"#e11d48",avatarColor:"#e11d48",number:"654",votes:"3,5% dos votos válidos"}],I=H(()=>{if(!r()&&l(u)?.candidates&&Array.isArray(l(u).candidates)){const te=[...l(u).candidates].sort((re,Se)=>Se.valid_votes_pct-re.valid_votes_pct).map((re,Se)=>({position:`${Se+1}° Lugar`,name:zl(re.ballot_name),photoUrl:re.photo_url,tag:re.party_abbr,tagColor:re.party_color||"var(--sevn-color-primary)",avatarColor:re.party_color||"var(--sevn-color-primary)",number:re.number??"",votes:`${re.valid_votes_pct.toFixed(1).replace(".",",")}% dos votos válidos`,elected:re.elected??!1})),{total_valid_votes:oe,null_votes:me,blank_votes:Ge}=l(u).summary,$e=oe+me+Ge;return{candidates:te,overview:[{text:"Nulos",value:`${(me/$e*100).toFixed(2)}%`},{text:"Brancos",value:`${(Ge/$e*100).toFixed(2)}%`},{text:"Válidos",value:`${oe.toLocaleString("pt-BR")} votos`}],lastUpdate:yn(l(u).summary.last_updated)}}return r()?{candidates:P,overview:[{text:"Nulos",value:"3,16%"},{text:"Brancos",value:"1,43%"},{text:"Válidos",value:"118.552.353 votos"}],lastUpdate:El}:{candidates:[],overview:[],lastUpdate:""}}),ie=H(()=>l(I).candidates),pe=H(()=>l(I).overview),_e=H(()=>l(I).lastUpdate),fe=H(()=>l(_e)?`Atualizado em ${l(_e)} | Fonte TSE`:"Fonte TSE");var Ie=Ml();let vt;var yt=w(Ie);hl(yt,{get title(){return c().title},get description(){return c().description},get tag(){return c().tag},get tagColor(){return c().tagColor}});var we=A(yt,2),U=w(we);ll(U,{label:"Cargo",get options(){return o},get value(){return l(_)},set value(J){E(_,J,!0)}});var Q=A(we,2),ge=w(Q);Cr(ge,{label:"Cargo:",showLabel:!1,showLabelInField:!0,labelAsPlaceholder:!0,showPlaceholderOnMobile:!0,get options(){return o},get value(){return l(_)},set value(J){E(_,J,!0)}});var Ut=A(Q,2);{var Ht=J=>{var te=Tl(),oe=tr(te),me=w(oe),Ge=w(me);Cr(Ge,{label:"Busque por UF",get options(){return S},get icon(){return ir},iconSize:13,get meta(){return l(fe)},get value(){return l(b)},set value(X){E(b,X,!0)}});var $e=A(me,2),re=w($e);{let X=H(()=>!l(b)||l(C));Cr(re,{get label(){return l(q)},get options(){return l(M)},get icon(){return ir},iconSize:13,get disabled(){return l(X)},get value(){return l(m)},set value(se){E(m,se,!0)}})}var Se=A(oe,2),x=w(Se);{let X=H(()=>l(b)?"Você selecionou:":"Busque por estado:");Cr(x,{get label(){return l(X)},get options(){return S},get icon(){return ir},iconSize:13,get value(){return l(b)},set value(se){E(b,se,!0)}})}var O=A(x,2);{let X=H(()=>!l(b)||l(C));Cr(O,{get label(){return l(q)},get options(){return l(M)},get icon(){return ir},iconSize:13,get disabled(){return l(X)},get value(){return l(m)},set value(se){E(m,se,!0)}})}var K=A(Se,2);{var Ce=X=>{var se=qa(),Le=tr(se);{var xt=ht=>{var zt=kl(),hr=w(zt);T(()=>N(hr,`Carregando resultados${l(W)?` de ${l(W)}`:""}...`)),y(ht,zt)},Sn=ht=>{var zt=jl(),hr=w(zt);T(()=>N(hr,l(g))),y(ht,zt)},Ol=ht=>{var zt=Al(),hr=tr(zt);Ko(hr,{get candidates(){return l(ie)},get itemsPerPage(){return s()}});var Rl=A(hr,2);el(Rl,{get data(){return l(pe)},get date(){return l(_e)},font:"TSE",borderTop:!0}),y(ht,zt)};L(Le,ht=>{l(p)?ht(xt):l(g)?ht(Sn,1):ht(Ol,!1)})}y(X,se)};L(K,X=>{l(b)&&X(Ce)})}y(J,te)};L(Ut,J=>{l(_)&&J(Ht)})}T(()=>vt=ze(Ie,1,"sevn_results_office svelte-mc3jf",null,vt,{"sevn_results_office--raw":n()})),y(e,Ie),Xt()}const ei=Qs(Pl,"ResultsByOffice");return typeof window<"u"&&(window.SevnElections=Object.assign(window.SevnElections||{},{Core:_i,ResultsByOffice:ei}),$s()),ei}));