1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../assets/ol.aEmqeWRe.css"])))=>i.map(i=>d[i]); 2import{_ as Pe}from"../chunks/C1FmrZbK.js";import{s as Ae,d as f,a as he,i as S,b as g,p as ue,r as v,q as Re,v as ye,g as R,c as M,e as q,f as H,z as $e,j as y,h as N,t as j,k as Ce,B as Ve,C as Fe,n as Be,w as Le,O as ve,x as fe}from"../chunks/CeKwq4tL.js";import{S as Ue,i as qe,d as X,t as L,a as O,e as re,m as Y,c as Z,b as x,g as ie}from"../chunks/CC91_1Oj.js";import{e as we,u as Ge,o as He}from"../chunks/BysmMC_4.js";import{V as ke,G as Se}from"../chunks/eoGA7h4K.js";import je from"../chunks/Bc75QkeA.js";import{B as ne}from"../chunks/Cjr6tjxi.js";import{T as ze}from"../chunks/HIX3Da2n.js";import{p as Je}from"../chunks/Aiqce9ZO.js";import{e as me}from"../chunks/C-YKzGbR.js";import{c as Ke}from"../chunks/CZ2l4SM5.js";function Ee(l,e,t){const n=l.slice();return n[17]=e[t],n[18]=e,n[19]=t,n}function Qe(l){let e;return{c(){e=j("Submit")},l(t){e=H(t,"Submit")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function We(l){let e;return{c(){e=j("Cancel")},l(t){e=H(t,"Cancel")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function Ie(l){let e,t;return e=new ne({props:{small:!0,style:"display: block; width: max-content; margin-bottom: 0.5rem; --color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[Xe]},$$scope:{ctx:l}}}),e.$on("click",l[11]),{c(){x(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,m){Y(e,n,m),t=!0},p(n,m){const r={};m&1048576&&(r.$$scope={dirty:m,ctx:n}),e.$set(r)},i(n){t||(O(e.$$.fragment,n),t=!0)},o(n){L(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Xe(l){let e;return{c(){e=j("Rename")},l(t){e=H(t,"Rename")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function Ye(l){let e;return{c(){e=j("Draw another neighborhood")},l(t){e=H(t,"Draw another neighborhood")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function Oe(l){let e,t="No submissions.";return{c(){e=N("i"),e.textContent=t},l(n){e=M(n,"I",{"data-svelte-h":!0}),Le(e)!=="svelte-1iruu9m"&&(e.textContent=t)},m(n,m){S(n,e,m)},p:Be,d(n){n&&f(e)}}}function Te(l){let e,t;return e=new je({props:{interactive:!0,id:"map-"+l[17].id,primary:new ke({features:[new Se().readFeature(l[17].boundaries)]})}}),{c(){x(e.$$.fragment)},l(n){Z(e.$$.fragment,n)},m(n,m){Y(e,n,m),t=!0},p(n,m){const r={};m&1&&(r.id="map-"+n[17].id),m&1&&(r.primary=new ke({features:[new Se().readFeature(n[17].boundaries)]})),e.$set(r)},i(n){t||(O(e.$$.fragment,n),t=!0)},o(n){L(e.$$.fragment,n),t=!1},d(n){X(e,n)}}}function Me(l){let e,t="<b>This submission was reported.</b>";return{c(){e=N("small"),e.innerHTML=t,this.h()},l(n){e=M(n,"SMALL",{class:!0,"data-svelte-h":!0}),Le(e)!=="svelte-1jucwk0"&&(e.innerHTML=t),this.h()},h(){v(e,"class","svelte-d5177s")},m(n,m){S(n,e,m)},d(n){n&&f(e)}}}function Ze(l){let e,t,n,m,r,h,p,_,c;r=new ne({props:{submit:!0,small:!0,disabled:l[17].id===l[3],style:"--color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[et]},$$scope:{ctx:l}}});function k(){return l[13](l[17])}return{c(){e=N("form"),t=N("input"),m=y(),x(r.$$.fragment),this.h()},l(i){e=M(i,"FORM",{method:!0,action:!0,class:!0});var s=q(e);t=M(s,"INPUT",{type:!0,name:!0}),m=R(s),Z(r.$$.fragment,s),s.forEach(f),this.h()},h(){v(t,"type","hidden"),v(t,"name","submission"),t.value=n=l[17].id,v(e,"method","POST"),v(e,"action","?/report"),v(e,"class","svelte-d5177s")},m(i,s){S(i,e,s),g(e,t),g(e,m),Y(r,e,null),p=!0,_||(c=ue(h=me.call(null,e,k)),_=!0)},p(i,s){l=i,(!p||s&1&&n!==(n=l[17].id))&&(t.value=n);const w={};s&9&&(w.disabled=l[17].id===l[3]),s&1048576&&(w.$$scope={dirty:s,ctx:l}),r.$set(w),h&&fe(h.update)&&s&9&&h.update.call(null,k)},i(i){p||(O(r.$$.fragment,i),p=!0)},o(i){L(r.$$.fragment,i),p=!1},d(i){i&&f(e),X(r),_=!1,c()}}}function xe(l){let e,t,n,m,r,h,p,_,c;r=new ne({props:{submit:!0,small:!0,disabled:l[17].id===l[4],style:"--color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[tt]},$$scope:{ctx:l}}});function k(){return l[12](l[17])}return{c(){e=N("form"),t=N("input"),m=y(),x(r.$$.fragment),this.h()},l(i){e=M(i,"FORM",{method:!0,action:!0,class:!0});var s=q(e);t=M(s,"INPUT",{type:!0,name:!0}
2),m=R(s),Z(r.$$.fragment,s),s.forEach(f),this.h()},h(){v(t,"type","hidden"),v(t,"name","submission"),t.value=n=l[17].id,v(e,"method","POST"),v(e,"action","?/allow"),v(e,"class","svelte-d5177s")},m(i,s){S(i,e,s),g(e,t),g(e,m),Y(r,e,null),p=!0,_||(c=ue(h=me.call(null,e,k)),_=!0)},p(i,s){l=i,(!p||s&1&&n!==(n=l[17].id))&&(t.value=n);const w={};s&17&&(w.disabled=l[17].id===l[4]),s&1048576&&(w.$$scope={dirty:s,ctx:l}),r.$set(w),h&&fe(h.update)&&s&17&&h.update.call(null,k)},i(i){p||(O(r.$$.fragment,i),p=!0)},o(i){L(r.$$.fragment,i),p=!1},d(i){i&&f(e),X(r),_=!1,c()}}}function et(l){let e;return{c(){e=j("Report")},l(t){e=H(t,"Report")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function tt(l){let e;return{c(){e=j("Allow")},l(t){e=H(t,"Allow")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function Ne(l){let e,t,n,m,r,h,p,_,c;r=new ne({props:{submit:!0,small:!0,disabled:l[17].id===l[2],style:"--color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[nt]},$$scope:{ctx:l}}});function k(){return l[14](l[17])}return{c(){e=N("form"),t=N("input"),m=y(),x(r.$$.fragment),this.h()},l(i){e=M(i,"FORM",{method:!0,action:!0,class:!0});var s=q(e);t=M(s,"INPUT",{type:!0,name:!0}),m=R(s),Z(r.$$.fragment,s),s.forEach(f),this.h()},h(){v(t,"type","hidden"),v(t,"name","submission"),t.value=n=l[17].id,v(e,"method","POST"),v(e,"action","?/delete"),v(e,"class","svelte-d5177s")},m(i,s){S(i,e,s),g(e,t),g(e,m),Y(r,e,null),p=!0,_||(c=ue(h=me.call(null,e,k)),_=!0)},p(i,s){l=i,(!p||s&1&&n!==(n=l[17].id))&&(t.value=n);const w={};s&5&&(w.disabled=l[17].id===l[2]),s&1048576&&(w.$$scope={dirty:s,ctx:l}),r.$set(w),h&&fe(h.update)&&s&5&&h.update.call(null,k)},i(i){p||(O(r.$$.fragment,i),p=!0)},o(i){L(r.$$.fragment,i),p=!1},d(i){i&&f(e),X(r),_=!1,c()}}}function nt(l){let e;return{c(){e=j("Delete")},l(t){e=H(t,"Delete")},m(t,n){S(t,e,n)},d(t){t&&f(e)}}}function De(l,e){let t,n,m,r,h,p,_,c=e[17].date.toLocaleString()+"",k,i,s,w,D,E,V,Q,F=e[19],G,a=e[6][e[19]]&&Te(e),d=e[17].reported&&Me();const U=[xe,Ze],P=[];function z(C,b){return C[17].reported?0:1}D=z(e),E=P[D]=U[D](e);let $=e[0].authenticated&&Ne(e);const le=()=>e[15](t,F),ee=()=>e[15](null,F);return{key:l,first:null,c(){t=N("div"),n=N("div"),a&&a.c(),m=y(),r=N("small"),h=N("b"),p=j(`Submitted at 3 `),_=N("time"),k=j(c),s=y(),d&&d.c(),w=y(),E.c(),V=y(),$&&$.c(),Q=y(),this.h()},l(C){t=M(C,"DIV",{class:!0});var b=q(t);n=M(b,"DIV",{class:!0});var I=q(n);a&&a.l(I),I.forEach(f),m=R(b),r=M(b,"SMALL",{class:!0});var oe=q(r);h=M(oe,"B",{});var J=q(h);p=H(J,`Submitted at 4 `),_=M(J,"TIME",{datetime:!0});var K=q(_);k=H(K,c),K.forEach(f),J.forEach(f),oe.forEach(f),s=R(b),d&&d.l(b),w=R(b),E.l(b),V=R(b),$&&$.l(b),Q=R(b),b.forEach(f),this.h()},h(){v(n,"class","map-container svelte-d5177s"),v(_,"datetime",i=e[17].date.toISOString()),v(r,"class","svelte-d5177s"),v(t,"class","submission svelte-d5177s"),this.first=t},m(C,b){S(C,t,b),g(t,n),a&&a.m(n,null),g(t,m),g(t,r),g(r,h),g(h,p),g(h,_),g(_,k),g(t,s),d&&d.m(t,null),g(t,w),P[D].m(t,null),g(t,V),$&&$.m(t,null),g(t,Q),le(),G=!0},p(C,b){e=C,e[6][e[19]]?a?(a.p(e,b),b&65&&O(a,1)):(a=Te(e),a.c(),O(a,1),a.m(n,null)):a&&(ie(),L(a,1,1,()=>{a=null}),re()),(!G||b&1)&&c!==(c=e[17].date.toLocaleString()+"")&&he(k,c),(!G||b&1&&i!==(i=e[17].date.toISOString()))&&v(_,"datetime",i),e[17].reported?d||(d=Me(),d.c(),d.m(t,w)):d&&(d.d(1),d=null);let I=D;D=z(e),D===I?P[D].p(e,b):(ie(),L(P[I],1,1,()=>{P[I]=null}),re(),E=P[D],E?E.p(e,b):(E=P[D]=U[D](e),E.c()),O(E,1),E.m(t,V)),e[0].authenticated?$?($.p(e,b),b&1&&O($,1)):($=Ne(e),$.c(),O($,1),$.m(t,Q)):$&&(ie(),L($,1,1,()=>{$=null}),re()),F!==e[19]&&(ee(),F=e[19],le())},i(C){G||(O(a),O(E),O($),G=!0)},o(C){L(a),L(E),L($),G=!1},d(C){C&&f(t),a&&a.d(),d&&d.d(),P[D].d(),$&&$.d(),ee()}}}function lt(l){let e,t,n,m,r=l[8].params.neighborhood+"",h,p,_,c,k,i,s,w,D,E,V,Q,F,G,a,d,U,P,z,$,le,ee=l[0].submissions.length+"",C,b,I=[],oe=new Map,J,K,ce,pe;document.title=e=l[8].params.neighborhood+" submissions",w=new ze({props:{name:"new-neighborhood-name",label:"Neighborhood name",required:!0}}),V=new ne({props:{small:!0,submit:!0,disabled:l[1],$$slots:{default:[Qe]},$$scope:{ctx:l}}}),F=new ne({props:{formmethod:"dialog",formnovalidate:!0,small:!0,style:"--color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[We]},$$scope:{ctx:l}}});let T=l[0].authenticated&&Ie(l);U=new ne({props:{link:!0,small:!0,href:"/"+Ke,style:"display: block; width: max-content; margin-bottom: 0.5rem; --color-button: rgb(59, 59, 110); --color-button-hover: rgb(90, 90, 169);",$$slots:{default:[Ye]},$$scope:{ctx:l}}});let te=we(l[0].submissions);const be=o=>o[17].id;for(let o=0;o<te.length;o+=1){let u=Ee(l,te,o),B=be(u);oe.set(B,I[o]=De(B,u))}let A=null;return te.length||(A=Oe()),{c(){t=y(),n=N("h1"),m=j("Submissions for "),h=j(r),p=y(),_=N("dialog"),c=N("form"),k=N("input"),s=y(),x(w.$$.fragment),D=y(),E=N("div"),x(V.$$.fragment),Q=y(),x(F.$$.fragment),a=y(),T&&T.c(),d=y(),x(U.$$.fragment),P=y(),z=N("div"),$=N("b"),le=j("Number of submissions: "),C=j(ee),b=y();for(let o=0;o<I.length;o+=1)I[o].c();J=$e(),A&&A.c(),this.h()}
4,l(o){ye("svelte-1rm7id0",document.head).forEach(f),t=R(o),n=M(o,"H1",{class:!0});var B=q(n);m=H(B,"Submissions for "),h=H(B,r),B.forEach(f),p=R(o),_=M(o,"DIALOG",{});var se=q(_);c=M(se,"FORM",{method:!0,action:!0,class:!0});var W=q(c);k=M(W,"INPUT",{type:!0,name:!0}),s=R(W),Z(w.$$.fragment,W),D=R(W),E=M(W,"DIV",{});var ae=q(E);Z(V.$$.fragment,ae),Q=R(ae),Z(F.$$.fragment,ae),ae.forEach(f),W.forEach(f),se.forEach(f),a=R(o),T&&T.l(o),d=R(o),Z(U.$$.fragment,o),P=R(o),z=M(o,"DIV",{style:!0});var ge=q(z);$=M(ge,"B",{});var de=q($);le=H(de,"Number of submissions: "),C=H(de,ee),de.forEach(f),ge.forEach(f),b=R(o);for(let _e=0;_e<I.length;_e+=1)I[_e].l(o);J=$e(),A&&A.l(o),this.h()},h(){v(n,"class","svelte-d5177s"),v(k,"type","hidden"),k.value=i=l[8].params.neighborhood,v(k,"name","old-neighborhood-name"),v(c,"method","post"),v(c,"action","?/rename"),v(c,"class","svelte-d5177s"),Re(z,"margin-bottom","1rem")},m(o,u){S(o,t,u),S(o,n,u),g(n,m),g(n,h),S(o,p,u),S(o,_,u),g(_,c),g(c,k),g(c,s),Y(w,c,null),g(c,D),g(c,E),Y(V,E,null),g(E,Q),Y(F,E,null),l[10](_),S(o,a,u),T&&T.m(o,u),S(o,d,u),Y(U,o,u),S(o,P,u),S(o,z,u),g(z,$),g($,le),g($,C),S(o,b,u);for(let B=0;B<I.length;B+=1)I[B]&&I[B].m(o,u);S(o,J,u),A&&A.m(o,u),K=!0,ce||(pe=ue(G=me.call(null,c,l[9])),ce=!0)},p(o,[u]){(!K||u&256)&&e!==(e=o[8].params.neighborhood+" submissions")&&(document.title=e),(!K||u&256)&&r!==(r=o[8].params.neighborhood+"")&&he(h,r),(!K||u&256&&i!==(i=o[8].params.neighborhood))&&(k.value=i);const B={};u&2&&(B.disabled=o[1]),u&1048576&&(B.$$scope={dirty:u,ctx:o}),V.$set(B);const se={};u&1048576&&(se.$$scope={dirty:u,ctx:o}),F.$set(se),G&&fe(G.update)&&u&130&&G.update.call(null,o[9]),o[0].authenticated?T?(T.p(o,u),u&1&&O(T,1)):(T=Ie(o),T.c(),O(T,1),T.m(d.parentNode,d)):T&&(ie(),L(T,1,1,()=>{T=null}),re());const W={};u&1048576&&(W.$$scope={dirty:u,ctx:o}),U.$set(W),(!K||u&1)&&ee!==(ee=o[0].submissions.length+"")&&he(C,ee),u&125&&(te=we(o[0].submissions),ie(),I=Ge(I,u,be,1,o,te,oe,J.parentNode,He,De,J,Ee),re(),!te.length&&A?A.p(o,u):te.length?A&&(A.d(1),A=null):(A=Oe(),A.c(),A.m(J.parentNode,J)))},i(o){if(!K){O(w.$$.fragment,o),O(V.$$.fragment,o),O(F.$$.fragment,o),O(T),O(U.$$.fragment,o);for(let u=0;u<te.length;u+=1)O(I[u]);K=!0}},o(o){L(w.$$.fragment,o),L(V.$$.fragment,o),L(F.$$.fragment,o),L(T),L(U.$$.fragment,o);for(let u=0;u<I.length;u+=1)L(I[u]);K=!1},d(o){o&&(f(t),f(n),f(p),f(_),f(a),f(d),f(P),f(z),f(b),f(J)),X(w),X(V),X(F),l[10](null),T&&T.d(o),X(U,o);for(let u=0;u<I.length;u+=1)I[u].d(o);A&&A.d(o),ce=!1,pe()}}}function ot(l,e,t){let n;Ce(l,Je,a=>t(8,n=a));let{data:m}=e,r=!1,h,p,_,c=[],k=m.submissions.map(()=>!1),i,s;Ve(async()=>{await Pe(()=>Promise.resolve({}),__vite__mapDeps([0]),import.meta.url),i=new IntersectionObserver((a,d)=>{a.forEach(U=>{if(U.isIntersecting){const P=c.findIndex(z=>z===U.target);P!==-1&&(t(6,k[P]=!0,k),d.unobserve(c[P]))}})},{threshold:0,rootMargin:"300px"}),c.forEach(a=>{i.observe(a)})}),Fe(()=>{i&&i.disconnect()});const w=()=>(t(1,r=!0),async({update:a})=>{await a(),t(1,r=!1),s.close()});function D(a){ve[a?"unshift":"push"](()=>{s=a,t(7,s)})}const E=()=>{s.showModal()},V=a=>(t(4,_=a.id),async({update:d})=>{confirm("Are you sure you want to allow this submission?")&&await d(),t(4,_=void 0)}),Q=a=>(t(3,p=a.id),async({update:d})=>{confirm("Are you sure you want to report this submission?")&&await d(),t(3,p=void 0)}),F=a=>(t(2,h=a.id),async({update:d})=>{confirm("Are you sure you want to delete this submission?")&&await d(),t(2,h=void 0)});function G(a,d){ve[a?"unshift":"push"](()=>{c[d]=a,t(5,c)})}return l.$$set=a=>{"data"in a&&t(0,m=a.data)},[m,r,h,p,_,c,k,s,n,w,D,E,V,Q,F,G]}class pt extends Ue{constructor(e){super(),qe(this,e,ot,lt,Ae,{data:0})}}export{pt as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.